From 6eecd359ea43142d9ff2618c223fc73d953feba3 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Tue, 11 Sep 2018 07:45:26 +0900 Subject: [PATCH 01/46] update: compat with python 3.7, use spec 2.7.0 --- ...odegen-ignore => .openapi-generator-ignore | 0 .openapi-generator/VERSION | 1 + .swagger-codegen/VERSION | 1 - .travis.yml | 4 +- README.md | 23 +- docs/AccountApi.md | 4 +- docs/ClassApi.md | 116 +- docs/ClassDetailsCanvas.md | 2 +- docs/ClassDetailsClever.md | 8 +- docs/ClassDetailsGoogleClassroom.md | 4 +- docs/Collection.md | 4 +- docs/CollectionApi.md | 52 +- docs/CollectionCapabilities.md | 4 +- docs/CollectionCreation.md | 2 +- docs/CollectionModification.md | 2 +- docs/GroupApi.md | 12 +- docs/OrganizationApi.md | 66 +- docs/ResourceCollaborator.md | 3 - docs/ResourceRights.md | 1 + docs/ScoreApi.md | 178 +- docs/ScoreCommentContext.md | 3 +- docs/ScoreCreation.md | 5 +- docs/ScoreDetails.md | 7 +- docs/ScoreModification.md | 2 +- docs/ScoreRevisionCreation.md | 2 +- docs/UserApi.md | 14 +- docs/UserDetailsAdmin.md | 2 +- flat_api/__init__.py | 22 +- flat_api/api/account_api.py | 47 +- flat_api/api/class_api.py | 1033 +++++----- flat_api/api/collection_api.py | 507 +++-- flat_api/api/group_api.py | 149 +- flat_api/api/organization_api.py | 512 +++-- flat_api/api/score_api.py | 1687 ++++++++--------- flat_api/api/user_api.py | 153 +- flat_api/api_client.py | 44 +- flat_api/configuration.py | 23 +- flat_api/models/__init__.py | 20 +- flat_api/models/assignment.py | 21 +- flat_api/models/assignment_copy.py | 17 +- flat_api/models/assignment_creation.py | 19 +- flat_api/models/assignment_submission.py | 20 +- .../models/assignment_submission_update.py | 19 +- flat_api/models/class_attachment_creation.py | 17 +- flat_api/models/class_creation.py | 17 +- flat_api/models/class_details.py | 25 +- flat_api/models/class_details_canvas.py | 77 +- flat_api/models/class_details_clever.py | 217 +-- .../models/class_details_google_classroom.py | 109 +- flat_api/models/class_details_google_drive.py | 17 +- flat_api/models/class_details_lti.py | 17 +- flat_api/models/class_roles.py | 17 +- flat_api/models/class_state.py | 17 +- flat_api/models/class_update.py | 17 +- flat_api/models/collection.py | 99 +- flat_api/models/collection_capabilities.py | 135 +- flat_api/models/collection_creation.py | 31 +- flat_api/models/collection_modification.py | 31 +- flat_api/models/collection_privacy.py | 17 +- flat_api/models/collection_type.py | 17 +- flat_api/models/flat_error_response.py | 17 +- flat_api/models/flat_locales.py | 25 +- .../models/google_classroom_coursework.py | 17 +- .../models/google_classroom_submission.py | 17 +- flat_api/models/group.py | 17 +- flat_api/models/group_details.py | 19 +- flat_api/models/group_type.py | 17 +- flat_api/models/license_mode.py | 17 +- flat_api/models/license_sources.py | 17 +- flat_api/models/lms_name.py | 18 +- flat_api/models/lti_credentials.py | 19 +- flat_api/models/lti_credentials_creation.py | 19 +- flat_api/models/media_attachment.py | 19 +- flat_api/models/media_score_sharing_mode.py | 17 +- flat_api/models/organization_invitation.py | 19 +- .../organization_invitation_creation.py | 19 +- flat_api/models/organization_roles.py | 17 +- flat_api/models/resource_collaborator.py | 107 +- .../models/resource_collaborator_creation.py | 17 +- flat_api/models/resource_rights.py | 51 +- flat_api/models/score_comment.py | 19 +- flat_api/models/score_comment_context.py | 56 +- flat_api/models/score_comment_creation.py | 19 +- flat_api/models/score_comment_update.py | 19 +- flat_api/models/score_comments_counts.py | 17 +- flat_api/models/score_creation.py | 64 +- flat_api/models/score_creation_type.py | 17 +- flat_api/models/score_data_encoding.py | 17 +- flat_api/models/score_details.py | 226 +-- flat_api/models/score_fork.py | 17 +- flat_api/models/score_license.py | 17 +- flat_api/models/score_likes_counts.py | 17 +- flat_api/models/score_modification.py | 32 +- flat_api/models/score_privacy.py | 17 +- flat_api/models/score_revision.py | 19 +- flat_api/models/score_revision_creation.py | 28 +- flat_api/models/score_revision_statistics.py | 17 +- flat_api/models/score_source.py | 17 +- flat_api/models/score_summary.py | 20 +- flat_api/models/score_track.py | 21 +- flat_api/models/score_track_creation.py | 20 +- flat_api/models/score_track_point.py | 17 +- flat_api/models/score_track_state.py | 17 +- flat_api/models/score_track_type.py | 17 +- flat_api/models/score_track_update.py | 20 +- flat_api/models/score_views_counts.py | 17 +- flat_api/models/user_admin_update.py | 19 +- flat_api/models/user_basics.py | 19 +- flat_api/models/user_creation.py | 19 +- flat_api/models/user_details.py | 23 +- flat_api/models/user_details_admin.py | 30 +- flat_api/models/user_instruments.py | 17 +- flat_api/models/user_public.py | 22 +- flat_api/models/user_public_summary.py | 21 +- flat_api/rest.py | 8 +- 115 files changed, 3516 insertions(+), 3623 deletions(-) rename .swagger-codegen-ignore => .openapi-generator-ignore (100%) create mode 100644 .openapi-generator/VERSION delete mode 100644 .swagger-codegen/VERSION diff --git a/.swagger-codegen-ignore b/.openapi-generator-ignore similarity index 100% rename from .swagger-codegen-ignore rename to .openapi-generator-ignore diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..6d94c9c --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.3.0-SNAPSHOT \ No newline at end of file diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION deleted file mode 100644 index 855ff95..0000000 --- a/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.4.0-SNAPSHOT \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5e7c29d..e3c7b73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - #- "3.5-dev" # 3.5 development branch + - "3.6" + - "3.7-dev" #- "nightly" # points to the latest development branch e.g. 3.6-dev # command to install dependencies install: "pip install -r requirements.txt" diff --git a/README.md b/README.md index d652da6..6cb9a07 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// ## Requirements. -Python 2.7 to 3.5+ +Python 2.7 and 3.4+ ## Installation & Usage ### pip install @@ -180,7 +180,6 @@ Class | Method | HTTP request | Description - [CollectionCreation](docs/CollectionCreation.md) - [CollectionModification](docs/CollectionModification.md) - [CollectionPrivacy](docs/CollectionPrivacy.md) - - [CollectionTitle](docs/CollectionTitle.md) - [CollectionType](docs/CollectionType.md) - [FlatErrorResponse](docs/FlatErrorResponse.md) - [FlatLocales](docs/FlatLocales.md) @@ -199,9 +198,9 @@ Class | Method | HTTP request | Description - [OrganizationInvitation](docs/OrganizationInvitation.md) - [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md) - [OrganizationRoles](docs/OrganizationRoles.md) + - [ResourceCollaborator](docs/ResourceCollaborator.md) - [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md) - [ResourceRights](docs/ResourceRights.md) - - [ResourceSharingKey](docs/ResourceSharingKey.md) - [ScoreComment](docs/ScoreComment.md) - [ScoreCommentContext](docs/ScoreCommentContext.md) - [ScoreCommentCreation](docs/ScoreCommentCreation.md) @@ -209,8 +208,8 @@ Class | Method | HTTP request | Description - [ScoreCommentsCounts](docs/ScoreCommentsCounts.md) - [ScoreCreation](docs/ScoreCreation.md) - [ScoreCreationType](docs/ScoreCreationType.md) - - [ScoreData](docs/ScoreData.md) - [ScoreDataEncoding](docs/ScoreDataEncoding.md) + - [ScoreDetails](docs/ScoreDetails.md) - [ScoreFork](docs/ScoreFork.md) - [ScoreLicense](docs/ScoreLicense.md) - [ScoreLikesCounts](docs/ScoreLikesCounts.md) @@ -231,14 +230,11 @@ Class | Method | HTTP request | Description - [UserAdminUpdate](docs/UserAdminUpdate.md) - [UserBasics](docs/UserBasics.md) - [UserCreation](docs/UserCreation.md) - - [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md) - - [UserInstruments](docs/UserInstruments.md) - - [ResourceCollaborator](docs/ResourceCollaborator.md) - - [ScoreDetails](docs/ScoreDetails.md) - - [UserPublicSummary](docs/UserPublicSummary.md) + - [UserDetails](docs/UserDetails.md) - [UserDetailsAdmin](docs/UserDetailsAdmin.md) + - [UserInstruments](docs/UserInstruments.md) - [UserPublic](docs/UserPublic.md) - - [UserDetails](docs/UserDetails.md) + - [UserPublicSummary](docs/UserPublicSummary.md) ## Documentation For Authorization @@ -251,6 +247,7 @@ Class | Method | HTTP request | Description - **Authorization URL**: https://flat.io/auth/oauth - **Scopes**: - **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. + - **account.email**: Provices access to the person's email. - **account.education_profile**: Provides access to the basic person's education profile and public organization information. - **scores.readonly**: Allows read-only access to all a user's scores. You won't need this scope to read public scores. - **scores.social**: Allow to post comments and like scores @@ -267,9 +264,3 @@ Class | Method | HTTP request | Description - **edu.admin.lti.readonly**: Read-only access to the LTI Credentials of an organization. - **edu.admin.users**: Access and manage the users and invitations of the organization. - **edu.admin.users.readonly**: Read-only access to the users and invitations of the organization. - - -## Author - -developers@flat.io - diff --git a/docs/AccountApi.md b/docs/AccountApi.md index ddc7c63..5a1c26f 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -15,6 +15,8 @@ Get current user profile Get details about the current authenticated User. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -50,7 +52,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/ClassApi.md b/docs/ClassApi.md index 3b65bf3..27ae749 100644 --- a/docs/ClassApi.md +++ b/docs/ClassApi.md @@ -33,6 +33,8 @@ Activate the class 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -72,7 +74,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -85,6 +87,8 @@ Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -125,7 +129,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -138,6 +142,8 @@ Archive the class Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -177,19 +183,21 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **copy_assignment** -> Assignment copy_assignment(_class, assignment, body) +> Assignment copy_assignment(_class, assignment, assignment_copy) Copy an assignment Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -205,11 +213,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -body = flat_api.AssignmentCopy() # AssignmentCopy | +assignment_copy = flat_api.AssignmentCopy() # AssignmentCopy | try: # Copy an assignment - api_response = api_instance.copy_assignment(_class, assignment, body) + api_response = api_instance.copy_assignment(_class, assignment, assignment_copy) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->copy_assignment: %s\n" % e) @@ -221,7 +229,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentCopy**](AssignmentCopy.md)| | + **assignment_copy** | [**AssignmentCopy**](AssignmentCopy.md)| | ### Return type @@ -239,13 +247,15 @@ Name | Type | Description | Notes [[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) # **create_assignment** -> Assignment create_assignment(_class, body=body) +> Assignment create_assignment(_class, assignment_creation=assignment_creation) Assignment creation Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -260,11 +270,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class -body = flat_api.AssignmentCreation() # AssignmentCreation | (optional) +assignment_creation = flat_api.AssignmentCreation() # AssignmentCreation | (optional) try: # Assignment creation - api_response = api_instance.create_assignment(_class, body=body) + api_response = api_instance.create_assignment(_class, assignment_creation=assignment_creation) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_assignment: %s\n" % e) @@ -275,7 +285,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | - **body** | [**AssignmentCreation**](AssignmentCreation.md)| | [optional] + **assignment_creation** | [**AssignmentCreation**](AssignmentCreation.md)| | [optional] ### Return type @@ -293,13 +303,15 @@ Name | Type | Description | Notes [[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) # **create_class** -> ClassDetails create_class(body) +> ClassDetails create_class(class_creation) Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -313,11 +325,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -body = flat_api.ClassCreation() # ClassCreation | +class_creation = flat_api.ClassCreation() # ClassCreation | try: # Create a new class - api_response = api_instance.create_class(body) + api_response = api_instance.create_class(class_creation) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_class: %s\n" % e) @@ -327,7 +339,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ClassCreation**](ClassCreation.md)| | + **class_creation** | [**ClassCreation**](ClassCreation.md)| | ### Return type @@ -345,13 +357,15 @@ Name | Type | Description | Notes [[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) # **create_submission** -> AssignmentSubmission create_submission(_class, assignment, body) +> AssignmentSubmission create_submission(_class, assignment, assignment_submission_update) Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -367,11 +381,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | +assignment_submission_update = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | try: # Create or edit a submission - api_response = api_instance.create_submission(_class, assignment, body) + api_response = api_instance.create_submission(_class, assignment, assignment_submission_update) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_submission: %s\n" % e) @@ -383,7 +397,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + **assignment_submission_update** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type @@ -408,6 +422,8 @@ Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -448,19 +464,21 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **edit_submission** -> AssignmentSubmission edit_submission(_class, assignment, submission, body) +> AssignmentSubmission edit_submission(_class, assignment, submission, assignment_submission_update) Edit a submission Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -477,11 +495,11 @@ api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | +assignment_submission_update = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | try: # Edit a submission - api_response = api_instance.edit_submission(_class, assignment, submission, body) + api_response = api_instance.edit_submission(_class, assignment, submission, assignment_submission_update) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->edit_submission: %s\n" % e) @@ -494,7 +512,7 @@ Name | Type | Description | Notes **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | **submission** | **str**| Unique identifier of the submission | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + **assignment_submission_update** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type @@ -519,6 +537,8 @@ Join a class Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -558,7 +578,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -569,6 +589,8 @@ Name | Type | Description | Notes Get the details of a single class ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -608,7 +630,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -621,6 +643,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -660,7 +684,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -671,6 +695,8 @@ Name | Type | Description | Notes Get a student submission ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -714,7 +740,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -725,6 +751,8 @@ Name | Type | Description | Notes List the students' submissions ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -766,7 +794,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -777,6 +805,8 @@ Name | Type | Description | Notes Assignments listing ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -816,7 +846,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -829,6 +859,8 @@ List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -870,7 +902,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -881,6 +913,8 @@ Name | Type | Description | Notes List the classes available for the current user ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -894,7 +928,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -state = 'active' # str | Filter the classes by state (optional) (default to active) +state = 'active' # str | Filter the classes by state (optional) (default to 'active') try: # List the classes available for the current user @@ -908,7 +942,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **state** | **str**| Filter the classes by state | [optional] [default to active] + **state** | **str**| Filter the classes by state | [optional] [default to 'active'] ### Return type @@ -920,7 +954,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -933,6 +967,8 @@ Unarchive the class Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -972,19 +1008,21 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **update_class** -> ClassDetails update_class(_class, body=body) +> ClassDetails update_class(_class, class_update=class_update) Update the class Update the meta information of the class ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -999,11 +1037,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class -body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) +class_update = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) try: # Update the class - api_response = api_instance.update_class(_class, body=body) + api_response = api_instance.update_class(_class, class_update=class_update) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->update_class: %s\n" % e) @@ -1014,7 +1052,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | - **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] + **class_update** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] ### Return type diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md index a48143d..553019b 100644 --- a/docs/ClassDetailsCanvas.md +++ b/docs/ClassDetailsCanvas.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on Canvas | [optional] **domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] +**id** | **str** | Unique identifier of the course on Canvas | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md index ff19f16..f7e583d 100644 --- a/docs/ClassDetailsClever.md +++ b/docs/ClassDetailsClever.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Clever section unique identifier | [optional] -**creation_date** | **datetime** | The creation date of the section on clever | [optional] **modification_date** | **datetime** | The last modification date of the section on clever | [optional] +**term_end_date** | **datetime** | End date of the term | [optional] **subject** | **str** | Normalized subject of the course | [optional] -**term_name** | **str** | Name of the term when this course happens | [optional] **term_start_date** | **datetime** | Beginning date of the term | [optional] -**term_end_date** | **datetime** | End date of the term | [optional] +**id** | **str** | Clever section unique identifier | [optional] +**creation_date** | **datetime** | The creation date of the section on clever | [optional] +**term_name** | **str** | Name of the term when this course happens | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md index d0b6482..437a5f3 100644 --- a/docs/ClassDetailsGoogleClassroom.md +++ b/docs/ClassDetailsGoogleClassroom.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The course identifier on Google Classroom | [optional] -**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] **name** | **str** | The name of the course on Google Classroom | [optional] +**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] **section** | **str** | The section of the course on Google Classroom | [optional] +**id** | **str** | The course identifier on Google Classroom | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Collection.md b/docs/Collection.md index 22f1725..fe60f8a 100644 --- a/docs/Collection.md +++ b/docs/Collection.md @@ -4,16 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the collection | [optional] -**title** | [**CollectionTitle**](CollectionTitle.md) | | [optional] +**title** | **str** | The title of the collection | [optional] **html_url** | **str** | The url where the collection can be viewed in a web browser | [optional] **type** | [**CollectionType**](CollectionType.md) | | [optional] **privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] **sharing_key** | **str** | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] **app** | **str** | If this directory is dedicated to an app, the unique idenfier of this app | [optional] +**creation_date** | **datetime** | The date when the collection was created | [optional] **user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] **collaborators** | [**list[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] **capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | [optional] +**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md index 094c90b..05df24c 100644 --- a/docs/CollectionApi.md +++ b/docs/CollectionApi.md @@ -23,6 +23,8 @@ Add a score to the collection This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -66,19 +68,21 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **create_collection** -> Collection create_collection(body) +> Collection create_collection(collection_creation) Create a new collection This method will create a new collection and add it to your `root` collection. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -92,11 +96,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -body = flat_api.CollectionCreation() # CollectionCreation | +collection_creation = flat_api.CollectionCreation() # CollectionCreation | try: # Create a new collection - api_response = api_instance.create_collection(body) + api_response = api_instance.create_collection(collection_creation) pprint(api_response) except ApiException as e: print("Exception when calling CollectionApi->create_collection: %s\n" % e) @@ -106,7 +110,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**CollectionCreation**](CollectionCreation.md)| | + **collection_creation** | [**CollectionCreation**](CollectionCreation.md)| | ### Return type @@ -131,6 +135,8 @@ Delete the collection This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -169,7 +175,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -182,6 +188,8 @@ Delete a score from the collection This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -222,17 +230,19 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **edit_collection** -> Collection edit_collection(collection, body=body) +> Collection edit_collection(collection, collection_modification=collection_modification) Update a collection's metadata ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -247,11 +257,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -body = flat_api.CollectionModification() # CollectionModification | (optional) +collection_modification = flat_api.CollectionModification() # CollectionModification | (optional) try: # Update a collection's metadata - api_response = api_instance.edit_collection(collection, body=body) + api_response = api_instance.edit_collection(collection, collection_modification=collection_modification) pprint(api_response) except ApiException as e: print("Exception when calling CollectionApi->edit_collection: %s\n" % e) @@ -262,7 +272,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **body** | [**CollectionModification**](CollectionModification.md)| | [optional] + **collection_modification** | [**CollectionModification**](CollectionModification.md)| | [optional] ### Return type @@ -285,6 +295,8 @@ Name | Type | Description | Notes Get collection details ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -326,7 +338,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -339,6 +351,8 @@ List the scores contained in a collection Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -390,7 +404,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -403,6 +417,8 @@ List the collections Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -416,7 +432,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to root) +parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) @@ -435,7 +451,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] [default to root] + **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] [default to 'root'] **sort** | **str**| Sort | [optional] **direction** | **str**| Sort direction | [optional] **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] @@ -452,7 +468,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -465,6 +481,8 @@ Untrash a collection This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -503,7 +521,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md index 17826ca..017dbc2 100644 --- a/docs/CollectionCapabilities.md +++ b/docs/CollectionCapabilities.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] +**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] **can_edit** | **bool** | Whether the current user can modify the metadata for the collection | [optional] **can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | [optional] **can_delete** | **bool** | Whether the current user can delete the collection | [optional] -**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] -**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionCreation.md b/docs/CollectionCreation.md index 105f60d..16dffdb 100644 --- a/docs/CollectionCreation.md +++ b/docs/CollectionCreation.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**CollectionTitle**](CollectionTitle.md) | | +**title** | **str** | The title of the collection | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md index db90e40..f3e8cba 100644 --- a/docs/CollectionModification.md +++ b/docs/CollectionModification.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**CollectionTitle**](CollectionTitle.md) | | [optional] +**title** | **str** | The title of the collection | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupApi.md b/docs/GroupApi.md index df7ec7c..d08b5a1 100644 --- a/docs/GroupApi.md +++ b/docs/GroupApi.md @@ -15,6 +15,8 @@ Method | HTTP request | Description Get group information ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -54,7 +56,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -67,6 +69,8 @@ List group's scores Get the list of scores shared with a group. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -108,7 +112,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -119,6 +123,8 @@ Name | Type | Description | Notes List group's users ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -158,7 +164,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 4b2d4c0..8e5e729 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -17,13 +17,15 @@ Method | HTTP request | Description # **create_lti_credentials** -> LtiCredentials create_lti_credentials(body) +> LtiCredentials create_lti_credentials(lti_credentials_creation) Create a new couple of LTI 1.x credentials Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -37,11 +39,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | +lti_credentials_creation = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | try: # Create a new couple of LTI 1.x credentials - api_response = api_instance.create_lti_credentials(body) + api_response = api_instance.create_lti_credentials(lti_credentials_creation) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) @@ -51,7 +53,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | + **lti_credentials_creation** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | ### Return type @@ -69,13 +71,15 @@ Name | Type | Description | Notes [[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) # **create_organization_invitation** -> OrganizationInvitation create_organization_invitation(body=body) +> OrganizationInvitation create_organization_invitation(organization_invitation_creation=organization_invitation_creation) Create a new invitation to join the organization This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -89,11 +93,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) +organization_invitation_creation = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) try: # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation(body=body) + api_response = api_instance.create_organization_invitation(organization_invitation_creation=organization_invitation_creation) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) @@ -103,7 +107,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] + **organization_invitation_creation** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] ### Return type @@ -121,11 +125,13 @@ Name | Type | Description | Notes [[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) # **create_organization_user** -> UserDetailsAdmin create_organization_user(body=body) +> UserDetailsAdmin create_organization_user(user_creation=user_creation) Create a new user account ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -139,11 +145,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.UserCreation() # UserCreation | (optional) +user_creation = flat_api.UserCreation() # UserCreation | (optional) try: # Create a new user account - api_response = api_instance.create_organization_user(body=body) + api_response = api_instance.create_organization_user(user_creation=user_creation) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) @@ -153,7 +159,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**UserCreation**](UserCreation.md)| | [optional] + **user_creation** | [**UserCreation**](UserCreation.md)| | [optional] ### Return type @@ -176,6 +182,8 @@ Name | Type | Description | Notes List LTI 1.x credentials ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -211,7 +219,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -222,6 +230,8 @@ This endpoint does not need any parameter. List the organization invitations ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -267,7 +277,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -278,6 +288,8 @@ Name | Type | Description | Notes List the organization users ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -323,7 +335,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -334,6 +346,8 @@ Name | Type | Description | Notes Remove an organization invitation ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -372,7 +386,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -385,6 +399,8 @@ Remove an account from Flat This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -399,7 +415,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) user = 'user_example' # str | Unique identifier of the Flat account -convert_to_individual = true # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) +convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) try: # Remove an account from Flat @@ -425,7 +441,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -436,6 +452,8 @@ void (empty response body) Revoke LTI 1.x credentials ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -474,17 +492,19 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **update_organization_user** -> UserDetailsAdmin update_organization_user(user, body) +> UserDetailsAdmin update_organization_user(user, user_admin_update) Update account information ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -499,11 +519,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) user = 'user_example' # str | Unique identifier of the Flat account -body = flat_api.UserAdminUpdate() # UserAdminUpdate | +user_admin_update = flat_api.UserAdminUpdate() # UserAdminUpdate | try: # Update account information - api_response = api_instance.update_organization_user(user, body) + api_response = api_instance.update_organization_user(user, user_admin_update) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) @@ -514,7 +534,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user** | **str**| Unique identifier of the Flat account | - **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | + **user_admin_update** | [**UserAdminUpdate**](UserAdminUpdate.md)| | ### Return type diff --git a/docs/ResourceCollaborator.md b/docs/ResourceCollaborator.md index fea4153..ab94743 100644 --- a/docs/ResourceCollaborator.md +++ b/docs/ResourceCollaborator.md @@ -3,9 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acl_read** | **bool** | `True` if the current user can read the current document | [optional] [default to False] -**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] **id** | **str** | The unique identifier of the permission | [optional] **score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] **collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] diff --git a/docs/ResourceRights.md b/docs/ResourceRights.md index c92c747..7ce4ce9 100644 --- a/docs/ResourceRights.md +++ b/docs/ResourceRights.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **acl_read** | **bool** | `True` if the current user can read the current document | [optional] [default to False] **acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] **acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index 7ccf0fb..6511df4 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -36,13 +36,15 @@ Method | HTTP request | Description # **add_score_collaborator** -> ResourceCollaborator add_score_collaborator(score, body) +> ResourceCollaborator add_score_collaborator(score, resource_collaborator_creation) 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -57,11 +59,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | +resource_collaborator_creation = flat_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | try: # Add a new collaborator - api_response = api_instance.add_score_collaborator(score, body) + api_response = api_instance.add_score_collaborator(score, resource_collaborator_creation) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) @@ -72,7 +74,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | + **resource_collaborator_creation** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | ### Return type @@ -90,13 +92,15 @@ Name | Type | Description | Notes [[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) # **add_score_track** -> ScoreTrack add_score_track(score, body) +> ScoreTrack add_score_track(score, score_track_creation) 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -111,11 +115,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ScoreTrackCreation() # ScoreTrackCreation | +score_track_creation = flat_api.ScoreTrackCreation() # ScoreTrackCreation | try: # Add a new video or audio track to the score - api_response = api_instance.add_score_track(score, body) + api_response = api_instance.add_score_track(score, score_track_creation) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->add_score_track: %s\n" % e) @@ -126,7 +130,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | + **score_track_creation** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | ### Return type @@ -144,13 +148,15 @@ Name | Type | Description | Notes [[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) # **create_score** -> ScoreDetails create_score(body) +> ScoreDetails create_score(score_creation) 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}`. +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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -164,11 +170,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -body = flat_api.ScoreCreation() # ScoreCreation | +score_creation = flat_api.ScoreCreation() # ScoreCreation | try: # Create a new score - api_response = api_instance.create_score(body) + api_response = api_instance.create_score(score_creation) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->create_score: %s\n" % e) @@ -178,7 +184,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ScoreCreation**](ScoreCreation.md)| | + **score_creation** | [**ScoreCreation**](ScoreCreation.md)| | ### Return type @@ -196,13 +202,15 @@ Name | Type | Description | Notes [[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) # **create_score_revision** -> ScoreRevision create_score_revision(score, body) +> ScoreRevision create_score_revision(score, score_revision_creation) Create a new revision Update a score by uploading a new revision for this one. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -217,11 +225,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ScoreRevisionCreation() # ScoreRevisionCreation | +score_revision_creation = flat_api.ScoreRevisionCreation() # ScoreRevisionCreation | try: # Create a new revision - api_response = api_instance.create_score_revision(score, body) + api_response = api_instance.create_score_revision(score, score_revision_creation) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) @@ -232,7 +240,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | + **score_revision_creation** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | ### Return type @@ -257,6 +265,8 @@ 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). ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -295,7 +305,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -306,6 +316,8 @@ void (empty response body) Delete a comment ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -348,7 +360,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -359,6 +371,8 @@ void (empty response body) Remove an audio or video track linked to the score ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -399,19 +413,21 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **edit_score** -> ScoreDetails edit_score(score, body=body) +> ScoreDetails edit_score(score, score_modification=score_modification) 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -426,11 +442,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ScoreModification() # ScoreModification | (optional) +score_modification = flat_api.ScoreModification() # ScoreModification | (optional) try: # Edit a score's metadata - api_response = api_instance.edit_score(score, body=body) + api_response = api_instance.edit_score(score, score_modification=score_modification) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->edit_score: %s\n" % e) @@ -441,7 +457,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ScoreModification**](ScoreModification.md)| | [optional] + **score_modification** | [**ScoreModification**](ScoreModification.md)| | [optional] ### Return type @@ -459,13 +475,15 @@ Name | Type | Description | Notes [[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) # **fork_score** -> ScoreDetails fork_score(score, body, sharing_key=sharing_key) +> ScoreDetails fork_score(score, score_fork, sharing_key=sharing_key) 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -480,12 +498,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | +score_fork = flat_api.ScoreFork() # ScoreFork | sharing_key = 'sharing_key_example' # str | 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) try: # Fork a score - api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + api_response = api_instance.fork_score(score, score_fork, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->fork_score: %s\n" % e) @@ -496,7 +514,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | + **score_fork** | [**ScoreFork**](ScoreFork.md)| | **sharing_key** | **str**| 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] ### Return type @@ -520,6 +538,8 @@ Name | Type | Description | Notes List liked scores ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -534,7 +554,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) user = 'user_example' # str | 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 (optional) +ids = True # bool | Return only the identifiers of the scores (optional) try: # List liked scores @@ -561,7 +581,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -574,6 +594,8 @@ List group's scores Get the list of scores shared with a group. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -615,7 +637,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -628,6 +650,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -669,7 +693,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -682,6 +706,8 @@ Get a collaborator Get the information about a collaborator (User or Group). ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -725,7 +751,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -738,6 +764,8 @@ 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). ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -779,7 +807,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -792,6 +820,8 @@ List comments This method lists the different comments added on a music score (documents and inline) sorted by their post dates. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -839,7 +869,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -852,6 +882,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -895,19 +927,21 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **get_score_revision_data** -> str get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, only_cached=only_cached) +> file get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, only_cached=only_cached) 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`). ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -926,7 +960,7 @@ revision = 'revision_example' # str | Unique identifier of a score revision. You format = 'format_example' # str | The format of the file you will retrieve sharing_key = 'sharing_key_example' # str | 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 = 'parts_example' # str | 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) -only_cached = 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 (optional) +only_cached = 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 (optional) try: # Get a score revision data @@ -949,7 +983,7 @@ Name | Type | Description | Notes ### Return type -**str** +**file** ### Authorization @@ -957,7 +991,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -970,6 +1004,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1011,7 +1047,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1024,6 +1060,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1063,7 +1101,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1074,6 +1112,8 @@ Name | Type | Description | Notes Retrieve the details of an audio or video track linked to a score ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1117,7 +1157,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1130,6 +1170,8 @@ List user's scores Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1171,7 +1213,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1182,6 +1224,8 @@ Name | Type | Description | Notes List the audio or video tracks linked to a score ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1223,7 +1267,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1234,6 +1278,8 @@ Name | Type | Description | Notes Mark the comment as resolved ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1276,7 +1322,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1287,6 +1333,8 @@ void (empty response body) Mark the comment as unresolved ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1329,19 +1377,21 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **post_score_comment** -> ScoreComment post_score_comment(score, body, sharing_key=sharing_key) +> ScoreComment post_score_comment(score, score_comment_creation, sharing_key=sharing_key) 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`. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1356,12 +1406,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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_api.ScoreCommentCreation() # ScoreCommentCreation | +score_comment_creation = flat_api.ScoreCommentCreation() # ScoreCommentCreation | sharing_key = 'sharing_key_example' # str | 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) try: # Post a new comment - api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) + api_response = api_instance.post_score_comment(score, score_comment_creation, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) @@ -1372,7 +1422,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | + **score_comment_creation** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | **sharing_key** | **str**| 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] ### Return type @@ -1398,6 +1448,8 @@ Delete a collaborator Remove the specified collaborator from the score ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1438,7 +1490,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -1485,17 +1537,19 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) # **update_score_comment** -> ScoreComment update_score_comment(score, comment, body, sharing_key=sharing_key) +> ScoreComment update_score_comment(score, comment, score_comment_update, sharing_key=sharing_key) Update an existing comment ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1511,12 +1565,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -body = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | +score_comment_update = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | sharing_key = 'sharing_key_example' # str | 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) try: # Update an existing comment - api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) + api_response = api_instance.update_score_comment(score, comment, score_comment_update, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) @@ -1528,7 +1582,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | + **score_comment_update** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | **sharing_key** | **str**| 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] ### Return type @@ -1547,11 +1601,13 @@ Name | Type | Description | Notes [[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) # **update_score_track** -> ScoreTrack update_score_track(score, track, body) +> ScoreTrack update_score_track(score, track, score_track_update) Update an audio or video track linked to a score ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1567,11 +1623,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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' # str | Unique identifier of a score audio track -body = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | +score_track_update = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | try: # Update an audio or video track linked to a score - api_response = api_instance.update_score_track(score, track, body) + api_response = api_instance.update_score_track(score, track, score_track_update) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->update_score_track: %s\n" % e) @@ -1583,7 +1639,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | + **score_track_update** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | ### Return type diff --git a/docs/ScoreCommentContext.md b/docs/ScoreCommentContext.md index 851994d..e0f75ec 100644 --- a/docs/ScoreCommentContext.md +++ b/docs/ScoreCommentContext.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **part_uuid** | **str** | The unique identifier (UUID) of the score part | -**staff_idx** | **float** | The identififer of the staff | +**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] +**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] **measure_uuids** | **list[str]** | The list of measure UUIds | **start_time_pos** | **float** | | **stop_time_pos** | **float** | | diff --git a/docs/ScoreCreation.md b/docs/ScoreCreation.md index 91616db..d17c3be 100644 --- a/docs/ScoreCreation.md +++ b/docs/ScoreCreation.md @@ -3,9 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the name of the file for files from a specified `source` (e.g. Google Drive) - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Set a default title (e.g. \"New Music Score\") | [optional] +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**filename** | **str** | If this is an imported file, its filename | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | -**data** | [**ScoreData**](ScoreData.md) | | [optional] +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] **data_encoding** | [**ScoreDataEncoding**](ScoreDataEncoding.md) | | [optional] **source** | [**ScoreSource**](ScoreSource.md) | | [optional] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] diff --git a/docs/ScoreDetails.md b/docs/ScoreDetails.md index 8e4f00d..0843d37 100644 --- a/docs/ScoreDetails.md +++ b/docs/ScoreDetails.md @@ -3,12 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score | [optional] -**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] -**title** | **str** | The title of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] **subtitle** | **str** | Subtitle of the score | [optional] **lyricist** | **str** | Lyricist of the score | [optional] **composer** | **str** | Composer of the score | [optional] @@ -32,6 +26,7 @@ Name | Type | Description | Notes **likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] **comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] **views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] +**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md index 6860f41..541a40a 100644 --- a/docs/ScoreModification.md +++ b/docs/ScoreModification.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the score | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**sharing_key** | [**ResourceSharingKey**](ResourceSharingKey.md) | | [optional] +**sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] **description** | **str** | Description of the creation | [optional] **tags** | **list[str]** | Tags describing the score | [optional] **creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md index d64e22f..7a3f069 100644 --- a/docs/ScoreRevisionCreation.md +++ b/docs/ScoreRevisionCreation.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**ScoreData**](ScoreData.md) | | +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | **data_encoding** | [**ScoreDataEncoding**](ScoreDataEncoding.md) | | [optional] **autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] **description** | **str** | A description associated to the revision | [optional] diff --git a/docs/UserApi.md b/docs/UserApi.md index aeb90dd..50d57e9 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -15,6 +15,8 @@ Method | HTTP request | Description List liked scores ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -29,7 +31,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.UserApi(flat_api.ApiClient(configuration)) user = 'user_example' # str | 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 (optional) +ids = True # bool | Return only the identifiers of the scores (optional) try: # List liked scores @@ -56,7 +58,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -69,6 +71,8 @@ Get a public user profile Get a public profile of a Flat User. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -108,7 +112,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) @@ -121,6 +125,8 @@ List user's scores Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -162,7 +168,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) diff --git a/docs/UserDetailsAdmin.md b/docs/UserDetailsAdmin.md index 89837aa..8da9871 100644 --- a/docs/UserDetailsAdmin.md +++ b/docs/UserDetailsAdmin.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | Email of the user | [optional] **last_activity_date** | **datetime** | Date of the last user activity | [optional] -**license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] +**license** | **object** | Current active license of the user | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index b572265..ac7ac91 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -5,16 +5,18 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +__version__ = "0.6.0" + # import apis into sdk package from flat_api.api.account_api import AccountApi from flat_api.api.class_api import ClassApi @@ -49,7 +51,6 @@ from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification from flat_api.models.collection_privacy import CollectionPrivacy -from flat_api.models.collection_title import CollectionTitle from flat_api.models.collection_type import CollectionType from flat_api.models.flat_error_response import FlatErrorResponse from flat_api.models.flat_locales import FlatLocales @@ -68,9 +69,9 @@ from flat_api.models.organization_invitation import OrganizationInvitation from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation from flat_api.models.resource_rights import ResourceRights -from flat_api.models.resource_sharing_key import ResourceSharingKey from flat_api.models.score_comment import ScoreComment from flat_api.models.score_comment_context import ScoreCommentContext from flat_api.models.score_comment_creation import ScoreCommentCreation @@ -78,8 +79,8 @@ from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation import ScoreCreation from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_data import ScoreData from flat_api.models.score_data_encoding import ScoreDataEncoding +from flat_api.models.score_details import ScoreDetails from flat_api.models.score_fork import ScoreFork from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts @@ -100,11 +101,8 @@ from flat_api.models.user_admin_update import UserAdminUpdate from flat_api.models.user_basics import UserBasics from flat_api.models.user_creation import UserCreation -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense -from flat_api.models.user_instruments import UserInstruments -from flat_api.models.resource_collaborator import ResourceCollaborator -from flat_api.models.score_details import ScoreDetails -from flat_api.models.user_public_summary import UserPublicSummary +from flat_api.models.user_details import UserDetails from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.models.user_instruments import UserInstruments from flat_api.models.user_public import UserPublic -from flat_api.models.user_details import UserDetails +from flat_api.models.user_public_summary import UserPublicSummary diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index 8d72654..13b71d6 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class AccountApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -38,17 +38,17 @@ def get_authenticated_user(self, **kwargs): # noqa: E501 Get details about the current authenticated User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_authenticated_user(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_authenticated_user(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: UserDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 @@ -59,31 +59,32 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 Get details about the current authenticated User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_authenticated_user_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_authenticated_user_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: UserDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_authenticated_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -101,10 +102,6 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -118,8 +115,8 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='UserDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index b91d1f2..ee7b740 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class ClassApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -38,18 +38,18 @@ def activate_class(self, _class, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.activate_class(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate_class(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 @@ -60,42 +60,43 @@ def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.activate_class_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['_class'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method activate_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `activate_class`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -109,10 +110,6 @@ def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -126,10 +123,10 @@ def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def add_class_user(self, _class, user, **kwargs): # noqa: E501 @@ -137,11 +134,11 @@ def add_class_user(self, _class, user, **kwargs): # noqa: E501 This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_class_user(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_class_user(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: None @@ -149,7 +146,7 @@ def add_class_user(self, _class, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 else: (data) = self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 @@ -160,11 +157,11 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_class_user_with_http_info(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_class_user_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: None @@ -172,37 +169,38 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_class_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `add_class_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `add_class_user`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -216,10 +214,6 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -233,10 +227,10 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def archive_class(self, _class, **kwargs): # noqa: E501 @@ -244,18 +238,18 @@ def archive_class(self, _class, **kwargs): # noqa: E501 Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.archive_class(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_class(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 @@ -266,42 +260,43 @@ def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.archive_class_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['_class'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method archive_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `archive_class`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -315,10 +310,6 @@ def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -332,89 +323,90 @@ def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def copy_assignment(self, _class, assignment, body, **kwargs): # noqa: E501 + def copy_assignment(self, _class, assignment, assignment_copy, **kwargs): # noqa: E501 """Copy an assignment # noqa: E501 Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.copy_assignment(_class, assignment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.copy_assignment(_class, assignment, assignment_copy, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy body: (required) + :param AssignmentCopy assignment_copy: (required) :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.copy_assignment_with_http_info(_class, assignment, assignment_copy, **kwargs) # noqa: E501 else: - (data) = self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 + (data) = self.copy_assignment_with_http_info(_class, assignment, assignment_copy, **kwargs) # noqa: E501 return data - def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 + def copy_assignment_with_http_info(self, _class, assignment, assignment_copy, **kwargs): # noqa: E501 """Copy an assignment # noqa: E501 Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.copy_assignment_with_http_info(_class, assignment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.copy_assignment_with_http_info(_class, assignment, assignment_copy, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy body: (required) + :param AssignmentCopy assignment_copy: (required) :return: Assignment If the method is called asynchronously, returns the request thread. """ - all_params = ['_class', 'assignment', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['_class', 'assignment', 'assignment_copy'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method copy_assignment" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `copy_assignment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in params or - params['assignment'] is None): + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `copy_assignment`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `copy_assignment`") # noqa: E501 + # verify the required parameter 'assignment_copy' is set + if ('assignment_copy' not in local_var_params or + local_var_params['assignment_copy'] is None): + raise ValueError("Missing the required parameter `assignment_copy` when calling `copy_assignment`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'assignment' in params: - path_params['assignment'] = params['assignment'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 query_params = [] @@ -424,8 +416,8 @@ def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'assignment_copy' in local_var_params: + body_params = local_var_params['assignment_copy'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -447,10 +439,10 @@ def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # files=local_var_files, response_type='Assignment', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_assignment(self, _class, **kwargs): # noqa: E501 @@ -458,19 +450,19 @@ def create_assignment(self, _class, **kwargs): # noqa: E501 Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_assignment(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_assignment(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) - :param AssignmentCreation body: + :param AssignmentCreation assignment_creation: :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 @@ -481,43 +473,44 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_assignment_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_assignment_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) - :param AssignmentCreation body: + :param AssignmentCreation assignment_creation: :return: Assignment If the method is called asynchronously, returns the request thread. """ - all_params = ['_class', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['_class', 'assignment_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_assignment" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `create_assignment`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -527,8 +520,8 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'assignment_creation' in local_var_params: + body_params = local_var_params['assignment_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -550,69 +543,70 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='Assignment', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_class(self, body, **kwargs): # noqa: E501 + def create_class(self, class_creation, **kwargs): # noqa: E501 """Create a new class # noqa: E501 Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_class(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_class(class_creation, async_req=True) >>> result = thread.get() - :param async bool - :param ClassCreation body: (required) + :param async_req bool + :param ClassCreation class_creation: (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_class_with_http_info(body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_class_with_http_info(class_creation, **kwargs) # noqa: E501 else: - (data) = self.create_class_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_class_with_http_info(class_creation, **kwargs) # noqa: E501 return data - def create_class_with_http_info(self, body, **kwargs): # noqa: E501 + def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 """Create a new class # noqa: E501 Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_class_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_class_with_http_info(class_creation, async_req=True) >>> result = thread.get() - :param async bool - :param ClassCreation body: (required) + :param async_req bool + :param ClassCreation class_creation: (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['class_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_class" % key ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_class`") # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'class_creation' is set + if ('class_creation' not in local_var_params or + local_var_params['class_creation'] is None): + raise ValueError("Missing the required parameter `class_creation` when calling `create_class`") # noqa: E501 collection_formats = {} @@ -626,8 +620,8 @@ def create_class_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'class_creation' in local_var_params: + body_params = local_var_params['class_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -649,89 +643,90 @@ def create_class_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_submission(self, _class, assignment, body, **kwargs): # noqa: E501 + def create_submission(self, _class, assignment, assignment_submission_update, **kwargs): # noqa: E501 """Create or edit a submission # noqa: E501 Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_submission(_class, assignment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_submission(_class, assignment, assignment_submission_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate body: (required) + :param AssignmentSubmissionUpdate assignment_submission_update: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_submission_with_http_info(_class, assignment, assignment_submission_update, **kwargs) # noqa: E501 else: - (data) = self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 + (data) = self.create_submission_with_http_info(_class, assignment, assignment_submission_update, **kwargs) # noqa: E501 return data - def create_submission_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 + def create_submission_with_http_info(self, _class, assignment, assignment_submission_update, **kwargs): # noqa: E501 """Create or edit a submission # noqa: E501 Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_submission_with_http_info(_class, assignment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_submission_with_http_info(_class, assignment, assignment_submission_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate body: (required) + :param AssignmentSubmissionUpdate assignment_submission_update: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ - all_params = ['_class', 'assignment', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['_class', 'assignment', 'assignment_submission_update'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_submission" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `create_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in params or - params['assignment'] is None): + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `create_submission`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_submission`") # noqa: E501 + # verify the required parameter 'assignment_submission_update' is set + if ('assignment_submission_update' not in local_var_params or + local_var_params['assignment_submission_update'] is None): + raise ValueError("Missing the required parameter `assignment_submission_update` when calling `create_submission`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'assignment' in params: - path_params['assignment'] = params['assignment'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 query_params = [] @@ -741,8 +736,8 @@ def create_submission_with_http_info(self, _class, assignment, body, **kwargs): local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'assignment_submission_update' in local_var_params: + body_params = local_var_params['assignment_submission_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -764,10 +759,10 @@ def create_submission_with_http_info(self, _class, assignment, body, **kwargs): files=local_var_files, response_type='AssignmentSubmission', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_class_user(self, _class, user, **kwargs): # noqa: E501 @@ -775,11 +770,11 @@ def delete_class_user(self, _class, user, **kwargs): # noqa: E501 This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_class_user(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_class_user(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: None @@ -787,7 +782,7 @@ def delete_class_user(self, _class, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 else: (data) = self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 @@ -798,11 +793,11 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_class_user_with_http_info(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_class_user_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: None @@ -810,37 +805,38 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 returns the request thread. """ + local_var_params = locals() + all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_class_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `delete_class_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `delete_class_user`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -854,10 +850,6 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -871,97 +863,98 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def edit_submission(self, _class, assignment, submission, body, **kwargs): # noqa: E501 + def edit_submission(self, _class, assignment, submission, assignment_submission_update, **kwargs): # noqa: E501 """Edit a submission # noqa: E501 Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_submission(_class, assignment, submission, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_submission(_class, assignment, submission, assignment_submission_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate body: (required) + :param AssignmentSubmissionUpdate assignment_submission_update: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, **kwargs) # noqa: E501 else: - (data) = self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 + (data) = self.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, **kwargs) # noqa: E501 return data - def edit_submission_with_http_info(self, _class, assignment, submission, body, **kwargs): # noqa: E501 + def edit_submission_with_http_info(self, _class, assignment, submission, assignment_submission_update, **kwargs): # noqa: E501 """Edit a submission # noqa: E501 Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate body: (required) + :param AssignmentSubmissionUpdate assignment_submission_update: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ - all_params = ['_class', 'assignment', 'submission', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['_class', 'assignment', 'submission', 'assignment_submission_update'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_submission" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in params or - params['assignment'] is None): + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in params or - params['submission'] is None): + if ('submission' not in local_var_params or + local_var_params['submission'] is None): raise ValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `edit_submission`") # noqa: E501 + # verify the required parameter 'assignment_submission_update' is set + if ('assignment_submission_update' not in local_var_params or + local_var_params['assignment_submission_update'] is None): + raise ValueError("Missing the required parameter `assignment_submission_update` when calling `edit_submission`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'assignment' in params: - path_params['assignment'] = params['assignment'] # noqa: E501 - if 'submission' in params: - path_params['submission'] = params['submission'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -971,8 +964,8 @@ def edit_submission_with_http_info(self, _class, assignment, submission, body, * local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'assignment_submission_update' in local_var_params: + body_params = local_var_params['assignment_submission_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -994,10 +987,10 @@ def edit_submission_with_http_info(self, _class, assignment, submission, body, * files=local_var_files, response_type='AssignmentSubmission', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 @@ -1005,18 +998,18 @@ def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.enroll_class(enrollment_code, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.enroll_class(enrollment_code, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 else: (data) = self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 @@ -1027,42 +1020,43 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.enroll_class_with_http_info(enrollment_code, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.enroll_class_with_http_info(enrollment_code, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['enrollment_code'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method enroll_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'enrollment_code' is set - if ('enrollment_code' not in params or - params['enrollment_code'] is None): + if ('enrollment_code' not in local_var_params or + local_var_params['enrollment_code'] is None): raise ValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 collection_formats = {} path_params = {} - if 'enrollment_code' in params: - path_params['enrollmentCode'] = params['enrollment_code'] # noqa: E501 + if 'enrollment_code' in local_var_params: + path_params['enrollmentCode'] = local_var_params['enrollment_code'] # noqa: E501 query_params = [] @@ -1076,10 +1070,6 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1093,28 +1083,28 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_class(self, _class, **kwargs): # noqa: E501 """Get the details of a single class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_class(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_class(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.get_class_with_http_info(_class, **kwargs) # noqa: E501 @@ -1124,42 +1114,43 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Get the details of a single class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_class_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['_class'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -1173,10 +1164,6 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1190,10 +1177,10 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_submissions(self, score, **kwargs): # noqa: E501 @@ -1201,18 +1188,18 @@ def get_score_submissions(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_submissions(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_submissions(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 @@ -1223,42 +1210,43 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_submissions_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['score'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_submissions" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -1272,10 +1260,6 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1289,21 +1273,21 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[AssignmentSubmission]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 """Get a student submission # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_submission(_class, assignment, submission, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submission(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) @@ -1312,7 +1296,7 @@ def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E50 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 else: (data) = self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 @@ -1322,11 +1306,11 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs """Get a student submission # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) @@ -1335,43 +1319,44 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs returns the request thread. """ + local_var_params = locals() + all_params = ['_class', 'assignment', 'submission'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_submission" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in params or - params['assignment'] is None): + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in params or - params['submission'] is None): + if ('submission' not in local_var_params or + local_var_params['submission'] is None): raise ValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'assignment' in params: - path_params['assignment'] = params['assignment'] # noqa: E501 - if 'submission' in params: - path_params['submission'] = params['submission'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -1385,10 +1370,6 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1402,21 +1383,21 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs files=local_var_files, response_type='AssignmentSubmission', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 """List the students' submissions # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_submissions(_class, assignment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submissions(_class, assignment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :return: list[AssignmentSubmission] @@ -1424,7 +1405,7 @@ def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 else: (data) = self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 @@ -1434,11 +1415,11 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: """List the students' submissions # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_submissions_with_http_info(_class, assignment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submissions_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :return: list[AssignmentSubmission] @@ -1446,37 +1427,38 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_submissions" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in params or - params['assignment'] is None): + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'assignment' in params: - path_params['assignment'] = params['assignment'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 query_params = [] @@ -1490,10 +1472,6 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1507,28 +1485,28 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: files=local_var_files, response_type='list[AssignmentSubmission]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_assignments(self, _class, **kwargs): # noqa: E501 """Assignments listing # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_assignments(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assignments(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: list[Assignment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 @@ -1538,42 +1516,43 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 """Assignments listing # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_assignments_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assignments_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: list[Assignment] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['_class'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_assignments" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -1587,10 +1566,6 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1604,10 +1579,10 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Assignment]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 @@ -1615,11 +1590,11 @@ def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_class_student_submissions(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_class_student_submissions(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: list[AssignmentSubmission] @@ -1627,7 +1602,7 @@ def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 else: (data) = self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 @@ -1638,11 +1613,11 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) :return: list[AssignmentSubmission] @@ -1650,37 +1625,38 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_class_student_submissions" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -1694,10 +1670,6 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1711,28 +1683,28 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): files=local_var_files, response_type='list[AssignmentSubmission]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_classes(self, **kwargs): # noqa: E501 """List the classes available for the current user # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_classes(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_classes(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str state: Filter the classes by state :return: list[ClassDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_classes_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_classes_with_http_info(**kwargs) # noqa: E501 @@ -1742,40 +1714,41 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 """List the classes available for the current user # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_classes_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_classes_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str state: Filter the classes by state :return: list[ClassDetails] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['state'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_classes" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'state' in params: - query_params.append(('state', params['state'])) # noqa: E501 + if 'state' in local_var_params: + query_params.append(('state', local_var_params['state'])) # noqa: E501 header_params = {} @@ -1787,10 +1760,6 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1804,10 +1773,10 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ClassDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def unarchive_class(self, _class, **kwargs): # noqa: E501 @@ -1815,18 +1784,18 @@ def unarchive_class(self, _class, **kwargs): # noqa: E501 Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.unarchive_class(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_class(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 @@ -1837,42 +1806,43 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.unarchive_class_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['_class'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method unarchive_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -1886,10 +1856,6 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1903,10 +1869,10 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def update_class(self, _class, **kwargs): # noqa: E501 @@ -1914,19 +1880,19 @@ def update_class(self, _class, **kwargs): # noqa: E501 Update the meta information of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_class(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_class(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) - :param ClassUpdate body: Details of the Class + :param ClassUpdate class_update: Details of the Class :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 else: (data) = self.update_class_with_http_info(_class, **kwargs) # noqa: E501 @@ -1937,43 +1903,44 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 Update the meta information of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_class_with_http_info(_class, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str _class: Unique identifier of the class (required) - :param ClassUpdate body: Details of the Class + :param ClassUpdate class_update: Details of the Class :return: ClassDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['_class', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['_class', 'class_update'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_class" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in params or - params['_class'] is None): + if ('_class' not in local_var_params or + local_var_params['_class'] is None): raise ValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in params: - path_params['class'] = params['_class'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 query_params = [] @@ -1983,8 +1950,8 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'class_update' in local_var_params: + body_params = local_var_params['class_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -2006,8 +1973,8 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 files=local_var_files, response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index 17aa8ee..50778e9 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class CollectionApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -38,11 +38,11 @@ def add_score_to_collection(self, collection, score, **kwargs): # noqa: E501 This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_to_collection(collection, score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_to_collection(collection, score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. @@ -51,7 +51,7 @@ def add_score_to_collection(self, collection, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 else: (data) = self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 @@ -62,11 +62,11 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_to_collection_with_http_info(collection, score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_to_collection_with_http_info(collection, score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. @@ -75,41 +75,42 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['collection', 'score', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_score_to_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `add_score_to_collection`") # noqa: E501 # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `add_score_to_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -121,10 +122,6 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -138,69 +135,70 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): files=local_var_files, response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_collection(self, body, **kwargs): # noqa: E501 + def create_collection(self, collection_creation, **kwargs): # noqa: E501 """Create a new collection # noqa: E501 This method will create a new collection and add it to your `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_collection(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_collection(collection_creation, async_req=True) >>> result = thread.get() - :param async bool - :param CollectionCreation body: (required) + :param async_req bool + :param CollectionCreation collection_creation: (required) :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_collection_with_http_info(body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_collection_with_http_info(collection_creation, **kwargs) # noqa: E501 else: - (data) = self.create_collection_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_collection_with_http_info(collection_creation, **kwargs) # noqa: E501 return data - def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 + def create_collection_with_http_info(self, collection_creation, **kwargs): # noqa: E501 """Create a new collection # noqa: E501 This method will create a new collection and add it to your `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_collection_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_collection_with_http_info(collection_creation, async_req=True) >>> result = thread.get() - :param async bool - :param CollectionCreation body: (required) + :param async_req bool + :param CollectionCreation collection_creation: (required) :return: Collection If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['collection_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_collection" % key ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_collection`") # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'collection_creation' is set + if ('collection_creation' not in local_var_params or + local_var_params['collection_creation'] is None): + raise ValueError("Missing the required parameter `collection_creation` when calling `create_collection`") # noqa: E501 collection_formats = {} @@ -214,8 +212,8 @@ def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'collection_creation' in local_var_params: + body_params = local_var_params['collection_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -237,10 +235,10 @@ def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='Collection', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_collection(self, collection, **kwargs): # noqa: E501 @@ -248,18 +246,18 @@ def delete_collection(self, collection, **kwargs): # noqa: E501 This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_collection(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 else: (data) = self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 @@ -270,42 +268,43 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_collection_with_http_info(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['collection'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `delete_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] @@ -319,10 +318,6 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -336,10 +331,10 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E501 @@ -347,11 +342,11 @@ def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E5 This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_from_collection(collection, score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_from_collection(collection, score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None @@ -359,7 +354,7 @@ def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E5 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 else: (data) = self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 @@ -370,11 +365,11 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_from_collection_with_http_info(collection, score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_from_collection_with_http_info(collection, score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None @@ -382,37 +377,38 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg returns the request thread. """ + local_var_params = locals() + all_params = ['collection', 'score'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_from_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `delete_score_from_collection`") # noqa: E501 # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `delete_score_from_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -426,10 +422,6 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -443,29 +435,29 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def edit_collection(self, collection, **kwargs): # noqa: E501 """Update a collection's metadata # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_collection(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_collection(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification body: + :param CollectionModification collection_modification: :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 else: (data) = self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 @@ -475,43 +467,44 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 """Update a collection's metadata # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_collection_with_http_info(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification body: + :param CollectionModification collection_modification: :return: Collection If the method is called asynchronously, returns the request thread. """ - all_params = ['collection', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['collection', 'collection_modification'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `edit_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] @@ -521,8 +514,8 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'collection_modification' in local_var_params: + body_params = local_var_params['collection_modification'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -544,21 +537,21 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 files=local_var_files, response_type='Collection', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_collection(self, collection, **kwargs): # noqa: E501 """Get collection details # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_collection(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_collection(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :return: Collection @@ -566,7 +559,7 @@ def get_collection(self, collection, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 else: (data) = self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 @@ -576,11 +569,11 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 """Get collection details # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_collection_with_http_info(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :return: Collection @@ -588,35 +581,36 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['collection', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `get_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -628,10 +622,6 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -645,10 +635,10 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 files=local_var_files, response_type='Collection', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_collection_scores(self, collection, **kwargs): # noqa: E501 @@ -656,11 +646,11 @@ def list_collection_scores(self, collection, **kwargs): # noqa: E501 Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_collection_scores(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collection_scores(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort @@ -673,7 +663,7 @@ def list_collection_scores(self, collection, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 else: (data) = self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 @@ -684,11 +674,11 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_collection_scores_with_http_info(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collection_scores_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort @@ -701,49 +691,50 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['collection', 'sharing_key', 'sort', 'direction', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_collection_scores" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `list_collection_scores`") # noqa: E501 - if 'limit' in params and params['limit'] > 100: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in params and params['limit'] < 1: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 - if 'sort' in params: - query_params.append(('sort', params['sort'])) # noqa: E501 - if 'direction' in params: - query_params.append(('direction', params['direction'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'next' in params: - query_params.append(('next', params['next'])) # noqa: E501 - if 'previous' in params: - query_params.append(('previous', params['previous'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 + if 'sort' in local_var_params: + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'direction' in local_var_params: + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'next' in local_var_params: + query_params.append(('next', local_var_params['next'])) # noqa: E501 + if 'previous' in local_var_params: + query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -755,10 +746,6 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -772,10 +759,10 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_collections(self, **kwargs): # noqa: E501 @@ -783,11 +770,11 @@ def list_collections(self, **kwargs): # noqa: E501 Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_collections(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collections(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. :param str sort: Sort :param str direction: Sort direction @@ -799,7 +786,7 @@ def list_collections(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_collections_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_collections_with_http_info(**kwargs) # noqa: E501 @@ -810,11 +797,11 @@ def list_collections_with_http_info(self, **kwargs): # noqa: E501 Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_collections_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_collections_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. :param str sort: Sort :param str direction: Sort direction @@ -826,43 +813,44 @@ def list_collections_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['parent', 'sort', 'direction', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_collections" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] - if 'limit' in params and params['limit'] > 100: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in params and params['limit'] < 1: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'parent' in params: - query_params.append(('parent', params['parent'])) # noqa: E501 - if 'sort' in params: - query_params.append(('sort', params['sort'])) # noqa: E501 - if 'direction' in params: - query_params.append(('direction', params['direction'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'next' in params: - query_params.append(('next', params['next'])) # noqa: E501 - if 'previous' in params: - query_params.append(('previous', params['previous'])) # noqa: E501 + if 'parent' in local_var_params: + query_params.append(('parent', local_var_params['parent'])) # noqa: E501 + if 'sort' in local_var_params: + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'direction' in local_var_params: + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'next' in local_var_params: + query_params.append(('next', local_var_params['next'])) # noqa: E501 + if 'previous' in local_var_params: + query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -874,10 +862,6 @@ def list_collections_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -891,10 +875,10 @@ def list_collections_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='list[Collection]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def untrash_collection(self, collection, **kwargs): # noqa: E501 @@ -902,18 +886,18 @@ def untrash_collection(self, collection, **kwargs): # noqa: E501 This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.untrash_collection(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.untrash_collection(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 else: (data) = self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 @@ -924,42 +908,43 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.untrash_collection_with_http_info(collection, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.untrash_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['collection'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method untrash_collection" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in params or - params['collection'] is None): + if ('collection' not in local_var_params or + local_var_params['collection'] is None): raise ValueError("Missing the required parameter `collection` when calling `untrash_collection`") # noqa: E501 collection_formats = {} path_params = {} - if 'collection' in params: - path_params['collection'] = params['collection'] # noqa: E501 + if 'collection' in local_var_params: + path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] @@ -973,10 +958,6 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -990,8 +971,8 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index bb3dc7a..59e84cd 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class GroupApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -37,18 +37,18 @@ def get_group_details(self, group, **kwargs): # noqa: E501 """Get group information # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_details(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_details(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :return: GroupDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 else: (data) = self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 @@ -58,42 +58,43 @@ def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 """Get group information # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_details_with_http_info(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_details_with_http_info(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :return: GroupDetails If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['group'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_group_details" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in params or - params['group'] is None): + if ('group' not in local_var_params or + local_var_params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `get_group_details`") # noqa: E501 collection_formats = {} path_params = {} - if 'group' in params: - path_params['group'] = params['group'] # noqa: E501 + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] @@ -107,10 +108,6 @@ def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -124,10 +121,10 @@ def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 files=local_var_files, response_type='GroupDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_group_scores(self, group, **kwargs): # noqa: E501 @@ -135,11 +132,11 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_scores(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_scores(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -147,7 +144,7 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 else: (data) = self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 @@ -158,11 +155,11 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_scores_with_http_info(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_scores_with_http_info(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -170,35 +167,36 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['group', 'parent'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_group_scores" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in params or - params['group'] is None): + if ('group' not in local_var_params or + local_var_params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 collection_formats = {} path_params = {} - if 'group' in params: - path_params['group'] = params['group'] # noqa: E501 + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] - if 'parent' in params: - query_params.append(('parent', params['parent'])) # noqa: E501 + if 'parent' in local_var_params: + query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -210,10 +208,6 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -227,28 +221,28 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_group_users(self, group, **kwargs): # noqa: E501 """List group's users # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_group_users(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_group_users(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :return: list[UserPublic] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 else: (data) = self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 @@ -258,42 +252,43 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 """List group's users # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_group_users_with_http_info(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_group_users_with_http_info(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :return: list[UserPublic] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['group'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_group_users" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in params or - params['group'] is None): + if ('group' not in local_var_params or + local_var_params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `list_group_users`") # noqa: E501 collection_formats = {} path_params = {} - if 'group' in params: - path_params['group'] = params['group'] # noqa: E501 + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] @@ -307,10 +302,6 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -324,8 +315,8 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 files=local_var_files, response_type='list[UserPublic]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 40b20a0..2906a9c 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class OrganizationApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -33,63 +33,64 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_lti_credentials(self, body, **kwargs): # noqa: E501 + def create_lti_credentials(self, lti_credentials_creation, **kwargs): # noqa: E501 """Create a new couple of LTI 1.x credentials # noqa: E501 Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_lti_credentials(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_lti_credentials(lti_credentials_creation, async_req=True) >>> result = thread.get() - :param async bool - :param LtiCredentialsCreation body: (required) + :param async_req bool + :param LtiCredentialsCreation lti_credentials_creation: (required) :return: LtiCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_lti_credentials_with_http_info(lti_credentials_creation, **kwargs) # noqa: E501 else: - (data) = self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_lti_credentials_with_http_info(lti_credentials_creation, **kwargs) # noqa: E501 return data - def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 + def create_lti_credentials_with_http_info(self, lti_credentials_creation, **kwargs): # noqa: E501 """Create a new couple of LTI 1.x credentials # noqa: E501 Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_lti_credentials_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_lti_credentials_with_http_info(lti_credentials_creation, async_req=True) >>> result = thread.get() - :param async bool - :param LtiCredentialsCreation body: (required) + :param async_req bool + :param LtiCredentialsCreation lti_credentials_creation: (required) :return: LtiCredentials If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['lti_credentials_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_lti_credentials" % key ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_lti_credentials`") # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'lti_credentials_creation' is set + if ('lti_credentials_creation' not in local_var_params or + local_var_params['lti_credentials_creation'] is None): + raise ValueError("Missing the required parameter `lti_credentials_creation` when calling `create_lti_credentials`") # noqa: E501 collection_formats = {} @@ -103,8 +104,8 @@ def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'lti_credentials_creation' in local_var_params: + body_params = local_var_params['lti_credentials_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -126,10 +127,10 @@ def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='LtiCredentials', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_organization_invitation(self, **kwargs): # noqa: E501 @@ -137,18 +138,18 @@ def create_organization_invitation(self, **kwargs): # noqa: E501 This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_organization_invitation(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_invitation(async_req=True) >>> result = thread.get() - :param async bool - :param OrganizationInvitationCreation body: + :param async_req bool + :param OrganizationInvitationCreation organization_invitation_creation: :return: OrganizationInvitation If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 else: (data) = self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 @@ -159,32 +160,33 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_organization_invitation_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_invitation_with_http_info(async_req=True) >>> result = thread.get() - :param async bool - :param OrganizationInvitationCreation body: + :param async_req bool + :param OrganizationInvitationCreation organization_invitation_creation: :return: OrganizationInvitation If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['organization_invitation_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_invitation" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -198,8 +200,8 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'organization_invitation_creation' in local_var_params: + body_params = local_var_params['organization_invitation_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -221,28 +223,28 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='OrganizationInvitation', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def create_organization_user(self, **kwargs): # noqa: E501 """Create a new user account # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_organization_user(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user(async_req=True) >>> result = thread.get() - :param async bool - :param UserCreation body: + :param async_req bool + :param UserCreation user_creation: :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.create_organization_user_with_http_info(**kwargs) # noqa: E501 else: (data) = self.create_organization_user_with_http_info(**kwargs) # noqa: E501 @@ -252,32 +254,33 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 """Create a new user account # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_organization_user_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user_with_http_info(async_req=True) >>> result = thread.get() - :param async bool - :param UserCreation body: + :param async_req bool + :param UserCreation user_creation: :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['user_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -291,8 +294,8 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'user_creation' in local_var_params: + body_params = local_var_params['user_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -314,27 +317,27 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='UserDetailsAdmin', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_lti_credentials(self, **kwargs): # noqa: E501 """List LTI 1.x credentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_lti_credentials(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_lti_credentials(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: list[LtiCredentials] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 @@ -344,31 +347,32 @@ def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 """List LTI 1.x credentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_lti_credentials_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_lti_credentials_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :return: list[LtiCredentials] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = [] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_lti_credentials" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -386,10 +390,6 @@ def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -403,21 +403,21 @@ def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='list[LtiCredentials]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_organization_invitations(self, **kwargs): # noqa: E501 """List the organization invitations # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_organization_invitations(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_organization_invitations(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -427,7 +427,7 @@ def list_organization_invitations(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 @@ -437,11 +437,11 @@ def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 """List the organization invitations # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_organization_invitations_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_organization_invitations_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -451,39 +451,40 @@ def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['role', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_organization_invitations" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] - if 'limit' in params and params['limit'] > 1000: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value less than or equal to `1000`") # noqa: E501 - if 'limit' in params and params['limit'] < 1: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'role' in params: - query_params.append(('role', params['role'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'next' in params: - query_params.append(('next', params['next'])) # noqa: E501 - if 'previous' in params: - query_params.append(('previous', params['previous'])) # noqa: E501 + if 'role' in local_var_params: + query_params.append(('role', local_var_params['role'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'next' in local_var_params: + query_params.append(('next', local_var_params['next'])) # noqa: E501 + if 'previous' in local_var_params: + query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -495,10 +496,6 @@ def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -512,21 +509,21 @@ def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='list[OrganizationInvitation]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_organization_users(self, **kwargs): # noqa: E501 """List the organization users # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_organization_users(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_organization_users(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -536,7 +533,7 @@ def list_organization_users(self, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_organization_users_with_http_info(**kwargs) # noqa: E501 else: (data) = self.list_organization_users_with_http_info(**kwargs) # noqa: E501 @@ -546,11 +543,11 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 """List the organization users # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_organization_users_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_organization_users_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -560,39 +557,40 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['role', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_organization_users" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] - if 'limit' in params and params['limit'] > 1000: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value less than or equal to `1000`") # noqa: E501 - if 'limit' in params and params['limit'] < 1: # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'role' in params: - query_params.append(('role', params['role'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'next' in params: - query_params.append(('next', params['next'])) # noqa: E501 - if 'previous' in params: - query_params.append(('previous', params['previous'])) # noqa: E501 + if 'role' in local_var_params: + query_params.append(('role', local_var_params['role'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'next' in local_var_params: + query_params.append(('next', local_var_params['next'])) # noqa: E501 + if 'previous' in local_var_params: + query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -604,10 +602,6 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -621,28 +615,28 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 files=local_var_files, response_type='list[UserDetailsAdmin]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def remove_organization_invitation(self, invitation, **kwargs): # noqa: E501 """Remove an organization invitation # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_organization_invitation(invitation, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_organization_invitation(invitation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str invitation: Unique identifier of the invitation (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 else: (data) = self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 @@ -652,42 +646,43 @@ def remove_organization_invitation_with_http_info(self, invitation, **kwargs): """Remove an organization invitation # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_organization_invitation_with_http_info(invitation, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_organization_invitation_with_http_info(invitation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str invitation: Unique identifier of the invitation (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['invitation'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method remove_organization_invitation" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'invitation' is set - if ('invitation' not in params or - params['invitation'] is None): + if ('invitation' not in local_var_params or + local_var_params['invitation'] is None): raise ValueError("Missing the required parameter `invitation` when calling `remove_organization_invitation`") # noqa: E501 collection_formats = {} path_params = {} - if 'invitation' in params: - path_params['invitation'] = params['invitation'] # noqa: E501 + if 'invitation' in local_var_params: + path_params['invitation'] = local_var_params['invitation'] # noqa: E501 query_params = [] @@ -701,10 +696,6 @@ def remove_organization_invitation_with_http_info(self, invitation, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -718,10 +709,10 @@ def remove_organization_invitation_with_http_info(self, invitation, **kwargs): files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def remove_organization_user(self, user, **kwargs): # noqa: E501 @@ -729,11 +720,11 @@ def remove_organization_user(self, user, **kwargs): # noqa: E501 This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_organization_user(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_organization_user(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of the Flat account (required) :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. :return: None @@ -741,7 +732,7 @@ def remove_organization_user(self, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 @@ -752,11 +743,11 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_organization_user_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_organization_user_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of the Flat account (required) :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. :return: None @@ -764,35 +755,36 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user', 'convert_to_individual'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method remove_organization_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `remove_organization_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'convert_to_individual' in params: - query_params.append(('convertToIndividual', params['convert_to_individual'])) # noqa: E501 + if 'convert_to_individual' in local_var_params: + query_params.append(('convertToIndividual', local_var_params['convert_to_individual'])) # noqa: E501 header_params = {} @@ -804,10 +796,6 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -821,28 +809,28 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def revoke_lti_credentials(self, credentials, **kwargs): # noqa: E501 """Revoke LTI 1.x credentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.revoke_lti_credentials(credentials, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_lti_credentials(credentials, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str credentials: Credentials unique identifier (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 else: (data) = self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 @@ -852,42 +840,43 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: """Revoke LTI 1.x credentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.revoke_lti_credentials_with_http_info(credentials, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_lti_credentials_with_http_info(credentials, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str credentials: Credentials unique identifier (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['credentials'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method revoke_lti_credentials" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'credentials' is set - if ('credentials' not in params or - params['credentials'] is None): + if ('credentials' not in local_var_params or + local_var_params['credentials'] is None): raise ValueError("Missing the required parameter `credentials` when calling `revoke_lti_credentials`") # noqa: E501 collection_formats = {} path_params = {} - if 'credentials' in params: - path_params['credentials'] = params['credentials'] # noqa: E501 + if 'credentials' in local_var_params: + path_params['credentials'] = local_var_params['credentials'] # noqa: E501 query_params = [] @@ -901,10 +890,6 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -918,79 +903,80 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_organization_user(self, user, body, **kwargs): # noqa: E501 + def update_organization_user(self, user, user_admin_update, **kwargs): # noqa: E501 """Update account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_organization_user(user, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_organization_user(user, user_admin_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate body: (required) + :param UserAdminUpdate user_admin_update: (required) :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.update_organization_user_with_http_info(user, user_admin_update, **kwargs) # noqa: E501 else: - (data) = self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 + (data) = self.update_organization_user_with_http_info(user, user_admin_update, **kwargs) # noqa: E501 return data - def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa: E501 + def update_organization_user_with_http_info(self, user, user_admin_update, **kwargs): # noqa: E501 """Update account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_organization_user_with_http_info(user, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_organization_user_with_http_info(user, user_admin_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate body: (required) + :param UserAdminUpdate user_admin_update: (required) :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ - all_params = ['user', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['user', 'user_admin_update'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_organization_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `update_organization_user`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_organization_user`") # noqa: E501 + # verify the required parameter 'user_admin_update' is set + if ('user_admin_update' not in local_var_params or + local_var_params['user_admin_update'] is None): + raise ValueError("Missing the required parameter `user_admin_update` when calling `update_organization_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -1000,8 +986,8 @@ def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'user_admin_update' in local_var_params: + body_params = local_var_params['user_admin_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1023,8 +1009,8 @@ def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa files=local_var_files, response_type='UserDetailsAdmin', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index e684ef3..eb4d8df 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class ScoreApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -33,75 +33,76 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def add_score_collaborator(self, score, body, **kwargs): # noqa: E501 + def add_score_collaborator(self, score, resource_collaborator_creation, **kwargs): # noqa: E501 """Add a new collaborator # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_collaborator(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_collaborator(score, resource_collaborator_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation body: (required) + :param ResourceCollaboratorCreation resource_collaborator_creation: (required) :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.add_score_collaborator_with_http_info(score, resource_collaborator_creation, **kwargs) # noqa: E501 else: - (data) = self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 + (data) = self.add_score_collaborator_with_http_info(score, resource_collaborator_creation, **kwargs) # noqa: E501 return data - def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: E501 + def add_score_collaborator_with_http_info(self, score, resource_collaborator_creation, **kwargs): # noqa: E501 """Add a new collaborator # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_collaborator_with_http_info(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_collaborator_with_http_info(score, resource_collaborator_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation body: (required) + :param ResourceCollaboratorCreation resource_collaborator_creation: (required) :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'resource_collaborator_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_score_collaborator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `add_score_collaborator`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `add_score_collaborator`") # noqa: E501 + # verify the required parameter 'resource_collaborator_creation' is set + if ('resource_collaborator_creation' not in local_var_params or + local_var_params['resource_collaborator_creation'] is None): + raise ValueError("Missing the required parameter `resource_collaborator_creation` when calling `add_score_collaborator`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -111,8 +112,8 @@ def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'resource_collaborator_creation' in local_var_params: + body_params = local_var_params['resource_collaborator_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -134,81 +135,82 @@ def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: files=local_var_files, response_type='ResourceCollaborator', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def add_score_track(self, score, body, **kwargs): # noqa: E501 + def add_score_track(self, score, score_track_creation, **kwargs): # noqa: E501 """Add a new video or audio track to the score # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_track(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_track(score, score_track_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation body: (required) + :param ScoreTrackCreation score_track_creation: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.add_score_track_with_http_info(score, score_track_creation, **kwargs) # noqa: E501 else: - (data) = self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 + (data) = self.add_score_track_with_http_info(score, score_track_creation, **kwargs) # noqa: E501 return data - def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 + def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): # noqa: E501 """Add a new video or audio track to the score # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.add_score_track_with_http_info(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_score_track_with_http_info(score, score_track_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation body: (required) + :param ScoreTrackCreation score_track_creation: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'score_track_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method add_score_track" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `add_score_track`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `add_score_track`") # noqa: E501 + # verify the required parameter 'score_track_creation' is set + if ('score_track_creation' not in local_var_params or + local_var_params['score_track_creation'] is None): + raise ValueError("Missing the required parameter `score_track_creation` when calling `add_score_track`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -218,8 +220,8 @@ def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_track_creation' in local_var_params: + body_params = local_var_params['score_track_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -241,69 +243,70 @@ def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreTrack', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_score(self, body, **kwargs): # noqa: E501 + def create_score(self, score_creation, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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}`. # noqa: E501 + 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_score(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_score(score_creation, async_req=True) >>> result = thread.get() - :param async bool - :param ScoreCreation body: (required) + :param async_req bool + :param ScoreCreation score_creation: (required) :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_score_with_http_info(body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_score_with_http_info(score_creation, **kwargs) # noqa: E501 else: - (data) = self.create_score_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_score_with_http_info(score_creation, **kwargs) # noqa: E501 return data - def create_score_with_http_info(self, body, **kwargs): # noqa: E501 + def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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}`. # noqa: E501 + 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_score_with_http_info(body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_score_with_http_info(score_creation, async_req=True) >>> result = thread.get() - :param async bool - :param ScoreCreation body: (required) + :param async_req bool + :param ScoreCreation score_creation: (required) :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_score" % key ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_score`") # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'score_creation' is set + if ('score_creation' not in local_var_params or + local_var_params['score_creation'] is None): + raise ValueError("Missing the required parameter `score_creation` when calling `create_score`") # noqa: E501 collection_formats = {} @@ -317,8 +320,8 @@ def create_score_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_creation' in local_var_params: + body_params = local_var_params['score_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -340,81 +343,82 @@ def create_score_with_http_info(self, body, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_score_revision(self, score, body, **kwargs): # noqa: E501 + def create_score_revision(self, score, score_revision_creation, **kwargs): # noqa: E501 """Create a new revision # noqa: E501 Update a score by uploading a new revision for this one. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_score_revision(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_score_revision(score, score_revision_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation body: (required) + :param ScoreRevisionCreation score_revision_creation: (required) :return: ScoreRevision If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.create_score_revision_with_http_info(score, score_revision_creation, **kwargs) # noqa: E501 else: - (data) = self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 + (data) = self.create_score_revision_with_http_info(score, score_revision_creation, **kwargs) # noqa: E501 return data - def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: E501 + def create_score_revision_with_http_info(self, score, score_revision_creation, **kwargs): # noqa: E501 """Create a new revision # noqa: E501 Update a score by uploading a new revision for this one. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.create_score_revision_with_http_info(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_score_revision_with_http_info(score, score_revision_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation body: (required) + :param ScoreRevisionCreation score_revision_creation: (required) :return: ScoreRevision If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'score_revision_creation'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_score_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `create_score_revision`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_score_revision`") # noqa: E501 + # verify the required parameter 'score_revision_creation' is set + if ('score_revision_creation' not in local_var_params or + local_var_params['score_revision_creation'] is None): + raise ValueError("Missing the required parameter `score_revision_creation` when calling `create_score_revision`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -424,8 +428,8 @@ def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_revision_creation' in local_var_params: + body_params = local_var_params['score_revision_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -447,10 +451,10 @@ def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: files=local_var_files, response_type='ScoreRevision', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_score(self, score, **kwargs): # noqa: E501 @@ -458,18 +462,18 @@ def delete_score(self, score, **kwargs): # noqa: E501 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). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_score_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.delete_score_with_http_info(score, **kwargs) # noqa: E501 @@ -480,42 +484,43 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 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). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['score'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_score" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `delete_score`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -529,10 +534,6 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -546,21 +547,21 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_score_comment(self, score, comment, **kwargs): # noqa: E501 """Delete a comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_comment(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_comment(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -569,7 +570,7 @@ def delete_score_comment(self, score, comment, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 else: (data) = self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 @@ -579,11 +580,11 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa """Delete a comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_comment_with_http_info(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_comment_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -592,41 +593,42 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_comment" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `delete_score_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in params or - params['comment'] is None): + if ('comment' not in local_var_params or + local_var_params['comment'] is None): raise ValueError("Missing the required parameter `comment` when calling `delete_score_comment`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'comment' in params: - path_params['comment'] = params['comment'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -638,10 +640,6 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -655,21 +653,21 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def delete_score_track(self, score, track, **kwargs): # noqa: E501 """Remove an audio or video track linked to the score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_track(score, track, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_track(score, track, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :return: None @@ -677,7 +675,7 @@ def delete_score_track(self, score, track, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 else: (data) = self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 @@ -687,11 +685,11 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 """Remove an audio or video track linked to the score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.delete_score_track_with_http_info(score, track, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_score_track_with_http_info(score, track, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :return: None @@ -699,37 +697,38 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'track'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_track" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `delete_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in params or - params['track'] is None): + if ('track' not in local_var_params or + local_var_params['track'] is None): raise ValueError("Missing the required parameter `track` when calling `delete_score_track`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'track' in params: - path_params['track'] = params['track'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'track' in local_var_params: + path_params['track'] = local_var_params['track'] # noqa: E501 query_params = [] @@ -743,10 +742,6 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -760,10 +755,10 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def edit_score(self, score, **kwargs): # noqa: E501 @@ -771,19 +766,19 @@ def edit_score(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_score(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_score(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification body: + :param ScoreModification score_modification: :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.edit_score_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.edit_score_with_http_info(score, **kwargs) # noqa: E501 @@ -794,43 +789,44 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.edit_score_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.edit_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification body: + :param ScoreModification score_modification: :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'score_modification'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_score" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `edit_score`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -840,8 +836,8 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_modification' in local_var_params: + body_params = local_var_params['score_modification'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -863,87 +859,88 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def fork_score(self, score, body, **kwargs): # noqa: E501 + def fork_score(self, score, score_fork, **kwargs): # noqa: E501 """Fork a score # noqa: E501 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.fork_score(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fork_score(score, score_fork, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) + :param ScoreFork score_fork: (required) :param str sharing_key: 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. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.fork_score_with_http_info(score, score_fork, **kwargs) # noqa: E501 else: - (data) = self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 + (data) = self.fork_score_with_http_info(score, score_fork, **kwargs) # noqa: E501 return data - def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 + def fork_score_with_http_info(self, score, score_fork, **kwargs): # noqa: E501 """Fork a score # noqa: E501 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.fork_score_with_http_info(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.fork_score_with_http_info(score, score_fork, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) + :param ScoreFork score_fork: (required) :param str sharing_key: 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. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'score_fork', 'sharing_key'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method fork_score" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 + # verify the required parameter 'score_fork' is set + if ('score_fork' not in local_var_params or + local_var_params['score_fork'] is None): + raise ValueError("Missing the required parameter `score_fork` when calling `fork_score`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -951,8 +948,8 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_fork' in local_var_params: + body_params = local_var_params['score_fork'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -974,21 +971,21 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def ger_user_likes(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.ger_user_likes(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.ger_user_likes(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores :return: list[ScoreDetails] @@ -996,7 +993,7 @@ def ger_user_likes(self, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 @@ -1006,11 +1003,11 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.ger_user_likes_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores :return: list[ScoreDetails] @@ -1018,35 +1015,36 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user', 'ids'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method ger_user_likes" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'ids' in params: - query_params.append(('ids', params['ids'])) # noqa: E501 + if 'ids' in local_var_params: + query_params.append(('ids', local_var_params['ids'])) # noqa: E501 header_params = {} @@ -1058,10 +1056,6 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1075,10 +1069,10 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_group_scores(self, group, **kwargs): # noqa: E501 @@ -1086,11 +1080,11 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_scores(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_scores(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -1098,7 +1092,7 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 else: (data) = self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 @@ -1109,11 +1103,11 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_group_scores_with_http_info(group, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_scores_with_http_info(group, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -1121,35 +1115,36 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['group', 'parent'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_group_scores" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in params or - params['group'] is None): + if ('group' not in local_var_params or + local_var_params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 collection_formats = {} path_params = {} - if 'group' in params: - path_params['group'] = params['group'] # noqa: E501 + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] - if 'parent' in params: - query_params.append(('parent', params['parent'])) # noqa: E501 + if 'parent' in local_var_params: + query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -1161,10 +1156,6 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1178,10 +1169,10 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score(self, score, **kwargs): # noqa: E501 @@ -1189,11 +1180,11 @@ def get_score(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: ScoreDetails @@ -1201,7 +1192,7 @@ def get_score(self, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_with_http_info(score, **kwargs) # noqa: E501 @@ -1212,11 +1203,11 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: ScoreDetails @@ -1224,35 +1215,36 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1264,10 +1256,6 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1281,10 +1269,10 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 @@ -1292,11 +1280,11 @@ def get_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 Get the information about a collaborator (User or Group). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_collaborator(score, collaborator, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_collaborator(score, collaborator, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :param str sharing_key: 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. @@ -1305,7 +1293,7 @@ def get_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 else: (data) = self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 @@ -1316,11 +1304,11 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): Get the information about a collaborator (User or Group). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_collaborator_with_http_info(score, collaborator, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_collaborator_with_http_info(score, collaborator, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :param str sharing_key: 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. @@ -1329,41 +1317,42 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'collaborator', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_collaborator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set - if ('collaborator' not in params or - params['collaborator'] is None): + if ('collaborator' not in local_var_params or + local_var_params['collaborator'] is None): raise ValueError("Missing the required parameter `collaborator` when calling `get_score_collaborator`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'collaborator' in params: - path_params['collaborator'] = params['collaborator'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'collaborator' in local_var_params: + path_params['collaborator'] = local_var_params['collaborator'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1375,10 +1364,6 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1392,10 +1377,10 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): files=local_var_files, response_type='ResourceCollaborator', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_collaborators(self, score, **kwargs): # noqa: E501 @@ -1403,11 +1388,11 @@ def get_score_collaborators(self, score, **kwargs): # noqa: E501 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). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_collaborators(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_collaborators(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ResourceCollaborator] @@ -1415,7 +1400,7 @@ def get_score_collaborators(self, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 @@ -1426,11 +1411,11 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 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). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_collaborators_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_collaborators_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ResourceCollaborator] @@ -1438,35 +1423,36 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_collaborators" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_collaborators`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1478,10 +1464,6 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1495,10 +1477,10 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ResourceCollaborator]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_comments(self, score, **kwargs): # noqa: E501 @@ -1506,11 +1488,11 @@ def get_score_comments(self, score, **kwargs): # noqa: E501 This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_comments(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_comments(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str type: Filter the comments by type @@ -1521,7 +1503,7 @@ def get_score_comments(self, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 @@ -1532,11 +1514,11 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_comments_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_comments_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str type: Filter the comments by type @@ -1547,41 +1529,42 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'sharing_key', 'type', 'sort', 'direction'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_comments" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_comments`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 - if 'type' in params: - query_params.append(('type', params['type'])) # noqa: E501 - if 'sort' in params: - query_params.append(('sort', params['sort'])) # noqa: E501 - if 'direction' in params: - query_params.append(('direction', params['direction'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'sort' in local_var_params: + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'direction' in local_var_params: + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 header_params = {} @@ -1593,10 +1576,6 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1610,10 +1589,10 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreComment]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_revision(self, score, revision, **kwargs): # noqa: E501 @@ -1621,11 +1600,11 @@ def get_score_revision(self, score, revision, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revision(score, revision, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revision(score, revision, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str sharing_key: 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. @@ -1634,7 +1613,7 @@ def get_score_revision(self, score, revision, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 else: (data) = self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 @@ -1645,11 +1624,11 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revision_with_http_info(score, revision, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revision_with_http_info(score, revision, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str sharing_key: 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. @@ -1658,41 +1637,42 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'revision', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_revision`") # noqa: E501 # verify the required parameter 'revision' is set - if ('revision' not in params or - params['revision'] is None): + if ('revision' not in local_var_params or + local_var_params['revision'] is None): raise ValueError("Missing the required parameter `revision` when calling `get_score_revision`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'revision' in params: - path_params['revision'] = params['revision'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'revision' in local_var_params: + path_params['revision'] = local_var_params['revision'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1704,10 +1684,6 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1721,10 +1697,10 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: files=local_var_files, response_type='ScoreRevision', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E501 @@ -1732,23 +1708,23 @@ def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E 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`). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revision_data(score, revision, format, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) :param str sharing_key: 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. :param str parts: An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \"1,2,5\". :param bool only_cached: Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned - :return: str + :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 else: (data) = self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 @@ -1759,67 +1735,68 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar 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`). # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revision_data_with_http_info(score, revision, format, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revision_data_with_http_info(score, revision, format, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) :param str sharing_key: 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. :param str parts: An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \"1,2,5\". :param bool only_cached: Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned - :return: str + :return: file If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'revision', 'format', 'sharing_key', 'parts', 'only_cached'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revision_data" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_revision_data`") # noqa: E501 # verify the required parameter 'revision' is set - if ('revision' not in params or - params['revision'] is None): + if ('revision' not in local_var_params or + local_var_params['revision'] is None): raise ValueError("Missing the required parameter `revision` when calling `get_score_revision_data`") # noqa: E501 # verify the required parameter 'format' is set - if ('format' not in params or - params['format'] is None): + if ('format' not in local_var_params or + local_var_params['format'] is None): raise ValueError("Missing the required parameter `format` when calling `get_score_revision_data`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'revision' in params: - path_params['revision'] = params['revision'] # noqa: E501 - if 'format' in params: - path_params['format'] = params['format'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'revision' in local_var_params: + path_params['revision'] = local_var_params['revision'] # noqa: E501 + if 'format' in local_var_params: + path_params['format'] = local_var_params['format'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 - if 'parts' in params: - query_params.append(('parts', params['parts'])) # noqa: E501 - if 'only_cached' in params: - query_params.append(('onlyCached', params['only_cached'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 + if 'parts' in local_var_params: + query_params.append(('parts', local_var_params['parts'])) # noqa: E501 + if 'only_cached' in local_var_params: + query_params.append(('onlyCached', local_var_params['only_cached'])) # noqa: E501 header_params = {} @@ -1831,10 +1808,6 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1846,12 +1819,12 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='file', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_revisions(self, score, **kwargs): # noqa: E501 @@ -1859,11 +1832,11 @@ def get_score_revisions(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revisions(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revisions(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ScoreRevision] @@ -1871,7 +1844,7 @@ def get_score_revisions(self, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 @@ -1882,11 +1855,11 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_revisions_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_revisions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ScoreRevision] @@ -1894,35 +1867,36 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revisions" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_revisions`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1934,10 +1908,6 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -1951,10 +1921,10 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreRevision]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_submissions(self, score, **kwargs): # noqa: E501 @@ -1962,18 +1932,18 @@ def get_score_submissions(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_submissions(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_submissions(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 @@ -1984,42 +1954,43 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_submissions_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['score'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_submissions" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -2033,10 +2004,6 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2050,21 +2017,21 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[AssignmentSubmission]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_score_track(self, score, track, **kwargs): # noqa: E501 """Retrieve the details of an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_track(score, track, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_track(score, track, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param str sharing_key: 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. @@ -2073,7 +2040,7 @@ def get_score_track(self, score, track, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 else: (data) = self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 @@ -2083,11 +2050,11 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 """Retrieve the details of an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_score_track_with_http_info(score, track, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_score_track_with_http_info(score, track, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param str sharing_key: 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. @@ -2096,41 +2063,42 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'track', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_score_track" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `get_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in params or - params['track'] is None): + if ('track' not in local_var_params or + local_var_params['track'] is None): raise ValueError("Missing the required parameter `track` when calling `get_score_track`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'track' in params: - path_params['track'] = params['track'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'track' in local_var_params: + path_params['track'] = local_var_params['track'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2142,10 +2110,6 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2159,10 +2123,10 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 files=local_var_files, response_type='ScoreTrack', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user_scores(self, user, **kwargs): # noqa: E501 @@ -2170,11 +2134,11 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_scores(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_scores(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -2182,7 +2146,7 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 @@ -2193,11 +2157,11 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_scores_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_scores_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -2205,35 +2169,36 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user', 'parent'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_scores" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'parent' in params: - query_params.append(('parent', params['parent'])) # noqa: E501 + if 'parent' in local_var_params: + query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -2245,10 +2210,6 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2262,21 +2223,21 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def list_score_tracks(self, score, **kwargs): # noqa: E501 """List the audio or video tracks linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_score_tracks(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_score_tracks(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ScoreTrack] @@ -2284,7 +2245,7 @@ def list_score_tracks(self, score, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 @@ -2294,11 +2255,11 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 """List the audio or video tracks linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.list_score_tracks_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_score_tracks_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: list[ScoreTrack] @@ -2306,35 +2267,36 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_score_tracks" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `list_score_tracks`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2346,10 +2308,6 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2363,21 +2321,21 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreTrack]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def mark_score_comment_resolved(self, score, comment, **kwargs): # noqa: E501 """Mark the comment as resolved # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.mark_score_comment_resolved(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_score_comment_resolved(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -2386,7 +2344,7 @@ def mark_score_comment_resolved(self, score, comment, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 else: (data) = self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 @@ -2396,11 +2354,11 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): """Mark the comment as resolved # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.mark_score_comment_resolved_with_http_info(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_score_comment_resolved_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -2409,41 +2367,42 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method mark_score_comment_resolved" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `mark_score_comment_resolved`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in params or - params['comment'] is None): + if ('comment' not in local_var_params or + local_var_params['comment'] is None): raise ValueError("Missing the required parameter `comment` when calling `mark_score_comment_resolved`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'comment' in params: - path_params['comment'] = params['comment'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2455,10 +2414,6 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2472,21 +2427,21 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def mark_score_comment_unresolved(self, score, comment, **kwargs): # noqa: E501 """Mark the comment as unresolved # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.mark_score_comment_unresolved(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_score_comment_unresolved(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -2495,7 +2450,7 @@ def mark_score_comment_unresolved(self, score, comment, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 else: (data) = self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 @@ -2505,11 +2460,11 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) """Mark the comment as unresolved # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.mark_score_comment_unresolved_with_http_info(score, comment, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_score_comment_unresolved_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. @@ -2518,41 +2473,42 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method mark_score_comment_unresolved" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `mark_score_comment_unresolved`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in params or - params['comment'] is None): + if ('comment' not in local_var_params or + local_var_params['comment'] is None): raise ValueError("Missing the required parameter `comment` when calling `mark_score_comment_unresolved`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'comment' in params: - path_params['comment'] = params['comment'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2564,10 +2520,6 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2581,87 +2533,88 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def post_score_comment(self, score, body, **kwargs): # noqa: E501 + def post_score_comment(self, score, score_comment_creation, **kwargs): # noqa: E501 """Post a new comment # noqa: E501 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`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.post_score_comment(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_score_comment(score, score_comment_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation body: (required) + :param ScoreCommentCreation score_comment_creation: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.post_score_comment_with_http_info(score, score_comment_creation, **kwargs) # noqa: E501 else: - (data) = self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 + (data) = self.post_score_comment_with_http_info(score, score_comment_creation, **kwargs) # noqa: E501 return data - def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E501 + def post_score_comment_with_http_info(self, score, score_comment_creation, **kwargs): # noqa: E501 """Post a new comment # noqa: E501 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`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.post_score_comment_with_http_info(score, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_score_comment_with_http_info(score, score_comment_creation, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation body: (required) + :param ScoreCommentCreation score_comment_creation: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'score_comment_creation', 'sharing_key'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method post_score_comment" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `post_score_comment`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_score_comment`") # noqa: E501 + # verify the required parameter 'score_comment_creation' is set + if ('score_comment_creation' not in local_var_params or + local_var_params['score_comment_creation'] is None): + raise ValueError("Missing the required parameter `score_comment_creation` when calling `post_score_comment`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2669,8 +2622,8 @@ def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E50 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_comment_creation' in local_var_params: + body_params = local_var_params['score_comment_creation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -2692,10 +2645,10 @@ def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E50 files=local_var_files, response_type='ScoreComment', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def remove_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 @@ -2703,11 +2656,11 @@ def remove_score_collaborator(self, score, collaborator, **kwargs): # noqa: E50 Remove the specified collaborator from the score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_score_collaborator(score, collaborator, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_score_collaborator(score, collaborator, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :return: None @@ -2715,7 +2668,7 @@ def remove_score_collaborator(self, score, collaborator, **kwargs): # noqa: E50 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 else: (data) = self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 @@ -2726,11 +2679,11 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs Remove the specified collaborator from the score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.remove_score_collaborator_with_http_info(score, collaborator, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_score_collaborator_with_http_info(score, collaborator, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :return: None @@ -2738,37 +2691,38 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs returns the request thread. """ + local_var_params = locals() + all_params = ['score', 'collaborator'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method remove_score_collaborator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `remove_score_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set - if ('collaborator' not in params or - params['collaborator'] is None): + if ('collaborator' not in local_var_params or + local_var_params['collaborator'] is None): raise ValueError("Missing the required parameter `collaborator` when calling `remove_score_collaborator`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'collaborator' in params: - path_params['collaborator'] = params['collaborator'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'collaborator' in local_var_params: + path_params['collaborator'] = local_var_params['collaborator'] # noqa: E501 query_params = [] @@ -2782,10 +2736,6 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -2799,10 +2749,10 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def untrash_score(self, score, **kwargs): # noqa: E501 @@ -2810,18 +2760,18 @@ def untrash_score(self, score, **kwargs): # noqa: E501 This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.untrash_score(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.untrash_score(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 else: (data) = self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 @@ -2832,42 +2782,43 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.untrash_score_with_http_info(score, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.untrash_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :return: None If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['score'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method untrash_score" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `untrash_score`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] @@ -2881,10 +2832,6 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 @@ -2898,93 +2845,94 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_score_comment(self, score, comment, body, **kwargs): # noqa: E501 + def update_score_comment(self, score, comment, score_comment_update, **kwargs): # noqa: E501 """Update an existing comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_score_comment(score, comment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_score_comment(score, comment, score_comment_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate body: (required) + :param ScoreCommentUpdate score_comment_update: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.update_score_comment_with_http_info(score, comment, score_comment_update, **kwargs) # noqa: E501 else: - (data) = self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 + (data) = self.update_score_comment_with_http_info(score, comment, score_comment_update, **kwargs) # noqa: E501 return data - def update_score_comment_with_http_info(self, score, comment, body, **kwargs): # noqa: E501 + def update_score_comment_with_http_info(self, score, comment, score_comment_update, **kwargs): # noqa: E501 """Update an existing comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_score_comment_with_http_info(score, comment, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_score_comment_with_http_info(score, comment, score_comment_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate body: (required) + :param ScoreCommentUpdate score_comment_update: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'comment', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'comment', 'score_comment_update', 'sharing_key'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_score_comment" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `update_score_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in params or - params['comment'] is None): + if ('comment' not in local_var_params or + local_var_params['comment'] is None): raise ValueError("Missing the required parameter `comment` when calling `update_score_comment`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_score_comment`") # noqa: E501 + # verify the required parameter 'score_comment_update' is set + if ('score_comment_update' not in local_var_params or + local_var_params['score_comment_update'] is None): + raise ValueError("Missing the required parameter `score_comment_update` when calling `update_score_comment`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'comment' in params: - path_params['comment'] = params['comment'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in params: - query_params.append(('sharingKey', params['sharing_key'])) # noqa: E501 + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2992,8 +2940,8 @@ def update_score_comment_with_http_info(self, score, comment, body, **kwargs): local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_comment_update' in local_var_params: + body_params = local_var_params['score_comment_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3015,87 +2963,88 @@ def update_score_comment_with_http_info(self, score, comment, body, **kwargs): files=local_var_files, response_type='ScoreComment', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_score_track(self, score, track, body, **kwargs): # noqa: E501 + def update_score_track(self, score, track, score_track_update, **kwargs): # noqa: E501 """Update an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_score_track(score, track, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_score_track(score, track, score_track_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate body: (required) + :param ScoreTrackUpdate score_track_update: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 + if kwargs.get('async_req'): + return self.update_score_track_with_http_info(score, track, score_track_update, **kwargs) # noqa: E501 else: - (data) = self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 + (data) = self.update_score_track_with_http_info(score, track, score_track_update, **kwargs) # noqa: E501 return data - def update_score_track_with_http_info(self, score, track, body, **kwargs): # noqa: E501 + def update_score_track_with_http_info(self, score, track, score_track_update, **kwargs): # noqa: E501 """Update an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.update_score_track_with_http_info(score, track, body, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_score_track_with_http_info(score, track, score_track_update, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate body: (required) + :param ScoreTrackUpdate score_track_update: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ - all_params = ['score', 'track', 'body'] # noqa: E501 - all_params.append('async') + local_var_params = locals() + + all_params = ['score', 'track', 'score_track_update'] # noqa: E501 + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_score_track" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in params or - params['score'] is None): + if ('score' not in local_var_params or + local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `update_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in params or - params['track'] is None): + if ('track' not in local_var_params or + local_var_params['track'] is None): raise ValueError("Missing the required parameter `track` when calling `update_score_track`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_score_track`") # noqa: E501 + # verify the required parameter 'score_track_update' is set + if ('score_track_update' not in local_var_params or + local_var_params['score_track_update'] is None): + raise ValueError("Missing the required parameter `score_track_update` when calling `update_score_track`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in params: - path_params['score'] = params['score'] # noqa: E501 - if 'track' in params: - path_params['track'] = params['track'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'track' in local_var_params: + path_params['track'] = local_var_params['track'] # noqa: E501 query_params = [] @@ -3105,8 +3054,8 @@ def update_score_track_with_http_info(self, score, track, body, **kwargs): # no local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'score_track_update' in local_var_params: + body_params = local_var_params['score_track_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3128,8 +3077,8 @@ def update_score_track_with_http_info(self, score, track, body, **kwargs): # no files=local_var_files, response_type='ScoreTrack', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index 9f919c3..648ecea 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +22,10 @@ class UserApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -37,11 +37,11 @@ def ger_user_likes(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.ger_user_likes(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.ger_user_likes(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores :return: list[ScoreDetails] @@ -49,7 +49,7 @@ def ger_user_likes(self, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 @@ -59,11 +59,11 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.ger_user_likes_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores :return: list[ScoreDetails] @@ -71,35 +71,36 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user', 'ids'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method ger_user_likes" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'ids' in params: - query_params.append(('ids', params['ids'])) # noqa: E501 + if 'ids' in local_var_params: + query_params.append(('ids', local_var_params['ids'])) # noqa: E501 header_params = {} @@ -111,10 +112,6 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -128,10 +125,10 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user(self, user, **kwargs): # noqa: E501 @@ -139,18 +136,18 @@ def get_user(self, user, **kwargs): # noqa: E501 Get a public profile of a Flat User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :return: UserPublic If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_user_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.get_user_with_http_info(user, **kwargs) # noqa: E501 @@ -161,42 +158,43 @@ def get_user_with_http_info(self, user, **kwargs): # noqa: E501 Get a public profile of a Flat User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :return: UserPublic If the method is called asynchronously, returns the request thread. """ + local_var_params = locals() + all_params = ['user'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `get_user`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -210,10 +208,6 @@ def get_user_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -227,10 +221,10 @@ def get_user_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type='UserPublic', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_user_scores(self, user, **kwargs): # noqa: E501 @@ -238,11 +232,11 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_scores(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_scores(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -250,7 +244,7 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async'): + if kwargs.get('async_req'): return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 else: (data) = self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 @@ -261,11 +255,11 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.get_user_scores_with_http_info(user, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_scores_with_http_info(user, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` :return: list[ScoreDetails] @@ -273,35 +267,36 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ + local_var_params = locals() + all_params = ['user', 'parent'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_user_scores" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): + if ('user' not in local_var_params or + local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 collection_formats = {} path_params = {} - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'parent' in params: - query_params.append(('parent', params['parent'])) # noqa: E501 + if 'parent' in local_var_params: + query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -313,10 +308,6 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 @@ -330,8 +321,8 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 files=local_var_files, response_type='list[ScoreDetails]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) diff --git a/flat_api/api_client.py b/flat_api/api_client.py index abdc2ca..6191acb 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -2,11 +2,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import @@ -29,15 +29,15 @@ class ApiClient(object): - """Generic API client for Swagger client library builds. + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client @@ -73,7 +73,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/0.6.0/python' + self.user_agent = 'OpenAPI-Generator/0.6.0/python' def __del__(self): self.pool.close() @@ -177,7 +177,7 @@ def sanitize_for_serialization(self, obj): convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. - If obj is swagger model, return the properties dict. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. @@ -199,12 +199,12 @@ def sanitize_for_serialization(self, obj): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) + for attr, _ in six.iteritems(obj.openapi_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) @@ -274,12 +274,12 @@ def __deserialize(self, data, klass): def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async=None, + response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async parameter. + To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -294,7 +294,7 @@ def call_api(self, resource_path, method, :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async bool: execute request asynchronously + :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, @@ -307,13 +307,13 @@ def call_api(self, resource_path, method, timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: - If async parameter is True, + If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. - If parameter async is False or missing, + If parameter async_req is False or missing, then the method will return the response directly. """ - if not async: + if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, @@ -546,7 +546,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ @@ -599,13 +599,13 @@ def __deserialize_model(self, data, klass): :return: model object. """ - if not klass.swagger_types and not hasattr(klass, + if not klass.openapi_types and not hasattr(klass, 'get_real_child_model'): return data kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): + if klass.openapi_types is not None: + for attr, attr_type in six.iteritems(klass.openapi_types): if (data is not None and klass.attribute_map[attr] in data and isinstance(data, (list, dict))): diff --git a/flat_api/configuration.py b/flat_api/configuration.py index 778ec8e..d68f2d6 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -38,9 +38,9 @@ def set_default(cls, default): class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://github.com/swagger-api/swagger-codegen + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -134,17 +134,6 @@ def logger_file(self, value): self.logger_file_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) @property def debug(self): @@ -246,6 +235,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.6.0\n"\ + "Version of the API: 2.7.0\n"\ "SDK Package Version: 0.6.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 4d62706..4edc7d8 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -4,11 +4,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -36,7 +36,6 @@ from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification from flat_api.models.collection_privacy import CollectionPrivacy -from flat_api.models.collection_title import CollectionTitle from flat_api.models.collection_type import CollectionType from flat_api.models.flat_error_response import FlatErrorResponse from flat_api.models.flat_locales import FlatLocales @@ -55,9 +54,9 @@ from flat_api.models.organization_invitation import OrganizationInvitation from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation from flat_api.models.resource_rights import ResourceRights -from flat_api.models.resource_sharing_key import ResourceSharingKey from flat_api.models.score_comment import ScoreComment from flat_api.models.score_comment_context import ScoreCommentContext from flat_api.models.score_comment_creation import ScoreCommentCreation @@ -65,8 +64,8 @@ from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation import ScoreCreation from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_data import ScoreData from flat_api.models.score_data_encoding import ScoreDataEncoding +from flat_api.models.score_details import ScoreDetails from flat_api.models.score_fork import ScoreFork from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts @@ -87,11 +86,8 @@ from flat_api.models.user_admin_update import UserAdminUpdate from flat_api.models.user_basics import UserBasics from flat_api.models.user_creation import UserCreation -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense -from flat_api.models.user_instruments import UserInstruments -from flat_api.models.resource_collaborator import ResourceCollaborator -from flat_api.models.score_details import ScoreDetails -from flat_api.models.user_public_summary import UserPublicSummary +from flat_api.models.user_details import UserDetails from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.models.user_instruments import UserInstruments from flat_api.models.user_public import UserPublic -from flat_api.models.user_details import UserDetails +from flat_api.models.user_public_summary import UserPublicSummary diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index 02915e8..96c7265 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,22 @@ import six -from flat_api.models.assignment_submission import AssignmentSubmission # noqa: F401,E501 -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework # noqa: F401,E501 -from flat_api.models.media_attachment import MediaAttachment # noqa: F401,E501 - class Assignment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'state': 'str', 'title': 'str', 'classroom': 'str', @@ -63,7 +60,7 @@ class Assignment(object): } def __init__(self, state=None, title=None, classroom=None, description=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, google_classroom=None): # noqa: E501 - """Assignment - a model defined in Swagger""" # noqa: E501 + """Assignment - a model defined in OpenAPI""" # noqa: E501 self._state = None self._title = None @@ -358,7 +355,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index 76ab27b..7e5179b 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class AssignmentCopy(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'classroom': 'str' } @@ -39,7 +40,7 @@ class AssignmentCopy(object): } def __init__(self, classroom=None): # noqa: E501 - """AssignmentCopy - a model defined in Swagger""" # noqa: E501 + """AssignmentCopy - a model defined in OpenAPI""" # noqa: E501 self._classroom = None self.discriminator = None @@ -75,7 +76,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/assignment_creation.py b/flat_api/models/assignment_creation.py index eb87466..b7a29d1 100644 --- a/flat_api/models/assignment_creation.py +++ b/flat_api/models/assignment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.class_attachment_creation import ClassAttachmentCreation # noqa: F401,E501 - class AssignmentCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'title': 'str', 'description': 'str', 'attachments': 'list[ClassAttachmentCreation]', @@ -49,7 +48,7 @@ class AssignmentCreation(object): } def __init__(self, title=None, description=None, attachments=None, due_date=None, scheduled_date=None): # noqa: E501 - """AssignmentCreation - a model defined in Swagger""" # noqa: E501 + """AssignmentCreation - a model defined in OpenAPI""" # noqa: E501 self._title = None self._description = None @@ -186,7 +185,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index 60aae08..436b0f0 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import six -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission # noqa: F401,E501 -from flat_api.models.media_attachment import MediaAttachment # noqa: F401,E501 - class AssignmentSubmission(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'classroom': 'str', 'assignment': 'str', @@ -64,7 +62,7 @@ class AssignmentSubmission(object): } def __init__(self, id=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, student_comment=None, return_date=None, return_feedback=None, return_creator=None, google_classroom=None): # noqa: E501 - """AssignmentSubmission - a model defined in Swagger""" # noqa: E501 + """AssignmentSubmission - a model defined in OpenAPI""" # noqa: E501 self._id = None self._classroom = None @@ -381,7 +379,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index dfe0593..2038cc1 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.class_attachment_creation import ClassAttachmentCreation # noqa: F401,E501 - class AssignmentSubmissionUpdate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'attachments': 'list[ClassAttachmentCreation]', 'student_comment': 'str', 'submit': 'bool', @@ -47,7 +46,7 @@ class AssignmentSubmissionUpdate(object): } def __init__(self, attachments=None, student_comment=None, submit=None, return_feedback=None): # noqa: E501 - """AssignmentSubmissionUpdate - a model defined in Swagger""" # noqa: E501 + """AssignmentSubmissionUpdate - a model defined in OpenAPI""" # noqa: E501 self._attachments = None self._student_comment = None @@ -158,7 +157,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index e114d16..cbb37cc 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ClassAttachmentCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'type': 'str', 'score': 'str', 'url': 'str' @@ -43,7 +44,7 @@ class ClassAttachmentCreation(object): } def __init__(self, type=None, score=None, url=None): # noqa: E501 - """ClassAttachmentCreation - a model defined in Swagger""" # noqa: E501 + """ClassAttachmentCreation - a model defined in OpenAPI""" # noqa: E501 self._type = None self._score = None @@ -136,7 +137,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index 46863ff..9945412 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ClassCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'name': 'str', 'section': 'str' } @@ -41,7 +42,7 @@ class ClassCreation(object): } def __init__(self, name=None, section=None): # noqa: E501 - """ClassCreation - a model defined in Swagger""" # noqa: E501 + """ClassCreation - a model defined in OpenAPI""" # noqa: E501 self._name = None self._section = None @@ -107,7 +108,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 6346be8..3053ca6 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,29 +16,22 @@ import six -from flat_api.models.class_details_canvas import ClassDetailsCanvas # noqa: F401,E501 -from flat_api.models.class_details_clever import ClassDetailsClever # noqa: F401,E501 -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom # noqa: F401,E501 -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive # noqa: F401,E501 -from flat_api.models.class_details_lti import ClassDetailsLti # noqa: F401,E501 -from flat_api.models.class_state import ClassState # noqa: F401,E501 -from flat_api.models.group_details import GroupDetails # noqa: F401,E501 - class ClassDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'state': 'ClassState', 'name': 'str', @@ -81,7 +74,7 @@ class ClassDetails(object): } def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, google_classroom=None, google_drive=None, lti=None, canvas=None, clever=None): # noqa: E501 - """ClassDetails - a model defined in Swagger""" # noqa: E501 + """ClassDetails - a model defined in OpenAPI""" # noqa: E501 self._id = None self._state = None @@ -542,7 +535,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index 8833536..006d6ea 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,91 +18,92 @@ class ClassDetailsCanvas(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'id': 'str', - 'domain': 'str' + openapi_types = { + 'domain': 'str', + 'id': 'str' } attribute_map = { - 'id': 'id', - 'domain': 'domain' + 'domain': 'domain', + 'id': 'id' } - def __init__(self, id=None, domain=None): # noqa: E501 - """ClassDetailsCanvas - a model defined in Swagger""" # noqa: E501 + def __init__(self, domain=None, id=None): # noqa: E501 + """ClassDetailsCanvas - a model defined in OpenAPI""" # noqa: E501 - self._id = None self._domain = None + self._id = None self.discriminator = None - if id is not None: - self.id = id if domain is not None: self.domain = domain + if id is not None: + self.id = id @property - def id(self): - """Gets the id of this ClassDetailsCanvas. # noqa: E501 + def domain(self): + """Gets the domain of this ClassDetailsCanvas. # noqa: E501 - Unique identifier of the course on Canvas # noqa: E501 + Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - :return: The id of this ClassDetailsCanvas. # noqa: E501 + :return: The domain of this ClassDetailsCanvas. # noqa: E501 :rtype: str """ - return self._id + return self._domain - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsCanvas. + @domain.setter + def domain(self, domain): + """Sets the domain of this ClassDetailsCanvas. - Unique identifier of the course on Canvas # noqa: E501 + Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - :param id: The id of this ClassDetailsCanvas. # noqa: E501 + :param domain: The domain of this ClassDetailsCanvas. # noqa: E501 :type: str """ - self._id = id + self._domain = domain @property - def domain(self): - """Gets the domain of this ClassDetailsCanvas. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsCanvas. # noqa: E501 - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 + Unique identifier of the course on Canvas # noqa: E501 - :return: The domain of this ClassDetailsCanvas. # noqa: E501 + :return: The id of this ClassDetailsCanvas. # noqa: E501 :rtype: str """ - return self._domain + return self._id - @domain.setter - def domain(self, domain): - """Sets the domain of this ClassDetailsCanvas. + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsCanvas. - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 + Unique identifier of the course on Canvas # noqa: E501 - :param domain: The domain of this ClassDetailsCanvas. # noqa: E501 + :param id: The id of this ClassDetailsCanvas. # noqa: E501 :type: str """ - self._domain = domain + self._id = id def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index e51c05b..1fc0c3c 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,133 +18,111 @@ class ClassDetailsClever(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'id': 'str', - 'creation_date': 'datetime', + openapi_types = { 'modification_date': 'datetime', + 'term_end_date': 'datetime', 'subject': 'str', - 'term_name': 'str', 'term_start_date': 'datetime', - 'term_end_date': 'datetime' + 'id': 'str', + 'creation_date': 'datetime', + 'term_name': 'str' } attribute_map = { - 'id': 'id', - 'creation_date': 'creationDate', 'modification_date': 'modificationDate', + 'term_end_date': 'termEndDate', 'subject': 'subject', - 'term_name': 'termName', 'term_start_date': 'termStartDate', - 'term_end_date': 'termEndDate' + 'id': 'id', + 'creation_date': 'creationDate', + 'term_name': 'termName' } - def __init__(self, id=None, creation_date=None, modification_date=None, subject=None, term_name=None, term_start_date=None, term_end_date=None): # noqa: E501 - """ClassDetailsClever - a model defined in Swagger""" # noqa: E501 + def __init__(self, modification_date=None, term_end_date=None, subject=None, term_start_date=None, id=None, creation_date=None, term_name=None): # noqa: E501 + """ClassDetailsClever - a model defined in OpenAPI""" # noqa: E501 - self._id = None - self._creation_date = None self._modification_date = None + self._term_end_date = None self._subject = None - self._term_name = None self._term_start_date = None - self._term_end_date = None + self._id = None + self._creation_date = None + self._term_name = None self.discriminator = None - if id is not None: - self.id = id - if creation_date is not None: - self.creation_date = creation_date if modification_date is not None: self.modification_date = modification_date + if term_end_date is not None: + self.term_end_date = term_end_date if subject is not None: self.subject = subject - if term_name is not None: - self.term_name = term_name if term_start_date is not None: self.term_start_date = term_start_date - if term_end_date is not None: - self.term_end_date = term_end_date - - @property - def id(self): - """Gets the id of this ClassDetailsClever. # noqa: E501 - - Clever section unique identifier # noqa: E501 - - :return: The id of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsClever. - - Clever section unique identifier # noqa: E501 - - :param id: The id of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._id = id + if id is not None: + self.id = id + if creation_date is not None: + self.creation_date = creation_date + if term_name is not None: + self.term_name = term_name @property - def creation_date(self): - """Gets the creation_date of this ClassDetailsClever. # noqa: E501 + def modification_date(self): + """Gets the modification_date of this ClassDetailsClever. # noqa: E501 - The creation date of the section on clever # noqa: E501 + The last modification date of the section on clever # noqa: E501 - :return: The creation_date of this ClassDetailsClever. # noqa: E501 + :return: The modification_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._creation_date + return self._modification_date - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ClassDetailsClever. + @modification_date.setter + def modification_date(self, modification_date): + """Sets the modification_date of this ClassDetailsClever. - The creation date of the section on clever # noqa: E501 + The last modification date of the section on clever # noqa: E501 - :param creation_date: The creation_date of this ClassDetailsClever. # noqa: E501 + :param modification_date: The modification_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._creation_date = creation_date + self._modification_date = modification_date @property - def modification_date(self): - """Gets the modification_date of this ClassDetailsClever. # noqa: E501 + def term_end_date(self): + """Gets the term_end_date of this ClassDetailsClever. # noqa: E501 - The last modification date of the section on clever # noqa: E501 + End date of the term # noqa: E501 - :return: The modification_date of this ClassDetailsClever. # noqa: E501 + :return: The term_end_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._modification_date + return self._term_end_date - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ClassDetailsClever. + @term_end_date.setter + def term_end_date(self, term_end_date): + """Sets the term_end_date of this ClassDetailsClever. - The last modification date of the section on clever # noqa: E501 + End date of the term # noqa: E501 - :param modification_date: The modification_date of this ClassDetailsClever. # noqa: E501 + :param term_end_date: The term_end_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._modification_date = modification_date + self._term_end_date = term_end_date @property def subject(self): @@ -175,29 +153,6 @@ def subject(self, subject): self._subject = subject - @property - def term_name(self): - """Gets the term_name of this ClassDetailsClever. # noqa: E501 - - Name of the term when this course happens # noqa: E501 - - :return: The term_name of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._term_name - - @term_name.setter - def term_name(self, term_name): - """Sets the term_name of this ClassDetailsClever. - - Name of the term when this course happens # noqa: E501 - - :param term_name: The term_name of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._term_name = term_name - @property def term_start_date(self): """Gets the term_start_date of this ClassDetailsClever. # noqa: E501 @@ -222,33 +177,79 @@ def term_start_date(self, term_start_date): self._term_start_date = term_start_date @property - def term_end_date(self): - """Gets the term_end_date of this ClassDetailsClever. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsClever. # noqa: E501 - End date of the term # noqa: E501 + Clever section unique identifier # noqa: E501 - :return: The term_end_date of this ClassDetailsClever. # noqa: E501 + :return: The id of this ClassDetailsClever. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsClever. + + Clever section unique identifier # noqa: E501 + + :param id: The id of this ClassDetailsClever. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def creation_date(self): + """Gets the creation_date of this ClassDetailsClever. # noqa: E501 + + The creation date of the section on clever # noqa: E501 + + :return: The creation_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._term_end_date + return self._creation_date - @term_end_date.setter - def term_end_date(self, term_end_date): - """Sets the term_end_date of this ClassDetailsClever. + @creation_date.setter + def creation_date(self, creation_date): + """Sets the creation_date of this ClassDetailsClever. - End date of the term # noqa: E501 + The creation date of the section on clever # noqa: E501 - :param term_end_date: The term_end_date of this ClassDetailsClever. # noqa: E501 + :param creation_date: The creation_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._term_end_date = term_end_date + self._creation_date = creation_date + + @property + def term_name(self): + """Gets the term_name of this ClassDetailsClever. # noqa: E501 + + Name of the term when this course happens # noqa: E501 + + :return: The term_name of this ClassDetailsClever. # noqa: E501 + :rtype: str + """ + return self._term_name + + @term_name.setter + def term_name(self, term_name): + """Sets the term_name of this ClassDetailsClever. + + Name of the term when this course happens # noqa: E501 + + :param term_name: The term_name of this ClassDetailsClever. # noqa: E501 + :type: str + """ + + self._term_name = term_name def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index a733375..bf500a1 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,72 +18,73 @@ class ClassDetailsGoogleClassroom(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'id': 'str', - 'alternate_link': 'str', + openapi_types = { 'name': 'str', - 'section': 'str' + 'alternate_link': 'str', + 'section': 'str', + 'id': 'str' } attribute_map = { - 'id': 'id', - 'alternate_link': 'alternateLink', 'name': 'name', - 'section': 'section' + 'alternate_link': 'alternateLink', + 'section': 'section', + 'id': 'id' } - def __init__(self, id=None, alternate_link=None, name=None, section=None): # noqa: E501 - """ClassDetailsGoogleClassroom - a model defined in Swagger""" # noqa: E501 + def __init__(self, name=None, alternate_link=None, section=None, id=None): # noqa: E501 + """ClassDetailsGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 - self._id = None - self._alternate_link = None self._name = None + self._alternate_link = None self._section = None + self._id = None self.discriminator = None - if id is not None: - self.id = id - if alternate_link is not None: - self.alternate_link = alternate_link if name is not None: self.name = name + if alternate_link is not None: + self.alternate_link = alternate_link if section is not None: self.section = section + if id is not None: + self.id = id @property - def id(self): - """Gets the id of this ClassDetailsGoogleClassroom. # noqa: E501 + def name(self): + """Gets the name of this ClassDetailsGoogleClassroom. # noqa: E501 - The course identifier on Google Classroom # noqa: E501 + The name of the course on Google Classroom # noqa: E501 - :return: The id of this ClassDetailsGoogleClassroom. # noqa: E501 + :return: The name of this ClassDetailsGoogleClassroom. # noqa: E501 :rtype: str """ - return self._id + return self._name - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsGoogleClassroom. + @name.setter + def name(self, name): + """Sets the name of this ClassDetailsGoogleClassroom. - The course identifier on Google Classroom # noqa: E501 + The name of the course on Google Classroom # noqa: E501 - :param id: The id of this ClassDetailsGoogleClassroom. # noqa: E501 + :param name: The name of this ClassDetailsGoogleClassroom. # noqa: E501 :type: str """ - self._id = id + self._name = name @property def alternate_link(self): @@ -109,56 +110,56 @@ def alternate_link(self, alternate_link): self._alternate_link = alternate_link @property - def name(self): - """Gets the name of this ClassDetailsGoogleClassroom. # noqa: E501 + def section(self): + """Gets the section of this ClassDetailsGoogleClassroom. # noqa: E501 - The name of the course on Google Classroom # noqa: E501 + The section of the course on Google Classroom # noqa: E501 - :return: The name of this ClassDetailsGoogleClassroom. # noqa: E501 + :return: The section of this ClassDetailsGoogleClassroom. # noqa: E501 :rtype: str """ - return self._name + return self._section - @name.setter - def name(self, name): - """Sets the name of this ClassDetailsGoogleClassroom. + @section.setter + def section(self, section): + """Sets the section of this ClassDetailsGoogleClassroom. - The name of the course on Google Classroom # noqa: E501 + The section of the course on Google Classroom # noqa: E501 - :param name: The name of this ClassDetailsGoogleClassroom. # noqa: E501 + :param section: The section of this ClassDetailsGoogleClassroom. # noqa: E501 :type: str """ - self._name = name + self._section = section @property - def section(self): - """Gets the section of this ClassDetailsGoogleClassroom. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsGoogleClassroom. # noqa: E501 - The section of the course on Google Classroom # noqa: E501 + The course identifier on Google Classroom # noqa: E501 - :return: The section of this ClassDetailsGoogleClassroom. # noqa: E501 + :return: The id of this ClassDetailsGoogleClassroom. # noqa: E501 :rtype: str """ - return self._section + return self._id - @section.setter - def section(self, section): - """Sets the section of this ClassDetailsGoogleClassroom. + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsGoogleClassroom. - The section of the course on Google Classroom # noqa: E501 + The course identifier on Google Classroom # noqa: E501 - :param section: The section of this ClassDetailsGoogleClassroom. # noqa: E501 + :param id: The id of this ClassDetailsGoogleClassroom. # noqa: E501 :type: str """ - self._section = section + self._id = id def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index 2a8bb94..df9806e 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ClassDetailsGoogleDrive(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'teacher_folder_id': 'str', 'teacher_folder_alternate_link': 'str' } @@ -41,7 +42,7 @@ class ClassDetailsGoogleDrive(object): } def __init__(self, teacher_folder_id=None, teacher_folder_alternate_link=None): # noqa: E501 - """ClassDetailsGoogleDrive - a model defined in Swagger""" # noqa: E501 + """ClassDetailsGoogleDrive - a model defined in OpenAPI""" # noqa: E501 self._teacher_folder_id = None self._teacher_folder_alternate_link = None @@ -102,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index bc78eb6..6b250ce 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ClassDetailsLti(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'context_id': 'str', 'context_title': 'str', 'context_label': 'str' @@ -43,7 +44,7 @@ class ClassDetailsLti(object): } def __init__(self, context_id=None, context_title=None, context_label=None): # noqa: E501 - """ClassDetailsLti - a model defined in Swagger""" # noqa: E501 + """ClassDetailsLti - a model defined in OpenAPI""" # noqa: E501 self._context_id = None self._context_title = None @@ -130,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index 566fac9..545db01 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ClassRoles(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -31,26 +32,26 @@ class ClassRoles(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ClassRoles - a model defined in Swagger""" # noqa: E501 + """ClassRoles - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 8209d1f..437052a 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ClassState(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,26 +33,26 @@ class ClassState(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ClassState - a model defined in Swagger""" # noqa: E501 + """ClassState - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index 83d45b9..4ab0e0b 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ClassUpdate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'name': 'str', 'section': 'str' } @@ -41,7 +42,7 @@ class ClassUpdate(object): } def __init__(self, name=None, section=None): # noqa: E501 - """ClassUpdate - a model defined in Swagger""" # noqa: E501 + """ClassUpdate - a model defined in OpenAPI""" # noqa: E501 self._name = None self._section = None @@ -106,7 +107,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index dfc83fa..691decd 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,40 +16,35 @@ import six -from flat_api.models.collection_capabilities import CollectionCapabilities # noqa: F401,E501 -from flat_api.models.collection_privacy import CollectionPrivacy # noqa: F401,E501 -from flat_api.models.collection_title import CollectionTitle # noqa: F401,E501 -from flat_api.models.collection_type import CollectionType # noqa: F401,E501 -from flat_api.models.resource_collaborator import ResourceCollaborator # noqa: F401,E501 -from flat_api.models.resource_rights import ResourceRights # noqa: F401,E501 -from flat_api.models.user_public_summary import UserPublicSummary # noqa: F401,E501 - class Collection(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', - 'title': 'CollectionTitle', + 'title': 'str', 'html_url': 'str', 'type': 'CollectionType', 'privacy': 'CollectionPrivacy', 'sharing_key': 'str', 'app': 'str', + 'creation_date': 'datetime', 'user': 'UserPublicSummary', 'rights': 'ResourceRights', 'collaborators': 'list[ResourceCollaborator]', - 'capabilities': 'CollectionCapabilities' + 'capabilities': 'CollectionCapabilities', + 'collections': 'list[str]' } attribute_map = { @@ -60,14 +55,16 @@ class Collection(object): 'privacy': 'privacy', 'sharing_key': 'sharingKey', 'app': 'app', + 'creation_date': 'creationDate', 'user': 'user', 'rights': 'rights', 'collaborators': 'collaborators', - 'capabilities': 'capabilities' + 'capabilities': 'capabilities', + 'collections': 'collections' } - def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, sharing_key=None, app=None, user=None, rights=None, collaborators=None, capabilities=None): # noqa: E501 - """Collection - a model defined in Swagger""" # noqa: E501 + def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, sharing_key=None, app=None, creation_date=None, user=None, rights=None, collaborators=None, capabilities=None, collections=None): # noqa: E501 + """Collection - a model defined in OpenAPI""" # noqa: E501 self._id = None self._title = None @@ -76,10 +73,12 @@ def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, self._privacy = None self._sharing_key = None self._app = None + self._creation_date = None self._user = None self._rights = None self._collaborators = None self._capabilities = None + self._collections = None self.discriminator = None if id is not None: @@ -96,6 +95,8 @@ def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, self.sharing_key = sharing_key if app is not None: self.app = app + if creation_date is not None: + self.creation_date = creation_date if user is not None: self.user = user if rights is not None: @@ -104,6 +105,8 @@ def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, self.collaborators = collaborators if capabilities is not None: self.capabilities = capabilities + if collections is not None: + self.collections = collections @property def id(self): @@ -132,9 +135,10 @@ def id(self, id): def title(self): """Gets the title of this Collection. # noqa: E501 + The title of the collection # noqa: E501 :return: The title of this Collection. # noqa: E501 - :rtype: CollectionTitle + :rtype: str """ return self._title @@ -142,10 +146,15 @@ def title(self): def title(self, title): """Sets the title of this Collection. + The title of the collection # noqa: E501 :param title: The title of this Collection. # noqa: E501 - :type: CollectionTitle + :type: str """ + if title is not None and len(title) > 300: + raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 + if title is not None and len(title) < 1: + raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -260,6 +269,29 @@ def app(self, app): self._app = app + @property + def creation_date(self): + """Gets the creation_date of this Collection. # noqa: E501 + + The date when the collection was created # noqa: E501 + + :return: The creation_date of this Collection. # noqa: E501 + :rtype: datetime + """ + return self._creation_date + + @creation_date.setter + def creation_date(self, creation_date): + """Sets the creation_date of this Collection. + + The date when the collection was created # noqa: E501 + + :param creation_date: The creation_date of this Collection. # noqa: E501 + :type: datetime + """ + + self._creation_date = creation_date + @property def user(self): """Gets the user of this Collection. # noqa: E501 @@ -346,11 +378,34 @@ def capabilities(self, capabilities): self._capabilities = capabilities + @property + def collections(self): + """Gets the collections of this Collection. # noqa: E501 + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :return: The collections of this Collection. # noqa: E501 + :rtype: list[str] + """ + return self._collections + + @collections.setter + def collections(self, collections): + """Sets the collections of this Collection. + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :param collections: The collections of this Collection. # noqa: E501 + :type: list[str] + """ + + self._collections = collections + def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 3d47ee0..6ecac77 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,54 +18,101 @@ class CollectionCapabilities(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { + 'can_delete_scores': 'bool', + 'can_add_scores': 'bool', 'can_edit': 'bool', 'can_share': 'bool', - 'can_delete': 'bool', - 'can_add_scores': 'bool', - 'can_delete_scores': 'bool' + 'can_delete': 'bool' } attribute_map = { + 'can_delete_scores': 'canDeleteScores', + 'can_add_scores': 'canAddScores', 'can_edit': 'canEdit', 'can_share': 'canShare', - 'can_delete': 'canDelete', - 'can_add_scores': 'canAddScores', - 'can_delete_scores': 'canDeleteScores' + 'can_delete': 'canDelete' } - def __init__(self, can_edit=None, can_share=None, can_delete=None, can_add_scores=None, can_delete_scores=None): # noqa: E501 - """CollectionCapabilities - a model defined in Swagger""" # noqa: E501 + def __init__(self, can_delete_scores=None, can_add_scores=None, can_edit=None, can_share=None, can_delete=None): # noqa: E501 + """CollectionCapabilities - a model defined in OpenAPI""" # noqa: E501 + self._can_delete_scores = None + self._can_add_scores = None self._can_edit = None self._can_share = None self._can_delete = None - self._can_add_scores = None - self._can_delete_scores = None self.discriminator = None + if can_delete_scores is not None: + self.can_delete_scores = can_delete_scores + if can_add_scores is not None: + self.can_add_scores = can_add_scores if can_edit is not None: self.can_edit = can_edit if can_share is not None: self.can_share = can_share if can_delete is not None: self.can_delete = can_delete - if can_add_scores is not None: - self.can_add_scores = can_add_scores - if can_delete_scores is not None: - self.can_delete_scores = can_delete_scores + + @property + def can_delete_scores(self): + """Gets the can_delete_scores of this CollectionCapabilities. # noqa: E501 + + Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 + + :return: The can_delete_scores of this CollectionCapabilities. # noqa: E501 + :rtype: bool + """ + return self._can_delete_scores + + @can_delete_scores.setter + def can_delete_scores(self, can_delete_scores): + """Sets the can_delete_scores of this CollectionCapabilities. + + Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 + + :param can_delete_scores: The can_delete_scores of this CollectionCapabilities. # noqa: E501 + :type: bool + """ + + self._can_delete_scores = can_delete_scores + + @property + def can_add_scores(self): + """Gets the can_add_scores of this CollectionCapabilities. # noqa: E501 + + Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 + + :return: The can_add_scores of this CollectionCapabilities. # noqa: E501 + :rtype: bool + """ + return self._can_add_scores + + @can_add_scores.setter + def can_add_scores(self, can_add_scores): + """Sets the can_add_scores of this CollectionCapabilities. + + Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 + + :param can_add_scores: The can_add_scores of this CollectionCapabilities. # noqa: E501 + :type: bool + """ + + self._can_add_scores = can_add_scores @property def can_edit(self): @@ -136,57 +183,11 @@ def can_delete(self, can_delete): self._can_delete = can_delete - @property - def can_add_scores(self): - """Gets the can_add_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :return: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_add_scores - - @can_add_scores.setter - def can_add_scores(self, can_add_scores): - """Sets the can_add_scores of this CollectionCapabilities. - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :param can_add_scores: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_add_scores = can_add_scores - - @property - def can_delete_scores(self): - """Gets the can_delete_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :return: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_delete_scores - - @can_delete_scores.setter - def can_delete_scores(self, can_delete_scores): - """Sets the can_delete_scores of this CollectionCapabilities. - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :param can_delete_scores: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_delete_scores = can_delete_scores - def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index dab4a00..8bf8188 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,23 @@ import six -from flat_api.models.collection_title import CollectionTitle # noqa: F401,E501 - class CollectionCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'title': 'CollectionTitle' + openapi_types = { + 'title': 'str' } attribute_map = { @@ -41,7 +40,7 @@ class CollectionCreation(object): } def __init__(self, title=None): # noqa: E501 - """CollectionCreation - a model defined in Swagger""" # noqa: E501 + """CollectionCreation - a model defined in OpenAPI""" # noqa: E501 self._title = None self.discriminator = None @@ -52,9 +51,10 @@ def __init__(self, title=None): # noqa: E501 def title(self): """Gets the title of this CollectionCreation. # noqa: E501 + The title of the collection # noqa: E501 :return: The title of this CollectionCreation. # noqa: E501 - :rtype: CollectionTitle + :rtype: str """ return self._title @@ -62,12 +62,17 @@ def title(self): def title(self, title): """Sets the title of this CollectionCreation. + The title of the collection # noqa: E501 :param title: The title of this CollectionCreation. # noqa: E501 - :type: CollectionTitle + :type: str """ if title is None: raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + if title is not None and len(title) > 300: + raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 + if title is not None and len(title) < 1: + raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -75,7 +80,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index 25ec5fe..6dc4185 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,23 @@ import six -from flat_api.models.collection_title import CollectionTitle # noqa: F401,E501 - class CollectionModification(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'title': 'CollectionTitle' + openapi_types = { + 'title': 'str' } attribute_map = { @@ -41,7 +40,7 @@ class CollectionModification(object): } def __init__(self, title=None): # noqa: E501 - """CollectionModification - a model defined in Swagger""" # noqa: E501 + """CollectionModification - a model defined in OpenAPI""" # noqa: E501 self._title = None self.discriminator = None @@ -53,9 +52,10 @@ def __init__(self, title=None): # noqa: E501 def title(self): """Gets the title of this CollectionModification. # noqa: E501 + The title of the collection # noqa: E501 :return: The title of this CollectionModification. # noqa: E501 - :rtype: CollectionTitle + :rtype: str """ return self._title @@ -63,10 +63,15 @@ def title(self): def title(self, title): """Sets the title of this CollectionModification. + The title of the collection # noqa: E501 :param title: The title of this CollectionModification. # noqa: E501 - :type: CollectionTitle + :type: str """ + if title is not None and len(title) > 300: + raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 + if title is not None and len(title) < 1: + raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -74,7 +79,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index 79bd033..476cc29 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class CollectionPrivacy(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -30,26 +31,26 @@ class CollectionPrivacy(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """CollectionPrivacy - a model defined in Swagger""" # noqa: E501 + """CollectionPrivacy - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index bf62e08..6865583 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class CollectionType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -34,26 +35,26 @@ class CollectionType(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """CollectionType - a model defined in Swagger""" # noqa: E501 + """CollectionType - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index 4224dc1..43aede1 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class FlatErrorResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'code': 'str', 'message': 'str', 'id': 'str', @@ -45,7 +46,7 @@ class FlatErrorResponse(object): } def __init__(self, code=None, message=None, id=None, param=None): # noqa: E501 - """FlatErrorResponse - a model defined in Swagger""" # noqa: E501 + """FlatErrorResponse - a model defined in OpenAPI""" # noqa: E501 self._code = None self._message = None @@ -158,7 +159,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py index b7cb2de..e5f7080 100644 --- a/flat_api/models/flat_locales.py +++ b/flat_api/models/flat_locales.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class FlatLocales(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -29,33 +30,39 @@ class FlatLocales(object): EN = "en" ES = "es" FR = "fr" + DE = "de" IT = "it" + JA = "ja" + KO = "ko" + NL = "nl" PL = "pl" + PT = "pt" RO = "ro" - NL = "nl" + RU = "ru" + ZH_HANS = "zh-Hans" """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """FlatLocales - a model defined in Swagger""" # noqa: E501 + """FlatLocales - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index 6768b22..e753cbc 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class GoogleClassroomCoursework(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'state': 'str', 'alternate_link': 'str' @@ -43,7 +44,7 @@ class GoogleClassroomCoursework(object): } def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 - """GoogleClassroomCoursework - a model defined in Swagger""" # noqa: E501 + """GoogleClassroomCoursework - a model defined in OpenAPI""" # noqa: E501 self._id = None self._state = None @@ -130,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index 4004b34..ae71e96 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class GoogleClassroomSubmission(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'state': 'str', 'alternate_link': 'str' @@ -43,7 +44,7 @@ class GoogleClassroomSubmission(object): } def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 - """GoogleClassroomSubmission - a model defined in Swagger""" # noqa: E501 + """GoogleClassroomSubmission - a model defined in OpenAPI""" # noqa: E501 self._id = None self._state = None @@ -130,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/group.py b/flat_api/models/group.py index 273d420..158f690 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class Group(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'name': 'str', 'type': 'str', @@ -51,7 +52,7 @@ class Group(object): } def __init__(self, id=None, name=None, type=None, users_count=None, read_only=None, organization=None, creation_date=None): # noqa: E501 - """Group - a model defined in Swagger""" # noqa: E501 + """Group - a model defined in OpenAPI""" # noqa: E501 self._id = None self._name = None @@ -248,7 +249,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index 191f9c8..41864e0 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.group_type import GroupType # noqa: F401,E501 - class GroupDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'name': 'str', 'type': 'GroupType', @@ -53,7 +52,7 @@ class GroupDetails(object): } def __init__(self, id=None, name=None, type=None, organization=None, creation_date=None, users_count=None, read_only=None): # noqa: E501 - """GroupDetails - a model defined in Swagger""" # noqa: E501 + """GroupDetails - a model defined in OpenAPI""" # noqa: E501 self._id = None self._name = None @@ -242,7 +241,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index fe5e0d2..fa0779d 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class GroupType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,26 +33,26 @@ class GroupType(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """GroupType - a model defined in Swagger""" # noqa: E501 + """GroupType - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index 0cd6d3b..b34978e 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class LicenseMode(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -31,26 +32,26 @@ class LicenseMode(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """LicenseMode - a model defined in Swagger""" # noqa: E501 + """LicenseMode - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index 201687b..b165cc7 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class LicenseSources(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -34,26 +35,26 @@ class LicenseSources(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """LicenseSources - a model defined in Swagger""" # noqa: E501 + """LicenseSources - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index 36cb336..ea2012d 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class LmsName(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,30 +33,31 @@ class LmsName(object): BLACKBOARD = "blackboard" DESIRE2LEARN = "desire2learn" SAKAI = "sakai" + SCHOOLBOX = "schoolbox" OTHER = "other" """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """LmsName - a model defined in Swagger""" # noqa: E501 + """LmsName - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index 5661a1c..230c5ef 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.lms_name import LmsName # noqa: F401,E501 - class LtiCredentials(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'name': 'str', 'lms': 'LmsName', @@ -57,7 +56,7 @@ class LtiCredentials(object): } def __init__(self, id=None, name=None, lms=None, organization=None, creator=None, creation_date=None, last_usage=None, consumer_key=None, consumer_secret=None): # noqa: E501 - """LtiCredentials - a model defined in Swagger""" # noqa: E501 + """LtiCredentials - a model defined in OpenAPI""" # noqa: E501 self._id = None self._name = None @@ -298,7 +297,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index 6f11b79..e891818 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.lms_name import LmsName # noqa: F401,E501 - class LtiCredentialsCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'name': 'str', 'lms': 'LmsName' } @@ -43,7 +42,7 @@ class LtiCredentialsCreation(object): } def __init__(self, name=None, lms=None): # noqa: E501 - """LtiCredentialsCreation - a model defined in Swagger""" # noqa: E501 + """LtiCredentialsCreation - a model defined in OpenAPI""" # noqa: E501 self._name = None self._lms = None @@ -106,7 +105,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index 76f3b96..9a99331 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode # noqa: F401,E501 - class MediaAttachment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'type': 'str', 'score': 'str', 'revision': 'str', @@ -71,7 +70,7 @@ class MediaAttachment(object): } def __init__(self, type=None, score=None, revision=None, correct=None, sharing_mode=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None): # noqa: E501 - """MediaAttachment - a model defined in Swagger""" # noqa: E501 + """MediaAttachment - a model defined in OpenAPI""" # noqa: E501 self._type = None self._score = None @@ -500,7 +499,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index 0e183ce..1e827f9 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class MediaScoreSharingMode(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,26 +33,26 @@ class MediaScoreSharingMode(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """MediaScoreSharingMode - a model defined in Swagger""" # noqa: E501 + """MediaScoreSharingMode - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index 1384a92..0002e84 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 - class OrganizationInvitation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'organization': 'str', 'organization_role': 'OrganizationRoles', @@ -53,7 +52,7 @@ class OrganizationInvitation(object): } def __init__(self, id=None, organization=None, organization_role=None, custom_code=None, email=None, invited_by=None, used_by=None): # noqa: E501 - """OrganizationInvitation - a model defined in Swagger""" # noqa: E501 + """OrganizationInvitation - a model defined in OpenAPI""" # noqa: E501 self._id = None self._organization = None @@ -242,7 +241,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index 60e6d44..d69a2f0 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 - class OrganizationInvitationCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'email': 'str', 'organization_role': 'OrganizationRoles' } @@ -43,7 +42,7 @@ class OrganizationInvitationCreation(object): } def __init__(self, email=None, organization_role=None): # noqa: E501 - """OrganizationInvitationCreation - a model defined in Swagger""" # noqa: E501 + """OrganizationInvitationCreation - a model defined in OpenAPI""" # noqa: E501 self._email = None self._organization_role = None @@ -102,7 +101,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index 6dfab5d..ef2d009 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class OrganizationRoles(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -33,26 +34,26 @@ class OrganizationRoles(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """OrganizationRoles - a model defined in Swagger""" # noqa: E501 + """OrganizationRoles - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index f224346..e552b8b 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,28 +16,22 @@ import six -from flat_api.models.group import Group # noqa: F401,E501 -from flat_api.models.resource_rights import ResourceRights # noqa: F401,E501 -from flat_api.models.user_public import UserPublic # noqa: F401,E501 - class ResourceCollaborator(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'acl_read': 'bool', - 'acl_write': 'bool', - 'acl_admin': 'bool', + openapi_types = { 'id': 'str', 'score': 'str', 'collection': 'str', @@ -47,9 +41,6 @@ class ResourceCollaborator(object): } attribute_map = { - 'acl_read': 'aclRead', - 'acl_write': 'aclWrite', - 'acl_admin': 'aclAdmin', 'id': 'id', 'score': 'score', 'collection': 'collection', @@ -58,12 +49,9 @@ class ResourceCollaborator(object): 'user_email': 'userEmail' } - def __init__(self, acl_read=False, acl_write=False, acl_admin=False, id=None, score=None, collection=None, user=None, group=None, user_email=None): # noqa: E501 - """ResourceCollaborator - a model defined in Swagger""" # noqa: E501 + def __init__(self, id=None, score=None, collection=None, user=None, group=None, user_email=None): # noqa: E501 + """ResourceCollaborator - a model defined in OpenAPI""" # noqa: E501 - self._acl_read = None - self._acl_write = None - self._acl_admin = None self._id = None self._score = None self._collection = None @@ -72,12 +60,6 @@ def __init__(self, acl_read=False, acl_write=False, acl_admin=False, id=None, sc self._user_email = None self.discriminator = None - if acl_read is not None: - self.acl_read = acl_read - if acl_write is not None: - self.acl_write = acl_write - if acl_admin is not None: - self.acl_admin = acl_admin if id is not None: self.id = id if score is not None: @@ -91,75 +73,6 @@ def __init__(self, acl_read=False, acl_write=False, acl_admin=False, id=None, sc if user_email is not None: self.user_email = user_email - @property - def acl_read(self): - """Gets the acl_read of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can read the current document # noqa: E501 - - :return: The acl_read of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_read - - @acl_read.setter - def acl_read(self, acl_read): - """Sets the acl_read of this ResourceCollaborator. - - `True` if the current user can read the current document # noqa: E501 - - :param acl_read: The acl_read of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_read = acl_read - - @property - def acl_write(self): - """Gets the acl_write of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_write of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_write - - @acl_write.setter - def acl_write(self, acl_write): - """Sets the acl_write of this ResourceCollaborator. - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_write: The acl_write of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_write = acl_write - - @property - def acl_admin(self): - """Gets the acl_admin of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_admin of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_admin - - @acl_admin.setter - def acl_admin(self, acl_admin): - """Sets the acl_admin of this ResourceCollaborator. - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_admin: The acl_admin of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_admin = acl_admin - @property def id(self): """Gets the id of this ResourceCollaborator. # noqa: E501 @@ -298,7 +211,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index 3eed969..109255c 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ResourceCollaboratorCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'user': 'str', 'group': 'str', 'user_email': 'str', @@ -51,7 +52,7 @@ class ResourceCollaboratorCreation(object): } def __init__(self, user=None, group=None, user_email=None, user_token=None, acl_read=True, acl_write=False, acl_admin=False): # noqa: E501 - """ResourceCollaboratorCreation - a model defined in Swagger""" # noqa: E501 + """ResourceCollaboratorCreation - a model defined in OpenAPI""" # noqa: E501 self._user = None self._group = None @@ -242,7 +243,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index d7fe87a..3898e15 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,36 +18,40 @@ class ResourceRights(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'acl_read': 'bool', 'acl_write': 'bool', - 'acl_admin': 'bool' + 'acl_admin': 'bool', + 'is_collaborator': 'bool' } attribute_map = { 'acl_read': 'aclRead', 'acl_write': 'aclWrite', - 'acl_admin': 'aclAdmin' + 'acl_admin': 'aclAdmin', + 'is_collaborator': 'isCollaborator' } - def __init__(self, acl_read=False, acl_write=False, acl_admin=False): # noqa: E501 - """ResourceRights - a model defined in Swagger""" # noqa: E501 + def __init__(self, acl_read=False, acl_write=False, acl_admin=False, is_collaborator=False): # noqa: E501 + """ResourceRights - a model defined in OpenAPI""" # noqa: E501 self._acl_read = None self._acl_write = None self._acl_admin = None + self._is_collaborator = None self.discriminator = None if acl_read is not None: @@ -56,6 +60,8 @@ def __init__(self, acl_read=False, acl_write=False, acl_admin=False): # noqa: E self.acl_write = acl_write if acl_admin is not None: self.acl_admin = acl_admin + if is_collaborator is not None: + self.is_collaborator = is_collaborator @property def acl_read(self): @@ -126,11 +132,34 @@ def acl_admin(self, acl_admin): self._acl_admin = acl_admin + @property + def is_collaborator(self): + """Gets the is_collaborator of this ResourceRights. # noqa: E501 + + `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 + + :return: The is_collaborator of this ResourceRights. # noqa: E501 + :rtype: bool + """ + return self._is_collaborator + + @is_collaborator.setter + def is_collaborator(self, is_collaborator): + """Sets the is_collaborator of this ResourceRights. + + `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 + + :param is_collaborator: The is_collaborator of this ResourceRights. # noqa: E501 + :type: bool + """ + + self._is_collaborator = is_collaborator + def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index 667fb57..900f23c 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.score_comment_context import ScoreCommentContext # noqa: F401,E501 - class ScoreComment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'type': 'str', 'user': 'str', @@ -69,7 +68,7 @@ class ScoreComment(object): } def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, spam=None): # noqa: E501 - """ScoreComment - a model defined in Swagger""" # noqa: E501 + """ScoreComment - a model defined in OpenAPI""" # noqa: E501 self._id = None self._type = None @@ -472,7 +471,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index 5a16971..4035fd2 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,21 +18,23 @@ class ScoreCommentContext(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'part_uuid': 'str', 'staff_idx': 'float', + 'staff_uuid': 'str', 'measure_uuids': 'list[str]', 'start_time_pos': 'float', 'stop_time_pos': 'float', @@ -43,6 +45,7 @@ class ScoreCommentContext(object): attribute_map = { 'part_uuid': 'partUuid', 'staff_idx': 'staffIdx', + 'staff_uuid': 'staffUuid', 'measure_uuids': 'measureUuids', 'start_time_pos': 'startTimePos', 'stop_time_pos': 'stopTimePos', @@ -50,11 +53,12 @@ class ScoreCommentContext(object): 'stop_dpq': 'stopDpq' } - def __init__(self, part_uuid=None, staff_idx=None, measure_uuids=None, start_time_pos=None, stop_time_pos=None, start_dpq=None, stop_dpq=None): # noqa: E501 - """ScoreCommentContext - a model defined in Swagger""" # noqa: E501 + def __init__(self, part_uuid=None, staff_idx=None, staff_uuid=None, measure_uuids=None, start_time_pos=None, stop_time_pos=None, start_dpq=None, stop_dpq=None): # noqa: E501 + """ScoreCommentContext - a model defined in OpenAPI""" # noqa: E501 self._part_uuid = None self._staff_idx = None + self._staff_uuid = None self._measure_uuids = None self._start_time_pos = None self._stop_time_pos = None @@ -63,7 +67,10 @@ def __init__(self, part_uuid=None, staff_idx=None, measure_uuids=None, start_tim self.discriminator = None self.part_uuid = part_uuid - self.staff_idx = staff_idx + if staff_idx is not None: + self.staff_idx = staff_idx + if staff_uuid is not None: + self.staff_uuid = staff_uuid self.measure_uuids = measure_uuids self.start_time_pos = start_time_pos self.stop_time_pos = stop_time_pos @@ -99,7 +106,7 @@ def part_uuid(self, part_uuid): def staff_idx(self): """Gets the staff_idx of this ScoreCommentContext. # noqa: E501 - The identififer of the staff # noqa: E501 + (Deprecated, use `staffUuid`) The identififer of the staff # noqa: E501 :return: The staff_idx of this ScoreCommentContext. # noqa: E501 :rtype: float @@ -110,16 +117,37 @@ def staff_idx(self): def staff_idx(self, staff_idx): """Sets the staff_idx of this ScoreCommentContext. - The identififer of the staff # noqa: E501 + (Deprecated, use `staffUuid`) The identififer of the staff # noqa: E501 :param staff_idx: The staff_idx of this ScoreCommentContext. # noqa: E501 :type: float """ - if staff_idx is None: - raise ValueError("Invalid value for `staff_idx`, must not be `None`") # noqa: E501 self._staff_idx = staff_idx + @property + def staff_uuid(self): + """Gets the staff_uuid of this ScoreCommentContext. # noqa: E501 + + The unique identififer (UUID) of the staff # noqa: E501 + + :return: The staff_uuid of this ScoreCommentContext. # noqa: E501 + :rtype: str + """ + return self._staff_uuid + + @staff_uuid.setter + def staff_uuid(self, staff_uuid): + """Sets the staff_uuid of this ScoreCommentContext. + + The unique identififer (UUID) of the staff # noqa: E501 + + :param staff_uuid: The staff_uuid of this ScoreCommentContext. # noqa: E501 + :type: str + """ + + self._staff_uuid = staff_uuid + @property def measure_uuids(self): """Gets the measure_uuids of this ScoreCommentContext. # noqa: E501 @@ -241,7 +269,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index 63bffdb..2186978 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.score_comment_context import ScoreCommentContext # noqa: F401,E501 - class ScoreCommentCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'revision': 'str', 'comment': 'str', 'raw_comment': 'str', @@ -51,7 +50,7 @@ class ScoreCommentCreation(object): } def __init__(self, revision=None, comment=None, raw_comment=None, mentions=None, reply_to=None, context=None): # noqa: E501 - """ScoreCommentCreation - a model defined in Swagger""" # noqa: E501 + """ScoreCommentCreation - a model defined in OpenAPI""" # noqa: E501 self._revision = None self._comment = None @@ -215,7 +214,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index f2fc51a..37e364d 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.score_comment_context import ScoreCommentContext # noqa: F401,E501 - class ScoreCommentUpdate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'revision': 'str', 'comment': 'str', 'raw_comment': 'str', @@ -47,7 +46,7 @@ class ScoreCommentUpdate(object): } def __init__(self, revision=None, comment=None, raw_comment=None, context=None): # noqa: E501 - """ScoreCommentUpdate - a model defined in Swagger""" # noqa: E501 + """ScoreCommentUpdate - a model defined in OpenAPI""" # noqa: E501 self._revision = None self._comment = None @@ -166,7 +165,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index e0bc2f3..9f9c6c9 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreCommentsCounts(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'total': 'float', 'unique': 'float', 'weekly': 'float', @@ -45,7 +46,7 @@ class ScoreCommentsCounts(object): } def __init__(self, total=None, unique=None, weekly=None, monthly=None): # noqa: E501 - """ScoreCommentsCounts - a model defined in Swagger""" # noqa: E501 + """ScoreCommentsCounts - a model defined in OpenAPI""" # noqa: E501 self._total = None self._unique = None @@ -158,7 +159,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index 22c6d88..52d8918 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,29 +16,26 @@ import six -from flat_api.models.score_data import ScoreData # noqa: F401,E501 -from flat_api.models.score_data_encoding import ScoreDataEncoding # noqa: F401,E501 -from flat_api.models.score_privacy import ScorePrivacy # noqa: F401,E501 -from flat_api.models.score_source import ScoreSource # noqa: F401,E501 - class ScoreCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'title': 'str', + 'filename': 'str', 'privacy': 'ScorePrivacy', - 'data': 'ScoreData', + 'data': 'str', 'data_encoding': 'ScoreDataEncoding', 'source': 'ScoreSource', 'collection': 'str', @@ -47,6 +44,7 @@ class ScoreCreation(object): attribute_map = { 'title': 'title', + 'filename': 'filename', 'privacy': 'privacy', 'data': 'data', 'data_encoding': 'dataEncoding', @@ -55,10 +53,11 @@ class ScoreCreation(object): 'google_drive_folder': 'googleDriveFolder' } - def __init__(self, title=None, privacy=None, data=None, data_encoding=None, source=None, collection=None, google_drive_folder=None): # noqa: E501 - """ScoreCreation - a model defined in Swagger""" # noqa: E501 + def __init__(self, title=None, filename=None, privacy=None, data=None, data_encoding=None, source=None, collection=None, google_drive_folder=None): # noqa: E501 + """ScoreCreation - a model defined in OpenAPI""" # noqa: E501 self._title = None + self._filename = None self._privacy = None self._data = None self._data_encoding = None @@ -69,6 +68,8 @@ def __init__(self, title=None, privacy=None, data=None, data_encoding=None, sour if title is not None: self.title = title + if filename is not None: + self.filename = filename self.privacy = privacy if data is not None: self.data = data @@ -85,7 +86,7 @@ def __init__(self, title=None, privacy=None, data=None, data_encoding=None, sour def title(self): """Gets the title of this ScoreCreation. # noqa: E501 - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the name of the file for files from a specified `source` (e.g. Google Drive) - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Set a default title (e.g. \"New Music Score\") # noqa: E501 + The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 :return: The title of this ScoreCreation. # noqa: E501 :rtype: str @@ -96,7 +97,7 @@ def title(self): def title(self, title): """Sets the title of this ScoreCreation. - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the name of the file for files from a specified `source` (e.g. Google Drive) - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Set a default title (e.g. \"New Music Score\") # noqa: E501 + The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 :param title: The title of this ScoreCreation. # noqa: E501 :type: str @@ -104,6 +105,29 @@ def title(self, title): self._title = title + @property + def filename(self): + """Gets the filename of this ScoreCreation. # noqa: E501 + + If this is an imported file, its filename # noqa: E501 + + :return: The filename of this ScoreCreation. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this ScoreCreation. + + If this is an imported file, its filename # noqa: E501 + + :param filename: The filename of this ScoreCreation. # noqa: E501 + :type: str + """ + + self._filename = filename + @property def privacy(self): """Gets the privacy of this ScoreCreation. # noqa: E501 @@ -131,9 +155,10 @@ def privacy(self, privacy): def data(self): """Gets the data of this ScoreCreation. # noqa: E501 + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :return: The data of this ScoreCreation. # noqa: E501 - :rtype: ScoreData + :rtype: str """ return self._data @@ -141,9 +166,10 @@ def data(self): def data(self, data): """Sets the data of this ScoreCreation. + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :param data: The data of this ScoreCreation. # noqa: E501 - :type: ScoreData + :type: str """ self._data = data @@ -240,7 +266,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index bb3c2eb..698e3d0 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScoreCreationType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,26 +33,26 @@ class ScoreCreationType(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScoreCreationType - a model defined in Swagger""" # noqa: E501 + """ScoreCreationType - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_data_encoding.py b/flat_api/models/score_data_encoding.py index ea9de9c..dd5d7ab 100644 --- a/flat_api/models/score_data_encoding.py +++ b/flat_api/models/score_data_encoding.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScoreDataEncoding(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -30,26 +31,26 @@ class ScoreDataEncoding(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScoreDataEncoding - a model defined in Swagger""" # noqa: E501 + """ScoreDataEncoding - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index a73d082..f523e55 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,38 +16,22 @@ import six -from flat_api.models.resource_collaborator import ResourceCollaborator # noqa: F401,E501 -from flat_api.models.resource_rights import ResourceRights # noqa: F401,E501 -from flat_api.models.score_comments_counts import ScoreCommentsCounts # noqa: F401,E501 -from flat_api.models.score_creation_type import ScoreCreationType # noqa: F401,E501 -from flat_api.models.score_license import ScoreLicense # noqa: F401,E501 -from flat_api.models.score_likes_counts import ScoreLikesCounts # noqa: F401,E501 -from flat_api.models.score_privacy import ScorePrivacy # noqa: F401,E501 -from flat_api.models.score_summary import ScoreSummary # noqa: F401,E501 -from flat_api.models.score_views_counts import ScoreViewsCounts # noqa: F401,E501 -from flat_api.models.user_public_summary import UserPublicSummary # noqa: F401,E501 - class ScoreDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'id': 'str', - 'sharing_key': 'str', - 'title': 'str', - 'privacy': 'ScorePrivacy', - 'user': 'UserPublicSummary', - 'html_url': 'str', + openapi_types = { 'subtitle': 'str', 'lyricist': 'str', 'composer': 'str', @@ -70,16 +54,11 @@ class ScoreDetails(object): 'google_drive_file_id': 'str', 'likes': 'ScoreLikesCounts', 'comments': 'ScoreCommentsCounts', - 'views': 'ScoreViewsCounts' + 'views': 'ScoreViewsCounts', + 'collections': 'list[str]' } attribute_map = { - 'id': 'id', - 'sharing_key': 'sharingKey', - 'title': 'title', - 'privacy': 'privacy', - 'user': 'user', - 'html_url': 'htmlUrl', 'subtitle': 'subtitle', 'lyricist': 'lyricist', 'composer': 'composer', @@ -102,18 +81,13 @@ class ScoreDetails(object): 'google_drive_file_id': 'googleDriveFileId', 'likes': 'likes', 'comments': 'comments', - 'views': 'views' + 'views': 'views', + 'collections': 'collections' } - def __init__(self, id=None, sharing_key=None, title=None, privacy=None, user=None, html_url=None, subtitle=None, lyricist=None, composer=None, description=None, tags=None, creation_type=None, license=None, license_text=None, duration_time=None, number_measures=None, main_tempo_qpm=None, rights=None, collaborators=None, creation_date=None, modification_date=None, publication_date=None, organization=None, parent_score=None, instruments=None, google_drive_file_id=None, likes=None, comments=None, views=None): # noqa: E501 - """ScoreDetails - a model defined in Swagger""" # noqa: E501 + def __init__(self, subtitle=None, lyricist=None, composer=None, description=None, tags=None, creation_type=None, license=None, license_text=None, duration_time=None, number_measures=None, main_tempo_qpm=None, rights=None, collaborators=None, creation_date=None, modification_date=None, publication_date=None, organization=None, parent_score=None, instruments=None, google_drive_file_id=None, likes=None, comments=None, views=None, collections=None): # noqa: E501 + """ScoreDetails - a model defined in OpenAPI""" # noqa: E501 - self._id = None - self._sharing_key = None - self._title = None - self._privacy = None - self._user = None - self._html_url = None self._subtitle = None self._lyricist = None self._composer = None @@ -137,20 +111,9 @@ def __init__(self, id=None, sharing_key=None, title=None, privacy=None, user=Non self._likes = None self._comments = None self._views = None + self._collections = None self.discriminator = None - if id is not None: - self.id = id - if sharing_key is not None: - self.sharing_key = sharing_key - if title is not None: - self.title = title - if privacy is not None: - self.privacy = privacy - if user is not None: - self.user = user - if html_url is not None: - self.html_url = html_url if subtitle is not None: self.subtitle = subtitle if lyricist is not None: @@ -197,140 +160,8 @@ def __init__(self, id=None, sharing_key=None, title=None, privacy=None, user=Non self.comments = comments if views is not None: self.views = views - - @property - def id(self): - """Gets the id of this ScoreDetails. # noqa: E501 - - The unique identifier of the score # noqa: E501 - - :return: The id of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreDetails. - - The unique identifier of the score # noqa: E501 - - :param id: The id of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def sharing_key(self): - """Gets the sharing_key of this ScoreDetails. # noqa: E501 - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :return: The sharing_key of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._sharing_key - - @sharing_key.setter - def sharing_key(self, sharing_key): - """Sets the sharing_key of this ScoreDetails. - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :param sharing_key: The sharing_key of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._sharing_key = sharing_key - - @property - def title(self): - """Gets the title of this ScoreDetails. # noqa: E501 - - The title of the score # noqa: E501 - - :return: The title of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreDetails. - - The title of the score # noqa: E501 - - :param title: The title of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def privacy(self): - """Gets the privacy of this ScoreDetails. # noqa: E501 - - - :return: The privacy of this ScoreDetails. # noqa: E501 - :rtype: ScorePrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this ScoreDetails. - - - :param privacy: The privacy of this ScoreDetails. # noqa: E501 - :type: ScorePrivacy - """ - - self._privacy = privacy - - @property - def user(self): - """Gets the user of this ScoreDetails. # noqa: E501 - - - :return: The user of this ScoreDetails. # noqa: E501 - :rtype: UserPublicSummary - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ScoreDetails. - - - :param user: The user of this ScoreDetails. # noqa: E501 - :type: UserPublicSummary - """ - - self._user = user - - @property - def html_url(self): - """Gets the html_url of this ScoreDetails. # noqa: E501 - - The url where the score can be viewed in a web browser # noqa: E501 - - :return: The html_url of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this ScoreDetails. - - The url where the score can be viewed in a web browser # noqa: E501 - - :param html_url: The html_url of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._html_url = html_url + if collections is not None: + self.collections = collections @property def subtitle(self): @@ -849,11 +680,34 @@ def views(self, views): self._views = views + @property + def collections(self): + """Gets the collections of this ScoreDetails. # noqa: E501 + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :return: The collections of this ScoreDetails. # noqa: E501 + :rtype: list[str] + """ + return self._collections + + @collections.setter + def collections(self, collections): + """Sets the collections of this ScoreDetails. + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :param collections: The collections of this ScoreDetails. # noqa: E501 + :type: list[str] + """ + + self._collections = collections + def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index 285c004..6ce69f6 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreFork(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'collection': 'str' } @@ -39,7 +40,7 @@ class ScoreFork(object): } def __init__(self, collection=None): # noqa: E501 - """ScoreFork - a model defined in Swagger""" # noqa: E501 + """ScoreFork - a model defined in OpenAPI""" # noqa: E501 self._collection = None self.discriminator = None @@ -74,7 +75,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index 4f3cb16..c672347 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScoreLicense(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -37,26 +38,26 @@ class ScoreLicense(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScoreLicense - a model defined in Swagger""" # noqa: E501 + """ScoreLicense - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index 107d2fb..63ebe82 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreLikesCounts(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'total': 'float', 'weekly': 'float', 'monthly': 'float' @@ -43,7 +44,7 @@ class ScoreLikesCounts(object): } def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 - """ScoreLikesCounts - a model defined in Swagger""" # noqa: E501 + """ScoreLikesCounts - a model defined in OpenAPI""" # noqa: E501 self._total = None self._weekly = None @@ -130,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 99d1185..6b110ac 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,29 +16,25 @@ import six -from flat_api.models.resource_sharing_key import ResourceSharingKey # noqa: F401,E501 -from flat_api.models.score_creation_type import ScoreCreationType # noqa: F401,E501 -from flat_api.models.score_license import ScoreLicense # noqa: F401,E501 -from flat_api.models.score_privacy import ScorePrivacy # noqa: F401,E501 - class ScoreModification(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'title': 'str', 'privacy': 'ScorePrivacy', - 'sharing_key': 'ResourceSharingKey', + 'sharing_key': 'str', 'description': 'str', 'tags': 'list[str]', 'creation_type': 'ScoreCreationType', @@ -56,7 +52,7 @@ class ScoreModification(object): } def __init__(self, title=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None): # noqa: E501 - """ScoreModification - a model defined in Swagger""" # noqa: E501 + """ScoreModification - a model defined in OpenAPI""" # noqa: E501 self._title = None self._privacy = None @@ -130,9 +126,10 @@ def privacy(self, privacy): def sharing_key(self): """Gets the sharing_key of this ScoreModification. # noqa: E501 + When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. # noqa: E501 :return: The sharing_key of this ScoreModification. # noqa: E501 - :rtype: ResourceSharingKey + :rtype: str """ return self._sharing_key @@ -140,10 +137,13 @@ def sharing_key(self): def sharing_key(self, sharing_key): """Sets the sharing_key of this ScoreModification. + When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. # noqa: E501 :param sharing_key: The sharing_key of this ScoreModification. # noqa: E501 - :type: ResourceSharingKey + :type: str """ + if sharing_key is not None and not re.search('^[a-f0-9]{128}$', sharing_key): # noqa: E501 + raise ValueError("Invalid value for `sharing_key`, must be a follow pattern or equal to `/^[a-f0-9]{128}$/`") # noqa: E501 self._sharing_key = sharing_key @@ -241,7 +241,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index 3b0cfd0..8cf12a0 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScorePrivacy(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -33,26 +34,26 @@ class ScorePrivacy(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScorePrivacy - a model defined in Swagger""" # noqa: E501 + """ScorePrivacy - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index 058bd42..2892e2a 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics # noqa: F401,E501 - class ScoreRevision(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'user': 'str', 'collaborators': 'list[str]', @@ -53,7 +52,7 @@ class ScoreRevision(object): } def __init__(self, id=None, user=None, collaborators=None, creation_date=None, description=None, autosave=None, statistics=None): # noqa: E501 - """ScoreRevision - a model defined in Swagger""" # noqa: E501 + """ScoreRevision - a model defined in OpenAPI""" # noqa: E501 self._id = None self._user = None @@ -240,7 +239,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index d377d2c..7e87bf7 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,23 @@ import six -from flat_api.models.score_data import ScoreData # noqa: F401,E501 -from flat_api.models.score_data_encoding import ScoreDataEncoding # noqa: F401,E501 - class ScoreRevisionCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - 'data': 'ScoreData', + openapi_types = { + 'data': 'str', 'data_encoding': 'ScoreDataEncoding', 'autosave': 'bool', 'description': 'str' @@ -48,7 +46,7 @@ class ScoreRevisionCreation(object): } def __init__(self, data=None, data_encoding=None, autosave=None, description=None): # noqa: E501 - """ScoreRevisionCreation - a model defined in Swagger""" # noqa: E501 + """ScoreRevisionCreation - a model defined in OpenAPI""" # noqa: E501 self._data = None self._data_encoding = None @@ -68,9 +66,10 @@ def __init__(self, data=None, data_encoding=None, autosave=None, description=Non def data(self): """Gets the data of this ScoreRevisionCreation. # noqa: E501 + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :return: The data of this ScoreRevisionCreation. # noqa: E501 - :rtype: ScoreData + :rtype: str """ return self._data @@ -78,9 +77,10 @@ def data(self): def data(self, data): """Sets the data of this ScoreRevisionCreation. + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :param data: The data of this ScoreRevisionCreation. # noqa: E501 - :type: ScoreData + :type: str """ if data is None: raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 @@ -158,7 +158,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index a492345..b2a6411 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreRevisionStatistics(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'additions': 'float', 'deletions': 'float' } @@ -41,7 +42,7 @@ class ScoreRevisionStatistics(object): } def __init__(self, additions=None, deletions=None): # noqa: E501 - """ScoreRevisionStatistics - a model defined in Swagger""" # noqa: E501 + """ScoreRevisionStatistics - a model defined in OpenAPI""" # noqa: E501 self._additions = None self._deletions = None @@ -102,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index 295b040..e321c74 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreSource(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'google_drive': 'str' } @@ -39,7 +40,7 @@ class ScoreSource(object): } def __init__(self, google_drive=None): # noqa: E501 - """ScoreSource - a model defined in Swagger""" # noqa: E501 + """ScoreSource - a model defined in OpenAPI""" # noqa: E501 self._google_drive = None self.discriminator = None @@ -74,7 +75,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_summary.py b/flat_api/models/score_summary.py index b3774e8..600adb2 100644 --- a/flat_api/models/score_summary.py +++ b/flat_api/models/score_summary.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import six -from flat_api.models.score_privacy import ScorePrivacy # noqa: F401,E501 -from flat_api.models.user_public_summary import UserPublicSummary # noqa: F401,E501 - class ScoreSummary(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'sharing_key': 'str', 'title': 'str', @@ -52,7 +50,7 @@ class ScoreSummary(object): } def __init__(self, id=None, sharing_key=None, title=None, privacy=None, user=None, html_url=None): # noqa: E501 - """ScoreSummary - a model defined in Swagger""" # noqa: E501 + """ScoreSummary - a model defined in OpenAPI""" # noqa: E501 self._id = None self._sharing_key = None @@ -213,7 +211,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index b5113e5..9263b18 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,22 @@ import six -from flat_api.models.score_track_point import ScoreTrackPoint # noqa: F401,E501 -from flat_api.models.score_track_state import ScoreTrackState # noqa: F401,E501 -from flat_api.models.score_track_type import ScoreTrackType # noqa: F401,E501 - class ScoreTrack(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'title': 'str', 'score': 'str', @@ -65,7 +62,7 @@ class ScoreTrack(object): } def __init__(self, id=None, title=None, score=None, creator=None, creation_date=None, modification_date=None, default=None, state=None, type=None, url=None, media_id=None, synchronization_points=None): # noqa: E501 - """ScoreTrack - a model defined in Swagger""" # noqa: E501 + """ScoreTrack - a model defined in OpenAPI""" # noqa: E501 self._id = None self._title = None @@ -380,7 +377,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index 3606cb7..fecc6e3 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import six -from flat_api.models.score_track_point import ScoreTrackPoint # noqa: F401,E501 -from flat_api.models.score_track_state import ScoreTrackState # noqa: F401,E501 - class ScoreTrackCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'title': 'str', 'default': 'bool', 'state': 'ScoreTrackState', @@ -50,7 +48,7 @@ class ScoreTrackCreation(object): } def __init__(self, title=None, default=None, state=None, url=None, synchronization_points=None): # noqa: E501 - """ScoreTrackCreation - a model defined in Swagger""" # noqa: E501 + """ScoreTrackCreation - a model defined in OpenAPI""" # noqa: E501 self._title = None self._default = None @@ -185,7 +183,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index 538e1e5..42c1c78 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreTrackPoint(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'type': 'str', 'measure_uuid': 'str', 'time': 'float' @@ -43,7 +44,7 @@ class ScoreTrackPoint(object): } def __init__(self, type=None, measure_uuid=None, time=None): # noqa: E501 - """ScoreTrackPoint - a model defined in Swagger""" # noqa: E501 + """ScoreTrackPoint - a model defined in OpenAPI""" # noqa: E501 self._type = None self._measure_uuid = None @@ -138,7 +139,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index 7faf2f6..3511647 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScoreTrackState(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -32,26 +33,26 @@ class ScoreTrackState(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScoreTrackState - a model defined in Swagger""" # noqa: E501 + """ScoreTrackState - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index 9953730..20b45ed 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +18,8 @@ class ScoreTrackType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -33,26 +34,26 @@ class ScoreTrackType(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """ScoreTrackType - a model defined in Swagger""" # noqa: E501 + """ScoreTrackType - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index 27ed5d7..b0f4c1d 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import six -from flat_api.models.score_track_point import ScoreTrackPoint # noqa: F401,E501 -from flat_api.models.score_track_state import ScoreTrackState # noqa: F401,E501 - class ScoreTrackUpdate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'title': 'str', 'default': 'bool', 'state': 'ScoreTrackState', @@ -48,7 +46,7 @@ class ScoreTrackUpdate(object): } def __init__(self, title=None, default=None, state=None, synchronization_points=None): # noqa: E501 - """ScoreTrackUpdate - a model defined in Swagger""" # noqa: E501 + """ScoreTrackUpdate - a model defined in OpenAPI""" # noqa: E501 self._title = None self._default = None @@ -157,7 +155,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index 63e00e2..b225d11 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class ScoreViewsCounts(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'total': 'float', 'weekly': 'float', 'monthly': 'float' @@ -43,7 +44,7 @@ class ScoreViewsCounts(object): } def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 - """ScoreViewsCounts - a model defined in Swagger""" # noqa: E501 + """ScoreViewsCounts - a model defined in OpenAPI""" # noqa: E501 self._total = None self._weekly = None @@ -130,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index 3e650f9..744c702 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 - class UserAdminUpdate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'password': 'str', 'organization_role': 'OrganizationRoles' } @@ -43,7 +42,7 @@ class UserAdminUpdate(object): } def __init__(self, password=None, organization_role=None): # noqa: E501 - """UserAdminUpdate - a model defined in Swagger""" # noqa: E501 + """UserAdminUpdate - a model defined in OpenAPI""" # noqa: E501 self._password = None self._organization_role = None @@ -104,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_basics.py b/flat_api/models/user_basics.py index ba390fc..c61c97c 100644 --- a/flat_api/models/user_basics.py +++ b/flat_api/models/user_basics.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ class UserBasics(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'username': 'str', 'name': 'str', @@ -56,7 +57,7 @@ class UserBasics(object): } def __init__(self, id=None, username=None, name=None, printable_name=None, picture=None, is_power_user=None): # noqa: E501 - """UserBasics - a model defined in Swagger""" # noqa: E501 + """UserBasics - a model defined in OpenAPI""" # noqa: E501 self._id = None self._username = None @@ -219,14 +220,14 @@ def is_power_user(self, is_power_user): def get_real_child_model(self, data): """Returns the real base class specified by the discriminator""" - discriminator_value = data[self.discriminator].lower() + discriminator_value = data[self.discriminator] return self.discriminator_value_class_map.get(discriminator_value) def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index 5105c4f..c9cb38b 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import six -from flat_api.models.flat_locales import FlatLocales # noqa: F401,E501 - class UserCreation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'username': 'str', 'email': 'str', 'password': 'str', @@ -47,7 +46,7 @@ class UserCreation(object): } def __init__(self, username=None, email=None, password=None, locale=None): # noqa: E501 - """UserCreation - a model defined in Swagger""" # noqa: E501 + """UserCreation - a model defined in OpenAPI""" # noqa: E501 self._username = None self._email = None @@ -164,7 +163,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index acb3a90..f5a12b5 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,27 +16,22 @@ import six -from flat_api.models.class_roles import ClassRoles # noqa: F401,E501 -from flat_api.models.flat_locales import FlatLocales # noqa: F401,E501 -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 -from flat_api.models.user_instruments import UserInstruments # noqa: F401,E501 -from flat_api.models.user_public import UserPublic # noqa: F401,E501 - class UserDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'id': 'str', 'type': 'str', 'private_profile': 'bool', @@ -51,7 +46,7 @@ class UserDetails(object): } def __init__(self, id=None, type=None, private_profile=None, locale=None): # noqa: E501 - """UserDetails - a model defined in Swagger""" # noqa: E501 + """UserDetails - a model defined in OpenAPI""" # noqa: E501 self._id = None self._type = None @@ -168,7 +163,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index 39c8e6c..862d4f1 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,29 +16,25 @@ import six -from flat_api.models.class_roles import ClassRoles # noqa: F401,E501 -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense # noqa: F401,E501 -from flat_api.models.user_public_summary import UserPublicSummary # noqa: F401,E501 - class UserDetailsAdmin(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'email': 'str', 'last_activity_date': 'datetime', - 'license': 'UserDetailsAdminLicense' + 'license': 'object' } attribute_map = { @@ -48,7 +44,7 @@ class UserDetailsAdmin(object): } def __init__(self, email=None, last_activity_date=None, license=None): # noqa: E501 - """UserDetailsAdmin - a model defined in Swagger""" # noqa: E501 + """UserDetailsAdmin - a model defined in OpenAPI""" # noqa: E501 self._email = None self._last_activity_date = None @@ -112,9 +108,10 @@ def last_activity_date(self, last_activity_date): def license(self): """Gets the license of this UserDetailsAdmin. # noqa: E501 + Current active license of the user # noqa: E501 :return: The license of this UserDetailsAdmin. # noqa: E501 - :rtype: UserDetailsAdminLicense + :rtype: object """ return self._license @@ -122,9 +119,10 @@ def license(self): def license(self, license): """Sets the license of this UserDetailsAdmin. + Current active license of the user # noqa: E501 :param license: The license of this UserDetailsAdmin. # noqa: E501 - :type: UserDetailsAdminLicense + :type: object """ self._license = license @@ -133,7 +131,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_instruments.py b/flat_api/models/user_instruments.py index 605af6d..b4840d3 100644 --- a/flat_api/models/user_instruments.py +++ b/flat_api/models/user_instruments.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,33 +18,34 @@ class UserInstruments(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """UserInstruments - a model defined in Swagger""" # noqa: E501 + """UserInstruments - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index 77c4916..44df8f1 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,26 +16,22 @@ import six -from flat_api.models.class_roles import ClassRoles # noqa: F401,E501 -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 -from flat_api.models.user_instruments import UserInstruments # noqa: F401,E501 -from flat_api.models.user_public_summary import UserPublicSummary # noqa: F401,E501 - class UserPublic(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'bio': 'str', 'registration_date': 'datetime', 'liked_scores_count': 'int', @@ -58,7 +54,7 @@ class UserPublic(object): } def __init__(self, bio=None, registration_date=None, liked_scores_count=None, followers_count=None, following_count=None, owned_public_scores_count=None, profile_theme=None, instruments=None): # noqa: E501 - """UserPublic - a model defined in Swagger""" # noqa: E501 + """UserPublic - a model defined in OpenAPI""" # noqa: E501 self._bio = None self._registration_date = None @@ -273,7 +269,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index 4eb8430..9d83f40 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,22 @@ import six -from flat_api.models.class_roles import ClassRoles # noqa: F401,E501 -from flat_api.models.organization_roles import OrganizationRoles # noqa: F401,E501 -from flat_api.models.user_basics import UserBasics # noqa: F401,E501 - class UserPublicSummary(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'organization': 'str', 'organization_role': 'OrganizationRoles', 'class_role': 'ClassRoles', @@ -49,7 +46,7 @@ class UserPublicSummary(object): } def __init__(self, organization=None, organization_role=None, class_role=None, html_url=None): # noqa: E501 - """UserPublicSummary - a model defined in Swagger""" # noqa: E501 + """UserPublicSummary - a model defined in OpenAPI""" # noqa: E501 self._organization = None self._organization_role = None @@ -158,7 +155,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/flat_api/rest.py b/flat_api/rest.py index 61e162c..d4ffe56 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -27,7 +27,7 @@ try: import urllib3 except ImportError: - raise ImportError('Swagger python client requires urllib3.') + raise ImportError('OpenAPI Python client requires urllib3.') logger = logging.getLogger(__name__) From 11ff605c3ed0d3b5265d209d1b75e3b86e05ea68 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Tue, 11 Sep 2018 09:47:46 +0900 Subject: [PATCH 02/46] chore: bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d366947..67cf3c2 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from setuptools import setup, find_packages NAME = "flat_api" -VERSION = "0.6.0" +VERSION = "0.7.0" # To install the library, run the following # # python setup.py install From 898d1da77989b3e9075f0311b6a4d342a72e95ef Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Tue, 11 Sep 2018 15:14:24 +0900 Subject: [PATCH 03/46] update: remove old files --- docs/ClassStreamPostMode.md | 9 - docs/CollectionTitle.md | 9 - docs/ResourceSharingKey.md | 9 - docs/ScoreApi.md | 2 +- docs/ScoreCollaborator.md | 17 -- docs/ScoreCollaboratorCreation.md | 15 -- docs/ScoreData.md | 9 - docs/ScoreRights.md | 11 - docs/UserDetailsAdminLicense.md | 14 -- flat_api/__init__.py | 2 +- flat_api/api/account_api.py | 2 +- flat_api/api/class_api.py | 2 +- flat_api/api/collection_api.py | 2 +- flat_api/api/group_api.py | 2 +- flat_api/api/organization_api.py | 2 +- flat_api/api/score_api.py | 6 +- flat_api/api/user_api.py | 2 +- flat_api/api_client.py | 2 +- flat_api/configuration.py | 2 +- flat_api/models/__init__.py | 2 +- flat_api/models/assignment.py | 2 +- flat_api/models/assignment_copy.py | 2 +- flat_api/models/assignment_creation.py | 2 +- flat_api/models/assignment_submission.py | 2 +- .../models/assignment_submission_update.py | 2 +- flat_api/models/class_attachment_creation.py | 2 +- flat_api/models/class_creation.py | 2 +- flat_api/models/class_details.py | 2 +- flat_api/models/class_details_canvas.py | 2 +- flat_api/models/class_details_clever.py | 2 +- .../models/class_details_google_classroom.py | 2 +- flat_api/models/class_details_google_drive.py | 2 +- flat_api/models/class_details_lti.py | 2 +- flat_api/models/class_roles.py | 2 +- flat_api/models/class_state.py | 2 +- flat_api/models/class_update.py | 2 +- flat_api/models/collection.py | 2 +- flat_api/models/collection_capabilities.py | 2 +- flat_api/models/collection_creation.py | 2 +- flat_api/models/collection_modification.py | 2 +- flat_api/models/collection_privacy.py | 2 +- flat_api/models/collection_title.py | 84 ------- flat_api/models/collection_type.py | 2 +- flat_api/models/flat_error_response.py | 2 +- flat_api/models/flat_locales.py | 2 +- .../models/google_classroom_coursework.py | 2 +- .../models/google_classroom_submission.py | 2 +- flat_api/models/group.py | 2 +- flat_api/models/group_details.py | 2 +- flat_api/models/group_type.py | 2 +- flat_api/models/license_mode.py | 2 +- flat_api/models/license_sources.py | 2 +- flat_api/models/lms_name.py | 2 +- flat_api/models/lti_credentials.py | 2 +- flat_api/models/lti_credentials_creation.py | 2 +- flat_api/models/media_attachment.py | 2 +- flat_api/models/media_score_sharing_mode.py | 2 +- flat_api/models/organization_invitation.py | 2 +- .../organization_invitation_creation.py | 2 +- flat_api/models/organization_roles.py | 2 +- flat_api/models/resource_collaborator.py | 2 +- .../models/resource_collaborator_creation.py | 2 +- flat_api/models/resource_rights.py | 2 +- flat_api/models/resource_sharing_key.py | 84 ------- flat_api/models/score_comment.py | 2 +- flat_api/models/score_comment_context.py | 2 +- flat_api/models/score_comment_creation.py | 2 +- flat_api/models/score_comment_update.py | 2 +- flat_api/models/score_comments_counts.py | 2 +- flat_api/models/score_creation.py | 2 +- flat_api/models/score_creation_type.py | 2 +- flat_api/models/score_data.py | 84 ------- flat_api/models/score_data_encoding.py | 2 +- flat_api/models/score_details.py | 2 +- flat_api/models/score_fork.py | 2 +- flat_api/models/score_license.py | 2 +- flat_api/models/score_likes_counts.py | 2 +- flat_api/models/score_modification.py | 2 +- flat_api/models/score_privacy.py | 2 +- flat_api/models/score_revision.py | 2 +- flat_api/models/score_revision_creation.py | 2 +- flat_api/models/score_revision_statistics.py | 2 +- flat_api/models/score_source.py | 2 +- flat_api/models/score_summary.py | 2 +- flat_api/models/score_track.py | 2 +- flat_api/models/score_track_creation.py | 2 +- flat_api/models/score_track_point.py | 2 +- flat_api/models/score_track_state.py | 2 +- flat_api/models/score_track_type.py | 2 +- flat_api/models/score_track_update.py | 2 +- flat_api/models/score_views_counts.py | 2 +- flat_api/models/user_admin_update.py | 2 +- flat_api/models/user_basics.py | 2 +- flat_api/models/user_creation.py | 2 +- flat_api/models/user_details.py | 2 +- flat_api/models/user_details_admin.py | 2 +- flat_api/models/user_details_admin_license.py | 225 ------------------ flat_api/models/user_instruments.py | 2 +- flat_api/models/user_public.py | 2 +- flat_api/models/user_public_summary.py | 2 +- flat_api/rest.py | 2 +- test/test_account_api.py | 6 +- test/test_assignment.py | 6 +- test/test_assignment_copy.py | 6 +- test/test_assignment_creation.py | 6 +- test/test_assignment_submission.py | 6 +- test/test_assignment_submission_update.py | 6 +- test/test_class_api.py | 6 +- test/test_class_attachment_creation.py | 6 +- test/test_class_creation.py | 6 +- test/test_class_details.py | 6 +- test/test_class_details_canvas.py | 6 +- test/test_class_details_clever.py | 6 +- test/test_class_details_google_classroom.py | 6 +- test/test_class_details_google_drive.py | 6 +- test/test_class_details_lti.py | 6 +- test/test_class_roles.py | 6 +- test/test_class_state.py | 6 +- test/test_class_update.py | 6 +- test/test_collection.py | 6 +- test/test_collection_api.py | 6 +- test/test_collection_capabilities.py | 6 +- test/test_collection_creation.py | 6 +- test/test_collection_modification.py | 6 +- test/test_collection_privacy.py | 6 +- test/test_collection_title.py | 40 ---- test/test_collection_type.py | 6 +- test/test_flat_error_response.py | 6 +- test/test_flat_locales.py | 6 +- test/test_google_classroom_coursework.py | 6 +- test/test_google_classroom_submission.py | 6 +- test/test_group.py | 6 +- test/test_group_api.py | 6 +- test/test_group_details.py | 6 +- test/test_group_type.py | 6 +- test/test_license_mode.py | 6 +- test/test_license_sources.py | 6 +- test/test_lms_name.py | 6 +- test/test_lti_credentials.py | 6 +- test/test_lti_credentials_creation.py | 6 +- test/test_media_attachment.py | 6 +- test/test_media_score_sharing_mode.py | 6 +- test/test_organization_api.py | 6 +- test/test_organization_invitation.py | 6 +- test/test_organization_invitation_creation.py | 6 +- test/test_organization_roles.py | 6 +- test/test_resource_collaborator.py | 6 +- test/test_resource_collaborator_creation.py | 6 +- test/test_resource_rights.py | 6 +- test/test_resource_sharing_key.py | 40 ---- test/test_score_api.py | 6 +- test/test_score_comment.py | 6 +- test/test_score_comment_context.py | 6 +- test/test_score_comment_creation.py | 6 +- test/test_score_comment_update.py | 6 +- test/test_score_comments_counts.py | 6 +- test/test_score_creation.py | 6 +- test/test_score_creation_type.py | 6 +- test/test_score_data.py | 40 ---- test/test_score_data_encoding.py | 6 +- test/test_score_details.py | 6 +- test/test_score_fork.py | 6 +- test/test_score_license.py | 6 +- test/test_score_likes_counts.py | 6 +- test/test_score_modification.py | 6 +- test/test_score_privacy.py | 6 +- test/test_score_revision.py | 6 +- test/test_score_revision_creation.py | 6 +- test/test_score_revision_statistics.py | 6 +- test/test_score_source.py | 6 +- test/test_score_summary.py | 6 +- test/test_score_track.py | 6 +- test/test_score_track_creation.py | 6 +- test/test_score_track_point.py | 6 +- test/test_score_track_state.py | 6 +- test/test_score_track_type.py | 6 +- test/test_score_track_update.py | 6 +- test/test_score_views_counts.py | 6 +- test/test_user_admin_update.py | 6 +- test/test_user_api.py | 6 +- test/test_user_basics.py | 6 +- test/test_user_creation.py | 6 +- test/test_user_details.py | 6 +- test/test_user_details_admin.py | 6 +- test/test_user_details_admin_license.py | 40 ---- test/test_user_instruments.py | 6 +- test/test_user_public.py | 6 +- test/test_user_public_summary.py | 6 +- 188 files changed, 340 insertions(+), 1070 deletions(-) delete mode 100644 docs/ClassStreamPostMode.md delete mode 100644 docs/CollectionTitle.md delete mode 100644 docs/ResourceSharingKey.md delete mode 100644 docs/ScoreCollaborator.md delete mode 100644 docs/ScoreCollaboratorCreation.md delete mode 100644 docs/ScoreData.md delete mode 100644 docs/ScoreRights.md delete mode 100644 docs/UserDetailsAdminLicense.md delete mode 100644 flat_api/models/collection_title.py delete mode 100644 flat_api/models/resource_sharing_key.py delete mode 100644 flat_api/models/score_data.py delete mode 100644 flat_api/models/user_details_admin_license.py delete mode 100644 test/test_collection_title.py delete mode 100644 test/test_resource_sharing_key.py delete mode 100644 test/test_score_data.py delete mode 100644 test/test_user_details_admin_license.py diff --git a/docs/ClassStreamPostMode.md b/docs/ClassStreamPostMode.md deleted file mode 100644 index 5e09af6..0000000 --- a/docs/ClassStreamPostMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClassStreamPostMode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionTitle.md b/docs/CollectionTitle.md deleted file mode 100644 index 89ce5b1..0000000 --- a/docs/CollectionTitle.md +++ /dev/null @@ -1,9 +0,0 @@ -# CollectionTitle - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResourceSharingKey.md b/docs/ResourceSharingKey.md deleted file mode 100644 index e5f7314..0000000 --- a/docs/ResourceSharingKey.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResourceSharingKey - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index 6511df4..997da10 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -152,7 +152,7 @@ Name | Type | Description | Notes 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. +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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. ### Example diff --git a/docs/ScoreCollaborator.md b/docs/ScoreCollaborator.md deleted file mode 100644 index efaf2f1..0000000 --- a/docs/ScoreCollaborator.md +++ /dev/null @@ -1,17 +0,0 @@ -# ScoreCollaborator - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score permission | [optional] -**score** | **str** | The unique identifier of the score | [optional] -**user** | [**UserPublic**](UserPublic.md) | | [optional] -**group** | [**Group**](Group.md) | | [optional] -**user_email** | **str** | If the collaborator is not a user of Flat yet, this field will contain his email. | [optional] -**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] [default to True] -**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCollaboratorCreation.md b/docs/ScoreCollaboratorCreation.md deleted file mode 100644 index 0cfe031..0000000 --- a/docs/ScoreCollaboratorCreation.md +++ /dev/null @@ -1,15 +0,0 @@ -# ScoreCollaboratorCreation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **str** | The unique identifier of a Flat user | [optional] -**group** | **str** | The unique identifier of a Flat group | [optional] -**user_email** | **str** | Fill this field to invite an individual user by email. | [optional] -**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] [default to True] -**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreData.md b/docs/ScoreData.md deleted file mode 100644 index 4dc7983..0000000 --- a/docs/ScoreData.md +++ /dev/null @@ -1,9 +0,0 @@ -# ScoreData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreRights.md b/docs/ScoreRights.md deleted file mode 100644 index 7d5624f..0000000 --- a/docs/ScoreRights.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScoreRights - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acl_write** | **bool** | `True` if the current user can modify the current document | [optional] [default to False] -**acl_admin** | **bool** | `True` if the current user can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md deleted file mode 100644 index 23d7e45..0000000 --- a/docs/UserDetailsAdminLicense.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserDetailsAdminLicense - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | ID of the current license | [optional] -**expiration_date** | **datetime** | Date when the license expires | [optional] -**source** | [**LicenseSources**](LicenseSources.md) | | [optional] -**mode** | [**LicenseMode**](LicenseMode.md) | | [optional] -**active** | **bool** | ID of the current license | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/flat_api/__init__.py b/flat_api/__init__.py index ac7ac91..03431bc 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -5,7 +5,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index 13b71d6..fc48518 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index ee7b740..b061998 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index 50778e9..b8b1634 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 59e84cd..7de86be 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 2906a9c..111293e 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index eb4d8df..1e0b09a 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io @@ -252,7 +252,7 @@ def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): def create_score(self, score_creation, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. # noqa: E501 + 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_score(score_creation, async_req=True) @@ -274,7 +274,7 @@ def create_score(self, score_creation, **kwargs): # noqa: E501 def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab or TuxGuitar 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}`. # noqa: E501 + 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_score_with_http_info(score_creation, async_req=True) diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index 648ecea..cdd4d86 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 6191acb..a29ad03 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -2,7 +2,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/configuration.py b/flat_api/configuration.py index d68f2d6..c58af1a 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 4edc7d8..9231fdc 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -4,7 +4,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index 96c7265..892a951 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index 7e5179b..9702b99 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/assignment_creation.py b/flat_api/models/assignment_creation.py index b7a29d1..57bd84a 100644 --- a/flat_api/models/assignment_creation.py +++ b/flat_api/models/assignment_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index 436b0f0..c1b7f1e 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index 2038cc1..ff37594 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index cbb37cc..54b2ac4 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index 9945412..bce040a 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 3053ca6..3ea28e9 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index 006d6ea..b86d4da 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index 1fc0c3c..063fa8e 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index bf500a1..6963d9b 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index df9806e..596cb5d 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index 6b250ce..812795e 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index 545db01..bd90cd2 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 437052a..05f9e2a 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index 4ab0e0b..47d035e 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index 691decd..6698671 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 6ecac77..45260a3 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index 8bf8188..0bdce61 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index 6dc4185..d9edb8b 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index 476cc29..d0df678 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/collection_title.py b/flat_api/models/collection_title.py deleted file mode 100644 index 4bddfe4..0000000 --- a/flat_api/models/collection_title.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - - -class CollectionTitle(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """CollectionTitle - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionTitle): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index 6865583..f71201f 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index 43aede1..e94cc2f 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py index e5f7080..790baaf 100644 --- a/flat_api/models/flat_locales.py +++ b/flat_api/models/flat_locales.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index e753cbc..f933474 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index ae71e96..63522ee 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/group.py b/flat_api/models/group.py index 158f690..8dec689 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index 41864e0..8c06241 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index fa0779d..f0eb433 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index b34978e..be97ad2 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index b165cc7..f42a1cb 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index ea2012d..4637840 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index 230c5ef..386531b 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index e891818..22ef472 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index 9a99331..351a271 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index 1e827f9..d38ba3a 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index 0002e84..e6d9702 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index d69a2f0..028b2c0 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index ef2d009..578fbfa 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index e552b8b..5cecd56 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index 109255c..f6a6f16 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index 3898e15..0049ca5 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/resource_sharing_key.py b/flat_api/models/resource_sharing_key.py deleted file mode 100644 index e5234ae..0000000 --- a/flat_api/models/resource_sharing_key.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ResourceSharingKey(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """ResourceSharingKey - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResourceSharingKey): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index 900f23c..6b2ad78 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index 4035fd2..8cc4e45 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index 2186978..e6f45d5 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index 37e364d..9d5886a 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index 9f9c6c9..4dd9d71 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index 52d8918..3da2e40 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index 698e3d0..da2731d 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_data.py b/flat_api/models/score_data.py deleted file mode 100644 index f5e8438..0000000 --- a/flat_api/models/score_data.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ScoreData(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """ScoreData - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/score_data_encoding.py b/flat_api/models/score_data_encoding.py index dd5d7ab..5dc68e8 100644 --- a/flat_api/models/score_data_encoding.py +++ b/flat_api/models/score_data_encoding.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index f523e55..7e38448 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index 6ce69f6..e19cc49 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index c672347..59ee8e8 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index 63ebe82..1a079f5 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 6b110ac..9a39853 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index 8cf12a0..ccd8011 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index 2892e2a..5a6bbfe 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index 7e87bf7..ce99891 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index b2a6411..8b76e7c 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index e321c74..aac41b3 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_summary.py b/flat_api/models/score_summary.py index 600adb2..1348b20 100644 --- a/flat_api/models/score_summary.py +++ b/flat_api/models/score_summary.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index 9263b18..5c5b1f0 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index fecc6e3..643cf46 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index 42c1c78..cf8f3c7 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index 3511647..fdcdd0f 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index 20b45ed..63aa9e3 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index b0f4c1d..33d2d4e 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index b225d11..fe93d45 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index 744c702..97c7cd7 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_basics.py b/flat_api/models/user_basics.py index c61c97c..b436b5e 100644 --- a/flat_api/models/user_basics.py +++ b/flat_api/models/user_basics.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index c9cb38b..008b956 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index f5a12b5..947f155 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index 862d4f1..c4e3294 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py deleted file mode 100644 index 3b844f9..0000000 --- a/flat_api/models/user_details_admin_license.py +++ /dev/null @@ -1,225 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.models.license_mode import LicenseMode # noqa: F401,E501 -from flat_api.models.license_sources import LicenseSources # noqa: F401,E501 - - -class UserDetailsAdminLicense(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'expiration_date': 'datetime', - 'source': 'LicenseSources', - 'mode': 'LicenseMode', - 'active': 'bool' - } - - attribute_map = { - 'id': 'id', - 'expiration_date': 'expirationDate', - 'source': 'source', - 'mode': 'mode', - 'active': 'active' - } - - def __init__(self, id=None, expiration_date=None, source=None, mode=None, active=None): # noqa: E501 - """UserDetailsAdminLicense - a model defined in Swagger""" # noqa: E501 - - self._id = None - self._expiration_date = None - self._source = None - self._mode = None - self._active = None - self.discriminator = None - - if id is not None: - self.id = id - if expiration_date is not None: - self.expiration_date = expiration_date - if source is not None: - self.source = source - if mode is not None: - self.mode = mode - if active is not None: - self.active = active - - @property - def id(self): - """Gets the id of this UserDetailsAdminLicense. # noqa: E501 - - ID of the current license # noqa: E501 - - :return: The id of this UserDetailsAdminLicense. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserDetailsAdminLicense. - - ID of the current license # noqa: E501 - - :param id: The id of this UserDetailsAdminLicense. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def expiration_date(self): - """Gets the expiration_date of this UserDetailsAdminLicense. # noqa: E501 - - Date when the license expires # noqa: E501 - - :return: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 - :rtype: datetime - """ - return self._expiration_date - - @expiration_date.setter - def expiration_date(self, expiration_date): - """Sets the expiration_date of this UserDetailsAdminLicense. - - Date when the license expires # noqa: E501 - - :param expiration_date: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 - :type: datetime - """ - - self._expiration_date = expiration_date - - @property - def source(self): - """Gets the source of this UserDetailsAdminLicense. # noqa: E501 - - - :return: The source of this UserDetailsAdminLicense. # noqa: E501 - :rtype: LicenseSources - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this UserDetailsAdminLicense. - - - :param source: The source of this UserDetailsAdminLicense. # noqa: E501 - :type: LicenseSources - """ - - self._source = source - - @property - def mode(self): - """Gets the mode of this UserDetailsAdminLicense. # noqa: E501 - - - :return: The mode of this UserDetailsAdminLicense. # noqa: E501 - :rtype: LicenseMode - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this UserDetailsAdminLicense. - - - :param mode: The mode of this UserDetailsAdminLicense. # noqa: E501 - :type: LicenseMode - """ - - self._mode = mode - - @property - def active(self): - """Gets the active of this UserDetailsAdminLicense. # noqa: E501 - - ID of the current license # noqa: E501 - - :return: The active of this UserDetailsAdminLicense. # noqa: E501 - :rtype: bool - """ - return self._active - - @active.setter - def active(self, active): - """Sets the active of this UserDetailsAdminLicense. - - ID of the current license # noqa: E501 - - :param active: The active of this UserDetailsAdminLicense. # noqa: E501 - :type: bool - """ - - self._active = active - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserDetailsAdminLicense): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/user_instruments.py b/flat_api/models/user_instruments.py index b4840d3..ca1345a 100644 --- a/flat_api/models/user_instruments.py +++ b/flat_api/models/user_instruments.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index 44df8f1..0857151 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index 9d83f40..b222d3a 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/flat_api/rest.py b/flat_api/rest.py index d4ffe56..6af6574 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -3,7 +3,7 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab and TuxGuitar files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 OpenAPI spec version: 2.7.0 Contact: developers@flat.io diff --git a/test/test_account_api.py b/test/test_account_api.py index 0a2d422..e346fe3 100644 --- a/test/test_account_api.py +++ b/test/test_account_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment.py b/test/test_assignment.py index 4e02f1c..ebeb18e 100644 --- a/test/test_assignment.py +++ b/test/test_assignment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_copy.py b/test/test_assignment_copy.py index b098110..28fa637 100644 --- a/test/test_assignment_copy.py +++ b/test/test_assignment_copy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_creation.py b/test/test_assignment_creation.py index 175af28..34d0196 100644 --- a/test/test_assignment_creation.py +++ b/test/test_assignment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_submission.py b/test/test_assignment_submission.py index e120a46..162a70e 100644 --- a/test/test_assignment_submission.py +++ b/test/test_assignment_submission.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_submission_update.py b/test/test_assignment_submission_update.py index d36d03e..2e669d9 100644 --- a/test/test_assignment_submission_update.py +++ b/test/test_assignment_submission_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_api.py b/test/test_class_api.py index 150975b..4c249d3 100644 --- a/test/test_class_api.py +++ b/test/test_class_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_attachment_creation.py b/test/test_class_attachment_creation.py index 0c03bff..d71abcd 100644 --- a/test/test_class_attachment_creation.py +++ b/test/test_class_attachment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_creation.py b/test/test_class_creation.py index 23bde30..2f51b37 100644 --- a/test/test_class_creation.py +++ b/test/test_class_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details.py b/test/test_class_details.py index b3a16ce..db4a798 100644 --- a/test/test_class_details.py +++ b/test/test_class_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py index f971e12..3f21ac1 100644 --- a/test/test_class_details_canvas.py +++ b/test/test_class_details_canvas.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py index 415a37a..1d1d242 100644 --- a/test/test_class_details_clever.py +++ b/test/test_class_details_clever.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py index e148de8..aa1c1d5 100644 --- a/test/test_class_details_google_classroom.py +++ b/test/test_class_details_google_classroom.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py index 3032dd6..c1a33f2 100644 --- a/test/test_class_details_google_drive.py +++ b/test/test_class_details_google_drive.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py index e1637bc..369fb2a 100644 --- a/test/test_class_details_lti.py +++ b/test/test_class_details_lti.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_roles.py b/test/test_class_roles.py index 7d078dd..ea06366 100644 --- a/test/test_class_roles.py +++ b/test/test_class_roles.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_state.py b/test/test_class_state.py index 4a8b880..f83b2b8 100644 --- a/test/test_class_state.py +++ b/test/test_class_state.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_update.py b/test/test_class_update.py index 0d08abf..a81151e 100644 --- a/test/test_class_update.py +++ b/test/test_class_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection.py b/test/test_collection.py index 3d99a00..791d6a0 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_api.py b/test/test_collection_api.py index 8b558c4..3285c76 100644 --- a/test/test_collection_api.py +++ b/test/test_collection_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py index 14391c2..27645f8 100644 --- a/test/test_collection_capabilities.py +++ b/test/test_collection_capabilities.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_creation.py b/test/test_collection_creation.py index 03d0897..e9cae2c 100644 --- a/test/test_collection_creation.py +++ b/test/test_collection_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_modification.py b/test/test_collection_modification.py index cf4795c..e06873c 100644 --- a/test/test_collection_modification.py +++ b/test/test_collection_modification.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_privacy.py b/test/test_collection_privacy.py index aab1746..9db2dc3 100644 --- a/test/test_collection_privacy.py +++ b/test/test_collection_privacy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_title.py b/test/test_collection_title.py deleted file mode 100644 index 18f86e2..0000000 --- a/test/test_collection_title.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.collection_title import CollectionTitle # noqa: E501 -from flat_api.rest import ApiException - - -class TestCollectionTitle(unittest.TestCase): - """CollectionTitle unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionTitle(self): - """Test CollectionTitle""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_title.CollectionTitle() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_type.py b/test/test_collection_type.py index d153516..5aa6b83 100644 --- a/test/test_collection_type.py +++ b/test/test_collection_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_flat_error_response.py b/test/test_flat_error_response.py index 6468e0b..a3f8e28 100644 --- a/test/test_flat_error_response.py +++ b/test/test_flat_error_response.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_flat_locales.py b/test/test_flat_locales.py index b963f97..8c023bf 100644 --- a/test/test_flat_locales.py +++ b/test/test_flat_locales.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_google_classroom_coursework.py b/test/test_google_classroom_coursework.py index 09e7080..a3365a8 100644 --- a/test/test_google_classroom_coursework.py +++ b/test/test_google_classroom_coursework.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_google_classroom_submission.py b/test/test_google_classroom_submission.py index 041d09e..9ab4e42 100644 --- a/test/test_google_classroom_submission.py +++ b/test/test_google_classroom_submission.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_group.py b/test/test_group.py index 39d5639..e7ab4c6 100644 --- a/test/test_group.py +++ b/test/test_group.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_api.py b/test/test_group_api.py index c8db84c..18ef3a4 100644 --- a/test/test_group_api.py +++ b/test/test_group_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_details.py b/test/test_group_details.py index e542cb5..562b980 100644 --- a/test/test_group_details.py +++ b/test/test_group_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_type.py b/test/test_group_type.py index e3fd7a7..783dbf9 100644 --- a/test/test_group_type.py +++ b/test/test_group_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_license_mode.py b/test/test_license_mode.py index 03c82c0..3e100f4 100644 --- a/test/test_license_mode.py +++ b/test/test_license_mode.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_license_sources.py b/test/test_license_sources.py index 46c4127..a1c09b9 100644 --- a/test/test_license_sources.py +++ b/test/test_license_sources.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_lms_name.py b/test/test_lms_name.py index 9166f4a..5e2f9de 100644 --- a/test/test_lms_name.py +++ b/test/test_lms_name.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_lti_credentials.py b/test/test_lti_credentials.py index 27845aa..f113c77 100644 --- a/test/test_lti_credentials.py +++ b/test/test_lti_credentials.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_lti_credentials_creation.py b/test/test_lti_credentials_creation.py index 5fd8a4b..28bac35 100644 --- a/test/test_lti_credentials_creation.py +++ b/test/test_lti_credentials_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_media_attachment.py b/test/test_media_attachment.py index d930dd4..a101743 100644 --- a/test/test_media_attachment.py +++ b/test/test_media_attachment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_media_score_sharing_mode.py b/test/test_media_score_sharing_mode.py index d5ca5a7..276fbb0 100644 --- a/test/test_media_score_sharing_mode.py +++ b/test/test_media_score_sharing_mode.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_api.py b/test/test_organization_api.py index a542a1d..8ac5933 100644 --- a/test/test_organization_api.py +++ b/test/test_organization_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_invitation.py b/test/test_organization_invitation.py index 03ac78e..7a03b68 100644 --- a/test/test_organization_invitation.py +++ b/test/test_organization_invitation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_invitation_creation.py b/test/test_organization_invitation_creation.py index 155bda2..0f88e8f 100644 --- a/test/test_organization_invitation_creation.py +++ b/test/test_organization_invitation_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_roles.py b/test/test_organization_roles.py index aa3f03f..4d71451 100644 --- a/test/test_organization_roles.py +++ b/test/test_organization_roles.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_collaborator.py b/test/test_resource_collaborator.py index 21a21b8..91cd6b2 100644 --- a/test/test_resource_collaborator.py +++ b/test/test_resource_collaborator.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_collaborator_creation.py b/test/test_resource_collaborator_creation.py index 9a576b4..d3fce36 100644 --- a/test/test_resource_collaborator_creation.py +++ b/test/test_resource_collaborator_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_rights.py b/test/test_resource_rights.py index c79b14d..f182466 100644 --- a/test/test_resource_rights.py +++ b/test/test_resource_rights.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_sharing_key.py b/test/test_resource_sharing_key.py deleted file mode 100644 index daff645..0000000 --- a/test/test_resource_sharing_key.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.resource_sharing_key import ResourceSharingKey # noqa: E501 -from flat_api.rest import ApiException - - -class TestResourceSharingKey(unittest.TestCase): - """ResourceSharingKey unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResourceSharingKey(self): - """Test ResourceSharingKey""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.resource_sharing_key.ResourceSharingKey() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_api.py b/test/test_score_api.py index 4677306..fadf5d6 100644 --- a/test/test_score_api.py +++ b/test/test_score_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment.py b/test/test_score_comment.py index 5a4dd06..c42c27b 100644 --- a/test/test_score_comment.py +++ b/test/test_score_comment.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_context.py b/test/test_score_comment_context.py index d576b8f..0e6d585 100644 --- a/test/test_score_comment_context.py +++ b/test/test_score_comment_context.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_creation.py b/test/test_score_comment_creation.py index e7778d8..5440a92 100644 --- a/test/test_score_comment_creation.py +++ b/test/test_score_comment_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_update.py b/test/test_score_comment_update.py index dd590fb..3978dd5 100644 --- a/test/test_score_comment_update.py +++ b/test/test_score_comment_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comments_counts.py b/test/test_score_comments_counts.py index 7df9a13..c657718 100644 --- a/test/test_score_comments_counts.py +++ b/test/test_score_comments_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_creation.py b/test/test_score_creation.py index ac850d5..f9f7bee 100644 --- a/test/test_score_creation.py +++ b/test/test_score_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_creation_type.py b/test/test_score_creation_type.py index 6db933c..2ab172e 100644 --- a/test/test_score_creation_type.py +++ b/test/test_score_creation_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_data.py b/test/test_score_data.py deleted file mode 100644 index 2259872..0000000 --- a/test/test_score_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_data import ScoreData # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreData(unittest.TestCase): - """ScoreData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreData(self): - """Test ScoreData""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_data.ScoreData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_data_encoding.py b/test/test_score_data_encoding.py index f5a550d..cd93f90 100644 --- a/test/test_score_data_encoding.py +++ b/test/test_score_data_encoding.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_details.py b/test/test_score_details.py index 1cf2faf..d261322 100644 --- a/test/test_score_details.py +++ b/test/test_score_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_fork.py b/test/test_score_fork.py index 15b83c8..d23628c 100644 --- a/test/test_score_fork.py +++ b/test/test_score_fork.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_license.py b/test/test_score_license.py index 66fe61b..ebef15c 100644 --- a/test/test_score_license.py +++ b/test/test_score_license.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_likes_counts.py b/test/test_score_likes_counts.py index 623b7bf..2f33bbf 100644 --- a/test/test_score_likes_counts.py +++ b/test/test_score_likes_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_modification.py b/test/test_score_modification.py index c4f169b..1b6d06f 100644 --- a/test/test_score_modification.py +++ b/test/test_score_modification.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_privacy.py b/test/test_score_privacy.py index 781728d..dcaebf2 100644 --- a/test/test_score_privacy.py +++ b/test/test_score_privacy.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision.py b/test/test_score_revision.py index c2017d1..f8cced0 100644 --- a/test/test_score_revision.py +++ b/test/test_score_revision.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision_creation.py b/test/test_score_revision_creation.py index dc132fa..bc7b493 100644 --- a/test/test_score_revision_creation.py +++ b/test/test_score_revision_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision_statistics.py b/test/test_score_revision_statistics.py index 043b252..5965517 100644 --- a/test/test_score_revision_statistics.py +++ b/test/test_score_revision_statistics.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_source.py b/test/test_score_source.py index ff55b65..c08f4ef 100644 --- a/test/test_score_source.py +++ b/test/test_score_source.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_summary.py b/test/test_score_summary.py index b58de1b..7494a62 100644 --- a/test/test_score_summary.py +++ b/test/test_score_summary.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track.py b/test/test_score_track.py index ca1d77f..565ea4d 100644 --- a/test/test_score_track.py +++ b/test/test_score_track.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_creation.py b/test/test_score_track_creation.py index b469a2d..f3081d0 100644 --- a/test/test_score_track_creation.py +++ b/test/test_score_track_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_point.py b/test/test_score_track_point.py index 49b006e..2442c44 100644 --- a/test/test_score_track_point.py +++ b/test/test_score_track_point.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_state.py b/test/test_score_track_state.py index 5ddbd68..856d5a8 100644 --- a/test/test_score_track_state.py +++ b/test/test_score_track_state.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_type.py b/test/test_score_track_type.py index b160bbf..6d3133d 100644 --- a/test/test_score_track_type.py +++ b/test/test_score_track_type.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_update.py b/test/test_score_track_update.py index f6f8757..f033496 100644 --- a/test/test_score_track_update.py +++ b/test/test_score_track_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_views_counts.py b/test/test_score_views_counts.py index c810f92..682b771 100644 --- a/test/test_score_views_counts.py +++ b/test/test_score_views_counts.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_admin_update.py b/test/test_user_admin_update.py index a3fa75e..b6ec939 100644 --- a/test/test_user_admin_update.py +++ b/test/test_user_admin_update.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_api.py b/test/test_user_api.py index e70a643..6dd24c9 100644 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_basics.py b/test/test_user_basics.py index 50d8ba2..0d02c34 100644 --- a/test/test_user_basics.py +++ b/test/test_user_basics.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_creation.py b/test/test_user_creation.py index 3b125c0..cbc488d 100644 --- a/test/test_user_creation.py +++ b/test/test_user_creation.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details.py b/test/test_user_details.py index cb9ad12..2852afb 100644 --- a/test/test_user_details.py +++ b/test/test_user_details.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details_admin.py b/test/test_user_details_admin.py index a0b5408..787d1a3 100644 --- a/test/test_user_details_admin.py +++ b/test/test_user_details_admin.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py deleted file mode 100644 index 868729e..0000000 --- a/test/test_user_details_admin_license.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.6.0 - Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense # noqa: E501 -from flat_api.rest import ApiException - - -class TestUserDetailsAdminLicense(unittest.TestCase): - """UserDetailsAdminLicense unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserDetailsAdminLicense(self): - """Test UserDetailsAdminLicense""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_details_admin_license.UserDetailsAdminLicense() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_instruments.py b/test/test_user_instruments.py index 67904c2..c5e0ae7 100644 --- a/test/test_user_instruments.py +++ b/test/test_user_instruments.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_public.py b/test/test_user_public.py index efefd15..87bba21 100644 --- a/test/test_user_public.py +++ b/test/test_user_public.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_public_summary.py b/test/test_user_public_summary.py index 789fd01..b311da8 100644 --- a/test/test_user_public_summary.py +++ b/test/test_user_public_summary.py @@ -3,11 +3,11 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.6.0 + OpenAPI spec version: 2.7.0 Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ From f05413903024b116d05bffff2856075d199371ff Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 18:09:22 +0100 Subject: [PATCH 04/46] feat: API v2.17.0 & fix inheritance --- .openapi-generator/FILES | 245 +++ .openapi-generator/VERSION | 2 +- .travis.yml | 13 - CHANGELOG.md | 5 + README.md | 72 +- docs/AccountApi.md | 10 +- docs/ApiAccessToken.md | 15 + docs/{UserInstruments.md => AppScopes.md} | 2 +- docs/Assignment.md | 8 + docs/AssignmentCanvas.md | 11 + docs/AssignmentCopy.md | 4 +- docs/AssignmentCreation.md | 12 + docs/AssignmentCreationGoogleClassroom.md | 10 + docs/AssignmentCreationMicrosoftGraph.md | 10 + docs/AssignmentLti.md | 10 + docs/AssignmentMfc.md | 11 + docs/AssignmentSubmission.md | 8 +- docs/AssignmentSubmissionComment.md | 16 + docs/AssignmentSubmissionCommentCreation.md | 10 + docs/AssignmentSubmissionHistory.md | 16 + docs/AssignmentSubmissionHistoryAttachment.md | 11 + docs/AssignmentSubmissionState.md | 9 + docs/AssignmentSubmissionUpdate.md | 7 +- docs/AssignmentSubmissionUpdateComments.md | 11 + ...ScoreDataEncoding.md => AssignmentType.md} | 2 +- docs/ClassApi.md | 883 ++++++-- docs/ClassAttachmentCreation.md | 4 + docs/ClassDetails.md | 3 + docs/ClassDetailsCanvas.md | 2 +- docs/ClassDetailsClever.md | 8 +- docs/ClassDetailsGoogleClassroom.md | 4 +- docs/ClassDetailsIssues.md | 10 + docs/ClassDetailsIssuesSync.md | 12 + docs/ClassDetailsMfc.md | 11 + docs/ClassDetailsMicrosoftGraph.md | 10 + docs/Collection.md | 2 +- docs/CollectionApi.md | 54 +- docs/CollectionApp.md | 12 + docs/CollectionCapabilities.md | 4 +- docs/CollectionCreation.md | 1 + docs/CollectionModification.md | 1 + docs/GoogleClassroomCoursework.md | 1 + docs/GroupApi.md | 6 +- docs/MediaAttachment.md | 11 +- docs/MicrosoftGraphAssignment.md | 13 + docs/MicrosoftGraphSubmission.md | 12 + docs/OrganizationApi.md | 229 ++- docs/OrganizationUserAccessTokenCreation.md | 10 + docs/OrganizationUserSigninLink.md | 11 + docs/OrganizationUserSigninLinkCreation.md | 10 + docs/ResourceCollaborator.md | 13 +- docs/ScoreApi.md | 179 +- docs/ScoreComment.md | 1 + docs/ScoreCommentModeration.md | 11 + docs/ScoreCommentsCounts.md | 8 +- docs/ScoreCreation.md | 7 +- docs/ScoreCreationBuilderData.md | 11 + docs/ScoreCreationBuilderDataLayoutData.md | 17 + docs/ScoreCreationBuilderDataScoreData.md | 15 + ...CreationBuilderDataScoreDataInstruments.md | 13 + docs/ScoreDetails.md | 39 +- docs/ScoreFork.md | 2 +- docs/ScoreModification.md | 5 + docs/ScorePlaysCounts.md | 12 + docs/ScoreRevision.md | 1 + docs/ScoreRevisionCreation.md | 4 +- docs/ScoreSummary.md | 15 - docs/Task.md | 16 + docs/TaskApi.md | 63 + docs/TaskExportOptions.md | 10 + docs/TaskProgress.md | 11 + docs/UserAdminUpdate.md | 6 +- docs/UserApi.md | 2 +- docs/UserBasics.md | 15 - docs/UserCreation.md | 3 + docs/UserDetails.md | 27 +- docs/UserDetailsAdmin.md | 18 +- docs/UserDetailsAdminLicense.md | 14 + docs/UserPublic.md | 25 +- docs/UserPublicSummary.md | 14 +- flat_api/__init__.py | 45 +- flat_api/api/__init__.py | 1 + flat_api/api/account_api.py | 10 +- flat_api/api/class_api.py | 1828 ++++++++++++++--- flat_api/api/collection_api.py | 86 +- flat_api/api/group_api.py | 10 +- flat_api/api/organization_api.py | 444 +++- flat_api/api/score_api.py | 426 ++-- flat_api/api/task_api.py | 130 ++ flat_api/api/user_api.py | 8 +- flat_api/api_client.py | 6 +- flat_api/configuration.py | 8 +- flat_api/models/__init__.py | 42 +- flat_api/models/api_access_token.py | 255 +++ flat_api/models/app_scopes.py | 108 + flat_api/models/assignment.py | 224 +- flat_api/models/assignment_canvas.py | 143 ++ flat_api/models/assignment_copy.py | 71 +- flat_api/models/assignment_creation.py | 357 +++- .../assignment_creation_google_classroom.py | 114 + .../assignment_creation_microsoft_graph.py | 114 + flat_api/models/assignment_lti.py | 115 ++ flat_api/models/assignment_mfc.py | 143 ++ flat_api/models/assignment_submission.py | 227 +- .../models/assignment_submission_comment.py | 283 +++ .../assignment_submission_comment_creation.py | 116 ++ .../models/assignment_submission_history.py | 279 +++ ...ssignment_submission_history_attachment.py | 143 ++ ...ding.py => assignment_submission_state.py} | 14 +- .../models/assignment_submission_update.py | 183 +- .../assignment_submission_update_comments.py | 143 ++ ...user_instruments.py => assignment_type.py} | 20 +- flat_api/models/class_attachment_creation.py | 122 +- flat_api/models/class_creation.py | 4 +- flat_api/models/class_details.py | 84 +- flat_api/models/class_details_canvas.py | 64 +- flat_api/models/class_details_clever.py | 204 +- .../models/class_details_google_classroom.py | 98 +- flat_api/models/class_details_google_drive.py | 4 +- flat_api/models/class_details_issues.py | 115 ++ flat_api/models/class_details_issues_sync.py | 177 ++ flat_api/models/class_details_lti.py | 4 +- flat_api/models/class_details_mfc.py | 143 ++ .../models/class_details_microsoft_graph.py | 115 ++ flat_api/models/class_roles.py | 4 +- flat_api/models/class_state.py | 4 +- flat_api/models/class_update.py | 4 +- flat_api/models/collection.py | 16 +- flat_api/models/collection_app.py | 171 ++ flat_api/models/collection_capabilities.py | 122 +- flat_api/models/collection_creation.py | 37 +- flat_api/models/collection_modification.py | 36 +- flat_api/models/collection_privacy.py | 4 +- flat_api/models/collection_type.py | 5 +- flat_api/models/flat_error_response.py | 4 +- flat_api/models/flat_locales.py | 9 +- .../models/google_classroom_coursework.py | 37 +- .../models/google_classroom_submission.py | 4 +- flat_api/models/group.py | 4 +- flat_api/models/group_details.py | 4 +- flat_api/models/group_type.py | 4 +- flat_api/models/license_mode.py | 4 +- flat_api/models/license_sources.py | 5 +- flat_api/models/lms_name.py | 4 +- flat_api/models/lti_credentials.py | 4 +- flat_api/models/lti_credentials_creation.py | 4 +- flat_api/models/media_attachment.py | 200 +- flat_api/models/media_score_sharing_mode.py | 5 +- flat_api/models/microsoft_graph_assignment.py | 199 ++ flat_api/models/microsoft_graph_submission.py | 171 ++ flat_api/models/organization_invitation.py | 4 +- .../organization_invitation_creation.py | 4 +- flat_api/models/organization_roles.py | 4 +- ...organization_user_access_token_creation.py | 116 ++ .../models/organization_user_signin_link.py | 143 ++ .../organization_user_signin_link_creation.py | 115 ++ flat_api/models/resource_collaborator.py | 282 ++- .../models/resource_collaborator_creation.py | 4 +- flat_api/models/resource_rights.py | 4 +- flat_api/models/score_comment.py | 32 +- flat_api/models/score_comment_context.py | 4 +- flat_api/models/score_comment_creation.py | 4 +- flat_api/models/score_comment_moderation.py | 149 ++ flat_api/models/score_comment_update.py | 4 +- flat_api/models/score_comments_counts.py | 20 +- flat_api/models/score_creation.py | 163 +- .../models/score_creation_builder_data.py | 139 ++ ...score_creation_builder_data_layout_data.py | 317 +++ .../score_creation_builder_data_score_data.py | 255 +++ ...ion_builder_data_score_data_instruments.py | 199 ++ flat_api/models/score_creation_type.py | 4 +- flat_api/models/score_details.py | 860 +++++--- flat_api/models/score_fork.py | 6 +- flat_api/models/score_license.py | 4 +- flat_api/models/score_likes_counts.py | 4 +- flat_api/models/score_modification.py | 154 +- flat_api/models/score_plays_counts.py | 171 ++ flat_api/models/score_privacy.py | 4 +- flat_api/models/score_revision.py | 34 +- flat_api/models/score_revision_creation.py | 22 +- flat_api/models/score_revision_statistics.py | 4 +- flat_api/models/score_source.py | 4 +- flat_api/models/score_summary.py | 251 --- flat_api/models/score_track.py | 4 +- flat_api/models/score_track_creation.py | 4 +- flat_api/models/score_track_point.py | 4 +- flat_api/models/score_track_state.py | 4 +- flat_api/models/score_track_type.py | 4 +- flat_api/models/score_track_update.py | 4 +- flat_api/models/score_views_counts.py | 4 +- flat_api/models/task.py | 293 +++ flat_api/models/task_export_options.py | 115 ++ flat_api/models/task_progress.py | 143 ++ flat_api/models/user_admin_update.py | 138 +- flat_api/models/user_basics.py | 267 --- flat_api/models/user_creation.py | 110 +- flat_api/models/user_details.py | 723 ++++++- flat_api/models/user_details_admin.py | 465 ++++- flat_api/models/user_details_admin_license.py | 223 ++ flat_api/models/user_public.py | 593 +++++- flat_api/models/user_public_summary.py | 355 +++- flat_api/rest.py | 4 +- setup.py | 16 +- test/test_account_api.py | 4 +- ...nstruments.py => test_api_access_token.py} | 16 +- ...test_user_basics.py => test_app_scopes.py} | 16 +- test/test_assignment.py | 4 +- ..._encoding.py => test_assignment_canvas.py} | 16 +- test/test_assignment_copy.py | 4 +- test/test_assignment_creation.py | 4 +- ...st_assignment_creation_google_classroom.py | 40 + ...est_assignment_creation_microsoft_graph.py | 40 + test/test_assignment_lti.py | 40 + test/test_assignment_mfc.py | 40 + test/test_assignment_submission.py | 4 +- test/test_assignment_submission_comment.py | 40 + ..._assignment_submission_comment_creation.py | 40 + test/test_assignment_submission_history.py | 40 + ...ssignment_submission_history_attachment.py | 40 + test/test_assignment_submission_state.py | 40 + test/test_assignment_submission_update.py | 4 +- ...t_assignment_submission_update_comments.py | 40 + test/test_assignment_type.py | 40 + test/test_class_api.py | 81 +- test/test_class_attachment_creation.py | 4 +- test/test_class_creation.py | 4 +- test/test_class_details.py | 4 +- test/test_class_details_canvas.py | 4 +- test/test_class_details_clever.py | 4 +- test/test_class_details_google_classroom.py | 4 +- test/test_class_details_google_drive.py | 4 +- test/test_class_details_issues.py | 40 + test/test_class_details_issues_sync.py | 40 + test/test_class_details_lti.py | 4 +- test/test_class_details_mfc.py | 40 + test/test_class_details_microsoft_graph.py | 40 + test/test_class_roles.py | 4 +- test/test_class_state.py | 4 +- test/test_class_update.py | 4 +- test/test_collection.py | 4 +- test/test_collection_api.py | 4 +- test/test_collection_app.py | 40 + test/test_collection_capabilities.py | 4 +- test/test_collection_creation.py | 4 +- test/test_collection_modification.py | 4 +- test/test_collection_privacy.py | 4 +- test/test_collection_type.py | 4 +- test/test_flat_error_response.py | 4 +- test/test_flat_locales.py | 4 +- test/test_google_classroom_coursework.py | 4 +- test/test_google_classroom_submission.py | 4 +- test/test_group.py | 4 +- test/test_group_api.py | 4 +- test/test_group_details.py | 4 +- test/test_group_type.py | 4 +- test/test_license_mode.py | 4 +- test/test_license_sources.py | 4 +- test/test_lms_name.py | 4 +- test/test_lti_credentials.py | 4 +- test/test_lti_credentials_creation.py | 4 +- test/test_media_attachment.py | 4 +- test/test_media_score_sharing_mode.py | 4 +- test/test_microsoft_graph_assignment.py | 40 + test/test_microsoft_graph_submission.py | 40 + test/test_organization_api.py | 25 +- test/test_organization_invitation.py | 4 +- test/test_organization_invitation_creation.py | 4 +- test/test_organization_roles.py | 4 +- ...organization_user_access_token_creation.py | 40 + test/test_organization_user_signin_link.py | 40 + ..._organization_user_signin_link_creation.py | 40 + test/test_resource_collaborator.py | 4 +- test/test_resource_collaborator_creation.py | 4 +- test/test_resource_rights.py | 4 +- test/test_score_api.py | 11 +- test/test_score_comment.py | 4 +- test/test_score_comment_context.py | 4 +- test/test_score_comment_creation.py | 4 +- test/test_score_comment_moderation.py | 40 + test/test_score_comment_update.py | 4 +- test/test_score_comments_counts.py | 4 +- test/test_score_creation.py | 4 +- test/test_score_creation_builder_data.py | 40 + ...score_creation_builder_data_layout_data.py | 40 + ..._score_creation_builder_data_score_data.py | 40 + ...ion_builder_data_score_data_instruments.py | 40 + test/test_score_creation_type.py | 4 +- test/test_score_details.py | 4 +- test/test_score_fork.py | 4 +- test/test_score_license.py | 4 +- test/test_score_likes_counts.py | 4 +- test/test_score_modification.py | 4 +- test/test_score_plays_counts.py | 40 + test/test_score_privacy.py | 4 +- test/test_score_revision.py | 4 +- test/test_score_revision_creation.py | 4 +- test/test_score_revision_statistics.py | 4 +- test/test_score_source.py | 4 +- test/test_score_track.py | 4 +- test/test_score_track_creation.py | 4 +- test/test_score_track_point.py | 4 +- test/test_score_track_state.py | 4 +- test/test_score_track_type.py | 4 +- test/test_score_track_update.py | 4 +- test/test_score_views_counts.py | 4 +- test/test_task.py | 40 + test/test_task_api.py | 41 + test/test_task_export_options.py | 40 + ...score_summary.py => test_task_progress.py} | 16 +- test/test_user_admin_update.py | 4 +- test/test_user_api.py | 4 +- test/test_user_creation.py | 4 +- test/test_user_details.py | 4 +- test/test_user_details_admin.py | 4 +- test/test_user_details_admin_license.py | 40 + test/test_user_public.py | 4 +- test/test_user_public_summary.py | 4 +- 317 files changed, 16537 insertions(+), 2872 deletions(-) create mode 100644 .openapi-generator/FILES delete mode 100644 .travis.yml create mode 100644 docs/ApiAccessToken.md rename docs/{UserInstruments.md => AppScopes.md} (93%) create mode 100644 docs/AssignmentCanvas.md create mode 100644 docs/AssignmentCreationGoogleClassroom.md create mode 100644 docs/AssignmentCreationMicrosoftGraph.md create mode 100644 docs/AssignmentLti.md create mode 100644 docs/AssignmentMfc.md create mode 100644 docs/AssignmentSubmissionComment.md create mode 100644 docs/AssignmentSubmissionCommentCreation.md create mode 100644 docs/AssignmentSubmissionHistory.md create mode 100644 docs/AssignmentSubmissionHistoryAttachment.md create mode 100644 docs/AssignmentSubmissionState.md create mode 100644 docs/AssignmentSubmissionUpdateComments.md rename docs/{ScoreDataEncoding.md => AssignmentType.md} (93%) create mode 100644 docs/ClassDetailsIssues.md create mode 100644 docs/ClassDetailsIssuesSync.md create mode 100644 docs/ClassDetailsMfc.md create mode 100644 docs/ClassDetailsMicrosoftGraph.md create mode 100644 docs/CollectionApp.md create mode 100644 docs/MicrosoftGraphAssignment.md create mode 100644 docs/MicrosoftGraphSubmission.md create mode 100644 docs/OrganizationUserAccessTokenCreation.md create mode 100644 docs/OrganizationUserSigninLink.md create mode 100644 docs/OrganizationUserSigninLinkCreation.md create mode 100644 docs/ScoreCommentModeration.md create mode 100644 docs/ScoreCreationBuilderData.md create mode 100644 docs/ScoreCreationBuilderDataLayoutData.md create mode 100644 docs/ScoreCreationBuilderDataScoreData.md create mode 100644 docs/ScoreCreationBuilderDataScoreDataInstruments.md create mode 100644 docs/ScorePlaysCounts.md delete mode 100644 docs/ScoreSummary.md create mode 100644 docs/Task.md create mode 100644 docs/TaskApi.md create mode 100644 docs/TaskExportOptions.md create mode 100644 docs/TaskProgress.md delete mode 100644 docs/UserBasics.md create mode 100644 docs/UserDetailsAdminLicense.md create mode 100644 flat_api/api/task_api.py create mode 100644 flat_api/models/api_access_token.py create mode 100644 flat_api/models/app_scopes.py create mode 100644 flat_api/models/assignment_canvas.py create mode 100644 flat_api/models/assignment_creation_google_classroom.py create mode 100644 flat_api/models/assignment_creation_microsoft_graph.py create mode 100644 flat_api/models/assignment_lti.py create mode 100644 flat_api/models/assignment_mfc.py create mode 100644 flat_api/models/assignment_submission_comment.py create mode 100644 flat_api/models/assignment_submission_comment_creation.py create mode 100644 flat_api/models/assignment_submission_history.py create mode 100644 flat_api/models/assignment_submission_history_attachment.py rename flat_api/models/{score_data_encoding.py => assignment_submission_state.py} (82%) create mode 100644 flat_api/models/assignment_submission_update_comments.py rename flat_api/models/{user_instruments.py => assignment_type.py} (80%) create mode 100644 flat_api/models/class_details_issues.py create mode 100644 flat_api/models/class_details_issues_sync.py create mode 100644 flat_api/models/class_details_mfc.py create mode 100644 flat_api/models/class_details_microsoft_graph.py create mode 100644 flat_api/models/collection_app.py create mode 100644 flat_api/models/microsoft_graph_assignment.py create mode 100644 flat_api/models/microsoft_graph_submission.py create mode 100644 flat_api/models/organization_user_access_token_creation.py create mode 100644 flat_api/models/organization_user_signin_link.py create mode 100644 flat_api/models/organization_user_signin_link_creation.py create mode 100644 flat_api/models/score_comment_moderation.py create mode 100644 flat_api/models/score_creation_builder_data.py create mode 100644 flat_api/models/score_creation_builder_data_layout_data.py create mode 100644 flat_api/models/score_creation_builder_data_score_data.py create mode 100644 flat_api/models/score_creation_builder_data_score_data_instruments.py create mode 100644 flat_api/models/score_plays_counts.py delete mode 100644 flat_api/models/score_summary.py create mode 100644 flat_api/models/task.py create mode 100644 flat_api/models/task_export_options.py create mode 100644 flat_api/models/task_progress.py delete mode 100644 flat_api/models/user_basics.py create mode 100644 flat_api/models/user_details_admin_license.py rename test/{test_user_instruments.py => test_api_access_token.py} (69%) rename test/{test_user_basics.py => test_app_scopes.py} (70%) rename test/{test_score_data_encoding.py => test_assignment_canvas.py} (69%) create mode 100644 test/test_assignment_creation_google_classroom.py create mode 100644 test/test_assignment_creation_microsoft_graph.py create mode 100644 test/test_assignment_lti.py create mode 100644 test/test_assignment_mfc.py create mode 100644 test/test_assignment_submission_comment.py create mode 100644 test/test_assignment_submission_comment_creation.py create mode 100644 test/test_assignment_submission_history.py create mode 100644 test/test_assignment_submission_history_attachment.py create mode 100644 test/test_assignment_submission_state.py create mode 100644 test/test_assignment_submission_update_comments.py create mode 100644 test/test_assignment_type.py create mode 100644 test/test_class_details_issues.py create mode 100644 test/test_class_details_issues_sync.py create mode 100644 test/test_class_details_mfc.py create mode 100644 test/test_class_details_microsoft_graph.py create mode 100644 test/test_collection_app.py create mode 100644 test/test_microsoft_graph_assignment.py create mode 100644 test/test_microsoft_graph_submission.py create mode 100644 test/test_organization_user_access_token_creation.py create mode 100644 test/test_organization_user_signin_link.py create mode 100644 test/test_organization_user_signin_link_creation.py create mode 100644 test/test_score_comment_moderation.py create mode 100644 test/test_score_creation_builder_data.py create mode 100644 test/test_score_creation_builder_data_layout_data.py create mode 100644 test/test_score_creation_builder_data_score_data.py create mode 100644 test/test_score_creation_builder_data_score_data_instruments.py create mode 100644 test/test_score_plays_counts.py create mode 100644 test/test_task.py create mode 100644 test/test_task_api.py create mode 100644 test/test_task_export_options.py rename test/{test_score_summary.py => test_task_progress.py} (71%) create mode 100644 test/test_user_details_admin_license.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..6c3f85a --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,245 @@ +.gitlab-ci.yml +README.md +docs/AccountApi.md +docs/ApiAccessToken.md +docs/AppScopes.md +docs/Assignment.md +docs/AssignmentCanvas.md +docs/AssignmentCopy.md +docs/AssignmentCreation.md +docs/AssignmentCreationGoogleClassroom.md +docs/AssignmentCreationMicrosoftGraph.md +docs/AssignmentLti.md +docs/AssignmentMfc.md +docs/AssignmentSubmission.md +docs/AssignmentSubmissionComment.md +docs/AssignmentSubmissionCommentCreation.md +docs/AssignmentSubmissionHistory.md +docs/AssignmentSubmissionHistoryAttachment.md +docs/AssignmentSubmissionState.md +docs/AssignmentSubmissionUpdate.md +docs/AssignmentSubmissionUpdateComments.md +docs/AssignmentType.md +docs/ClassApi.md +docs/ClassAttachmentCreation.md +docs/ClassCreation.md +docs/ClassDetails.md +docs/ClassDetailsCanvas.md +docs/ClassDetailsClever.md +docs/ClassDetailsGoogleClassroom.md +docs/ClassDetailsGoogleDrive.md +docs/ClassDetailsIssues.md +docs/ClassDetailsIssuesSync.md +docs/ClassDetailsLti.md +docs/ClassDetailsMfc.md +docs/ClassDetailsMicrosoftGraph.md +docs/ClassRoles.md +docs/ClassState.md +docs/ClassUpdate.md +docs/Collection.md +docs/CollectionApi.md +docs/CollectionApp.md +docs/CollectionCapabilities.md +docs/CollectionCreation.md +docs/CollectionModification.md +docs/CollectionPrivacy.md +docs/CollectionType.md +docs/FlatErrorResponse.md +docs/FlatLocales.md +docs/GoogleClassroomCoursework.md +docs/GoogleClassroomSubmission.md +docs/Group.md +docs/GroupApi.md +docs/GroupDetails.md +docs/GroupType.md +docs/LicenseMode.md +docs/LicenseSources.md +docs/LmsName.md +docs/LtiCredentials.md +docs/LtiCredentialsCreation.md +docs/MediaAttachment.md +docs/MediaScoreSharingMode.md +docs/MicrosoftGraphAssignment.md +docs/MicrosoftGraphSubmission.md +docs/OrganizationApi.md +docs/OrganizationInvitation.md +docs/OrganizationInvitationCreation.md +docs/OrganizationRoles.md +docs/OrganizationUserAccessTokenCreation.md +docs/OrganizationUserSigninLink.md +docs/OrganizationUserSigninLinkCreation.md +docs/ResourceCollaborator.md +docs/ResourceCollaboratorCreation.md +docs/ResourceRights.md +docs/ScoreApi.md +docs/ScoreComment.md +docs/ScoreCommentContext.md +docs/ScoreCommentCreation.md +docs/ScoreCommentModeration.md +docs/ScoreCommentUpdate.md +docs/ScoreCommentsCounts.md +docs/ScoreCreation.md +docs/ScoreCreationBuilderData.md +docs/ScoreCreationBuilderDataLayoutData.md +docs/ScoreCreationBuilderDataScoreData.md +docs/ScoreCreationBuilderDataScoreDataInstruments.md +docs/ScoreCreationType.md +docs/ScoreDetails.md +docs/ScoreFork.md +docs/ScoreLicense.md +docs/ScoreLikesCounts.md +docs/ScoreModification.md +docs/ScorePlaysCounts.md +docs/ScorePrivacy.md +docs/ScoreRevision.md +docs/ScoreRevisionCreation.md +docs/ScoreRevisionStatistics.md +docs/ScoreSource.md +docs/ScoreTrack.md +docs/ScoreTrackCreation.md +docs/ScoreTrackPoint.md +docs/ScoreTrackState.md +docs/ScoreTrackType.md +docs/ScoreTrackUpdate.md +docs/ScoreViewsCounts.md +docs/Task.md +docs/TaskApi.md +docs/TaskExportOptions.md +docs/TaskProgress.md +docs/UserAdminUpdate.md +docs/UserApi.md +docs/UserCreation.md +docs/UserDetails.md +docs/UserDetailsAdmin.md +docs/UserDetailsAdminLicense.md +docs/UserPublic.md +docs/UserPublicSummary.md +flat_api/__init__.py +flat_api/api/__init__.py +flat_api/api/account_api.py +flat_api/api/class_api.py +flat_api/api/collection_api.py +flat_api/api/group_api.py +flat_api/api/organization_api.py +flat_api/api/score_api.py +flat_api/api/task_api.py +flat_api/api/user_api.py +flat_api/api_client.py +flat_api/apis/__init__.py +flat_api/configuration.py +flat_api/exceptions.py +flat_api/model/__init__.py +flat_api/model/api_access_token.py +flat_api/model/app_scopes.py +flat_api/model/assignment.py +flat_api/model/assignment_canvas.py +flat_api/model/assignment_copy.py +flat_api/model/assignment_creation.py +flat_api/model/assignment_creation_google_classroom.py +flat_api/model/assignment_creation_microsoft_graph.py +flat_api/model/assignment_lti.py +flat_api/model/assignment_mfc.py +flat_api/model/assignment_submission.py +flat_api/model/assignment_submission_comment.py +flat_api/model/assignment_submission_comment_creation.py +flat_api/model/assignment_submission_history.py +flat_api/model/assignment_submission_history_attachment.py +flat_api/model/assignment_submission_state.py +flat_api/model/assignment_submission_update.py +flat_api/model/assignment_submission_update_comments.py +flat_api/model/assignment_type.py +flat_api/model/class_attachment_creation.py +flat_api/model/class_creation.py +flat_api/model/class_details.py +flat_api/model/class_details_canvas.py +flat_api/model/class_details_clever.py +flat_api/model/class_details_google_classroom.py +flat_api/model/class_details_google_drive.py +flat_api/model/class_details_issues.py +flat_api/model/class_details_issues_sync.py +flat_api/model/class_details_lti.py +flat_api/model/class_details_mfc.py +flat_api/model/class_details_microsoft_graph.py +flat_api/model/class_roles.py +flat_api/model/class_state.py +flat_api/model/class_update.py +flat_api/model/collection.py +flat_api/model/collection_app.py +flat_api/model/collection_capabilities.py +flat_api/model/collection_creation.py +flat_api/model/collection_modification.py +flat_api/model/collection_privacy.py +flat_api/model/collection_type.py +flat_api/model/flat_error_response.py +flat_api/model/flat_locales.py +flat_api/model/google_classroom_coursework.py +flat_api/model/google_classroom_submission.py +flat_api/model/group.py +flat_api/model/group_details.py +flat_api/model/group_type.py +flat_api/model/license_mode.py +flat_api/model/license_sources.py +flat_api/model/lms_name.py +flat_api/model/lti_credentials.py +flat_api/model/lti_credentials_creation.py +flat_api/model/media_attachment.py +flat_api/model/media_score_sharing_mode.py +flat_api/model/microsoft_graph_assignment.py +flat_api/model/microsoft_graph_submission.py +flat_api/model/organization_invitation.py +flat_api/model/organization_invitation_creation.py +flat_api/model/organization_roles.py +flat_api/model/organization_user_access_token_creation.py +flat_api/model/organization_user_signin_link.py +flat_api/model/organization_user_signin_link_creation.py +flat_api/model/resource_collaborator.py +flat_api/model/resource_collaborator_creation.py +flat_api/model/resource_rights.py +flat_api/model/score_comment.py +flat_api/model/score_comment_context.py +flat_api/model/score_comment_creation.py +flat_api/model/score_comment_moderation.py +flat_api/model/score_comment_update.py +flat_api/model/score_comments_counts.py +flat_api/model/score_creation.py +flat_api/model/score_creation_builder_data.py +flat_api/model/score_creation_builder_data_layout_data.py +flat_api/model/score_creation_builder_data_score_data.py +flat_api/model/score_creation_builder_data_score_data_instruments.py +flat_api/model/score_creation_type.py +flat_api/model/score_details.py +flat_api/model/score_fork.py +flat_api/model/score_license.py +flat_api/model/score_likes_counts.py +flat_api/model/score_modification.py +flat_api/model/score_plays_counts.py +flat_api/model/score_privacy.py +flat_api/model/score_revision.py +flat_api/model/score_revision_creation.py +flat_api/model/score_revision_statistics.py +flat_api/model/score_source.py +flat_api/model/score_track.py +flat_api/model/score_track_creation.py +flat_api/model/score_track_point.py +flat_api/model/score_track_state.py +flat_api/model/score_track_type.py +flat_api/model/score_track_update.py +flat_api/model/score_views_counts.py +flat_api/model/task.py +flat_api/model/task_export_options.py +flat_api/model/task_progress.py +flat_api/model/user_admin_update.py +flat_api/model/user_creation.py +flat_api/model/user_details.py +flat_api/model/user_details_admin.py +flat_api/model/user_details_admin_license.py +flat_api/model/user_public.py +flat_api/model/user_public_summary.py +flat_api/model_utils.py +flat_api/models/__init__.py +flat_api/rest.py +requirements.txt +setup.cfg +test-requirements.txt +test/__init__.py +tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6d94c9c..0fa4ae4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +3.3.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e3c7b73..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "3.7-dev" - #- "nightly" # points to the latest development branch e.g. 3.6-dev -# command to install dependencies -install: "pip install -r requirements.txt" -# command to run tests -script: nosetests diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f200a8..30ab189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.7.0 (API v2.17.0) + +* Updated API from v2.6.0 to v2.17.0 +* Use flatten schema to fix inherance model issues + ## 0.6.0 (API v2.6.0) * feat(collections): Add new Collections API endpoints diff --git a/README.md b/README.md index 6cb9a07..62a2f32 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ import flat_api ## Getting Started -Please follow the installation procedure above and then run the following: +Please follow the [installation procedure](#installation--usage) and then run the following: ```python from __future__ import print_function @@ -58,17 +58,17 @@ import flat_api from flat_api.rest import ApiException from pprint import pprint +# Configure OAuth2 access token for authorization: OAuth2 configuration = flat_api.Configuration() -# Configure your personal access token or OAuth2 access token configuration.access_token = 'YOUR_ACCESS_TOKEN' -flat_api_client = flat_api.ApiClient(configuration) # create an instance of the API class -api_instance = flat_api.AccountApi(flat_api_client) +api_instance = flat_api.AccountApi(flat_api.ApiClient(configuration)) +only_id = False # bool | Only return the user id (optional) (default to False) try: # Get current user profile - api_response = api_instance.get_authenticated_user() + api_response = api_instance.get_authenticated_user(only_id=only_id) pprint(api_response) except ApiException as e: print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) @@ -84,23 +84,34 @@ Class | Method | HTTP request | Description *AccountApi* | [**get_authenticated_user**](docs/AccountApi.md#get_authenticated_user) | **GET** /me | Get current user profile *ClassApi* | [**activate_class**](docs/ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class *ClassApi* | [**add_class_user**](docs/ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class +*ClassApi* | [**archive_assignment**](docs/ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment *ClassApi* | [**archive_class**](docs/ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class *ClassApi* | [**copy_assignment**](docs/ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment *ClassApi* | [**create_assignment**](docs/ClassApi.md#create_assignment) | **POST** /classes/{class}/assignments | Assignment creation *ClassApi* | [**create_class**](docs/ClassApi.md#create_class) | **POST** /classes | Create a new class *ClassApi* | [**create_submission**](docs/ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission *ClassApi* | [**delete_class_user**](docs/ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class +*ClassApi* | [**delete_submission**](docs/ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Delete a submission +*ClassApi* | [**delete_submission_comment**](docs/ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission *ClassApi* | [**edit_submission**](docs/ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission *ClassApi* | [**enroll_class**](docs/ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class +*ClassApi* | [**export_submissions_reviews_as_csv**](docs/ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +*ClassApi* | [**export_submissions_reviews_as_excel**](docs/ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +*ClassApi* | [**fork_score**](docs/ClassApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score *ClassApi* | [**get_class**](docs/ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class *ClassApi* | [**get_score_submissions**](docs/ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score *ClassApi* | [**get_submission**](docs/ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +*ClassApi* | [**get_submission_comments**](docs/ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +*ClassApi* | [**get_submission_history**](docs/ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission *ClassApi* | [**get_submissions**](docs/ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions *ClassApi* | [**list_assignments**](docs/ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing *ClassApi* | [**list_class_student_submissions**](docs/ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student *ClassApi* | [**list_classes**](docs/ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user +*ClassApi* | [**post_submission_comment**](docs/ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +*ClassApi* | [**unarchive_assignment**](docs/ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. *ClassApi* | [**unarchive_class**](docs/ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class *ClassApi* | [**update_class**](docs/ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class +*ClassApi* | [**update_submission_comment**](docs/ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission *CollectionApi* | [**add_score_to_collection**](docs/CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection *CollectionApi* | [**create_collection**](docs/CollectionApi.md#create_collection) | **POST** /collections | Create a new collection *CollectionApi* | [**delete_collection**](docs/CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection @@ -113,9 +124,12 @@ Class | Method | HTTP request | Description *GroupApi* | [**get_group_details**](docs/GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information *GroupApi* | [**get_group_scores**](docs/GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores *GroupApi* | [**list_group_users**](docs/GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users +*OrganizationApi* | [**count_orga_users**](docs/OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters *OrganizationApi* | [**create_lti_credentials**](docs/OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials *OrganizationApi* | [**create_organization_invitation**](docs/OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization *OrganizationApi* | [**create_organization_user**](docs/OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account +*OrganizationApi* | [**create_organization_user_access_token**](docs/OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +*OrganizationApi* | [**create_organization_user_signin_link**](docs/OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user *OrganizationApi* | [**list_lti_credentials**](docs/OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials *OrganizationApi* | [**list_organization_invitations**](docs/OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations *OrganizationApi* | [**list_organization_users**](docs/OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users @@ -125,6 +139,7 @@ Class | Method | HTTP request | Description *OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information *ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator *ScoreApi* | [**add_score_track**](docs/ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score +*ScoreApi* | [**create_export_task**](docs/ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task *ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score *ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision *ScoreApi* | [**delete_score**](docs/ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score @@ -152,6 +167,7 @@ Class | Method | HTTP request | Description *ScoreApi* | [**untrash_score**](docs/ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score *ScoreApi* | [**update_score_comment**](docs/ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment *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 +*TaskApi* | [**get_task**](docs/TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details *UserApi* | [**ger_user_likes**](docs/UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores *UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile *UserApi* | [**get_user_scores**](docs/UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores @@ -159,11 +175,25 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [ApiAccessToken](docs/ApiAccessToken.md) + - [AppScopes](docs/AppScopes.md) - [Assignment](docs/Assignment.md) + - [AssignmentCanvas](docs/AssignmentCanvas.md) - [AssignmentCopy](docs/AssignmentCopy.md) - [AssignmentCreation](docs/AssignmentCreation.md) + - [AssignmentCreationGoogleClassroom](docs/AssignmentCreationGoogleClassroom.md) + - [AssignmentCreationMicrosoftGraph](docs/AssignmentCreationMicrosoftGraph.md) + - [AssignmentLti](docs/AssignmentLti.md) + - [AssignmentMfc](docs/AssignmentMfc.md) - [AssignmentSubmission](docs/AssignmentSubmission.md) + - [AssignmentSubmissionComment](docs/AssignmentSubmissionComment.md) + - [AssignmentSubmissionCommentCreation](docs/AssignmentSubmissionCommentCreation.md) + - [AssignmentSubmissionHistory](docs/AssignmentSubmissionHistory.md) + - [AssignmentSubmissionHistoryAttachment](docs/AssignmentSubmissionHistoryAttachment.md) + - [AssignmentSubmissionState](docs/AssignmentSubmissionState.md) - [AssignmentSubmissionUpdate](docs/AssignmentSubmissionUpdate.md) + - [AssignmentSubmissionUpdateComments](docs/AssignmentSubmissionUpdateComments.md) + - [AssignmentType](docs/AssignmentType.md) - [ClassAttachmentCreation](docs/ClassAttachmentCreation.md) - [ClassCreation](docs/ClassCreation.md) - [ClassDetails](docs/ClassDetails.md) @@ -171,11 +201,16 @@ Class | Method | HTTP request | Description - [ClassDetailsClever](docs/ClassDetailsClever.md) - [ClassDetailsGoogleClassroom](docs/ClassDetailsGoogleClassroom.md) - [ClassDetailsGoogleDrive](docs/ClassDetailsGoogleDrive.md) + - [ClassDetailsIssues](docs/ClassDetailsIssues.md) + - [ClassDetailsIssuesSync](docs/ClassDetailsIssuesSync.md) - [ClassDetailsLti](docs/ClassDetailsLti.md) + - [ClassDetailsMfc](docs/ClassDetailsMfc.md) + - [ClassDetailsMicrosoftGraph](docs/ClassDetailsMicrosoftGraph.md) - [ClassRoles](docs/ClassRoles.md) - [ClassState](docs/ClassState.md) - [ClassUpdate](docs/ClassUpdate.md) - [Collection](docs/Collection.md) + - [CollectionApp](docs/CollectionApp.md) - [CollectionCapabilities](docs/CollectionCapabilities.md) - [CollectionCreation](docs/CollectionCreation.md) - [CollectionModification](docs/CollectionModification.md) @@ -195,31 +230,40 @@ Class | Method | HTTP request | Description - [LtiCredentialsCreation](docs/LtiCredentialsCreation.md) - [MediaAttachment](docs/MediaAttachment.md) - [MediaScoreSharingMode](docs/MediaScoreSharingMode.md) + - [MicrosoftGraphAssignment](docs/MicrosoftGraphAssignment.md) + - [MicrosoftGraphSubmission](docs/MicrosoftGraphSubmission.md) - [OrganizationInvitation](docs/OrganizationInvitation.md) - [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md) - [OrganizationRoles](docs/OrganizationRoles.md) + - [OrganizationUserAccessTokenCreation](docs/OrganizationUserAccessTokenCreation.md) + - [OrganizationUserSigninLink](docs/OrganizationUserSigninLink.md) + - [OrganizationUserSigninLinkCreation](docs/OrganizationUserSigninLinkCreation.md) - [ResourceCollaborator](docs/ResourceCollaborator.md) - [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md) - [ResourceRights](docs/ResourceRights.md) - [ScoreComment](docs/ScoreComment.md) - [ScoreCommentContext](docs/ScoreCommentContext.md) - [ScoreCommentCreation](docs/ScoreCommentCreation.md) + - [ScoreCommentModeration](docs/ScoreCommentModeration.md) - [ScoreCommentUpdate](docs/ScoreCommentUpdate.md) - [ScoreCommentsCounts](docs/ScoreCommentsCounts.md) - [ScoreCreation](docs/ScoreCreation.md) + - [ScoreCreationBuilderData](docs/ScoreCreationBuilderData.md) + - [ScoreCreationBuilderDataLayoutData](docs/ScoreCreationBuilderDataLayoutData.md) + - [ScoreCreationBuilderDataScoreData](docs/ScoreCreationBuilderDataScoreData.md) + - [ScoreCreationBuilderDataScoreDataInstruments](docs/ScoreCreationBuilderDataScoreDataInstruments.md) - [ScoreCreationType](docs/ScoreCreationType.md) - - [ScoreDataEncoding](docs/ScoreDataEncoding.md) - [ScoreDetails](docs/ScoreDetails.md) - [ScoreFork](docs/ScoreFork.md) - [ScoreLicense](docs/ScoreLicense.md) - [ScoreLikesCounts](docs/ScoreLikesCounts.md) - [ScoreModification](docs/ScoreModification.md) + - [ScorePlaysCounts](docs/ScorePlaysCounts.md) - [ScorePrivacy](docs/ScorePrivacy.md) - [ScoreRevision](docs/ScoreRevision.md) - [ScoreRevisionCreation](docs/ScoreRevisionCreation.md) - [ScoreRevisionStatistics](docs/ScoreRevisionStatistics.md) - [ScoreSource](docs/ScoreSource.md) - - [ScoreSummary](docs/ScoreSummary.md) - [ScoreTrack](docs/ScoreTrack.md) - [ScoreTrackCreation](docs/ScoreTrackCreation.md) - [ScoreTrackPoint](docs/ScoreTrackPoint.md) @@ -227,12 +271,14 @@ Class | Method | HTTP request | Description - [ScoreTrackType](docs/ScoreTrackType.md) - [ScoreTrackUpdate](docs/ScoreTrackUpdate.md) - [ScoreViewsCounts](docs/ScoreViewsCounts.md) + - [Task](docs/Task.md) + - [TaskExportOptions](docs/TaskExportOptions.md) + - [TaskProgress](docs/TaskProgress.md) - [UserAdminUpdate](docs/UserAdminUpdate.md) - - [UserBasics](docs/UserBasics.md) - [UserCreation](docs/UserCreation.md) - [UserDetails](docs/UserDetails.md) - [UserDetailsAdmin](docs/UserDetailsAdmin.md) - - [UserInstruments](docs/UserInstruments.md) + - [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md) - [UserPublic](docs/UserPublic.md) - [UserPublicSummary](docs/UserPublicSummary.md) @@ -264,3 +310,11 @@ Class | Method | HTTP request | Description - **edu.admin.lti.readonly**: Read-only access to the LTI Credentials of an organization. - **edu.admin.users**: Access and manage the users and invitations of the organization. - **edu.admin.users.readonly**: Read-only access to the users and invitations of the organization. + - **tasks.readonly**: Read-only access to export tasks created by this account. + + +## Author + +developers@flat.io + + diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 5a1c26f..596fedb 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_authenticated_user** -> UserDetails get_authenticated_user() +> UserDetails get_authenticated_user(only_id=only_id) Get current user profile @@ -30,17 +30,21 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.AccountApi(flat_api.ApiClient(configuration)) +only_id = False # bool | Only return the user id (optional) (default to False) try: # Get current user profile - api_response = api_instance.get_authenticated_user() + api_response = api_instance.get_authenticated_user(only_id=only_id) pprint(api_response) except ApiException as e: print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **only_id** | **bool**| Only return the user id | [optional] [default to False] ### Return type diff --git a/docs/ApiAccessToken.md b/docs/ApiAccessToken.md new file mode 100644 index 0000000..c916acb --- /dev/null +++ b/docs/ApiAccessToken.md @@ -0,0 +1,15 @@ +# ApiAccessToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of this private token | [optional] +**name** | **str** | Name of the personal access token | [optional] +**token** | **str** | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] +**issued_date** | **datetime** | The date then this token was issued | [optional] +**expiration_date** | **datetime** | The date then this token will expire | [optional] +**scopes** | [**list[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserInstruments.md b/docs/AppScopes.md similarity index 93% rename from docs/UserInstruments.md rename to docs/AppScopes.md index b018875..9dd92a6 100644 --- a/docs/UserInstruments.md +++ b/docs/AppScopes.md @@ -1,4 +1,4 @@ -# UserInstruments +# AppScopes ## Properties Name | Type | Description | Notes diff --git a/docs/Assignment.md b/docs/Assignment.md index 4ff32d0..8455358 100644 --- a/docs/Assignment.md +++ b/docs/Assignment.md @@ -4,16 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **state** | **str** | State of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] **title** | **str** | Title of the assignment | [optional] **classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] **description** | **str** | Description and content of the assignment | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] **attachments** | [**list[MediaAttachment]**](MediaAttachment.md) | | [optional] **submissions** | [**list[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] **creator** | **str** | The User unique identifier of the creator of this assignment | [optional] **creation_date** | **datetime** | The creation date of this assignment | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] **due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] **google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] +**microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] +**mfc** | [**AssignmentMfc**](AssignmentMfc.md) | | [optional] +**canvas** | [**AssignmentCanvas**](AssignmentCanvas.md) | | [optional] +**lti** | [**AssignmentLti**](AssignmentLti.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCanvas.md b/docs/AssignmentCanvas.md new file mode 100644 index 0000000..19ecce7 --- /dev/null +++ b/docs/AssignmentCanvas.md @@ -0,0 +1,11 @@ +# AssignmentCanvas + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on Canvas assignment | [optional] +**alternate_link** | **str** | Link to Canvas assignment | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopy.md b/docs/AssignmentCopy.md index 361827b..582b4b6 100644 --- a/docs/AssignmentCopy.md +++ b/docs/AssignmentCopy.md @@ -3,7 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classroom** | **str** | The destination classroom where the assignment will be copied | +**classroom** | **str** | The destination classroom where the assignment will be copied | [optional] +**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCreation.md b/docs/AssignmentCreation.md index b9fc9f4..5a5e2e2 100644 --- a/docs/AssignmentCreation.md +++ b/docs/AssignmentCreation.md @@ -3,11 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**state** | **str** | State of the assignment | [optional] **title** | **str** | Title of the assignment | [optional] **description** | **str** | Description and content of the assignment | [optional] **attachments** | [**list[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] **due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**google_classroom** | [**AssignmentCreationGoogleClassroom**](AssignmentCreationGoogleClassroom.md) | | [optional] +**microsoft_graph** | [**AssignmentCreationMicrosoftGraph**](AssignmentCreationMicrosoftGraph.md) | | [optional] +**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] +**assigned_students** | **list[str]** | Identifiers for the students that have access to the assignment | [optional] +**shuffle_exercises** | **bool** | Mixing exercises for each students | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCreationGoogleClassroom.md b/docs/AssignmentCreationGoogleClassroom.md new file mode 100644 index 0000000..4af0526 --- /dev/null +++ b/docs/AssignmentCreationGoogleClassroom.md @@ -0,0 +1,10 @@ +# AssignmentCreationGoogleClassroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCreationMicrosoftGraph.md b/docs/AssignmentCreationMicrosoftGraph.md new file mode 100644 index 0000000..2cd74b1 --- /dev/null +++ b/docs/AssignmentCreationMicrosoftGraph.md @@ -0,0 +1,10 @@ +# AssignmentCreationMicrosoftGraph + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **list[str]** | List of categories this assignment belongs to | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentLti.md b/docs/AssignmentLti.md new file mode 100644 index 0000000..36e1c93 --- /dev/null +++ b/docs/AssignmentLti.md @@ -0,0 +1,10 @@ +# AssignmentLti + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Resource ID in the LMS | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentMfc.md b/docs/AssignmentMfc.md new file mode 100644 index 0000000..aae84c3 --- /dev/null +++ b/docs/AssignmentMfc.md @@ -0,0 +1,11 @@ +# AssignmentMfc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on MusicFirst Task | [optional] +**alternate_link** | **str** | Link to MusicFirst Classroom task | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmission.md b/docs/AssignmentSubmission.md index 98d2901..da82d6e 100644 --- a/docs/AssignmentSubmission.md +++ b/docs/AssignmentSubmission.md @@ -4,17 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the submission | [optional] +**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | [optional] **classroom** | **str** | Unique identifier of the classroom where the assignment was posted | [optional] **assignment** | **str** | Unique identifier of the assignment | [optional] **creator** | **str** | The User identifier of the student who created the submission | [optional] **creation_date** | **str** | The date when the submission was created | [optional] **attachments** | [**list[MediaAttachment]**](MediaAttachment.md) | | [optional] **submission_date** | **str** | The date when the student submitted his work | [optional] -**student_comment** | **str** | An optionnal comment sent by the student when submitting his work | [optional] **return_date** | **str** | The date when the teacher returned the work | [optional] -**return_feedback** | **str** | The feedback associated with the return | [optional] **return_creator** | **str** | The User unique identifier of the teacher who returned the submission | [optional] +**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] +**exercises_ids** | **list[str]** | The ids of exercises when they need to be in a specific order | [optional] **google_classroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] +**microsoft_graph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionComment.md b/docs/AssignmentSubmissionComment.md new file mode 100644 index 0000000..6cb4c9d --- /dev/null +++ b/docs/AssignmentSubmissionComment.md @@ -0,0 +1,16 @@ +# AssignmentSubmissionComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The comment unique identifier | [optional] +**user** | **str** | The author unique identifier | [optional] +**submission** | **str** | The submission unique identifier | [optional] +**date** | **datetime** | The date when the comment was posted | [optional] +**modification_date** | **datetime** | The date of the last comment modification | [optional] +**comment** | **str** | The comment text | [optional] +**unread** | **bool** | True if the comment is unread by the current user | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/AssignmentSubmissionCommentCreation.md new file mode 100644 index 0000000..3e0e3bb --- /dev/null +++ b/docs/AssignmentSubmissionCommentCreation.md @@ -0,0 +1,10 @@ +# AssignmentSubmissionCommentCreation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | **str** | The comment text | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistory.md b/docs/AssignmentSubmissionHistory.md new file mode 100644 index 0000000..e99a2a5 --- /dev/null +++ b/docs/AssignmentSubmissionHistory.md @@ -0,0 +1,16 @@ +# AssignmentSubmissionHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **datetime** | The date when the submission was changed | [optional] +**users** | **list[str]** | The user(s) unique identifier(s) who made the change | [optional] +**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | [optional] +**draft_grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] +**grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] +**max_points** | **float** | The denominator of the grade at this time in the submission grade history | [optional] +**attachment** | [**AssignmentSubmissionHistoryAttachment**](AssignmentSubmissionHistoryAttachment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistoryAttachment.md b/docs/AssignmentSubmissionHistoryAttachment.md new file mode 100644 index 0000000..6bcd671 --- /dev/null +++ b/docs/AssignmentSubmissionHistoryAttachment.md @@ -0,0 +1,11 @@ +# AssignmentSubmissionHistoryAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **str** | The score identifier that changed | [optional] +**revision** | **str** | The revision identifier that changed | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionState.md b/docs/AssignmentSubmissionState.md new file mode 100644 index 0000000..ff2c7c9 --- /dev/null +++ b/docs/AssignmentSubmissionState.md @@ -0,0 +1,9 @@ +# AssignmentSubmissionState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/AssignmentSubmissionUpdate.md index 268280f..8fd0cc2 100644 --- a/docs/AssignmentSubmissionUpdate.md +++ b/docs/AssignmentSubmissionUpdate.md @@ -4,9 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attachments** | [**list[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**student_comment** | **str** | An optionnal comment sent by the student when submitting his work | [optional] **submit** | **bool** | If `true`, the submission will be marked as done | [optional] -**return_feedback** | **str** | The feedback associated with the return | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] +**exercises_ids** | **list[str]** | The ids of exercises when they need to be in a specific order | [optional] +**_return** | **bool** | If `true`, the submission will be marked as done | [optional] +**comments** | [**AssignmentSubmissionUpdateComments**](AssignmentSubmissionUpdateComments.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionUpdateComments.md b/docs/AssignmentSubmissionUpdateComments.md new file mode 100644 index 0000000..d643876 --- /dev/null +++ b/docs/AssignmentSubmissionUpdateComments.md @@ -0,0 +1,11 @@ +# AssignmentSubmissionUpdateComments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of comments added to the submission | [optional] +**unread** | **float** | The number of unread comments for the current user | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreDataEncoding.md b/docs/AssignmentType.md similarity index 93% rename from docs/ScoreDataEncoding.md rename to docs/AssignmentType.md index a003c65..447d720 100644 --- a/docs/ScoreDataEncoding.md +++ b/docs/AssignmentType.md @@ -1,4 +1,4 @@ -# ScoreDataEncoding +# AssignmentType ## Properties Name | Type | Description | Notes diff --git a/docs/ClassApi.md b/docs/ClassApi.md index 27ae749..c9d8096 100644 --- a/docs/ClassApi.md +++ b/docs/ClassApi.md @@ -6,23 +6,34 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**activate_class**](ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class [**add_class_user**](ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class +[**archive_assignment**](ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment [**archive_class**](ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class [**copy_assignment**](ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment [**create_assignment**](ClassApi.md#create_assignment) | **POST** /classes/{class}/assignments | Assignment creation [**create_class**](ClassApi.md#create_class) | **POST** /classes | Create a new class [**create_submission**](ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission [**delete_class_user**](ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class +[**delete_submission**](ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Delete a submission +[**delete_submission_comment**](ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission [**edit_submission**](ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission [**enroll_class**](ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class +[**export_submissions_reviews_as_csv**](ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +[**export_submissions_reviews_as_excel**](ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +[**fork_score**](ClassApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score [**get_class**](ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class [**get_score_submissions**](ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score [**get_submission**](ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +[**get_submission_comments**](ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +[**get_submission_history**](ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission [**get_submissions**](ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions [**list_assignments**](ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing [**list_class_student_submissions**](ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student [**list_classes**](ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user +[**post_submission_comment**](ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +[**unarchive_assignment**](ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. [**unarchive_class**](ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class [**update_class**](ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class +[**update_submission_comment**](ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission # **activate_class** @@ -134,6 +145,62 @@ void (empty response body) [[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) +# **archive_assignment** +> Assignment archive_assignment(_class, assignment) + +Archive the assignment + +Archive the assignment + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment + +try: + # Archive the assignment + api_response = api_instance.archive_assignment(_class, assignment) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->archive_assignment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + # **archive_class** > ClassDetails archive_class(_class) @@ -189,7 +256,7 @@ Name | Type | Description | Notes [[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) # **copy_assignment** -> Assignment copy_assignment(_class, assignment, assignment_copy) +> Assignment copy_assignment(_class, assignment, body) Copy an assignment @@ -213,11 +280,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -assignment_copy = flat_api.AssignmentCopy() # AssignmentCopy | +body = flat_api.AssignmentCopy() # AssignmentCopy | try: # Copy an assignment - api_response = api_instance.copy_assignment(_class, assignment, assignment_copy) + api_response = api_instance.copy_assignment(_class, assignment, body) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->copy_assignment: %s\n" % e) @@ -229,7 +296,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | - **assignment_copy** | [**AssignmentCopy**](AssignmentCopy.md)| | + **body** | [**AssignmentCopy**](AssignmentCopy.md)| | ### Return type @@ -247,7 +314,7 @@ Name | Type | Description | Notes [[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) # **create_assignment** -> Assignment create_assignment(_class, assignment_creation=assignment_creation) +> Assignment create_assignment(_class, body=body) Assignment creation @@ -270,11 +337,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class -assignment_creation = flat_api.AssignmentCreation() # AssignmentCreation | (optional) +body = flat_api.AssignmentCreation() # AssignmentCreation | (optional) try: # Assignment creation - api_response = api_instance.create_assignment(_class, assignment_creation=assignment_creation) + api_response = api_instance.create_assignment(_class, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_assignment: %s\n" % e) @@ -285,7 +352,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | - **assignment_creation** | [**AssignmentCreation**](AssignmentCreation.md)| | [optional] + **body** | [**AssignmentCreation**](AssignmentCreation.md)| | [optional] ### Return type @@ -303,11 +370,11 @@ Name | Type | Description | Notes [[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) # **create_class** -> ClassDetails create_class(class_creation) +> ClassDetails create_class(body) Create a new class -Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. +Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. ### Example @@ -325,11 +392,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -class_creation = flat_api.ClassCreation() # ClassCreation | +body = flat_api.ClassCreation() # ClassCreation | try: # Create a new class - api_response = api_instance.create_class(class_creation) + api_response = api_instance.create_class(body) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_class: %s\n" % e) @@ -339,7 +406,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **class_creation** | [**ClassCreation**](ClassCreation.md)| | + **body** | [**ClassCreation**](ClassCreation.md)| | ### Return type @@ -357,11 +424,11 @@ Name | Type | Description | Notes [[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) # **create_submission** -> AssignmentSubmission create_submission(_class, assignment, assignment_submission_update) +> AssignmentSubmission create_submission(_class, assignment, body) Create or edit a submission -Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. +Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. ### Example @@ -381,11 +448,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -assignment_submission_update = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | +body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | try: # Create or edit a submission - api_response = api_instance.create_submission(_class, assignment, assignment_submission_update) + api_response = api_instance.create_submission(_class, assignment, body) pprint(api_response) except ApiException as e: print("Exception when calling ClassApi->create_submission: %s\n" % e) @@ -397,7 +464,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | - **assignment_submission_update** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type @@ -469,12 +536,12 @@ void (empty response body) [[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) -# **edit_submission** -> AssignmentSubmission edit_submission(_class, assignment, submission, assignment_submission_update) +# **delete_submission** +> delete_submission(_class, assignment, submission) -Edit a submission +Delete a submission -Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` +Use this method as a teacher to delete a submission and allow student to start over the assignment ### Example @@ -495,14 +562,12 @@ api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -assignment_submission_update = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | try: - # Edit a submission - api_response = api_instance.edit_submission(_class, assignment, submission, assignment_submission_update) - pprint(api_response) + # Delete a submission + api_instance.delete_submission(_class, assignment, submission) except ApiException as e: - print("Exception when calling ClassApi->edit_submission: %s\n" % e) + print("Exception when calling ClassApi->delete_submission: %s\n" % e) ``` ### Parameters @@ -512,11 +577,10 @@ Name | Type | Description | Notes **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | **submission** | **str**| Unique identifier of the submission | - **assignment_submission_update** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type -[**AssignmentSubmission**](AssignmentSubmission.md) +void (empty response body) ### Authorization @@ -524,17 +588,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[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) -# **enroll_class** -> ClassDetails enroll_class(enrollment_code) - -Join a class +# **delete_submission_comment** +> delete_submission_comment(_class, assignment, submission, comment) -Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. +Delete a feedback comment to a submission ### Example @@ -552,25 +614,30 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission +comment = 'comment_example' # str | Unique identifier of the comment try: - # Join a class - api_response = api_instance.enroll_class(enrollment_code) - pprint(api_response) + # Delete a feedback comment to a submission + api_instance.delete_submission_comment(_class, assignment, submission, comment) except ApiException as e: - print("Exception when calling ClassApi->enroll_class: %s\n" % e) + print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | ### Return type -[**ClassDetails**](ClassDetails.md) +void (empty response body) ### Authorization @@ -583,10 +650,12 @@ Name | Type | Description | Notes [[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) -# **get_class** -> ClassDetails get_class(_class) +# **edit_submission** +> AssignmentSubmission edit_submission(_class, assignment, submission, body) -Get the details of a single class +Edit a submission + +Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` ### Example @@ -605,13 +674,16 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission +body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | try: - # Get the details of a single class - api_response = api_instance.get_class(_class) + # Edit a submission + api_response = api_instance.edit_submission(_class, assignment, submission, body) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->get_class: %s\n" % e) + print("Exception when calling ClassApi->edit_submission: %s\n" % e) ``` ### Parameters @@ -619,10 +691,13 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type -[**ClassDetails**](ClassDetails.md) +[**AssignmentSubmission**](AssignmentSubmission.md) ### Authorization @@ -630,17 +705,17 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[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) -# **get_score_submissions** -> list[AssignmentSubmission] get_score_submissions(score) +# **enroll_class** +> ClassDetails enroll_class(enrollment_code) -List submissions related to the score +Join a class -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. +Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. ### Example @@ -658,25 +733,25 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` try: - # List submissions related to the score - api_response = api_instance.get_score_submissions(score) + # Join a class + api_response = api_instance.enroll_class(enrollment_code) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) + print("Exception when calling ClassApi->enroll_class: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | + **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | ### Return type -[**list[AssignmentSubmission]**](AssignmentSubmission.md) +[**ClassDetails**](ClassDetails.md) ### Authorization @@ -689,10 +764,12 @@ Name | Type | Description | Notes [[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) -# **get_submission** -> AssignmentSubmission get_submission(_class, assignment, submission) +# **export_submissions_reviews_as_csv** +> file export_submissions_reviews_as_csv(_class, assignment) -Get a student submission +CSV Grades exports + +Export list of submissions grades to a CSV file ### Example @@ -712,14 +789,13 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission try: - # Get a student submission - api_response = api_instance.get_submission(_class, assignment, submission) + # CSV Grades exports + api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->get_submission: %s\n" % e) + print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) ``` ### Parameters @@ -728,11 +804,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | ### Return type -[**AssignmentSubmission**](AssignmentSubmission.md) +**file** ### Authorization @@ -741,14 +816,16 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: text/csv [[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) -# **get_submissions** -> list[AssignmentSubmission] get_submissions(_class, assignment) +# **export_submissions_reviews_as_excel** +> file export_submissions_reviews_as_excel(_class, assignment) -List the students' submissions +Excel Grades exports + +Export list of submissions grades to an Excel file ### Example @@ -770,11 +847,11 @@ _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment try: - # List the students' submissions - api_response = api_instance.get_submissions(_class, assignment) + # Excel Grades exports + api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->get_submissions: %s\n" % e) + print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) ``` ### Parameters @@ -786,7 +863,7 @@ Name | Type | Description | Notes ### Return type -[**list[AssignmentSubmission]**](AssignmentSubmission.md) +**file** ### Authorization @@ -795,14 +872,72 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined + - **Accept**: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + +[[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) + +# **fork_score** +> ScoreDetails fork_score(score, body, sharing_key=sharing_key) + +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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | +sharing_key = 'sharing_key_example' # str | 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) + +try: + # Fork a score + api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->fork_score: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json - **Accept**: application/json [[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) -# **list_assignments** -> list[Assignment] list_assignments(_class) +# **get_class** +> ClassDetails get_class(_class) -Assignments listing +Get the details of a single class ### Example @@ -823,11 +958,11 @@ api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class try: - # Assignments listing - api_response = api_instance.list_assignments(_class) + # Get the details of a single class + api_response = api_instance.get_class(_class) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->list_assignments: %s\n" % e) + print("Exception when calling ClassApi->get_class: %s\n" % e) ``` ### Parameters @@ -838,7 +973,7 @@ Name | Type | Description | Notes ### Return type -[**list[Assignment]**](Assignment.md) +[**ClassDetails**](ClassDetails.md) ### Authorization @@ -851,12 +986,12 @@ Name | Type | Description | Notes [[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) -# **list_class_student_submissions** -> list[AssignmentSubmission] list_class_student_submissions(_class, user) +# **get_score_submissions** +> list[AssignmentSubmission] get_score_submissions(score) -List the submissions for a student +List submissions related to the score -Use this method as a teacher to list all the assignment submissions sent by a student of the class +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. ### Example @@ -874,23 +1009,21 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class -user = 'user_example' # str | Unique identifier of the user +score = 'score_example' # str | 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: - # List the submissions for a student - api_response = api_instance.list_class_student_submissions(_class, user) + # List submissions related to the score + api_response = api_instance.get_score_submissions(score) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) + print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | + **score** | **str**| 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`). | ### Return type @@ -907,10 +1040,10 @@ Name | Type | Description | Notes [[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) -# **list_classes** -> list[ClassDetails] list_classes(state=state) +# **get_submission** +> AssignmentSubmission get_submission(_class, assignment, submission) -List the classes available for the current user +Get a student submission ### Example @@ -928,25 +1061,29 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -state = 'active' # str | Filter the classes by state (optional) (default to 'active') +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission try: - # List the classes available for the current user - api_response = api_instance.list_classes(state=state) + # Get a student submission + api_response = api_instance.get_submission(_class, assignment, submission) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->list_classes: %s\n" % e) + print("Exception when calling ClassApi->get_submission: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **state** | **str**| Filter the classes by state | [optional] [default to 'active'] + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type -[**list[ClassDetails]**](ClassDetails.md) +[**AssignmentSubmission**](AssignmentSubmission.md) ### Authorization @@ -959,12 +1096,10 @@ Name | Type | Description | Notes [[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) -# **unarchive_class** -> ClassDetails unarchive_class(_class) - -Unarchive the class +# **get_submission_comments** +> list[AssignmentSubmissionComment] get_submission_comments(_class, assignment, submission) -Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. +List the feedback comments of a submission ### Example @@ -983,13 +1118,15 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission try: - # Unarchive the class - api_response = api_instance.unarchive_class(_class) + # List the feedback comments of a submission + api_response = api_instance.get_submission_comments(_class, assignment, submission) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->unarchive_class: %s\n" % e) + print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) ``` ### Parameters @@ -997,10 +1134,12 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type -[**ClassDetails**](ClassDetails.md) +[**list[AssignmentSubmissionComment]**](AssignmentSubmissionComment.md) ### Authorization @@ -1013,12 +1152,12 @@ Name | Type | Description | Notes [[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) -# **update_class** -> ClassDetails update_class(_class, class_update=class_update) +# **get_submission_history** +> list[AssignmentSubmissionHistory] get_submission_history(_class, assignment, submission) -Update the class +Get the history of the submission -Update the meta information of the class +For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. ### Example @@ -1037,14 +1176,399 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) _class = '_class_example' # str | Unique identifier of the class -class_update = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission try: - # Update the class - api_response = api_instance.update_class(_class, class_update=class_update) + # Get the history of the submission + api_response = api_instance.get_submission_history(_class, assignment, submission) pprint(api_response) except ApiException as e: - print("Exception when calling ClassApi->update_class: %s\n" % e) + print("Exception when calling ClassApi->get_submission_history: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + +### Return type + +[**list[AssignmentSubmissionHistory]**](AssignmentSubmissionHistory.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **get_submissions** +> list[AssignmentSubmission] get_submissions(_class, assignment) + +List the students' submissions + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment + +try: + # List the students' submissions + api_response = api_instance.get_submissions(_class, assignment) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->get_submissions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**list[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **list_assignments** +> list[Assignment] list_assignments(_class) + +Assignments listing + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class + +try: + # Assignments listing + api_response = api_instance.list_assignments(_class) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->list_assignments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**list[Assignment]**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **list_class_student_submissions** +> list[AssignmentSubmission] list_class_student_submissions(_class, user) + +List the submissions for a student + +Use this method as a teacher to list all the assignment submissions sent by a student of the class + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +user = 'user_example' # str | Unique identifier of the user + +try: + # List the submissions for a student + api_response = api_instance.list_class_student_submissions(_class, user) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | + +### Return type + +[**list[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **list_classes** +> list[ClassDetails] list_classes(state=state) + +List the classes available for the current user + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +state = 'active' # str | Filter the classes by state (optional) (default to 'active') + +try: + # List the classes available for the current user + api_response = api_instance.list_classes(state=state) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->list_classes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **state** | **str**| Filter the classes by state | [optional] [default to 'active'] + +### Return type + +[**list[ClassDetails]**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **post_submission_comment** +> AssignmentSubmissionComment post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + +Add a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission +assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | + +try: + # Add a feedback comment to a submission + api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + +### Return type + +[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **unarchive_assignment** +> Assignment unarchive_assignment(_class, assignment) + +Unarchive the assignment. + +Mark the assignment as `active`. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment + +try: + # Unarchive the assignment. + api_response = api_instance.unarchive_assignment(_class, assignment) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **unarchive_class** +> ClassDetails unarchive_class(_class) + +Unarchive the class + +Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class + +try: + # Unarchive the class + api_response = api_instance.unarchive_class(_class) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->unarchive_class: %s\n" % e) ``` ### Parameters @@ -1052,7 +1576,6 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **_class** | **str**| Unique identifier of the class | - **class_update** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] ### Return type @@ -1062,6 +1585,122 @@ Name | Type | Description | Notes [OAuth2](../README.md#OAuth2) +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **update_class** +> ClassDetails update_class(_class, body=body) + +Update the class + +Update the meta information of the class + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) + +try: + # Update the class + api_response = api_instance.update_class(_class, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->update_class: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **update_submission_comment** +> AssignmentSubmissionComment update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + +Update a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) +_class = '_class_example' # str | Unique identifier of the class +assignment = 'assignment_example' # str | Unique identifier of the assignment +submission = 'submission_example' # str | Unique identifier of the submission +comment = 'comment_example' # str | Unique identifier of the comment +assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | + +try: + # Update a feedback comment to a submission + api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + pprint(api_response) +except ApiException as e: + print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + +### Return type + +[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + ### HTTP request headers - **Content-Type**: application/json diff --git a/docs/ClassAttachmentCreation.md b/docs/ClassAttachmentCreation.md index 924fde7..f8f3976 100644 --- a/docs/ClassAttachmentCreation.md +++ b/docs/ClassAttachmentCreation.md @@ -5,7 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the attachment posted | [optional] **score** | **str** | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] +**worksheet** | **str** | An unique worksheet identifier | [optional] +**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] **url** | **str** | The URL of the attachment. | [optional] +**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetails.md b/docs/ClassDetails.md index a74a920..d2624ae 100644 --- a/docs/ClassDetails.md +++ b/docs/ClassDetails.md @@ -16,10 +16,13 @@ Name | Type | Description | Notes **assignments_count** | **float** | The number of assignments created in the class | [optional] **students_group** | [**GroupDetails**](GroupDetails.md) | | [optional] **teachers_group** | [**GroupDetails**](GroupDetails.md) | | [optional] +**issues** | [**ClassDetailsIssues**](ClassDetailsIssues.md) | | [optional] **google_classroom** | [**ClassDetailsGoogleClassroom**](ClassDetailsGoogleClassroom.md) | | [optional] **google_drive** | [**ClassDetailsGoogleDrive**](ClassDetailsGoogleDrive.md) | | [optional] +**microsoft_graph** | [**ClassDetailsMicrosoftGraph**](ClassDetailsMicrosoftGraph.md) | | [optional] **lti** | [**ClassDetailsLti**](ClassDetailsLti.md) | | [optional] **canvas** | [**ClassDetailsCanvas**](ClassDetailsCanvas.md) | | [optional] +**mfc** | [**ClassDetailsMfc**](ClassDetailsMfc.md) | | [optional] **clever** | [**ClassDetailsClever**](ClassDetailsClever.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md index 553019b..a48143d 100644 --- a/docs/ClassDetailsCanvas.md +++ b/docs/ClassDetailsCanvas.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] **id** | **str** | Unique identifier of the course on Canvas | [optional] +**domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md index f7e583d..ff19f16 100644 --- a/docs/ClassDetailsClever.md +++ b/docs/ClassDetailsClever.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**modification_date** | **datetime** | The last modification date of the section on clever | [optional] -**term_end_date** | **datetime** | End date of the term | [optional] -**subject** | **str** | Normalized subject of the course | [optional] -**term_start_date** | **datetime** | Beginning date of the term | [optional] **id** | **str** | Clever section unique identifier | [optional] **creation_date** | **datetime** | The creation date of the section on clever | [optional] +**modification_date** | **datetime** | The last modification date of the section on clever | [optional] +**subject** | **str** | Normalized subject of the course | [optional] **term_name** | **str** | Name of the term when this course happens | [optional] +**term_start_date** | **datetime** | Beginning date of the term | [optional] +**term_end_date** | **datetime** | End date of the term | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md index 437a5f3..1bb94ca 100644 --- a/docs/ClassDetailsGoogleClassroom.md +++ b/docs/ClassDetailsGoogleClassroom.md @@ -3,10 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the course on Google Classroom | [optional] -**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] -**section** | **str** | The section of the course on Google Classroom | [optional] **id** | **str** | The course identifier on Google Classroom | [optional] +**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsIssues.md b/docs/ClassDetailsIssues.md new file mode 100644 index 0000000..ce406c6 --- /dev/null +++ b/docs/ClassDetailsIssues.md @@ -0,0 +1,10 @@ +# ClassDetailsIssues + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sync** | [**list[ClassDetailsIssuesSync]**](ClassDetailsIssuesSync.md) | Synchronization issues for the class | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsIssuesSync.md b/docs/ClassDetailsIssuesSync.md new file mode 100644 index 0000000..e0a9d71 --- /dev/null +++ b/docs/ClassDetailsIssuesSync.md @@ -0,0 +1,12 @@ +# ClassDetailsIssuesSync + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The account user identifier | [optional] +**email** | **str** | The email address of the user concerned by this sync issue | [optional] +**reason** | **str** | The reason why the account cannot be synced | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsMfc.md b/docs/ClassDetailsMfc.md new file mode 100644 index 0000000..9ba80fa --- /dev/null +++ b/docs/ClassDetailsMfc.md @@ -0,0 +1,11 @@ +# ClassDetailsMfc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on MusicFirst Classroom | [optional] +**alternate_link** | **str** | Link to MusicFirst Classroom class | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsMicrosoftGraph.md b/docs/ClassDetailsMicrosoftGraph.md new file mode 100644 index 0000000..70a459a --- /dev/null +++ b/docs/ClassDetailsMicrosoftGraph.md @@ -0,0 +1,10 @@ +# ClassDetailsMicrosoftGraph + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The course identifier on Microsoft Graph | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Collection.md b/docs/Collection.md index fe60f8a..e8f6380 100644 --- a/docs/Collection.md +++ b/docs/Collection.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **type** | [**CollectionType**](CollectionType.md) | | [optional] **privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] **sharing_key** | **str** | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] -**app** | **str** | If this directory is dedicated to an app, the unique idenfier of this app | [optional] +**app** | [**CollectionApp**](CollectionApp.md) | | [optional] **creation_date** | **datetime** | The date when the collection was created | [optional] **user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md index 05df24c..c3ed974 100644 --- a/docs/CollectionApi.md +++ b/docs/CollectionApi.md @@ -38,7 +38,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) @@ -54,7 +54,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | **score** | **str**| 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`). | **sharing_key** | **str**| 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] @@ -74,7 +74,7 @@ Name | Type | Description | Notes [[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) # **create_collection** -> Collection create_collection(collection_creation) +> Collection create_collection(body) Create a new collection @@ -96,11 +96,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection_creation = flat_api.CollectionCreation() # CollectionCreation | +body = flat_api.CollectionCreation() # CollectionCreation | try: # Create a new collection - api_response = api_instance.create_collection(collection_creation) + api_response = api_instance.create_collection(body) pprint(api_response) except ApiException as e: print("Exception when calling CollectionApi->create_collection: %s\n" % e) @@ -110,7 +110,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection_creation** | [**CollectionCreation**](CollectionCreation.md)| | + **body** | [**CollectionCreation**](CollectionCreation.md)| | ### Return type @@ -150,7 +150,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted try: # Delete the collection @@ -163,7 +163,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | ### Return type @@ -181,7 +181,7 @@ void (empty response body) [[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) # **delete_score_from_collection** -> delete_score_from_collection(collection, score) +> delete_score_from_collection(collection, score, sharing_key=sharing_key) Delete a score from the collection @@ -203,12 +203,13 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). +sharing_key = 'sharing_key_example' # str | 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) try: # Delete a score from the collection - api_instance.delete_score_from_collection(collection, score) + api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) except ApiException as e: print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) ``` @@ -217,8 +218,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type @@ -236,7 +238,7 @@ void (empty response body) [[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) # **edit_collection** -> Collection edit_collection(collection, collection_modification=collection_modification) +> Collection edit_collection(collection, body=body) Update a collection's metadata @@ -256,12 +258,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -collection_modification = flat_api.CollectionModification() # CollectionModification | (optional) +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +body = flat_api.CollectionModification() # CollectionModification | (optional) try: # Update a collection's metadata - api_response = api_instance.edit_collection(collection, collection_modification=collection_modification) + api_response = api_instance.edit_collection(collection, body=body) pprint(api_response) except ApiException as e: print("Exception when calling CollectionApi->edit_collection: %s\n" % e) @@ -271,8 +273,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **collection_modification** | [**CollectionModification**](CollectionModification.md)| | [optional] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **body** | [**CollectionModification**](CollectionModification.md)| | [optional] ### Return type @@ -310,7 +312,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted sharing_key = 'sharing_key_example' # str | 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) try: @@ -325,7 +327,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | **sharing_key** | **str**| 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] ### Return type @@ -348,7 +350,7 @@ Name | Type | Description | Notes List the scores contained in a collection -Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. +Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. ### Example @@ -366,7 +368,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted sharing_key = 'sharing_key_example' # str | 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) sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) @@ -386,7 +388,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | **sharing_key** | **str**| 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] **sort** | **str**| Sort | [optional] **direction** | **str**| Sort direction | [optional] @@ -414,7 +416,7 @@ Name | Type | Description | Notes List the collections -Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. +Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. ### Example @@ -496,7 +498,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted try: # Untrash a collection @@ -509,7 +511,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | ### Return type diff --git a/docs/CollectionApp.md b/docs/CollectionApp.md new file mode 100644 index 0000000..4dd7784 --- /dev/null +++ b/docs/CollectionApp.md @@ -0,0 +1,12 @@ +# CollectionApp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The app unique identifier | [optional] +**name** | **str** | The name of the app | [optional] +**logo** | **str** | The app logo url | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md index 017dbc2..17826ca 100644 --- a/docs/CollectionCapabilities.md +++ b/docs/CollectionCapabilities.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] -**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] **can_edit** | **bool** | Whether the current user can modify the metadata for the collection | [optional] **can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | [optional] **can_delete** | **bool** | Whether the current user can delete the collection | [optional] +**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] +**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionCreation.md b/docs/CollectionCreation.md index 16dffdb..ae2eff6 100644 --- a/docs/CollectionCreation.md +++ b/docs/CollectionCreation.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the collection | +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md index f3e8cba..cd4b3c6 100644 --- a/docs/CollectionModification.md +++ b/docs/CollectionModification.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the collection | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GoogleClassroomCoursework.md b/docs/GoogleClassroomCoursework.md index 1fcee5a..17bc845 100644 --- a/docs/GoogleClassroomCoursework.md +++ b/docs/GoogleClassroomCoursework.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **id** | **str** | Identifier of the coursework assigned by Classroom | [optional] **state** | **str** | State of the coursework | [optional] **alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] +**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupApi.md b/docs/GroupApi.md index d08b5a1..d26dd63 100644 --- a/docs/GroupApi.md +++ b/docs/GroupApi.md @@ -118,7 +118,7 @@ Name | Type | Description | Notes [[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) # **list_group_users** -> list[UserPublic] list_group_users(group) +> list[UserPublic] list_group_users(group, source=source) List group's users @@ -139,10 +139,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.GroupApi(flat_api.ApiClient(configuration)) group = 'group_example' # str | Unique identifier of a Flat group +source = 'source_example' # str | Filter the users by their source (optional) try: # List group's users - api_response = api_instance.list_group_users(group) + api_response = api_instance.list_group_users(group, source=source) pprint(api_response) except ApiException as e: print("Exception when calling GroupApi->list_group_users: %s\n" % e) @@ -153,6 +154,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group** | **str**| Unique identifier of a Flat group | + **source** | **str**| Filter the users by their source | [optional] ### Return type diff --git a/docs/MediaAttachment.md b/docs/MediaAttachment.md index 3b188f0..77b32eb 100644 --- a/docs/MediaAttachment.md +++ b/docs/MediaAttachment.md @@ -6,8 +6,10 @@ Name | Type | Description | Notes **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] **score** | **str** | An unique Flat score identifier | [optional] **revision** | **str** | An unique revision identifier of a score | [optional] -**correct** | **bool** | If the attachment is an exercise question, this state will describe if it is correct or not.For exercise assignments only. | [optional] +**worksheet** | **str** | An unique worksheet identifier | [optional] +**track** | **str** | A unique track identifier | [optional] **sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] **title** | **str** | The resolved title of the attachment | [optional] **description** | **str** | The resolved description of the attachment | [optional] **html** | **str** | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] @@ -15,10 +17,13 @@ Name | Type | Description | Notes **html_height** | **str** | If the `html` is available, the height of the widget | [optional] **url** | **str** | The url of the attachment | [optional] **thumbnail_url** | **str** | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] -**thumbnail_width** | **str** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**thumbnail_height** | **str** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**thumbnail_width** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**thumbnail_height** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] **author_name** | **str** | The resolved author name of the attachment | [optional] **author_url** | **str** | The resolved author url of the attachment | [optional] +**icon_url** | **str** | The URL of the icon | [optional] +**mime_type** | **str** | The mine type of the file | [optional] +**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md new file mode 100644 index 0000000..3e496a7 --- /dev/null +++ b/docs/MicrosoftGraphAssignment.md @@ -0,0 +1,13 @@ +# MicrosoftGraphAssignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the assignement assigned by Microsoft Teams | [optional] +**state** | **str** | State of the assignment | [optional] +**alternate_link** | **str** | Absolute link to this assignement in the Microsoft Teams web UI | [optional] +**categories** | **list[str]** | List of categories where this assignment is published under | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MicrosoftGraphSubmission.md b/docs/MicrosoftGraphSubmission.md new file mode 100644 index 0000000..53d6ec7 --- /dev/null +++ b/docs/MicrosoftGraphSubmission.md @@ -0,0 +1,12 @@ +# MicrosoftGraphSubmission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the submission assigned by Microsoft Teams | [optional] +**state** | **str** | State of the submission | [optional] +**alternate_link** | **str** | Absolute link to this submission in the Microsoft Teams web UI | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 8e5e729..0168e62 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -4,9 +4,12 @@ All URIs are relative to *https://api.flat.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- +[**count_orga_users**](OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters [**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials [**create_organization_invitation**](OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization [**create_organization_user**](OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account +[**create_organization_user_access_token**](OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +[**create_organization_user_signin_link**](OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user [**list_lti_credentials**](OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials [**list_organization_invitations**](OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations [**list_organization_users**](OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users @@ -16,8 +19,66 @@ Method | HTTP request | Description [**update_organization_user**](OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information +# **count_orga_users** +> int[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + +Count the organization users using the provided filters + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) +role = ['role_example'] # list[str] | Filter users by role (optional) +q = 'q_example' # str | The query to search (optional) +group = ['group_example'] # list[str] | Filter users by group (optional) +no_active_license = True # bool | Filter users who don't have an active license (optional) + +try: + # Count the organization users using the provided filters + api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role** | [**list[str]**](str.md)| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | [**list[str]**](str.md)| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + +### Return type + +[**int[UserDetailsAdmin]**](UserDetailsAdmin.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + # **create_lti_credentials** -> LtiCredentials create_lti_credentials(lti_credentials_creation) +> LtiCredentials create_lti_credentials(body) Create a new couple of LTI 1.x credentials @@ -39,11 +100,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -lti_credentials_creation = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | +body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | try: # Create a new couple of LTI 1.x credentials - api_response = api_instance.create_lti_credentials(lti_credentials_creation) + api_response = api_instance.create_lti_credentials(body) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) @@ -53,7 +114,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **lti_credentials_creation** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | + **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | ### Return type @@ -71,7 +132,7 @@ Name | Type | Description | Notes [[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) # **create_organization_invitation** -> OrganizationInvitation create_organization_invitation(organization_invitation_creation=organization_invitation_creation) +> OrganizationInvitation create_organization_invitation(body=body) Create a new invitation to join the organization @@ -93,11 +154,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -organization_invitation_creation = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) +body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) try: # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation(organization_invitation_creation=organization_invitation_creation) + api_response = api_instance.create_organization_invitation(body=body) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) @@ -107,7 +168,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **organization_invitation_creation** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] + **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] ### Return type @@ -125,7 +186,7 @@ Name | Type | Description | Notes [[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) # **create_organization_user** -> UserDetailsAdmin create_organization_user(user_creation=user_creation) +> UserDetailsAdmin create_organization_user(body=body) Create a new user account @@ -145,11 +206,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -user_creation = flat_api.UserCreation() # UserCreation | (optional) +body = flat_api.UserCreation() # UserCreation | (optional) try: # Create a new user account - api_response = api_instance.create_organization_user(user_creation=user_creation) + api_response = api_instance.create_organization_user(body=body) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) @@ -159,7 +220,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_creation** | [**UserCreation**](UserCreation.md)| | [optional] + **body** | [**UserCreation**](UserCreation.md)| | [optional] ### Return type @@ -176,6 +237,116 @@ Name | Type | Description | Notes [[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) +# **create_organization_user_access_token** +> ApiAccessToken create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) + +Create a delegated API access token for an organization user + +This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) +user = 'user_example' # str | Unique identifier of the Flat account +organization_user_access_token_creation = flat_api.OrganizationUserAccessTokenCreation() # OrganizationUserAccessTokenCreation | (optional) + +try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **organization_user_access_token_creation** | [**OrganizationUserAccessTokenCreation**](OrganizationUserAccessTokenCreation.md)| | [optional] + +### Return type + +[**ApiAccessToken**](ApiAccessToken.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **create_organization_user_signin_link** +> OrganizationUserSigninLink create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) + +Create a sign in link for an organization user + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) +user = 'user_example' # str | Unique identifier of the Flat account +organization_user_signin_link_creation = flat_api.OrganizationUserSigninLinkCreation() # OrganizationUserSigninLinkCreation | (optional) + +try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **organization_user_signin_link_creation** | [**OrganizationUserSigninLinkCreation**](OrganizationUserSigninLinkCreation.md)| | [optional] + +### Return type + +[**OrganizationUserSigninLink**](OrganizationUserSigninLink.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **list_lti_credentials** > list[LtiCredentials] list_lti_credentials() @@ -283,7 +454,7 @@ Name | Type | Description | Notes [[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) # **list_organization_users** -> list[UserDetailsAdmin] list_organization_users(role=role, limit=limit, next=next, previous=previous) +> list[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) List the organization users @@ -303,14 +474,21 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -role = 'role_example' # str | Filter users by role (optional) -limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) +sort = ['sort_example'] # list[str] | The order to sort the user list (optional) +direction = 'direction_example' # str | Sort direction (optional) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) +role = ['role_example'] # list[str] | Filter users by role (optional) +q = 'q_example' # str | The query to search (optional) +group = ['group_example'] # list[str] | Filter users by group (optional) +no_active_license = True # bool | Filter users who don't have an active license (optional) +license_expiration_date = ['license_expiration_date_example'] # list[str] | Filter users by license expiration date or `active` / `notActive` (optional) +only_ids = True # bool | Return only user ids (optional) +limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) try: # List the organization users - api_response = api_instance.list_organization_users(role=role, limit=limit, next=next, previous=previous) + api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) @@ -320,10 +498,17 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **role** | **str**| Filter users by role | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 50] + **sort** | **list[str]**| The order to sort the user list | [optional] + **direction** | **str**| Sort direction | [optional] **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **role** | [**list[str]**](str.md)| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | [**list[str]**](str.md)| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **license_expiration_date** | [**list[str]**](str.md)| Filter users by license expiration date or `active` / `notActive` | [optional] + **only_ids** | **bool**| Return only user ids | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] ### Return type @@ -498,7 +683,7 @@ void (empty response body) [[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) # **update_organization_user** -> UserDetailsAdmin update_organization_user(user, user_admin_update) +> UserDetailsAdmin update_organization_user(user, body) Update account information @@ -519,11 +704,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) user = 'user_example' # str | Unique identifier of the Flat account -user_admin_update = flat_api.UserAdminUpdate() # UserAdminUpdate | +body = flat_api.UserAdminUpdate() # UserAdminUpdate | try: # Update account information - api_response = api_instance.update_organization_user(user, user_admin_update) + api_response = api_instance.update_organization_user(user, body) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) @@ -534,7 +719,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user** | **str**| Unique identifier of the Flat account | - **user_admin_update** | [**UserAdminUpdate**](UserAdminUpdate.md)| | + **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | ### Return type diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/OrganizationUserAccessTokenCreation.md new file mode 100644 index 0000000..0f6702c --- /dev/null +++ b/docs/OrganizationUserAccessTokenCreation.md @@ -0,0 +1,10 @@ +# OrganizationUserAccessTokenCreation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scopes** | [**list[AppScopes]**](AppScopes.md) | List of requested scopes for this credential | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationUserSigninLink.md b/docs/OrganizationUserSigninLink.md new file mode 100644 index 0000000..240993d --- /dev/null +++ b/docs/OrganizationUserSigninLink.md @@ -0,0 +1,11 @@ +# OrganizationUserSigninLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | URL to use to sign in to this account | [optional] +**expiration_date** | **datetime** | Date when the link expires | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationUserSigninLinkCreation.md b/docs/OrganizationUserSigninLinkCreation.md new file mode 100644 index 0000000..586e039 --- /dev/null +++ b/docs/OrganizationUserSigninLinkCreation.md @@ -0,0 +1,10 @@ +# OrganizationUserSigninLinkCreation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination_path** | **str** | Path to redirect to after signin | [optional] [default to '/'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCollaborator.md b/docs/ResourceCollaborator.md index ab94743..8d5d2a5 100644 --- a/docs/ResourceCollaborator.md +++ b/docs/ResourceCollaborator.md @@ -3,12 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the permission | [optional] -**score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] -**collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] -**user** | [**UserPublic**](UserPublic.md) | | [optional] +**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] **group** | [**Group**](Group.md) | | [optional] +**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] +**invited** | **bool** | If this property is `true`, this is still a pending invitation | [optional] **user_email** | **str** | If the collaborator is not a user of Flat yet, this field will contain his email. | [optional] +**collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] +**score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] +**user** | [**UserPublic**](UserPublic.md) | | [optional] +**id** | **str** | The unique identifier of the permission | [optional] +**acl_read** | **bool** | `True` if the current user can read the current document | [optional] [default to False] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index 997da10..847f446 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**add_score_collaborator**](ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator [**add_score_track**](ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score +[**create_export_task**](ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task [**create_score**](ScoreApi.md#create_score) | **POST** /scores | Create a new score [**create_score_revision**](ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision [**delete_score**](ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score @@ -36,7 +37,7 @@ Method | HTTP request | Description # **add_score_collaborator** -> ResourceCollaborator add_score_collaborator(score, resource_collaborator_creation) +> ResourceCollaborator add_score_collaborator(score, body) Add a new collaborator @@ -59,11 +60,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -resource_collaborator_creation = flat_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | +body = flat_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | try: # Add a new collaborator - api_response = api_instance.add_score_collaborator(score, resource_collaborator_creation) + api_response = api_instance.add_score_collaborator(score, body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) @@ -74,7 +75,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **resource_collaborator_creation** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | + **body** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | ### Return type @@ -92,7 +93,7 @@ Name | Type | Description | Notes [[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) # **add_score_track** -> ScoreTrack add_score_track(score, score_track_creation) +> ScoreTrack add_score_track(score, body) Add a new video or audio track to the score @@ -115,11 +116,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -score_track_creation = flat_api.ScoreTrackCreation() # ScoreTrackCreation | +body = flat_api.ScoreTrackCreation() # ScoreTrackCreation | try: # Add a new video or audio track to the score - api_response = api_instance.add_score_track(score, score_track_creation) + api_response = api_instance.add_score_track(score, body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->add_score_track: %s\n" % e) @@ -130,7 +131,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **score_track_creation** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | + **body** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | ### Return type @@ -147,12 +148,74 @@ Name | Type | Description | Notes [[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) +# **create_export_task** +> Task create_export_task(score, revision, format, sharing_key=sharing_key, body=body) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) +score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. +format = 'format_example' # str | The format of the file that will be generated or the target service name where the file will be exported +sharing_key = 'sharing_key_example' # str | 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) +body = flat_api.TaskExportOptions() # TaskExportOptions | (optional) + +try: + # Create a new score export task + api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **format** | **str**| The format of the file that will be generated or the target service name where the file will be exported | + **sharing_key** | **str**| 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] + **body** | [**TaskExportOptions**](TaskExportOptions.md)| | [optional] + +### Return type + +[**Task**](Task.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **create_score** -> ScoreDetails create_score(score_creation) +> ScoreDetails create_score(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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. +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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. ### Example @@ -170,11 +233,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score_creation = flat_api.ScoreCreation() # ScoreCreation | +body = flat_api.ScoreCreation() # ScoreCreation | try: # Create a new score - api_response = api_instance.create_score(score_creation) + api_response = api_instance.create_score(body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->create_score: %s\n" % e) @@ -184,7 +247,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score_creation** | [**ScoreCreation**](ScoreCreation.md)| | + **body** | [**ScoreCreation**](ScoreCreation.md)| | ### Return type @@ -202,7 +265,7 @@ Name | Type | Description | Notes [[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) # **create_score_revision** -> ScoreRevision create_score_revision(score, score_revision_creation) +> ScoreRevision create_score_revision(score, body) Create a new revision @@ -225,11 +288,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -score_revision_creation = flat_api.ScoreRevisionCreation() # ScoreRevisionCreation | +body = flat_api.ScoreRevisionCreation() # ScoreRevisionCreation | try: # Create a new revision - api_response = api_instance.create_score_revision(score, score_revision_creation) + api_response = api_instance.create_score_revision(score, body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) @@ -240,7 +303,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **score_revision_creation** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | + **body** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | ### Return type @@ -258,7 +321,7 @@ Name | Type | Description | Notes [[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) # **delete_score** -> delete_score(score) +> delete_score(score, now=now) Delete a score @@ -281,10 +344,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). +now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) (default to False) try: # Delete a score - api_instance.delete_score(score) + api_instance.delete_score(score, now=now) except ApiException as e: print("Exception when calling ScoreApi->delete_score: %s\n" % e) ``` @@ -294,6 +358,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | + **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] [default to False] ### Return type @@ -419,11 +484,11 @@ void (empty response body) [[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) # **edit_score** -> ScoreDetails edit_score(score, score_modification=score_modification) +> ScoreDetails edit_score(score, body=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. +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. ### Example @@ -442,11 +507,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -score_modification = flat_api.ScoreModification() # ScoreModification | (optional) +body = flat_api.ScoreModification() # ScoreModification | (optional) try: # Edit a score's metadata - api_response = api_instance.edit_score(score, score_modification=score_modification) + api_response = api_instance.edit_score(score, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->edit_score: %s\n" % e) @@ -457,7 +522,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **score_modification** | [**ScoreModification**](ScoreModification.md)| | [optional] + **body** | [**ScoreModification**](ScoreModification.md)| | [optional] ### Return type @@ -475,7 +540,7 @@ Name | Type | Description | Notes [[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) # **fork_score** -> ScoreDetails fork_score(score, score_fork, sharing_key=sharing_key) +> ScoreDetails fork_score(score, body, sharing_key=sharing_key) Fork a score @@ -498,12 +563,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -score_fork = flat_api.ScoreFork() # ScoreFork | +body = flat_api.ScoreFork() # ScoreFork | sharing_key = 'sharing_key_example' # str | 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) try: # Fork a score - api_response = api_instance.fork_score(score, score_fork, sharing_key=sharing_key) + api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->fork_score: %s\n" % e) @@ -514,7 +579,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **score_fork** | [**ScoreFork**](ScoreFork.md)| | + **body** | [**ScoreFork**](ScoreFork.md)| | **sharing_key** | **str**| 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] ### Return type @@ -933,11 +998,11 @@ Name | Type | Description | Notes [[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) # **get_score_revision_data** -> file get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, only_cached=only_cached) +> file get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) 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`). +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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. ### Example @@ -959,12 +1024,13 @@ score = 'score_example' # str | Unique identifier of the score document. This ca revision = 'revision_example' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. format = 'format_example' # str | The format of the file you will retrieve sharing_key = 'sharing_key_example' # str | 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 = 'parts_example' # str | 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) -only_cached = 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 (optional) +parts = 'parts_example' # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) +default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) +url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) try: # Get a score revision data - api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, only_cached=only_cached) + api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) @@ -978,8 +1044,9 @@ Name | Type | Description | Notes **revision** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | **format** | **str**| The format of the file you will retrieve | **sharing_key** | **str**| 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** | **str**| 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] - **only_cached** | **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] + **parts** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] + **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] + **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] ### Return type @@ -1219,7 +1286,7 @@ Name | Type | Description | Notes [[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) # **list_score_tracks** -> list[ScoreTrack] list_score_tracks(score, sharing_key=sharing_key) +> list[ScoreTrack] list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) List the audio or video tracks linked to a score @@ -1241,10 +1308,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) +assignment = 'assignment_example' # str | An assignment id with which all the tracks returned will be related to (optional) +list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) try: # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key) + api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) @@ -1256,6 +1325,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | **sharing_key** | **str**| 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] + **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] + **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] ### Return type @@ -1383,7 +1454,7 @@ void (empty response body) [[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) # **post_score_comment** -> ScoreComment post_score_comment(score, score_comment_creation, sharing_key=sharing_key) +> ScoreComment post_score_comment(score, body, sharing_key=sharing_key) Post a new comment @@ -1406,12 +1477,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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`). -score_comment_creation = flat_api.ScoreCommentCreation() # ScoreCommentCreation | +body = flat_api.ScoreCommentCreation() # ScoreCommentCreation | sharing_key = 'sharing_key_example' # str | 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) try: # Post a new comment - api_response = api_instance.post_score_comment(score, score_comment_creation, sharing_key=sharing_key) + api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) @@ -1422,7 +1493,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **score_comment_creation** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | + **body** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | **sharing_key** | **str**| 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] ### Return type @@ -1503,6 +1574,8 @@ 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. ### Example + +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time @@ -1510,8 +1583,12 @@ import flat_api from flat_api.rest import ApiException from pprint import pprint +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # create an instance of the API class -api_instance = flat_api.ScoreApi() +api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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: @@ -1533,7 +1610,7 @@ void (empty response body) ### Authorization -No authorization required +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -1543,7 +1620,7 @@ No authorization required [[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) # **update_score_comment** -> ScoreComment update_score_comment(score, comment, score_comment_update, sharing_key=sharing_key) +> ScoreComment update_score_comment(score, comment, body, sharing_key=sharing_key) Update an existing comment @@ -1565,12 +1642,12 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -score_comment_update = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | +body = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | sharing_key = 'sharing_key_example' # str | 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) try: # Update an existing comment - api_response = api_instance.update_score_comment(score, comment, score_comment_update, sharing_key=sharing_key) + api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) @@ -1582,7 +1659,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **score_comment_update** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | + **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | **sharing_key** | **str**| 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] ### Return type @@ -1601,7 +1678,7 @@ Name | Type | Description | Notes [[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) # **update_score_track** -> ScoreTrack update_score_track(score, track, score_track_update) +> ScoreTrack update_score_track(score, track, body) Update an audio or video track linked to a score @@ -1623,11 +1700,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) score = 'score_example' # str | 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' # str | Unique identifier of a score audio track -score_track_update = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | +body = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | try: # Update an audio or video track linked to a score - api_response = api_instance.update_score_track(score, track, score_track_update) + api_response = api_instance.update_score_track(score, track, body) pprint(api_response) except ApiException as e: print("Exception when calling ScoreApi->update_score_track: %s\n" % e) @@ -1639,7 +1716,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **score_track_update** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | + **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | ### Return type diff --git a/docs/ScoreComment.md b/docs/ScoreComment.md index 7fd20e3..67ddca5 100644 --- a/docs/ScoreComment.md +++ b/docs/ScoreComment.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **mentions** | **list[str]** | The list of user identifier mentioned on the score | [optional] **resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] **resolved_by** | **str** | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] +**moderation** | [**ScoreCommentModeration**](ScoreCommentModeration.md) | | [optional] **spam** | **bool** | `true if the message has been detected as spam and hidden from other users | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentModeration.md b/docs/ScoreCommentModeration.md new file mode 100644 index 0000000..25fee03 --- /dev/null +++ b/docs/ScoreCommentModeration.md @@ -0,0 +1,11 @@ +# ScoreCommentModeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hidden** | **bool** | If true, this comment will be hidden from other users | [optional] +**reason** | **str** | If the comment is hidden, the reason why this one has been moderated | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentsCounts.md b/docs/ScoreCommentsCounts.md index a95e24d..640b879 100644 --- a/docs/ScoreCommentsCounts.md +++ b/docs/ScoreCommentsCounts.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **float** | The total number of comments added on the score | [optional] -**unique** | **float** | The unique (1/user) number of comments added on the score | [optional] -**weekly** | **float** | The weekly unique number of comments added on the score | [optional] -**monthly** | **float** | The monthly unique number of comments added on the score | [optional] +**total** | **float** | The total number of comments added to the score | [optional] +**unique** | **float** | The unique (1/user) number of comments added to the score | [optional] +**weekly** | **float** | The weekly unique number of comments added to the score | [optional] +**monthly** | **float** | The monthly unique number of comments added to the score | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreation.md b/docs/ScoreCreation.md index d17c3be..89ad133 100644 --- a/docs/ScoreCreation.md +++ b/docs/ScoreCreation.md @@ -3,13 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**builder_data** | [**ScoreCreationBuilderData**](ScoreCreationBuilderData.md) | | [optional] **filename** | **str** | If this is an imported file, its filename | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] -**data_encoding** | [**ScoreDataEncoding**](ScoreDataEncoding.md) | | [optional] **source** | [**ScoreSource**](ScoreSource.md) | | [optional] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] **google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md new file mode 100644 index 0000000..783177a --- /dev/null +++ b/docs/ScoreCreationBuilderData.md @@ -0,0 +1,11 @@ +# ScoreCreationBuilderData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | [optional] +**layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/ScoreCreationBuilderDataLayoutData.md new file mode 100644 index 0000000..a8d9656 --- /dev/null +++ b/docs/ScoreCreationBuilderDataLayoutData.md @@ -0,0 +1,17 @@ +# ScoreCreationBuilderDataLayoutData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notes_spacing_coeff** | **float** | A float value >= 1 that controls the spacing between notes. | [optional] +**length_unit** | **str** | The unit to use for layout customizations | [optional] [default to 'cm'] +**page_height** | **float** | The height of the page in chosen unit (`lengthUnit`). | [optional] +**page_width** | **float** | The width of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_top** | **float** | The top margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_bottom** | **float** | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_left** | **float** | The left margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_right** | **float** | The right margin of the page in chosen unit (`lengthUnit`). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md new file mode 100644 index 0000000..b9583fb --- /dev/null +++ b/docs/ScoreCreationBuilderDataScoreData.md @@ -0,0 +1,15 @@ +# ScoreCreationBuilderDataScoreData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] +**use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] +**fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] +**nb_beats** | **float** | The number of beats in the measure | [optional] +**beat_type** | **float** | The duration of a beat in the measure | [optional] +**instruments** | [**list[ScoreCreationBuilderDataScoreDataInstruments]**](ScoreCreationBuilderDataScoreDataInstruments.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataScoreDataInstruments.md b/docs/ScoreCreationBuilderDataScoreDataInstruments.md new file mode 100644 index 0000000..318e898 --- /dev/null +++ b/docs/ScoreCreationBuilderDataScoreDataInstruments.md @@ -0,0 +1,13 @@ +# ScoreCreationBuilderDataScoreDataInstruments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | [optional] +**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | [optional] +**long_name** | **str** | The full name of the instrument | [optional] +**short_name** | **str** | The abbreviation of the name of the instrument | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreDetails.md b/docs/ScoreDetails.md index 0843d37..db81407 100644 --- a/docs/ScoreDetails.md +++ b/docs/ScoreDetails.md @@ -4,29 +4,38 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **subtitle** | **str** | Subtitle of the score | [optional] +**instruments** | **list[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] **lyricist** | **str** | Lyricist of the score | [optional] +**publication_date** | **datetime** | The date when the score was published on Flat | [optional] **composer** | **str** | Composer of the score | [optional] +**license_text** | **str** | Additional license text written on the exported/printed score | [optional] +**modification_date** | **datetime** | The date of the last revision of the score | [optional] +**id** | **str** | The unique identifier of the score | [optional] +**plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] +**title** | **str** | The title of the score | [optional] +**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] +**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**samples** | **list[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] +**number_measures** | **int** | The number of measures in the score | [optional] +**google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] **description** | **str** | Description of the creation | [optional] +**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] +**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] +**duration_time** | **float** | In seconds, an approximative duration of the score | [optional] +**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] +**creation_date** | **datetime** | The date when the score was created | [optional] +**parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] **tags** | **list[str]** | Tags describing the score | [optional] -**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**collaborators** | [**list[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] +**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] **license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] -**license_text** | **str** | Additional license text written on the exported/printed score | [optional] -**duration_time** | **int** | In seconds, an approximative duration of the score | [optional] -**number_measures** | **int** | The number of measures in the score | [optional] -**main_tempo_qpm** | **int** | The main tempo of the score (in QPM) | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**collaborators** | [**list[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] -**creation_date** | **datetime** | The date when the score was created | [optional] -**modification_date** | **datetime** | The date of the last revision of the score | [optional] -**publication_date** | **datetime** | The date when the score was published on Flat | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**arranger** | **str** | Arranger of the score | [optional] **organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] -**parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] -**instruments** | **list[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] **likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] -**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] -**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] -**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreFork.md b/docs/ScoreFork.md index e353622..1076623 100644 --- a/docs/ScoreFork.md +++ b/docs/ScoreFork.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] +**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] [default to 'root'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md index 541a40a..8fdfc98 100644 --- a/docs/ScoreModification.md +++ b/docs/ScoreModification.md @@ -4,12 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the score | [optional] +**subtitle** | **str** | The subtitle of the score | [optional] +**composer** | **str** | The composer of the score | [optional] +**lyricist** | **str** | The lyricist of the score | [optional] +**arranger** | **str** | The arranger of the score | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] **sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] **description** | **str** | Description of the creation | [optional] **tags** | **list[str]** | Tags describing the score | [optional] **creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] **license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] +**license_text** | **str** | The rights info written on the score | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorePlaysCounts.md b/docs/ScorePlaysCounts.md new file mode 100644 index 0000000..e94d5c5 --- /dev/null +++ b/docs/ScorePlaysCounts.md @@ -0,0 +1,12 @@ +# ScorePlaysCounts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of plays of the score | [optional] +**weekly** | **float** | The weekly number of plays of the score | [optional] +**monthly** | **float** | The monthly number of plays of the score | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreRevision.md b/docs/ScoreRevision.md index d9e2a78..b7dcfaf 100644 --- a/docs/ScoreRevision.md +++ b/docs/ScoreRevision.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **user** | **str** | The user identifier who created the revision | [optional] **collaborators** | **list[str]** | | [optional] **creation_date** | **datetime** | The date when this revision was created | [optional] +**event** | **str** | The last event (action id) of the revision | [optional] **description** | **str** | A description associated to the revision | [optional] **autosave** | **bool** | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] **statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md index 7a3f069..146794e 100644 --- a/docs/ScoreRevisionCreation.md +++ b/docs/ScoreRevisionCreation.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | -**data_encoding** | [**ScoreDataEncoding**](ScoreDataEncoding.md) | | [optional] +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] **autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] **description** | **str** | A description associated to the revision | [optional] diff --git a/docs/ScoreSummary.md b/docs/ScoreSummary.md deleted file mode 100644 index ce27beb..0000000 --- a/docs/ScoreSummary.md +++ /dev/null @@ -1,15 +0,0 @@ -# ScoreSummary - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score | [optional] -**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] -**title** | **str** | The title of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Task.md b/docs/Task.md new file mode 100644 index 0000000..551f269 --- /dev/null +++ b/docs/Task.md @@ -0,0 +1,16 @@ +# Task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the task | [optional] +**type** | **str** | Type of the task | [optional] +**state** | **str** | State of the Task | [optional] +**progress** | [**TaskProgress**](TaskProgress.md) | | [optional] +**creation_date** | **datetime** | The creation date of the task | [optional] +**modification_date** | **datetime** | The last modification date of the task | [optional] +**done_date** | **datetime** | The date when the task has been completed | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskApi.md b/docs/TaskApi.md new file mode 100644 index 0000000..7689b1f --- /dev/null +++ b/docs/TaskApi.md @@ -0,0 +1,63 @@ +# flat_api.TaskApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_task**](TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details + + +# **get_task** +> Task get_task(task) + +Get a task details + +This method can be used to follow a task progression, for example while a score is being exported. + +### Example + +* OAuth Authentication (OAuth2): +```python +from __future__ import print_function +import time +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = flat_api.TaskApi(flat_api.ApiClient(configuration)) +task = 'task_example' # str | Unique identifier for the task + +try: + # Get a task details + api_response = api_instance.get_task(task) + pprint(api_response) +except ApiException as e: + print("Exception when calling TaskApi->get_task: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task** | **str**| Unique identifier for the task | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/docs/TaskExportOptions.md b/docs/TaskExportOptions.md new file mode 100644 index 0000000..0326e22 --- /dev/null +++ b/docs/TaskExportOptions.md @@ -0,0 +1,10 @@ +# TaskExportOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parts** | **list[str]** | A list of parts to specifically export | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskProgress.md b/docs/TaskProgress.md new file mode 100644 index 0000000..fe9b029 --- /dev/null +++ b/docs/TaskProgress.md @@ -0,0 +1,11 @@ +# TaskProgress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**percent** | **float** | Percent of the task progression | [optional] +**text** | **str** | Text details of the task progress | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAdminUpdate.md b/docs/UserAdminUpdate.md index 9b997ec..284ade8 100644 --- a/docs/UserAdminUpdate.md +++ b/docs/UserAdminUpdate.md @@ -3,8 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**password** | **str** | Password of the new account | [optional] +**password** | **str** | Password of the account | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**username** | **str** | Username of the account | [optional] +**firstname** | **str** | First name of the user | [optional] +**lastname** | **str** | Last name of the user | [optional] +**email** | **str** | Email of the account | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/UserApi.md index 50d57e9..8f6fd30 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -68,7 +68,7 @@ Name | Type | Description | Notes Get a public user profile -Get a public profile of a Flat User. +Get a profile of a Flat or Flat for Education User. ### Example diff --git a/docs/UserBasics.md b/docs/UserBasics.md deleted file mode 100644 index 6990811..0000000 --- a/docs/UserBasics.md +++ /dev/null @@ -1,15 +0,0 @@ -# UserBasics - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The user unique identifier | [optional] -**username** | **str** | The user name (unique for the organization) | [optional] -**name** | **str** | A displayable name for the user | [optional] -**printable_name** | **str** | The name that can be directly printed (name or username) | [optional] -**picture** | **str** | User pictue | [optional] -**is_power_user** | **bool** | User license status. 'True' if user is an individual Power user | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserCreation.md b/docs/UserCreation.md index 32c7e31..47b15a2 100644 --- a/docs/UserCreation.md +++ b/docs/UserCreation.md @@ -4,9 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **str** | Username of the new account | +**firstname** | **str** | First name of the user | [optional] +**lastname** | **str** | Last name of the user | [optional] **email** | **str** | Email of the new account | [optional] **password** | **str** | Password of the new account | **locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**role** | **str** | Role of the new account | [optional] [default to 'user'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetails.md b/docs/UserDetails.md index 5bb4826..79ccf24 100644 --- a/docs/UserDetails.md +++ b/docs/UserDetails.md @@ -3,10 +3,33 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the user | [optional] -**type** | **str** | The type of account | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] **private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] +**followers_count** | **int** | Number of followers the user have | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] **locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**instruments** | **list[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**bio** | **str** | User's biography | [optional] +**picture_file** | **str** | The ID of the user profile picture | [optional] +**id** | **str** | Identifier of the user | [optional] +**cover_picture_file** | **str** | The ID of the user profile cover picture | [optional] +**picture** | **str** | The URL of the picture to display | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**profile_theme** | **str** | Theme (background) for the profile | [optional] +**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**following_count** | **int** | Number of people the user follow | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**type** | **str** | The type of account | [optional] +**registration_date** | **datetime** | Date the user signed up | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdmin.md b/docs/UserDetailsAdmin.md index 8da9871..07703c8 100644 --- a/docs/UserDetailsAdmin.md +++ b/docs/UserDetailsAdmin.md @@ -3,9 +3,23 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | Email of the user | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**picture** | **str** | The URL of the picture to display | [optional] +**license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] +**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] **last_activity_date** | **datetime** | Date of the last user activity | [optional] -**license** | **object** | Current active license of the user | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**email** | **str** | Email of the user | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**type** | **str** | The type of user account | [optional] +**id** | **str** | The user unique identifier | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md new file mode 100644 index 0000000..23d7e45 --- /dev/null +++ b/docs/UserDetailsAdminLicense.md @@ -0,0 +1,14 @@ +# UserDetailsAdminLicense + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the current license | [optional] +**expiration_date** | **datetime** | Date when the license expires | [optional] +**source** | [**LicenseSources**](LicenseSources.md) | | [optional] +**mode** | [**LicenseMode**](LicenseMode.md) | | [optional] +**active** | **bool** | ID of the current license | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserPublic.md b/docs/UserPublic.md index 7a1f4b8..d11f13a 100644 --- a/docs/UserPublic.md +++ b/docs/UserPublic.md @@ -3,14 +3,29 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bio** | **str** | User's biography | [optional] -**registration_date** | **datetime** | Date the user signed up | [optional] -**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**picture** | **str** | The URL of the picture to display | [optional] **followers_count** | **int** | Number of followers the user have | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] **following_count** | **int** | Number of people the user follow | [optional] -**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**bio** | **str** | User's biography | [optional] +**id** | **str** | The user unique identifier | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] -**instruments** | [**UserInstruments**](UserInstruments.md) | | [optional] +**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**instruments** | **list[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**type** | **str** | The type of user account | [optional] +**registration_date** | **datetime** | Date the user signed up | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserPublicSummary.md b/docs/UserPublicSummary.md index 345b075..5ad668a 100644 --- a/docs/UserPublicSummary.md +++ b/docs/UserPublicSummary.md @@ -3,10 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**organization** | **str** | Organization ID (for Edu users only) | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**picture** | **str** | The URL of the picture to display | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] +**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] -**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**type** | **str** | The type of user account | [optional] +**id** | **str** | The user unique identifier | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 03431bc..fd36f98 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -5,9 +5,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "0.6.0" +__version__ = "0.7.0" # import apis into sdk package from flat_api.api.account_api import AccountApi @@ -24,17 +24,32 @@ from flat_api.api.group_api import GroupApi from flat_api.api.organization_api import OrganizationApi from flat_api.api.score_api import ScoreApi +from flat_api.api.task_api import TaskApi from flat_api.api.user_api import UserApi # import ApiClient from flat_api.api_client import ApiClient from flat_api.configuration import Configuration # import models into sdk package +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.app_scopes import AppScopes from flat_api.models.assignment import Assignment +from flat_api.models.assignment_canvas import AssignmentCanvas from flat_api.models.assignment_copy import AssignmentCopy from flat_api.models.assignment_creation import AssignmentCreation +from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom +from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph +from flat_api.models.assignment_lti import AssignmentLti +from flat_api.models.assignment_mfc import AssignmentMfc from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_state import AssignmentSubmissionState from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments +from flat_api.models.assignment_type import AssignmentType from flat_api.models.class_attachment_creation import ClassAttachmentCreation from flat_api.models.class_creation import ClassCreation from flat_api.models.class_details import ClassDetails @@ -42,11 +57,16 @@ from flat_api.models.class_details_clever import ClassDetailsClever from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues +from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync from flat_api.models.class_details_lti import ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph from flat_api.models.class_roles import ClassRoles from flat_api.models.class_state import ClassState from flat_api.models.class_update import ClassUpdate from flat_api.models.collection import Collection +from flat_api.models.collection_app import CollectionApp from flat_api.models.collection_capabilities import CollectionCapabilities from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification @@ -66,31 +86,40 @@ from flat_api.models.lti_credentials_creation import LtiCredentialsCreation from flat_api.models.media_attachment import MediaAttachment from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission from flat_api.models.organization_invitation import OrganizationInvitation from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink +from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation from flat_api.models.resource_rights import ResourceRights from flat_api.models.score_comment import ScoreComment from flat_api.models.score_comment_context import ScoreCommentContext from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.models.score_comment_moderation import ScoreCommentModeration from flat_api.models.score_comment_update import ScoreCommentUpdate from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_data_encoding import ScoreDataEncoding from flat_api.models.score_details import ScoreDetails from flat_api.models.score_fork import ScoreFork from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts from flat_api.models.score_modification import ScoreModification +from flat_api.models.score_plays_counts import ScorePlaysCounts from flat_api.models.score_privacy import ScorePrivacy from flat_api.models.score_revision import ScoreRevision from flat_api.models.score_revision_creation import ScoreRevisionCreation from flat_api.models.score_revision_statistics import ScoreRevisionStatistics from flat_api.models.score_source import ScoreSource -from flat_api.models.score_summary import ScoreSummary from flat_api.models.score_track import ScoreTrack from flat_api.models.score_track_creation import ScoreTrackCreation from flat_api.models.score_track_point import ScoreTrackPoint @@ -98,11 +127,13 @@ from flat_api.models.score_track_type import ScoreTrackType from flat_api.models.score_track_update import ScoreTrackUpdate from flat_api.models.score_views_counts import ScoreViewsCounts +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions +from flat_api.models.task_progress import TaskProgress from flat_api.models.user_admin_update import UserAdminUpdate -from flat_api.models.user_basics import UserBasics from flat_api.models.user_creation import UserCreation from flat_api.models.user_details import UserDetails from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_instruments import UserInstruments +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense from flat_api.models.user_public import UserPublic from flat_api.models.user_public_summary import UserPublicSummary diff --git a/flat_api/api/__init__.py b/flat_api/api/__init__.py index 2c80b55..7f25776 100644 --- a/flat_api/api/__init__.py +++ b/flat_api/api/__init__.py @@ -9,4 +9,5 @@ from flat_api.api.group_api import GroupApi from flat_api.api.organization_api import OrganizationApi from flat_api.api.score_api import ScoreApi +from flat_api.api.task_api import TaskApi from flat_api.api.user_api import UserApi diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index fc48518..78c7e94 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -43,6 +43,7 @@ def get_authenticated_user(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param bool only_id: Only return the user id :return: UserDetails If the method is called asynchronously, returns the request thread. @@ -64,6 +65,7 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param bool only_id: Only return the user id :return: UserDetails If the method is called asynchronously, returns the request thread. @@ -71,7 +73,7 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = [] # noqa: E501 + all_params = ['only_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -91,6 +93,8 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'only_id' in local_var_params: + query_params.append(('onlyId', local_var_params['only_id'])) # noqa: E501 header_params = {} diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index b061998..f74b617 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -233,6 +233,110 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def archive_assignment(self, _class, assignment, **kwargs): # noqa: E501 + """Archive the assignment # noqa: E501 + + Archive the assignment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_assignment(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: Assignment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 + else: + (data) = self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 + return data + + def archive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 + """Archive the assignment # noqa: E501 + + Archive the assignment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_assignment_with_http_info(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: Assignment + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method archive_assignment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `archive_assignment`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `archive_assignment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/archive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Assignment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def archive_class(self, _class, **kwargs): # noqa: E501 """Archive the class # noqa: E501 @@ -329,43 +433,43 @@ def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def copy_assignment(self, _class, assignment, assignment_copy, **kwargs): # noqa: E501 + def copy_assignment(self, _class, assignment, body, **kwargs): # noqa: E501 """Copy an assignment # noqa: E501 Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.copy_assignment(_class, assignment, assignment_copy, async_req=True) + >>> thread = api.copy_assignment(_class, assignment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy assignment_copy: (required) + :param AssignmentCopy body: (required) :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.copy_assignment_with_http_info(_class, assignment, assignment_copy, **kwargs) # noqa: E501 + return self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 else: - (data) = self.copy_assignment_with_http_info(_class, assignment, assignment_copy, **kwargs) # noqa: E501 + (data) = self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 return data - def copy_assignment_with_http_info(self, _class, assignment, assignment_copy, **kwargs): # noqa: E501 + def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 """Copy an assignment # noqa: E501 Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.copy_assignment_with_http_info(_class, assignment, assignment_copy, async_req=True) + >>> thread = api.copy_assignment_with_http_info(_class, assignment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy assignment_copy: (required) + :param AssignmentCopy body: (required) :return: Assignment If the method is called asynchronously, returns the request thread. @@ -373,7 +477,7 @@ def copy_assignment_with_http_info(self, _class, assignment, assignment_copy, ** local_var_params = locals() - all_params = ['_class', 'assignment', 'assignment_copy'] # noqa: E501 + all_params = ['_class', 'assignment', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -395,10 +499,10 @@ def copy_assignment_with_http_info(self, _class, assignment, assignment_copy, ** if ('assignment' not in local_var_params or local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `copy_assignment`") # noqa: E501 - # verify the required parameter 'assignment_copy' is set - if ('assignment_copy' not in local_var_params or - local_var_params['assignment_copy'] is None): - raise ValueError("Missing the required parameter `assignment_copy` when calling `copy_assignment`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `copy_assignment`") # noqa: E501 collection_formats = {} @@ -416,8 +520,8 @@ def copy_assignment_with_http_info(self, _class, assignment, assignment_copy, ** local_var_files = {} body_params = None - if 'assignment_copy' in local_var_params: - body_params = local_var_params['assignment_copy'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -456,7 +560,7 @@ def create_assignment(self, _class, **kwargs): # noqa: E501 :param async_req bool :param str _class: Unique identifier of the class (required) - :param AssignmentCreation assignment_creation: + :param AssignmentCreation body: :return: Assignment If the method is called asynchronously, returns the request thread. @@ -479,7 +583,7 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 :param async_req bool :param str _class: Unique identifier of the class (required) - :param AssignmentCreation assignment_creation: + :param AssignmentCreation body: :return: Assignment If the method is called asynchronously, returns the request thread. @@ -487,7 +591,7 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['_class', 'assignment_creation'] # noqa: E501 + all_params = ['_class', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -520,8 +624,8 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'assignment_creation' in local_var_params: - body_params = local_var_params['assignment_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -549,39 +653,39 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_class(self, class_creation, **kwargs): # noqa: E501 + def create_class(self, body, **kwargs): # noqa: E501 """Create a new class # noqa: E501 - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_class(class_creation, async_req=True) + >>> thread = api.create_class(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ClassCreation class_creation: (required) + :param ClassCreation body: (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_class_with_http_info(class_creation, **kwargs) # noqa: E501 + return self.create_class_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.create_class_with_http_info(class_creation, **kwargs) # noqa: E501 + (data) = self.create_class_with_http_info(body, **kwargs) # noqa: E501 return data - def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 + def create_class_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new class # noqa: E501 - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_class_with_http_info(class_creation, async_req=True) + >>> thread = api.create_class_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ClassCreation class_creation: (required) + :param ClassCreation body: (required) :return: ClassDetails If the method is called asynchronously, returns the request thread. @@ -589,7 +693,7 @@ def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['class_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -603,10 +707,10 @@ def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'class_creation' is set - if ('class_creation' not in local_var_params or - local_var_params['class_creation'] is None): - raise ValueError("Missing the required parameter `class_creation` when calling `create_class`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_class`") # noqa: E501 collection_formats = {} @@ -620,8 +724,8 @@ def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'class_creation' in local_var_params: - body_params = local_var_params['class_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -649,43 +753,43 @@ def create_class_with_http_info(self, class_creation, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_submission(self, _class, assignment, assignment_submission_update, **kwargs): # noqa: E501 + def create_submission(self, _class, assignment, body, **kwargs): # noqa: E501 """Create or edit a submission # noqa: E501 - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_submission(_class, assignment, assignment_submission_update, async_req=True) + >>> thread = api.create_submission(_class, assignment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate assignment_submission_update: (required) + :param AssignmentSubmissionUpdate body: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_submission_with_http_info(_class, assignment, assignment_submission_update, **kwargs) # noqa: E501 + return self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 else: - (data) = self.create_submission_with_http_info(_class, assignment, assignment_submission_update, **kwargs) # noqa: E501 + (data) = self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 return data - def create_submission_with_http_info(self, _class, assignment, assignment_submission_update, **kwargs): # noqa: E501 + def create_submission_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 """Create or edit a submission # noqa: E501 - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_submission_with_http_info(_class, assignment, assignment_submission_update, async_req=True) + >>> thread = api.create_submission_with_http_info(_class, assignment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate assignment_submission_update: (required) + :param AssignmentSubmissionUpdate body: (required) :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. @@ -693,7 +797,7 @@ def create_submission_with_http_info(self, _class, assignment, assignment_submis local_var_params = locals() - all_params = ['_class', 'assignment', 'assignment_submission_update'] # noqa: E501 + all_params = ['_class', 'assignment', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -715,10 +819,10 @@ def create_submission_with_http_info(self, _class, assignment, assignment_submis if ('assignment' not in local_var_params or local_var_params['assignment'] is None): raise ValueError("Missing the required parameter `assignment` when calling `create_submission`") # noqa: E501 - # verify the required parameter 'assignment_submission_update' is set - if ('assignment_submission_update' not in local_var_params or - local_var_params['assignment_submission_update'] is None): - raise ValueError("Missing the required parameter `assignment_submission_update` when calling `create_submission`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_submission`") # noqa: E501 collection_formats = {} @@ -736,8 +840,8 @@ def create_submission_with_http_info(self, _class, assignment, assignment_submis local_var_files = {} body_params = None - if 'assignment_submission_update' in local_var_params: - body_params = local_var_params['assignment_submission_update'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -869,53 +973,51 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def edit_submission(self, _class, assignment, submission, assignment_submission_update, **kwargs): # noqa: E501 - """Edit a submission # noqa: E501 + def delete_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Delete a submission # noqa: E501 - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` # noqa: E501 + Use this method as a teacher to delete a submission and allow student to start over the assignment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_submission(_class, assignment, submission, assignment_submission_update, async_req=True) + >>> thread = api.delete_submission(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate assignment_submission_update: (required) - :return: AssignmentSubmission + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, **kwargs) # noqa: E501 + return self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 else: - (data) = self.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, **kwargs) # noqa: E501 + (data) = self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 return data - def edit_submission_with_http_info(self, _class, assignment, submission, assignment_submission_update, **kwargs): # noqa: E501 - """Edit a submission # noqa: E501 + def delete_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Delete a submission # noqa: E501 - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` # noqa: E501 + Use this method as a teacher to delete a submission and allow student to start over the assignment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, assignment_submission_update, async_req=True) + >>> thread = api.delete_submission_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate assignment_submission_update: (required) - :return: AssignmentSubmission + :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission', 'assignment_submission_update'] # noqa: E501 + all_params = ['_class', 'assignment', 'submission'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -925,26 +1027,22 @@ def edit_submission_with_http_info(self, _class, assignment, submission, assignm if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method edit_submission" % key + " to method delete_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `delete_submission`") # noqa: E501 # verify the required parameter 'assignment' is set if ('assignment' not in local_var_params or local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 + raise ValueError("Missing the required parameter `assignment` when calling `delete_submission`") # noqa: E501 # verify the required parameter 'submission' is set if ('submission' not in local_var_params or local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 - # verify the required parameter 'assignment_submission_update' is set - if ('assignment_submission_update' not in local_var_params or - local_var_params['assignment_submission_update'] is None): - raise ValueError("Missing the required parameter `assignment_submission_update` when calling `edit_submission`") # noqa: E501 + raise ValueError("Missing the required parameter `submission` when calling `delete_submission`") # noqa: E501 collection_formats = {} @@ -964,28 +1062,22 @@ def edit_submission_with_http_info(self, _class, assignment, submission, assignm local_var_files = {} body_params = None - if 'assignment_submission_update' in local_var_params: - body_params = local_var_params['assignment_submission_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'PUT', + '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AssignmentSubmission', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -993,47 +1085,51 @@ def edit_submission_with_http_info(self, _class, assignment, submission, assignm _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 - """Join a class # noqa: E501 + def delete_submission_comment(self, _class, assignment, submission, comment, **kwargs): # noqa: E501 + """Delete a feedback comment to a submission # noqa: E501 - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.enroll_class(enrollment_code, async_req=True) + >>> thread = api.delete_submission_comment(_class, assignment, submission, comment, async_req=True) >>> result = thread.get() :param async_req bool - :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :return: ClassDetails + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param str comment: Unique identifier of the comment (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 + return self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 else: - (data) = self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 + (data) = self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 return data - def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 - """Join a class # noqa: E501 + def delete_submission_comment_with_http_info(self, _class, assignment, submission, comment, **kwargs): # noqa: E501 + """Delete a feedback comment to a submission # noqa: E501 - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.enroll_class_with_http_info(enrollment_code, async_req=True) + >>> thread = api.delete_submission_comment_with_http_info(_class, assignment, submission, comment, async_req=True) >>> result = thread.get() :param async_req bool - :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :return: ClassDetails + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param str comment: Unique identifier of the comment (required) + :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['enrollment_code'] # noqa: E501 + all_params = ['_class', 'assignment', 'submission', 'comment'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1043,20 +1139,38 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method enroll_class" % key + " to method delete_submission_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'enrollment_code' is set - if ('enrollment_code' not in local_var_params or - local_var_params['enrollment_code'] is None): - raise ValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `delete_submission_comment`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `delete_submission_comment`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `delete_submission_comment`") # noqa: E501 + # verify the required parameter 'comment' is set + if ('comment' not in local_var_params or + local_var_params['comment'] is None): + raise ValueError("Missing the required parameter `comment` when calling `delete_submission_comment`") # noqa: E501 collection_formats = {} path_params = {} - if 'enrollment_code' in local_var_params: - path_params['enrollmentCode'] = local_var_params['enrollment_code'] # noqa: E501 + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] @@ -1074,14 +1188,14 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/enroll/{enrollmentCode}', 'POST', + '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ClassDetails', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1089,45 +1203,53 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_class(self, _class, **kwargs): # noqa: E501 - """Get the details of a single class # noqa: E501 + def edit_submission(self, _class, assignment, submission, body, **kwargs): # noqa: E501 + """Edit a submission # noqa: E501 + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_class(_class, async_req=True) + >>> thread = api.edit_submission(_class, assignment, submission, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param AssignmentSubmissionUpdate body: (required) + :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 + return self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 else: - (data) = self.get_class_with_http_info(_class, **kwargs) # noqa: E501 + (data) = self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 return data - def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Get the details of a single class # noqa: E501 + def edit_submission_with_http_info(self, _class, assignment, submission, body, **kwargs): # noqa: E501 + """Edit a submission # noqa: E501 + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_class_with_http_info(_class, async_req=True) + >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, body, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param AssignmentSubmissionUpdate body: (required) + :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 + all_params = ['_class', 'assignment', 'submission', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1137,20 +1259,36 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_class" % key + " to method edit_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `edit_submission`") # noqa: E501 collection_formats = {} path_params = {} if '_class' in local_var_params: path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -1160,22 +1298,28 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}', 'GET', + '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ClassDetails', # noqa: E501 + response_type='AssignmentSubmission', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1183,47 +1327,47 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_score_submissions(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 + def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 + """Join a class # noqa: E501 - 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. # noqa: E501 + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions(score, async_req=True) + >>> thread = api.enroll_class(enrollment_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :return: list[AssignmentSubmission] + :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 + return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 else: - (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 + (data) = self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 return data - def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 + def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 + """Join a class # noqa: E501 - 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. # noqa: E501 + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) + >>> thread = api.enroll_class_with_http_info(enrollment_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :return: list[AssignmentSubmission] + :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :return: ClassDetails If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score'] # noqa: E501 + all_params = ['enrollment_code'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1233,20 +1377,20 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_score_submissions" % key + " to method enroll_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 + # verify the required parameter 'enrollment_code' is set + if ('enrollment_code' not in local_var_params or + local_var_params['enrollment_code'] is None): + raise ValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 collection_formats = {} path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 + if 'enrollment_code' in local_var_params: + path_params['enrollmentCode'] = local_var_params['enrollment_code'] # noqa: E501 query_params = [] @@ -1264,14 +1408,14 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/scores/{score}/submissions', 'GET', + '/classes/enroll/{enrollmentCode}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 + response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1279,49 +1423,49 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get a student submission # noqa: E501 + def export_submissions_reviews_as_csv(self, _class, assignment, **kwargs): # noqa: E501 + """CSV Grades exports # noqa: E501 + Export list of submissions grades to a CSV file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission(_class, assignment, submission, async_req=True) + >>> thread = api.export_submissions_reviews_as_csv(_class, assignment, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :return: AssignmentSubmission + :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 + return self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 else: - (data) = self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 + (data) = self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 return data - def get_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get a student submission # noqa: E501 + def export_submissions_reviews_as_csv_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 + """CSV Grades exports # noqa: E501 + Export list of submissions grades to a CSV file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async_req=True) + >>> thread = api.export_submissions_reviews_as_csv_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :return: AssignmentSubmission + :return: file If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission'] # noqa: E501 + all_params = ['_class', 'assignment'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1331,22 +1475,18 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_submission" % key + " to method export_submissions_reviews_as_csv" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_csv`") # noqa: E501 # verify the required parameter 'assignment' is set if ('assignment' not in local_var_params or local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 - # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 + raise ValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_csv`") # noqa: E501 collection_formats = {} @@ -1355,8 +1495,6 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs path_params['class'] = local_var_params['_class'] # noqa: E501 if 'assignment' in local_var_params: path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -1368,20 +1506,20 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['text/csv']) # noqa: E501 # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'GET', + '/classes/{class}/assignments/{assignment}/submissions/csv', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AssignmentSubmission', # noqa: E501 + response_type='file', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1389,40 +1527,42 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 + def export_submissions_reviews_as_excel(self, _class, assignment, **kwargs): # noqa: E501 + """Excel Grades exports # noqa: E501 + Export list of submissions grades to an Excel file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submissions(_class, assignment, async_req=True) + >>> thread = api.export_submissions_reviews_as_excel(_class, assignment, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: list[AssignmentSubmission] + :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 + return self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 else: - (data) = self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 + (data) = self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 return data - def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 + def export_submissions_reviews_as_excel_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 + """Excel Grades exports # noqa: E501 + Export list of submissions grades to an Excel file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submissions_with_http_info(_class, assignment, async_req=True) + >>> thread = api.export_submissions_reviews_as_excel_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: list[AssignmentSubmission] + :return: file If the method is called asynchronously, returns the request thread. """ @@ -1439,18 +1579,18 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_submissions" % key + " to method export_submissions_reviews_as_excel" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_excel`") # noqa: E501 # verify the required parameter 'assignment' is set if ('assignment' not in local_var_params or local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 + raise ValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_excel`") # noqa: E501 collection_formats = {} @@ -1470,20 +1610,20 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']) # noqa: E501 # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions', 'GET', + '/classes/{class}/assignments/{assignment}/submissions/excel', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 + response_type='file', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1491,45 +1631,51 @@ def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_assignments(self, _class, **kwargs): # noqa: E501 - """Assignments listing # noqa: E501 + def fork_score(self, score, body, **kwargs): # noqa: E501 + """Fork a score # noqa: E501 + 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_assignments(_class, async_req=True) + >>> thread = api.fork_score(score, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str _class: Unique identifier of the class (required) - :return: list[Assignment] + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param ScoreFork body: (required) + :param str sharing_key: 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. + :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 + return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 + (data) = self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 return data - def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 - """Assignments listing # noqa: E501 + def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 + """Fork a score # noqa: E501 + 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_assignments_with_http_info(_class, async_req=True) + >>> thread = api.fork_score_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str _class: Unique identifier of the class (required) - :return: list[Assignment] + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param ScoreFork body: (required) + :param str sharing_key: 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. + :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 + all_params = ['score', 'body', 'sharing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1539,22 +1685,28 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method list_assignments" % key + " to method fork_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 + # verify the required parameter 'score' is set + if ('score' not in local_var_params or + local_var_params['score'] is None): + raise ValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 collection_formats = {} path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1562,22 +1714,28 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/assignments', 'GET', + '/scores/{score}/fork', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Assignment]', # noqa: E501 + response_type='ScoreDetails', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1585,49 +1743,45 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 - """List the submissions for a student # noqa: E501 + def get_class(self, _class, **kwargs): # noqa: E501 + """Get the details of a single class # noqa: E501 - Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_class_student_submissions(_class, user, async_req=True) + >>> thread = api.get_class(_class, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :return: list[AssignmentSubmission] + :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 + return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 else: - (data) = self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 + (data) = self.get_class_with_http_info(_class, **kwargs) # noqa: E501 return data - def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): # noqa: E501 - """List the submissions for a student # noqa: E501 + def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 + """Get the details of a single class # noqa: E501 - Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async_req=True) + >>> thread = api.get_class_with_http_info(_class, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :return: list[AssignmentSubmission] + :return: ClassDetails If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'user'] # noqa: E501 + all_params = ['_class'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1637,26 +1791,20 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method list_class_student_submissions" % key + " to method get_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 - # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 collection_formats = {} path_params = {} if '_class' in local_var_params: path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] @@ -1674,14 +1822,14 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/students/{user}/submissions', 'GET', + '/classes/{class}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 + response_type='ClassDetails', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1689,45 +1837,47 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_classes(self, **kwargs): # noqa: E501 - """List the classes available for the current user # noqa: E501 + def get_score_submissions(self, score, **kwargs): # noqa: E501 + """List submissions related to the score # noqa: E501 + 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_classes(async_req=True) + >>> thread = api.get_score_submissions(score, async_req=True) >>> result = thread.get() :param async_req bool - :param str state: Filter the classes by state - :return: list[ClassDetails] + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.list_classes_with_http_info(**kwargs) # noqa: E501 + return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 else: - (data) = self.list_classes_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 return data - def list_classes_with_http_info(self, **kwargs): # noqa: E501 - """List the classes available for the current user # noqa: E501 + def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 + """List submissions related to the score # noqa: E501 + 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_classes_with_http_info(async_req=True) + >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) >>> result = thread.get() :param async_req bool - :param str state: Filter the classes by state - :return: list[ClassDetails] + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['state'] # noqa: E501 + all_params = ['score'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1737,18 +1887,22 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method list_classes" % key + " to method get_score_submissions" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'score' is set + if ('score' not in local_var_params or + local_var_params['score'] is None): + raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 collection_formats = {} path_params = {} + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'state' in local_var_params: - query_params.append(('state', local_var_params['state'])) # noqa: E501 header_params = {} @@ -1764,14 +1918,14 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes', 'GET', + '/scores/{score}/submissions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ClassDetails]', # noqa: E501 + response_type='list[AssignmentSubmission]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1779,47 +1933,49 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def unarchive_class(self, _class, **kwargs): # noqa: E501 - """Unarchive the class # noqa: E501 + def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Get a student submission # noqa: E501 - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_class(_class, async_req=True) + >>> thread = api.get_submission(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 + return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 else: - (data) = self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 + (data) = self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 return data - def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Unarchive the class # noqa: E501 + def get_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Get a student submission # noqa: E501 - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_class_with_http_info(_class, async_req=True) + >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 + all_params = ['_class', 'assignment', 'submission'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1829,20 +1985,32 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method unarchive_class" % key + " to method get_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 collection_formats = {} path_params = {} if '_class' in local_var_params: path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -1860,14 +2028,14 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}/archive', 'DELETE', + '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ClassDetails', # noqa: E501 + response_type='AssignmentSubmission', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -1875,49 +2043,49 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_class(self, _class, **kwargs): # noqa: E501 - """Update the class # noqa: E501 + def get_submission_comments(self, _class, assignment, submission, **kwargs): # noqa: E501 + """List the feedback comments of a submission # noqa: E501 - Update the meta information of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_class(_class, async_req=True) + >>> thread = api.get_submission_comments(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :param ClassUpdate class_update: Details of the Class - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: list[AssignmentSubmissionComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 + return self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 else: - (data) = self.update_class_with_http_info(_class, **kwargs) # noqa: E501 + (data) = self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 return data - def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Update the class # noqa: E501 + def get_submission_comments_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 + """List the feedback comments of a submission # noqa: E501 - Update the meta information of the class # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_class_with_http_info(_class, async_req=True) + >>> thread = api.get_submission_comments_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() :param async_req bool :param str _class: Unique identifier of the class (required) - :param ClassUpdate class_update: Details of the Class - :return: ClassDetails + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: list[AssignmentSubmissionComment] If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'class_update'] # noqa: E501 + all_params = ['_class', 'assignment', 'submission'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1927,20 +2095,32 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method update_class" % key + " to method get_submission_comments" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set if ('_class' not in local_var_params or local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 + raise ValueError("Missing the required parameter `_class` when calling `get_submission_comments`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `get_submission_comments`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `get_submission_comments`") # noqa: E501 collection_formats = {} path_params = {} if '_class' in local_var_params: path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 query_params = [] @@ -1950,28 +2130,1080 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'class_update' in local_var_params: - body_params = local_var_params['class_update'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( - '/classes/{class}', 'PUT', + '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ClassDetails', # noqa: E501 + response_type='list[AssignmentSubmissionComment]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_submission_history(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Get the history of the submission # noqa: E501 + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submission_history(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: list[AssignmentSubmissionHistory] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 + else: + (data) = self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 + return data + + def get_submission_history_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 + """Get the history of the submission # noqa: E501 + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submission_history_with_http_info(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :return: list[AssignmentSubmissionHistory] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment', 'submission'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_submission_history" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `get_submission_history`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `get_submission_history`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `get_submission_history`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/submissions/{submission}/history', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AssignmentSubmissionHistory]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 + """List the students' submissions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submissions(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: list[AssignmentSubmission] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 + else: + (data) = self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 + return data + + def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 + """List the students' submissions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_submissions_with_http_info(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: list[AssignmentSubmission] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_submissions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/submissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AssignmentSubmission]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_assignments(self, _class, **kwargs): # noqa: E501 + """Assignments listing # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assignments(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :return: list[Assignment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 + else: + (data) = self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 + return data + + def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 + """Assignments listing # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assignments_with_http_info(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :return: list[Assignment] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_assignments" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Assignment]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 + """List the submissions for a student # noqa: E501 + + Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_class_student_submissions(_class, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str user: Unique identifier of the user (required) + :return: list[AssignmentSubmission] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 + else: + (data) = self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 + return data + + def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): # noqa: E501 + """List the submissions for a student # noqa: E501 + + Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str user: Unique identifier of the user (required) + :return: list[AssignmentSubmission] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_class_student_submissions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in local_var_params or + local_var_params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/students/{user}/submissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AssignmentSubmission]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_classes(self, **kwargs): # noqa: E501 + """List the classes available for the current user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_classes(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: Filter the classes by state + :return: list[ClassDetails] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_classes_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_classes_with_http_info(**kwargs) # noqa: E501 + return data + + def list_classes_with_http_info(self, **kwargs): # noqa: E501 + """List the classes available for the current user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_classes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: Filter the classes by state + :return: list[ClassDetails] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['state'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_classes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in local_var_params: + query_params.append(('state', local_var_params['state'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ClassDetails]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def post_submission_comment(self, _class, assignment, submission, assignment_submission_comment_creation, **kwargs): # noqa: E501 + """Add a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :return: AssignmentSubmissionComment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 + else: + (data) = self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 + return data + + def post_submission_comment_with_http_info(self, _class, assignment, submission, assignment_submission_comment_creation, **kwargs): # noqa: E501 + """Add a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :return: AssignmentSubmissionComment + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment', 'submission', 'assignment_submission_comment_creation'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_submission_comment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `post_submission_comment`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `post_submission_comment`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `post_submission_comment`") # noqa: E501 + # verify the required parameter 'assignment_submission_comment_creation' is set + if ('assignment_submission_comment_creation' not in local_var_params or + local_var_params['assignment_submission_comment_creation'] is None): + raise ValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `post_submission_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'assignment_submission_comment_creation' in local_var_params: + body_params = local_var_params['assignment_submission_comment_creation'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssignmentSubmissionComment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def unarchive_assignment(self, _class, assignment, **kwargs): # noqa: E501 + """Unarchive the assignment. # noqa: E501 + + Mark the assignment as `active`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_assignment(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: Assignment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 + else: + (data) = self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 + return data + + def unarchive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 + """Unarchive the assignment. # noqa: E501 + + Mark the assignment as `active`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_assignment_with_http_info(_class, assignment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :return: Assignment + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method unarchive_assignment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `unarchive_assignment`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `unarchive_assignment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/archive', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Assignment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def unarchive_class(self, _class, **kwargs): # noqa: E501 + """Unarchive the class # noqa: E501 + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_class(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :return: ClassDetails + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 + else: + (data) = self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 + return data + + def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 + """Unarchive the class # noqa: E501 + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_class_with_http_info(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :return: ClassDetails + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method unarchive_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/archive', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ClassDetails', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_class(self, _class, **kwargs): # noqa: E501 + """Update the class # noqa: E501 + + Update the meta information of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_class(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param ClassUpdate body: Details of the Class + :return: ClassDetails + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 + else: + (data) = self.update_class_with_http_info(_class, **kwargs) # noqa: E501 + return data + + def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 + """Update the class # noqa: E501 + + Update the meta information of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_class_with_http_info(_class, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param ClassUpdate body: Details of the Class + :return: ClassDetails + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ClassDetails', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_submission_comment(self, _class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs): # noqa: E501 + """Update a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param str comment: Unique identifier of the comment (required) + :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :return: AssignmentSubmissionComment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 + else: + (data) = self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 + return data + + def update_submission_comment_with_http_info(self, _class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs): # noqa: E501 + """Update a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str _class: Unique identifier of the class (required) + :param str assignment: Unique identifier of the assignment (required) + :param str submission: Unique identifier of the submission (required) + :param str comment: Unique identifier of the comment (required) + :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :return: AssignmentSubmissionComment + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['_class', 'assignment', 'submission', 'comment', 'assignment_submission_comment_creation'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_submission_comment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_class' is set + if ('_class' not in local_var_params or + local_var_params['_class'] is None): + raise ValueError("Missing the required parameter `_class` when calling `update_submission_comment`") # noqa: E501 + # verify the required parameter 'assignment' is set + if ('assignment' not in local_var_params or + local_var_params['assignment'] is None): + raise ValueError("Missing the required parameter `assignment` when calling `update_submission_comment`") # noqa: E501 + # verify the required parameter 'submission' is set + if ('submission' not in local_var_params or + local_var_params['submission'] is None): + raise ValueError("Missing the required parameter `submission` when calling `update_submission_comment`") # noqa: E501 + # verify the required parameter 'comment' is set + if ('comment' not in local_var_params or + local_var_params['comment'] is None): + raise ValueError("Missing the required parameter `comment` when calling `update_submission_comment`") # noqa: E501 + # verify the required parameter 'assignment_submission_comment_creation' is set + if ('assignment_submission_comment_creation' not in local_var_params or + local_var_params['assignment_submission_comment_creation'] is None): + raise ValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `update_submission_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if '_class' in local_var_params: + path_params['class'] = local_var_params['_class'] # noqa: E501 + if 'assignment' in local_var_params: + path_params['assignment'] = local_var_params['assignment'] # noqa: E501 + if 'submission' in local_var_params: + path_params['submission'] = local_var_params['submission'] # noqa: E501 + if 'comment' in local_var_params: + path_params['comment'] = local_var_params['comment'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'assignment_submission_comment_creation' in local_var_params: + body_params = local_var_params['assignment_submission_comment_creation'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssignmentSubmissionComment', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index b8b1634..0b5bc1f 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -43,7 +43,7 @@ def add_score_to_collection(self, collection, score, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: ScoreDetails @@ -67,7 +67,7 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :return: ScoreDetails @@ -141,39 +141,39 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_collection(self, collection_creation, **kwargs): # noqa: E501 + def create_collection(self, body, **kwargs): # noqa: E501 """Create a new collection # noqa: E501 This method will create a new collection and add it to your `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_collection(collection_creation, async_req=True) + >>> thread = api.create_collection(body, async_req=True) >>> result = thread.get() :param async_req bool - :param CollectionCreation collection_creation: (required) + :param CollectionCreation body: (required) :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_collection_with_http_info(collection_creation, **kwargs) # noqa: E501 + return self.create_collection_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.create_collection_with_http_info(collection_creation, **kwargs) # noqa: E501 + (data) = self.create_collection_with_http_info(body, **kwargs) # noqa: E501 return data - def create_collection_with_http_info(self, collection_creation, **kwargs): # noqa: E501 + def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new collection # noqa: E501 This method will create a new collection and add it to your `root` collection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_collection_with_http_info(collection_creation, async_req=True) + >>> thread = api.create_collection_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param CollectionCreation collection_creation: (required) + :param CollectionCreation body: (required) :return: Collection If the method is called asynchronously, returns the request thread. @@ -181,7 +181,7 @@ def create_collection_with_http_info(self, collection_creation, **kwargs): # no local_var_params = locals() - all_params = ['collection_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -195,10 +195,10 @@ def create_collection_with_http_info(self, collection_creation, **kwargs): # no ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'collection_creation' is set - if ('collection_creation' not in local_var_params or - local_var_params['collection_creation'] is None): - raise ValueError("Missing the required parameter `collection_creation` when calling `create_collection`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_collection`") # noqa: E501 collection_formats = {} @@ -212,8 +212,8 @@ def create_collection_with_http_info(self, collection_creation, **kwargs): # no local_var_files = {} body_params = None - if 'collection_creation' in local_var_params: - body_params = local_var_params['collection_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -251,7 +251,7 @@ def delete_collection(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. @@ -273,7 +273,7 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. @@ -347,8 +347,9 @@ def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E5 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param str sharing_key: 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. :return: None If the method is called asynchronously, returns the request thread. @@ -370,8 +371,9 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param str sharing_key: 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. :return: None If the method is called asynchronously, returns the request thread. @@ -379,7 +381,7 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg local_var_params = locals() - all_params = ['collection', 'score'] # noqa: E501 + all_params = ['collection', 'score', 'sharing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -411,6 +413,8 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -450,8 +454,8 @@ def edit_collection(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification collection_modification: + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param CollectionModification body: :return: Collection If the method is called asynchronously, returns the request thread. @@ -472,8 +476,8 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification collection_modification: + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param CollectionModification body: :return: Collection If the method is called asynchronously, returns the request thread. @@ -481,7 +485,7 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['collection', 'collection_modification'] # noqa: E501 + all_params = ['collection', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -514,8 +518,8 @@ def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'collection_modification' in local_var_params: - body_params = local_var_params['collection_modification'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -552,7 +556,7 @@ def get_collection(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :return: Collection If the method is called asynchronously, @@ -574,7 +578,7 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :return: Collection If the method is called asynchronously, @@ -644,14 +648,14 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 def list_collection_scores(self, collection, **kwargs): # noqa: E501 """List the scores contained in a collection # noqa: E501 - Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. # noqa: E501 + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_collection_scores(collection, async_req=True) >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort :param str direction: Sort direction @@ -672,14 +676,14 @@ def list_collection_scores(self, collection, **kwargs): # noqa: E501 def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: E501 """List the scores contained in a collection # noqa: E501 - Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. # noqa: E501 + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_collection_scores_with_http_info(collection, async_req=True) >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort :param str direction: Sort direction @@ -768,7 +772,7 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: def list_collections(self, **kwargs): # noqa: E501 """List the collections # noqa: E501 - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. # noqa: E501 + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_collections(async_req=True) @@ -795,7 +799,7 @@ def list_collections(self, **kwargs): # noqa: E501 def list_collections_with_http_info(self, **kwargs): # noqa: E501 """List the collections # noqa: E501 - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. # noqa: E501 + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_collections_with_http_info(async_req=True) @@ -891,7 +895,7 @@ def untrash_collection(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. @@ -913,7 +917,7 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :return: None If the method is called asynchronously, returns the request thread. diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 7de86be..03c1a17 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -237,6 +237,7 @@ def list_group_users(self, group, **kwargs): # noqa: E501 :param async_req bool :param str group: Unique identifier of a Flat group (required) + :param str source: Filter the users by their source :return: list[UserPublic] If the method is called asynchronously, returns the request thread. @@ -258,6 +259,7 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 :param async_req bool :param str group: Unique identifier of a Flat group (required) + :param str source: Filter the users by their source :return: list[UserPublic] If the method is called asynchronously, returns the request thread. @@ -265,7 +267,7 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['group'] # noqa: E501 + all_params = ['group', 'source'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -291,6 +293,8 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] + if 'source' in local_var_params: + query_params.append(('source', local_var_params['source'])) # noqa: E501 header_params = {} diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 111293e..6554697 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,39 +33,143 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_lti_credentials(self, lti_credentials_creation, **kwargs): # noqa: E501 + def count_orga_users(self, **kwargs): # noqa: E501 + """Count the organization users using the provided filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_orga_users(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] role: Filter users by role + :param str q: The query to search + :param list[str] group: Filter users by group + :param bool no_active_license: Filter users who don't have an active license + :return: int[UserDetailsAdmin] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.count_orga_users_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.count_orga_users_with_http_info(**kwargs) # noqa: E501 + return data + + def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 + """Count the organization users using the provided filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_orga_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] role: Filter users by role + :param str q: The query to search + :param list[str] group: Filter users by group + :param bool no_active_license: Filter users who don't have an active license + :return: int[UserDetailsAdmin] + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['role', 'q', 'group', 'no_active_license'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method count_orga_users" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'role' in local_var_params: + query_params.append(('role', local_var_params['role'])) # noqa: E501 + collection_formats['role'] = 'multi' # noqa: E501 + if 'q' in local_var_params: + query_params.append(('q', local_var_params['q'])) # noqa: E501 + if 'group' in local_var_params: + query_params.append(('group', local_var_params['group'])) # noqa: E501 + collection_formats['group'] = 'multi' # noqa: E501 + if 'no_active_license' in local_var_params: + query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/organizations/users/count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='int[UserDetailsAdmin]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_lti_credentials(self, body, **kwargs): # noqa: E501 """Create a new couple of LTI 1.x credentials # noqa: E501 Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_lti_credentials(lti_credentials_creation, async_req=True) + >>> thread = api.create_lti_credentials(body, async_req=True) >>> result = thread.get() :param async_req bool - :param LtiCredentialsCreation lti_credentials_creation: (required) + :param LtiCredentialsCreation body: (required) :return: LtiCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_lti_credentials_with_http_info(lti_credentials_creation, **kwargs) # noqa: E501 + return self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.create_lti_credentials_with_http_info(lti_credentials_creation, **kwargs) # noqa: E501 + (data) = self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 return data - def create_lti_credentials_with_http_info(self, lti_credentials_creation, **kwargs): # noqa: E501 + def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new couple of LTI 1.x credentials # noqa: E501 Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_lti_credentials_with_http_info(lti_credentials_creation, async_req=True) + >>> thread = api.create_lti_credentials_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param LtiCredentialsCreation lti_credentials_creation: (required) + :param LtiCredentialsCreation body: (required) :return: LtiCredentials If the method is called asynchronously, returns the request thread. @@ -73,7 +177,7 @@ def create_lti_credentials_with_http_info(self, lti_credentials_creation, **kwar local_var_params = locals() - all_params = ['lti_credentials_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -87,10 +191,10 @@ def create_lti_credentials_with_http_info(self, lti_credentials_creation, **kwar ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'lti_credentials_creation' is set - if ('lti_credentials_creation' not in local_var_params or - local_var_params['lti_credentials_creation'] is None): - raise ValueError("Missing the required parameter `lti_credentials_creation` when calling `create_lti_credentials`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_lti_credentials`") # noqa: E501 collection_formats = {} @@ -104,8 +208,8 @@ def create_lti_credentials_with_http_info(self, lti_credentials_creation, **kwar local_var_files = {} body_params = None - if 'lti_credentials_creation' in local_var_params: - body_params = local_var_params['lti_credentials_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -143,7 +247,7 @@ def create_organization_invitation(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param OrganizationInvitationCreation organization_invitation_creation: + :param OrganizationInvitationCreation body: :return: OrganizationInvitation If the method is called asynchronously, returns the request thread. @@ -165,7 +269,7 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param OrganizationInvitationCreation organization_invitation_creation: + :param OrganizationInvitationCreation body: :return: OrganizationInvitation If the method is called asynchronously, returns the request thread. @@ -173,7 +277,7 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['organization_invitation_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -200,8 +304,8 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'organization_invitation_creation' in local_var_params: - body_params = local_var_params['organization_invitation_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -238,7 +342,7 @@ def create_organization_user(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param UserCreation user_creation: + :param UserCreation body: :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. @@ -259,7 +363,7 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param UserCreation user_creation: + :param UserCreation body: :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. @@ -267,7 +371,7 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['user_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -294,8 +398,8 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user_creation' in local_var_params: - body_params = local_var_params['user_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -323,6 +427,212 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def create_organization_user_access_token(self, user, **kwargs): # noqa: E501 + """Create a delegated API access token for an organization user # noqa: E501 + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user_access_token(user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Unique identifier of the Flat account (required) + :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: + :return: ApiAccessToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 + else: + (data) = self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 + return data + + def create_organization_user_access_token_with_http_info(self, user, **kwargs): # noqa: E501 + """Create a delegated API access token for an organization user # noqa: E501 + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user_access_token_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Unique identifier of the Flat account (required) + :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: + :return: ApiAccessToken + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['user', 'organization_user_access_token_creation'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_organization_user_access_token" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if ('user' not in local_var_params or + local_var_params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `create_organization_user_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization_user_access_token_creation' in local_var_params: + body_params = local_var_params['organization_user_access_token_creation'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/organizations/users/{user}/accessToken', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiAccessToken', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_organization_user_signin_link(self, user, **kwargs): # noqa: E501 + """Create a sign in link for an organization user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user_signin_link(user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Unique identifier of the Flat account (required) + :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: + :return: OrganizationUserSigninLink + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 + else: + (data) = self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 + return data + + def create_organization_user_signin_link_with_http_info(self, user, **kwargs): # noqa: E501 + """Create a sign in link for an organization user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_organization_user_signin_link_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user: Unique identifier of the Flat account (required) + :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: + :return: OrganizationUserSigninLink + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['user', 'organization_user_signin_link_creation'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_organization_user_signin_link" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if ('user' not in local_var_params or + local_var_params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `create_organization_user_signin_link`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization_user_signin_link_creation' in local_var_params: + body_params = local_var_params['organization_user_signin_link_creation'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/organizations/users/{user}/signinLink', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrganizationUserSigninLink', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def list_lti_credentials(self, **kwargs): # noqa: E501 """List LTI 1.x credentials # noqa: E501 @@ -524,10 +834,17 @@ def list_organization_users(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str role: Filter users by role - :param int limit: This is the maximum number of objects that may be returned + :param list[str] sort: The order to sort the user list + :param str direction: Sort direction :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :param list[str] role: Filter users by role + :param str q: The query to search + :param list[str] group: Filter users by group + :param bool no_active_license: Filter users who don't have an active license + :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :param bool only_ids: Return only user ids + :param int limit: This is the maximum number of objects that may be returned :return: list[UserDetailsAdmin] If the method is called asynchronously, returns the request thread. @@ -548,10 +865,17 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str role: Filter users by role - :param int limit: This is the maximum number of objects that may be returned + :param list[str] sort: The order to sort the user list + :param str direction: Sort direction :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :param list[str] role: Filter users by role + :param str q: The query to search + :param list[str] group: Filter users by group + :param bool no_active_license: Filter users who don't have an active license + :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :param bool only_ids: Return only user ids + :param int limit: This is the maximum number of objects that may be returned :return: list[UserDetailsAdmin] If the method is called asynchronously, returns the request thread. @@ -559,7 +883,7 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['role', 'limit', 'next', 'previous'] # noqa: E501 + all_params = ['sort', 'direction', 'next', 'previous', 'role', 'q', 'group', 'no_active_license', 'license_expiration_date', 'only_ids', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -583,14 +907,32 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'role' in local_var_params: - query_params.append(('role', local_var_params['role'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'sort' in local_var_params: + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + collection_formats['sort'] = 'multi' # noqa: E501 + if 'direction' in local_var_params: + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 if 'next' in local_var_params: query_params.append(('next', local_var_params['next'])) # noqa: E501 if 'previous' in local_var_params: query_params.append(('previous', local_var_params['previous'])) # noqa: E501 + if 'role' in local_var_params: + query_params.append(('role', local_var_params['role'])) # noqa: E501 + collection_formats['role'] = 'multi' # noqa: E501 + if 'q' in local_var_params: + query_params.append(('q', local_var_params['q'])) # noqa: E501 + if 'group' in local_var_params: + query_params.append(('group', local_var_params['group'])) # noqa: E501 + collection_formats['group'] = 'multi' # noqa: E501 + if 'no_active_license' in local_var_params: + query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 + if 'license_expiration_date' in local_var_params: + query_params.append(('licenseExpirationDate', local_var_params['license_expiration_date'])) # noqa: E501 + collection_formats['licenseExpirationDate'] = 'multi' # noqa: E501 + if 'only_ids' in local_var_params: + query_params.append(('onlyIds', local_var_params['only_ids'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -909,39 +1251,39 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_organization_user(self, user, user_admin_update, **kwargs): # noqa: E501 + def update_organization_user(self, user, body, **kwargs): # noqa: E501 """Update account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_organization_user(user, user_admin_update, async_req=True) + >>> thread = api.update_organization_user(user, body, async_req=True) >>> result = thread.get() :param async_req bool :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate user_admin_update: (required) + :param UserAdminUpdate body: (required) :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_organization_user_with_http_info(user, user_admin_update, **kwargs) # noqa: E501 + return self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 else: - (data) = self.update_organization_user_with_http_info(user, user_admin_update, **kwargs) # noqa: E501 + (data) = self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 return data - def update_organization_user_with_http_info(self, user, user_admin_update, **kwargs): # noqa: E501 + def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa: E501 """Update account information # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_organization_user_with_http_info(user, user_admin_update, async_req=True) + >>> thread = api.update_organization_user_with_http_info(user, body, async_req=True) >>> result = thread.get() :param async_req bool :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate user_admin_update: (required) + :param UserAdminUpdate body: (required) :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. @@ -949,7 +1291,7 @@ def update_organization_user_with_http_info(self, user, user_admin_update, **kwa local_var_params = locals() - all_params = ['user', 'user_admin_update'] # noqa: E501 + all_params = ['user', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -967,10 +1309,10 @@ def update_organization_user_with_http_info(self, user, user_admin_update, **kwa if ('user' not in local_var_params or local_var_params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `update_organization_user`") # noqa: E501 - # verify the required parameter 'user_admin_update' is set - if ('user_admin_update' not in local_var_params or - local_var_params['user_admin_update'] is None): - raise ValueError("Missing the required parameter `user_admin_update` when calling `update_organization_user`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update_organization_user`") # noqa: E501 collection_formats = {} @@ -986,8 +1328,8 @@ def update_organization_user_with_http_info(self, user, user_admin_update, **kwa local_var_files = {} body_params = None - if 'user_admin_update' in local_var_params: - body_params = local_var_params['user_admin_update'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index 1e0b09a..be8f27c 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,41 +33,41 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def add_score_collaborator(self, score, resource_collaborator_creation, **kwargs): # noqa: E501 + def add_score_collaborator(self, score, body, **kwargs): # noqa: E501 """Add a new collaborator # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_collaborator(score, resource_collaborator_creation, async_req=True) + >>> thread = api.add_score_collaborator(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation resource_collaborator_creation: (required) + :param ResourceCollaboratorCreation body: (required) :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_score_collaborator_with_http_info(score, resource_collaborator_creation, **kwargs) # noqa: E501 + return self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.add_score_collaborator_with_http_info(score, resource_collaborator_creation, **kwargs) # noqa: E501 + (data) = self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 return data - def add_score_collaborator_with_http_info(self, score, resource_collaborator_creation, **kwargs): # noqa: E501 + def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: E501 """Add a new collaborator # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_collaborator_with_http_info(score, resource_collaborator_creation, async_req=True) + >>> thread = api.add_score_collaborator_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation resource_collaborator_creation: (required) + :param ResourceCollaboratorCreation body: (required) :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. @@ -75,7 +75,7 @@ def add_score_collaborator_with_http_info(self, score, resource_collaborator_cre local_var_params = locals() - all_params = ['score', 'resource_collaborator_creation'] # noqa: E501 + all_params = ['score', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -93,10 +93,10 @@ def add_score_collaborator_with_http_info(self, score, resource_collaborator_cre if ('score' not in local_var_params or local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `add_score_collaborator`") # noqa: E501 - # verify the required parameter 'resource_collaborator_creation' is set - if ('resource_collaborator_creation' not in local_var_params or - local_var_params['resource_collaborator_creation'] is None): - raise ValueError("Missing the required parameter `resource_collaborator_creation` when calling `add_score_collaborator`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `add_score_collaborator`") # noqa: E501 collection_formats = {} @@ -112,8 +112,8 @@ def add_score_collaborator_with_http_info(self, score, resource_collaborator_cre local_var_files = {} body_params = None - if 'resource_collaborator_creation' in local_var_params: - body_params = local_var_params['resource_collaborator_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -141,41 +141,41 @@ def add_score_collaborator_with_http_info(self, score, resource_collaborator_cre _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def add_score_track(self, score, score_track_creation, **kwargs): # noqa: E501 + def add_score_track(self, score, body, **kwargs): # noqa: E501 """Add a new video or audio track to the score # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_track(score, score_track_creation, async_req=True) + >>> thread = api.add_score_track(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation score_track_creation: (required) + :param ScoreTrackCreation body: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_score_track_with_http_info(score, score_track_creation, **kwargs) # noqa: E501 + return self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.add_score_track_with_http_info(score, score_track_creation, **kwargs) # noqa: E501 + (data) = self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 return data - def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): # noqa: E501 + def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 """Add a new video or audio track to the score # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_track_with_http_info(score, score_track_creation, async_req=True) + >>> thread = api.add_score_track_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation score_track_creation: (required) + :param ScoreTrackCreation body: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. @@ -183,7 +183,7 @@ def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): local_var_params = locals() - all_params = ['score', 'score_track_creation'] # noqa: E501 + all_params = ['score', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -201,10 +201,10 @@ def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): if ('score' not in local_var_params or local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `add_score_track`") # noqa: E501 - # verify the required parameter 'score_track_creation' is set - if ('score_track_creation' not in local_var_params or - local_var_params['score_track_creation'] is None): - raise ValueError("Missing the required parameter `score_track_creation` when calling `add_score_track`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `add_score_track`") # noqa: E501 collection_formats = {} @@ -220,8 +220,8 @@ def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): local_var_files = {} body_params = None - if 'score_track_creation' in local_var_params: - body_params = local_var_params['score_track_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -249,39 +249,163 @@ def add_score_track_with_http_info(self, score, score_track_creation, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_score(self, score_creation, **kwargs): # noqa: E501 + def create_export_task(self, score, revision, format, **kwargs): # noqa: E501 + """Create a new score export task # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_export_task(score, revision, format, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) + :param str sharing_key: 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. + :param TaskExportOptions body: + :return: Task + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 + else: + (data) = self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 + return data + + def create_export_task_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 + """Create a new score export task # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_export_task_with_http_info(score, revision, format, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) + :param str sharing_key: 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. + :param TaskExportOptions body: + :return: Task + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['score', 'revision', 'format', 'sharing_key', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_export_task" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'score' is set + if ('score' not in local_var_params or + local_var_params['score'] is None): + raise ValueError("Missing the required parameter `score` when calling `create_export_task`") # noqa: E501 + # verify the required parameter 'revision' is set + if ('revision' not in local_var_params or + local_var_params['revision'] is None): + raise ValueError("Missing the required parameter `revision` when calling `create_export_task`") # noqa: E501 + # verify the required parameter 'format' is set + if ('format' not in local_var_params or + local_var_params['format'] is None): + raise ValueError("Missing the required parameter `format` when calling `create_export_task`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'score' in local_var_params: + path_params['score'] = local_var_params['score'] # noqa: E501 + if 'revision' in local_var_params: + path_params['revision'] = local_var_params['revision'] # noqa: E501 + if 'format' in local_var_params: + path_params['format'] = local_var_params['format'] # noqa: E501 + + query_params = [] + if 'sharing_key' in local_var_params: + query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/scores/{score}/revisions/{revision}/{format}/task', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Task', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_score(self, body, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. # noqa: E501 + 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score(score_creation, async_req=True) + >>> thread = api.create_score(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ScoreCreation score_creation: (required) + :param ScoreCreation body: (required) :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_score_with_http_info(score_creation, **kwargs) # noqa: E501 + return self.create_score_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.create_score_with_http_info(score_creation, **kwargs) # noqa: E501 + (data) = self.create_score_with_http_info(body, **kwargs) # noqa: E501 return data - def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 + def create_score_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new score # noqa: E501 - 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`), a MIDI (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore 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}`. # noqa: E501 + 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_with_http_info(score_creation, async_req=True) + >>> thread = api.create_score_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ScoreCreation score_creation: (required) + :param ScoreCreation body: (required) :return: ScoreDetails If the method is called asynchronously, returns the request thread. @@ -289,7 +413,7 @@ def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score_creation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -303,10 +427,10 @@ def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'score_creation' is set - if ('score_creation' not in local_var_params or - local_var_params['score_creation'] is None): - raise ValueError("Missing the required parameter `score_creation` when calling `create_score`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_score`") # noqa: E501 collection_formats = {} @@ -320,8 +444,8 @@ def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'score_creation' in local_var_params: - body_params = local_var_params['score_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -349,41 +473,41 @@ def create_score_with_http_info(self, score_creation, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_score_revision(self, score, score_revision_creation, **kwargs): # noqa: E501 + def create_score_revision(self, score, body, **kwargs): # noqa: E501 """Create a new revision # noqa: E501 Update a score by uploading a new revision for this one. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_revision(score, score_revision_creation, async_req=True) + >>> thread = api.create_score_revision(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation score_revision_creation: (required) + :param ScoreRevisionCreation body: (required) :return: ScoreRevision If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_score_revision_with_http_info(score, score_revision_creation, **kwargs) # noqa: E501 + return self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.create_score_revision_with_http_info(score, score_revision_creation, **kwargs) # noqa: E501 + (data) = self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 return data - def create_score_revision_with_http_info(self, score, score_revision_creation, **kwargs): # noqa: E501 + def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: E501 """Create a new revision # noqa: E501 Update a score by uploading a new revision for this one. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_revision_with_http_info(score, score_revision_creation, async_req=True) + >>> thread = api.create_score_revision_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation score_revision_creation: (required) + :param ScoreRevisionCreation body: (required) :return: ScoreRevision If the method is called asynchronously, returns the request thread. @@ -391,7 +515,7 @@ def create_score_revision_with_http_info(self, score, score_revision_creation, * local_var_params = locals() - all_params = ['score', 'score_revision_creation'] # noqa: E501 + all_params = ['score', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -409,10 +533,10 @@ def create_score_revision_with_http_info(self, score, score_revision_creation, * if ('score' not in local_var_params or local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `create_score_revision`") # noqa: E501 - # verify the required parameter 'score_revision_creation' is set - if ('score_revision_creation' not in local_var_params or - local_var_params['score_revision_creation'] is None): - raise ValueError("Missing the required parameter `score_revision_creation` when calling `create_score_revision`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_score_revision`") # noqa: E501 collection_formats = {} @@ -428,8 +552,8 @@ def create_score_revision_with_http_info(self, score, score_revision_creation, * local_var_files = {} body_params = None - if 'score_revision_creation' in local_var_params: - body_params = local_var_params['score_revision_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -468,6 +592,7 @@ def delete_score(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param bool now: If `true`, the score deletion will be scheduled to be done ASAP :return: None If the method is called asynchronously, returns the request thread. @@ -490,6 +615,7 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param bool now: If `true`, the score deletion will be scheduled to be done ASAP :return: None If the method is called asynchronously, returns the request thread. @@ -497,7 +623,7 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score'] # noqa: E501 + all_params = ['score', 'now'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -523,6 +649,8 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] + if 'now' in local_var_params: + query_params.append(('now', local_var_params['now'])) # noqa: E501 header_params = {} @@ -764,7 +892,7 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 def edit_score(self, score, **kwargs): # noqa: E501 """Edit a score's metadata # noqa: E501 - 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. # noqa: E501 + 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_score(score, async_req=True) @@ -772,7 +900,7 @@ def edit_score(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification score_modification: + :param ScoreModification body: :return: ScoreDetails If the method is called asynchronously, returns the request thread. @@ -787,7 +915,7 @@ def edit_score(self, score, **kwargs): # noqa: E501 def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 """Edit a score's metadata # noqa: E501 - 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. # noqa: E501 + 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_score_with_http_info(score, async_req=True) @@ -795,7 +923,7 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification score_modification: + :param ScoreModification body: :return: ScoreDetails If the method is called asynchronously, returns the request thread. @@ -803,7 +931,7 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score', 'score_modification'] # noqa: E501 + all_params = ['score', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -836,8 +964,8 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'score_modification' in local_var_params: - body_params = local_var_params['score_modification'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -865,18 +993,18 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def fork_score(self, score, score_fork, **kwargs): # noqa: E501 + def fork_score(self, score, body, **kwargs): # noqa: E501 """Fork a score # noqa: E501 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score(score, score_fork, async_req=True) + >>> thread = api.fork_score(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork score_fork: (required) + :param ScoreFork body: (required) :param str sharing_key: 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. :return: ScoreDetails If the method is called asynchronously, @@ -884,23 +1012,23 @@ def fork_score(self, score, score_fork, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.fork_score_with_http_info(score, score_fork, **kwargs) # noqa: E501 + return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.fork_score_with_http_info(score, score_fork, **kwargs) # noqa: E501 + (data) = self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 return data - def fork_score_with_http_info(self, score, score_fork, **kwargs): # noqa: E501 + def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 """Fork a score # noqa: E501 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score_with_http_info(score, score_fork, async_req=True) + >>> thread = api.fork_score_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork score_fork: (required) + :param ScoreFork body: (required) :param str sharing_key: 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. :return: ScoreDetails If the method is called asynchronously, @@ -909,7 +1037,7 @@ def fork_score_with_http_info(self, score, score_fork, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score', 'score_fork', 'sharing_key'] # noqa: E501 + all_params = ['score', 'body', 'sharing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -927,10 +1055,10 @@ def fork_score_with_http_info(self, score, score_fork, **kwargs): # noqa: E501 if ('score' not in local_var_params or local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 - # verify the required parameter 'score_fork' is set - if ('score_fork' not in local_var_params or - local_var_params['score_fork'] is None): - raise ValueError("Missing the required parameter `score_fork` when calling `fork_score`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 collection_formats = {} @@ -948,8 +1076,8 @@ def fork_score_with_http_info(self, score, score_fork, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'score_fork' in local_var_params: - body_params = local_var_params['score_fork'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1706,7 +1834,7 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E501 """Get a score revision data # noqa: E501 - 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`). # noqa: E501 + 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) @@ -1717,8 +1845,9 @@ def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) :param str sharing_key: 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. - :param str parts: An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \"1,2,5\". - :param bool only_cached: Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned + :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :param bool url: Returns a json with the `url` in it instead of redirecting :return: file If the method is called asynchronously, returns the request thread. @@ -1733,7 +1862,7 @@ def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E def get_score_revision_data_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 """Get a score revision data # noqa: E501 - 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`). # noqa: E501 + 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_score_revision_data_with_http_info(score, revision, format, async_req=True) @@ -1744,8 +1873,9 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) :param str sharing_key: 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. - :param str parts: An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \"1,2,5\". - :param bool only_cached: Only return files already generated and cached in Flat's production cache. If the file is not availabe, a 404 will be returned + :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :param bool url: Returns a json with the `url` in it instead of redirecting :return: file If the method is called asynchronously, returns the request thread. @@ -1753,7 +1883,7 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar local_var_params = locals() - all_params = ['score', 'revision', 'format', 'sharing_key', 'parts', 'only_cached'] # noqa: E501 + all_params = ['score', 'revision', 'format', 'sharing_key', 'parts', 'default_track', 'url'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1795,8 +1925,10 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 if 'parts' in local_var_params: query_params.append(('parts', local_var_params['parts'])) # noqa: E501 - if 'only_cached' in local_var_params: - query_params.append(('onlyCached', local_var_params['only_cached'])) # noqa: E501 + if 'default_track' in local_var_params: + query_params.append(('defaultTrack', local_var_params['default_track'])) # noqa: E501 + if 'url' in local_var_params: + query_params.append(('url', local_var_params['url'])) # noqa: E501 header_params = {} @@ -2240,6 +2372,8 @@ def list_score_tracks(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param str assignment: An assignment id with which all the tracks returned will be related to + :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track :return: list[ScoreTrack] If the method is called asynchronously, returns the request thread. @@ -2262,6 +2396,8 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param str assignment: An assignment id with which all the tracks returned will be related to + :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track :return: list[ScoreTrack] If the method is called asynchronously, returns the request thread. @@ -2269,7 +2405,7 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score', 'sharing_key'] # noqa: E501 + all_params = ['score', 'sharing_key', 'assignment', 'list_auto_track'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2297,6 +2433,10 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 query_params = [] if 'sharing_key' in local_var_params: query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 + if 'assignment' in local_var_params: + query_params.append(('assignment', local_var_params['assignment'])) # noqa: E501 + if 'list_auto_track' in local_var_params: + query_params.append(('listAutoTrack', local_var_params['list_auto_track'])) # noqa: E501 header_params = {} @@ -2539,18 +2679,18 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def post_score_comment(self, score, score_comment_creation, **kwargs): # noqa: E501 + def post_score_comment(self, score, body, **kwargs): # noqa: E501 """Post a new comment # noqa: E501 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`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_score_comment(score, score_comment_creation, async_req=True) + >>> thread = api.post_score_comment(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation score_comment_creation: (required) + :param ScoreCommentCreation body: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, @@ -2558,23 +2698,23 @@ def post_score_comment(self, score, score_comment_creation, **kwargs): # noqa: """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.post_score_comment_with_http_info(score, score_comment_creation, **kwargs) # noqa: E501 + return self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 else: - (data) = self.post_score_comment_with_http_info(score, score_comment_creation, **kwargs) # noqa: E501 + (data) = self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 return data - def post_score_comment_with_http_info(self, score, score_comment_creation, **kwargs): # noqa: E501 + def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E501 """Post a new comment # noqa: E501 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`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_score_comment_with_http_info(score, score_comment_creation, async_req=True) + >>> thread = api.post_score_comment_with_http_info(score, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation score_comment_creation: (required) + :param ScoreCommentCreation body: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, @@ -2583,7 +2723,7 @@ def post_score_comment_with_http_info(self, score, score_comment_creation, **kwa local_var_params = locals() - all_params = ['score', 'score_comment_creation', 'sharing_key'] # noqa: E501 + all_params = ['score', 'body', 'sharing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2601,10 +2741,10 @@ def post_score_comment_with_http_info(self, score, score_comment_creation, **kwa if ('score' not in local_var_params or local_var_params['score'] is None): raise ValueError("Missing the required parameter `score` when calling `post_score_comment`") # noqa: E501 - # verify the required parameter 'score_comment_creation' is set - if ('score_comment_creation' not in local_var_params or - local_var_params['score_comment_creation'] is None): - raise ValueError("Missing the required parameter `score_comment_creation` when calling `post_score_comment`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `post_score_comment`") # noqa: E501 collection_formats = {} @@ -2622,8 +2762,8 @@ def post_score_comment_with_http_info(self, score, score_comment_creation, **kwa local_var_files = {} body_params = None - if 'score_comment_creation' in local_var_params: - body_params = local_var_params['score_comment_creation'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -2833,7 +2973,7 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['OAuth2'] # noqa: E501 return self.api_client.call_api( '/scores/{score}/untrash', 'POST', @@ -2851,18 +2991,18 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_score_comment(self, score, comment, score_comment_update, **kwargs): # noqa: E501 + def update_score_comment(self, score, comment, body, **kwargs): # noqa: E501 """Update an existing comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_comment(score, comment, score_comment_update, async_req=True) + >>> thread = api.update_score_comment(score, comment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate score_comment_update: (required) + :param ScoreCommentUpdate body: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, @@ -2870,23 +3010,23 @@ def update_score_comment(self, score, comment, score_comment_update, **kwargs): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_score_comment_with_http_info(score, comment, score_comment_update, **kwargs) # noqa: E501 + return self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 else: - (data) = self.update_score_comment_with_http_info(score, comment, score_comment_update, **kwargs) # noqa: E501 + (data) = self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 return data - def update_score_comment_with_http_info(self, score, comment, score_comment_update, **kwargs): # noqa: E501 + def update_score_comment_with_http_info(self, score, comment, body, **kwargs): # noqa: E501 """Update an existing comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_comment_with_http_info(score, comment, score_comment_update, async_req=True) + >>> thread = api.update_score_comment_with_http_info(score, comment, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate score_comment_update: (required) + :param ScoreCommentUpdate body: (required) :param str sharing_key: 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. :return: ScoreComment If the method is called asynchronously, @@ -2895,7 +3035,7 @@ def update_score_comment_with_http_info(self, score, comment, score_comment_upda local_var_params = locals() - all_params = ['score', 'comment', 'score_comment_update', 'sharing_key'] # noqa: E501 + all_params = ['score', 'comment', 'body', 'sharing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2917,10 +3057,10 @@ def update_score_comment_with_http_info(self, score, comment, score_comment_upda if ('comment' not in local_var_params or local_var_params['comment'] is None): raise ValueError("Missing the required parameter `comment` when calling `update_score_comment`") # noqa: E501 - # verify the required parameter 'score_comment_update' is set - if ('score_comment_update' not in local_var_params or - local_var_params['score_comment_update'] is None): - raise ValueError("Missing the required parameter `score_comment_update` when calling `update_score_comment`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update_score_comment`") # noqa: E501 collection_formats = {} @@ -2940,8 +3080,8 @@ def update_score_comment_with_http_info(self, score, comment, score_comment_upda local_var_files = {} body_params = None - if 'score_comment_update' in local_var_params: - body_params = local_var_params['score_comment_update'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -2969,41 +3109,41 @@ def update_score_comment_with_http_info(self, score, comment, score_comment_upda _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_score_track(self, score, track, score_track_update, **kwargs): # noqa: E501 + def update_score_track(self, score, track, body, **kwargs): # noqa: E501 """Update an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_track(score, track, score_track_update, async_req=True) + >>> thread = api.update_score_track(score, track, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate score_track_update: (required) + :param ScoreTrackUpdate body: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_score_track_with_http_info(score, track, score_track_update, **kwargs) # noqa: E501 + return self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 else: - (data) = self.update_score_track_with_http_info(score, track, score_track_update, **kwargs) # noqa: E501 + (data) = self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 return data - def update_score_track_with_http_info(self, score, track, score_track_update, **kwargs): # noqa: E501 + def update_score_track_with_http_info(self, score, track, body, **kwargs): # noqa: E501 """Update an audio or video track linked to a score # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_track_with_http_info(score, track, score_track_update, async_req=True) + >>> thread = api.update_score_track_with_http_info(score, track, body, async_req=True) >>> result = thread.get() :param async_req bool :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate score_track_update: (required) + :param ScoreTrackUpdate body: (required) :return: ScoreTrack If the method is called asynchronously, returns the request thread. @@ -3011,7 +3151,7 @@ def update_score_track_with_http_info(self, score, track, score_track_update, ** local_var_params = locals() - all_params = ['score', 'track', 'score_track_update'] # noqa: E501 + all_params = ['score', 'track', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3033,10 +3173,10 @@ def update_score_track_with_http_info(self, score, track, score_track_update, ** if ('track' not in local_var_params or local_var_params['track'] is None): raise ValueError("Missing the required parameter `track` when calling `update_score_track`") # noqa: E501 - # verify the required parameter 'score_track_update' is set - if ('score_track_update' not in local_var_params or - local_var_params['score_track_update'] is None): - raise ValueError("Missing the required parameter `score_track_update` when calling `update_score_track`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in local_var_params or + local_var_params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update_score_track`") # noqa: E501 collection_formats = {} @@ -3054,8 +3194,8 @@ def update_score_track_with_http_info(self, score, track, score_track_update, ** local_var_files = {} body_params = None - if 'score_track_update' in local_var_params: - body_params = local_var_params['score_track_update'] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py new file mode 100644 index 0000000..1ca926c --- /dev/null +++ b/flat_api/api/task_api.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from flat_api.api_client import ApiClient + + +class TaskApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_task(self, task, **kwargs): # noqa: E501 + """Get a task details # noqa: E501 + + This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_task(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: Unique identifier for the task (required) + :return: Task + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_task_with_http_info(task, **kwargs) # noqa: E501 + else: + (data) = self.get_task_with_http_info(task, **kwargs) # noqa: E501 + return data + + def get_task_with_http_info(self, task, **kwargs): # noqa: E501 + """Get a task details # noqa: E501 + + This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_task_with_http_info(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: Unique identifier for the task (required) + :return: Task + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['task'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_task" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'task' is set + if ('task' not in local_var_params or + local_var_params['task'] is None): + raise ValueError("Missing the required parameter `task` when calling `get_task`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'task' in local_var_params: + path_params['task'] = local_var_params['task'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/tasks/{task}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Task', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index cdd4d86..5582da2 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -134,7 +134,7 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 def get_user(self, user, **kwargs): # noqa: E501 """Get a public user profile # noqa: E501 - Get a public profile of a Flat User. # noqa: E501 + Get a profile of a Flat or Flat for Education User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user(user, async_req=True) @@ -156,7 +156,7 @@ def get_user(self, user, **kwargs): # noqa: E501 def get_user_with_http_info(self, user, **kwargs): # noqa: E501 """Get a public user profile # noqa: E501 - Get a public profile of a Flat User. # noqa: E501 + Get a profile of a Flat or Flat for Education User. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_with_http_info(user, async_req=True) diff --git a/flat_api/api_client.py b/flat_api/api_client.py index a29ad03..219af35 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -2,9 +2,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -73,7 +73,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.6.0/python' + self.user_agent = 'flat_api/1.0.0' def __del__(self): self.pool.close() diff --git a/flat_api/configuration.py b/flat_api/configuration.py index c58af1a..2513236 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -235,6 +235,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.7.0\n"\ - "SDK Package Version: 0.6.0".\ + "Version of the API: 2.17.0\n"\ + "SDK Package Version: 0.7.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 9231fdc..670fcb9 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -4,9 +4,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -15,11 +15,25 @@ from __future__ import absolute_import # import models into model package +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.app_scopes import AppScopes from flat_api.models.assignment import Assignment +from flat_api.models.assignment_canvas import AssignmentCanvas from flat_api.models.assignment_copy import AssignmentCopy from flat_api.models.assignment_creation import AssignmentCreation +from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom +from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph +from flat_api.models.assignment_lti import AssignmentLti +from flat_api.models.assignment_mfc import AssignmentMfc from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_state import AssignmentSubmissionState from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments +from flat_api.models.assignment_type import AssignmentType from flat_api.models.class_attachment_creation import ClassAttachmentCreation from flat_api.models.class_creation import ClassCreation from flat_api.models.class_details import ClassDetails @@ -27,11 +41,16 @@ from flat_api.models.class_details_clever import ClassDetailsClever from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues +from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync from flat_api.models.class_details_lti import ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph from flat_api.models.class_roles import ClassRoles from flat_api.models.class_state import ClassState from flat_api.models.class_update import ClassUpdate from flat_api.models.collection import Collection +from flat_api.models.collection_app import CollectionApp from flat_api.models.collection_capabilities import CollectionCapabilities from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification @@ -51,31 +70,40 @@ from flat_api.models.lti_credentials_creation import LtiCredentialsCreation from flat_api.models.media_attachment import MediaAttachment from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission from flat_api.models.organization_invitation import OrganizationInvitation from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink +from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation from flat_api.models.resource_rights import ResourceRights from flat_api.models.score_comment import ScoreComment from flat_api.models.score_comment_context import ScoreCommentContext from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.models.score_comment_moderation import ScoreCommentModeration from flat_api.models.score_comment_update import ScoreCommentUpdate from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_data_encoding import ScoreDataEncoding from flat_api.models.score_details import ScoreDetails from flat_api.models.score_fork import ScoreFork from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts from flat_api.models.score_modification import ScoreModification +from flat_api.models.score_plays_counts import ScorePlaysCounts from flat_api.models.score_privacy import ScorePrivacy from flat_api.models.score_revision import ScoreRevision from flat_api.models.score_revision_creation import ScoreRevisionCreation from flat_api.models.score_revision_statistics import ScoreRevisionStatistics from flat_api.models.score_source import ScoreSource -from flat_api.models.score_summary import ScoreSummary from flat_api.models.score_track import ScoreTrack from flat_api.models.score_track_creation import ScoreTrackCreation from flat_api.models.score_track_point import ScoreTrackPoint @@ -83,11 +111,13 @@ from flat_api.models.score_track_type import ScoreTrackType from flat_api.models.score_track_update import ScoreTrackUpdate from flat_api.models.score_views_counts import ScoreViewsCounts +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions +from flat_api.models.task_progress import TaskProgress from flat_api.models.user_admin_update import UserAdminUpdate -from flat_api.models.user_basics import UserBasics from flat_api.models.user_creation import UserCreation from flat_api.models.user_details import UserDetails from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_instruments import UserInstruments +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense from flat_api.models.user_public import UserPublic from flat_api.models.user_public_summary import UserPublicSummary diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py new file mode 100644 index 0000000..a108d3f --- /dev/null +++ b/flat_api/models/api_access_token.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiAccessToken(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'token': 'str', + 'issued_date': 'datetime', + 'expiration_date': 'datetime', + 'scopes': 'list[AppScopes]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'token': 'token', + 'issued_date': 'issuedDate', + 'expiration_date': 'expirationDate', + 'scopes': 'scopes' + } + + def __init__(self, id=None, name=None, token=None, issued_date=None, expiration_date=None, scopes=None): # noqa: E501 + """ApiAccessToken - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._name = None + self._token = None + self._issued_date = None + self._expiration_date = None + self._scopes = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if token is not None: + self.token = token + if issued_date is not None: + self.issued_date = issued_date + if expiration_date is not None: + self.expiration_date = expiration_date + if scopes is not None: + self.scopes = scopes + + @property + def id(self): + """Gets the id of this ApiAccessToken. # noqa: E501 + + Unique identifier of this private token # noqa: E501 + + :return: The id of this ApiAccessToken. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiAccessToken. + + Unique identifier of this private token # noqa: E501 + + :param id: The id of this ApiAccessToken. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ApiAccessToken. # noqa: E501 + + Name of the personal access token # noqa: E501 + + :return: The name of this ApiAccessToken. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiAccessToken. + + Name of the personal access token # noqa: E501 + + :param name: The name of this ApiAccessToken. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def token(self): + """Gets the token of this ApiAccessToken. # noqa: E501 + + The token. This token will only be returned once, then only the first 4 characters will be returned. # noqa: E501 + + :return: The token of this ApiAccessToken. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this ApiAccessToken. + + The token. This token will only be returned once, then only the first 4 characters will be returned. # noqa: E501 + + :param token: The token of this ApiAccessToken. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def issued_date(self): + """Gets the issued_date of this ApiAccessToken. # noqa: E501 + + The date then this token was issued # noqa: E501 + + :return: The issued_date of this ApiAccessToken. # noqa: E501 + :rtype: datetime + """ + return self._issued_date + + @issued_date.setter + def issued_date(self, issued_date): + """Sets the issued_date of this ApiAccessToken. + + The date then this token was issued # noqa: E501 + + :param issued_date: The issued_date of this ApiAccessToken. # noqa: E501 + :type: datetime + """ + + self._issued_date = issued_date + + @property + def expiration_date(self): + """Gets the expiration_date of this ApiAccessToken. # noqa: E501 + + The date then this token will expire # noqa: E501 + + :return: The expiration_date of this ApiAccessToken. # noqa: E501 + :rtype: datetime + """ + return self._expiration_date + + @expiration_date.setter + def expiration_date(self, expiration_date): + """Sets the expiration_date of this ApiAccessToken. + + The date then this token will expire # noqa: E501 + + :param expiration_date: The expiration_date of this ApiAccessToken. # noqa: E501 + :type: datetime + """ + + self._expiration_date = expiration_date + + @property + def scopes(self): + """Gets the scopes of this ApiAccessToken. # noqa: E501 + + The list of scopes associated to the token # noqa: E501 + + :return: The scopes of this ApiAccessToken. # noqa: E501 + :rtype: list[AppScopes] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this ApiAccessToken. + + The list of scopes associated to the token # noqa: E501 + + :param scopes: The scopes of this ApiAccessToken. # noqa: E501 + :type: list[AppScopes] + """ + + self._scopes = scopes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiAccessToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py new file mode 100644 index 0000000..a3144ab --- /dev/null +++ b/flat_api/models/app_scopes.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AppScopes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ACCOUNT_PUBLIC_PROFILE = "account.public_profile" + ACCOUNT_EMAIL = "account.email" + ACCOUNT_EDUCATION_PROFILE = "account.education_profile" + SCORES_READONLY = "scores.readonly" + SCORES_SOCIAL = "scores.social" + SCORES = "scores" + COLLECTIONS_READONLY = "collections.readonly" + COLLECTIONS_ADD_SCORES = "collections.add_scores" + COLLECTIONS = "collections" + EDU_CLASSES = "edu.classes" + EDU_CLASSES_READONLY = "edu.classes.readonly" + EDU_ASSIGNMENTS = "edu.assignments" + EDU_ASSIGNMENTS_READONLY = "edu.assignments.readonly" + EDU_ADMIN = "edu.admin" + EDU_ADMIN_LTI = "edu.admin.lti" + EDU_ADMIN_LTI_READONLY = "edu.admin.lti.readonly" + EDU_ADMIN_USERS = "edu.admin.users" + EDU_ADMIN_USERS_READONLY = "edu.admin.users.readonly" + TASKS_READONLY = "tasks.readonly" + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """AppScopes - a model defined in OpenAPI""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AppScopes): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index 892a951..fff90b3 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,56 +33,86 @@ class Assignment(object): """ openapi_types = { 'state': 'str', + 'type': 'AssignmentType', 'title': 'str', 'classroom': 'str', 'description': 'str', + 'cover': 'str', + 'cover_file': 'str', 'attachments': 'list[MediaAttachment]', 'submissions': 'list[AssignmentSubmission]', 'creator': 'str', 'creation_date': 'datetime', 'scheduled_date': 'datetime', 'due_date': 'datetime', - 'google_classroom': 'GoogleClassroomCoursework' + 'max_points': 'float', + 'google_classroom': 'GoogleClassroomCoursework', + 'microsoft_graph': 'MicrosoftGraphAssignment', + 'mfc': 'AssignmentMfc', + 'canvas': 'AssignmentCanvas', + 'lti': 'AssignmentLti' } attribute_map = { 'state': 'state', + 'type': 'type', 'title': 'title', 'classroom': 'classroom', 'description': 'description', + 'cover': 'cover', + 'cover_file': 'coverFile', 'attachments': 'attachments', 'submissions': 'submissions', 'creator': 'creator', 'creation_date': 'creationDate', 'scheduled_date': 'scheduledDate', 'due_date': 'dueDate', - 'google_classroom': 'googleClassroom' + 'max_points': 'maxPoints', + 'google_classroom': 'googleClassroom', + 'microsoft_graph': 'microsoftGraph', + 'mfc': 'mfc', + 'canvas': 'canvas', + 'lti': 'lti' } - def __init__(self, state=None, title=None, classroom=None, description=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, google_classroom=None): # noqa: E501 + def __init__(self, state=None, type=None, title=None, classroom=None, description=None, cover=None, cover_file=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, max_points=None, google_classroom=None, microsoft_graph=None, mfc=None, canvas=None, lti=None): # noqa: E501 """Assignment - a model defined in OpenAPI""" # noqa: E501 self._state = None + self._type = None self._title = None self._classroom = None self._description = None + self._cover = None + self._cover_file = None self._attachments = None self._submissions = None self._creator = None self._creation_date = None self._scheduled_date = None self._due_date = None + self._max_points = None self._google_classroom = None + self._microsoft_graph = None + self._mfc = None + self._canvas = None + self._lti = None self.discriminator = None if state is not None: self.state = state + if type is not None: + self.type = type if title is not None: self.title = title if classroom is not None: self.classroom = classroom if description is not None: self.description = description + if cover is not None: + self.cover = cover + if cover_file is not None: + self.cover_file = cover_file if attachments is not None: self.attachments = attachments if submissions is not None: @@ -95,8 +125,18 @@ def __init__(self, state=None, title=None, classroom=None, description=None, att self.scheduled_date = scheduled_date if due_date is not None: self.due_date = due_date + if max_points is not None: + self.max_points = max_points if google_classroom is not None: self.google_classroom = google_classroom + if microsoft_graph is not None: + self.microsoft_graph = microsoft_graph + if mfc is not None: + self.mfc = mfc + if canvas is not None: + self.canvas = canvas + if lti is not None: + self.lti = lti @property def state(self): @@ -127,6 +167,27 @@ def state(self, state): self._state = state + @property + def type(self): + """Gets the type of this Assignment. # noqa: E501 + + + :return: The type of this Assignment. # noqa: E501 + :rtype: AssignmentType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Assignment. + + + :param type: The type of this Assignment. # noqa: E501 + :type: AssignmentType + """ + + self._type = type + @property def title(self): """Gets the title of this Assignment. # noqa: E501 @@ -196,6 +257,52 @@ def description(self, description): self._description = description + @property + def cover(self): + """Gets the cover of this Assignment. # noqa: E501 + + The URL of the cover to display # noqa: E501 + + :return: The cover of this Assignment. # noqa: E501 + :rtype: str + """ + return self._cover + + @cover.setter + def cover(self, cover): + """Sets the cover of this Assignment. + + The URL of the cover to display # noqa: E501 + + :param cover: The cover of this Assignment. # noqa: E501 + :type: str + """ + + self._cover = cover + + @property + def cover_file(self): + """Gets the cover_file of this Assignment. # noqa: E501 + + The id of the cover to display # noqa: E501 + + :return: The cover_file of this Assignment. # noqa: E501 + :rtype: str + """ + return self._cover_file + + @cover_file.setter + def cover_file(self, cover_file): + """Sets the cover_file of this Assignment. + + The id of the cover to display # noqa: E501 + + :param cover_file: The cover_file of this Assignment. # noqa: E501 + :type: str + """ + + self._cover_file = cover_file + @property def attachments(self): """Gets the attachments of this Assignment. # noqa: E501 @@ -330,6 +437,29 @@ def due_date(self, due_date): self._due_date = due_date + @property + def max_points(self): + """Gets the max_points of this Assignment. # noqa: E501 + + If set, the grading will be enabled for the assignement # noqa: E501 + + :return: The max_points of this Assignment. # noqa: E501 + :rtype: float + """ + return self._max_points + + @max_points.setter + def max_points(self, max_points): + """Sets the max_points of this Assignment. + + If set, the grading will be enabled for the assignement # noqa: E501 + + :param max_points: The max_points of this Assignment. # noqa: E501 + :type: float + """ + + self._max_points = max_points + @property def google_classroom(self): """Gets the google_classroom of this Assignment. # noqa: E501 @@ -351,6 +481,90 @@ def google_classroom(self, google_classroom): self._google_classroom = google_classroom + @property + def microsoft_graph(self): + """Gets the microsoft_graph of this Assignment. # noqa: E501 + + + :return: The microsoft_graph of this Assignment. # noqa: E501 + :rtype: MicrosoftGraphAssignment + """ + return self._microsoft_graph + + @microsoft_graph.setter + def microsoft_graph(self, microsoft_graph): + """Sets the microsoft_graph of this Assignment. + + + :param microsoft_graph: The microsoft_graph of this Assignment. # noqa: E501 + :type: MicrosoftGraphAssignment + """ + + self._microsoft_graph = microsoft_graph + + @property + def mfc(self): + """Gets the mfc of this Assignment. # noqa: E501 + + + :return: The mfc of this Assignment. # noqa: E501 + :rtype: AssignmentMfc + """ + return self._mfc + + @mfc.setter + def mfc(self, mfc): + """Sets the mfc of this Assignment. + + + :param mfc: The mfc of this Assignment. # noqa: E501 + :type: AssignmentMfc + """ + + self._mfc = mfc + + @property + def canvas(self): + """Gets the canvas of this Assignment. # noqa: E501 + + + :return: The canvas of this Assignment. # noqa: E501 + :rtype: AssignmentCanvas + """ + return self._canvas + + @canvas.setter + def canvas(self, canvas): + """Sets the canvas of this Assignment. + + + :param canvas: The canvas of this Assignment. # noqa: E501 + :type: AssignmentCanvas + """ + + self._canvas = canvas + + @property + def lti(self): + """Gets the lti of this Assignment. # noqa: E501 + + + :return: The lti of this Assignment. # noqa: E501 + :rtype: AssignmentLti + """ + return self._lti + + @lti.setter + def lti(self, lti): + """Sets the lti of this Assignment. + + + :param lti: The lti of this Assignment. # noqa: E501 + :type: AssignmentLti + """ + + self._lti = lti + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/assignment_canvas.py b/flat_api/models/assignment_canvas.py new file mode 100644 index 0000000..239f815 --- /dev/null +++ b/flat_api/models/assignment_canvas.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentCanvas(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'alternate_link': 'str' + } + + attribute_map = { + 'id': 'id', + 'alternate_link': 'alternateLink' + } + + def __init__(self, id=None, alternate_link=None): # noqa: E501 + """AssignmentCanvas - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._alternate_link = None + self.discriminator = None + + if id is not None: + self.id = id + if alternate_link is not None: + self.alternate_link = alternate_link + + @property + def id(self): + """Gets the id of this AssignmentCanvas. # noqa: E501 + + Unique identifier of the course on Canvas assignment # noqa: E501 + + :return: The id of this AssignmentCanvas. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssignmentCanvas. + + Unique identifier of the course on Canvas assignment # noqa: E501 + + :param id: The id of this AssignmentCanvas. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def alternate_link(self): + """Gets the alternate_link of this AssignmentCanvas. # noqa: E501 + + Link to Canvas assignment # noqa: E501 + + :return: The alternate_link of this AssignmentCanvas. # noqa: E501 + :rtype: str + """ + return self._alternate_link + + @alternate_link.setter + def alternate_link(self, alternate_link): + """Sets the alternate_link of this AssignmentCanvas. + + Link to Canvas assignment # noqa: E501 + + :param alternate_link: The alternate_link of this AssignmentCanvas. # noqa: E501 + :type: str + """ + + self._alternate_link = alternate_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentCanvas): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index 9702b99..f0a21de 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,20 +32,31 @@ class AssignmentCopy(object): and the value is json key in definition. """ openapi_types = { - 'classroom': 'str' + 'classroom': 'str', + 'assignment': 'str', + 'scheduled_date': 'datetime' } attribute_map = { - 'classroom': 'classroom' + 'classroom': 'classroom', + 'assignment': 'assignment', + 'scheduled_date': 'scheduledDate' } - def __init__(self, classroom=None): # noqa: E501 + def __init__(self, classroom=None, assignment=None, scheduled_date=None): # noqa: E501 """AssignmentCopy - a model defined in OpenAPI""" # noqa: E501 self._classroom = None + self._assignment = None + self._scheduled_date = None self.discriminator = None - self.classroom = classroom + if classroom is not None: + self.classroom = classroom + if assignment is not None: + self.assignment = assignment + if scheduled_date is not None: + self.scheduled_date = scheduled_date @property def classroom(self): @@ -67,11 +78,55 @@ def classroom(self, classroom): :param classroom: The classroom of this AssignmentCopy. # noqa: E501 :type: str """ - if classroom is None: - raise ValueError("Invalid value for `classroom`, must not be `None`") # noqa: E501 self._classroom = classroom + @property + def assignment(self): + """Gets the assignment of this AssignmentCopy. # noqa: E501 + + An optional destination assignment where the original assignement will be copied. Must be a draft. # noqa: E501 + + :return: The assignment of this AssignmentCopy. # noqa: E501 + :rtype: str + """ + return self._assignment + + @assignment.setter + def assignment(self, assignment): + """Sets the assignment of this AssignmentCopy. + + An optional destination assignment where the original assignement will be copied. Must be a draft. # noqa: E501 + + :param assignment: The assignment of this AssignmentCopy. # noqa: E501 + :type: str + """ + + self._assignment = assignment + + @property + def scheduled_date(self): + """Gets the scheduled_date of this AssignmentCopy. # noqa: E501 + + The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. # noqa: E501 + + :return: The scheduled_date of this AssignmentCopy. # noqa: E501 + :rtype: datetime + """ + return self._scheduled_date + + @scheduled_date.setter + def scheduled_date(self, scheduled_date): + """Sets the scheduled_date of this AssignmentCopy. + + The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. # noqa: E501 + + :param scheduled_date: The scheduled_date of this AssignmentCopy. # noqa: E501 + :type: datetime + """ + + self._scheduled_date = scheduled_date + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/assignment_creation.py b/flat_api/models/assignment_creation.py index 57bd84a..ce62941 100644 --- a/flat_api/models/assignment_creation.py +++ b/flat_api/models/assignment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,41 +32,144 @@ class AssignmentCreation(object): and the value is json key in definition. """ openapi_types = { + 'type': 'AssignmentType', + 'state': 'str', 'title': 'str', 'description': 'str', 'attachments': 'list[ClassAttachmentCreation]', 'due_date': 'datetime', - 'scheduled_date': 'datetime' + 'scheduled_date': 'datetime', + 'nb_playback_authorized': 'float', + 'toolset': 'str', + 'cover_file': 'str', + 'cover': 'str', + 'max_points': 'float', + 'google_classroom': 'AssignmentCreationGoogleClassroom', + 'microsoft_graph': 'AssignmentCreationMicrosoftGraph', + 'assignee_mode': 'str', + 'assigned_students': 'list[str]', + 'shuffle_exercises': 'bool' } attribute_map = { + 'type': 'type', + 'state': 'state', 'title': 'title', 'description': 'description', 'attachments': 'attachments', 'due_date': 'dueDate', - 'scheduled_date': 'scheduledDate' + 'scheduled_date': 'scheduledDate', + 'nb_playback_authorized': 'nbPlaybackAuthorized', + 'toolset': 'toolset', + 'cover_file': 'coverFile', + 'cover': 'cover', + 'max_points': 'maxPoints', + 'google_classroom': 'googleClassroom', + 'microsoft_graph': 'microsoftGraph', + 'assignee_mode': 'assigneeMode', + 'assigned_students': 'assignedStudents', + 'shuffle_exercises': 'shuffleExercises' } - def __init__(self, title=None, description=None, attachments=None, due_date=None, scheduled_date=None): # noqa: E501 + def __init__(self, type=None, state=None, title=None, description=None, attachments=None, due_date=None, scheduled_date=None, nb_playback_authorized=None, toolset=None, cover_file=None, cover=None, max_points=None, google_classroom=None, microsoft_graph=None, assignee_mode=None, assigned_students=None, shuffle_exercises=None): # noqa: E501 """AssignmentCreation - a model defined in OpenAPI""" # noqa: E501 + self._type = None + self._state = None self._title = None self._description = None self._attachments = None self._due_date = None self._scheduled_date = None + self._nb_playback_authorized = None + self._toolset = None + self._cover_file = None + self._cover = None + self._max_points = None + self._google_classroom = None + self._microsoft_graph = None + self._assignee_mode = None + self._assigned_students = None + self._shuffle_exercises = None self.discriminator = None + if type is not None: + self.type = type + if state is not None: + self.state = state if title is not None: self.title = title if description is not None: self.description = description if attachments is not None: self.attachments = attachments - if due_date is not None: - self.due_date = due_date - if scheduled_date is not None: - self.scheduled_date = scheduled_date + self.due_date = due_date + self.scheduled_date = scheduled_date + self.nb_playback_authorized = nb_playback_authorized + self.toolset = toolset + self.cover_file = cover_file + self.cover = cover + self.max_points = max_points + if google_classroom is not None: + self.google_classroom = google_classroom + if microsoft_graph is not None: + self.microsoft_graph = microsoft_graph + if assignee_mode is not None: + self.assignee_mode = assignee_mode + if assigned_students is not None: + self.assigned_students = assigned_students + if shuffle_exercises is not None: + self.shuffle_exercises = shuffle_exercises + + @property + def type(self): + """Gets the type of this AssignmentCreation. # noqa: E501 + + + :return: The type of this AssignmentCreation. # noqa: E501 + :rtype: AssignmentType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AssignmentCreation. + + + :param type: The type of this AssignmentCreation. # noqa: E501 + :type: AssignmentType + """ + + self._type = type + + @property + def state(self): + """Gets the state of this AssignmentCreation. # noqa: E501 + + State of the assignment # noqa: E501 + + :return: The state of this AssignmentCreation. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this AssignmentCreation. + + State of the assignment # noqa: E501 + + :param state: The state of this AssignmentCreation. # noqa: E501 + :type: str + """ + allowed_values = ["draft", "active"] # noqa: E501 + if state not in allowed_values: + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state @property def title(self): @@ -181,6 +284,242 @@ def scheduled_date(self, scheduled_date): self._scheduled_date = scheduled_date + @property + def nb_playback_authorized(self): + """Gets the nb_playback_authorized of this AssignmentCreation. # noqa: E501 + + The number of playback authorized on the scores of the assignment. # noqa: E501 + + :return: The nb_playback_authorized of this AssignmentCreation. # noqa: E501 + :rtype: float + """ + return self._nb_playback_authorized + + @nb_playback_authorized.setter + def nb_playback_authorized(self, nb_playback_authorized): + """Sets the nb_playback_authorized of this AssignmentCreation. + + The number of playback authorized on the scores of the assignment. # noqa: E501 + + :param nb_playback_authorized: The nb_playback_authorized of this AssignmentCreation. # noqa: E501 + :type: float + """ + + self._nb_playback_authorized = nb_playback_authorized + + @property + def toolset(self): + """Gets the toolset of this AssignmentCreation. # noqa: E501 + + The id of the associated toolset # noqa: E501 + + :return: The toolset of this AssignmentCreation. # noqa: E501 + :rtype: str + """ + return self._toolset + + @toolset.setter + def toolset(self, toolset): + """Sets the toolset of this AssignmentCreation. + + The id of the associated toolset # noqa: E501 + + :param toolset: The toolset of this AssignmentCreation. # noqa: E501 + :type: str + """ + + self._toolset = toolset + + @property + def cover_file(self): + """Gets the cover_file of this AssignmentCreation. # noqa: E501 + + The id of the cover to display # noqa: E501 + + :return: The cover_file of this AssignmentCreation. # noqa: E501 + :rtype: str + """ + return self._cover_file + + @cover_file.setter + def cover_file(self, cover_file): + """Sets the cover_file of this AssignmentCreation. + + The id of the cover to display # noqa: E501 + + :param cover_file: The cover_file of this AssignmentCreation. # noqa: E501 + :type: str + """ + + self._cover_file = cover_file + + @property + def cover(self): + """Gets the cover of this AssignmentCreation. # noqa: E501 + + The URL of the cover to display # noqa: E501 + + :return: The cover of this AssignmentCreation. # noqa: E501 + :rtype: str + """ + return self._cover + + @cover.setter + def cover(self, cover): + """Sets the cover of this AssignmentCreation. + + The URL of the cover to display # noqa: E501 + + :param cover: The cover of this AssignmentCreation. # noqa: E501 + :type: str + """ + + self._cover = cover + + @property + def max_points(self): + """Gets the max_points of this AssignmentCreation. # noqa: E501 + + If set, the grading will be enabled for the assignement with this value as the maximum of points # noqa: E501 + + :return: The max_points of this AssignmentCreation. # noqa: E501 + :rtype: float + """ + return self._max_points + + @max_points.setter + def max_points(self, max_points): + """Sets the max_points of this AssignmentCreation. + + If set, the grading will be enabled for the assignement with this value as the maximum of points # noqa: E501 + + :param max_points: The max_points of this AssignmentCreation. # noqa: E501 + :type: float + """ + if max_points is not None and max_points > 100: # noqa: E501 + raise ValueError("Invalid value for `max_points`, must be a value less than or equal to `100`") # noqa: E501 + if max_points is not None and max_points < 0: # noqa: E501 + raise ValueError("Invalid value for `max_points`, must be a value greater than or equal to `0`") # noqa: E501 + + self._max_points = max_points + + @property + def google_classroom(self): + """Gets the google_classroom of this AssignmentCreation. # noqa: E501 + + + :return: The google_classroom of this AssignmentCreation. # noqa: E501 + :rtype: AssignmentCreationGoogleClassroom + """ + return self._google_classroom + + @google_classroom.setter + def google_classroom(self, google_classroom): + """Sets the google_classroom of this AssignmentCreation. + + + :param google_classroom: The google_classroom of this AssignmentCreation. # noqa: E501 + :type: AssignmentCreationGoogleClassroom + """ + + self._google_classroom = google_classroom + + @property + def microsoft_graph(self): + """Gets the microsoft_graph of this AssignmentCreation. # noqa: E501 + + + :return: The microsoft_graph of this AssignmentCreation. # noqa: E501 + :rtype: AssignmentCreationMicrosoftGraph + """ + return self._microsoft_graph + + @microsoft_graph.setter + def microsoft_graph(self, microsoft_graph): + """Sets the microsoft_graph of this AssignmentCreation. + + + :param microsoft_graph: The microsoft_graph of this AssignmentCreation. # noqa: E501 + :type: AssignmentCreationMicrosoftGraph + """ + + self._microsoft_graph = microsoft_graph + + @property + def assignee_mode(self): + """Gets the assignee_mode of this AssignmentCreation. # noqa: E501 + + Possible modes of assigning assignments # noqa: E501 + + :return: The assignee_mode of this AssignmentCreation. # noqa: E501 + :rtype: str + """ + return self._assignee_mode + + @assignee_mode.setter + def assignee_mode(self, assignee_mode): + """Sets the assignee_mode of this AssignmentCreation. + + Possible modes of assigning assignments # noqa: E501 + + :param assignee_mode: The assignee_mode of this AssignmentCreation. # noqa: E501 + :type: str + """ + allowed_values = ["everyone", "selected"] # noqa: E501 + if assignee_mode not in allowed_values: + raise ValueError( + "Invalid value for `assignee_mode` ({0}), must be one of {1}" # noqa: E501 + .format(assignee_mode, allowed_values) + ) + + self._assignee_mode = assignee_mode + + @property + def assigned_students(self): + """Gets the assigned_students of this AssignmentCreation. # noqa: E501 + + Identifiers for the students that have access to the assignment # noqa: E501 + + :return: The assigned_students of this AssignmentCreation. # noqa: E501 + :rtype: list[str] + """ + return self._assigned_students + + @assigned_students.setter + def assigned_students(self, assigned_students): + """Sets the assigned_students of this AssignmentCreation. + + Identifiers for the students that have access to the assignment # noqa: E501 + + :param assigned_students: The assigned_students of this AssignmentCreation. # noqa: E501 + :type: list[str] + """ + + self._assigned_students = assigned_students + + @property + def shuffle_exercises(self): + """Gets the shuffle_exercises of this AssignmentCreation. # noqa: E501 + + Mixing exercises for each students # noqa: E501 + + :return: The shuffle_exercises of this AssignmentCreation. # noqa: E501 + :rtype: bool + """ + return self._shuffle_exercises + + @shuffle_exercises.setter + def shuffle_exercises(self, shuffle_exercises): + """Sets the shuffle_exercises of this AssignmentCreation. + + Mixing exercises for each students # noqa: E501 + + :param shuffle_exercises: The shuffle_exercises of this AssignmentCreation. # noqa: E501 + :type: bool + """ + + self._shuffle_exercises = shuffle_exercises + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/assignment_creation_google_classroom.py b/flat_api/models/assignment_creation_google_classroom.py new file mode 100644 index 0000000..d2333c3 --- /dev/null +++ b/flat_api/models/assignment_creation_google_classroom.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentCreationGoogleClassroom(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'topic_id': 'str' + } + + attribute_map = { + 'topic_id': 'topicId' + } + + def __init__(self, topic_id=None): # noqa: E501 + """AssignmentCreationGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 + + self._topic_id = None + self.discriminator = None + + self.topic_id = topic_id + + @property + def topic_id(self): + """Gets the topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 + + Identifier of the topic where the assignment is created # noqa: E501 + + :return: The topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 + :rtype: str + """ + return self._topic_id + + @topic_id.setter + def topic_id(self, topic_id): + """Sets the topic_id of this AssignmentCreationGoogleClassroom. + + Identifier of the topic where the assignment is created # noqa: E501 + + :param topic_id: The topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 + :type: str + """ + + self._topic_id = topic_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentCreationGoogleClassroom): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_creation_microsoft_graph.py b/flat_api/models/assignment_creation_microsoft_graph.py new file mode 100644 index 0000000..2d2a650 --- /dev/null +++ b/flat_api/models/assignment_creation_microsoft_graph.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentCreationMicrosoftGraph(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'categories': 'list[str]' + } + + attribute_map = { + 'categories': 'categories' + } + + def __init__(self, categories=None): # noqa: E501 + """AssignmentCreationMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 + + self._categories = None + self.discriminator = None + + self.categories = categories + + @property + def categories(self): + """Gets the categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 + + List of categories this assignment belongs to # noqa: E501 + + :return: The categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 + :rtype: list[str] + """ + return self._categories + + @categories.setter + def categories(self, categories): + """Sets the categories of this AssignmentCreationMicrosoftGraph. + + List of categories this assignment belongs to # noqa: E501 + + :param categories: The categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 + :type: list[str] + """ + + self._categories = categories + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentCreationMicrosoftGraph): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_lti.py b/flat_api/models/assignment_lti.py new file mode 100644 index 0000000..12edbc6 --- /dev/null +++ b/flat_api/models/assignment_lti.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentLti(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None): # noqa: E501 + """AssignmentLti - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this AssignmentLti. # noqa: E501 + + Resource ID in the LMS # noqa: E501 + + :return: The id of this AssignmentLti. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssignmentLti. + + Resource ID in the LMS # noqa: E501 + + :param id: The id of this AssignmentLti. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentLti): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_mfc.py b/flat_api/models/assignment_mfc.py new file mode 100644 index 0000000..cd9817f --- /dev/null +++ b/flat_api/models/assignment_mfc.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentMfc(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'alternate_link': 'str' + } + + attribute_map = { + 'id': 'id', + 'alternate_link': 'alternateLink' + } + + def __init__(self, id=None, alternate_link=None): # noqa: E501 + """AssignmentMfc - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._alternate_link = None + self.discriminator = None + + if id is not None: + self.id = id + if alternate_link is not None: + self.alternate_link = alternate_link + + @property + def id(self): + """Gets the id of this AssignmentMfc. # noqa: E501 + + Unique identifier of the course on MusicFirst Task # noqa: E501 + + :return: The id of this AssignmentMfc. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssignmentMfc. + + Unique identifier of the course on MusicFirst Task # noqa: E501 + + :param id: The id of this AssignmentMfc. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def alternate_link(self): + """Gets the alternate_link of this AssignmentMfc. # noqa: E501 + + Link to MusicFirst Classroom task # noqa: E501 + + :return: The alternate_link of this AssignmentMfc. # noqa: E501 + :rtype: str + """ + return self._alternate_link + + @alternate_link.setter + def alternate_link(self, alternate_link): + """Sets the alternate_link of this AssignmentMfc. + + Link to MusicFirst Classroom task # noqa: E501 + + :param alternate_link: The alternate_link of this AssignmentMfc. # noqa: E501 + :type: str + """ + + self._alternate_link = alternate_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentMfc): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index c1b7f1e..0932d26 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,53 +33,67 @@ class AssignmentSubmission(object): """ openapi_types = { 'id': 'str', + 'state': 'AssignmentSubmissionState', 'classroom': 'str', 'assignment': 'str', 'creator': 'str', 'creation_date': 'str', 'attachments': 'list[MediaAttachment]', 'submission_date': 'str', - 'student_comment': 'str', 'return_date': 'str', - 'return_feedback': 'str', 'return_creator': 'str', - 'google_classroom': 'GoogleClassroomSubmission' + 'grade': 'float', + 'draft_grade': 'float', + 'max_points': 'float', + 'exercises_ids': 'list[str]', + 'google_classroom': 'GoogleClassroomSubmission', + 'microsoft_graph': 'MicrosoftGraphSubmission' } attribute_map = { 'id': 'id', + 'state': 'state', 'classroom': 'classroom', 'assignment': 'assignment', 'creator': 'creator', 'creation_date': 'creationDate', 'attachments': 'attachments', 'submission_date': 'submissionDate', - 'student_comment': 'studentComment', 'return_date': 'returnDate', - 'return_feedback': 'returnFeedback', 'return_creator': 'returnCreator', - 'google_classroom': 'googleClassroom' + 'grade': 'grade', + 'draft_grade': 'draftGrade', + 'max_points': 'maxPoints', + 'exercises_ids': 'exercisesIds', + 'google_classroom': 'googleClassroom', + 'microsoft_graph': 'microsoftGraph' } - def __init__(self, id=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, student_comment=None, return_date=None, return_feedback=None, return_creator=None, google_classroom=None): # noqa: E501 + def __init__(self, id=None, state=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, return_date=None, return_creator=None, grade=None, draft_grade=None, max_points=None, exercises_ids=None, google_classroom=None, microsoft_graph=None): # noqa: E501 """AssignmentSubmission - a model defined in OpenAPI""" # noqa: E501 self._id = None + self._state = None self._classroom = None self._assignment = None self._creator = None self._creation_date = None self._attachments = None self._submission_date = None - self._student_comment = None self._return_date = None - self._return_feedback = None self._return_creator = None + self._grade = None + self._draft_grade = None + self._max_points = None + self._exercises_ids = None self._google_classroom = None + self._microsoft_graph = None self.discriminator = None if id is not None: self.id = id + if state is not None: + self.state = state if classroom is not None: self.classroom = classroom if assignment is not None: @@ -92,16 +106,19 @@ def __init__(self, id=None, classroom=None, assignment=None, creator=None, creat self.attachments = attachments if submission_date is not None: self.submission_date = submission_date - if student_comment is not None: - self.student_comment = student_comment if return_date is not None: self.return_date = return_date - if return_feedback is not None: - self.return_feedback = return_feedback if return_creator is not None: self.return_creator = return_creator + self.grade = grade + self.draft_grade = draft_grade + if max_points is not None: + self.max_points = max_points + self.exercises_ids = exercises_ids if google_classroom is not None: self.google_classroom = google_classroom + if microsoft_graph is not None: + self.microsoft_graph = microsoft_graph @property def id(self): @@ -126,6 +143,27 @@ def id(self, id): self._id = id + @property + def state(self): + """Gets the state of this AssignmentSubmission. # noqa: E501 + + + :return: The state of this AssignmentSubmission. # noqa: E501 + :rtype: AssignmentSubmissionState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this AssignmentSubmission. + + + :param state: The state of this AssignmentSubmission. # noqa: E501 + :type: AssignmentSubmissionState + """ + + self._state = state + @property def classroom(self): """Gets the classroom of this AssignmentSubmission. # noqa: E501 @@ -262,29 +300,6 @@ def submission_date(self, submission_date): self._submission_date = submission_date - @property - def student_comment(self): - """Gets the student_comment of this AssignmentSubmission. # noqa: E501 - - An optionnal comment sent by the student when submitting his work # noqa: E501 - - :return: The student_comment of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._student_comment - - @student_comment.setter - def student_comment(self, student_comment): - """Sets the student_comment of this AssignmentSubmission. - - An optionnal comment sent by the student when submitting his work # noqa: E501 - - :param student_comment: The student_comment of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._student_comment = student_comment - @property def return_date(self): """Gets the return_date of this AssignmentSubmission. # noqa: E501 @@ -308,29 +323,6 @@ def return_date(self, return_date): self._return_date = return_date - @property - def return_feedback(self): - """Gets the return_feedback of this AssignmentSubmission. # noqa: E501 - - The feedback associated with the return # noqa: E501 - - :return: The return_feedback of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._return_feedback - - @return_feedback.setter - def return_feedback(self, return_feedback): - """Sets the return_feedback of this AssignmentSubmission. - - The feedback associated with the return # noqa: E501 - - :param return_feedback: The return_feedback of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._return_feedback = return_feedback - @property def return_creator(self): """Gets the return_creator of this AssignmentSubmission. # noqa: E501 @@ -354,6 +346,98 @@ def return_creator(self, return_creator): self._return_creator = return_creator + @property + def grade(self): + """Gets the grade of this AssignmentSubmission. # noqa: E501 + + Optional grade. If unset, no grade was set. # noqa: E501 + + :return: The grade of this AssignmentSubmission. # noqa: E501 + :rtype: float + """ + return self._grade + + @grade.setter + def grade(self, grade): + """Sets the grade of this AssignmentSubmission. + + Optional grade. If unset, no grade was set. # noqa: E501 + + :param grade: The grade of this AssignmentSubmission. # noqa: E501 + :type: float + """ + + self._grade = grade + + @property + def draft_grade(self): + """Gets the draft_grade of this AssignmentSubmission. # noqa: E501 + + Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 + + :return: The draft_grade of this AssignmentSubmission. # noqa: E501 + :rtype: float + """ + return self._draft_grade + + @draft_grade.setter + def draft_grade(self, draft_grade): + """Sets the draft_grade of this AssignmentSubmission. + + Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 + + :param draft_grade: The draft_grade of this AssignmentSubmission. # noqa: E501 + :type: float + """ + + self._draft_grade = draft_grade + + @property + def max_points(self): + """Gets the max_points of this AssignmentSubmission. # noqa: E501 + + Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. # noqa: E501 + + :return: The max_points of this AssignmentSubmission. # noqa: E501 + :rtype: float + """ + return self._max_points + + @max_points.setter + def max_points(self, max_points): + """Sets the max_points of this AssignmentSubmission. + + Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. # noqa: E501 + + :param max_points: The max_points of this AssignmentSubmission. # noqa: E501 + :type: float + """ + + self._max_points = max_points + + @property + def exercises_ids(self): + """Gets the exercises_ids of this AssignmentSubmission. # noqa: E501 + + The ids of exercises when they need to be in a specific order # noqa: E501 + + :return: The exercises_ids of this AssignmentSubmission. # noqa: E501 + :rtype: list[str] + """ + return self._exercises_ids + + @exercises_ids.setter + def exercises_ids(self, exercises_ids): + """Sets the exercises_ids of this AssignmentSubmission. + + The ids of exercises when they need to be in a specific order # noqa: E501 + + :param exercises_ids: The exercises_ids of this AssignmentSubmission. # noqa: E501 + :type: list[str] + """ + + self._exercises_ids = exercises_ids + @property def google_classroom(self): """Gets the google_classroom of this AssignmentSubmission. # noqa: E501 @@ -375,6 +459,27 @@ def google_classroom(self, google_classroom): self._google_classroom = google_classroom + @property + def microsoft_graph(self): + """Gets the microsoft_graph of this AssignmentSubmission. # noqa: E501 + + + :return: The microsoft_graph of this AssignmentSubmission. # noqa: E501 + :rtype: MicrosoftGraphSubmission + """ + return self._microsoft_graph + + @microsoft_graph.setter + def microsoft_graph(self, microsoft_graph): + """Sets the microsoft_graph of this AssignmentSubmission. + + + :param microsoft_graph: The microsoft_graph of this AssignmentSubmission. # noqa: E501 + :type: MicrosoftGraphSubmission + """ + + self._microsoft_graph = microsoft_graph + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py new file mode 100644 index 0000000..90b8cf6 --- /dev/null +++ b/flat_api/models/assignment_submission_comment.py @@ -0,0 +1,283 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentSubmissionComment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user': 'str', + 'submission': 'str', + 'date': 'datetime', + 'modification_date': 'datetime', + 'comment': 'str', + 'unread': 'bool' + } + + attribute_map = { + 'id': 'id', + 'user': 'user', + 'submission': 'submission', + 'date': 'date', + 'modification_date': 'modificationDate', + 'comment': 'comment', + 'unread': 'unread' + } + + def __init__(self, id=None, user=None, submission=None, date=None, modification_date=None, comment=None, unread=None): # noqa: E501 + """AssignmentSubmissionComment - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._user = None + self._submission = None + self._date = None + self._modification_date = None + self._comment = None + self._unread = None + self.discriminator = None + + if id is not None: + self.id = id + if user is not None: + self.user = user + if submission is not None: + self.submission = submission + if date is not None: + self.date = date + if modification_date is not None: + self.modification_date = modification_date + if comment is not None: + self.comment = comment + if unread is not None: + self.unread = unread + + @property + def id(self): + """Gets the id of this AssignmentSubmissionComment. # noqa: E501 + + The comment unique identifier # noqa: E501 + + :return: The id of this AssignmentSubmissionComment. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssignmentSubmissionComment. + + The comment unique identifier # noqa: E501 + + :param id: The id of this AssignmentSubmissionComment. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user(self): + """Gets the user of this AssignmentSubmissionComment. # noqa: E501 + + The author unique identifier # noqa: E501 + + :return: The user of this AssignmentSubmissionComment. # noqa: E501 + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this AssignmentSubmissionComment. + + The author unique identifier # noqa: E501 + + :param user: The user of this AssignmentSubmissionComment. # noqa: E501 + :type: str + """ + + self._user = user + + @property + def submission(self): + """Gets the submission of this AssignmentSubmissionComment. # noqa: E501 + + The submission unique identifier # noqa: E501 + + :return: The submission of this AssignmentSubmissionComment. # noqa: E501 + :rtype: str + """ + return self._submission + + @submission.setter + def submission(self, submission): + """Sets the submission of this AssignmentSubmissionComment. + + The submission unique identifier # noqa: E501 + + :param submission: The submission of this AssignmentSubmissionComment. # noqa: E501 + :type: str + """ + + self._submission = submission + + @property + def date(self): + """Gets the date of this AssignmentSubmissionComment. # noqa: E501 + + The date when the comment was posted # noqa: E501 + + :return: The date of this AssignmentSubmissionComment. # noqa: E501 + :rtype: datetime + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this AssignmentSubmissionComment. + + The date when the comment was posted # noqa: E501 + + :param date: The date of this AssignmentSubmissionComment. # noqa: E501 + :type: datetime + """ + + self._date = date + + @property + def modification_date(self): + """Gets the modification_date of this AssignmentSubmissionComment. # noqa: E501 + + The date of the last comment modification # noqa: E501 + + :return: The modification_date of this AssignmentSubmissionComment. # noqa: E501 + :rtype: datetime + """ + return self._modification_date + + @modification_date.setter + def modification_date(self, modification_date): + """Sets the modification_date of this AssignmentSubmissionComment. + + The date of the last comment modification # noqa: E501 + + :param modification_date: The modification_date of this AssignmentSubmissionComment. # noqa: E501 + :type: datetime + """ + + self._modification_date = modification_date + + @property + def comment(self): + """Gets the comment of this AssignmentSubmissionComment. # noqa: E501 + + The comment text # noqa: E501 + + :return: The comment of this AssignmentSubmissionComment. # noqa: E501 + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this AssignmentSubmissionComment. + + The comment text # noqa: E501 + + :param comment: The comment of this AssignmentSubmissionComment. # noqa: E501 + :type: str + """ + + self._comment = comment + + @property + def unread(self): + """Gets the unread of this AssignmentSubmissionComment. # noqa: E501 + + True if the comment is unread by the current user # noqa: E501 + + :return: The unread of this AssignmentSubmissionComment. # noqa: E501 + :rtype: bool + """ + return self._unread + + @unread.setter + def unread(self, unread): + """Sets the unread of this AssignmentSubmissionComment. + + True if the comment is unread by the current user # noqa: E501 + + :param unread: The unread of this AssignmentSubmissionComment. # noqa: E501 + :type: bool + """ + + self._unread = unread + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentSubmissionComment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py new file mode 100644 index 0000000..392029e --- /dev/null +++ b/flat_api/models/assignment_submission_comment_creation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentSubmissionCommentCreation(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'comment': 'str' + } + + attribute_map = { + 'comment': 'comment' + } + + def __init__(self, comment=None): # noqa: E501 + """AssignmentSubmissionCommentCreation - a model defined in OpenAPI""" # noqa: E501 + + self._comment = None + self.discriminator = None + + self.comment = comment + + @property + def comment(self): + """Gets the comment of this AssignmentSubmissionCommentCreation. # noqa: E501 + + The comment text # noqa: E501 + + :return: The comment of this AssignmentSubmissionCommentCreation. # noqa: E501 + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this AssignmentSubmissionCommentCreation. + + The comment text # noqa: E501 + + :param comment: The comment of this AssignmentSubmissionCommentCreation. # noqa: E501 + :type: str + """ + if comment is None: + raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501 + + self._comment = comment + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentSubmissionCommentCreation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py new file mode 100644 index 0000000..664f2d5 --- /dev/null +++ b/flat_api/models/assignment_submission_history.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentSubmissionHistory(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'date': 'datetime', + 'users': 'list[str]', + 'state': 'AssignmentSubmissionState', + 'draft_grade': 'float', + 'grade': 'float', + 'max_points': 'float', + 'attachment': 'AssignmentSubmissionHistoryAttachment' + } + + attribute_map = { + 'date': 'date', + 'users': 'users', + 'state': 'state', + 'draft_grade': 'draftGrade', + 'grade': 'grade', + 'max_points': 'maxPoints', + 'attachment': 'attachment' + } + + def __init__(self, date=None, users=None, state=None, draft_grade=None, grade=None, max_points=None, attachment=None): # noqa: E501 + """AssignmentSubmissionHistory - a model defined in OpenAPI""" # noqa: E501 + + self._date = None + self._users = None + self._state = None + self._draft_grade = None + self._grade = None + self._max_points = None + self._attachment = None + self.discriminator = None + + if date is not None: + self.date = date + if users is not None: + self.users = users + if state is not None: + self.state = state + if draft_grade is not None: + self.draft_grade = draft_grade + if grade is not None: + self.grade = grade + if max_points is not None: + self.max_points = max_points + if attachment is not None: + self.attachment = attachment + + @property + def date(self): + """Gets the date of this AssignmentSubmissionHistory. # noqa: E501 + + The date when the submission was changed # noqa: E501 + + :return: The date of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: datetime + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this AssignmentSubmissionHistory. + + The date when the submission was changed # noqa: E501 + + :param date: The date of this AssignmentSubmissionHistory. # noqa: E501 + :type: datetime + """ + + self._date = date + + @property + def users(self): + """Gets the users of this AssignmentSubmissionHistory. # noqa: E501 + + The user(s) unique identifier(s) who made the change # noqa: E501 + + :return: The users of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: list[str] + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this AssignmentSubmissionHistory. + + The user(s) unique identifier(s) who made the change # noqa: E501 + + :param users: The users of this AssignmentSubmissionHistory. # noqa: E501 + :type: list[str] + """ + + self._users = users + + @property + def state(self): + """Gets the state of this AssignmentSubmissionHistory. # noqa: E501 + + + :return: The state of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: AssignmentSubmissionState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this AssignmentSubmissionHistory. + + + :param state: The state of this AssignmentSubmissionHistory. # noqa: E501 + :type: AssignmentSubmissionState + """ + + self._state = state + + @property + def draft_grade(self): + """Gets the draft_grade of this AssignmentSubmissionHistory. # noqa: E501 + + The numerator of the grade at this time in the submission grade history # noqa: E501 + + :return: The draft_grade of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: float + """ + return self._draft_grade + + @draft_grade.setter + def draft_grade(self, draft_grade): + """Sets the draft_grade of this AssignmentSubmissionHistory. + + The numerator of the grade at this time in the submission grade history # noqa: E501 + + :param draft_grade: The draft_grade of this AssignmentSubmissionHistory. # noqa: E501 + :type: float + """ + + self._draft_grade = draft_grade + + @property + def grade(self): + """Gets the grade of this AssignmentSubmissionHistory. # noqa: E501 + + The numerator of the grade at this time in the submission grade history # noqa: E501 + + :return: The grade of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: float + """ + return self._grade + + @grade.setter + def grade(self, grade): + """Sets the grade of this AssignmentSubmissionHistory. + + The numerator of the grade at this time in the submission grade history # noqa: E501 + + :param grade: The grade of this AssignmentSubmissionHistory. # noqa: E501 + :type: float + """ + + self._grade = grade + + @property + def max_points(self): + """Gets the max_points of this AssignmentSubmissionHistory. # noqa: E501 + + The denominator of the grade at this time in the submission grade history # noqa: E501 + + :return: The max_points of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: float + """ + return self._max_points + + @max_points.setter + def max_points(self, max_points): + """Sets the max_points of this AssignmentSubmissionHistory. + + The denominator of the grade at this time in the submission grade history # noqa: E501 + + :param max_points: The max_points of this AssignmentSubmissionHistory. # noqa: E501 + :type: float + """ + + self._max_points = max_points + + @property + def attachment(self): + """Gets the attachment of this AssignmentSubmissionHistory. # noqa: E501 + + + :return: The attachment of this AssignmentSubmissionHistory. # noqa: E501 + :rtype: AssignmentSubmissionHistoryAttachment + """ + return self._attachment + + @attachment.setter + def attachment(self, attachment): + """Sets the attachment of this AssignmentSubmissionHistory. + + + :param attachment: The attachment of this AssignmentSubmissionHistory. # noqa: E501 + :type: AssignmentSubmissionHistoryAttachment + """ + + self._attachment = attachment + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentSubmissionHistory): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py new file mode 100644 index 0000000..3209d3d --- /dev/null +++ b/flat_api/models/assignment_submission_history_attachment.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentSubmissionHistoryAttachment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'score': 'str', + 'revision': 'str' + } + + attribute_map = { + 'score': 'score', + 'revision': 'revision' + } + + def __init__(self, score=None, revision=None): # noqa: E501 + """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI""" # noqa: E501 + + self._score = None + self._revision = None + self.discriminator = None + + if score is not None: + self.score = score + if revision is not None: + self.revision = revision + + @property + def score(self): + """Gets the score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + + The score identifier that changed # noqa: E501 + + :return: The score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + :rtype: str + """ + return self._score + + @score.setter + def score(self, score): + """Sets the score of this AssignmentSubmissionHistoryAttachment. + + The score identifier that changed # noqa: E501 + + :param score: The score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + :type: str + """ + + self._score = score + + @property + def revision(self): + """Gets the revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + + The revision identifier that changed # noqa: E501 + + :return: The revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + :rtype: str + """ + return self._revision + + @revision.setter + def revision(self, revision): + """Sets the revision of this AssignmentSubmissionHistoryAttachment. + + The revision identifier that changed # noqa: E501 + + :param revision: The revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 + :type: str + """ + + self._revision = revision + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentSubmissionHistoryAttachment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_data_encoding.py b/flat_api/models/assignment_submission_state.py similarity index 82% rename from flat_api/models/score_data_encoding.py rename to flat_api/models/assignment_submission_state.py index 5dc68e8..edaa15d 100644 --- a/flat_api/models/score_data_encoding.py +++ b/flat_api/models/assignment_submission_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -17,7 +17,7 @@ import six -class ScoreDataEncoding(object): +class AssignmentSubmissionState(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -27,7 +27,9 @@ class ScoreDataEncoding(object): """ allowed enum values """ - BASE64 = "base64" + CREATED = "created" + TURNEDIN = "turnedIn" + RETURNED = "returned" """ Attributes: @@ -43,7 +45,7 @@ class ScoreDataEncoding(object): } def __init__(self): # noqa: E501 - """ScoreDataEncoding - a model defined in OpenAPI""" # noqa: E501 + """AssignmentSubmissionState - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): @@ -80,7 +82,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ScoreDataEncoding): + if not isinstance(other, AssignmentSubmissionState): return False return self.__dict__ == other.__dict__ diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index ff37594..b4fea84 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,35 +33,47 @@ class AssignmentSubmissionUpdate(object): """ openapi_types = { 'attachments': 'list[ClassAttachmentCreation]', - 'student_comment': 'str', 'submit': 'bool', - 'return_feedback': 'str' + 'draft_grade': 'float', + 'grade': 'float', + 'exercises_ids': 'list[str]', + '_return': 'bool', + 'comments': 'AssignmentSubmissionUpdateComments' } attribute_map = { 'attachments': 'attachments', - 'student_comment': 'studentComment', 'submit': 'submit', - 'return_feedback': 'returnFeedback' + 'draft_grade': 'draftGrade', + 'grade': 'grade', + 'exercises_ids': 'exercisesIds', + '_return': 'return', + 'comments': 'comments' } - def __init__(self, attachments=None, student_comment=None, submit=None, return_feedback=None): # noqa: E501 + def __init__(self, attachments=None, submit=None, draft_grade=None, grade=None, exercises_ids=None, _return=None, comments=None): # noqa: E501 """AssignmentSubmissionUpdate - a model defined in OpenAPI""" # noqa: E501 self._attachments = None - self._student_comment = None self._submit = None - self._return_feedback = None + self._draft_grade = None + self._grade = None + self._exercises_ids = None + self.__return = None + self._comments = None self.discriminator = None if attachments is not None: self.attachments = attachments - if student_comment is not None: - self.student_comment = student_comment if submit is not None: self.submit = submit - if return_feedback is not None: - self.return_feedback = return_feedback + self.draft_grade = draft_grade + self.grade = grade + self.exercises_ids = exercises_ids + if _return is not None: + self._return = _return + if comments is not None: + self.comments = comments @property def attachments(self): @@ -85,73 +97,148 @@ def attachments(self, attachments): self._attachments = attachments @property - def student_comment(self): - """Gets the student_comment of this AssignmentSubmissionUpdate. # noqa: E501 + def submit(self): + """Gets the submit of this AssignmentSubmissionUpdate. # noqa: E501 + + If `true`, the submission will be marked as done # noqa: E501 + + :return: The submit of this AssignmentSubmissionUpdate. # noqa: E501 + :rtype: bool + """ + return self._submit + + @submit.setter + def submit(self, submit): + """Sets the submit of this AssignmentSubmissionUpdate. - An optionnal comment sent by the student when submitting his work # noqa: E501 + If `true`, the submission will be marked as done # noqa: E501 - :return: The student_comment of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: str + :param submit: The submit of this AssignmentSubmissionUpdate. # noqa: E501 + :type: bool """ - return self._student_comment - @student_comment.setter - def student_comment(self, student_comment): - """Sets the student_comment of this AssignmentSubmissionUpdate. + self._submit = submit - An optionnal comment sent by the student when submitting his work # noqa: E501 + @property + def draft_grade(self): + """Gets the draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 + + Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 - :param student_comment: The student_comment of this AssignmentSubmissionUpdate. # noqa: E501 - :type: str + :return: The draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 + :rtype: float """ + return self._draft_grade + + @draft_grade.setter + def draft_grade(self, draft_grade): + """Sets the draft_grade of this AssignmentSubmissionUpdate. - self._student_comment = student_comment + Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 + + :param draft_grade: The draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 + :type: float + """ + if draft_grade is not None and draft_grade > 100: # noqa: E501 + raise ValueError("Invalid value for `draft_grade`, must be a value less than or equal to `100`") # noqa: E501 + if draft_grade is not None and draft_grade < 0: # noqa: E501 + raise ValueError("Invalid value for `draft_grade`, must be a value greater than or equal to `0`") # noqa: E501 + + self._draft_grade = draft_grade @property - def submit(self): - """Gets the submit of this AssignmentSubmissionUpdate. # noqa: E501 + def grade(self): + """Gets the grade of this AssignmentSubmissionUpdate. # noqa: E501 + + Optional grade. If unset, no grade was set. # noqa: E501 + + :return: The grade of this AssignmentSubmissionUpdate. # noqa: E501 + :rtype: float + """ + return self._grade + + @grade.setter + def grade(self, grade): + """Sets the grade of this AssignmentSubmissionUpdate. + + Optional grade. If unset, no grade was set. # noqa: E501 + + :param grade: The grade of this AssignmentSubmissionUpdate. # noqa: E501 + :type: float + """ + if grade is not None and grade > 100: # noqa: E501 + raise ValueError("Invalid value for `grade`, must be a value less than or equal to `100`") # noqa: E501 + if grade is not None and grade < 0: # noqa: E501 + raise ValueError("Invalid value for `grade`, must be a value greater than or equal to `0`") # noqa: E501 + + self._grade = grade + + @property + def exercises_ids(self): + """Gets the exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 + + The ids of exercises when they need to be in a specific order # noqa: E501 + + :return: The exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 + :rtype: list[str] + """ + return self._exercises_ids + + @exercises_ids.setter + def exercises_ids(self, exercises_ids): + """Sets the exercises_ids of this AssignmentSubmissionUpdate. + + The ids of exercises when they need to be in a specific order # noqa: E501 + + :param exercises_ids: The exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 + :type: list[str] + """ + + self._exercises_ids = exercises_ids + + @property + def _return(self): + """Gets the _return of this AssignmentSubmissionUpdate. # noqa: E501 If `true`, the submission will be marked as done # noqa: E501 - :return: The submit of this AssignmentSubmissionUpdate. # noqa: E501 + :return: The _return of this AssignmentSubmissionUpdate. # noqa: E501 :rtype: bool """ - return self._submit + return self.__return - @submit.setter - def submit(self, submit): - """Sets the submit of this AssignmentSubmissionUpdate. + @_return.setter + def _return(self, _return): + """Sets the _return of this AssignmentSubmissionUpdate. If `true`, the submission will be marked as done # noqa: E501 - :param submit: The submit of this AssignmentSubmissionUpdate. # noqa: E501 + :param _return: The _return of this AssignmentSubmissionUpdate. # noqa: E501 :type: bool """ - self._submit = submit + self.__return = _return @property - def return_feedback(self): - """Gets the return_feedback of this AssignmentSubmissionUpdate. # noqa: E501 + def comments(self): + """Gets the comments of this AssignmentSubmissionUpdate. # noqa: E501 - The feedback associated with the return # noqa: E501 - :return: The return_feedback of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: str + :return: The comments of this AssignmentSubmissionUpdate. # noqa: E501 + :rtype: AssignmentSubmissionUpdateComments """ - return self._return_feedback + return self._comments - @return_feedback.setter - def return_feedback(self, return_feedback): - """Sets the return_feedback of this AssignmentSubmissionUpdate. + @comments.setter + def comments(self, comments): + """Sets the comments of this AssignmentSubmissionUpdate. - The feedback associated with the return # noqa: E501 - :param return_feedback: The return_feedback of this AssignmentSubmissionUpdate. # noqa: E501 - :type: str + :param comments: The comments of this AssignmentSubmissionUpdate. # noqa: E501 + :type: AssignmentSubmissionUpdateComments """ - self._return_feedback = return_feedback + self._comments = comments def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/assignment_submission_update_comments.py b/flat_api/models/assignment_submission_update_comments.py new file mode 100644 index 0000000..47ad1eb --- /dev/null +++ b/flat_api/models/assignment_submission_update_comments.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AssignmentSubmissionUpdateComments(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'float', + 'unread': 'float' + } + + attribute_map = { + 'total': 'total', + 'unread': 'unread' + } + + def __init__(self, total=None, unread=None): # noqa: E501 + """AssignmentSubmissionUpdateComments - a model defined in OpenAPI""" # noqa: E501 + + self._total = None + self._unread = None + self.discriminator = None + + if total is not None: + self.total = total + if unread is not None: + self.unread = unread + + @property + def total(self): + """Gets the total of this AssignmentSubmissionUpdateComments. # noqa: E501 + + The total number of comments added to the submission # noqa: E501 + + :return: The total of this AssignmentSubmissionUpdateComments. # noqa: E501 + :rtype: float + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this AssignmentSubmissionUpdateComments. + + The total number of comments added to the submission # noqa: E501 + + :param total: The total of this AssignmentSubmissionUpdateComments. # noqa: E501 + :type: float + """ + + self._total = total + + @property + def unread(self): + """Gets the unread of this AssignmentSubmissionUpdateComments. # noqa: E501 + + The number of unread comments for the current user # noqa: E501 + + :return: The unread of this AssignmentSubmissionUpdateComments. # noqa: E501 + :rtype: float + """ + return self._unread + + @unread.setter + def unread(self, unread): + """Sets the unread of this AssignmentSubmissionUpdateComments. + + The number of unread comments for the current user # noqa: E501 + + :param unread: The unread of this AssignmentSubmissionUpdateComments. # noqa: E501 + :type: float + """ + + self._unread = unread + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssignmentSubmissionUpdateComments): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/user_instruments.py b/flat_api/models/assignment_type.py similarity index 80% rename from flat_api/models/user_instruments.py rename to flat_api/models/assignment_type.py index ca1345a..03373c7 100644 --- a/flat_api/models/user_instruments.py +++ b/flat_api/models/assignment_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -17,13 +17,23 @@ import six -class UserInstruments(object): +class AssignmentType(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + """ + allowed enum values + """ + NONE = "none" + NEWSCORE = "newScore" + SCORETEMPLATE = "scoreTemplate" + SHAREDWRITING = "sharedWriting" + WORKSHEET = "worksheet" + PERFORMANCE = "performance" + """ Attributes: openapi_types (dict): The key is attribute name @@ -38,7 +48,7 @@ class UserInstruments(object): } def __init__(self): # noqa: E501 - """UserInstruments - a model defined in OpenAPI""" # noqa: E501 + """AssignmentType - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): @@ -75,7 +85,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, UserInstruments): + if not isinstance(other, AssignmentType): return False return self.__dict__ == other.__dict__ diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index 54b2ac4..d497c41 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -34,29 +34,49 @@ class ClassAttachmentCreation(object): openapi_types = { 'type': 'str', 'score': 'str', - 'url': 'str' + 'worksheet': 'str', + 'sharing_mode': 'MediaScoreSharingMode', + 'lock_score_template': 'bool', + 'url': 'str', + 'google_drive_file_id': 'str' } attribute_map = { 'type': 'type', 'score': 'score', - 'url': 'url' + 'worksheet': 'worksheet', + 'sharing_mode': 'sharingMode', + 'lock_score_template': 'lockScoreTemplate', + 'url': 'url', + 'google_drive_file_id': 'googleDriveFileId' } - def __init__(self, type=None, score=None, url=None): # noqa: E501 + def __init__(self, type=None, score=None, worksheet=None, sharing_mode=None, lock_score_template=None, url=None, google_drive_file_id=None): # noqa: E501 """ClassAttachmentCreation - a model defined in OpenAPI""" # noqa: E501 self._type = None self._score = None + self._worksheet = None + self._sharing_mode = None + self._lock_score_template = None self._url = None + self._google_drive_file_id = None self.discriminator = None if type is not None: self.type = type if score is not None: self.score = score + if worksheet is not None: + self.worksheet = worksheet + if sharing_mode is not None: + self.sharing_mode = sharing_mode + if lock_score_template is not None: + self.lock_score_template = lock_score_template if url is not None: self.url = url + if google_drive_file_id is not None: + self.google_drive_file_id = google_drive_file_id @property def type(self): @@ -78,7 +98,7 @@ def type(self, type): :param type: The type of this ClassAttachmentCreation. # noqa: E501 :type: str """ - allowed_values = ["flat", "link", "exercise"] # noqa: E501 + allowed_values = ["flat", "link", "googleDrive", "worksheet"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 @@ -110,6 +130,73 @@ def score(self, score): self._score = score + @property + def worksheet(self): + """Gets the worksheet of this ClassAttachmentCreation. # noqa: E501 + + An unique worksheet identifier # noqa: E501 + + :return: The worksheet of this ClassAttachmentCreation. # noqa: E501 + :rtype: str + """ + return self._worksheet + + @worksheet.setter + def worksheet(self, worksheet): + """Sets the worksheet of this ClassAttachmentCreation. + + An unique worksheet identifier # noqa: E501 + + :param worksheet: The worksheet of this ClassAttachmentCreation. # noqa: E501 + :type: str + """ + + self._worksheet = worksheet + + @property + def sharing_mode(self): + """Gets the sharing_mode of this ClassAttachmentCreation. # noqa: E501 + + + :return: The sharing_mode of this ClassAttachmentCreation. # noqa: E501 + :rtype: MediaScoreSharingMode + """ + return self._sharing_mode + + @sharing_mode.setter + def sharing_mode(self, sharing_mode): + """Sets the sharing_mode of this ClassAttachmentCreation. + + + :param sharing_mode: The sharing_mode of this ClassAttachmentCreation. # noqa: E501 + :type: MediaScoreSharingMode + """ + + self._sharing_mode = sharing_mode + + @property + def lock_score_template(self): + """Gets the lock_score_template of this ClassAttachmentCreation. # noqa: E501 + + To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 + + :return: The lock_score_template of this ClassAttachmentCreation. # noqa: E501 + :rtype: bool + """ + return self._lock_score_template + + @lock_score_template.setter + def lock_score_template(self, lock_score_template): + """Sets the lock_score_template of this ClassAttachmentCreation. + + To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 + + :param lock_score_template: The lock_score_template of this ClassAttachmentCreation. # noqa: E501 + :type: bool + """ + + self._lock_score_template = lock_score_template + @property def url(self): """Gets the url of this ClassAttachmentCreation. # noqa: E501 @@ -133,6 +220,29 @@ def url(self, url): self._url = url + @property + def google_drive_file_id(self): + """Gets the google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 + + The ID of the Google Drive File # noqa: E501 + + :return: The google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 + :rtype: str + """ + return self._google_drive_file_id + + @google_drive_file_id.setter + def google_drive_file_id(self, google_drive_file_id): + """Sets the google_drive_file_id of this ClassAttachmentCreation. + + The ID of the Google Drive File # noqa: E501 + + :param google_drive_file_id: The google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 + :type: str + """ + + self._google_drive_file_id = google_drive_file_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index bce040a..92339fa 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 3ea28e9..2cff47a 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -45,10 +45,13 @@ class ClassDetails(object): 'assignments_count': 'float', 'students_group': 'GroupDetails', 'teachers_group': 'GroupDetails', + 'issues': 'ClassDetailsIssues', 'google_classroom': 'ClassDetailsGoogleClassroom', 'google_drive': 'ClassDetailsGoogleDrive', + 'microsoft_graph': 'ClassDetailsMicrosoftGraph', 'lti': 'ClassDetailsLti', 'canvas': 'ClassDetailsCanvas', + 'mfc': 'ClassDetailsMfc', 'clever': 'ClassDetailsClever' } @@ -66,14 +69,17 @@ class ClassDetails(object): 'assignments_count': 'assignmentsCount', 'students_group': 'studentsGroup', 'teachers_group': 'teachersGroup', + 'issues': 'issues', 'google_classroom': 'googleClassroom', 'google_drive': 'googleDrive', + 'microsoft_graph': 'microsoftGraph', 'lti': 'lti', 'canvas': 'canvas', + 'mfc': 'mfc', 'clever': 'clever' } - def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, google_classroom=None, google_drive=None, lti=None, canvas=None, clever=None): # noqa: E501 + def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, issues=None, google_classroom=None, google_drive=None, microsoft_graph=None, lti=None, canvas=None, mfc=None, clever=None): # noqa: E501 """ClassDetails - a model defined in OpenAPI""" # noqa: E501 self._id = None @@ -89,10 +95,13 @@ def __init__(self, id=None, state=None, name=None, section=None, description=Non self._assignments_count = None self._students_group = None self._teachers_group = None + self._issues = None self._google_classroom = None self._google_drive = None + self._microsoft_graph = None self._lti = None self._canvas = None + self._mfc = None self._clever = None self.discriminator = None @@ -122,14 +131,20 @@ def __init__(self, id=None, state=None, name=None, section=None, description=Non self.students_group = students_group if teachers_group is not None: self.teachers_group = teachers_group + if issues is not None: + self.issues = issues if google_classroom is not None: self.google_classroom = google_classroom if google_drive is not None: self.google_drive = google_drive + if microsoft_graph is not None: + self.microsoft_graph = microsoft_graph if lti is not None: self.lti = lti if canvas is not None: self.canvas = canvas + if mfc is not None: + self.mfc = mfc if clever is not None: self.clever = clever @@ -426,6 +441,27 @@ def teachers_group(self, teachers_group): self._teachers_group = teachers_group + @property + def issues(self): + """Gets the issues of this ClassDetails. # noqa: E501 + + + :return: The issues of this ClassDetails. # noqa: E501 + :rtype: ClassDetailsIssues + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this ClassDetails. + + + :param issues: The issues of this ClassDetails. # noqa: E501 + :type: ClassDetailsIssues + """ + + self._issues = issues + @property def google_classroom(self): """Gets the google_classroom of this ClassDetails. # noqa: E501 @@ -468,6 +504,27 @@ def google_drive(self, google_drive): self._google_drive = google_drive + @property + def microsoft_graph(self): + """Gets the microsoft_graph of this ClassDetails. # noqa: E501 + + + :return: The microsoft_graph of this ClassDetails. # noqa: E501 + :rtype: ClassDetailsMicrosoftGraph + """ + return self._microsoft_graph + + @microsoft_graph.setter + def microsoft_graph(self, microsoft_graph): + """Sets the microsoft_graph of this ClassDetails. + + + :param microsoft_graph: The microsoft_graph of this ClassDetails. # noqa: E501 + :type: ClassDetailsMicrosoftGraph + """ + + self._microsoft_graph = microsoft_graph + @property def lti(self): """Gets the lti of this ClassDetails. # noqa: E501 @@ -510,6 +567,27 @@ def canvas(self, canvas): self._canvas = canvas + @property + def mfc(self): + """Gets the mfc of this ClassDetails. # noqa: E501 + + + :return: The mfc of this ClassDetails. # noqa: E501 + :rtype: ClassDetailsMfc + """ + return self._mfc + + @mfc.setter + def mfc(self, mfc): + """Sets the mfc of this ClassDetails. + + + :param mfc: The mfc of this ClassDetails. # noqa: E501 + :type: ClassDetailsMfc + """ + + self._mfc = mfc + @property def clever(self): """Gets the clever of this ClassDetails. # noqa: E501 diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index b86d4da..ace1024 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,72 +32,72 @@ class ClassDetailsCanvas(object): and the value is json key in definition. """ openapi_types = { - 'domain': 'str', - 'id': 'str' + 'id': 'str', + 'domain': 'str' } attribute_map = { - 'domain': 'domain', - 'id': 'id' + 'id': 'id', + 'domain': 'domain' } - def __init__(self, domain=None, id=None): # noqa: E501 + def __init__(self, id=None, domain=None): # noqa: E501 """ClassDetailsCanvas - a model defined in OpenAPI""" # noqa: E501 - self._domain = None self._id = None + self._domain = None self.discriminator = None - if domain is not None: - self.domain = domain if id is not None: self.id = id + if domain is not None: + self.domain = domain @property - def domain(self): - """Gets the domain of this ClassDetailsCanvas. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsCanvas. # noqa: E501 - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 + Unique identifier of the course on Canvas # noqa: E501 - :return: The domain of this ClassDetailsCanvas. # noqa: E501 + :return: The id of this ClassDetailsCanvas. # noqa: E501 :rtype: str """ - return self._domain + return self._id - @domain.setter - def domain(self, domain): - """Sets the domain of this ClassDetailsCanvas. + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsCanvas. - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 + Unique identifier of the course on Canvas # noqa: E501 - :param domain: The domain of this ClassDetailsCanvas. # noqa: E501 + :param id: The id of this ClassDetailsCanvas. # noqa: E501 :type: str """ - self._domain = domain + self._id = id @property - def id(self): - """Gets the id of this ClassDetailsCanvas. # noqa: E501 + def domain(self): + """Gets the domain of this ClassDetailsCanvas. # noqa: E501 - Unique identifier of the course on Canvas # noqa: E501 + Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - :return: The id of this ClassDetailsCanvas. # noqa: E501 + :return: The domain of this ClassDetailsCanvas. # noqa: E501 :rtype: str """ - return self._id + return self._domain - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsCanvas. + @domain.setter + def domain(self, domain): + """Sets the domain of this ClassDetailsCanvas. - Unique identifier of the course on Canvas # noqa: E501 + Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - :param id: The id of this ClassDetailsCanvas. # noqa: E501 + :param domain: The domain of this ClassDetailsCanvas. # noqa: E501 :type: str """ - self._id = id + self._domain = domain def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index 063fa8e..32ac831 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,97 +32,120 @@ class ClassDetailsClever(object): and the value is json key in definition. """ openapi_types = { + 'id': 'str', + 'creation_date': 'datetime', 'modification_date': 'datetime', - 'term_end_date': 'datetime', 'subject': 'str', + 'term_name': 'str', 'term_start_date': 'datetime', - 'id': 'str', - 'creation_date': 'datetime', - 'term_name': 'str' + 'term_end_date': 'datetime' } attribute_map = { + 'id': 'id', + 'creation_date': 'creationDate', 'modification_date': 'modificationDate', - 'term_end_date': 'termEndDate', 'subject': 'subject', + 'term_name': 'termName', 'term_start_date': 'termStartDate', - 'id': 'id', - 'creation_date': 'creationDate', - 'term_name': 'termName' + 'term_end_date': 'termEndDate' } - def __init__(self, modification_date=None, term_end_date=None, subject=None, term_start_date=None, id=None, creation_date=None, term_name=None): # noqa: E501 + def __init__(self, id=None, creation_date=None, modification_date=None, subject=None, term_name=None, term_start_date=None, term_end_date=None): # noqa: E501 """ClassDetailsClever - a model defined in OpenAPI""" # noqa: E501 - self._modification_date = None - self._term_end_date = None - self._subject = None - self._term_start_date = None self._id = None self._creation_date = None + self._modification_date = None + self._subject = None self._term_name = None + self._term_start_date = None + self._term_end_date = None self.discriminator = None - if modification_date is not None: - self.modification_date = modification_date - if term_end_date is not None: - self.term_end_date = term_end_date - if subject is not None: - self.subject = subject - if term_start_date is not None: - self.term_start_date = term_start_date if id is not None: self.id = id if creation_date is not None: self.creation_date = creation_date + if modification_date is not None: + self.modification_date = modification_date + if subject is not None: + self.subject = subject if term_name is not None: self.term_name = term_name + if term_start_date is not None: + self.term_start_date = term_start_date + if term_end_date is not None: + self.term_end_date = term_end_date @property - def modification_date(self): - """Gets the modification_date of this ClassDetailsClever. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsClever. # noqa: E501 - The last modification date of the section on clever # noqa: E501 + Clever section unique identifier # noqa: E501 - :return: The modification_date of this ClassDetailsClever. # noqa: E501 + :return: The id of this ClassDetailsClever. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsClever. + + Clever section unique identifier # noqa: E501 + + :param id: The id of this ClassDetailsClever. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def creation_date(self): + """Gets the creation_date of this ClassDetailsClever. # noqa: E501 + + The creation date of the section on clever # noqa: E501 + + :return: The creation_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._modification_date + return self._creation_date - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ClassDetailsClever. + @creation_date.setter + def creation_date(self, creation_date): + """Sets the creation_date of this ClassDetailsClever. - The last modification date of the section on clever # noqa: E501 + The creation date of the section on clever # noqa: E501 - :param modification_date: The modification_date of this ClassDetailsClever. # noqa: E501 + :param creation_date: The creation_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._modification_date = modification_date + self._creation_date = creation_date @property - def term_end_date(self): - """Gets the term_end_date of this ClassDetailsClever. # noqa: E501 + def modification_date(self): + """Gets the modification_date of this ClassDetailsClever. # noqa: E501 - End date of the term # noqa: E501 + The last modification date of the section on clever # noqa: E501 - :return: The term_end_date of this ClassDetailsClever. # noqa: E501 + :return: The modification_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._term_end_date + return self._modification_date - @term_end_date.setter - def term_end_date(self, term_end_date): - """Sets the term_end_date of this ClassDetailsClever. + @modification_date.setter + def modification_date(self, modification_date): + """Sets the modification_date of this ClassDetailsClever. - End date of the term # noqa: E501 + The last modification date of the section on clever # noqa: E501 - :param term_end_date: The term_end_date of this ClassDetailsClever. # noqa: E501 + :param modification_date: The modification_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._term_end_date = term_end_date + self._modification_date = modification_date @property def subject(self): @@ -153,6 +176,29 @@ def subject(self, subject): self._subject = subject + @property + def term_name(self): + """Gets the term_name of this ClassDetailsClever. # noqa: E501 + + Name of the term when this course happens # noqa: E501 + + :return: The term_name of this ClassDetailsClever. # noqa: E501 + :rtype: str + """ + return self._term_name + + @term_name.setter + def term_name(self, term_name): + """Sets the term_name of this ClassDetailsClever. + + Name of the term when this course happens # noqa: E501 + + :param term_name: The term_name of this ClassDetailsClever. # noqa: E501 + :type: str + """ + + self._term_name = term_name + @property def term_start_date(self): """Gets the term_start_date of this ClassDetailsClever. # noqa: E501 @@ -177,73 +223,27 @@ def term_start_date(self, term_start_date): self._term_start_date = term_start_date @property - def id(self): - """Gets the id of this ClassDetailsClever. # noqa: E501 - - Clever section unique identifier # noqa: E501 - - :return: The id of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsClever. - - Clever section unique identifier # noqa: E501 - - :param id: The id of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def creation_date(self): - """Gets the creation_date of this ClassDetailsClever. # noqa: E501 + def term_end_date(self): + """Gets the term_end_date of this ClassDetailsClever. # noqa: E501 - The creation date of the section on clever # noqa: E501 + End date of the term # noqa: E501 - :return: The creation_date of this ClassDetailsClever. # noqa: E501 + :return: The term_end_date of this ClassDetailsClever. # noqa: E501 :rtype: datetime """ - return self._creation_date + return self._term_end_date - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ClassDetailsClever. + @term_end_date.setter + def term_end_date(self, term_end_date): + """Sets the term_end_date of this ClassDetailsClever. - The creation date of the section on clever # noqa: E501 + End date of the term # noqa: E501 - :param creation_date: The creation_date of this ClassDetailsClever. # noqa: E501 + :param term_end_date: The term_end_date of this ClassDetailsClever. # noqa: E501 :type: datetime """ - self._creation_date = creation_date - - @property - def term_name(self): - """Gets the term_name of this ClassDetailsClever. # noqa: E501 - - Name of the term when this course happens # noqa: E501 - - :return: The term_name of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._term_name - - @term_name.setter - def term_name(self, term_name): - """Sets the term_name of this ClassDetailsClever. - - Name of the term when this course happens # noqa: E501 - - :param term_name: The term_name of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._term_name = term_name + self._term_end_date = term_end_date def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index 6963d9b..6ed06e0 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,59 +32,49 @@ class ClassDetailsGoogleClassroom(object): and the value is json key in definition. """ openapi_types = { - 'name': 'str', - 'alternate_link': 'str', - 'section': 'str', - 'id': 'str' + 'id': 'str', + 'alternate_link': 'str' } attribute_map = { - 'name': 'name', - 'alternate_link': 'alternateLink', - 'section': 'section', - 'id': 'id' + 'id': 'id', + 'alternate_link': 'alternateLink' } - def __init__(self, name=None, alternate_link=None, section=None, id=None): # noqa: E501 + def __init__(self, id=None, alternate_link=None): # noqa: E501 """ClassDetailsGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 - self._name = None - self._alternate_link = None - self._section = None self._id = None + self._alternate_link = None self.discriminator = None - if name is not None: - self.name = name - if alternate_link is not None: - self.alternate_link = alternate_link - if section is not None: - self.section = section if id is not None: self.id = id + if alternate_link is not None: + self.alternate_link = alternate_link @property - def name(self): - """Gets the name of this ClassDetailsGoogleClassroom. # noqa: E501 + def id(self): + """Gets the id of this ClassDetailsGoogleClassroom. # noqa: E501 - The name of the course on Google Classroom # noqa: E501 + The course identifier on Google Classroom # noqa: E501 - :return: The name of this ClassDetailsGoogleClassroom. # noqa: E501 + :return: The id of this ClassDetailsGoogleClassroom. # noqa: E501 :rtype: str """ - return self._name + return self._id - @name.setter - def name(self, name): - """Sets the name of this ClassDetailsGoogleClassroom. + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsGoogleClassroom. - The name of the course on Google Classroom # noqa: E501 + The course identifier on Google Classroom # noqa: E501 - :param name: The name of this ClassDetailsGoogleClassroom. # noqa: E501 + :param id: The id of this ClassDetailsGoogleClassroom. # noqa: E501 :type: str """ - self._name = name + self._id = id @property def alternate_link(self): @@ -109,52 +99,6 @@ def alternate_link(self, alternate_link): self._alternate_link = alternate_link - @property - def section(self): - """Gets the section of this ClassDetailsGoogleClassroom. # noqa: E501 - - The section of the course on Google Classroom # noqa: E501 - - :return: The section of this ClassDetailsGoogleClassroom. # noqa: E501 - :rtype: str - """ - return self._section - - @section.setter - def section(self, section): - """Sets the section of this ClassDetailsGoogleClassroom. - - The section of the course on Google Classroom # noqa: E501 - - :param section: The section of this ClassDetailsGoogleClassroom. # noqa: E501 - :type: str - """ - - self._section = section - - @property - def id(self): - """Gets the id of this ClassDetailsGoogleClassroom. # noqa: E501 - - The course identifier on Google Classroom # noqa: E501 - - :return: The id of this ClassDetailsGoogleClassroom. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsGoogleClassroom. - - The course identifier on Google Classroom # noqa: E501 - - :param id: The id of this ClassDetailsGoogleClassroom. # noqa: E501 - :type: str - """ - - self._id = id - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index 596cb5d..ee1f509 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py new file mode 100644 index 0000000..eec2e4b --- /dev/null +++ b/flat_api/models/class_details_issues.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ClassDetailsIssues(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'sync': 'list[ClassDetailsIssuesSync]' + } + + attribute_map = { + 'sync': 'sync' + } + + def __init__(self, sync=None): # noqa: E501 + """ClassDetailsIssues - a model defined in OpenAPI""" # noqa: E501 + + self._sync = None + self.discriminator = None + + if sync is not None: + self.sync = sync + + @property + def sync(self): + """Gets the sync of this ClassDetailsIssues. # noqa: E501 + + Synchronization issues for the class # noqa: E501 + + :return: The sync of this ClassDetailsIssues. # noqa: E501 + :rtype: list[ClassDetailsIssuesSync] + """ + return self._sync + + @sync.setter + def sync(self, sync): + """Sets the sync of this ClassDetailsIssues. + + Synchronization issues for the class # noqa: E501 + + :param sync: The sync of this ClassDetailsIssues. # noqa: E501 + :type: list[ClassDetailsIssuesSync] + """ + + self._sync = sync + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClassDetailsIssues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/class_details_issues_sync.py b/flat_api/models/class_details_issues_sync.py new file mode 100644 index 0000000..fed6b29 --- /dev/null +++ b/flat_api/models/class_details_issues_sync.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ClassDetailsIssuesSync(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'email': 'str', + 'reason': 'str' + } + + attribute_map = { + 'id': 'id', + 'email': 'email', + 'reason': 'reason' + } + + def __init__(self, id=None, email=None, reason=None): # noqa: E501 + """ClassDetailsIssuesSync - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._email = None + self._reason = None + self.discriminator = None + + if id is not None: + self.id = id + if email is not None: + self.email = email + if reason is not None: + self.reason = reason + + @property + def id(self): + """Gets the id of this ClassDetailsIssuesSync. # noqa: E501 + + The account user identifier # noqa: E501 + + :return: The id of this ClassDetailsIssuesSync. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsIssuesSync. + + The account user identifier # noqa: E501 + + :param id: The id of this ClassDetailsIssuesSync. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def email(self): + """Gets the email of this ClassDetailsIssuesSync. # noqa: E501 + + The email address of the user concerned by this sync issue # noqa: E501 + + :return: The email of this ClassDetailsIssuesSync. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this ClassDetailsIssuesSync. + + The email address of the user concerned by this sync issue # noqa: E501 + + :param email: The email of this ClassDetailsIssuesSync. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def reason(self): + """Gets the reason of this ClassDetailsIssuesSync. # noqa: E501 + + The reason why the account cannot be synced # noqa: E501 + + :return: The reason of this ClassDetailsIssuesSync. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this ClassDetailsIssuesSync. + + The reason why the account cannot be synced # noqa: E501 + + :param reason: The reason of this ClassDetailsIssuesSync. # noqa: E501 + :type: str + """ + allowed_values = ["otherOrgnanization", "personalSubscription"] # noqa: E501 + if reason not in allowed_values: + raise ValueError( + "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 + .format(reason, allowed_values) + ) + + self._reason = reason + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClassDetailsIssuesSync): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index 812795e..ef1e05e 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py new file mode 100644 index 0000000..803f5ae --- /dev/null +++ b/flat_api/models/class_details_mfc.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ClassDetailsMfc(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'alternate_link': 'str' + } + + attribute_map = { + 'id': 'id', + 'alternate_link': 'alternateLink' + } + + def __init__(self, id=None, alternate_link=None): # noqa: E501 + """ClassDetailsMfc - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._alternate_link = None + self.discriminator = None + + if id is not None: + self.id = id + if alternate_link is not None: + self.alternate_link = alternate_link + + @property + def id(self): + """Gets the id of this ClassDetailsMfc. # noqa: E501 + + Unique identifier of the course on MusicFirst Classroom # noqa: E501 + + :return: The id of this ClassDetailsMfc. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsMfc. + + Unique identifier of the course on MusicFirst Classroom # noqa: E501 + + :param id: The id of this ClassDetailsMfc. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def alternate_link(self): + """Gets the alternate_link of this ClassDetailsMfc. # noqa: E501 + + Link to MusicFirst Classroom class # noqa: E501 + + :return: The alternate_link of this ClassDetailsMfc. # noqa: E501 + :rtype: str + """ + return self._alternate_link + + @alternate_link.setter + def alternate_link(self, alternate_link): + """Sets the alternate_link of this ClassDetailsMfc. + + Link to MusicFirst Classroom class # noqa: E501 + + :param alternate_link: The alternate_link of this ClassDetailsMfc. # noqa: E501 + :type: str + """ + + self._alternate_link = alternate_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClassDetailsMfc): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py new file mode 100644 index 0000000..97387ab --- /dev/null +++ b/flat_api/models/class_details_microsoft_graph.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ClassDetailsMicrosoftGraph(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None): # noqa: E501 + """ClassDetailsMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this ClassDetailsMicrosoftGraph. # noqa: E501 + + The course identifier on Microsoft Graph # noqa: E501 + + :return: The id of this ClassDetailsMicrosoftGraph. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ClassDetailsMicrosoftGraph. + + The course identifier on Microsoft Graph # noqa: E501 + + :param id: The id of this ClassDetailsMicrosoftGraph. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClassDetailsMicrosoftGraph): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index bd90cd2..3deb734 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 05f9e2a..697f7f4 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index 47d035e..e44f12e 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index 6698671..987857d 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -38,7 +38,7 @@ class Collection(object): 'type': 'CollectionType', 'privacy': 'CollectionPrivacy', 'sharing_key': 'str', - 'app': 'str', + 'app': 'CollectionApp', 'creation_date': 'datetime', 'user': 'UserPublicSummary', 'rights': 'ResourceRights', @@ -151,10 +151,6 @@ def title(self, title): :param title: The title of this Collection. # noqa: E501 :type: str """ - if title is not None and len(title) > 300: - raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 - if title is not None and len(title) < 1: - raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -250,10 +246,9 @@ def sharing_key(self, sharing_key): def app(self): """Gets the app of this Collection. # noqa: E501 - If this directory is dedicated to an app, the unique idenfier of this app # noqa: E501 :return: The app of this Collection. # noqa: E501 - :rtype: str + :rtype: CollectionApp """ return self._app @@ -261,10 +256,9 @@ def app(self): def app(self, app): """Sets the app of this Collection. - If this directory is dedicated to an app, the unique idenfier of this app # noqa: E501 :param app: The app of this Collection. # noqa: E501 - :type: str + :type: CollectionApp """ self._app = app diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py new file mode 100644 index 0000000..bec779f --- /dev/null +++ b/flat_api/models/collection_app.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CollectionApp(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'logo': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'logo': 'logo' + } + + def __init__(self, id=None, name=None, logo=None): # noqa: E501 + """CollectionApp - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._name = None + self._logo = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if logo is not None: + self.logo = logo + + @property + def id(self): + """Gets the id of this CollectionApp. # noqa: E501 + + The app unique identifier # noqa: E501 + + :return: The id of this CollectionApp. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CollectionApp. + + The app unique identifier # noqa: E501 + + :param id: The id of this CollectionApp. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this CollectionApp. # noqa: E501 + + The name of the app # noqa: E501 + + :return: The name of this CollectionApp. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CollectionApp. + + The name of the app # noqa: E501 + + :param name: The name of this CollectionApp. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def logo(self): + """Gets the logo of this CollectionApp. # noqa: E501 + + The app logo url # noqa: E501 + + :return: The logo of this CollectionApp. # noqa: E501 + :rtype: str + """ + return self._logo + + @logo.setter + def logo(self, logo): + """Sets the logo of this CollectionApp. + + The app logo url # noqa: E501 + + :param logo: The logo of this CollectionApp. # noqa: E501 + :type: str + """ + + self._logo = logo + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CollectionApp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 45260a3..29f1448 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,87 +32,41 @@ class CollectionCapabilities(object): and the value is json key in definition. """ openapi_types = { - 'can_delete_scores': 'bool', - 'can_add_scores': 'bool', 'can_edit': 'bool', 'can_share': 'bool', - 'can_delete': 'bool' + 'can_delete': 'bool', + 'can_add_scores': 'bool', + 'can_delete_scores': 'bool' } attribute_map = { - 'can_delete_scores': 'canDeleteScores', - 'can_add_scores': 'canAddScores', 'can_edit': 'canEdit', 'can_share': 'canShare', - 'can_delete': 'canDelete' + 'can_delete': 'canDelete', + 'can_add_scores': 'canAddScores', + 'can_delete_scores': 'canDeleteScores' } - def __init__(self, can_delete_scores=None, can_add_scores=None, can_edit=None, can_share=None, can_delete=None): # noqa: E501 + def __init__(self, can_edit=None, can_share=None, can_delete=None, can_add_scores=None, can_delete_scores=None): # noqa: E501 """CollectionCapabilities - a model defined in OpenAPI""" # noqa: E501 - self._can_delete_scores = None - self._can_add_scores = None self._can_edit = None self._can_share = None self._can_delete = None + self._can_add_scores = None + self._can_delete_scores = None self.discriminator = None - if can_delete_scores is not None: - self.can_delete_scores = can_delete_scores - if can_add_scores is not None: - self.can_add_scores = can_add_scores if can_edit is not None: self.can_edit = can_edit if can_share is not None: self.can_share = can_share if can_delete is not None: self.can_delete = can_delete - - @property - def can_delete_scores(self): - """Gets the can_delete_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :return: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_delete_scores - - @can_delete_scores.setter - def can_delete_scores(self, can_delete_scores): - """Sets the can_delete_scores of this CollectionCapabilities. - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :param can_delete_scores: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_delete_scores = can_delete_scores - - @property - def can_add_scores(self): - """Gets the can_add_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :return: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_add_scores - - @can_add_scores.setter - def can_add_scores(self, can_add_scores): - """Sets the can_add_scores of this CollectionCapabilities. - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :param can_add_scores: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_add_scores = can_add_scores + if can_add_scores is not None: + self.can_add_scores = can_add_scores + if can_delete_scores is not None: + self.can_delete_scores = can_delete_scores @property def can_edit(self): @@ -183,6 +137,52 @@ def can_delete(self, can_delete): self._can_delete = can_delete + @property + def can_add_scores(self): + """Gets the can_add_scores of this CollectionCapabilities. # noqa: E501 + + Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 + + :return: The can_add_scores of this CollectionCapabilities. # noqa: E501 + :rtype: bool + """ + return self._can_add_scores + + @can_add_scores.setter + def can_add_scores(self, can_add_scores): + """Sets the can_add_scores of this CollectionCapabilities. + + Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 + + :param can_add_scores: The can_add_scores of this CollectionCapabilities. # noqa: E501 + :type: bool + """ + + self._can_add_scores = can_add_scores + + @property + def can_delete_scores(self): + """Gets the can_delete_scores of this CollectionCapabilities. # noqa: E501 + + Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 + + :return: The can_delete_scores of this CollectionCapabilities. # noqa: E501 + :rtype: bool + """ + return self._can_delete_scores + + @can_delete_scores.setter + def can_delete_scores(self, can_delete_scores): + """Sets the can_delete_scores of this CollectionCapabilities. + + Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 + + :param can_delete_scores: The can_delete_scores of this CollectionCapabilities. # noqa: E501 + :type: bool + """ + + self._can_delete_scores = can_delete_scores + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index 0bdce61..3f45666 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,20 +32,24 @@ class CollectionCreation(object): and the value is json key in definition. """ openapi_types = { - 'title': 'str' + 'title': 'str', + 'privacy': 'CollectionPrivacy' } attribute_map = { - 'title': 'title' + 'title': 'title', + 'privacy': 'privacy' } - def __init__(self, title=None): # noqa: E501 + def __init__(self, title=None, privacy=None): # noqa: E501 """CollectionCreation - a model defined in OpenAPI""" # noqa: E501 self._title = None + self._privacy = None self.discriminator = None self.title = title + self.privacy = privacy @property def title(self): @@ -76,6 +80,29 @@ def title(self, title): self._title = title + @property + def privacy(self): + """Gets the privacy of this CollectionCreation. # noqa: E501 + + + :return: The privacy of this CollectionCreation. # noqa: E501 + :rtype: CollectionPrivacy + """ + return self._privacy + + @privacy.setter + def privacy(self, privacy): + """Sets the privacy of this CollectionCreation. + + + :param privacy: The privacy of this CollectionCreation. # noqa: E501 + :type: CollectionPrivacy + """ + if privacy is None: + raise ValueError("Invalid value for `privacy`, must not be `None`") # noqa: E501 + + self._privacy = privacy + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index d9edb8b..c48b446 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,21 +32,26 @@ class CollectionModification(object): and the value is json key in definition. """ openapi_types = { - 'title': 'str' + 'title': 'str', + 'privacy': 'CollectionPrivacy' } attribute_map = { - 'title': 'title' + 'title': 'title', + 'privacy': 'privacy' } - def __init__(self, title=None): # noqa: E501 + def __init__(self, title=None, privacy=None): # noqa: E501 """CollectionModification - a model defined in OpenAPI""" # noqa: E501 self._title = None + self._privacy = None self.discriminator = None if title is not None: self.title = title + if privacy is not None: + self.privacy = privacy @property def title(self): @@ -75,6 +80,27 @@ def title(self, title): self._title = title + @property + def privacy(self): + """Gets the privacy of this CollectionModification. # noqa: E501 + + + :return: The privacy of this CollectionModification. # noqa: E501 + :rtype: CollectionPrivacy + """ + return self._privacy + + @privacy.setter + def privacy(self, privacy): + """Sets the privacy of this CollectionModification. + + + :param privacy: The privacy of this CollectionModification. # noqa: E501 + :type: CollectionPrivacy + """ + + self._privacy = privacy + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index d0df678..30da491 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index f71201f..32b9c2c 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -31,6 +31,7 @@ class CollectionType(object): REGULAR = "regular" SHAREDWITHME = "sharedWithMe" SHAREDWITHGROUP = "sharedWithGroup" + APP = "app" TRASH = "trash" """ diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index e94cc2f..9911ce5 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py index 790baaf..c9d6041 100644 --- a/flat_api/models/flat_locales.py +++ b/flat_api/models/flat_locales.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -28,17 +28,22 @@ class FlatLocales(object): allowed enum values """ EN = "en" + EN_GB = "en-GB" ES = "es" FR = "fr" DE = "de" IT = "it" JA = "ja" + JA_HIRA = "ja-HIRA" KO = "ko" NL = "nl" PL = "pl" PT = "pt" + PT_BR = "pt-BR" RO = "ro" RU = "ru" + SV = "sv" + TR = "tr" ZH_HANS = "zh-Hans" """ diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index f933474..c19eb4f 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -34,21 +34,24 @@ class GoogleClassroomCoursework(object): openapi_types = { 'id': 'str', 'state': 'str', - 'alternate_link': 'str' + 'alternate_link': 'str', + 'topic_id': 'str' } attribute_map = { 'id': 'id', 'state': 'state', - 'alternate_link': 'alternateLink' + 'alternate_link': 'alternateLink', + 'topic_id': 'topicId' } - def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, state=None, alternate_link=None, topic_id=None): # noqa: E501 """GoogleClassroomCoursework - a model defined in OpenAPI""" # noqa: E501 self._id = None self._state = None self._alternate_link = None + self._topic_id = None self.discriminator = None if id is not None: @@ -57,6 +60,7 @@ def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 self.state = state if alternate_link is not None: self.alternate_link = alternate_link + self.topic_id = topic_id @property def id(self): @@ -127,6 +131,29 @@ def alternate_link(self, alternate_link): self._alternate_link = alternate_link + @property + def topic_id(self): + """Gets the topic_id of this GoogleClassroomCoursework. # noqa: E501 + + Identifier of the topic where the assignment is created # noqa: E501 + + :return: The topic_id of this GoogleClassroomCoursework. # noqa: E501 + :rtype: str + """ + return self._topic_id + + @topic_id.setter + def topic_id(self, topic_id): + """Sets the topic_id of this GoogleClassroomCoursework. + + Identifier of the topic where the assignment is created # noqa: E501 + + :param topic_id: The topic_id of this GoogleClassroomCoursework. # noqa: E501 + :type: str + """ + + self._topic_id = topic_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index 63522ee..07cdb3e 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/group.py b/flat_api/models/group.py index 8dec689..e3ce0ee 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index 8c06241..f8ce523 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index f0eb433..32e303b 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index be97ad2..158d3c6 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index f42a1cb..6acd241 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,6 +32,7 @@ class LicenseSources(object): VOUCHER = "voucher" DISTRIBUTOR = "distributor" SUBSCRIPTION = "subscription" + APPSTORE = "appStore" """ Attributes: diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index 4637840..1229411 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index 386531b..50c981e 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index 22ef472..a31c1bd 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index 351a271..3ffa8a4 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -35,8 +35,10 @@ class MediaAttachment(object): 'type': 'str', 'score': 'str', 'revision': 'str', - 'correct': 'bool', + 'worksheet': 'str', + 'track': 'str', 'sharing_mode': 'MediaScoreSharingMode', + 'lock_score_template': 'bool', 'title': 'str', 'description': 'str', 'html': 'str', @@ -44,18 +46,23 @@ class MediaAttachment(object): 'html_height': 'str', 'url': 'str', 'thumbnail_url': 'str', - 'thumbnail_width': 'str', - 'thumbnail_height': 'str', + 'thumbnail_width': 'int', + 'thumbnail_height': 'int', 'author_name': 'str', - 'author_url': 'str' + 'author_url': 'str', + 'icon_url': 'str', + 'mime_type': 'str', + 'google_drive_file_id': 'str' } attribute_map = { 'type': 'type', 'score': 'score', 'revision': 'revision', - 'correct': 'correct', + 'worksheet': 'worksheet', + 'track': 'track', 'sharing_mode': 'sharingMode', + 'lock_score_template': 'lockScoreTemplate', 'title': 'title', 'description': 'description', 'html': 'html', @@ -66,17 +73,22 @@ class MediaAttachment(object): 'thumbnail_width': 'thumbnailWidth', 'thumbnail_height': 'thumbnailHeight', 'author_name': 'authorName', - 'author_url': 'authorUrl' + 'author_url': 'authorUrl', + 'icon_url': 'iconUrl', + 'mime_type': 'mimeType', + 'google_drive_file_id': 'googleDriveFileId' } - def __init__(self, type=None, score=None, revision=None, correct=None, sharing_mode=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None): # noqa: E501 + def __init__(self, type=None, score=None, revision=None, worksheet=None, track=None, sharing_mode=None, lock_score_template=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None, icon_url=None, mime_type=None, google_drive_file_id=None): # noqa: E501 """MediaAttachment - a model defined in OpenAPI""" # noqa: E501 self._type = None self._score = None self._revision = None - self._correct = None + self._worksheet = None + self._track = None self._sharing_mode = None + self._lock_score_template = None self._title = None self._description = None self._html = None @@ -88,6 +100,9 @@ def __init__(self, type=None, score=None, revision=None, correct=None, sharing_m self._thumbnail_height = None self._author_name = None self._author_url = None + self._icon_url = None + self._mime_type = None + self._google_drive_file_id = None self.discriminator = None if type is not None: @@ -96,10 +111,14 @@ def __init__(self, type=None, score=None, revision=None, correct=None, sharing_m self.score = score if revision is not None: self.revision = revision - if correct is not None: - self.correct = correct + if worksheet is not None: + self.worksheet = worksheet + if track is not None: + self.track = track if sharing_mode is not None: self.sharing_mode = sharing_mode + if lock_score_template is not None: + self.lock_score_template = lock_score_template if title is not None: self.title = title if description is not None: @@ -122,6 +141,12 @@ def __init__(self, type=None, score=None, revision=None, correct=None, sharing_m self.author_name = author_name if author_url is not None: self.author_url = author_url + if icon_url is not None: + self.icon_url = icon_url + if mime_type is not None: + self.mime_type = mime_type + if google_drive_file_id is not None: + self.google_drive_file_id = google_drive_file_id @property def type(self): @@ -143,7 +168,7 @@ def type(self, type): :param type: The type of this MediaAttachment. # noqa: E501 :type: str """ - allowed_values = ["rich", "photo", "video", "link", "flat", "exercise"] # noqa: E501 + allowed_values = ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 @@ -199,27 +224,50 @@ def revision(self, revision): self._revision = revision @property - def correct(self): - """Gets the correct of this MediaAttachment. # noqa: E501 + def worksheet(self): + """Gets the worksheet of this MediaAttachment. # noqa: E501 - If the attachment is an exercise question, this state will describe if it is correct or not.For exercise assignments only. # noqa: E501 + An unique worksheet identifier # noqa: E501 - :return: The correct of this MediaAttachment. # noqa: E501 - :rtype: bool + :return: The worksheet of this MediaAttachment. # noqa: E501 + :rtype: str """ - return self._correct + return self._worksheet - @correct.setter - def correct(self, correct): - """Sets the correct of this MediaAttachment. + @worksheet.setter + def worksheet(self, worksheet): + """Sets the worksheet of this MediaAttachment. - If the attachment is an exercise question, this state will describe if it is correct or not.For exercise assignments only. # noqa: E501 + An unique worksheet identifier # noqa: E501 - :param correct: The correct of this MediaAttachment. # noqa: E501 - :type: bool + :param worksheet: The worksheet of this MediaAttachment. # noqa: E501 + :type: str """ - self._correct = correct + self._worksheet = worksheet + + @property + def track(self): + """Gets the track of this MediaAttachment. # noqa: E501 + + A unique track identifier # noqa: E501 + + :return: The track of this MediaAttachment. # noqa: E501 + :rtype: str + """ + return self._track + + @track.setter + def track(self, track): + """Sets the track of this MediaAttachment. + + A unique track identifier # noqa: E501 + + :param track: The track of this MediaAttachment. # noqa: E501 + :type: str + """ + + self._track = track @property def sharing_mode(self): @@ -242,6 +290,29 @@ def sharing_mode(self, sharing_mode): self._sharing_mode = sharing_mode + @property + def lock_score_template(self): + """Gets the lock_score_template of this MediaAttachment. # noqa: E501 + + To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 + + :return: The lock_score_template of this MediaAttachment. # noqa: E501 + :rtype: bool + """ + return self._lock_score_template + + @lock_score_template.setter + def lock_score_template(self, lock_score_template): + """Sets the lock_score_template of this MediaAttachment. + + To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 + + :param lock_score_template: The lock_score_template of this MediaAttachment. # noqa: E501 + :type: bool + """ + + self._lock_score_template = lock_score_template + @property def title(self): """Gets the title of this MediaAttachment. # noqa: E501 @@ -410,7 +481,7 @@ def thumbnail_width(self): If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 :return: The thumbnail_width of this MediaAttachment. # noqa: E501 - :rtype: str + :rtype: int """ return self._thumbnail_width @@ -421,7 +492,7 @@ def thumbnail_width(self, thumbnail_width): If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 :param thumbnail_width: The thumbnail_width of this MediaAttachment. # noqa: E501 - :type: str + :type: int """ self._thumbnail_width = thumbnail_width @@ -433,7 +504,7 @@ def thumbnail_height(self): If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 :return: The thumbnail_height of this MediaAttachment. # noqa: E501 - :rtype: str + :rtype: int """ return self._thumbnail_height @@ -444,7 +515,7 @@ def thumbnail_height(self, thumbnail_height): If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 :param thumbnail_height: The thumbnail_height of this MediaAttachment. # noqa: E501 - :type: str + :type: int """ self._thumbnail_height = thumbnail_height @@ -495,6 +566,75 @@ def author_url(self, author_url): self._author_url = author_url + @property + def icon_url(self): + """Gets the icon_url of this MediaAttachment. # noqa: E501 + + The URL of the icon # noqa: E501 + + :return: The icon_url of this MediaAttachment. # noqa: E501 + :rtype: str + """ + return self._icon_url + + @icon_url.setter + def icon_url(self, icon_url): + """Sets the icon_url of this MediaAttachment. + + The URL of the icon # noqa: E501 + + :param icon_url: The icon_url of this MediaAttachment. # noqa: E501 + :type: str + """ + + self._icon_url = icon_url + + @property + def mime_type(self): + """Gets the mime_type of this MediaAttachment. # noqa: E501 + + The mine type of the file # noqa: E501 + + :return: The mime_type of this MediaAttachment. # noqa: E501 + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """Sets the mime_type of this MediaAttachment. + + The mine type of the file # noqa: E501 + + :param mime_type: The mime_type of this MediaAttachment. # noqa: E501 + :type: str + """ + + self._mime_type = mime_type + + @property + def google_drive_file_id(self): + """Gets the google_drive_file_id of this MediaAttachment. # noqa: E501 + + The ID of the Google Drive File # noqa: E501 + + :return: The google_drive_file_id of this MediaAttachment. # noqa: E501 + :rtype: str + """ + return self._google_drive_file_id + + @google_drive_file_id.setter + def google_drive_file_id(self, google_drive_file_id): + """Sets the google_drive_file_id of this MediaAttachment. + + The ID of the Google Drive File # noqa: E501 + + :param google_drive_file_id: The google_drive_file_id of this MediaAttachment. # noqa: E501 + :type: str + """ + + self._google_drive_file_id = google_drive_file_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index d38ba3a..02e3897 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -30,6 +30,7 @@ class MediaScoreSharingMode(object): READ = "read" WRITE = "write" COPY = "copy" + PERFORMANCE = "performance" """ Attributes: diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py new file mode 100644 index 0000000..0487525 --- /dev/null +++ b/flat_api/models/microsoft_graph_assignment.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MicrosoftGraphAssignment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'state': 'str', + 'alternate_link': 'str', + 'categories': 'list[str]' + } + + attribute_map = { + 'id': 'id', + 'state': 'state', + 'alternate_link': 'alternateLink', + 'categories': 'categories' + } + + def __init__(self, id=None, state=None, alternate_link=None, categories=None): # noqa: E501 + """MicrosoftGraphAssignment - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._state = None + self._alternate_link = None + self._categories = None + self.discriminator = None + + if id is not None: + self.id = id + if state is not None: + self.state = state + if alternate_link is not None: + self.alternate_link = alternate_link + if categories is not None: + self.categories = categories + + @property + def id(self): + """Gets the id of this MicrosoftGraphAssignment. # noqa: E501 + + Identifier of the assignement assigned by Microsoft Teams # noqa: E501 + + :return: The id of this MicrosoftGraphAssignment. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MicrosoftGraphAssignment. + + Identifier of the assignement assigned by Microsoft Teams # noqa: E501 + + :param id: The id of this MicrosoftGraphAssignment. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def state(self): + """Gets the state of this MicrosoftGraphAssignment. # noqa: E501 + + State of the assignment # noqa: E501 + + :return: The state of this MicrosoftGraphAssignment. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this MicrosoftGraphAssignment. + + State of the assignment # noqa: E501 + + :param state: The state of this MicrosoftGraphAssignment. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def alternate_link(self): + """Gets the alternate_link of this MicrosoftGraphAssignment. # noqa: E501 + + Absolute link to this assignement in the Microsoft Teams web UI # noqa: E501 + + :return: The alternate_link of this MicrosoftGraphAssignment. # noqa: E501 + :rtype: str + """ + return self._alternate_link + + @alternate_link.setter + def alternate_link(self, alternate_link): + """Sets the alternate_link of this MicrosoftGraphAssignment. + + Absolute link to this assignement in the Microsoft Teams web UI # noqa: E501 + + :param alternate_link: The alternate_link of this MicrosoftGraphAssignment. # noqa: E501 + :type: str + """ + + self._alternate_link = alternate_link + + @property + def categories(self): + """Gets the categories of this MicrosoftGraphAssignment. # noqa: E501 + + List of categories where this assignment is published under # noqa: E501 + + :return: The categories of this MicrosoftGraphAssignment. # noqa: E501 + :rtype: list[str] + """ + return self._categories + + @categories.setter + def categories(self, categories): + """Sets the categories of this MicrosoftGraphAssignment. + + List of categories where this assignment is published under # noqa: E501 + + :param categories: The categories of this MicrosoftGraphAssignment. # noqa: E501 + :type: list[str] + """ + + self._categories = categories + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MicrosoftGraphAssignment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py new file mode 100644 index 0000000..319cbb8 --- /dev/null +++ b/flat_api/models/microsoft_graph_submission.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MicrosoftGraphSubmission(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'state': 'str', + 'alternate_link': 'str' + } + + attribute_map = { + 'id': 'id', + 'state': 'state', + 'alternate_link': 'alternateLink' + } + + def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 + """MicrosoftGraphSubmission - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._state = None + self._alternate_link = None + self.discriminator = None + + if id is not None: + self.id = id + if state is not None: + self.state = state + if alternate_link is not None: + self.alternate_link = alternate_link + + @property + def id(self): + """Gets the id of this MicrosoftGraphSubmission. # noqa: E501 + + Identifier of the submission assigned by Microsoft Teams # noqa: E501 + + :return: The id of this MicrosoftGraphSubmission. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MicrosoftGraphSubmission. + + Identifier of the submission assigned by Microsoft Teams # noqa: E501 + + :param id: The id of this MicrosoftGraphSubmission. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def state(self): + """Gets the state of this MicrosoftGraphSubmission. # noqa: E501 + + State of the submission # noqa: E501 + + :return: The state of this MicrosoftGraphSubmission. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this MicrosoftGraphSubmission. + + State of the submission # noqa: E501 + + :param state: The state of this MicrosoftGraphSubmission. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def alternate_link(self): + """Gets the alternate_link of this MicrosoftGraphSubmission. # noqa: E501 + + Absolute link to this submission in the Microsoft Teams web UI # noqa: E501 + + :return: The alternate_link of this MicrosoftGraphSubmission. # noqa: E501 + :rtype: str + """ + return self._alternate_link + + @alternate_link.setter + def alternate_link(self, alternate_link): + """Sets the alternate_link of this MicrosoftGraphSubmission. + + Absolute link to this submission in the Microsoft Teams web UI # noqa: E501 + + :param alternate_link: The alternate_link of this MicrosoftGraphSubmission. # noqa: E501 + :type: str + """ + + self._alternate_link = alternate_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MicrosoftGraphSubmission): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index e6d9702..ddcb1ee 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index 028b2c0..a4a2e94 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index 578fbfa..3703892 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py new file mode 100644 index 0000000..df26fa2 --- /dev/null +++ b/flat_api/models/organization_user_access_token_creation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OrganizationUserAccessTokenCreation(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'scopes': 'list[AppScopes]' + } + + attribute_map = { + 'scopes': 'scopes' + } + + def __init__(self, scopes=None): # noqa: E501 + """OrganizationUserAccessTokenCreation - a model defined in OpenAPI""" # noqa: E501 + + self._scopes = None + self.discriminator = None + + self.scopes = scopes + + @property + def scopes(self): + """Gets the scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 + + List of requested scopes for this credential # noqa: E501 + + :return: The scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 + :rtype: list[AppScopes] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this OrganizationUserAccessTokenCreation. + + List of requested scopes for this credential # noqa: E501 + + :param scopes: The scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 + :type: list[AppScopes] + """ + if scopes is None: + raise ValueError("Invalid value for `scopes`, must not be `None`") # noqa: E501 + + self._scopes = scopes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationUserAccessTokenCreation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/organization_user_signin_link.py b/flat_api/models/organization_user_signin_link.py new file mode 100644 index 0000000..5c6ff53 --- /dev/null +++ b/flat_api/models/organization_user_signin_link.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OrganizationUserSigninLink(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'url': 'str', + 'expiration_date': 'datetime' + } + + attribute_map = { + 'url': 'url', + 'expiration_date': 'expirationDate' + } + + def __init__(self, url=None, expiration_date=None): # noqa: E501 + """OrganizationUserSigninLink - a model defined in OpenAPI""" # noqa: E501 + + self._url = None + self._expiration_date = None + self.discriminator = None + + if url is not None: + self.url = url + if expiration_date is not None: + self.expiration_date = expiration_date + + @property + def url(self): + """Gets the url of this OrganizationUserSigninLink. # noqa: E501 + + URL to use to sign in to this account # noqa: E501 + + :return: The url of this OrganizationUserSigninLink. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this OrganizationUserSigninLink. + + URL to use to sign in to this account # noqa: E501 + + :param url: The url of this OrganizationUserSigninLink. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def expiration_date(self): + """Gets the expiration_date of this OrganizationUserSigninLink. # noqa: E501 + + Date when the link expires # noqa: E501 + + :return: The expiration_date of this OrganizationUserSigninLink. # noqa: E501 + :rtype: datetime + """ + return self._expiration_date + + @expiration_date.setter + def expiration_date(self, expiration_date): + """Sets the expiration_date of this OrganizationUserSigninLink. + + Date when the link expires # noqa: E501 + + :param expiration_date: The expiration_date of this OrganizationUserSigninLink. # noqa: E501 + :type: datetime + """ + + self._expiration_date = expiration_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationUserSigninLink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/organization_user_signin_link_creation.py b/flat_api/models/organization_user_signin_link_creation.py new file mode 100644 index 0000000..7a29d20 --- /dev/null +++ b/flat_api/models/organization_user_signin_link_creation.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OrganizationUserSigninLinkCreation(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'destination_path': 'str' + } + + attribute_map = { + 'destination_path': 'destinationPath' + } + + def __init__(self, destination_path='/'): # noqa: E501 + """OrganizationUserSigninLinkCreation - a model defined in OpenAPI""" # noqa: E501 + + self._destination_path = None + self.discriminator = None + + if destination_path is not None: + self.destination_path = destination_path + + @property + def destination_path(self): + """Gets the destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 + + Path to redirect to after signin # noqa: E501 + + :return: The destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 + :rtype: str + """ + return self._destination_path + + @destination_path.setter + def destination_path(self, destination_path): + """Sets the destination_path of this OrganizationUserSigninLinkCreation. + + Path to redirect to after signin # noqa: E501 + + :param destination_path: The destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 + :type: str + """ + + self._destination_path = destination_path + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationUserSigninLinkCreation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index 5cecd56..d787d85 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,92 +32,207 @@ class ResourceCollaborator(object): and the value is json key in definition. """ openapi_types = { - 'id': 'str', - 'score': 'str', + 'acl_admin': 'bool', + 'is_collaborator': 'bool', + 'group': 'Group', + 'acl_write': 'bool', + 'invited': 'bool', + 'user_email': 'str', 'collection': 'str', + 'score': 'str', 'user': 'UserPublic', - 'group': 'Group', - 'user_email': 'str' + 'id': 'str', + 'acl_read': 'bool' } attribute_map = { - 'id': 'id', - 'score': 'score', + 'acl_admin': 'aclAdmin', + 'is_collaborator': 'isCollaborator', + 'group': 'group', + 'acl_write': 'aclWrite', + 'invited': 'invited', + 'user_email': 'userEmail', 'collection': 'collection', + 'score': 'score', 'user': 'user', - 'group': 'group', - 'user_email': 'userEmail' + 'id': 'id', + 'acl_read': 'aclRead' } - def __init__(self, id=None, score=None, collection=None, user=None, group=None, user_email=None): # noqa: E501 + def __init__(self, acl_admin=False, is_collaborator=False, group=None, acl_write=False, invited=None, user_email=None, collection=None, score=None, user=None, id=None, acl_read=False): # noqa: E501 """ResourceCollaborator - a model defined in OpenAPI""" # noqa: E501 - self._id = None - self._score = None - self._collection = None - self._user = None + self._acl_admin = None + self._is_collaborator = None self._group = None + self._acl_write = None + self._invited = None self._user_email = None + self._collection = None + self._score = None + self._user = None + self._id = None + self._acl_read = None self.discriminator = None - if id is not None: - self.id = id - if score is not None: - self.score = score - if collection is not None: - self.collection = collection - if user is not None: - self.user = user + if acl_admin is not None: + self.acl_admin = acl_admin + if is_collaborator is not None: + self.is_collaborator = is_collaborator if group is not None: self.group = group + if acl_write is not None: + self.acl_write = acl_write + if invited is not None: + self.invited = invited if user_email is not None: self.user_email = user_email + if collection is not None: + self.collection = collection + if score is not None: + self.score = score + if user is not None: + self.user = user + if id is not None: + self.id = id + if acl_read is not None: + self.acl_read = acl_read @property - def id(self): - """Gets the id of this ResourceCollaborator. # noqa: E501 + def acl_admin(self): + """Gets the acl_admin of this ResourceCollaborator. # noqa: E501 - The unique identifier of the permission # noqa: E501 + `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - :return: The id of this ResourceCollaborator. # noqa: E501 - :rtype: str + :return: The acl_admin of this ResourceCollaborator. # noqa: E501 + :rtype: bool """ - return self._id + return self._acl_admin - @id.setter - def id(self, id): - """Sets the id of this ResourceCollaborator. + @acl_admin.setter + def acl_admin(self, acl_admin): + """Sets the acl_admin of this ResourceCollaborator. - The unique identifier of the permission # noqa: E501 + `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - :param id: The id of this ResourceCollaborator. # noqa: E501 - :type: str + :param acl_admin: The acl_admin of this ResourceCollaborator. # noqa: E501 + :type: bool """ - self._id = id + self._acl_admin = acl_admin @property - def score(self): - """Gets the score of this ResourceCollaborator. # noqa: E501 + def is_collaborator(self): + """Gets the is_collaborator of this ResourceCollaborator. # noqa: E501 - If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 + `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 - :return: The score of this ResourceCollaborator. # noqa: E501 + :return: The is_collaborator of this ResourceCollaborator. # noqa: E501 + :rtype: bool + """ + return self._is_collaborator + + @is_collaborator.setter + def is_collaborator(self, is_collaborator): + """Sets the is_collaborator of this ResourceCollaborator. + + `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 + + :param is_collaborator: The is_collaborator of this ResourceCollaborator. # noqa: E501 + :type: bool + """ + + self._is_collaborator = is_collaborator + + @property + def group(self): + """Gets the group of this ResourceCollaborator. # noqa: E501 + + + :return: The group of this ResourceCollaborator. # noqa: E501 + :rtype: Group + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this ResourceCollaborator. + + + :param group: The group of this ResourceCollaborator. # noqa: E501 + :type: Group + """ + + self._group = group + + @property + def acl_write(self): + """Gets the acl_write of this ResourceCollaborator. # noqa: E501 + + `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 + + :return: The acl_write of this ResourceCollaborator. # noqa: E501 + :rtype: bool + """ + return self._acl_write + + @acl_write.setter + def acl_write(self, acl_write): + """Sets the acl_write of this ResourceCollaborator. + + `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 + + :param acl_write: The acl_write of this ResourceCollaborator. # noqa: E501 + :type: bool + """ + + self._acl_write = acl_write + + @property + def invited(self): + """Gets the invited of this ResourceCollaborator. # noqa: E501 + + If this property is `true`, this is still a pending invitation # noqa: E501 + + :return: The invited of this ResourceCollaborator. # noqa: E501 + :rtype: bool + """ + return self._invited + + @invited.setter + def invited(self, invited): + """Sets the invited of this ResourceCollaborator. + + If this property is `true`, this is still a pending invitation # noqa: E501 + + :param invited: The invited of this ResourceCollaborator. # noqa: E501 + :type: bool + """ + + self._invited = invited + + @property + def user_email(self): + """Gets the user_email of this ResourceCollaborator. # noqa: E501 + + If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 + + :return: The user_email of this ResourceCollaborator. # noqa: E501 :rtype: str """ - return self._score + return self._user_email - @score.setter - def score(self, score): - """Sets the score of this ResourceCollaborator. + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this ResourceCollaborator. - If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 + If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 - :param score: The score of this ResourceCollaborator. # noqa: E501 + :param user_email: The user_email of this ResourceCollaborator. # noqa: E501 :type: str """ - self._score = score + self._user_email = user_email @property def collection(self): @@ -142,6 +257,29 @@ def collection(self, collection): self._collection = collection + @property + def score(self): + """Gets the score of this ResourceCollaborator. # noqa: E501 + + If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 + + :return: The score of this ResourceCollaborator. # noqa: E501 + :rtype: str + """ + return self._score + + @score.setter + def score(self, score): + """Sets the score of this ResourceCollaborator. + + If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 + + :param score: The score of this ResourceCollaborator. # noqa: E501 + :type: str + """ + + self._score = score + @property def user(self): """Gets the user of this ResourceCollaborator. # noqa: E501 @@ -164,48 +302,50 @@ def user(self, user): self._user = user @property - def group(self): - """Gets the group of this ResourceCollaborator. # noqa: E501 + def id(self): + """Gets the id of this ResourceCollaborator. # noqa: E501 + The unique identifier of the permission # noqa: E501 - :return: The group of this ResourceCollaborator. # noqa: E501 - :rtype: Group + :return: The id of this ResourceCollaborator. # noqa: E501 + :rtype: str """ - return self._group + return self._id - @group.setter - def group(self, group): - """Sets the group of this ResourceCollaborator. + @id.setter + def id(self, id): + """Sets the id of this ResourceCollaborator. + The unique identifier of the permission # noqa: E501 - :param group: The group of this ResourceCollaborator. # noqa: E501 - :type: Group + :param id: The id of this ResourceCollaborator. # noqa: E501 + :type: str """ - self._group = group + self._id = id @property - def user_email(self): - """Gets the user_email of this ResourceCollaborator. # noqa: E501 + def acl_read(self): + """Gets the acl_read of this ResourceCollaborator. # noqa: E501 - If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 + `True` if the current user can read the current document # noqa: E501 - :return: The user_email of this ResourceCollaborator. # noqa: E501 - :rtype: str + :return: The acl_read of this ResourceCollaborator. # noqa: E501 + :rtype: bool """ - return self._user_email + return self._acl_read - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this ResourceCollaborator. + @acl_read.setter + def acl_read(self, acl_read): + """Sets the acl_read of this ResourceCollaborator. - If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 + `True` if the current user can read the current document # noqa: E501 - :param user_email: The user_email of this ResourceCollaborator. # noqa: E501 - :type: str + :param acl_read: The acl_read of this ResourceCollaborator. # noqa: E501 + :type: bool """ - self._user_email = user_email + self._acl_read = acl_read def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index f6a6f16..15c6f42 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index 0049ca5..9d5866e 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index 6b2ad78..e169d6d 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -46,6 +46,7 @@ class ScoreComment(object): 'mentions': 'list[str]', 'resolved': 'bool', 'resolved_by': 'str', + 'moderation': 'ScoreCommentModeration', 'spam': 'bool' } @@ -64,10 +65,11 @@ class ScoreComment(object): 'mentions': 'mentions', 'resolved': 'resolved', 'resolved_by': 'resolvedBy', + 'moderation': 'moderation', 'spam': 'spam' } - def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, spam=None): # noqa: E501 + def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, moderation=None, spam=None): # noqa: E501 """ScoreComment - a model defined in OpenAPI""" # noqa: E501 self._id = None @@ -84,6 +86,7 @@ def __init__(self, id=None, type=None, user=None, score=None, revision=None, rep self._mentions = None self._resolved = None self._resolved_by = None + self._moderation = None self._spam = None self.discriminator = None @@ -115,6 +118,8 @@ def __init__(self, id=None, type=None, user=None, score=None, revision=None, rep self.resolved = resolved if resolved_by is not None: self.resolved_by = resolved_by + if moderation is not None: + self.moderation = moderation if spam is not None: self.spam = spam @@ -444,6 +449,27 @@ def resolved_by(self, resolved_by): self._resolved_by = resolved_by + @property + def moderation(self): + """Gets the moderation of this ScoreComment. # noqa: E501 + + + :return: The moderation of this ScoreComment. # noqa: E501 + :rtype: ScoreCommentModeration + """ + return self._moderation + + @moderation.setter + def moderation(self, moderation): + """Sets the moderation of this ScoreComment. + + + :param moderation: The moderation of this ScoreComment. # noqa: E501 + :type: ScoreCommentModeration + """ + + self._moderation = moderation + @property def spam(self): """Gets the spam of this ScoreComment. # noqa: E501 diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index 8cc4e45..ec1d58b 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index e6f45d5..b032bb3 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py new file mode 100644 index 0000000..4699226 --- /dev/null +++ b/flat_api/models/score_comment_moderation.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScoreCommentModeration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'hidden': 'bool', + 'reason': 'str' + } + + attribute_map = { + 'hidden': 'hidden', + 'reason': 'reason' + } + + def __init__(self, hidden=None, reason=None): # noqa: E501 + """ScoreCommentModeration - a model defined in OpenAPI""" # noqa: E501 + + self._hidden = None + self._reason = None + self.discriminator = None + + if hidden is not None: + self.hidden = hidden + if reason is not None: + self.reason = reason + + @property + def hidden(self): + """Gets the hidden of this ScoreCommentModeration. # noqa: E501 + + If true, this comment will be hidden from other users # noqa: E501 + + :return: The hidden of this ScoreCommentModeration. # noqa: E501 + :rtype: bool + """ + return self._hidden + + @hidden.setter + def hidden(self, hidden): + """Sets the hidden of this ScoreCommentModeration. + + If true, this comment will be hidden from other users # noqa: E501 + + :param hidden: The hidden of this ScoreCommentModeration. # noqa: E501 + :type: bool + """ + + self._hidden = hidden + + @property + def reason(self): + """Gets the reason of this ScoreCommentModeration. # noqa: E501 + + If the comment is hidden, the reason why this one has been moderated # noqa: E501 + + :return: The reason of this ScoreCommentModeration. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this ScoreCommentModeration. + + If the comment is hidden, the reason why this one has been moderated # noqa: E501 + + :param reason: The reason of this ScoreCommentModeration. # noqa: E501 + :type: str + """ + allowed_values = ["spam", "inappropriate"] # noqa: E501 + if reason not in allowed_values: + raise ValueError( + "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 + .format(reason, allowed_values) + ) + + self._reason = reason + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScoreCommentModeration): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index 9d5886a..e14e6f6 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index 4dd9d71..7afafbd 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -67,7 +67,7 @@ def __init__(self, total=None, unique=None, weekly=None, monthly=None): # noqa: def total(self): """Gets the total of this ScoreCommentsCounts. # noqa: E501 - The total number of comments added on the score # noqa: E501 + The total number of comments added to the score # noqa: E501 :return: The total of this ScoreCommentsCounts. # noqa: E501 :rtype: float @@ -78,7 +78,7 @@ def total(self): def total(self, total): """Sets the total of this ScoreCommentsCounts. - The total number of comments added on the score # noqa: E501 + The total number of comments added to the score # noqa: E501 :param total: The total of this ScoreCommentsCounts. # noqa: E501 :type: float @@ -90,7 +90,7 @@ def total(self, total): def unique(self): """Gets the unique of this ScoreCommentsCounts. # noqa: E501 - The unique (1/user) number of comments added on the score # noqa: E501 + The unique (1/user) number of comments added to the score # noqa: E501 :return: The unique of this ScoreCommentsCounts. # noqa: E501 :rtype: float @@ -101,7 +101,7 @@ def unique(self): def unique(self, unique): """Sets the unique of this ScoreCommentsCounts. - The unique (1/user) number of comments added on the score # noqa: E501 + The unique (1/user) number of comments added to the score # noqa: E501 :param unique: The unique of this ScoreCommentsCounts. # noqa: E501 :type: float @@ -113,7 +113,7 @@ def unique(self, unique): def weekly(self): """Gets the weekly of this ScoreCommentsCounts. # noqa: E501 - The weekly unique number of comments added on the score # noqa: E501 + The weekly unique number of comments added to the score # noqa: E501 :return: The weekly of this ScoreCommentsCounts. # noqa: E501 :rtype: float @@ -124,7 +124,7 @@ def weekly(self): def weekly(self, weekly): """Sets the weekly of this ScoreCommentsCounts. - The weekly unique number of comments added on the score # noqa: E501 + The weekly unique number of comments added to the score # noqa: E501 :param weekly: The weekly of this ScoreCommentsCounts. # noqa: E501 :type: float @@ -136,7 +136,7 @@ def weekly(self, weekly): def monthly(self): """Gets the monthly of this ScoreCommentsCounts. # noqa: E501 - The monthly unique number of comments added on the score # noqa: E501 + The monthly unique number of comments added to the score # noqa: E501 :return: The monthly of this ScoreCommentsCounts. # noqa: E501 :rtype: float @@ -147,7 +147,7 @@ def monthly(self): def monthly(self, monthly): """Sets the monthly of this ScoreCommentsCounts. - The monthly unique number of comments added on the score # noqa: E501 + The monthly unique number of comments added to the score # noqa: E501 :param monthly: The monthly of this ScoreCommentsCounts. # noqa: E501 :type: float diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index 3da2e40..ab71f21 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,101 +32,113 @@ class ScoreCreation(object): and the value is json key in definition. """ openapi_types = { + 'data_encoding': 'str', 'title': 'str', - 'filename': 'str', 'privacy': 'ScorePrivacy', - 'data': 'str', - 'data_encoding': 'ScoreDataEncoding', + 'builder_data': 'ScoreCreationBuilderData', + 'filename': 'str', 'source': 'ScoreSource', 'collection': 'str', + 'data': 'str', 'google_drive_folder': 'str' } attribute_map = { + 'data_encoding': 'dataEncoding', 'title': 'title', - 'filename': 'filename', 'privacy': 'privacy', - 'data': 'data', - 'data_encoding': 'dataEncoding', + 'builder_data': 'builderData', + 'filename': 'filename', 'source': 'source', 'collection': 'collection', + 'data': 'data', 'google_drive_folder': 'googleDriveFolder' } - def __init__(self, title=None, filename=None, privacy=None, data=None, data_encoding=None, source=None, collection=None, google_drive_folder=None): # noqa: E501 + def __init__(self, data_encoding=None, title=None, privacy=None, builder_data=None, filename=None, source=None, collection=None, data=None, google_drive_folder=None): # noqa: E501 """ScoreCreation - a model defined in OpenAPI""" # noqa: E501 + self._data_encoding = None self._title = None - self._filename = None self._privacy = None - self._data = None - self._data_encoding = None + self._builder_data = None + self._filename = None self._source = None self._collection = None + self._data = None self._google_drive_folder = None self.discriminator = None + if data_encoding is not None: + self.data_encoding = data_encoding if title is not None: self.title = title + if privacy is not None: + self.privacy = privacy + if builder_data is not None: + self.builder_data = builder_data if filename is not None: self.filename = filename - self.privacy = privacy - if data is not None: - self.data = data - if data_encoding is not None: - self.data_encoding = data_encoding if source is not None: self.source = source if collection is not None: self.collection = collection + if data is not None: + self.data = data if google_drive_folder is not None: self.google_drive_folder = google_drive_folder @property - def title(self): - """Gets the title of this ScoreCreation. # noqa: E501 + def data_encoding(self): + """Gets the data_encoding of this ScoreCreation. # noqa: E501 - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 + The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - :return: The title of this ScoreCreation. # noqa: E501 + :return: The data_encoding of this ScoreCreation. # noqa: E501 :rtype: str """ - return self._title + return self._data_encoding - @title.setter - def title(self, title): - """Sets the title of this ScoreCreation. + @data_encoding.setter + def data_encoding(self, data_encoding): + """Sets the data_encoding of this ScoreCreation. - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 + The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - :param title: The title of this ScoreCreation. # noqa: E501 + :param data_encoding: The data_encoding of this ScoreCreation. # noqa: E501 :type: str """ + allowed_values = ["base64"] # noqa: E501 + if data_encoding not in allowed_values: + raise ValueError( + "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 + .format(data_encoding, allowed_values) + ) - self._title = title + self._data_encoding = data_encoding @property - def filename(self): - """Gets the filename of this ScoreCreation. # noqa: E501 + def title(self): + """Gets the title of this ScoreCreation. # noqa: E501 - If this is an imported file, its filename # noqa: E501 + The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 - :return: The filename of this ScoreCreation. # noqa: E501 + :return: The title of this ScoreCreation. # noqa: E501 :rtype: str """ - return self._filename + return self._title - @filename.setter - def filename(self, filename): - """Sets the filename of this ScoreCreation. + @title.setter + def title(self, title): + """Sets the title of this ScoreCreation. - If this is an imported file, its filename # noqa: E501 + The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 - :param filename: The filename of this ScoreCreation. # noqa: E501 + :param title: The title of this ScoreCreation. # noqa: E501 :type: str """ - self._filename = filename + self._title = title @property def privacy(self): @@ -146,54 +158,52 @@ def privacy(self, privacy): :param privacy: The privacy of this ScoreCreation. # noqa: E501 :type: ScorePrivacy """ - if privacy is None: - raise ValueError("Invalid value for `privacy`, must not be `None`") # noqa: E501 self._privacy = privacy @property - def data(self): - """Gets the data of this ScoreCreation. # noqa: E501 + def builder_data(self): + """Gets the builder_data of this ScoreCreation. # noqa: E501 - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - :return: The data of this ScoreCreation. # noqa: E501 - :rtype: str + :return: The builder_data of this ScoreCreation. # noqa: E501 + :rtype: ScoreCreationBuilderData """ - return self._data + return self._builder_data - @data.setter - def data(self, data): - """Sets the data of this ScoreCreation. + @builder_data.setter + def builder_data(self, builder_data): + """Sets the builder_data of this ScoreCreation. - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - :param data: The data of this ScoreCreation. # noqa: E501 - :type: str + :param builder_data: The builder_data of this ScoreCreation. # noqa: E501 + :type: ScoreCreationBuilderData """ - self._data = data + self._builder_data = builder_data @property - def data_encoding(self): - """Gets the data_encoding of this ScoreCreation. # noqa: E501 + def filename(self): + """Gets the filename of this ScoreCreation. # noqa: E501 + If this is an imported file, its filename # noqa: E501 - :return: The data_encoding of this ScoreCreation. # noqa: E501 - :rtype: ScoreDataEncoding + :return: The filename of this ScoreCreation. # noqa: E501 + :rtype: str """ - return self._data_encoding + return self._filename - @data_encoding.setter - def data_encoding(self, data_encoding): - """Sets the data_encoding of this ScoreCreation. + @filename.setter + def filename(self, filename): + """Sets the filename of this ScoreCreation. + If this is an imported file, its filename # noqa: E501 - :param data_encoding: The data_encoding of this ScoreCreation. # noqa: E501 - :type: ScoreDataEncoding + :param filename: The filename of this ScoreCreation. # noqa: E501 + :type: str """ - self._data_encoding = data_encoding + self._filename = filename @property def source(self): @@ -239,6 +249,29 @@ def collection(self, collection): self._collection = collection + @property + def data(self): + """Gets the data of this ScoreCreation. # noqa: E501 + + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 + + :return: The data of this ScoreCreation. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ScoreCreation. + + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 + + :param data: The data of this ScoreCreation. # noqa: E501 + :type: str + """ + + self._data = data + @property def google_drive_folder(self): """Gets the google_drive_folder of this ScoreCreation. # noqa: E501 diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py new file mode 100644 index 0000000..6e72814 --- /dev/null +++ b/flat_api/models/score_creation_builder_data.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScoreCreationBuilderData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'score_data': 'ScoreCreationBuilderDataScoreData', + 'layout_data': 'ScoreCreationBuilderDataLayoutData' + } + + attribute_map = { + 'score_data': 'scoreData', + 'layout_data': 'layoutData' + } + + def __init__(self, score_data=None, layout_data=None): # noqa: E501 + """ScoreCreationBuilderData - a model defined in OpenAPI""" # noqa: E501 + + self._score_data = None + self._layout_data = None + self.discriminator = None + + if score_data is not None: + self.score_data = score_data + if layout_data is not None: + self.layout_data = layout_data + + @property + def score_data(self): + """Gets the score_data of this ScoreCreationBuilderData. # noqa: E501 + + + :return: The score_data of this ScoreCreationBuilderData. # noqa: E501 + :rtype: ScoreCreationBuilderDataScoreData + """ + return self._score_data + + @score_data.setter + def score_data(self, score_data): + """Sets the score_data of this ScoreCreationBuilderData. + + + :param score_data: The score_data of this ScoreCreationBuilderData. # noqa: E501 + :type: ScoreCreationBuilderDataScoreData + """ + + self._score_data = score_data + + @property + def layout_data(self): + """Gets the layout_data of this ScoreCreationBuilderData. # noqa: E501 + + + :return: The layout_data of this ScoreCreationBuilderData. # noqa: E501 + :rtype: ScoreCreationBuilderDataLayoutData + """ + return self._layout_data + + @layout_data.setter + def layout_data(self, layout_data): + """Sets the layout_data of this ScoreCreationBuilderData. + + + :param layout_data: The layout_data of this ScoreCreationBuilderData. # noqa: E501 + :type: ScoreCreationBuilderDataLayoutData + """ + + self._layout_data = layout_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScoreCreationBuilderData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_creation_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_layout_data.py new file mode 100644 index 0000000..0457f37 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_layout_data.py @@ -0,0 +1,317 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScoreCreationBuilderDataLayoutData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'notes_spacing_coeff': 'float', + 'length_unit': 'str', + 'page_height': 'float', + 'page_width': 'float', + 'page_margin_top': 'float', + 'page_margin_bottom': 'float', + 'page_margin_left': 'float', + 'page_margin_right': 'float' + } + + attribute_map = { + 'notes_spacing_coeff': 'notesSpacingCoeff', + 'length_unit': 'lengthUnit', + 'page_height': 'pageHeight', + 'page_width': 'pageWidth', + 'page_margin_top': 'pageMarginTop', + 'page_margin_bottom': 'pageMarginBottom', + 'page_margin_left': 'pageMarginLeft', + 'page_margin_right': 'pageMarginRight' + } + + def __init__(self, notes_spacing_coeff=None, length_unit='cm', page_height=None, page_width=None, page_margin_top=None, page_margin_bottom=None, page_margin_left=None, page_margin_right=None): # noqa: E501 + """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI""" # noqa: E501 + + self._notes_spacing_coeff = None + self._length_unit = None + self._page_height = None + self._page_width = None + self._page_margin_top = None + self._page_margin_bottom = None + self._page_margin_left = None + self._page_margin_right = None + self.discriminator = None + + if notes_spacing_coeff is not None: + self.notes_spacing_coeff = notes_spacing_coeff + if length_unit is not None: + self.length_unit = length_unit + if page_height is not None: + self.page_height = page_height + if page_width is not None: + self.page_width = page_width + if page_margin_top is not None: + self.page_margin_top = page_margin_top + if page_margin_bottom is not None: + self.page_margin_bottom = page_margin_bottom + if page_margin_left is not None: + self.page_margin_left = page_margin_left + if page_margin_right is not None: + self.page_margin_right = page_margin_right + + @property + def notes_spacing_coeff(self): + """Gets the notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + A float value >= 1 that controls the spacing between notes. # noqa: E501 + + :return: The notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._notes_spacing_coeff + + @notes_spacing_coeff.setter + def notes_spacing_coeff(self, notes_spacing_coeff): + """Sets the notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. + + A float value >= 1 that controls the spacing between notes. # noqa: E501 + + :param notes_spacing_coeff: The notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._notes_spacing_coeff = notes_spacing_coeff + + @property + def length_unit(self): + """Gets the length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The unit to use for layout customizations # noqa: E501 + + :return: The length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: str + """ + return self._length_unit + + @length_unit.setter + def length_unit(self, length_unit): + """Sets the length_unit of this ScoreCreationBuilderDataLayoutData. + + The unit to use for layout customizations # noqa: E501 + + :param length_unit: The length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: str + """ + allowed_values = ["cm", "inch"] # noqa: E501 + if length_unit not in allowed_values: + raise ValueError( + "Invalid value for `length_unit` ({0}), must be one of {1}" # noqa: E501 + .format(length_unit, allowed_values) + ) + + self._length_unit = length_unit + + @property + def page_height(self): + """Gets the page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The height of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_height + + @page_height.setter + def page_height(self, page_height): + """Sets the page_height of this ScoreCreationBuilderDataLayoutData. + + The height of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_height: The page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_height = page_height + + @property + def page_width(self): + """Gets the page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The width of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_width + + @page_width.setter + def page_width(self, page_width): + """Sets the page_width of this ScoreCreationBuilderDataLayoutData. + + The width of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_width: The page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_width = page_width + + @property + def page_margin_top(self): + """Gets the page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The top margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_margin_top + + @page_margin_top.setter + def page_margin_top(self, page_margin_top): + """Sets the page_margin_top of this ScoreCreationBuilderDataLayoutData. + + The top margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_margin_top: The page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_margin_top = page_margin_top + + @property + def page_margin_bottom(self): + """Gets the page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The bottom margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_margin_bottom + + @page_margin_bottom.setter + def page_margin_bottom(self, page_margin_bottom): + """Sets the page_margin_bottom of this ScoreCreationBuilderDataLayoutData. + + The bottom margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_margin_bottom: The page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_margin_bottom = page_margin_bottom + + @property + def page_margin_left(self): + """Gets the page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The left margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_margin_left + + @page_margin_left.setter + def page_margin_left(self, page_margin_left): + """Sets the page_margin_left of this ScoreCreationBuilderDataLayoutData. + + The left margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_margin_left: The page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_margin_left = page_margin_left + + @property + def page_margin_right(self): + """Gets the page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + + The right margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :return: The page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :rtype: float + """ + return self._page_margin_right + + @page_margin_right.setter + def page_margin_right(self, page_margin_right): + """Sets the page_margin_right of this ScoreCreationBuilderDataLayoutData. + + The right margin of the page in chosen unit (`lengthUnit`). # noqa: E501 + + :param page_margin_right: The page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 + :type: float + """ + + self._page_margin_right = page_margin_right + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScoreCreationBuilderDataLayoutData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_creation_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_score_data.py new file mode 100644 index 0000000..959a898 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_score_data.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScoreCreationBuilderDataScoreData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'use_tab_staff': 'bool', + 'use_chord_grid': 'bool', + 'fifths': 'float', + 'nb_beats': 'float', + 'beat_type': 'float', + 'instruments': 'list[ScoreCreationBuilderDataScoreDataInstruments]' + } + + attribute_map = { + 'use_tab_staff': 'useTabStaff', + 'use_chord_grid': 'useChordGrid', + 'fifths': 'fifths', + 'nb_beats': 'nbBeats', + 'beat_type': 'beatType', + 'instruments': 'instruments' + } + + def __init__(self, use_tab_staff=None, use_chord_grid=None, fifths=None, nb_beats=None, beat_type=None, instruments=None): # noqa: E501 + """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI""" # noqa: E501 + + self._use_tab_staff = None + self._use_chord_grid = None + self._fifths = None + self._nb_beats = None + self._beat_type = None + self._instruments = None + self.discriminator = None + + if use_tab_staff is not None: + self.use_tab_staff = use_tab_staff + if use_chord_grid is not None: + self.use_chord_grid = use_chord_grid + if fifths is not None: + self.fifths = fifths + if nb_beats is not None: + self.nb_beats = nb_beats + if beat_type is not None: + self.beat_type = beat_type + if instruments is not None: + self.instruments = instruments + + @property + def use_tab_staff(self): + """Gets the use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + true if the TAB staff is displayed with fretted instruments # noqa: E501 + + :return: The use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: bool + """ + return self._use_tab_staff + + @use_tab_staff.setter + def use_tab_staff(self, use_tab_staff): + """Sets the use_tab_staff of this ScoreCreationBuilderDataScoreData. + + true if the TAB staff is displayed with fretted instruments # noqa: E501 + + :param use_tab_staff: The use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: bool + """ + + self._use_tab_staff = use_tab_staff + + @property + def use_chord_grid(self): + """Gets the use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + true if the chord grid must be displayed with fretted instruments # noqa: E501 + + :return: The use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: bool + """ + return self._use_chord_grid + + @use_chord_grid.setter + def use_chord_grid(self, use_chord_grid): + """Sets the use_chord_grid of this ScoreCreationBuilderDataScoreData. + + true if the chord grid must be displayed with fretted instruments # noqa: E501 + + :param use_chord_grid: The use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: bool + """ + + self._use_chord_grid = use_chord_grid + + @property + def fifths(self): + """Gets the fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. # noqa: E501 + + :return: The fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: float + """ + return self._fifths + + @fifths.setter + def fifths(self, fifths): + """Sets the fifths of this ScoreCreationBuilderDataScoreData. + + The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. # noqa: E501 + + :param fifths: The fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: float + """ + + self._fifths = fifths + + @property + def nb_beats(self): + """Gets the nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + The number of beats in the measure # noqa: E501 + + :return: The nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: float + """ + return self._nb_beats + + @nb_beats.setter + def nb_beats(self, nb_beats): + """Sets the nb_beats of this ScoreCreationBuilderDataScoreData. + + The number of beats in the measure # noqa: E501 + + :param nb_beats: The nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: float + """ + + self._nb_beats = nb_beats + + @property + def beat_type(self): + """Gets the beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + The duration of a beat in the measure # noqa: E501 + + :return: The beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: float + """ + return self._beat_type + + @beat_type.setter + def beat_type(self, beat_type): + """Sets the beat_type of this ScoreCreationBuilderDataScoreData. + + The duration of a beat in the measure # noqa: E501 + + :param beat_type: The beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: float + """ + + self._beat_type = beat_type + + @property + def instruments(self): + """Gets the instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 + + The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. # noqa: E501 + + :return: The instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :rtype: list[ScoreCreationBuilderDataScoreDataInstruments] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this ScoreCreationBuilderDataScoreData. + + The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. # noqa: E501 + + :param instruments: The instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 + :type: list[ScoreCreationBuilderDataScoreDataInstruments] + """ + + self._instruments = instruments + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScoreCreationBuilderDataScoreData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_creation_builder_data_score_data_instruments.py b/flat_api/models/score_creation_builder_data_score_data_instruments.py new file mode 100644 index 0000000..f57976b --- /dev/null +++ b/flat_api/models/score_creation_builder_data_score_data_instruments.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScoreCreationBuilderDataScoreDataInstruments(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'group': 'str', + 'instrument': 'str', + 'long_name': 'str', + 'short_name': 'str' + } + + attribute_map = { + 'group': 'group', + 'instrument': 'instrument', + 'long_name': 'longName', + 'short_name': 'shortName' + } + + def __init__(self, group=None, instrument=None, long_name=None, short_name=None): # noqa: E501 + """ScoreCreationBuilderDataScoreDataInstruments - a model defined in OpenAPI""" # noqa: E501 + + self._group = None + self._instrument = None + self._long_name = None + self._short_name = None + self.discriminator = None + + if group is not None: + self.group = group + if instrument is not None: + self.instrument = instrument + if long_name is not None: + self.long_name = long_name + if short_name is not None: + self.short_name = short_name + + @property + def group(self): + """Gets the group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + + The of the instrument group (e.g. `keyboards`, `brass`) # noqa: E501 + + :return: The group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :rtype: str + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this ScoreCreationBuilderDataScoreDataInstruments. + + The of the instrument group (e.g. `keyboards`, `brass`) # noqa: E501 + + :param group: The group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :type: str + """ + + self._group = group + + @property + def instrument(self): + """Gets the instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + + The identifier of the instrument (e.g. `piano`, `trumpet`) # noqa: E501 + + :return: The instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :rtype: str + """ + return self._instrument + + @instrument.setter + def instrument(self, instrument): + """Sets the instrument of this ScoreCreationBuilderDataScoreDataInstruments. + + The identifier of the instrument (e.g. `piano`, `trumpet`) # noqa: E501 + + :param instrument: The instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :type: str + """ + + self._instrument = instrument + + @property + def long_name(self): + """Gets the long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + + The full name of the instrument # noqa: E501 + + :return: The long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :rtype: str + """ + return self._long_name + + @long_name.setter + def long_name(self, long_name): + """Sets the long_name of this ScoreCreationBuilderDataScoreDataInstruments. + + The full name of the instrument # noqa: E501 + + :param long_name: The long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :type: str + """ + + self._long_name = long_name + + @property + def short_name(self): + """Gets the short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + + The abbreviation of the name of the instrument # noqa: E501 + + :return: The short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :rtype: str + """ + return self._short_name + + @short_name.setter + def short_name(self, short_name): + """Sets the short_name of this ScoreCreationBuilderDataScoreDataInstruments. + + The abbreviation of the name of the instrument # noqa: E501 + + :param short_name: The short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 + :type: str + """ + + self._short_name = short_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScoreCreationBuilderDataScoreDataInstruments): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index da2731d..98f16cc 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index 7e38448..336760d 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,135 +33,180 @@ class ScoreDetails(object): """ openapi_types = { 'subtitle': 'str', + 'instruments': 'list[str]', 'lyricist': 'str', + 'publication_date': 'datetime', 'composer': 'str', + 'license_text': 'str', + 'modification_date': 'datetime', + 'id': 'str', + 'plays': 'ScorePlaysCounts', + 'title': 'str', + 'creation_type': 'ScoreCreationType', + 'comments': 'ScoreCommentsCounts', + 'collections': 'list[str]', + 'samples': 'list[str]', + 'number_measures': 'int', + 'google_drive_file_id': 'str', 'description': 'str', + 'views': 'ScoreViewsCounts', + 'html_url': 'str', + 'duration_time': 'float', + 'user': 'UserPublicSummary', + 'main_tempo_qpm': 'float', + 'creation_date': 'datetime', + 'parent_score': 'str', 'tags': 'list[str]', - 'creation_type': 'ScoreCreationType', + 'collaborators': 'list[ResourceCollaborator]', + 'sharing_key': 'str', 'license': 'ScoreLicense', - 'license_text': 'str', - 'duration_time': 'int', - 'number_measures': 'int', - 'main_tempo_qpm': 'int', 'rights': 'ResourceRights', - 'collaborators': 'list[ResourceCollaborator]', - 'creation_date': 'datetime', - 'modification_date': 'datetime', - 'publication_date': 'datetime', + 'privacy': 'ScorePrivacy', + 'arranger': 'str', 'organization': 'str', - 'parent_score': 'str', - 'instruments': 'list[str]', - 'google_drive_file_id': 'str', - 'likes': 'ScoreLikesCounts', - 'comments': 'ScoreCommentsCounts', - 'views': 'ScoreViewsCounts', - 'collections': 'list[str]' + 'likes': 'ScoreLikesCounts' } attribute_map = { 'subtitle': 'subtitle', + 'instruments': 'instruments', 'lyricist': 'lyricist', + 'publication_date': 'publicationDate', 'composer': 'composer', - 'description': 'description', - 'tags': 'tags', - 'creation_type': 'creationType', - 'license': 'license', 'license_text': 'licenseText', - 'duration_time': 'durationTime', + 'modification_date': 'modificationDate', + 'id': 'id', + 'plays': 'plays', + 'title': 'title', + 'creation_type': 'creationType', + 'comments': 'comments', + 'collections': 'collections', + 'samples': 'samples', 'number_measures': 'numberMeasures', + 'google_drive_file_id': 'googleDriveFileId', + 'description': 'description', + 'views': 'views', + 'html_url': 'htmlUrl', + 'duration_time': 'durationTime', + 'user': 'user', 'main_tempo_qpm': 'mainTempoQpm', - 'rights': 'rights', - 'collaborators': 'collaborators', 'creation_date': 'creationDate', - 'modification_date': 'modificationDate', - 'publication_date': 'publicationDate', - 'organization': 'organization', 'parent_score': 'parentScore', - 'instruments': 'instruments', - 'google_drive_file_id': 'googleDriveFileId', - 'likes': 'likes', - 'comments': 'comments', - 'views': 'views', - 'collections': 'collections' + 'tags': 'tags', + 'collaborators': 'collaborators', + 'sharing_key': 'sharingKey', + 'license': 'license', + 'rights': 'rights', + 'privacy': 'privacy', + 'arranger': 'arranger', + 'organization': 'organization', + 'likes': 'likes' } - def __init__(self, subtitle=None, lyricist=None, composer=None, description=None, tags=None, creation_type=None, license=None, license_text=None, duration_time=None, number_measures=None, main_tempo_qpm=None, rights=None, collaborators=None, creation_date=None, modification_date=None, publication_date=None, organization=None, parent_score=None, instruments=None, google_drive_file_id=None, likes=None, comments=None, views=None, collections=None): # noqa: E501 + def __init__(self, subtitle=None, instruments=None, lyricist=None, publication_date=None, composer=None, license_text=None, modification_date=None, id=None, plays=None, title=None, creation_type=None, comments=None, collections=None, samples=None, number_measures=None, google_drive_file_id=None, description=None, views=None, html_url=None, duration_time=None, user=None, main_tempo_qpm=None, creation_date=None, parent_score=None, tags=None, collaborators=None, sharing_key=None, license=None, rights=None, privacy=None, arranger=None, organization=None, likes=None): # noqa: E501 """ScoreDetails - a model defined in OpenAPI""" # noqa: E501 self._subtitle = None + self._instruments = None self._lyricist = None + self._publication_date = None self._composer = None - self._description = None - self._tags = None - self._creation_type = None - self._license = None self._license_text = None - self._duration_time = None + self._modification_date = None + self._id = None + self._plays = None + self._title = None + self._creation_type = None + self._comments = None + self._collections = None + self._samples = None self._number_measures = None + self._google_drive_file_id = None + self._description = None + self._views = None + self._html_url = None + self._duration_time = None + self._user = None self._main_tempo_qpm = None - self._rights = None - self._collaborators = None self._creation_date = None - self._modification_date = None - self._publication_date = None - self._organization = None self._parent_score = None - self._instruments = None - self._google_drive_file_id = None + self._tags = None + self._collaborators = None + self._sharing_key = None + self._license = None + self._rights = None + self._privacy = None + self._arranger = None + self._organization = None self._likes = None - self._comments = None - self._views = None - self._collections = None self.discriminator = None if subtitle is not None: self.subtitle = subtitle + if instruments is not None: + self.instruments = instruments if lyricist is not None: self.lyricist = lyricist + if publication_date is not None: + self.publication_date = publication_date if composer is not None: self.composer = composer - if description is not None: - self.description = description - if tags is not None: - self.tags = tags - if creation_type is not None: - self.creation_type = creation_type - if license is not None: - self.license = license if license_text is not None: self.license_text = license_text - if duration_time is not None: - self.duration_time = duration_time + if modification_date is not None: + self.modification_date = modification_date + if id is not None: + self.id = id + if plays is not None: + self.plays = plays + if title is not None: + self.title = title + if creation_type is not None: + self.creation_type = creation_type + if comments is not None: + self.comments = comments + if collections is not None: + self.collections = collections + if samples is not None: + self.samples = samples if number_measures is not None: self.number_measures = number_measures + if google_drive_file_id is not None: + self.google_drive_file_id = google_drive_file_id + if description is not None: + self.description = description + if views is not None: + self.views = views + if html_url is not None: + self.html_url = html_url + if duration_time is not None: + self.duration_time = duration_time + if user is not None: + self.user = user if main_tempo_qpm is not None: self.main_tempo_qpm = main_tempo_qpm - if rights is not None: - self.rights = rights - if collaborators is not None: - self.collaborators = collaborators if creation_date is not None: self.creation_date = creation_date - if modification_date is not None: - self.modification_date = modification_date - if publication_date is not None: - self.publication_date = publication_date - if organization is not None: - self.organization = organization if parent_score is not None: self.parent_score = parent_score - if instruments is not None: - self.instruments = instruments - if google_drive_file_id is not None: - self.google_drive_file_id = google_drive_file_id + if tags is not None: + self.tags = tags + if collaborators is not None: + self.collaborators = collaborators + if sharing_key is not None: + self.sharing_key = sharing_key + if license is not None: + self.license = license + if rights is not None: + self.rights = rights + if privacy is not None: + self.privacy = privacy + if arranger is not None: + self.arranger = arranger + if organization is not None: + self.organization = organization if likes is not None: self.likes = likes - if comments is not None: - self.comments = comments - if views is not None: - self.views = views - if collections is not None: - self.collections = collections @property def subtitle(self): @@ -186,6 +231,29 @@ def subtitle(self, subtitle): self._subtitle = subtitle + @property + def instruments(self): + """Gets the instruments of this ScoreDetails. # noqa: E501 + + An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + + :return: The instruments of this ScoreDetails. # noqa: E501 + :rtype: list[str] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this ScoreDetails. + + An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + + :param instruments: The instruments of this ScoreDetails. # noqa: E501 + :type: list[str] + """ + + self._instruments = instruments + @property def lyricist(self): """Gets the lyricist of this ScoreDetails. # noqa: E501 @@ -209,6 +277,29 @@ def lyricist(self, lyricist): self._lyricist = lyricist + @property + def publication_date(self): + """Gets the publication_date of this ScoreDetails. # noqa: E501 + + The date when the score was published on Flat # noqa: E501 + + :return: The publication_date of this ScoreDetails. # noqa: E501 + :rtype: datetime + """ + return self._publication_date + + @publication_date.setter + def publication_date(self, publication_date): + """Sets the publication_date of this ScoreDetails. + + The date when the score was published on Flat # noqa: E501 + + :param publication_date: The publication_date of this ScoreDetails. # noqa: E501 + :type: datetime + """ + + self._publication_date = publication_date + @property def composer(self): """Gets the composer of this ScoreDetails. # noqa: E501 @@ -233,138 +324,205 @@ def composer(self, composer): self._composer = composer @property - def description(self): - """Gets the description of this ScoreDetails. # noqa: E501 + def license_text(self): + """Gets the license_text of this ScoreDetails. # noqa: E501 - Description of the creation # noqa: E501 + Additional license text written on the exported/printed score # noqa: E501 - :return: The description of this ScoreDetails. # noqa: E501 + :return: The license_text of this ScoreDetails. # noqa: E501 :rtype: str """ - return self._description + return self._license_text - @description.setter - def description(self, description): - """Sets the description of this ScoreDetails. + @license_text.setter + def license_text(self, license_text): + """Sets the license_text of this ScoreDetails. - Description of the creation # noqa: E501 + Additional license text written on the exported/printed score # noqa: E501 - :param description: The description of this ScoreDetails. # noqa: E501 + :param license_text: The license_text of this ScoreDetails. # noqa: E501 :type: str """ - self._description = description + self._license_text = license_text @property - def tags(self): - """Gets the tags of this ScoreDetails. # noqa: E501 + def modification_date(self): + """Gets the modification_date of this ScoreDetails. # noqa: E501 - Tags describing the score # noqa: E501 + The date of the last revision of the score # noqa: E501 - :return: The tags of this ScoreDetails. # noqa: E501 - :rtype: list[str] + :return: The modification_date of this ScoreDetails. # noqa: E501 + :rtype: datetime """ - return self._tags + return self._modification_date - @tags.setter - def tags(self, tags): - """Sets the tags of this ScoreDetails. + @modification_date.setter + def modification_date(self, modification_date): + """Sets the modification_date of this ScoreDetails. - Tags describing the score # noqa: E501 + The date of the last revision of the score # noqa: E501 - :param tags: The tags of this ScoreDetails. # noqa: E501 - :type: list[str] + :param modification_date: The modification_date of this ScoreDetails. # noqa: E501 + :type: datetime """ - self._tags = tags + self._modification_date = modification_date @property - def creation_type(self): - """Gets the creation_type of this ScoreDetails. # noqa: E501 + def id(self): + """Gets the id of this ScoreDetails. # noqa: E501 + The unique identifier of the score # noqa: E501 - :return: The creation_type of this ScoreDetails. # noqa: E501 - :rtype: ScoreCreationType + :return: The id of this ScoreDetails. # noqa: E501 + :rtype: str """ - return self._creation_type + return self._id - @creation_type.setter - def creation_type(self, creation_type): - """Sets the creation_type of this ScoreDetails. + @id.setter + def id(self, id): + """Sets the id of this ScoreDetails. + The unique identifier of the score # noqa: E501 - :param creation_type: The creation_type of this ScoreDetails. # noqa: E501 - :type: ScoreCreationType + :param id: The id of this ScoreDetails. # noqa: E501 + :type: str """ - self._creation_type = creation_type + self._id = id @property - def license(self): - """Gets the license of this ScoreDetails. # noqa: E501 + def plays(self): + """Gets the plays of this ScoreDetails. # noqa: E501 - :return: The license of this ScoreDetails. # noqa: E501 - :rtype: ScoreLicense + :return: The plays of this ScoreDetails. # noqa: E501 + :rtype: ScorePlaysCounts """ - return self._license + return self._plays - @license.setter - def license(self, license): - """Sets the license of this ScoreDetails. + @plays.setter + def plays(self, plays): + """Sets the plays of this ScoreDetails. - :param license: The license of this ScoreDetails. # noqa: E501 - :type: ScoreLicense + :param plays: The plays of this ScoreDetails. # noqa: E501 + :type: ScorePlaysCounts """ - self._license = license + self._plays = plays @property - def license_text(self): - """Gets the license_text of this ScoreDetails. # noqa: E501 + def title(self): + """Gets the title of this ScoreDetails. # noqa: E501 - Additional license text written on the exported/printed score # noqa: E501 + The title of the score # noqa: E501 - :return: The license_text of this ScoreDetails. # noqa: E501 + :return: The title of this ScoreDetails. # noqa: E501 :rtype: str """ - return self._license_text + return self._title - @license_text.setter - def license_text(self, license_text): - """Sets the license_text of this ScoreDetails. + @title.setter + def title(self, title): + """Sets the title of this ScoreDetails. - Additional license text written on the exported/printed score # noqa: E501 + The title of the score # noqa: E501 - :param license_text: The license_text of this ScoreDetails. # noqa: E501 + :param title: The title of this ScoreDetails. # noqa: E501 :type: str """ - self._license_text = license_text + self._title = title @property - def duration_time(self): - """Gets the duration_time of this ScoreDetails. # noqa: E501 + def creation_type(self): + """Gets the creation_type of this ScoreDetails. # noqa: E501 - In seconds, an approximative duration of the score # noqa: E501 - :return: The duration_time of this ScoreDetails. # noqa: E501 - :rtype: int + :return: The creation_type of this ScoreDetails. # noqa: E501 + :rtype: ScoreCreationType """ - return self._duration_time + return self._creation_type - @duration_time.setter - def duration_time(self, duration_time): - """Sets the duration_time of this ScoreDetails. + @creation_type.setter + def creation_type(self, creation_type): + """Sets the creation_type of this ScoreDetails. - In seconds, an approximative duration of the score # noqa: E501 - :param duration_time: The duration_time of this ScoreDetails. # noqa: E501 - :type: int + :param creation_type: The creation_type of this ScoreDetails. # noqa: E501 + :type: ScoreCreationType """ - self._duration_time = duration_time + self._creation_type = creation_type + + @property + def comments(self): + """Gets the comments of this ScoreDetails. # noqa: E501 + + + :return: The comments of this ScoreDetails. # noqa: E501 + :rtype: ScoreCommentsCounts + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this ScoreDetails. + + + :param comments: The comments of this ScoreDetails. # noqa: E501 + :type: ScoreCommentsCounts + """ + + self._comments = comments + + @property + def collections(self): + """Gets the collections of this ScoreDetails. # noqa: E501 + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :return: The collections of this ScoreDetails. # noqa: E501 + :rtype: list[str] + """ + return self._collections + + @collections.setter + def collections(self, collections): + """Sets the collections of this ScoreDetails. + + The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + + :param collections: The collections of this ScoreDetails. # noqa: E501 + :type: list[str] + """ + + self._collections = collections + + @property + def samples(self): + """Gets the samples of this ScoreDetails. # noqa: E501 + + An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. # noqa: E501 + + :return: The samples of this ScoreDetails. # noqa: E501 + :rtype: list[str] + """ + return self._samples + + @samples.setter + def samples(self, samples): + """Sets the samples of this ScoreDetails. + + An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. # noqa: E501 + + :param samples: The samples of this ScoreDetails. # noqa: E501 + :type: list[str] + """ + + self._samples = samples @property def number_measures(self): @@ -390,163 +548,184 @@ def number_measures(self, number_measures): self._number_measures = number_measures @property - def main_tempo_qpm(self): - """Gets the main_tempo_qpm of this ScoreDetails. # noqa: E501 + def google_drive_file_id(self): + """Gets the google_drive_file_id of this ScoreDetails. # noqa: E501 - The main tempo of the score (in QPM) # noqa: E501 + If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 - :return: The main_tempo_qpm of this ScoreDetails. # noqa: E501 - :rtype: int + :return: The google_drive_file_id of this ScoreDetails. # noqa: E501 + :rtype: str """ - return self._main_tempo_qpm + return self._google_drive_file_id - @main_tempo_qpm.setter - def main_tempo_qpm(self, main_tempo_qpm): - """Sets the main_tempo_qpm of this ScoreDetails. + @google_drive_file_id.setter + def google_drive_file_id(self, google_drive_file_id): + """Sets the google_drive_file_id of this ScoreDetails. - The main tempo of the score (in QPM) # noqa: E501 + If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 - :param main_tempo_qpm: The main_tempo_qpm of this ScoreDetails. # noqa: E501 - :type: int + :param google_drive_file_id: The google_drive_file_id of this ScoreDetails. # noqa: E501 + :type: str """ - self._main_tempo_qpm = main_tempo_qpm + self._google_drive_file_id = google_drive_file_id @property - def rights(self): - """Gets the rights of this ScoreDetails. # noqa: E501 + def description(self): + """Gets the description of this ScoreDetails. # noqa: E501 + Description of the creation # noqa: E501 - :return: The rights of this ScoreDetails. # noqa: E501 - :rtype: ResourceRights + :return: The description of this ScoreDetails. # noqa: E501 + :rtype: str """ - return self._rights + return self._description - @rights.setter - def rights(self, rights): - """Sets the rights of this ScoreDetails. + @description.setter + def description(self, description): + """Sets the description of this ScoreDetails. + Description of the creation # noqa: E501 - :param rights: The rights of this ScoreDetails. # noqa: E501 - :type: ResourceRights + :param description: The description of this ScoreDetails. # noqa: E501 + :type: str """ - self._rights = rights + self._description = description @property - def collaborators(self): - """Gets the collaborators of this ScoreDetails. # noqa: E501 + def views(self): + """Gets the views of this ScoreDetails. # noqa: E501 - The list of the collaborators of the score # noqa: E501 - :return: The collaborators of this ScoreDetails. # noqa: E501 - :rtype: list[ResourceCollaborator] + :return: The views of this ScoreDetails. # noqa: E501 + :rtype: ScoreViewsCounts """ - return self._collaborators + return self._views - @collaborators.setter - def collaborators(self, collaborators): - """Sets the collaborators of this ScoreDetails. + @views.setter + def views(self, views): + """Sets the views of this ScoreDetails. - The list of the collaborators of the score # noqa: E501 - :param collaborators: The collaborators of this ScoreDetails. # noqa: E501 - :type: list[ResourceCollaborator] + :param views: The views of this ScoreDetails. # noqa: E501 + :type: ScoreViewsCounts """ - self._collaborators = collaborators + self._views = views @property - def creation_date(self): - """Gets the creation_date of this ScoreDetails. # noqa: E501 + def html_url(self): + """Gets the html_url of this ScoreDetails. # noqa: E501 - The date when the score was created # noqa: E501 + The url where the score can be viewed in a web browser # noqa: E501 - :return: The creation_date of this ScoreDetails. # noqa: E501 - :rtype: datetime + :return: The html_url of this ScoreDetails. # noqa: E501 + :rtype: str """ - return self._creation_date + return self._html_url - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ScoreDetails. + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ScoreDetails. - The date when the score was created # noqa: E501 + The url where the score can be viewed in a web browser # noqa: E501 - :param creation_date: The creation_date of this ScoreDetails. # noqa: E501 - :type: datetime + :param html_url: The html_url of this ScoreDetails. # noqa: E501 + :type: str """ - self._creation_date = creation_date + self._html_url = html_url @property - def modification_date(self): - """Gets the modification_date of this ScoreDetails. # noqa: E501 + def duration_time(self): + """Gets the duration_time of this ScoreDetails. # noqa: E501 - The date of the last revision of the score # noqa: E501 + In seconds, an approximative duration of the score # noqa: E501 - :return: The modification_date of this ScoreDetails. # noqa: E501 - :rtype: datetime + :return: The duration_time of this ScoreDetails. # noqa: E501 + :rtype: float """ - return self._modification_date + return self._duration_time - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ScoreDetails. + @duration_time.setter + def duration_time(self, duration_time): + """Sets the duration_time of this ScoreDetails. - The date of the last revision of the score # noqa: E501 + In seconds, an approximative duration of the score # noqa: E501 - :param modification_date: The modification_date of this ScoreDetails. # noqa: E501 - :type: datetime + :param duration_time: The duration_time of this ScoreDetails. # noqa: E501 + :type: float """ - self._modification_date = modification_date + self._duration_time = duration_time @property - def publication_date(self): - """Gets the publication_date of this ScoreDetails. # noqa: E501 + def user(self): + """Gets the user of this ScoreDetails. # noqa: E501 - The date when the score was published on Flat # noqa: E501 - :return: The publication_date of this ScoreDetails. # noqa: E501 - :rtype: datetime + :return: The user of this ScoreDetails. # noqa: E501 + :rtype: UserPublicSummary """ - return self._publication_date + return self._user - @publication_date.setter - def publication_date(self, publication_date): - """Sets the publication_date of this ScoreDetails. + @user.setter + def user(self, user): + """Sets the user of this ScoreDetails. - The date when the score was published on Flat # noqa: E501 - :param publication_date: The publication_date of this ScoreDetails. # noqa: E501 - :type: datetime + :param user: The user of this ScoreDetails. # noqa: E501 + :type: UserPublicSummary """ - self._publication_date = publication_date + self._user = user @property - def organization(self): - """Gets the organization of this ScoreDetails. # noqa: E501 + def main_tempo_qpm(self): + """Gets the main_tempo_qpm of this ScoreDetails. # noqa: E501 - If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 + The main tempo of the score (in QPM) # noqa: E501 - :return: The organization of this ScoreDetails. # noqa: E501 - :rtype: str + :return: The main_tempo_qpm of this ScoreDetails. # noqa: E501 + :rtype: float """ - return self._organization + return self._main_tempo_qpm - @organization.setter - def organization(self, organization): - """Sets the organization of this ScoreDetails. + @main_tempo_qpm.setter + def main_tempo_qpm(self, main_tempo_qpm): + """Sets the main_tempo_qpm of this ScoreDetails. - If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 + The main tempo of the score (in QPM) # noqa: E501 - :param organization: The organization of this ScoreDetails. # noqa: E501 - :type: str + :param main_tempo_qpm: The main_tempo_qpm of this ScoreDetails. # noqa: E501 + :type: float """ - self._organization = organization + self._main_tempo_qpm = main_tempo_qpm + + @property + def creation_date(self): + """Gets the creation_date of this ScoreDetails. # noqa: E501 + + The date when the score was created # noqa: E501 + + :return: The creation_date of this ScoreDetails. # noqa: E501 + :rtype: datetime + """ + return self._creation_date + + @creation_date.setter + def creation_date(self, creation_date): + """Sets the creation_date of this ScoreDetails. + + The date when the score was created # noqa: E501 + + :param creation_date: The creation_date of this ScoreDetails. # noqa: E501 + :type: datetime + """ + + self._creation_date = creation_date @property def parent_score(self): @@ -572,136 +751,203 @@ def parent_score(self, parent_score): self._parent_score = parent_score @property - def instruments(self): - """Gets the instruments of this ScoreDetails. # noqa: E501 + def tags(self): + """Gets the tags of this ScoreDetails. # noqa: E501 - An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + Tags describing the score # noqa: E501 - :return: The instruments of this ScoreDetails. # noqa: E501 + :return: The tags of this ScoreDetails. # noqa: E501 :rtype: list[str] """ - return self._instruments + return self._tags - @instruments.setter - def instruments(self, instruments): - """Sets the instruments of this ScoreDetails. + @tags.setter + def tags(self, tags): + """Sets the tags of this ScoreDetails. - An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + Tags describing the score # noqa: E501 - :param instruments: The instruments of this ScoreDetails. # noqa: E501 + :param tags: The tags of this ScoreDetails. # noqa: E501 :type: list[str] """ - self._instruments = instruments + self._tags = tags @property - def google_drive_file_id(self): - """Gets the google_drive_file_id of this ScoreDetails. # noqa: E501 + def collaborators(self): + """Gets the collaborators of this ScoreDetails. # noqa: E501 - If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 + The list of the collaborators of the score # noqa: E501 - :return: The google_drive_file_id of this ScoreDetails. # noqa: E501 + :return: The collaborators of this ScoreDetails. # noqa: E501 + :rtype: list[ResourceCollaborator] + """ + return self._collaborators + + @collaborators.setter + def collaborators(self, collaborators): + """Sets the collaborators of this ScoreDetails. + + The list of the collaborators of the score # noqa: E501 + + :param collaborators: The collaborators of this ScoreDetails. # noqa: E501 + :type: list[ResourceCollaborator] + """ + + self._collaborators = collaborators + + @property + def sharing_key(self): + """Gets the sharing_key of this ScoreDetails. # noqa: E501 + + The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 + + :return: The sharing_key of this ScoreDetails. # noqa: E501 :rtype: str """ - return self._google_drive_file_id + return self._sharing_key - @google_drive_file_id.setter - def google_drive_file_id(self, google_drive_file_id): - """Sets the google_drive_file_id of this ScoreDetails. + @sharing_key.setter + def sharing_key(self, sharing_key): + """Sets the sharing_key of this ScoreDetails. - If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 + The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - :param google_drive_file_id: The google_drive_file_id of this ScoreDetails. # noqa: E501 + :param sharing_key: The sharing_key of this ScoreDetails. # noqa: E501 :type: str """ - self._google_drive_file_id = google_drive_file_id + self._sharing_key = sharing_key @property - def likes(self): - """Gets the likes of this ScoreDetails. # noqa: E501 + def license(self): + """Gets the license of this ScoreDetails. # noqa: E501 - :return: The likes of this ScoreDetails. # noqa: E501 - :rtype: ScoreLikesCounts + :return: The license of this ScoreDetails. # noqa: E501 + :rtype: ScoreLicense """ - return self._likes + return self._license - @likes.setter - def likes(self, likes): - """Sets the likes of this ScoreDetails. + @license.setter + def license(self, license): + """Sets the license of this ScoreDetails. - :param likes: The likes of this ScoreDetails. # noqa: E501 - :type: ScoreLikesCounts + :param license: The license of this ScoreDetails. # noqa: E501 + :type: ScoreLicense """ - self._likes = likes + self._license = license @property - def comments(self): - """Gets the comments of this ScoreDetails. # noqa: E501 + def rights(self): + """Gets the rights of this ScoreDetails. # noqa: E501 - :return: The comments of this ScoreDetails. # noqa: E501 - :rtype: ScoreCommentsCounts + :return: The rights of this ScoreDetails. # noqa: E501 + :rtype: ResourceRights """ - return self._comments + return self._rights - @comments.setter - def comments(self, comments): - """Sets the comments of this ScoreDetails. + @rights.setter + def rights(self, rights): + """Sets the rights of this ScoreDetails. - :param comments: The comments of this ScoreDetails. # noqa: E501 - :type: ScoreCommentsCounts + :param rights: The rights of this ScoreDetails. # noqa: E501 + :type: ResourceRights """ - self._comments = comments + self._rights = rights @property - def views(self): - """Gets the views of this ScoreDetails. # noqa: E501 + def privacy(self): + """Gets the privacy of this ScoreDetails. # noqa: E501 - :return: The views of this ScoreDetails. # noqa: E501 - :rtype: ScoreViewsCounts + :return: The privacy of this ScoreDetails. # noqa: E501 + :rtype: ScorePrivacy """ - return self._views + return self._privacy - @views.setter - def views(self, views): - """Sets the views of this ScoreDetails. + @privacy.setter + def privacy(self, privacy): + """Sets the privacy of this ScoreDetails. - :param views: The views of this ScoreDetails. # noqa: E501 - :type: ScoreViewsCounts + :param privacy: The privacy of this ScoreDetails. # noqa: E501 + :type: ScorePrivacy """ - self._views = views + self._privacy = privacy @property - def collections(self): - """Gets the collections of this ScoreDetails. # noqa: E501 + def arranger(self): + """Gets the arranger of this ScoreDetails. # noqa: E501 - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + Arranger of the score # noqa: E501 - :return: The collections of this ScoreDetails. # noqa: E501 - :rtype: list[str] + :return: The arranger of this ScoreDetails. # noqa: E501 + :rtype: str """ - return self._collections + return self._arranger - @collections.setter - def collections(self, collections): - """Sets the collections of this ScoreDetails. + @arranger.setter + def arranger(self, arranger): + """Sets the arranger of this ScoreDetails. - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 + Arranger of the score # noqa: E501 - :param collections: The collections of this ScoreDetails. # noqa: E501 - :type: list[str] + :param arranger: The arranger of this ScoreDetails. # noqa: E501 + :type: str """ - self._collections = collections + self._arranger = arranger + + @property + def organization(self): + """Gets the organization of this ScoreDetails. # noqa: E501 + + If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 + + :return: The organization of this ScoreDetails. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this ScoreDetails. + + If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 + + :param organization: The organization of this ScoreDetails. # noqa: E501 + :type: str + """ + + self._organization = organization + + @property + def likes(self): + """Gets the likes of this ScoreDetails. # noqa: E501 + + + :return: The likes of this ScoreDetails. # noqa: E501 + :rtype: ScoreLikesCounts + """ + return self._likes + + @likes.setter + def likes(self, likes): + """Sets the likes of this ScoreDetails. + + + :param likes: The likes of this ScoreDetails. # noqa: E501 + :type: ScoreLikesCounts + """ + + self._likes = likes def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index e19cc49..9e7aafc 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -39,7 +39,7 @@ class ScoreFork(object): 'collection': 'collection' } - def __init__(self, collection=None): # noqa: E501 + def __init__(self, collection='root'): # noqa: E501 """ScoreFork - a model defined in OpenAPI""" # noqa: E501 self._collection = None diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index 59ee8e8..4dcc4bb 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index 1a079f5..e02bc24 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 9a39853..760a253 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,38 +33,61 @@ class ScoreModification(object): """ openapi_types = { 'title': 'str', + 'subtitle': 'str', + 'composer': 'str', + 'lyricist': 'str', + 'arranger': 'str', 'privacy': 'ScorePrivacy', 'sharing_key': 'str', 'description': 'str', 'tags': 'list[str]', 'creation_type': 'ScoreCreationType', - 'license': 'ScoreLicense' + 'license': 'ScoreLicense', + 'license_text': 'str' } attribute_map = { 'title': 'title', + 'subtitle': 'subtitle', + 'composer': 'composer', + 'lyricist': 'lyricist', + 'arranger': 'arranger', 'privacy': 'privacy', 'sharing_key': 'sharingKey', 'description': 'description', 'tags': 'tags', 'creation_type': 'creationType', - 'license': 'license' + 'license': 'license', + 'license_text': 'licenseText' } - def __init__(self, title=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None): # noqa: E501 + def __init__(self, title=None, subtitle=None, composer=None, lyricist=None, arranger=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None, license_text=None): # noqa: E501 """ScoreModification - a model defined in OpenAPI""" # noqa: E501 self._title = None + self._subtitle = None + self._composer = None + self._lyricist = None + self._arranger = None self._privacy = None self._sharing_key = None self._description = None self._tags = None self._creation_type = None self._license = None + self._license_text = None self.discriminator = None if title is not None: self.title = title + if subtitle is not None: + self.subtitle = subtitle + if composer is not None: + self.composer = composer + if lyricist is not None: + self.lyricist = lyricist + if arranger is not None: + self.arranger = arranger if privacy is not None: self.privacy = privacy if sharing_key is not None: @@ -77,6 +100,8 @@ def __init__(self, title=None, privacy=None, sharing_key=None, description=None, self.creation_type = creation_type if license is not None: self.license = license + if license_text is not None: + self.license_text = license_text @property def title(self): @@ -101,6 +126,98 @@ def title(self, title): self._title = title + @property + def subtitle(self): + """Gets the subtitle of this ScoreModification. # noqa: E501 + + The subtitle of the score # noqa: E501 + + :return: The subtitle of this ScoreModification. # noqa: E501 + :rtype: str + """ + return self._subtitle + + @subtitle.setter + def subtitle(self, subtitle): + """Sets the subtitle of this ScoreModification. + + The subtitle of the score # noqa: E501 + + :param subtitle: The subtitle of this ScoreModification. # noqa: E501 + :type: str + """ + + self._subtitle = subtitle + + @property + def composer(self): + """Gets the composer of this ScoreModification. # noqa: E501 + + The composer of the score # noqa: E501 + + :return: The composer of this ScoreModification. # noqa: E501 + :rtype: str + """ + return self._composer + + @composer.setter + def composer(self, composer): + """Sets the composer of this ScoreModification. + + The composer of the score # noqa: E501 + + :param composer: The composer of this ScoreModification. # noqa: E501 + :type: str + """ + + self._composer = composer + + @property + def lyricist(self): + """Gets the lyricist of this ScoreModification. # noqa: E501 + + The lyricist of the score # noqa: E501 + + :return: The lyricist of this ScoreModification. # noqa: E501 + :rtype: str + """ + return self._lyricist + + @lyricist.setter + def lyricist(self, lyricist): + """Sets the lyricist of this ScoreModification. + + The lyricist of the score # noqa: E501 + + :param lyricist: The lyricist of this ScoreModification. # noqa: E501 + :type: str + """ + + self._lyricist = lyricist + + @property + def arranger(self): + """Gets the arranger of this ScoreModification. # noqa: E501 + + The arranger of the score # noqa: E501 + + :return: The arranger of this ScoreModification. # noqa: E501 + :rtype: str + """ + return self._arranger + + @arranger.setter + def arranger(self, arranger): + """Sets the arranger of this ScoreModification. + + The arranger of the score # noqa: E501 + + :param arranger: The arranger of this ScoreModification. # noqa: E501 + :type: str + """ + + self._arranger = arranger + @property def privacy(self): """Gets the privacy of this ScoreModification. # noqa: E501 @@ -167,8 +284,8 @@ def description(self, description): :param description: The description of this ScoreModification. # noqa: E501 :type: str """ - if description is not None and len(description) > 1000: - raise ValueError("Invalid value for `description`, length must be less than or equal to `1000`") # noqa: E501 + if description is not None and len(description) > 2000: + raise ValueError("Invalid value for `description`, length must be less than or equal to `2000`") # noqa: E501 self._description = description @@ -237,6 +354,29 @@ def license(self, license): self._license = license + @property + def license_text(self): + """Gets the license_text of this ScoreModification. # noqa: E501 + + The rights info written on the score # noqa: E501 + + :return: The license_text of this ScoreModification. # noqa: E501 + :rtype: str + """ + return self._license_text + + @license_text.setter + def license_text(self, license_text): + """Sets the license_text of this ScoreModification. + + The rights info written on the score # noqa: E501 + + :param license_text: The license_text of this ScoreModification. # noqa: E501 + :type: str + """ + + self._license_text = license_text + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py new file mode 100644 index 0000000..19414d8 --- /dev/null +++ b/flat_api/models/score_plays_counts.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScorePlaysCounts(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total': 'float', + 'weekly': 'float', + 'monthly': 'float' + } + + attribute_map = { + 'total': 'total', + 'weekly': 'weekly', + 'monthly': 'monthly' + } + + def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 + """ScorePlaysCounts - a model defined in OpenAPI""" # noqa: E501 + + self._total = None + self._weekly = None + self._monthly = None + self.discriminator = None + + if total is not None: + self.total = total + if weekly is not None: + self.weekly = weekly + if monthly is not None: + self.monthly = monthly + + @property + def total(self): + """Gets the total of this ScorePlaysCounts. # noqa: E501 + + The total number of plays of the score # noqa: E501 + + :return: The total of this ScorePlaysCounts. # noqa: E501 + :rtype: float + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ScorePlaysCounts. + + The total number of plays of the score # noqa: E501 + + :param total: The total of this ScorePlaysCounts. # noqa: E501 + :type: float + """ + + self._total = total + + @property + def weekly(self): + """Gets the weekly of this ScorePlaysCounts. # noqa: E501 + + The weekly number of plays of the score # noqa: E501 + + :return: The weekly of this ScorePlaysCounts. # noqa: E501 + :rtype: float + """ + return self._weekly + + @weekly.setter + def weekly(self, weekly): + """Sets the weekly of this ScorePlaysCounts. + + The weekly number of plays of the score # noqa: E501 + + :param weekly: The weekly of this ScorePlaysCounts. # noqa: E501 + :type: float + """ + + self._weekly = weekly + + @property + def monthly(self): + """Gets the monthly of this ScorePlaysCounts. # noqa: E501 + + The monthly number of plays of the score # noqa: E501 + + :return: The monthly of this ScorePlaysCounts. # noqa: E501 + :rtype: float + """ + return self._monthly + + @monthly.setter + def monthly(self, monthly): + """Sets the monthly of this ScorePlaysCounts. + + The monthly number of plays of the score # noqa: E501 + + :param monthly: The monthly of this ScorePlaysCounts. # noqa: E501 + :type: float + """ + + self._monthly = monthly + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScorePlaysCounts): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index ccd8011..c94cbde 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index 5a6bbfe..a170563 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -36,6 +36,7 @@ class ScoreRevision(object): 'user': 'str', 'collaborators': 'list[str]', 'creation_date': 'datetime', + 'event': 'str', 'description': 'str', 'autosave': 'bool', 'statistics': 'ScoreRevisionStatistics' @@ -46,18 +47,20 @@ class ScoreRevision(object): 'user': 'user', 'collaborators': 'collaborators', 'creation_date': 'creationDate', + 'event': 'event', 'description': 'description', 'autosave': 'autosave', 'statistics': 'statistics' } - def __init__(self, id=None, user=None, collaborators=None, creation_date=None, description=None, autosave=None, statistics=None): # noqa: E501 + def __init__(self, id=None, user=None, collaborators=None, creation_date=None, event=None, description=None, autosave=None, statistics=None): # noqa: E501 """ScoreRevision - a model defined in OpenAPI""" # noqa: E501 self._id = None self._user = None self._collaborators = None self._creation_date = None + self._event = None self._description = None self._autosave = None self._statistics = None @@ -71,6 +74,8 @@ def __init__(self, id=None, user=None, collaborators=None, creation_date=None, d self.collaborators = collaborators if creation_date is not None: self.creation_date = creation_date + if event is not None: + self.event = event if description is not None: self.description = description if autosave is not None: @@ -168,6 +173,29 @@ def creation_date(self, creation_date): self._creation_date = creation_date + @property + def event(self): + """Gets the event of this ScoreRevision. # noqa: E501 + + The last event (action id) of the revision # noqa: E501 + + :return: The event of this ScoreRevision. # noqa: E501 + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this ScoreRevision. + + The last event (action id) of the revision # noqa: E501 + + :param event: The event of this ScoreRevision. # noqa: E501 + :type: str + """ + + self._event = event + @property def description(self): """Gets the description of this ScoreRevision. # noqa: E501 diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index ce99891..bcc7fc8 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,7 +33,7 @@ class ScoreRevisionCreation(object): """ openapi_types = { 'data': 'str', - 'data_encoding': 'ScoreDataEncoding', + 'data_encoding': 'str', 'autosave': 'bool', 'description': 'str' } @@ -66,7 +66,7 @@ def __init__(self, data=None, data_encoding=None, autosave=None, description=Non def data(self): """Gets the data of this ScoreRevisionCreation. # noqa: E501 - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :return: The data of this ScoreRevisionCreation. # noqa: E501 :rtype: str @@ -77,7 +77,7 @@ def data(self): def data(self, data): """Sets the data of this ScoreRevisionCreation. - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 + The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 :param data: The data of this ScoreRevisionCreation. # noqa: E501 :type: str @@ -91,9 +91,10 @@ def data(self, data): def data_encoding(self): """Gets the data_encoding of this ScoreRevisionCreation. # noqa: E501 + The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 :return: The data_encoding of this ScoreRevisionCreation. # noqa: E501 - :rtype: ScoreDataEncoding + :rtype: str """ return self._data_encoding @@ -101,10 +102,17 @@ def data_encoding(self): def data_encoding(self, data_encoding): """Sets the data_encoding of this ScoreRevisionCreation. + The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 :param data_encoding: The data_encoding of this ScoreRevisionCreation. # noqa: E501 - :type: ScoreDataEncoding + :type: str """ + allowed_values = ["base64"] # noqa: E501 + if data_encoding not in allowed_values: + raise ValueError( + "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 + .format(data_encoding, allowed_values) + ) self._data_encoding = data_encoding diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index 8b76e7c..6dcf15a 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index aac41b3..4c1518c 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_summary.py b/flat_api/models/score_summary.py deleted file mode 100644 index 1348b20..0000000 --- a/flat_api/models/score_summary.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.7.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ScoreSummary(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'sharing_key': 'str', - 'title': 'str', - 'privacy': 'ScorePrivacy', - 'user': 'UserPublicSummary', - 'html_url': 'str' - } - - attribute_map = { - 'id': 'id', - 'sharing_key': 'sharingKey', - 'title': 'title', - 'privacy': 'privacy', - 'user': 'user', - 'html_url': 'htmlUrl' - } - - def __init__(self, id=None, sharing_key=None, title=None, privacy=None, user=None, html_url=None): # noqa: E501 - """ScoreSummary - a model defined in OpenAPI""" # noqa: E501 - - self._id = None - self._sharing_key = None - self._title = None - self._privacy = None - self._user = None - self._html_url = None - self.discriminator = None - - if id is not None: - self.id = id - if sharing_key is not None: - self.sharing_key = sharing_key - if title is not None: - self.title = title - if privacy is not None: - self.privacy = privacy - if user is not None: - self.user = user - if html_url is not None: - self.html_url = html_url - - @property - def id(self): - """Gets the id of this ScoreSummary. # noqa: E501 - - The unique identifier of the score # noqa: E501 - - :return: The id of this ScoreSummary. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreSummary. - - The unique identifier of the score # noqa: E501 - - :param id: The id of this ScoreSummary. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def sharing_key(self): - """Gets the sharing_key of this ScoreSummary. # noqa: E501 - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :return: The sharing_key of this ScoreSummary. # noqa: E501 - :rtype: str - """ - return self._sharing_key - - @sharing_key.setter - def sharing_key(self, sharing_key): - """Sets the sharing_key of this ScoreSummary. - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :param sharing_key: The sharing_key of this ScoreSummary. # noqa: E501 - :type: str - """ - - self._sharing_key = sharing_key - - @property - def title(self): - """Gets the title of this ScoreSummary. # noqa: E501 - - The title of the score # noqa: E501 - - :return: The title of this ScoreSummary. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreSummary. - - The title of the score # noqa: E501 - - :param title: The title of this ScoreSummary. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def privacy(self): - """Gets the privacy of this ScoreSummary. # noqa: E501 - - - :return: The privacy of this ScoreSummary. # noqa: E501 - :rtype: ScorePrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this ScoreSummary. - - - :param privacy: The privacy of this ScoreSummary. # noqa: E501 - :type: ScorePrivacy - """ - - self._privacy = privacy - - @property - def user(self): - """Gets the user of this ScoreSummary. # noqa: E501 - - - :return: The user of this ScoreSummary. # noqa: E501 - :rtype: UserPublicSummary - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ScoreSummary. - - - :param user: The user of this ScoreSummary. # noqa: E501 - :type: UserPublicSummary - """ - - self._user = user - - @property - def html_url(self): - """Gets the html_url of this ScoreSummary. # noqa: E501 - - The url where the score can be viewed in a web browser # noqa: E501 - - :return: The html_url of this ScoreSummary. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this ScoreSummary. - - The url where the score can be viewed in a web browser # noqa: E501 - - :param html_url: The html_url of this ScoreSummary. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreSummary): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index 5c5b1f0..9a13f2d 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index 643cf46..ad3eaeb 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index cf8f3c7..b0c31b5 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index fdcdd0f..6c6408a 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index 63aa9e3..4b70cb2 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index 33d2d4e..8e9e426 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index fe93d45..3818932 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/task.py b/flat_api/models/task.py new file mode 100644 index 0000000..5d6b06d --- /dev/null +++ b/flat_api/models/task.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Task(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'type': 'str', + 'state': 'str', + 'progress': 'TaskProgress', + 'creation_date': 'datetime', + 'modification_date': 'datetime', + 'done_date': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'state': 'state', + 'progress': 'progress', + 'creation_date': 'creationDate', + 'modification_date': 'modificationDate', + 'done_date': 'doneDate' + } + + def __init__(self, id=None, type=None, state=None, progress=None, creation_date=None, modification_date=None, done_date=None): # noqa: E501 + """Task - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._type = None + self._state = None + self._progress = None + self._creation_date = None + self._modification_date = None + self._done_date = None + self.discriminator = None + + if id is not None: + self.id = id + if type is not None: + self.type = type + if state is not None: + self.state = state + if progress is not None: + self.progress = progress + if creation_date is not None: + self.creation_date = creation_date + if modification_date is not None: + self.modification_date = modification_date + if done_date is not None: + self.done_date = done_date + + @property + def id(self): + """Gets the id of this Task. # noqa: E501 + + Unique identifier of the task # noqa: E501 + + :return: The id of this Task. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Task. + + Unique identifier of the task # noqa: E501 + + :param id: The id of this Task. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this Task. # noqa: E501 + + Type of the task # noqa: E501 + + :return: The type of this Task. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Task. + + Type of the task # noqa: E501 + + :param type: The type of this Task. # noqa: E501 + :type: str + """ + allowed_values = ["audio-export", "audio-low-prio"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def state(self): + """Gets the state of this Task. # noqa: E501 + + State of the Task # noqa: E501 + + :return: The state of this Task. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Task. + + State of the Task # noqa: E501 + + :param state: The state of this Task. # noqa: E501 + :type: str + """ + allowed_values = ["created", "doing", "done", "canceled", "error"] # noqa: E501 + if state not in allowed_values: + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @property + def progress(self): + """Gets the progress of this Task. # noqa: E501 + + + :return: The progress of this Task. # noqa: E501 + :rtype: TaskProgress + """ + return self._progress + + @progress.setter + def progress(self, progress): + """Sets the progress of this Task. + + + :param progress: The progress of this Task. # noqa: E501 + :type: TaskProgress + """ + + self._progress = progress + + @property + def creation_date(self): + """Gets the creation_date of this Task. # noqa: E501 + + The creation date of the task # noqa: E501 + + :return: The creation_date of this Task. # noqa: E501 + :rtype: datetime + """ + return self._creation_date + + @creation_date.setter + def creation_date(self, creation_date): + """Sets the creation_date of this Task. + + The creation date of the task # noqa: E501 + + :param creation_date: The creation_date of this Task. # noqa: E501 + :type: datetime + """ + + self._creation_date = creation_date + + @property + def modification_date(self): + """Gets the modification_date of this Task. # noqa: E501 + + The last modification date of the task # noqa: E501 + + :return: The modification_date of this Task. # noqa: E501 + :rtype: datetime + """ + return self._modification_date + + @modification_date.setter + def modification_date(self, modification_date): + """Sets the modification_date of this Task. + + The last modification date of the task # noqa: E501 + + :param modification_date: The modification_date of this Task. # noqa: E501 + :type: datetime + """ + + self._modification_date = modification_date + + @property + def done_date(self): + """Gets the done_date of this Task. # noqa: E501 + + The date when the task has been completed # noqa: E501 + + :return: The done_date of this Task. # noqa: E501 + :rtype: datetime + """ + return self._done_date + + @done_date.setter + def done_date(self, done_date): + """Sets the done_date of this Task. + + The date when the task has been completed # noqa: E501 + + :param done_date: The done_date of this Task. # noqa: E501 + :type: datetime + """ + + self._done_date = done_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Task): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py new file mode 100644 index 0000000..179dbb5 --- /dev/null +++ b/flat_api/models/task_export_options.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TaskExportOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'parts': 'list[str]' + } + + attribute_map = { + 'parts': 'parts' + } + + def __init__(self, parts=None): # noqa: E501 + """TaskExportOptions - a model defined in OpenAPI""" # noqa: E501 + + self._parts = None + self.discriminator = None + + if parts is not None: + self.parts = parts + + @property + def parts(self): + """Gets the parts of this TaskExportOptions. # noqa: E501 + + A list of parts to specifically export # noqa: E501 + + :return: The parts of this TaskExportOptions. # noqa: E501 + :rtype: list[str] + """ + return self._parts + + @parts.setter + def parts(self, parts): + """Sets the parts of this TaskExportOptions. + + A list of parts to specifically export # noqa: E501 + + :param parts: The parts of this TaskExportOptions. # noqa: E501 + :type: list[str] + """ + + self._parts = parts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskExportOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py new file mode 100644 index 0000000..058b043 --- /dev/null +++ b/flat_api/models/task_progress.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TaskProgress(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'percent': 'float', + 'text': 'str' + } + + attribute_map = { + 'percent': 'percent', + 'text': 'text' + } + + def __init__(self, percent=None, text=None): # noqa: E501 + """TaskProgress - a model defined in OpenAPI""" # noqa: E501 + + self._percent = None + self._text = None + self.discriminator = None + + if percent is not None: + self.percent = percent + if text is not None: + self.text = text + + @property + def percent(self): + """Gets the percent of this TaskProgress. # noqa: E501 + + Percent of the task progression # noqa: E501 + + :return: The percent of this TaskProgress. # noqa: E501 + :rtype: float + """ + return self._percent + + @percent.setter + def percent(self, percent): + """Sets the percent of this TaskProgress. + + Percent of the task progression # noqa: E501 + + :param percent: The percent of this TaskProgress. # noqa: E501 + :type: float + """ + + self._percent = percent + + @property + def text(self): + """Gets the text of this TaskProgress. # noqa: E501 + + Text details of the task progress # noqa: E501 + + :return: The text of this TaskProgress. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this TaskProgress. + + Text details of the task progress # noqa: E501 + + :param text: The text of this TaskProgress. # noqa: E501 + :type: str + """ + + self._text = text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskProgress): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index 97c7cd7..ee74724 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,31 +33,51 @@ class UserAdminUpdate(object): """ openapi_types = { 'password': 'str', - 'organization_role': 'OrganizationRoles' + 'organization_role': 'OrganizationRoles', + 'username': 'str', + 'firstname': 'str', + 'lastname': 'str', + 'email': 'str' } attribute_map = { 'password': 'password', - 'organization_role': 'organizationRole' + 'organization_role': 'organizationRole', + 'username': 'username', + 'firstname': 'firstname', + 'lastname': 'lastname', + 'email': 'email' } - def __init__(self, password=None, organization_role=None): # noqa: E501 + def __init__(self, password=None, organization_role=None, username=None, firstname=None, lastname=None, email=None): # noqa: E501 """UserAdminUpdate - a model defined in OpenAPI""" # noqa: E501 self._password = None self._organization_role = None + self._username = None + self._firstname = None + self._lastname = None + self._email = None self.discriminator = None if password is not None: self.password = password if organization_role is not None: self.organization_role = organization_role + if username is not None: + self.username = username + if firstname is not None: + self.firstname = firstname + if lastname is not None: + self.lastname = lastname + if email is not None: + self.email = email @property def password(self): """Gets the password of this UserAdminUpdate. # noqa: E501 - Password of the new account # noqa: E501 + Password of the account # noqa: E501 :return: The password of this UserAdminUpdate. # noqa: E501 :rtype: str @@ -68,11 +88,13 @@ def password(self): def password(self, password): """Sets the password of this UserAdminUpdate. - Password of the new account # noqa: E501 + Password of the account # noqa: E501 :param password: The password of this UserAdminUpdate. # noqa: E501 :type: str """ + if password is not None and len(password) > 1000: + raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 if password is not None and len(password) < 6: raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 @@ -99,6 +121,108 @@ def organization_role(self, organization_role): self._organization_role = organization_role + @property + def username(self): + """Gets the username of this UserAdminUpdate. # noqa: E501 + + Username of the account # noqa: E501 + + :return: The username of this UserAdminUpdate. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this UserAdminUpdate. + + Username of the account # noqa: E501 + + :param username: The username of this UserAdminUpdate. # noqa: E501 + :type: str + """ + if username is not None and len(username) > 30: + raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 + if username is not None and len(username) < 1: + raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 + if username is not None and not re.search('^[A-Za-z0-9\\-_.]+$', username): # noqa: E501 + raise ValueError("Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\\-_.]+$/`") # noqa: E501 + + self._username = username + + @property + def firstname(self): + """Gets the firstname of this UserAdminUpdate. # noqa: E501 + + First name of the user # noqa: E501 + + :return: The firstname of this UserAdminUpdate. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserAdminUpdate. + + First name of the user # noqa: E501 + + :param firstname: The firstname of this UserAdminUpdate. # noqa: E501 + :type: str + """ + if firstname is not None and len(firstname) > 60: + raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this UserAdminUpdate. # noqa: E501 + + Last name of the user # noqa: E501 + + :return: The lastname of this UserAdminUpdate. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserAdminUpdate. + + Last name of the user # noqa: E501 + + :param lastname: The lastname of this UserAdminUpdate. # noqa: E501 + :type: str + """ + if lastname is not None and len(lastname) > 60: + raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 + + self._lastname = lastname + + @property + def email(self): + """Gets the email of this UserAdminUpdate. # noqa: E501 + + Email of the account # noqa: E501 + + :return: The email of this UserAdminUpdate. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this UserAdminUpdate. + + Email of the account # noqa: E501 + + :param email: The email of this UserAdminUpdate. # noqa: E501 + :type: str + """ + + self._email = email + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/user_basics.py b/flat_api/models/user_basics.py deleted file mode 100644 index b436b5e..0000000 --- a/flat_api/models/user_basics.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.7.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class UserBasics(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'printable_name': 'str', - 'picture': 'str', - 'is_power_user': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'printable_name': 'printableName', - 'picture': 'picture', - 'is_power_user': 'isPowerUser' - } - - discriminator_value_class_map = { - 'UserDetails': 'UserDetails', - 'UserPublic': 'UserPublic', - 'UserPublicSummary': 'UserPublicSummary', - 'UserDetailsAdmin': 'UserDetailsAdmin' - } - - def __init__(self, id=None, username=None, name=None, printable_name=None, picture=None, is_power_user=None): # noqa: E501 - """UserBasics - a model defined in OpenAPI""" # noqa: E501 - - self._id = None - self._username = None - self._name = None - self._printable_name = None - self._picture = None - self._is_power_user = None - self.discriminator = 'userType' - - if id is not None: - self.id = id - if username is not None: - self.username = username - if name is not None: - self.name = name - if printable_name is not None: - self.printable_name = printable_name - if picture is not None: - self.picture = picture - if is_power_user is not None: - self.is_power_user = is_power_user - - @property - def id(self): - """Gets the id of this UserBasics. # noqa: E501 - - The user unique identifier # noqa: E501 - - :return: The id of this UserBasics. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBasics. - - The user unique identifier # noqa: E501 - - :param id: The id of this UserBasics. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def username(self): - """Gets the username of this UserBasics. # noqa: E501 - - The user name (unique for the organization) # noqa: E501 - - :return: The username of this UserBasics. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBasics. - - The user name (unique for the organization) # noqa: E501 - - :param username: The username of this UserBasics. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def name(self): - """Gets the name of this UserBasics. # noqa: E501 - - A displayable name for the user # noqa: E501 - - :return: The name of this UserBasics. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBasics. - - A displayable name for the user # noqa: E501 - - :param name: The name of this UserBasics. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def printable_name(self): - """Gets the printable_name of this UserBasics. # noqa: E501 - - The name that can be directly printed (name or username) # noqa: E501 - - :return: The printable_name of this UserBasics. # noqa: E501 - :rtype: str - """ - return self._printable_name - - @printable_name.setter - def printable_name(self, printable_name): - """Sets the printable_name of this UserBasics. - - The name that can be directly printed (name or username) # noqa: E501 - - :param printable_name: The printable_name of this UserBasics. # noqa: E501 - :type: str - """ - - self._printable_name = printable_name - - @property - def picture(self): - """Gets the picture of this UserBasics. # noqa: E501 - - User pictue # noqa: E501 - - :return: The picture of this UserBasics. # noqa: E501 - :rtype: str - """ - return self._picture - - @picture.setter - def picture(self, picture): - """Sets the picture of this UserBasics. - - User pictue # noqa: E501 - - :param picture: The picture of this UserBasics. # noqa: E501 - :type: str - """ - - self._picture = picture - - @property - def is_power_user(self): - """Gets the is_power_user of this UserBasics. # noqa: E501 - - User license status. 'True' if user is an individual Power user # noqa: E501 - - :return: The is_power_user of this UserBasics. # noqa: E501 - :rtype: bool - """ - return self._is_power_user - - @is_power_user.setter - def is_power_user(self, is_power_user): - """Sets the is_power_user of this UserBasics. - - User license status. 'True' if user is an individual Power user # noqa: E501 - - :param is_power_user: The is_power_user of this UserBasics. # noqa: E501 - :type: bool - """ - - self._is_power_user = is_power_user - - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_value = data[self.discriminator] - return self.discriminator_value_class_map.get(discriminator_value) - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBasics): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index 008b956..3bc5085 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -33,33 +33,48 @@ class UserCreation(object): """ openapi_types = { 'username': 'str', + 'firstname': 'str', + 'lastname': 'str', 'email': 'str', 'password': 'str', - 'locale': 'FlatLocales' + 'locale': 'FlatLocales', + 'role': 'str' } attribute_map = { 'username': 'username', + 'firstname': 'firstname', + 'lastname': 'lastname', 'email': 'email', 'password': 'password', - 'locale': 'locale' + 'locale': 'locale', + 'role': 'role' } - def __init__(self, username=None, email=None, password=None, locale=None): # noqa: E501 + def __init__(self, username=None, firstname=None, lastname=None, email=None, password=None, locale=None, role='user'): # noqa: E501 """UserCreation - a model defined in OpenAPI""" # noqa: E501 self._username = None + self._firstname = None + self._lastname = None self._email = None self._password = None self._locale = None + self._role = None self.discriminator = None self.username = username + if firstname is not None: + self.firstname = firstname + if lastname is not None: + self.lastname = lastname if email is not None: self.email = email self.password = password if locale is not None: self.locale = locale + if role is not None: + self.role = role @property def username(self): @@ -83,11 +98,65 @@ def username(self, username): """ if username is None: raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + if username is not None and len(username) > 30: + raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 + if username is not None and len(username) < 1: + raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 if username is not None and not re.search('^[A-Za-z0-9\\-_.]+$', username): # noqa: E501 raise ValueError("Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\\-_.]+$/`") # noqa: E501 self._username = username + @property + def firstname(self): + """Gets the firstname of this UserCreation. # noqa: E501 + + First name of the user # noqa: E501 + + :return: The firstname of this UserCreation. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserCreation. + + First name of the user # noqa: E501 + + :param firstname: The firstname of this UserCreation. # noqa: E501 + :type: str + """ + if firstname is not None and len(firstname) > 60: + raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this UserCreation. # noqa: E501 + + Last name of the user # noqa: E501 + + :return: The lastname of this UserCreation. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserCreation. + + Last name of the user # noqa: E501 + + :param lastname: The lastname of this UserCreation. # noqa: E501 + :type: str + """ + if lastname is not None and len(lastname) > 60: + raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 + + self._lastname = lastname + @property def email(self): """Gets the email of this UserCreation. # noqa: E501 @@ -133,6 +202,8 @@ def password(self, password): """ if password is None: raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 + if password is not None and len(password) > 1000: + raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 if password is not None and len(password) < 6: raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 @@ -159,6 +230,35 @@ def locale(self, locale): self._locale = locale + @property + def role(self): + """Gets the role of this UserCreation. # noqa: E501 + + Role of the new account # noqa: E501 + + :return: The role of this UserCreation. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this UserCreation. + + Role of the new account # noqa: E501 + + :param role: The role of this UserCreation. # noqa: E501 + :type: str + """ + allowed_values = ["user", "teacher", "admin"] # noqa: E501 + if role not in allowed_values: + raise ValueError( + "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 + .format(role, allowed_values) + ) + + self._role = role + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index 947f155..4d99438 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,88 +32,192 @@ class UserDetails(object): and the value is json key in definition. """ openapi_types = { + 'username': 'str', + 'class_role': 'ClassRoles', + 'private_profile': 'bool', + 'followers_count': 'int', + 'firstname': 'str', + 'is_power_user': 'bool', + 'locale': 'FlatLocales', + 'instruments': 'list[str]', + 'html_url': 'str', + 'liked_scores_count': 'int', + 'printable_name': 'str', + 'bio': 'str', + 'picture_file': 'str', 'id': 'str', + 'cover_picture_file': 'str', + 'picture': 'str', + 'name': 'str', + 'is_flat_team': 'bool', + 'organization_role': 'OrganizationRoles', + 'profile_theme': 'str', + 'cover_picture': 'str', + 'owned_public_scores_count': 'int', + 'lastname': 'str', + 'following_count': 'int', + 'organization': 'str', 'type': 'str', - 'private_profile': 'bool', - 'locale': 'FlatLocales' + 'registration_date': 'datetime' } attribute_map = { + 'username': 'username', + 'class_role': 'classRole', + 'private_profile': 'privateProfile', + 'followers_count': 'followersCount', + 'firstname': 'firstname', + 'is_power_user': 'isPowerUser', + 'locale': 'locale', + 'instruments': 'instruments', + 'html_url': 'htmlUrl', + 'liked_scores_count': 'likedScoresCount', + 'printable_name': 'printableName', + 'bio': 'bio', + 'picture_file': 'pictureFile', 'id': 'id', + 'cover_picture_file': 'coverPictureFile', + 'picture': 'picture', + 'name': 'name', + 'is_flat_team': 'isFlatTeam', + 'organization_role': 'organizationRole', + 'profile_theme': 'profileTheme', + 'cover_picture': 'coverPicture', + 'owned_public_scores_count': 'ownedPublicScoresCount', + 'lastname': 'lastname', + 'following_count': 'followingCount', + 'organization': 'organization', 'type': 'type', - 'private_profile': 'privateProfile', - 'locale': 'locale' + 'registration_date': 'registrationDate' } - def __init__(self, id=None, type=None, private_profile=None, locale=None): # noqa: E501 + def __init__(self, username=None, class_role=None, private_profile=None, followers_count=None, firstname=None, is_power_user=None, locale=None, instruments=None, html_url=None, liked_scores_count=None, printable_name=None, bio=None, picture_file=None, id=None, cover_picture_file=None, picture=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, lastname=None, following_count=None, organization=None, type=None, registration_date=None): # noqa: E501 """UserDetails - a model defined in OpenAPI""" # noqa: E501 - self._id = None - self._type = None + self._username = None + self._class_role = None self._private_profile = None + self._followers_count = None + self._firstname = None + self._is_power_user = None self._locale = None + self._instruments = None + self._html_url = None + self._liked_scores_count = None + self._printable_name = None + self._bio = None + self._picture_file = None + self._id = None + self._cover_picture_file = None + self._picture = None + self._name = None + self._is_flat_team = None + self._organization_role = None + self._profile_theme = None + self._cover_picture = None + self._owned_public_scores_count = None + self._lastname = None + self._following_count = None + self._organization = None + self._type = None + self._registration_date = None self.discriminator = None - if id is not None: - self.id = id - if type is not None: - self.type = type + if username is not None: + self.username = username + if class_role is not None: + self.class_role = class_role if private_profile is not None: self.private_profile = private_profile + if followers_count is not None: + self.followers_count = followers_count + if firstname is not None: + self.firstname = firstname + if is_power_user is not None: + self.is_power_user = is_power_user if locale is not None: self.locale = locale + if instruments is not None: + self.instruments = instruments + if html_url is not None: + self.html_url = html_url + if liked_scores_count is not None: + self.liked_scores_count = liked_scores_count + if printable_name is not None: + self.printable_name = printable_name + if bio is not None: + self.bio = bio + self.picture_file = picture_file + if id is not None: + self.id = id + self.cover_picture_file = cover_picture_file + self.picture = picture + if name is not None: + self.name = name + if is_flat_team is not None: + self.is_flat_team = is_flat_team + if organization_role is not None: + self.organization_role = organization_role + if profile_theme is not None: + self.profile_theme = profile_theme + if cover_picture is not None: + self.cover_picture = cover_picture + if owned_public_scores_count is not None: + self.owned_public_scores_count = owned_public_scores_count + if lastname is not None: + self.lastname = lastname + if following_count is not None: + self.following_count = following_count + if organization is not None: + self.organization = organization + if type is not None: + self.type = type + if registration_date is not None: + self.registration_date = registration_date @property - def id(self): - """Gets the id of this UserDetails. # noqa: E501 + def username(self): + """Gets the username of this UserDetails. # noqa: E501 - Identifier of the user # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :return: The id of this UserDetails. # noqa: E501 + :return: The username of this UserDetails. # noqa: E501 :rtype: str """ - return self._id + return self._username - @id.setter - def id(self, id): - """Sets the id of this UserDetails. + @username.setter + def username(self, username): + """Sets the username of this UserDetails. - Identifier of the user # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :param id: The id of this UserDetails. # noqa: E501 + :param username: The username of this UserDetails. # noqa: E501 :type: str """ - self._id = id + self._username = username @property - def type(self): - """Gets the type of this UserDetails. # noqa: E501 + def class_role(self): + """Gets the class_role of this UserDetails. # noqa: E501 - The type of account # noqa: E501 - :return: The type of this UserDetails. # noqa: E501 - :rtype: str + :return: The class_role of this UserDetails. # noqa: E501 + :rtype: ClassRoles """ - return self._type + return self._class_role - @type.setter - def type(self, type): - """Sets the type of this UserDetails. + @class_role.setter + def class_role(self, class_role): + """Sets the class_role of this UserDetails. - The type of account # noqa: E501 - :param type: The type of this UserDetails. # noqa: E501 - :type: str + :param class_role: The class_role of this UserDetails. # noqa: E501 + :type: ClassRoles """ - allowed_values = ["user", "guest"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - self._type = type + self._class_role = class_role @property def private_profile(self): @@ -138,6 +242,75 @@ def private_profile(self, private_profile): self._private_profile = private_profile + @property + def followers_count(self): + """Gets the followers_count of this UserDetails. # noqa: E501 + + Number of followers the user have # noqa: E501 + + :return: The followers_count of this UserDetails. # noqa: E501 + :rtype: int + """ + return self._followers_count + + @followers_count.setter + def followers_count(self, followers_count): + """Sets the followers_count of this UserDetails. + + Number of followers the user have # noqa: E501 + + :param followers_count: The followers_count of this UserDetails. # noqa: E501 + :type: int + """ + + self._followers_count = followers_count + + @property + def firstname(self): + """Gets the firstname of this UserDetails. # noqa: E501 + + Firstname of the user (for education users) # noqa: E501 + + :return: The firstname of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserDetails. + + Firstname of the user (for education users) # noqa: E501 + + :param firstname: The firstname of this UserDetails. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def is_power_user(self): + """Gets the is_power_user of this UserDetails. # noqa: E501 + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :return: The is_power_user of this UserDetails. # noqa: E501 + :rtype: bool + """ + return self._is_power_user + + @is_power_user.setter + def is_power_user(self, is_power_user): + """Sets the is_power_user of this UserDetails. + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :param is_power_user: The is_power_user of this UserDetails. # noqa: E501 + :type: bool + """ + + self._is_power_user = is_power_user + @property def locale(self): """Gets the locale of this UserDetails. # noqa: E501 @@ -159,6 +332,470 @@ def locale(self, locale): self._locale = locale + @property + def instruments(self): + """Gets the instruments of this UserDetails. # noqa: E501 + + An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + + :return: The instruments of this UserDetails. # noqa: E501 + :rtype: list[str] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this UserDetails. + + An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 + + :param instruments: The instruments of this UserDetails. # noqa: E501 + :type: list[str] + """ + + self._instruments = instruments + + @property + def html_url(self): + """Gets the html_url of this UserDetails. # noqa: E501 + + Link to user profile (for Indiv. users only) # noqa: E501 + + :return: The html_url of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this UserDetails. + + Link to user profile (for Indiv. users only) # noqa: E501 + + :param html_url: The html_url of this UserDetails. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def liked_scores_count(self): + """Gets the liked_scores_count of this UserDetails. # noqa: E501 + + Number of the scores liked by the user # noqa: E501 + + :return: The liked_scores_count of this UserDetails. # noqa: E501 + :rtype: int + """ + return self._liked_scores_count + + @liked_scores_count.setter + def liked_scores_count(self, liked_scores_count): + """Sets the liked_scores_count of this UserDetails. + + Number of the scores liked by the user # noqa: E501 + + :param liked_scores_count: The liked_scores_count of this UserDetails. # noqa: E501 + :type: int + """ + + self._liked_scores_count = liked_scores_count + + @property + def printable_name(self): + """Gets the printable_name of this UserDetails. # noqa: E501 + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :return: The printable_name of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._printable_name + + @printable_name.setter + def printable_name(self, printable_name): + """Sets the printable_name of this UserDetails. + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :param printable_name: The printable_name of this UserDetails. # noqa: E501 + :type: str + """ + + self._printable_name = printable_name + + @property + def bio(self): + """Gets the bio of this UserDetails. # noqa: E501 + + User's biography # noqa: E501 + + :return: The bio of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._bio + + @bio.setter + def bio(self, bio): + """Sets the bio of this UserDetails. + + User's biography # noqa: E501 + + :param bio: The bio of this UserDetails. # noqa: E501 + :type: str + """ + + self._bio = bio + + @property + def picture_file(self): + """Gets the picture_file of this UserDetails. # noqa: E501 + + The ID of the user profile picture # noqa: E501 + + :return: The picture_file of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._picture_file + + @picture_file.setter + def picture_file(self, picture_file): + """Sets the picture_file of this UserDetails. + + The ID of the user profile picture # noqa: E501 + + :param picture_file: The picture_file of this UserDetails. # noqa: E501 + :type: str + """ + + self._picture_file = picture_file + + @property + def id(self): + """Gets the id of this UserDetails. # noqa: E501 + + Identifier of the user # noqa: E501 + + :return: The id of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserDetails. + + Identifier of the user # noqa: E501 + + :param id: The id of this UserDetails. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def cover_picture_file(self): + """Gets the cover_picture_file of this UserDetails. # noqa: E501 + + The ID of the user profile cover picture # noqa: E501 + + :return: The cover_picture_file of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._cover_picture_file + + @cover_picture_file.setter + def cover_picture_file(self, cover_picture_file): + """Sets the cover_picture_file of this UserDetails. + + The ID of the user profile cover picture # noqa: E501 + + :param cover_picture_file: The cover_picture_file of this UserDetails. # noqa: E501 + :type: str + """ + + self._cover_picture_file = cover_picture_file + + @property + def picture(self): + """Gets the picture of this UserDetails. # noqa: E501 + + The URL of the picture to display # noqa: E501 + + :return: The picture of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._picture + + @picture.setter + def picture(self, picture): + """Sets the picture of this UserDetails. + + The URL of the picture to display # noqa: E501 + + :param picture: The picture of this UserDetails. # noqa: E501 + :type: str + """ + + self._picture = picture + + @property + def name(self): + """Gets the name of this UserDetails. # noqa: E501 + + A displayable name for the user (for consumer users) # noqa: E501 + + :return: The name of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserDetails. + + A displayable name for the user (for consumer users) # noqa: E501 + + :param name: The name of this UserDetails. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def is_flat_team(self): + """Gets the is_flat_team of this UserDetails. # noqa: E501 + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :return: The is_flat_team of this UserDetails. # noqa: E501 + :rtype: bool + """ + return self._is_flat_team + + @is_flat_team.setter + def is_flat_team(self, is_flat_team): + """Sets the is_flat_team of this UserDetails. + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :param is_flat_team: The is_flat_team of this UserDetails. # noqa: E501 + :type: bool + """ + + self._is_flat_team = is_flat_team + + @property + def organization_role(self): + """Gets the organization_role of this UserDetails. # noqa: E501 + + + :return: The organization_role of this UserDetails. # noqa: E501 + :rtype: OrganizationRoles + """ + return self._organization_role + + @organization_role.setter + def organization_role(self, organization_role): + """Sets the organization_role of this UserDetails. + + + :param organization_role: The organization_role of this UserDetails. # noqa: E501 + :type: OrganizationRoles + """ + + self._organization_role = organization_role + + @property + def profile_theme(self): + """Gets the profile_theme of this UserDetails. # noqa: E501 + + Theme (background) for the profile # noqa: E501 + + :return: The profile_theme of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._profile_theme + + @profile_theme.setter + def profile_theme(self, profile_theme): + """Sets the profile_theme of this UserDetails. + + Theme (background) for the profile # noqa: E501 + + :param profile_theme: The profile_theme of this UserDetails. # noqa: E501 + :type: str + """ + + self._profile_theme = profile_theme + + @property + def cover_picture(self): + """Gets the cover_picture of this UserDetails. # noqa: E501 + + Cover picture (backgroud) for the profile # noqa: E501 + + :return: The cover_picture of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._cover_picture + + @cover_picture.setter + def cover_picture(self, cover_picture): + """Sets the cover_picture of this UserDetails. + + Cover picture (backgroud) for the profile # noqa: E501 + + :param cover_picture: The cover_picture of this UserDetails. # noqa: E501 + :type: str + """ + + self._cover_picture = cover_picture + + @property + def owned_public_scores_count(self): + """Gets the owned_public_scores_count of this UserDetails. # noqa: E501 + + Number of public scores the user have # noqa: E501 + + :return: The owned_public_scores_count of this UserDetails. # noqa: E501 + :rtype: int + """ + return self._owned_public_scores_count + + @owned_public_scores_count.setter + def owned_public_scores_count(self, owned_public_scores_count): + """Sets the owned_public_scores_count of this UserDetails. + + Number of public scores the user have # noqa: E501 + + :param owned_public_scores_count: The owned_public_scores_count of this UserDetails. # noqa: E501 + :type: int + """ + + self._owned_public_scores_count = owned_public_scores_count + + @property + def lastname(self): + """Gets the lastname of this UserDetails. # noqa: E501 + + Lastname of the user (for education users) # noqa: E501 + + :return: The lastname of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserDetails. + + Lastname of the user (for education users) # noqa: E501 + + :param lastname: The lastname of this UserDetails. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def following_count(self): + """Gets the following_count of this UserDetails. # noqa: E501 + + Number of people the user follow # noqa: E501 + + :return: The following_count of this UserDetails. # noqa: E501 + :rtype: int + """ + return self._following_count + + @following_count.setter + def following_count(self, following_count): + """Sets the following_count of this UserDetails. + + Number of people the user follow # noqa: E501 + + :param following_count: The following_count of this UserDetails. # noqa: E501 + :type: int + """ + + self._following_count = following_count + + @property + def organization(self): + """Gets the organization of this UserDetails. # noqa: E501 + + Organization ID (for Edu users only) # noqa: E501 + + :return: The organization of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this UserDetails. + + Organization ID (for Edu users only) # noqa: E501 + + :param organization: The organization of this UserDetails. # noqa: E501 + :type: str + """ + + self._organization = organization + + @property + def type(self): + """Gets the type of this UserDetails. # noqa: E501 + + The type of account # noqa: E501 + + :return: The type of this UserDetails. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UserDetails. + + The type of account # noqa: E501 + + :param type: The type of this UserDetails. # noqa: E501 + :type: str + """ + allowed_values = ["user", "guest"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def registration_date(self): + """Gets the registration_date of this UserDetails. # noqa: E501 + + Date the user signed up # noqa: E501 + + :return: The registration_date of this UserDetails. # noqa: E501 + :rtype: datetime + """ + return self._registration_date + + @registration_date.setter + def registration_date(self, registration_date): + """Sets the registration_date of this UserDetails. + + Date the user signed up # noqa: E501 + + :param registration_date: The registration_date of this UserDetails. # noqa: E501 + :type: datetime + """ + + self._registration_date = registration_date + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index c4e3294..ab6cff2 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,54 +32,282 @@ class UserDetailsAdmin(object): and the value is json key in definition. """ openapi_types = { - 'email': 'str', + 'username': 'str', + 'picture': 'str', + 'license': 'UserDetailsAdminLicense', + 'name': 'str', + 'firstname': 'str', + 'is_power_user': 'bool', + 'is_flat_team': 'bool', + 'lastname': 'str', 'last_activity_date': 'datetime', - 'license': 'object' + 'html_url': 'str', + 'email': 'str', + 'printable_name': 'str', + 'organization_role': 'OrganizationRoles', + 'class_role': 'ClassRoles', + 'organization': 'str', + 'type': 'str', + 'id': 'str' } attribute_map = { - 'email': 'email', + 'username': 'username', + 'picture': 'picture', + 'license': 'license', + 'name': 'name', + 'firstname': 'firstname', + 'is_power_user': 'isPowerUser', + 'is_flat_team': 'isFlatTeam', + 'lastname': 'lastname', 'last_activity_date': 'lastActivityDate', - 'license': 'license' + 'html_url': 'htmlUrl', + 'email': 'email', + 'printable_name': 'printableName', + 'organization_role': 'organizationRole', + 'class_role': 'classRole', + 'organization': 'organization', + 'type': 'type', + 'id': 'id' } - def __init__(self, email=None, last_activity_date=None, license=None): # noqa: E501 + def __init__(self, username=None, picture=None, license=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, last_activity_date=None, html_url=None, email=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None): # noqa: E501 """UserDetailsAdmin - a model defined in OpenAPI""" # noqa: E501 - self._email = None - self._last_activity_date = None + self._username = None + self._picture = None self._license = None + self._name = None + self._firstname = None + self._is_power_user = None + self._is_flat_team = None + self._lastname = None + self._last_activity_date = None + self._html_url = None + self._email = None + self._printable_name = None + self._organization_role = None + self._class_role = None + self._organization = None + self._type = None + self._id = None self.discriminator = None - if email is not None: - self.email = email - if last_activity_date is not None: - self.last_activity_date = last_activity_date + if username is not None: + self.username = username + self.picture = picture if license is not None: self.license = license + if name is not None: + self.name = name + if firstname is not None: + self.firstname = firstname + if is_power_user is not None: + self.is_power_user = is_power_user + if is_flat_team is not None: + self.is_flat_team = is_flat_team + if lastname is not None: + self.lastname = lastname + if last_activity_date is not None: + self.last_activity_date = last_activity_date + if html_url is not None: + self.html_url = html_url + if email is not None: + self.email = email + if printable_name is not None: + self.printable_name = printable_name + if organization_role is not None: + self.organization_role = organization_role + if class_role is not None: + self.class_role = class_role + if organization is not None: + self.organization = organization + if type is not None: + self.type = type + if id is not None: + self.id = id @property - def email(self): - """Gets the email of this UserDetailsAdmin. # noqa: E501 + def username(self): + """Gets the username of this UserDetailsAdmin. # noqa: E501 - Email of the user # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :return: The email of this UserDetailsAdmin. # noqa: E501 + :return: The username of this UserDetailsAdmin. # noqa: E501 :rtype: str """ - return self._email + return self._username - @email.setter - def email(self, email): - """Sets the email of this UserDetailsAdmin. + @username.setter + def username(self, username): + """Sets the username of this UserDetailsAdmin. - Email of the user # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :param email: The email of this UserDetailsAdmin. # noqa: E501 + :param username: The username of this UserDetailsAdmin. # noqa: E501 :type: str """ - self._email = email + self._username = username + + @property + def picture(self): + """Gets the picture of this UserDetailsAdmin. # noqa: E501 + + The URL of the picture to display # noqa: E501 + + :return: The picture of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._picture + + @picture.setter + def picture(self, picture): + """Sets the picture of this UserDetailsAdmin. + + The URL of the picture to display # noqa: E501 + + :param picture: The picture of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._picture = picture + + @property + def license(self): + """Gets the license of this UserDetailsAdmin. # noqa: E501 + + + :return: The license of this UserDetailsAdmin. # noqa: E501 + :rtype: UserDetailsAdminLicense + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this UserDetailsAdmin. + + + :param license: The license of this UserDetailsAdmin. # noqa: E501 + :type: UserDetailsAdminLicense + """ + + self._license = license + + @property + def name(self): + """Gets the name of this UserDetailsAdmin. # noqa: E501 + + A displayable name for the user (for consumer users) # noqa: E501 + + :return: The name of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserDetailsAdmin. + + A displayable name for the user (for consumer users) # noqa: E501 + + :param name: The name of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def firstname(self): + """Gets the firstname of this UserDetailsAdmin. # noqa: E501 + + Firstname of the user (for education users) # noqa: E501 + + :return: The firstname of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserDetailsAdmin. + + Firstname of the user (for education users) # noqa: E501 + + :param firstname: The firstname of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def is_power_user(self): + """Gets the is_power_user of this UserDetailsAdmin. # noqa: E501 + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :return: The is_power_user of this UserDetailsAdmin. # noqa: E501 + :rtype: bool + """ + return self._is_power_user + + @is_power_user.setter + def is_power_user(self, is_power_user): + """Sets the is_power_user of this UserDetailsAdmin. + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :param is_power_user: The is_power_user of this UserDetailsAdmin. # noqa: E501 + :type: bool + """ + + self._is_power_user = is_power_user + + @property + def is_flat_team(self): + """Gets the is_flat_team of this UserDetailsAdmin. # noqa: E501 + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :return: The is_flat_team of this UserDetailsAdmin. # noqa: E501 + :rtype: bool + """ + return self._is_flat_team + + @is_flat_team.setter + def is_flat_team(self, is_flat_team): + """Sets the is_flat_team of this UserDetailsAdmin. + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :param is_flat_team: The is_flat_team of this UserDetailsAdmin. # noqa: E501 + :type: bool + """ + + self._is_flat_team = is_flat_team + + @property + def lastname(self): + """Gets the lastname of this UserDetailsAdmin. # noqa: E501 + + Lastname of the user (for education users) # noqa: E501 + + :return: The lastname of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserDetailsAdmin. + + Lastname of the user (for education users) # noqa: E501 + + :param lastname: The lastname of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._lastname = lastname @property def last_activity_date(self): @@ -105,27 +333,190 @@ def last_activity_date(self, last_activity_date): self._last_activity_date = last_activity_date @property - def license(self): - """Gets the license of this UserDetailsAdmin. # noqa: E501 + def html_url(self): + """Gets the html_url of this UserDetailsAdmin. # noqa: E501 - Current active license of the user # noqa: E501 + Link to user profile (for Indiv. users only) # noqa: E501 - :return: The license of this UserDetailsAdmin. # noqa: E501 - :rtype: object + :return: The html_url of this UserDetailsAdmin. # noqa: E501 + :rtype: str """ - return self._license + return self._html_url - @license.setter - def license(self, license): - """Sets the license of this UserDetailsAdmin. + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this UserDetailsAdmin. - Current active license of the user # noqa: E501 + Link to user profile (for Indiv. users only) # noqa: E501 - :param license: The license of this UserDetailsAdmin. # noqa: E501 - :type: object + :param html_url: The html_url of this UserDetailsAdmin. # noqa: E501 + :type: str """ - self._license = license + self._html_url = html_url + + @property + def email(self): + """Gets the email of this UserDetailsAdmin. # noqa: E501 + + Email of the user # noqa: E501 + + :return: The email of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this UserDetailsAdmin. + + Email of the user # noqa: E501 + + :param email: The email of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def printable_name(self): + """Gets the printable_name of this UserDetailsAdmin. # noqa: E501 + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :return: The printable_name of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._printable_name + + @printable_name.setter + def printable_name(self, printable_name): + """Sets the printable_name of this UserDetailsAdmin. + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :param printable_name: The printable_name of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._printable_name = printable_name + + @property + def organization_role(self): + """Gets the organization_role of this UserDetailsAdmin. # noqa: E501 + + + :return: The organization_role of this UserDetailsAdmin. # noqa: E501 + :rtype: OrganizationRoles + """ + return self._organization_role + + @organization_role.setter + def organization_role(self, organization_role): + """Sets the organization_role of this UserDetailsAdmin. + + + :param organization_role: The organization_role of this UserDetailsAdmin. # noqa: E501 + :type: OrganizationRoles + """ + + self._organization_role = organization_role + + @property + def class_role(self): + """Gets the class_role of this UserDetailsAdmin. # noqa: E501 + + + :return: The class_role of this UserDetailsAdmin. # noqa: E501 + :rtype: ClassRoles + """ + return self._class_role + + @class_role.setter + def class_role(self, class_role): + """Sets the class_role of this UserDetailsAdmin. + + + :param class_role: The class_role of this UserDetailsAdmin. # noqa: E501 + :type: ClassRoles + """ + + self._class_role = class_role + + @property + def organization(self): + """Gets the organization of this UserDetailsAdmin. # noqa: E501 + + Organization ID (for Edu users only) # noqa: E501 + + :return: The organization of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this UserDetailsAdmin. + + Organization ID (for Edu users only) # noqa: E501 + + :param organization: The organization of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._organization = organization + + @property + def type(self): + """Gets the type of this UserDetailsAdmin. # noqa: E501 + + The type of user account # noqa: E501 + + :return: The type of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UserDetailsAdmin. + + The type of user account # noqa: E501 + + :param type: The type of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + allowed_values = ["user", "guest"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def id(self): + """Gets the id of this UserDetailsAdmin. # noqa: E501 + + The user unique identifier # noqa: E501 + + :return: The id of this UserDetailsAdmin. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserDetailsAdmin. + + The user unique identifier # noqa: E501 + + :param id: The id of this UserDetailsAdmin. # noqa: E501 + :type: str + """ + + self._id = id def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py new file mode 100644 index 0000000..ee05d77 --- /dev/null +++ b/flat_api/models/user_details_admin_license.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class UserDetailsAdminLicense(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'expiration_date': 'datetime', + 'source': 'LicenseSources', + 'mode': 'LicenseMode', + 'active': 'bool' + } + + attribute_map = { + 'id': 'id', + 'expiration_date': 'expirationDate', + 'source': 'source', + 'mode': 'mode', + 'active': 'active' + } + + def __init__(self, id=None, expiration_date=None, source=None, mode=None, active=None): # noqa: E501 + """UserDetailsAdminLicense - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._expiration_date = None + self._source = None + self._mode = None + self._active = None + self.discriminator = None + + if id is not None: + self.id = id + if expiration_date is not None: + self.expiration_date = expiration_date + if source is not None: + self.source = source + if mode is not None: + self.mode = mode + if active is not None: + self.active = active + + @property + def id(self): + """Gets the id of this UserDetailsAdminLicense. # noqa: E501 + + ID of the current license # noqa: E501 + + :return: The id of this UserDetailsAdminLicense. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserDetailsAdminLicense. + + ID of the current license # noqa: E501 + + :param id: The id of this UserDetailsAdminLicense. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def expiration_date(self): + """Gets the expiration_date of this UserDetailsAdminLicense. # noqa: E501 + + Date when the license expires # noqa: E501 + + :return: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 + :rtype: datetime + """ + return self._expiration_date + + @expiration_date.setter + def expiration_date(self, expiration_date): + """Sets the expiration_date of this UserDetailsAdminLicense. + + Date when the license expires # noqa: E501 + + :param expiration_date: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 + :type: datetime + """ + + self._expiration_date = expiration_date + + @property + def source(self): + """Gets the source of this UserDetailsAdminLicense. # noqa: E501 + + + :return: The source of this UserDetailsAdminLicense. # noqa: E501 + :rtype: LicenseSources + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this UserDetailsAdminLicense. + + + :param source: The source of this UserDetailsAdminLicense. # noqa: E501 + :type: LicenseSources + """ + + self._source = source + + @property + def mode(self): + """Gets the mode of this UserDetailsAdminLicense. # noqa: E501 + + + :return: The mode of this UserDetailsAdminLicense. # noqa: E501 + :rtype: LicenseMode + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this UserDetailsAdminLicense. + + + :param mode: The mode of this UserDetailsAdminLicense. # noqa: E501 + :type: LicenseMode + """ + + self._mode = mode + + @property + def active(self): + """Gets the active of this UserDetailsAdminLicense. # noqa: E501 + + ID of the current license # noqa: E501 + + :return: The active of this UserDetailsAdminLicense. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this UserDetailsAdminLicense. + + ID of the current license # noqa: E501 + + :param active: The active of this UserDetailsAdminLicense. # noqa: E501 + :type: bool + """ + + self._active = active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserDetailsAdminLicense): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index 0857151..e260a41 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,125 +32,176 @@ class UserPublic(object): and the value is json key in definition. """ openapi_types = { - 'bio': 'str', - 'registration_date': 'datetime', - 'liked_scores_count': 'int', + 'username': 'str', + 'picture': 'str', 'followers_count': 'int', + 'firstname': 'str', + 'is_power_user': 'bool', + 'lastname': 'str', + 'html_url': 'str', 'following_count': 'int', - 'owned_public_scores_count': 'int', + 'liked_scores_count': 'int', + 'printable_name': 'str', + 'bio': 'str', + 'id': 'str', + 'name': 'str', + 'is_flat_team': 'bool', + 'organization_role': 'OrganizationRoles', 'profile_theme': 'str', - 'instruments': 'UserInstruments' + 'cover_picture': 'str', + 'owned_public_scores_count': 'int', + 'instruments': 'list[str]', + 'class_role': 'ClassRoles', + 'organization': 'str', + 'type': 'str', + 'registration_date': 'datetime' } attribute_map = { - 'bio': 'bio', - 'registration_date': 'registrationDate', - 'liked_scores_count': 'likedScoresCount', + 'username': 'username', + 'picture': 'picture', 'followers_count': 'followersCount', + 'firstname': 'firstname', + 'is_power_user': 'isPowerUser', + 'lastname': 'lastname', + 'html_url': 'htmlUrl', 'following_count': 'followingCount', - 'owned_public_scores_count': 'ownedPublicScoresCount', + 'liked_scores_count': 'likedScoresCount', + 'printable_name': 'printableName', + 'bio': 'bio', + 'id': 'id', + 'name': 'name', + 'is_flat_team': 'isFlatTeam', + 'organization_role': 'organizationRole', 'profile_theme': 'profileTheme', - 'instruments': 'instruments' + 'cover_picture': 'coverPicture', + 'owned_public_scores_count': 'ownedPublicScoresCount', + 'instruments': 'instruments', + 'class_role': 'classRole', + 'organization': 'organization', + 'type': 'type', + 'registration_date': 'registrationDate' } - def __init__(self, bio=None, registration_date=None, liked_scores_count=None, followers_count=None, following_count=None, owned_public_scores_count=None, profile_theme=None, instruments=None): # noqa: E501 + def __init__(self, username=None, picture=None, followers_count=None, firstname=None, is_power_user=None, lastname=None, html_url=None, following_count=None, liked_scores_count=None, printable_name=None, bio=None, id=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, instruments=None, class_role=None, organization=None, type=None, registration_date=None): # noqa: E501 """UserPublic - a model defined in OpenAPI""" # noqa: E501 - self._bio = None - self._registration_date = None - self._liked_scores_count = None + self._username = None + self._picture = None self._followers_count = None + self._firstname = None + self._is_power_user = None + self._lastname = None + self._html_url = None self._following_count = None - self._owned_public_scores_count = None + self._liked_scores_count = None + self._printable_name = None + self._bio = None + self._id = None + self._name = None + self._is_flat_team = None + self._organization_role = None self._profile_theme = None + self._cover_picture = None + self._owned_public_scores_count = None self._instruments = None + self._class_role = None + self._organization = None + self._type = None + self._registration_date = None self.discriminator = None - if bio is not None: - self.bio = bio - if registration_date is not None: - self.registration_date = registration_date - if liked_scores_count is not None: - self.liked_scores_count = liked_scores_count + if username is not None: + self.username = username + self.picture = picture if followers_count is not None: self.followers_count = followers_count + if firstname is not None: + self.firstname = firstname + if is_power_user is not None: + self.is_power_user = is_power_user + if lastname is not None: + self.lastname = lastname + if html_url is not None: + self.html_url = html_url if following_count is not None: self.following_count = following_count - if owned_public_scores_count is not None: - self.owned_public_scores_count = owned_public_scores_count + if liked_scores_count is not None: + self.liked_scores_count = liked_scores_count + if printable_name is not None: + self.printable_name = printable_name + if bio is not None: + self.bio = bio + if id is not None: + self.id = id + if name is not None: + self.name = name + if is_flat_team is not None: + self.is_flat_team = is_flat_team + if organization_role is not None: + self.organization_role = organization_role if profile_theme is not None: self.profile_theme = profile_theme + if cover_picture is not None: + self.cover_picture = cover_picture + if owned_public_scores_count is not None: + self.owned_public_scores_count = owned_public_scores_count if instruments is not None: self.instruments = instruments + if class_role is not None: + self.class_role = class_role + if organization is not None: + self.organization = organization + if type is not None: + self.type = type + if registration_date is not None: + self.registration_date = registration_date @property - def bio(self): - """Gets the bio of this UserPublic. # noqa: E501 + def username(self): + """Gets the username of this UserPublic. # noqa: E501 - User's biography # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :return: The bio of this UserPublic. # noqa: E501 + :return: The username of this UserPublic. # noqa: E501 :rtype: str """ - return self._bio + return self._username - @bio.setter - def bio(self, bio): - """Sets the bio of this UserPublic. + @username.setter + def username(self, username): + """Sets the username of this UserPublic. - User's biography # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :param bio: The bio of this UserPublic. # noqa: E501 + :param username: The username of this UserPublic. # noqa: E501 :type: str """ - self._bio = bio - - @property - def registration_date(self): - """Gets the registration_date of this UserPublic. # noqa: E501 - - Date the user signed up # noqa: E501 - - :return: The registration_date of this UserPublic. # noqa: E501 - :rtype: datetime - """ - return self._registration_date - - @registration_date.setter - def registration_date(self, registration_date): - """Sets the registration_date of this UserPublic. - - Date the user signed up # noqa: E501 - - :param registration_date: The registration_date of this UserPublic. # noqa: E501 - :type: datetime - """ - - self._registration_date = registration_date + self._username = username @property - def liked_scores_count(self): - """Gets the liked_scores_count of this UserPublic. # noqa: E501 + def picture(self): + """Gets the picture of this UserPublic. # noqa: E501 - Number of the scores liked by the user # noqa: E501 + The URL of the picture to display # noqa: E501 - :return: The liked_scores_count of this UserPublic. # noqa: E501 - :rtype: int + :return: The picture of this UserPublic. # noqa: E501 + :rtype: str """ - return self._liked_scores_count + return self._picture - @liked_scores_count.setter - def liked_scores_count(self, liked_scores_count): - """Sets the liked_scores_count of this UserPublic. + @picture.setter + def picture(self, picture): + """Sets the picture of this UserPublic. - Number of the scores liked by the user # noqa: E501 + The URL of the picture to display # noqa: E501 - :param liked_scores_count: The liked_scores_count of this UserPublic. # noqa: E501 - :type: int + :param picture: The picture of this UserPublic. # noqa: E501 + :type: str """ - self._liked_scores_count = liked_scores_count + self._picture = picture @property def followers_count(self): @@ -175,6 +226,98 @@ def followers_count(self, followers_count): self._followers_count = followers_count + @property + def firstname(self): + """Gets the firstname of this UserPublic. # noqa: E501 + + Firstname of the user (for education users) # noqa: E501 + + :return: The firstname of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserPublic. + + Firstname of the user (for education users) # noqa: E501 + + :param firstname: The firstname of this UserPublic. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def is_power_user(self): + """Gets the is_power_user of this UserPublic. # noqa: E501 + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :return: The is_power_user of this UserPublic. # noqa: E501 + :rtype: bool + """ + return self._is_power_user + + @is_power_user.setter + def is_power_user(self, is_power_user): + """Sets the is_power_user of this UserPublic. + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :param is_power_user: The is_power_user of this UserPublic. # noqa: E501 + :type: bool + """ + + self._is_power_user = is_power_user + + @property + def lastname(self): + """Gets the lastname of this UserPublic. # noqa: E501 + + Lastname of the user (for education users) # noqa: E501 + + :return: The lastname of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserPublic. + + Lastname of the user (for education users) # noqa: E501 + + :param lastname: The lastname of this UserPublic. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def html_url(self): + """Gets the html_url of this UserPublic. # noqa: E501 + + Link to user profile (for Indiv. users only) # noqa: E501 + + :return: The html_url of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this UserPublic. + + Link to user profile (for Indiv. users only) # noqa: E501 + + :param html_url: The html_url of this UserPublic. # noqa: E501 + :type: str + """ + + self._html_url = html_url + @property def following_count(self): """Gets the following_count of this UserPublic. # noqa: E501 @@ -199,27 +342,163 @@ def following_count(self, following_count): self._following_count = following_count @property - def owned_public_scores_count(self): - """Gets the owned_public_scores_count of this UserPublic. # noqa: E501 + def liked_scores_count(self): + """Gets the liked_scores_count of this UserPublic. # noqa: E501 - Number of public scores the user have # noqa: E501 + Number of the scores liked by the user # noqa: E501 - :return: The owned_public_scores_count of this UserPublic. # noqa: E501 + :return: The liked_scores_count of this UserPublic. # noqa: E501 :rtype: int """ - return self._owned_public_scores_count + return self._liked_scores_count - @owned_public_scores_count.setter - def owned_public_scores_count(self, owned_public_scores_count): - """Sets the owned_public_scores_count of this UserPublic. + @liked_scores_count.setter + def liked_scores_count(self, liked_scores_count): + """Sets the liked_scores_count of this UserPublic. - Number of public scores the user have # noqa: E501 + Number of the scores liked by the user # noqa: E501 - :param owned_public_scores_count: The owned_public_scores_count of this UserPublic. # noqa: E501 + :param liked_scores_count: The liked_scores_count of this UserPublic. # noqa: E501 :type: int """ - self._owned_public_scores_count = owned_public_scores_count + self._liked_scores_count = liked_scores_count + + @property + def printable_name(self): + """Gets the printable_name of this UserPublic. # noqa: E501 + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :return: The printable_name of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._printable_name + + @printable_name.setter + def printable_name(self, printable_name): + """Sets the printable_name of this UserPublic. + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :param printable_name: The printable_name of this UserPublic. # noqa: E501 + :type: str + """ + + self._printable_name = printable_name + + @property + def bio(self): + """Gets the bio of this UserPublic. # noqa: E501 + + User's biography # noqa: E501 + + :return: The bio of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._bio + + @bio.setter + def bio(self, bio): + """Sets the bio of this UserPublic. + + User's biography # noqa: E501 + + :param bio: The bio of this UserPublic. # noqa: E501 + :type: str + """ + + self._bio = bio + + @property + def id(self): + """Gets the id of this UserPublic. # noqa: E501 + + The user unique identifier # noqa: E501 + + :return: The id of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserPublic. + + The user unique identifier # noqa: E501 + + :param id: The id of this UserPublic. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this UserPublic. # noqa: E501 + + A displayable name for the user (for consumer users) # noqa: E501 + + :return: The name of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserPublic. + + A displayable name for the user (for consumer users) # noqa: E501 + + :param name: The name of this UserPublic. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def is_flat_team(self): + """Gets the is_flat_team of this UserPublic. # noqa: E501 + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :return: The is_flat_team of this UserPublic. # noqa: E501 + :rtype: bool + """ + return self._is_flat_team + + @is_flat_team.setter + def is_flat_team(self, is_flat_team): + """Sets the is_flat_team of this UserPublic. + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :param is_flat_team: The is_flat_team of this UserPublic. # noqa: E501 + :type: bool + """ + + self._is_flat_team = is_flat_team + + @property + def organization_role(self): + """Gets the organization_role of this UserPublic. # noqa: E501 + + + :return: The organization_role of this UserPublic. # noqa: E501 + :rtype: OrganizationRoles + """ + return self._organization_role + + @organization_role.setter + def organization_role(self, organization_role): + """Sets the organization_role of this UserPublic. + + + :param organization_role: The organization_role of this UserPublic. # noqa: E501 + :type: OrganizationRoles + """ + + self._organization_role = organization_role @property def profile_theme(self): @@ -244,13 +523,60 @@ def profile_theme(self, profile_theme): self._profile_theme = profile_theme + @property + def cover_picture(self): + """Gets the cover_picture of this UserPublic. # noqa: E501 + + Cover picture (backgroud) for the profile # noqa: E501 + + :return: The cover_picture of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._cover_picture + + @cover_picture.setter + def cover_picture(self, cover_picture): + """Sets the cover_picture of this UserPublic. + + Cover picture (backgroud) for the profile # noqa: E501 + + :param cover_picture: The cover_picture of this UserPublic. # noqa: E501 + :type: str + """ + + self._cover_picture = cover_picture + + @property + def owned_public_scores_count(self): + """Gets the owned_public_scores_count of this UserPublic. # noqa: E501 + + Number of public scores the user have # noqa: E501 + + :return: The owned_public_scores_count of this UserPublic. # noqa: E501 + :rtype: int + """ + return self._owned_public_scores_count + + @owned_public_scores_count.setter + def owned_public_scores_count(self, owned_public_scores_count): + """Sets the owned_public_scores_count of this UserPublic. + + Number of public scores the user have # noqa: E501 + + :param owned_public_scores_count: The owned_public_scores_count of this UserPublic. # noqa: E501 + :type: int + """ + + self._owned_public_scores_count = owned_public_scores_count + @property def instruments(self): """Gets the instruments of this UserPublic. # noqa: E501 + An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 :return: The instruments of this UserPublic. # noqa: E501 - :rtype: UserInstruments + :rtype: list[str] """ return self._instruments @@ -258,13 +584,110 @@ def instruments(self): def instruments(self, instruments): """Sets the instruments of this UserPublic. + An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 :param instruments: The instruments of this UserPublic. # noqa: E501 - :type: UserInstruments + :type: list[str] """ self._instruments = instruments + @property + def class_role(self): + """Gets the class_role of this UserPublic. # noqa: E501 + + + :return: The class_role of this UserPublic. # noqa: E501 + :rtype: ClassRoles + """ + return self._class_role + + @class_role.setter + def class_role(self, class_role): + """Sets the class_role of this UserPublic. + + + :param class_role: The class_role of this UserPublic. # noqa: E501 + :type: ClassRoles + """ + + self._class_role = class_role + + @property + def organization(self): + """Gets the organization of this UserPublic. # noqa: E501 + + Organization ID (for Edu users only) # noqa: E501 + + :return: The organization of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this UserPublic. + + Organization ID (for Edu users only) # noqa: E501 + + :param organization: The organization of this UserPublic. # noqa: E501 + :type: str + """ + + self._organization = organization + + @property + def type(self): + """Gets the type of this UserPublic. # noqa: E501 + + The type of user account # noqa: E501 + + :return: The type of this UserPublic. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UserPublic. + + The type of user account # noqa: E501 + + :param type: The type of this UserPublic. # noqa: E501 + :type: str + """ + allowed_values = ["user", "guest"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def registration_date(self): + """Gets the registration_date of this UserPublic. # noqa: E501 + + Date the user signed up # noqa: E501 + + :return: The registration_date of this UserPublic. # noqa: E501 + :rtype: datetime + """ + return self._registration_date + + @registration_date.setter + def registration_date(self, registration_date): + """Sets the registration_date of this UserPublic. + + Date the user signed up # noqa: E501 + + :param registration_date: The registration_date of this UserPublic. # noqa: E501 + :type: datetime + """ + + self._registration_date = registration_date + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index b222d3a..ec75acd 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -32,59 +32,292 @@ class UserPublicSummary(object): and the value is json key in definition. """ openapi_types = { - 'organization': 'str', + 'username': 'str', + 'picture': 'str', + 'name': 'str', + 'firstname': 'str', + 'is_power_user': 'bool', + 'is_flat_team': 'bool', + 'lastname': 'str', + 'html_url': 'str', + 'printable_name': 'str', 'organization_role': 'OrganizationRoles', 'class_role': 'ClassRoles', - 'html_url': 'str' + 'organization': 'str', + 'type': 'str', + 'id': 'str' } attribute_map = { - 'organization': 'organization', + 'username': 'username', + 'picture': 'picture', + 'name': 'name', + 'firstname': 'firstname', + 'is_power_user': 'isPowerUser', + 'is_flat_team': 'isFlatTeam', + 'lastname': 'lastname', + 'html_url': 'htmlUrl', + 'printable_name': 'printableName', 'organization_role': 'organizationRole', 'class_role': 'classRole', - 'html_url': 'htmlUrl' + 'organization': 'organization', + 'type': 'type', + 'id': 'id' } - def __init__(self, organization=None, organization_role=None, class_role=None, html_url=None): # noqa: E501 + def __init__(self, username=None, picture=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, html_url=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None): # noqa: E501 """UserPublicSummary - a model defined in OpenAPI""" # noqa: E501 - self._organization = None + self._username = None + self._picture = None + self._name = None + self._firstname = None + self._is_power_user = None + self._is_flat_team = None + self._lastname = None + self._html_url = None + self._printable_name = None self._organization_role = None self._class_role = None - self._html_url = None + self._organization = None + self._type = None + self._id = None self.discriminator = None - if organization is not None: - self.organization = organization + if username is not None: + self.username = username + self.picture = picture + if name is not None: + self.name = name + if firstname is not None: + self.firstname = firstname + if is_power_user is not None: + self.is_power_user = is_power_user + if is_flat_team is not None: + self.is_flat_team = is_flat_team + if lastname is not None: + self.lastname = lastname + if html_url is not None: + self.html_url = html_url + if printable_name is not None: + self.printable_name = printable_name if organization_role is not None: self.organization_role = organization_role if class_role is not None: self.class_role = class_role - if html_url is not None: - self.html_url = html_url + if organization is not None: + self.organization = organization + if type is not None: + self.type = type + if id is not None: + self.id = id @property - def organization(self): - """Gets the organization of this UserPublicSummary. # noqa: E501 + def username(self): + """Gets the username of this UserPublicSummary. # noqa: E501 - Organization ID (for Edu users only) # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :return: The organization of this UserPublicSummary. # noqa: E501 + :return: The username of this UserPublicSummary. # noqa: E501 :rtype: str """ - return self._organization + return self._username - @organization.setter - def organization(self, organization): - """Sets the organization of this UserPublicSummary. + @username.setter + def username(self, username): + """Sets the username of this UserPublicSummary. - Organization ID (for Edu users only) # noqa: E501 + The user name (unique for the organization) # noqa: E501 - :param organization: The organization of this UserPublicSummary. # noqa: E501 + :param username: The username of this UserPublicSummary. # noqa: E501 :type: str """ - self._organization = organization + self._username = username + + @property + def picture(self): + """Gets the picture of this UserPublicSummary. # noqa: E501 + + The URL of the picture to display # noqa: E501 + + :return: The picture of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._picture + + @picture.setter + def picture(self, picture): + """Sets the picture of this UserPublicSummary. + + The URL of the picture to display # noqa: E501 + + :param picture: The picture of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._picture = picture + + @property + def name(self): + """Gets the name of this UserPublicSummary. # noqa: E501 + + A displayable name for the user (for consumer users) # noqa: E501 + + :return: The name of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserPublicSummary. + + A displayable name for the user (for consumer users) # noqa: E501 + + :param name: The name of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def firstname(self): + """Gets the firstname of this UserPublicSummary. # noqa: E501 + + Firstname of the user (for education users) # noqa: E501 + + :return: The firstname of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this UserPublicSummary. + + Firstname of the user (for education users) # noqa: E501 + + :param firstname: The firstname of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def is_power_user(self): + """Gets the is_power_user of this UserPublicSummary. # noqa: E501 + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :return: The is_power_user of this UserPublicSummary. # noqa: E501 + :rtype: bool + """ + return self._is_power_user + + @is_power_user.setter + def is_power_user(self, is_power_user): + """Sets the is_power_user of this UserPublicSummary. + + User license status. 'true' if user is an individual Power user # noqa: E501 + + :param is_power_user: The is_power_user of this UserPublicSummary. # noqa: E501 + :type: bool + """ + + self._is_power_user = is_power_user + + @property + def is_flat_team(self): + """Gets the is_flat_team of this UserPublicSummary. # noqa: E501 + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :return: The is_flat_team of this UserPublicSummary. # noqa: E501 + :rtype: bool + """ + return self._is_flat_team + + @is_flat_team.setter + def is_flat_team(self, is_flat_team): + """Sets the is_flat_team of this UserPublicSummary. + + Will be 'true' if user is part of the Flat Team # noqa: E501 + + :param is_flat_team: The is_flat_team of this UserPublicSummary. # noqa: E501 + :type: bool + """ + + self._is_flat_team = is_flat_team + + @property + def lastname(self): + """Gets the lastname of this UserPublicSummary. # noqa: E501 + + Lastname of the user (for education users) # noqa: E501 + + :return: The lastname of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this UserPublicSummary. + + Lastname of the user (for education users) # noqa: E501 + + :param lastname: The lastname of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def html_url(self): + """Gets the html_url of this UserPublicSummary. # noqa: E501 + + Link to user profile (for Indiv. users only) # noqa: E501 + + :return: The html_url of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this UserPublicSummary. + + Link to user profile (for Indiv. users only) # noqa: E501 + + :param html_url: The html_url of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def printable_name(self): + """Gets the printable_name of this UserPublicSummary. # noqa: E501 + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :return: The printable_name of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._printable_name + + @printable_name.setter + def printable_name(self, printable_name): + """Sets the printable_name of this UserPublicSummary. + + The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 + + :param printable_name: The printable_name of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._printable_name = printable_name @property def organization_role(self): @@ -129,27 +362,79 @@ def class_role(self, class_role): self._class_role = class_role @property - def html_url(self): - """Gets the html_url of this UserPublicSummary. # noqa: E501 + def organization(self): + """Gets the organization of this UserPublicSummary. # noqa: E501 - Link to user profile (for Indiv. users only) # noqa: E501 + Organization ID (for Edu users only) # noqa: E501 - :return: The html_url of this UserPublicSummary. # noqa: E501 + :return: The organization of this UserPublicSummary. # noqa: E501 :rtype: str """ - return self._html_url + return self._organization - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this UserPublicSummary. + @organization.setter + def organization(self, organization): + """Sets the organization of this UserPublicSummary. - Link to user profile (for Indiv. users only) # noqa: E501 + Organization ID (for Edu users only) # noqa: E501 - :param html_url: The html_url of this UserPublicSummary. # noqa: E501 + :param organization: The organization of this UserPublicSummary. # noqa: E501 :type: str """ - self._html_url = html_url + self._organization = organization + + @property + def type(self): + """Gets the type of this UserPublicSummary. # noqa: E501 + + The type of user account # noqa: E501 + + :return: The type of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this UserPublicSummary. + + The type of user account # noqa: E501 + + :param type: The type of this UserPublicSummary. # noqa: E501 + :type: str + """ + allowed_values = ["user", "guest"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def id(self): + """Gets the id of this UserPublicSummary. # noqa: E501 + + The user unique identifier # noqa: E501 + + :return: The id of this UserPublicSummary. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserPublicSummary. + + The user unique identifier # noqa: E501 + + :param id: The id of this UserPublicSummary. # noqa: E501 + :type: str + """ + + self._id = id def to_dict(self): """Returns the model properties as a dict""" diff --git a/flat_api/rest.py b/flat_api/rest.py index 6af6574..fd126e7 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index 67cf3c2..10a0249 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,10 @@ # coding: utf-8 """ - Flat API + Flat API 2.17.0 - OpenAPI spec version: 2.0.0 + OpenAPI spec version: Contact: developers@flat.io - Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -45,7 +44,7 @@ include_package_data=True, license="Apache", classifiers=[ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", @@ -53,10 +52,11 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: POSIX", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Topic :: Artistic Software", "Topic :: Education", "Topic :: Multimedia :: Sound/Audio" diff --git a/test/test_account_api.py b/test/test_account_api.py index e346fe3..8ce4099 100644 --- a/test/test_account_api.py +++ b/test/test_account_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_instruments.py b/test/test_api_access_token.py similarity index 69% rename from test/test_user_instruments.py rename to test/test_api_access_token.py index c5e0ae7..07fc12c 100644 --- a/test/test_user_instruments.py +++ b/test/test_api_access_token.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,12 +16,12 @@ import unittest import flat_api -from flat_api.models.user_instruments import UserInstruments # noqa: E501 +from flat_api.models.api_access_token import ApiAccessToken # noqa: E501 from flat_api.rest import ApiException -class TestUserInstruments(unittest.TestCase): - """UserInstruments unit test stubs""" +class TestApiAccessToken(unittest.TestCase): + """ApiAccessToken unit test stubs""" def setUp(self): pass @@ -29,10 +29,10 @@ def setUp(self): def tearDown(self): pass - def testUserInstruments(self): - """Test UserInstruments""" + def testApiAccessToken(self): + """Test ApiAccessToken""" # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_instruments.UserInstruments() # noqa: E501 + # model = flat_api.models.api_access_token.ApiAccessToken() # noqa: E501 pass diff --git a/test/test_user_basics.py b/test/test_app_scopes.py similarity index 70% rename from test/test_user_basics.py rename to test/test_app_scopes.py index 0d02c34..ee412da 100644 --- a/test/test_user_basics.py +++ b/test/test_app_scopes.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,12 +16,12 @@ import unittest import flat_api -from flat_api.models.user_basics import UserBasics # noqa: E501 +from flat_api.models.app_scopes import AppScopes # noqa: E501 from flat_api.rest import ApiException -class TestUserBasics(unittest.TestCase): - """UserBasics unit test stubs""" +class TestAppScopes(unittest.TestCase): + """AppScopes unit test stubs""" def setUp(self): pass @@ -29,10 +29,10 @@ def setUp(self): def tearDown(self): pass - def testUserBasics(self): - """Test UserBasics""" + def testAppScopes(self): + """Test AppScopes""" # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_basics.UserBasics() # noqa: E501 + # model = flat_api.models.app_scopes.AppScopes() # noqa: E501 pass diff --git a/test/test_assignment.py b/test/test_assignment.py index ebeb18e..4af8cc3 100644 --- a/test/test_assignment.py +++ b/test/test_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_data_encoding.py b/test/test_assignment_canvas.py similarity index 69% rename from test/test_score_data_encoding.py rename to test/test_assignment_canvas.py index cd93f90..dbb0754 100644 --- a/test/test_score_data_encoding.py +++ b/test/test_assignment_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,12 +16,12 @@ import unittest import flat_api -from flat_api.models.score_data_encoding import ScoreDataEncoding # noqa: E501 +from flat_api.models.assignment_canvas import AssignmentCanvas # noqa: E501 from flat_api.rest import ApiException -class TestScoreDataEncoding(unittest.TestCase): - """ScoreDataEncoding unit test stubs""" +class TestAssignmentCanvas(unittest.TestCase): + """AssignmentCanvas unit test stubs""" def setUp(self): pass @@ -29,10 +29,10 @@ def setUp(self): def tearDown(self): pass - def testScoreDataEncoding(self): - """Test ScoreDataEncoding""" + def testAssignmentCanvas(self): + """Test AssignmentCanvas""" # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_data_encoding.ScoreDataEncoding() # noqa: E501 + # model = flat_api.models.assignment_canvas.AssignmentCanvas() # noqa: E501 pass diff --git a/test/test_assignment_copy.py b/test/test_assignment_copy.py index 28fa637..f17004a 100644 --- a/test/test_assignment_copy.py +++ b/test/test_assignment_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_creation.py b/test/test_assignment_creation.py index 34d0196..e0cbb6a 100644 --- a/test/test_assignment_creation.py +++ b/test/test_assignment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_creation_google_classroom.py b/test/test_assignment_creation_google_classroom.py new file mode 100644 index 0000000..ac5fa2c --- /dev/null +++ b/test/test_assignment_creation_google_classroom.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentCreationGoogleClassroom(unittest.TestCase): + """AssignmentCreationGoogleClassroom unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCreationGoogleClassroom(self): + """Test AssignmentCreationGoogleClassroom""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_creation_google_classroom.AssignmentCreationGoogleClassroom() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_creation_microsoft_graph.py b/test/test_assignment_creation_microsoft_graph.py new file mode 100644 index 0000000..f350999 --- /dev/null +++ b/test/test_assignment_creation_microsoft_graph.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentCreationMicrosoftGraph(unittest.TestCase): + """AssignmentCreationMicrosoftGraph unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCreationMicrosoftGraph(self): + """Test AssignmentCreationMicrosoftGraph""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_creation_microsoft_graph.AssignmentCreationMicrosoftGraph() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_lti.py b/test/test_assignment_lti.py new file mode 100644 index 0000000..7a8d937 --- /dev/null +++ b/test/test_assignment_lti.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_lti import AssignmentLti # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentLti(unittest.TestCase): + """AssignmentLti unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentLti(self): + """Test AssignmentLti""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_lti.AssignmentLti() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_mfc.py b/test/test_assignment_mfc.py new file mode 100644 index 0000000..9e210a3 --- /dev/null +++ b/test/test_assignment_mfc.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_mfc import AssignmentMfc # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentMfc(unittest.TestCase): + """AssignmentMfc unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentMfc(self): + """Test AssignmentMfc""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_mfc.AssignmentMfc() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission.py b/test/test_assignment_submission.py index 162a70e..3c575e4 100644 --- a/test/test_assignment_submission.py +++ b/test/test_assignment_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_submission_comment.py b/test/test_assignment_submission_comment.py new file mode 100644 index 0000000..4a6bc76 --- /dev/null +++ b/test/test_assignment_submission_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionComment(unittest.TestCase): + """AssignmentSubmissionComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionComment(self): + """Test AssignmentSubmissionComment""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_comment.AssignmentSubmissionComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_comment_creation.py b/test/test_assignment_submission_comment_creation.py new file mode 100644 index 0000000..a19f908 --- /dev/null +++ b/test/test_assignment_submission_comment_creation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionCommentCreation(unittest.TestCase): + """AssignmentSubmissionCommentCreation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionCommentCreation(self): + """Test AssignmentSubmissionCommentCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_comment_creation.AssignmentSubmissionCommentCreation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_history.py b/test/test_assignment_submission_history.py new file mode 100644 index 0000000..78f2560 --- /dev/null +++ b/test/test_assignment_submission_history.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionHistory(unittest.TestCase): + """AssignmentSubmissionHistory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionHistory(self): + """Test AssignmentSubmissionHistory""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_history.AssignmentSubmissionHistory() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_history_attachment.py b/test/test_assignment_submission_history_attachment.py new file mode 100644 index 0000000..2cb0524 --- /dev/null +++ b/test/test_assignment_submission_history_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionHistoryAttachment(unittest.TestCase): + """AssignmentSubmissionHistoryAttachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionHistoryAttachment(self): + """Test AssignmentSubmissionHistoryAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_history_attachment.AssignmentSubmissionHistoryAttachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_state.py b/test/test_assignment_submission_state.py new file mode 100644 index 0000000..2a13cbe --- /dev/null +++ b/test/test_assignment_submission_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_state import AssignmentSubmissionState # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionState(unittest.TestCase): + """AssignmentSubmissionState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionState(self): + """Test AssignmentSubmissionState""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_state.AssignmentSubmissionState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_update.py b/test/test_assignment_submission_update.py index 2e669d9..508579b 100644 --- a/test/test_assignment_submission_update.py +++ b/test/test_assignment_submission_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_assignment_submission_update_comments.py b/test/test_assignment_submission_update_comments.py new file mode 100644 index 0000000..b662d3d --- /dev/null +++ b/test/test_assignment_submission_update_comments.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentSubmissionUpdateComments(unittest.TestCase): + """AssignmentSubmissionUpdateComments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionUpdateComments(self): + """Test AssignmentSubmissionUpdateComments""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_submission_update_comments.AssignmentSubmissionUpdateComments() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_type.py b/test/test_assignment_type.py new file mode 100644 index 0000000..ac46c44 --- /dev/null +++ b/test/test_assignment_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.assignment_type import AssignmentType # noqa: E501 +from flat_api.rest import ApiException + + +class TestAssignmentType(unittest.TestCase): + """AssignmentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentType(self): + """Test AssignmentType""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.assignment_type.AssignmentType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_api.py b/test/test_class_api.py index 4c249d3..f98836c 100644 --- a/test/test_class_api.py +++ b/test/test_class_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -43,6 +43,13 @@ def test_add_class_user(self): """ pass + def test_archive_assignment(self): + """Test case for archive_assignment + + Archive the assignment # noqa: E501 + """ + pass + def test_archive_class(self): """Test case for archive_class @@ -85,6 +92,20 @@ def test_delete_class_user(self): """ pass + def test_delete_submission(self): + """Test case for delete_submission + + Delete a submission # noqa: E501 + """ + pass + + def test_delete_submission_comment(self): + """Test case for delete_submission_comment + + Delete a feedback comment to a submission # noqa: E501 + """ + pass + def test_edit_submission(self): """Test case for edit_submission @@ -99,6 +120,27 @@ def test_enroll_class(self): """ pass + def test_export_submissions_reviews_as_csv(self): + """Test case for export_submissions_reviews_as_csv + + CSV Grades exports # noqa: E501 + """ + pass + + def test_export_submissions_reviews_as_excel(self): + """Test case for export_submissions_reviews_as_excel + + Excel Grades exports # noqa: E501 + """ + pass + + def test_fork_score(self): + """Test case for fork_score + + Fork a score # noqa: E501 + """ + pass + def test_get_class(self): """Test case for get_class @@ -120,6 +162,20 @@ def test_get_submission(self): """ pass + def test_get_submission_comments(self): + """Test case for get_submission_comments + + List the feedback comments of a submission # noqa: E501 + """ + pass + + def test_get_submission_history(self): + """Test case for get_submission_history + + Get the history of the submission # noqa: E501 + """ + pass + def test_get_submissions(self): """Test case for get_submissions @@ -148,6 +204,20 @@ def test_list_classes(self): """ pass + def test_post_submission_comment(self): + """Test case for post_submission_comment + + Add a feedback comment to a submission # noqa: E501 + """ + pass + + def test_unarchive_assignment(self): + """Test case for unarchive_assignment + + Unarchive the assignment. # noqa: E501 + """ + pass + def test_unarchive_class(self): """Test case for unarchive_class @@ -162,6 +232,13 @@ def test_update_class(self): """ pass + def test_update_submission_comment(self): + """Test case for update_submission_comment + + Update a feedback comment to a submission # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_class_attachment_creation.py b/test/test_class_attachment_creation.py index d71abcd..6aba661 100644 --- a/test/test_class_attachment_creation.py +++ b/test/test_class_attachment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_creation.py b/test/test_class_creation.py index 2f51b37..46d7f75 100644 --- a/test/test_class_creation.py +++ b/test/test_class_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details.py b/test/test_class_details.py index db4a798..8c349f9 100644 --- a/test/test_class_details.py +++ b/test/test_class_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py index 3f21ac1..1e22c34 100644 --- a/test/test_class_details_canvas.py +++ b/test/test_class_details_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py index 1d1d242..b882c13 100644 --- a/test/test_class_details_clever.py +++ b/test/test_class_details_clever.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py index aa1c1d5..9bd8aa2 100644 --- a/test/test_class_details_google_classroom.py +++ b/test/test_class_details_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py index c1a33f2..2550674 100644 --- a/test/test_class_details_google_drive.py +++ b/test/test_class_details_google_drive.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_issues.py b/test/test_class_details_issues.py new file mode 100644 index 0000000..a8dcee2 --- /dev/null +++ b/test/test_class_details_issues.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.class_details_issues import ClassDetailsIssues # noqa: E501 +from flat_api.rest import ApiException + + +class TestClassDetailsIssues(unittest.TestCase): + """ClassDetailsIssues unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsIssues(self): + """Test ClassDetailsIssues""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.class_details_issues.ClassDetailsIssues() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_issues_sync.py b/test/test_class_details_issues_sync.py new file mode 100644 index 0000000..79cf74e --- /dev/null +++ b/test/test_class_details_issues_sync.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync # noqa: E501 +from flat_api.rest import ApiException + + +class TestClassDetailsIssuesSync(unittest.TestCase): + """ClassDetailsIssuesSync unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsIssuesSync(self): + """Test ClassDetailsIssuesSync""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.class_details_issues_sync.ClassDetailsIssuesSync() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py index 369fb2a..1d56555 100644 --- a/test/test_class_details_lti.py +++ b/test/test_class_details_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_details_mfc.py b/test/test_class_details_mfc.py new file mode 100644 index 0000000..db58c54 --- /dev/null +++ b/test/test_class_details_mfc.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.class_details_mfc import ClassDetailsMfc # noqa: E501 +from flat_api.rest import ApiException + + +class TestClassDetailsMfc(unittest.TestCase): + """ClassDetailsMfc unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsMfc(self): + """Test ClassDetailsMfc""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.class_details_mfc.ClassDetailsMfc() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_microsoft_graph.py b/test/test_class_details_microsoft_graph.py new file mode 100644 index 0000000..a3ba6b1 --- /dev/null +++ b/test/test_class_details_microsoft_graph.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph # noqa: E501 +from flat_api.rest import ApiException + + +class TestClassDetailsMicrosoftGraph(unittest.TestCase): + """ClassDetailsMicrosoftGraph unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsMicrosoftGraph(self): + """Test ClassDetailsMicrosoftGraph""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.class_details_microsoft_graph.ClassDetailsMicrosoftGraph() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_roles.py b/test/test_class_roles.py index ea06366..307f025 100644 --- a/test/test_class_roles.py +++ b/test/test_class_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_state.py b/test/test_class_state.py index f83b2b8..c485624 100644 --- a/test/test_class_state.py +++ b/test/test_class_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_class_update.py b/test/test_class_update.py index a81151e..f122eb6 100644 --- a/test/test_class_update.py +++ b/test/test_class_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection.py b/test/test_collection.py index 791d6a0..4e9c045 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_api.py b/test/test_collection_api.py index 3285c76..2a50b45 100644 --- a/test/test_collection_api.py +++ b/test/test_collection_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_app.py b/test/test_collection_app.py new file mode 100644 index 0000000..7a67ece --- /dev/null +++ b/test/test_collection_app.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.collection_app import CollectionApp # noqa: E501 +from flat_api.rest import ApiException + + +class TestCollectionApp(unittest.TestCase): + """CollectionApp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionApp(self): + """Test CollectionApp""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.collection_app.CollectionApp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py index 27645f8..f66e8c4 100644 --- a/test/test_collection_capabilities.py +++ b/test/test_collection_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_creation.py b/test/test_collection_creation.py index e9cae2c..3719a83 100644 --- a/test/test_collection_creation.py +++ b/test/test_collection_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_modification.py b/test/test_collection_modification.py index e06873c..43ea6a5 100644 --- a/test/test_collection_modification.py +++ b/test/test_collection_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_privacy.py b/test/test_collection_privacy.py index 9db2dc3..f26d6c8 100644 --- a/test/test_collection_privacy.py +++ b/test/test_collection_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_collection_type.py b/test/test_collection_type.py index 5aa6b83..8ea6a36 100644 --- a/test/test_collection_type.py +++ b/test/test_collection_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_flat_error_response.py b/test/test_flat_error_response.py index a3f8e28..b261f97 100644 --- a/test/test_flat_error_response.py +++ b/test/test_flat_error_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_flat_locales.py b/test/test_flat_locales.py index 8c023bf..db6b822 100644 --- a/test/test_flat_locales.py +++ b/test/test_flat_locales.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_google_classroom_coursework.py b/test/test_google_classroom_coursework.py index a3365a8..6320247 100644 --- a/test/test_google_classroom_coursework.py +++ b/test/test_google_classroom_coursework.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_google_classroom_submission.py b/test/test_google_classroom_submission.py index 9ab4e42..e37ce7d 100644 --- a/test/test_google_classroom_submission.py +++ b/test/test_google_classroom_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_group.py b/test/test_group.py index e7ab4c6..f574b5a 100644 --- a/test/test_group.py +++ b/test/test_group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_api.py b/test/test_group_api.py index 18ef3a4..53cca48 100644 --- a/test/test_group_api.py +++ b/test/test_group_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_details.py b/test/test_group_details.py index 562b980..165bc8a 100644 --- a/test/test_group_details.py +++ b/test/test_group_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_group_type.py b/test/test_group_type.py index 783dbf9..eb18109 100644 --- a/test/test_group_type.py +++ b/test/test_group_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_license_mode.py b/test/test_license_mode.py index 3e100f4..c7bfd71 100644 --- a/test/test_license_mode.py +++ b/test/test_license_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_license_sources.py b/test/test_license_sources.py index a1c09b9..5e9aa62 100644 --- a/test/test_license_sources.py +++ b/test/test_license_sources.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_lms_name.py b/test/test_lms_name.py index 5e2f9de..87a62ad 100644 --- a/test/test_lms_name.py +++ b/test/test_lms_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_lti_credentials.py b/test/test_lti_credentials.py index f113c77..b9b4ceb 100644 --- a/test/test_lti_credentials.py +++ b/test/test_lti_credentials.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_lti_credentials_creation.py b/test/test_lti_credentials_creation.py index 28bac35..5431e9a 100644 --- a/test/test_lti_credentials_creation.py +++ b/test/test_lti_credentials_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_media_attachment.py b/test/test_media_attachment.py index a101743..bd7cc5e 100644 --- a/test/test_media_attachment.py +++ b/test/test_media_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_media_score_sharing_mode.py b/test/test_media_score_sharing_mode.py index 276fbb0..4bb5efc 100644 --- a/test/test_media_score_sharing_mode.py +++ b/test/test_media_score_sharing_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_microsoft_graph_assignment.py b/test/test_microsoft_graph_assignment.py new file mode 100644 index 0000000..adc78d3 --- /dev/null +++ b/test/test_microsoft_graph_assignment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment # noqa: E501 +from flat_api.rest import ApiException + + +class TestMicrosoftGraphAssignment(unittest.TestCase): + """MicrosoftGraphAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMicrosoftGraphAssignment(self): + """Test MicrosoftGraphAssignment""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.microsoft_graph_assignment.MicrosoftGraphAssignment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_microsoft_graph_submission.py b/test/test_microsoft_graph_submission.py new file mode 100644 index 0000000..f868a88 --- /dev/null +++ b/test/test_microsoft_graph_submission.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission # noqa: E501 +from flat_api.rest import ApiException + + +class TestMicrosoftGraphSubmission(unittest.TestCase): + """MicrosoftGraphSubmission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMicrosoftGraphSubmission(self): + """Test MicrosoftGraphSubmission""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.microsoft_graph_submission.MicrosoftGraphSubmission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py index 8ac5933..2fa732f 100644 --- a/test/test_organization_api.py +++ b/test/test_organization_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -29,6 +29,13 @@ def setUp(self): def tearDown(self): pass + def test_count_orga_users(self): + """Test case for count_orga_users + + Count the organization users using the provided filters # noqa: E501 + """ + pass + def test_create_lti_credentials(self): """Test case for create_lti_credentials @@ -50,6 +57,20 @@ def test_create_organization_user(self): """ pass + def test_create_organization_user_access_token(self): + """Test case for create_organization_user_access_token + + Create a delegated API access token for an organization user # noqa: E501 + """ + pass + + def test_create_organization_user_signin_link(self): + """Test case for create_organization_user_signin_link + + Create a sign in link for an organization user # noqa: E501 + """ + pass + def test_list_lti_credentials(self): """Test case for list_lti_credentials diff --git a/test/test_organization_invitation.py b/test/test_organization_invitation.py index 7a03b68..694efc0 100644 --- a/test/test_organization_invitation.py +++ b/test/test_organization_invitation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_invitation_creation.py b/test/test_organization_invitation_creation.py index 0f88e8f..c37e7ba 100644 --- a/test/test_organization_invitation_creation.py +++ b/test/test_organization_invitation_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_roles.py b/test/test_organization_roles.py index 4d71451..a37b966 100644 --- a/test/test_organization_roles.py +++ b/test/test_organization_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_organization_user_access_token_creation.py b/test/test_organization_user_access_token_creation.py new file mode 100644 index 0000000..d8b6878 --- /dev/null +++ b/test/test_organization_user_access_token_creation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation # noqa: E501 +from flat_api.rest import ApiException + + +class TestOrganizationUserAccessTokenCreation(unittest.TestCase): + """OrganizationUserAccessTokenCreation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationUserAccessTokenCreation(self): + """Test OrganizationUserAccessTokenCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.organization_user_access_token_creation.OrganizationUserAccessTokenCreation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_user_signin_link.py b/test/test_organization_user_signin_link.py new file mode 100644 index 0000000..2dc77ab --- /dev/null +++ b/test/test_organization_user_signin_link.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink # noqa: E501 +from flat_api.rest import ApiException + + +class TestOrganizationUserSigninLink(unittest.TestCase): + """OrganizationUserSigninLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationUserSigninLink(self): + """Test OrganizationUserSigninLink""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.organization_user_signin_link.OrganizationUserSigninLink() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_user_signin_link_creation.py b/test/test_organization_user_signin_link_creation.py new file mode 100644 index 0000000..b7696ba --- /dev/null +++ b/test/test_organization_user_signin_link_creation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation # noqa: E501 +from flat_api.rest import ApiException + + +class TestOrganizationUserSigninLinkCreation(unittest.TestCase): + """OrganizationUserSigninLinkCreation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationUserSigninLinkCreation(self): + """Test OrganizationUserSigninLinkCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.organization_user_signin_link_creation.OrganizationUserSigninLinkCreation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_collaborator.py b/test/test_resource_collaborator.py index 91cd6b2..e55c781 100644 --- a/test/test_resource_collaborator.py +++ b/test/test_resource_collaborator.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_collaborator_creation.py b/test/test_resource_collaborator_creation.py index d3fce36..6c8fc98 100644 --- a/test/test_resource_collaborator_creation.py +++ b/test/test_resource_collaborator_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_resource_rights.py b/test/test_resource_rights.py index f182466..2ec631a 100644 --- a/test/test_resource_rights.py +++ b/test/test_resource_rights.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_api.py b/test/test_score_api.py index fadf5d6..79d24a0 100644 --- a/test/test_score_api.py +++ b/test/test_score_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -43,6 +43,13 @@ def test_add_score_track(self): """ pass + def test_create_export_task(self): + """Test case for create_export_task + + Create a new score export task # noqa: E501 + """ + pass + def test_create_score(self): """Test case for create_score diff --git a/test/test_score_comment.py b/test/test_score_comment.py index c42c27b..c959b1f 100644 --- a/test/test_score_comment.py +++ b/test/test_score_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_context.py b/test/test_score_comment_context.py index 0e6d585..f8367ac 100644 --- a/test/test_score_comment_context.py +++ b/test/test_score_comment_context.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_creation.py b/test/test_score_comment_creation.py index 5440a92..fa4afa4 100644 --- a/test/test_score_comment_creation.py +++ b/test/test_score_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comment_moderation.py b/test/test_score_comment_moderation.py new file mode 100644 index 0000000..183f425 --- /dev/null +++ b/test/test_score_comment_moderation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_comment_moderation import ScoreCommentModeration # noqa: E501 +from flat_api.rest import ApiException + + +class TestScoreCommentModeration(unittest.TestCase): + """ScoreCommentModeration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentModeration(self): + """Test ScoreCommentModeration""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_comment_moderation.ScoreCommentModeration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_comment_update.py b/test/test_score_comment_update.py index 3978dd5..fbf5b2b 100644 --- a/test/test_score_comment_update.py +++ b/test/test_score_comment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_comments_counts.py b/test/test_score_comments_counts.py index c657718..85e970d 100644 --- a/test/test_score_comments_counts.py +++ b/test/test_score_comments_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_creation.py b/test/test_score_creation.py index f9f7bee..ac211b0 100644 --- a/test/test_score_creation.py +++ b/test/test_score_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_creation_builder_data.py b/test/test_score_creation_builder_data.py new file mode 100644 index 0000000..24b6f54 --- /dev/null +++ b/test/test_score_creation_builder_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData # noqa: E501 +from flat_api.rest import ApiException + + +class TestScoreCreationBuilderData(unittest.TestCase): + """ScoreCreationBuilderData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderData(self): + """Test ScoreCreationBuilderData""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_creation_builder_data.ScoreCreationBuilderData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_layout_data.py b/test/test_score_creation_builder_data_layout_data.py new file mode 100644 index 0000000..622ce23 --- /dev/null +++ b/test/test_score_creation_builder_data_layout_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData # noqa: E501 +from flat_api.rest import ApiException + + +class TestScoreCreationBuilderDataLayoutData(unittest.TestCase): + """ScoreCreationBuilderDataLayoutData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataLayoutData(self): + """Test ScoreCreationBuilderDataLayoutData""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_creation_builder_data_layout_data.ScoreCreationBuilderDataLayoutData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_score_data.py b/test/test_score_creation_builder_data_score_data.py new file mode 100644 index 0000000..a1590f6 --- /dev/null +++ b/test/test_score_creation_builder_data_score_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData # noqa: E501 +from flat_api.rest import ApiException + + +class TestScoreCreationBuilderDataScoreData(unittest.TestCase): + """ScoreCreationBuilderDataScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataScoreData(self): + """Test ScoreCreationBuilderDataScoreData""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_creation_builder_data_score_data.ScoreCreationBuilderDataScoreData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_score_data_instruments.py b/test/test_score_creation_builder_data_score_data_instruments.py new file mode 100644 index 0000000..0aa6d63 --- /dev/null +++ b/test/test_score_creation_builder_data_score_data_instruments.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments # noqa: E501 +from flat_api.rest import ApiException + + +class TestScoreCreationBuilderDataScoreDataInstruments(unittest.TestCase): + """ScoreCreationBuilderDataScoreDataInstruments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataScoreDataInstruments(self): + """Test ScoreCreationBuilderDataScoreDataInstruments""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_creation_builder_data_score_data_instruments.ScoreCreationBuilderDataScoreDataInstruments() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_type.py b/test/test_score_creation_type.py index 2ab172e..5bbf68e 100644 --- a/test/test_score_creation_type.py +++ b/test/test_score_creation_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_details.py b/test/test_score_details.py index d261322..ba8f232 100644 --- a/test/test_score_details.py +++ b/test/test_score_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_fork.py b/test/test_score_fork.py index d23628c..267b055 100644 --- a/test/test_score_fork.py +++ b/test/test_score_fork.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_license.py b/test/test_score_license.py index ebef15c..dab65ad 100644 --- a/test/test_score_license.py +++ b/test/test_score_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_likes_counts.py b/test/test_score_likes_counts.py index 2f33bbf..ebe4660 100644 --- a/test/test_score_likes_counts.py +++ b/test/test_score_likes_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_modification.py b/test/test_score_modification.py index 1b6d06f..933772d 100644 --- a/test/test_score_modification.py +++ b/test/test_score_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_plays_counts.py b/test/test_score_plays_counts.py new file mode 100644 index 0000000..408e3d6 --- /dev/null +++ b/test/test_score_plays_counts.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.score_plays_counts import ScorePlaysCounts # noqa: E501 +from flat_api.rest import ApiException + + +class TestScorePlaysCounts(unittest.TestCase): + """ScorePlaysCounts unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScorePlaysCounts(self): + """Test ScorePlaysCounts""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.score_plays_counts.ScorePlaysCounts() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_privacy.py b/test/test_score_privacy.py index dcaebf2..8cf3c80 100644 --- a/test/test_score_privacy.py +++ b/test/test_score_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision.py b/test/test_score_revision.py index f8cced0..91533bb 100644 --- a/test/test_score_revision.py +++ b/test/test_score_revision.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision_creation.py b/test/test_score_revision_creation.py index bc7b493..d4e3895 100644 --- a/test/test_score_revision_creation.py +++ b/test/test_score_revision_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_revision_statistics.py b/test/test_score_revision_statistics.py index 5965517..fc94df0 100644 --- a/test/test_score_revision_statistics.py +++ b/test/test_score_revision_statistics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_source.py b/test/test_score_source.py index c08f4ef..85eae74 100644 --- a/test/test_score_source.py +++ b/test/test_score_source.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track.py b/test/test_score_track.py index 565ea4d..83ea68e 100644 --- a/test/test_score_track.py +++ b/test/test_score_track.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_creation.py b/test/test_score_track_creation.py index f3081d0..4df5954 100644 --- a/test/test_score_track_creation.py +++ b/test/test_score_track_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_point.py b/test/test_score_track_point.py index 2442c44..b34cdc6 100644 --- a/test/test_score_track_point.py +++ b/test/test_score_track_point.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_state.py b/test/test_score_track_state.py index 856d5a8..6937628 100644 --- a/test/test_score_track_state.py +++ b/test/test_score_track_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_type.py b/test/test_score_track_type.py index 6d3133d..d8236a9 100644 --- a/test/test_score_track_type.py +++ b/test/test_score_track_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_track_update.py b/test/test_score_track_update.py index f033496..8447454 100644 --- a/test/test_score_track_update.py +++ b/test/test_score_track_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_score_views_counts.py b/test/test_score_views_counts.py index 682b771..a9dca32 100644 --- a/test/test_score_views_counts.py +++ b/test/test_score_views_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_task.py b/test/test_task.py new file mode 100644 index 0000000..62ec6d3 --- /dev/null +++ b/test/test_task.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.task import Task # noqa: E501 +from flat_api.rest import ApiException + + +class TestTask(unittest.TestCase): + """Task unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTask(self): + """Test Task""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.task.Task() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_task_api.py b/test/test_task_api.py new file mode 100644 index 0000000..7055b86 --- /dev/null +++ b/test/test_task_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.api.task_api import TaskApi # noqa: E501 +from flat_api.rest import ApiException + + +class TestTaskApi(unittest.TestCase): + """TaskApi unit test stubs""" + + def setUp(self): + self.api = flat_api.api.task_api.TaskApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_task(self): + """Test case for get_task + + Get a task details # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_task_export_options.py b/test/test_task_export_options.py new file mode 100644 index 0000000..8fe388a --- /dev/null +++ b/test/test_task_export_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.task_export_options import TaskExportOptions # noqa: E501 +from flat_api.rest import ApiException + + +class TestTaskExportOptions(unittest.TestCase): + """TaskExportOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaskExportOptions(self): + """Test TaskExportOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.task_export_options.TaskExportOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_summary.py b/test/test_task_progress.py similarity index 71% rename from test/test_score_summary.py rename to test/test_task_progress.py index 7494a62..54b0587 100644 --- a/test/test_score_summary.py +++ b/test/test_task_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,12 +16,12 @@ import unittest import flat_api -from flat_api.models.score_summary import ScoreSummary # noqa: E501 +from flat_api.models.task_progress import TaskProgress # noqa: E501 from flat_api.rest import ApiException -class TestScoreSummary(unittest.TestCase): - """ScoreSummary unit test stubs""" +class TestTaskProgress(unittest.TestCase): + """TaskProgress unit test stubs""" def setUp(self): pass @@ -29,10 +29,10 @@ def setUp(self): def tearDown(self): pass - def testScoreSummary(self): - """Test ScoreSummary""" + def testTaskProgress(self): + """Test TaskProgress""" # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_summary.ScoreSummary() # noqa: E501 + # model = flat_api.models.task_progress.TaskProgress() # noqa: E501 pass diff --git a/test/test_user_admin_update.py b/test/test_user_admin_update.py index b6ec939..bd09aa0 100644 --- a/test/test_user_admin_update.py +++ b/test/test_user_admin_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_api.py b/test/test_user_api.py index 6dd24c9..892bb0b 100644 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_creation.py b/test/test_user_creation.py index cbc488d..c7a92e9 100644 --- a/test/test_user_creation.py +++ b/test/test_user_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details.py b/test/test_user_details.py index 2852afb..d49124b 100644 --- a/test/test_user_details.py +++ b/test/test_user_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details_admin.py b/test/test_user_details_admin.py index 787d1a3..d593ff4 100644 --- a/test/test_user_details_admin.py +++ b/test/test_user_details_admin.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py new file mode 100644 index 0000000..5c3cdaa --- /dev/null +++ b/test/test_user_details_admin_license.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + OpenAPI spec version: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import flat_api +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense # noqa: E501 +from flat_api.rest import ApiException + + +class TestUserDetailsAdminLicense(unittest.TestCase): + """UserDetailsAdminLicense unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserDetailsAdminLicense(self): + """Test UserDetailsAdminLicense""" + # FIXME: construct object with mandatory attributes with example values + # model = flat_api.models.user_details_admin_license.UserDetailsAdminLicense() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_public.py b/test/test_user_public.py index 87bba21..4357edf 100644 --- a/test/test_user_public.py +++ b/test/test_user_public.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_public_summary.py b/test/test_user_public_summary.py index b311da8..0146dea 100644 --- a/test/test_user_public_summary.py +++ b/test/test_user_public_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.7.0 + OpenAPI spec version: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ From 05cac24760b6a438fa0cdd153da48c244d3b2851 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:16:39 +0100 Subject: [PATCH 05/46] Add Github Actions --- .github/workflows/python-package.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..2cf9e5d --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From c1ab18f7f8a4639e67a9086000830c565e48f64e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 19:39:13 +0000 Subject: [PATCH 06/46] Upgrade to GitHub-native Dependabot --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..491deae --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 From f17da425ff0d3c1f30476623db3cfa05f19d90d9 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:20:08 +0100 Subject: [PATCH 07/46] docs: using openapi generator --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 62a2f32..5223cf2 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ You can find the API reference including code samples and our OpenAPI Specificat To request some API credentials, please visit [https://flat.io/developers](https://flat.io/developers). -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project. - ## Requirements. Python 2.7 and 3.4+ From 455ca69da79cc4f65b07d1fc7d621f929d1b8d51 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:20:36 +0100 Subject: [PATCH 08/46] docs: switched to gh actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5223cf2..7688b10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python Client for the Flat REST API -[![Build Status](https://travis-ci.org/FlatIO/api-client-python.svg?branch=master)](https://travis-ci.org/FlatIO/api-client-python) +[![Python package](https://github.com/FlatIO/api-client-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/FlatIO/api-client-python/actions/workflows/python-package.yml) The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: - Creating and importing new music scores using MusicXML or MIDI files From 8e14a9a8e185a5ea259050f4ff21634d49c80afa Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:22:37 +0100 Subject: [PATCH 09/46] docs: changelog --- CHANGELOG.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30ab189..8486f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,28 @@ # Changelog -## 0.7.0 (API v2.17.0) +## 0.8.0 (API v2.17.0) * Updated API from v2.6.0 to v2.17.0 * Use flatten schema to fix inherance model issues +## 0.7.0 (API v2.7.0) + +### Client + +* feat: Add/fix support for python for 3.6 & 3.7 + +### API v2.7.0 + +* update(spec): specify `produces` and `consumes` on endpoints instead of globally +* feat(scores): now support Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files in POST /scores +* feat(scores): add support for `filename` when importing scores +* feat(collections): `parent` collection can now be a collection id when listing collections +* feat(collections): includes parent collections when listing scores +* feat(collections): add `creationDate` property in collection details +* feat(comments): add `staffUuid` for contextualized comments, which will completely replace `staffIdx` in the future +* feat(rights): now return a `isCollaborator` boolean property with the Score or Collection rights +* update(account): added new locales supported + ## 0.6.0 (API v2.6.0) * feat(collections): Add new Collections API endpoints From 715e5db73898cce5ca42e3adcf7441befe7ea059 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:23:56 +0100 Subject: [PATCH 10/46] docs: typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8486f43..38007ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 0.8.0 (API v2.17.0) * Updated API from v2.6.0 to v2.17.0 -* Use flatten schema to fix inherance model issues +* Use flatten schema to fix inheritance model issues ## 0.7.0 (API v2.7.0) From 75c14d9f5de49300ae28ce6ce294abf33c0dc255 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:31:23 +0100 Subject: [PATCH 11/46] chore(pypi): ignore test & md long description --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 10a0249..2d42503 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages NAME = "flat_api" -VERSION = "0.7.0" +VERSION = "0.8.0" # To install the library, run the following # # python setup.py install @@ -39,8 +39,9 @@ url="https://github.com/FlatIO/api-client-python", keywords=["Flat API", "MusicXML", "Music Notation", "MIDI"], long_description=LONG_DESCRIPTION, + long_description_content_type="text/markdown", install_requires=REQUIRES, - packages=find_packages(), + packages=find_packages(exclude=['test']), include_package_data=True, license="Apache", classifiers=[ From f30d206eccfd339c18752c26ae6362af2ec2b7f7 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 23 Mar 2022 20:51:44 +0100 Subject: [PATCH 12/46] fix: decoding byte files in responses --- .openapi-generator/VERSION | 2 +- CHANGELOG.md | 4 + docs/AccountApi.md | 44 +- docs/ApiAccessToken.md | 1 + docs/AppScopes.md | 1 + docs/Assignment.md | 1 + docs/AssignmentCanvas.md | 1 + docs/AssignmentCopy.md | 1 + docs/AssignmentCreation.md | 1 + docs/AssignmentCreationGoogleClassroom.md | 1 + docs/AssignmentCreationMicrosoftGraph.md | 1 + docs/AssignmentLti.md | 1 + docs/AssignmentMfc.md | 1 + docs/AssignmentSubmission.md | 1 + docs/AssignmentSubmissionComment.md | 1 + docs/AssignmentSubmissionCommentCreation.md | 1 + docs/AssignmentSubmissionHistory.md | 1 + docs/AssignmentSubmissionState.md | 1 + docs/AssignmentSubmissionUpdate.md | 1 + docs/AssignmentType.md | 1 + docs/ClassApi.md | 1282 +++++++++--- docs/ClassAttachmentCreation.md | 1 + docs/ClassCreation.md | 1 + docs/ClassDetails.md | 1 + docs/ClassDetailsCanvas.md | 1 + docs/ClassDetailsClever.md | 1 + docs/ClassDetailsGoogleClassroom.md | 1 + docs/ClassDetailsGoogleDrive.md | 1 + docs/ClassDetailsIssues.md | 1 + docs/ClassDetailsIssuesSync.md | 1 + docs/ClassDetailsLti.md | 1 + docs/ClassDetailsMfc.md | 1 + docs/ClassRoles.md | 1 + docs/ClassState.md | 1 + docs/ClassUpdate.md | 1 + docs/Collection.md | 1 + docs/CollectionApi.md | 391 +++- docs/CollectionApp.md | 1 + docs/CollectionCapabilities.md | 1 + docs/CollectionModification.md | 1 + docs/CollectionPrivacy.md | 1 + docs/CollectionType.md | 1 + docs/FlatErrorResponse.md | 1 + docs/FlatLocales.md | 1 + docs/GoogleClassroomCoursework.md | 1 + docs/GoogleClassroomSubmission.md | 1 + docs/Group.md | 1 + docs/GroupApi.md | 128 +- docs/GroupDetails.md | 1 + docs/GroupType.md | 1 + docs/LicenseMode.md | 1 + docs/LicenseSources.md | 1 + docs/LmsName.md | 1 + docs/LtiCredentials.md | 1 + docs/LtiCredentialsCreation.md | 1 + docs/MediaAttachment.md | 1 + docs/MediaScoreSharingMode.md | 1 + docs/MicrosoftGraphAssignment.md | 1 + docs/MicrosoftGraphSubmission.md | 1 + docs/OrganizationApi.md | 560 +++-- docs/OrganizationInvitation.md | 1 + docs/OrganizationInvitationCreation.md | 1 + docs/OrganizationRoles.md | 1 + docs/OrganizationUserAccessTokenCreation.md | 1 + docs/ResourceCollaboratorCreation.md | 1 + docs/ResourceRights.md | 1 + docs/ScoreApi.md | 1318 +++++++++--- docs/ScoreComment.md | 1 + docs/ScoreCommentContext.md | 1 + docs/ScoreCommentCreation.md | 1 + docs/ScoreCommentModeration.md | 1 + docs/ScoreCommentUpdate.md | 1 + docs/ScoreCommentsCounts.md | 1 + docs/ScoreCreationBuilderData.md | 2 +- docs/ScoreCreationBuilderDataLayoutData.md | 1 + docs/ScoreCreationBuilderDataScoreData.md | 2 +- ...CreationBuilderDataScoreDataInstruments.md | 4 +- docs/ScoreCreationType.md | 1 + docs/ScoreFork.md | 1 + docs/ScoreLicense.md | 1 + docs/ScoreLikesCounts.md | 1 + docs/ScoreModification.md | 1 + docs/ScorePlaysCounts.md | 1 + docs/ScorePrivacy.md | 1 + docs/ScoreRevision.md | 1 + docs/ScoreRevisionCreation.md | 1 + docs/ScoreRevisionStatistics.md | 1 + docs/ScoreTrack.md | 1 + docs/ScoreTrackCreation.md | 1 + docs/ScoreTrackPoint.md | 1 + docs/ScoreTrackState.md | 1 + docs/ScoreTrackType.md | 1 + docs/ScoreTrackUpdate.md | 1 + docs/ScoreViewsCounts.md | 1 + docs/Task.md | 1 + docs/TaskApi.md | 44 +- docs/TaskExportOptions.md | 1 + docs/TaskProgress.md | 1 + docs/UserAdminUpdate.md | 1 + docs/UserApi.md | 128 +- docs/UserCreation.md | 1 + docs/UserDetailsAdminLicense.md | 1 + flat_api/__init__.py | 8 +- flat_api/api/account_api.py | 54 +- flat_api/api/class_api.py | 1801 +++++++++++------ flat_api/api/collection_api.py | 543 +++-- flat_api/api/group_api.py | 176 +- flat_api/api/organization_api.py | 725 ++++--- flat_api/api/score_api.py | 1801 +++++++++++------ flat_api/api/task_api.py | 58 +- flat_api/api/user_api.py | 172 +- flat_api/api_client.py | 164 +- flat_api/configuration.py | 286 ++- flat_api/exceptions.py | 121 ++ flat_api/models/__init__.py | 2 +- flat_api/models/api_access_token.py | 16 +- flat_api/models/app_scopes.py | 18 +- flat_api/models/assignment.py | 18 +- flat_api/models/assignment_canvas.py | 16 +- flat_api/models/assignment_copy.py | 16 +- flat_api/models/assignment_creation.py | 26 +- .../assignment_creation_google_classroom.py | 16 +- .../assignment_creation_microsoft_graph.py | 16 +- flat_api/models/assignment_lti.py | 16 +- flat_api/models/assignment_mfc.py | 16 +- flat_api/models/assignment_submission.py | 16 +- .../models/assignment_submission_comment.py | 16 +- .../assignment_submission_comment_creation.py | 18 +- .../models/assignment_submission_history.py | 16 +- ...ssignment_submission_history_attachment.py | 16 +- .../models/assignment_submission_state.py | 18 +- .../models/assignment_submission_update.py | 28 +- .../assignment_submission_update_comments.py | 16 +- flat_api/models/assignment_type.py | 18 +- flat_api/models/class_attachment_creation.py | 18 +- flat_api/models/class_creation.py | 24 +- flat_api/models/class_details.py | 16 +- flat_api/models/class_details_canvas.py | 16 +- flat_api/models/class_details_clever.py | 18 +- .../models/class_details_google_classroom.py | 16 +- flat_api/models/class_details_google_drive.py | 16 +- flat_api/models/class_details_issues.py | 16 +- flat_api/models/class_details_issues_sync.py | 18 +- flat_api/models/class_details_lti.py | 16 +- flat_api/models/class_details_mfc.py | 16 +- .../models/class_details_microsoft_graph.py | 16 +- flat_api/models/class_roles.py | 18 +- flat_api/models/class_state.py | 18 +- flat_api/models/class_update.py | 22 +- flat_api/models/collection.py | 16 +- flat_api/models/collection_app.py | 16 +- flat_api/models/collection_capabilities.py | 16 +- flat_api/models/collection_creation.py | 26 +- flat_api/models/collection_modification.py | 22 +- flat_api/models/collection_privacy.py | 18 +- flat_api/models/collection_type.py | 18 +- flat_api/models/flat_error_response.py | 16 +- flat_api/models/flat_locales.py | 18 +- .../models/google_classroom_coursework.py | 16 +- .../models/google_classroom_submission.py | 16 +- flat_api/models/group.py | 18 +- flat_api/models/group_details.py | 16 +- flat_api/models/group_type.py | 18 +- flat_api/models/license_mode.py | 18 +- flat_api/models/license_sources.py | 18 +- flat_api/models/lms_name.py | 18 +- flat_api/models/lti_credentials.py | 16 +- flat_api/models/lti_credentials_creation.py | 23 +- flat_api/models/media_attachment.py | 18 +- flat_api/models/media_score_sharing_mode.py | 18 +- flat_api/models/microsoft_graph_assignment.py | 16 +- flat_api/models/microsoft_graph_submission.py | 16 +- flat_api/models/organization_invitation.py | 16 +- .../organization_invitation_creation.py | 16 +- flat_api/models/organization_roles.py | 18 +- ...organization_user_access_token_creation.py | 18 +- .../models/organization_user_signin_link.py | 16 +- .../organization_user_signin_link_creation.py | 16 +- flat_api/models/resource_collaborator.py | 16 +- .../models/resource_collaborator_creation.py | 16 +- flat_api/models/resource_rights.py | 16 +- flat_api/models/score_comment.py | 18 +- flat_api/models/score_comment_context.py | 28 +- flat_api/models/score_comment_creation.py | 18 +- flat_api/models/score_comment_moderation.py | 18 +- flat_api/models/score_comment_update.py | 28 +- flat_api/models/score_comments_counts.py | 16 +- flat_api/models/score_creation.py | 18 +- .../models/score_creation_builder_data.py | 21 +- ...score_creation_builder_data_layout_data.py | 18 +- .../score_creation_builder_data_score_data.py | 21 +- ...ion_builder_data_score_data_instruments.py | 26 +- flat_api/models/score_creation_type.py | 18 +- flat_api/models/score_details.py | 16 +- flat_api/models/score_fork.py | 16 +- flat_api/models/score_license.py | 18 +- flat_api/models/score_likes_counts.py | 16 +- flat_api/models/score_modification.py | 24 +- flat_api/models/score_plays_counts.py | 16 +- flat_api/models/score_privacy.py | 18 +- flat_api/models/score_revision.py | 16 +- flat_api/models/score_revision_creation.py | 20 +- flat_api/models/score_revision_statistics.py | 16 +- flat_api/models/score_source.py | 16 +- flat_api/models/score_track.py | 16 +- flat_api/models/score_track_creation.py | 16 +- flat_api/models/score_track_point.py | 22 +- flat_api/models/score_track_state.py | 18 +- flat_api/models/score_track_type.py | 18 +- flat_api/models/score_track_update.py | 16 +- flat_api/models/score_views_counts.py | 16 +- flat_api/models/task.py | 20 +- flat_api/models/task_export_options.py | 16 +- flat_api/models/task_progress.py | 16 +- flat_api/models/user_admin_update.py | 39 +- flat_api/models/user_creation.py | 45 +- flat_api/models/user_details.py | 18 +- flat_api/models/user_details_admin.py | 18 +- flat_api/models/user_details_admin_license.py | 16 +- flat_api/models/user_public.py | 18 +- flat_api/models/user_public_summary.py | 18 +- flat_api/rest.py | 49 +- requirements.txt | 1 + test-requirements.txt | 8 +- tox.ini | 3 +- 225 files changed, 8448 insertions(+), 3467 deletions(-) create mode 100644 flat_api/exceptions.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 0fa4ae4..ecedc98 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0 \ No newline at end of file +4.3.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 38007ef..eb4dcc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.8.1 (API v2.17.0) + +* Fixes binary responses for MIDI export + ## 0.8.0 (API v2.17.0) * Updated API from v2.6.0 to v2.17.0 diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 596fedb..5c26eee 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -16,28 +16,42 @@ Get details about the current authenticated User. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.AccountApi(flat_api.ApiClient(configuration)) -only_id = False # bool | Only return the user id (optional) (default to False) - -try: - # Get current user profile - api_response = api_instance.get_authenticated_user(only_id=only_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.AccountApi(api_client) + only_id = False # bool | Only return the user id (optional) (default to False) + + try: + # Get current user profile + api_response = api_instance.get_authenticated_user(only_id=only_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) ``` ### Parameters @@ -59,5 +73,11 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current user details | - | +**0** | Error | - | + [[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) diff --git a/docs/ApiAccessToken.md b/docs/ApiAccessToken.md index c916acb..16fba33 100644 --- a/docs/ApiAccessToken.md +++ b/docs/ApiAccessToken.md @@ -1,5 +1,6 @@ # ApiAccessToken +An API access token ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AppScopes.md b/docs/AppScopes.md index 9dd92a6..1b7c1a7 100644 --- a/docs/AppScopes.md +++ b/docs/AppScopes.md @@ -1,5 +1,6 @@ # AppScopes +Available scopes ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Assignment.md b/docs/Assignment.md index 8455358..050552f 100644 --- a/docs/Assignment.md +++ b/docs/Assignment.md @@ -1,5 +1,6 @@ # Assignment +Assignment details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentCanvas.md b/docs/AssignmentCanvas.md index 19ecce7..7a3818b 100644 --- a/docs/AssignmentCanvas.md +++ b/docs/AssignmentCanvas.md @@ -1,5 +1,6 @@ # AssignmentCanvas +A Canvas LMS assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentCopy.md b/docs/AssignmentCopy.md index 582b4b6..ff7b4ab 100644 --- a/docs/AssignmentCopy.md +++ b/docs/AssignmentCopy.md @@ -1,5 +1,6 @@ # AssignmentCopy +Assignment copy operation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentCreation.md b/docs/AssignmentCreation.md index 5a5e2e2..7618d3f 100644 --- a/docs/AssignmentCreation.md +++ b/docs/AssignmentCreation.md @@ -1,5 +1,6 @@ # AssignmentCreation +Assignment creation details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentCreationGoogleClassroom.md b/docs/AssignmentCreationGoogleClassroom.md index 4af0526..071f81b 100644 --- a/docs/AssignmentCreationGoogleClassroom.md +++ b/docs/AssignmentCreationGoogleClassroom.md @@ -1,5 +1,6 @@ # AssignmentCreationGoogleClassroom +Google Classroom options for this assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentCreationMicrosoftGraph.md b/docs/AssignmentCreationMicrosoftGraph.md index 2cd74b1..ec8f0f4 100644 --- a/docs/AssignmentCreationMicrosoftGraph.md +++ b/docs/AssignmentCreationMicrosoftGraph.md @@ -1,5 +1,6 @@ # AssignmentCreationMicrosoftGraph +Microsoft Graph options for this assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentLti.md b/docs/AssignmentLti.md index 36e1c93..0048ff5 100644 --- a/docs/AssignmentLti.md +++ b/docs/AssignmentLti.md @@ -1,5 +1,6 @@ # AssignmentLti +An LTI assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentMfc.md b/docs/AssignmentMfc.md index aae84c3..332da6f 100644 --- a/docs/AssignmentMfc.md +++ b/docs/AssignmentMfc.md @@ -1,5 +1,6 @@ # AssignmentMfc +A MusicFirst Classroom assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmission.md b/docs/AssignmentSubmission.md index da82d6e..84d3474 100644 --- a/docs/AssignmentSubmission.md +++ b/docs/AssignmentSubmission.md @@ -1,5 +1,6 @@ # AssignmentSubmission +Assignment Submission ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmissionComment.md b/docs/AssignmentSubmissionComment.md index 6cb4c9d..a0429be 100644 --- a/docs/AssignmentSubmissionComment.md +++ b/docs/AssignmentSubmissionComment.md @@ -1,5 +1,6 @@ # AssignmentSubmissionComment +Feedback comment added to an assignment submission ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/AssignmentSubmissionCommentCreation.md index 3e0e3bb..9335acd 100644 --- a/docs/AssignmentSubmissionCommentCreation.md +++ b/docs/AssignmentSubmissionCommentCreation.md @@ -1,5 +1,6 @@ # AssignmentSubmissionCommentCreation +Creation of a assignment submission comment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmissionHistory.md b/docs/AssignmentSubmissionHistory.md index e99a2a5..f87c9ec 100644 --- a/docs/AssignmentSubmissionHistory.md +++ b/docs/AssignmentSubmissionHistory.md @@ -1,5 +1,6 @@ # AssignmentSubmissionHistory +History item of the submission ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmissionState.md b/docs/AssignmentSubmissionState.md index ff2c7c9..54390a1 100644 --- a/docs/AssignmentSubmissionState.md +++ b/docs/AssignmentSubmissionState.md @@ -1,5 +1,6 @@ # AssignmentSubmissionState +State of the submission ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/AssignmentSubmissionUpdate.md index 8fd0cc2..058598e 100644 --- a/docs/AssignmentSubmissionUpdate.md +++ b/docs/AssignmentSubmissionUpdate.md @@ -1,5 +1,6 @@ # AssignmentSubmissionUpdate +Assignment Submission creation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/AssignmentType.md b/docs/AssignmentType.md index 447d720..6211653 100644 --- a/docs/AssignmentType.md +++ b/docs/AssignmentType.md @@ -1,5 +1,6 @@ # AssignmentType +Type of the assignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassApi.md b/docs/ClassApi.md index c9d8096..0b05cb6 100644 --- a/docs/ClassApi.md +++ b/docs/ClassApi.md @@ -45,28 +45,42 @@ Mark the class as `active`. This is mainly used for classes synchronized from Cl ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class - -try: - # Activate the class - api_response = api_instance.activate_class(_class) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->activate_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class + + try: + # Activate the class + api_response = api_instance.activate_class(_class) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->activate_class: %s\n" % e) ``` ### Parameters @@ -88,6 +102,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + [[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) # **add_class_user** @@ -99,28 +119,42 @@ This method can be used by a teacher of the class to enroll another Flat user in ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class user = 'user_example' # str | Unique identifier of the user -try: - # Add a user to the class - api_instance.add_class_user(_class, user) -except ApiException as e: - print("Exception when calling ClassApi->add_class_user: %s\n" % e) + try: + # Add a user to the class + api_instance.add_class_user(_class, user) + except ApiException as e: + print("Exception when calling ClassApi->add_class_user: %s\n" % e) ``` ### Parameters @@ -143,6 +177,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The user has been added to the class | - | +**0** | Error | - | + [[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) # **archive_assignment** @@ -154,29 +194,43 @@ Archive the assignment ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -try: - # Archive the assignment - api_response = api_instance.archive_assignment(_class, assignment) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->archive_assignment: %s\n" % e) + try: + # Archive the assignment + api_response = api_instance.archive_assignment(_class, assignment) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->archive_assignment: %s\n" % e) ``` ### Parameters @@ -199,6 +253,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment details | - | +**0** | Error | - | + [[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) # **archive_class** @@ -210,28 +270,42 @@ Mark the class as `archived`. When this course is synchronized with another app, ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class - -try: - # Archive the class - api_response = api_instance.archive_class(_class) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->archive_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class + + try: + # Archive the class + api_response = api_instance.archive_class(_class) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->archive_class: %s\n" % e) ``` ### Parameters @@ -253,6 +327,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + [[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) # **copy_assignment** @@ -264,30 +344,44 @@ Copy an assignment to a specified class. If the original assignment has a due d ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment body = flat_api.AssignmentCopy() # AssignmentCopy | -try: - # Copy an assignment - api_response = api_instance.copy_assignment(_class, assignment, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->copy_assignment: %s\n" % e) + try: + # Copy an assignment + api_response = api_instance.copy_assignment(_class, assignment, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->copy_assignment: %s\n" % e) ``` ### Parameters @@ -311,6 +405,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new created assingment | - | +**0** | Error | - | + [[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) # **create_assignment** @@ -322,29 +422,43 @@ Use this method as a teacher to create and post a new assignment to a class. If ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class body = flat_api.AssignmentCreation() # AssignmentCreation | (optional) -try: - # Assignment creation - api_response = api_instance.create_assignment(_class, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->create_assignment: %s\n" % e) + try: + # Assignment creation + api_response = api_instance.create_assignment(_class, body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->create_assignment: %s\n" % e) ``` ### Parameters @@ -367,6 +481,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment has been created | - | +**0** | Error | - | + [[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) # **create_class** @@ -378,28 +498,42 @@ Classrooms on Flat allow you to create activities with assignments and post cont ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -body = flat_api.ClassCreation() # ClassCreation | - -try: - # Create a new class - api_response = api_instance.create_class(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->create_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + body = flat_api.ClassCreation() # ClassCreation | + + try: + # Create a new class + api_response = api_instance.create_class(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->create_class: %s\n" % e) ``` ### Parameters @@ -421,6 +555,13 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**402** | Account overquota | - | +**0** | Error | - | + [[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) # **create_submission** @@ -432,30 +573,44 @@ Use this method as a student to create, update and submit a submission related t ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | -try: - # Create or edit a submission - api_response = api_instance.create_submission(_class, assignment, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->create_submission: %s\n" % e) + try: + # Create or edit a submission + api_response = api_instance.create_submission(_class, assignment, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->create_submission: %s\n" % e) ``` ### Parameters @@ -479,6 +634,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submission | - | +**0** | Error | - | + [[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) # **delete_class_user** @@ -490,28 +651,42 @@ This method can be used by a teacher to remove a user from the class, or by a st ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class user = 'user_example' # str | Unique identifier of the user -try: - # Remove a user from the class - api_instance.delete_class_user(_class, user) -except ApiException as e: - print("Exception when calling ClassApi->delete_class_user: %s\n" % e) + try: + # Remove a user from the class + api_instance.delete_class_user(_class, user) + except ApiException as e: + print("Exception when calling ClassApi->delete_class_user: %s\n" % e) ``` ### Parameters @@ -534,6 +709,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The user has been removed from the class | - | +**0** | Error | - | + [[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) # **delete_submission** @@ -545,29 +726,43 @@ Use this method as a teacher to delete a submission and allow student to start o ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -try: - # Delete a submission - api_instance.delete_submission(_class, assignment, submission) -except ApiException as e: - print("Exception when calling ClassApi->delete_submission: %s\n" % e) + try: + # Delete a submission + api_instance.delete_submission(_class, assignment, submission) + except ApiException as e: + print("Exception when calling ClassApi->delete_submission: %s\n" % e) ``` ### Parameters @@ -591,6 +786,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The submission has been deleted | - | +**0** | Error | - | + [[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) # **delete_submission_comment** @@ -600,30 +801,44 @@ Delete a feedback comment to a submission ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission comment = 'comment_example' # str | Unique identifier of the comment -try: - # Delete a feedback comment to a submission - api_instance.delete_submission_comment(_class, assignment, submission, comment) -except ApiException as e: - print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) + try: + # Delete a feedback comment to a submission + api_instance.delete_submission_comment(_class, assignment, submission, comment) + except ApiException as e: + print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) ``` ### Parameters @@ -648,6 +863,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been deleted | - | +**0** | Error | - | + [[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) # **edit_submission** @@ -659,31 +880,45 @@ Use this method as a teacher to update the different submission and give feedbac ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | -try: - # Edit a submission - api_response = api_instance.edit_submission(_class, assignment, submission, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->edit_submission: %s\n" % e) + try: + # Edit a submission + api_response = api_instance.edit_submission(_class, assignment, submission, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->edit_submission: %s\n" % e) ``` ### Parameters @@ -708,6 +943,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submission | - | +**0** | Error | - | + [[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) # **enroll_class** @@ -719,28 +960,42 @@ Use this method to join a class using an enrollment code given one of the teache ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` - -try: - # Join a class - api_response = api_instance.enroll_class(enrollment_code) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->enroll_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` + + try: + # Join a class + api_response = api_instance.enroll_class(enrollment_code) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->enroll_class: %s\n" % e) ``` ### Parameters @@ -762,6 +1017,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + [[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) # **export_submissions_reviews_as_csv** @@ -773,29 +1034,43 @@ Export list of submissions grades to a CSV file ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -try: - # CSV Grades exports - api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) + try: + # CSV Grades exports + api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) ``` ### Parameters @@ -818,6 +1093,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: text/csv +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + [[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) # **export_submissions_reviews_as_excel** @@ -829,29 +1110,43 @@ Export list of submissions grades to an Excel file ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -try: - # Excel Grades exports - api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) + try: + # Excel Grades exports + api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) ``` ### Parameters @@ -874,6 +1169,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + [[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) # **fork_score** @@ -885,30 +1186,44 @@ This API call will make a copy of the last revision of the specified score and c ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | sharing_key = 'sharing_key_example' # str | 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) -try: - # Fork a score - api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->fork_score: %s\n" % e) + try: + # Fork a score + api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->fork_score: %s\n" % e) ``` ### Parameters @@ -932,6 +1247,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_class** @@ -941,28 +1265,42 @@ Get the details of a single class ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class - -try: - # Get the details of a single class - api_response = api_instance.get_class(_class) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class + + try: + # Get the details of a single class + api_response = api_instance.get_class(_class) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_class: %s\n" % e) ``` ### Parameters @@ -984,6 +1322,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + [[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) # **get_score_submissions** @@ -995,28 +1339,42 @@ This API call will list the different assignments submissions where the score is ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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: - # List submissions related to the score - api_response = api_instance.get_score_submissions(score) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + score = 'score_example' # str | 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: + # List submissions related to the score + api_response = api_instance.get_score_submissions(score) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) ``` ### Parameters @@ -1038,6 +1396,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + [[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) # **get_submission** @@ -1047,30 +1411,44 @@ Get a student submission ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -try: - # Get a student submission - api_response = api_instance.get_submission(_class, assignment, submission) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_submission: %s\n" % e) + try: + # Get a student submission + api_response = api_instance.get_submission(_class, assignment, submission) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_submission: %s\n" % e) ``` ### Parameters @@ -1094,6 +1472,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A submission | - | +**0** | Error | - | + [[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) # **get_submission_comments** @@ -1103,30 +1487,44 @@ List the feedback comments of a submission ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -try: - # List the feedback comments of a submission - api_response = api_instance.get_submission_comments(_class, assignment, submission) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) + try: + # List the feedback comments of a submission + api_response = api_instance.get_submission_comments(_class, assignment, submission) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) ``` ### Parameters @@ -1150,6 +1548,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comments of the score | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + [[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) # **get_submission_history** @@ -1161,30 +1567,44 @@ For teachers only. Returns a detailed history of the submission. This currently ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission -try: - # Get the history of the submission - api_response = api_instance.get_submission_history(_class, assignment, submission) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_submission_history: %s\n" % e) + try: + # Get the history of the submission + api_response = api_instance.get_submission_history(_class, assignment, submission) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_submission_history: %s\n" % e) ``` ### Parameters @@ -1208,6 +1628,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The history of the submission | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + [[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) # **get_submissions** @@ -1217,29 +1645,43 @@ List the students' submissions ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -try: - # List the students' submissions - api_response = api_instance.get_submissions(_class, assignment) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->get_submissions: %s\n" % e) + try: + # List the students' submissions + api_response = api_instance.get_submissions(_class, assignment) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->get_submissions: %s\n" % e) ``` ### Parameters @@ -1262,6 +1704,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submissions | - | +**0** | Error | - | + [[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) # **list_assignments** @@ -1271,28 +1719,42 @@ Assignments listing ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class - -try: - # Assignments listing - api_response = api_instance.list_assignments(_class) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->list_assignments: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class + + try: + # Assignments listing + api_response = api_instance.list_assignments(_class) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->list_assignments: %s\n" % e) ``` ### Parameters @@ -1314,6 +1776,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of assignments for the class | - | +**0** | Error | - | + [[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) # **list_class_student_submissions** @@ -1325,29 +1793,43 @@ Use this method as a teacher to list all the assignment submissions sent by a st ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class user = 'user_example' # str | Unique identifier of the user -try: - # List the submissions for a student - api_response = api_instance.list_class_student_submissions(_class, user) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) + try: + # List the submissions for a student + api_response = api_instance.list_class_student_submissions(_class, user) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) ``` ### Parameters @@ -1370,6 +1852,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of submissions | - | +**0** | Error | - | + [[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) # **list_classes** @@ -1379,28 +1867,42 @@ List the classes available for the current user ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -state = 'active' # str | Filter the classes by state (optional) (default to 'active') - -try: - # List the classes available for the current user - api_response = api_instance.list_classes(state=state) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->list_classes: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + state = 'active' # str | Filter the classes by state (optional) (default to 'active') + + try: + # List the classes available for the current user + api_response = api_instance.list_classes(state=state) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->list_classes: %s\n" % e) ``` ### Parameters @@ -1422,6 +1924,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of classes | - | +**0** | Error | - | + [[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) # **post_submission_comment** @@ -1431,31 +1939,45 @@ Add a feedback comment to a submission ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | -try: - # Add a feedback comment to a submission - api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) + try: + # Add a feedback comment to a submission + api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) ``` ### Parameters @@ -1480,6 +2002,14 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comment | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + [[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) # **unarchive_assignment** @@ -1491,29 +2021,43 @@ Mark the assignment as `active`. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment -try: - # Unarchive the assignment. - api_response = api_instance.unarchive_assignment(_class, assignment) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) + try: + # Unarchive the assignment. + api_response = api_instance.unarchive_assignment(_class, assignment) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) ``` ### Parameters @@ -1536,6 +2080,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment details | - | +**0** | Error | - | + [[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) # **unarchive_class** @@ -1547,28 +2097,42 @@ Mark the class as `active`. When this course is synchronized with another app, l ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class - -try: - # Unarchive the class - api_response = api_instance.unarchive_class(_class) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->unarchive_class: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class + + try: + # Unarchive the class + api_response = api_instance.unarchive_class(_class) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->unarchive_class: %s\n" % e) ``` ### Parameters @@ -1590,6 +2154,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + [[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) # **update_class** @@ -1601,29 +2171,43 @@ Update the meta information of the class ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) -try: - # Update the class - api_response = api_instance.update_class(_class, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->update_class: %s\n" % e) + try: + # Update the class + api_response = api_instance.update_class(_class, body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->update_class: %s\n" % e) ``` ### Parameters @@ -1646,6 +2230,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + [[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) # **update_submission_comment** @@ -1655,32 +2245,46 @@ Update a feedback comment to a submission ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ClassApi(flat_api.ApiClient(configuration)) -_class = '_class_example' # str | Unique identifier of the class +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + _class = '_class_example' # str | Unique identifier of the class assignment = 'assignment_example' # str | Unique identifier of the assignment submission = 'submission_example' # str | Unique identifier of the submission comment = 'comment_example' # str | Unique identifier of the comment assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | -try: - # Update a feedback comment to a submission - api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) - pprint(api_response) -except ApiException as e: - print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) + try: + # Update a feedback comment to a submission + api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + pprint(api_response) + except ApiException as e: + print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) ``` ### Parameters @@ -1706,5 +2310,13 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comment | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + [[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) diff --git a/docs/ClassAttachmentCreation.md b/docs/ClassAttachmentCreation.md index f8f3976..8badb79 100644 --- a/docs/ClassAttachmentCreation.md +++ b/docs/ClassAttachmentCreation.md @@ -1,5 +1,6 @@ # ClassAttachmentCreation +Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassCreation.md b/docs/ClassCreation.md index 8f740c0..77542ef 100644 --- a/docs/ClassCreation.md +++ b/docs/ClassCreation.md @@ -1,5 +1,6 @@ # ClassCreation +Creation of a classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetails.md b/docs/ClassDetails.md index d2624ae..cfb515d 100644 --- a/docs/ClassDetails.md +++ b/docs/ClassDetails.md @@ -1,5 +1,6 @@ # ClassDetails +A classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md index a48143d..b5d19af 100644 --- a/docs/ClassDetailsCanvas.md +++ b/docs/ClassDetailsCanvas.md @@ -1,5 +1,6 @@ # ClassDetailsCanvas +Meta information provided by Canvs LMS ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md index ff19f16..7a67398 100644 --- a/docs/ClassDetailsClever.md +++ b/docs/ClassDetailsClever.md @@ -1,5 +1,6 @@ # ClassDetailsClever +Clever.com section-related information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md index 1bb94ca..588a2ac 100644 --- a/docs/ClassDetailsGoogleClassroom.md +++ b/docs/ClassDetailsGoogleClassroom.md @@ -1,5 +1,6 @@ # ClassDetailsGoogleClassroom +Google Classroom course-related information ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsGoogleDrive.md b/docs/ClassDetailsGoogleDrive.md index 87b7c3c..804ee63 100644 --- a/docs/ClassDetailsGoogleDrive.md +++ b/docs/ClassDetailsGoogleDrive.md @@ -1,5 +1,6 @@ # ClassDetailsGoogleDrive +Google Drive course-related information provided by Google Classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsIssues.md b/docs/ClassDetailsIssues.md index ce406c6..215482f 100644 --- a/docs/ClassDetailsIssues.md +++ b/docs/ClassDetailsIssues.md @@ -1,5 +1,6 @@ # ClassDetailsIssues +Detected issues for this class ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsIssuesSync.md b/docs/ClassDetailsIssuesSync.md index e0a9d71..9b7f953 100644 --- a/docs/ClassDetailsIssuesSync.md +++ b/docs/ClassDetailsIssuesSync.md @@ -1,5 +1,6 @@ # ClassDetailsIssuesSync +A sync issue ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsLti.md b/docs/ClassDetailsLti.md index dfd3ff4..8dcf986 100644 --- a/docs/ClassDetailsLti.md +++ b/docs/ClassDetailsLti.md @@ -1,5 +1,6 @@ # ClassDetailsLti +Meta information provided by the LTI consumer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassDetailsMfc.md b/docs/ClassDetailsMfc.md index 9ba80fa..180a2d7 100644 --- a/docs/ClassDetailsMfc.md +++ b/docs/ClassDetailsMfc.md @@ -1,5 +1,6 @@ # ClassDetailsMfc +Meta information provided by Canvs LMS ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassRoles.md b/docs/ClassRoles.md index 4878034..af894b6 100644 --- a/docs/ClassRoles.md +++ b/docs/ClassRoles.md @@ -1,5 +1,6 @@ # ClassRoles +User's Class Role (for Edu users only) ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassState.md b/docs/ClassState.md index fb07ffc..2e5c26f 100644 --- a/docs/ClassState.md +++ b/docs/ClassState.md @@ -1,5 +1,6 @@ # ClassState +The state of a classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ClassUpdate.md b/docs/ClassUpdate.md index b4b539f..a3ef0f9 100644 --- a/docs/ClassUpdate.md +++ b/docs/ClassUpdate.md @@ -1,5 +1,6 @@ # ClassUpdate +Update of a classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Collection.md b/docs/Collection.md index e8f6380..ed4896a 100644 --- a/docs/Collection.md +++ b/docs/Collection.md @@ -1,5 +1,6 @@ # Collection +Collection of scores ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md index c3ed974..dfd5331 100644 --- a/docs/CollectionApi.md +++ b/docs/CollectionApi.md @@ -24,30 +24,44 @@ This operation will add a score to a collection. The default behavior will make ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) -try: - # Add a score to the collection - api_response = api_instance.add_score_to_collection(collection, score, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) + try: + # Add a score to the collection + api_response = api_instance.add_score_to_collection(collection, score, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) ``` ### Parameters @@ -71,6 +85,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**403** | Not granted to access to this collection or score | - | +**404** | Collection or score not found | - | +**0** | Error | - | + [[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) # **create_collection** @@ -82,28 +104,42 @@ This method will create a new collection and add it to your `root` collection. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -body = flat_api.CollectionCreation() # CollectionCreation | - -try: - # Create a new collection - api_response = api_instance.create_collection(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->create_collection: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + body = flat_api.CollectionCreation() # CollectionCreation | + + try: + # Create a new collection + api_response = api_instance.create_collection(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->create_collection: %s\n" % e) ``` ### Parameters @@ -125,6 +161,13 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created | - | +**400** | Bad collection creation request | - | +**0** | Error | - | + [[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) # **delete_collection** @@ -136,27 +179,41 @@ This method will schedule the deletion of the collection. Until deleted, the col ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - -try: - # Delete the collection - api_instance.delete_collection(collection) -except ApiException as e: - print("Exception when calling CollectionApi->delete_collection: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + try: + # Delete the collection + api_instance.delete_collection(collection) + except ApiException as e: + print("Exception when calling CollectionApi->delete_collection: %s\n" % e) ``` ### Parameters @@ -178,6 +235,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection deleted | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + [[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) # **delete_score_from_collection** @@ -189,29 +254,43 @@ This method will delete a score from the collection. Unlike [`DELETE /scores/{sc ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) -try: - # Delete a score from the collection - api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) -except ApiException as e: - print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) + try: + # Delete a score from the collection + api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) + except ApiException as e: + print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) ``` ### Parameters @@ -235,6 +314,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Score removed from the collection | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + [[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) # **edit_collection** @@ -244,29 +331,43 @@ Update a collection's metadata ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted body = flat_api.CollectionModification() # CollectionModification | (optional) -try: - # Update a collection's metadata - api_response = api_instance.edit_collection(collection, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->edit_collection: %s\n" % e) + try: + # Update a collection's metadata + api_response = api_instance.edit_collection(collection, body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->edit_collection: %s\n" % e) ``` ### Parameters @@ -289,6 +390,14 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection details | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + [[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) # **get_collection** @@ -298,29 +407,43 @@ Get collection details ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted sharing_key = 'sharing_key_example' # str | 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) -try: - # Get collection details - api_response = api_instance.get_collection(collection, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->get_collection: %s\n" % e) + try: + # Get collection details + api_response = api_instance.get_collection(collection, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->get_collection: %s\n" % e) ``` ### Parameters @@ -343,6 +466,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection details | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + [[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) # **list_collection_scores** @@ -354,21 +485,35 @@ Use this method to list the scores contained in a collection. If no sort option ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted sharing_key = 'sharing_key_example' # str | 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) sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) @@ -376,12 +521,12 @@ limit = 25 # int | This is the maximum number of objects that may be returned (o next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -try: - # List the scores contained in a collection - api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) + try: + # List the scores contained in a collection + api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) ``` ### Parameters @@ -409,6 +554,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of scores | - | +**0** | Error | - | + [[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) # **list_collections** @@ -420,33 +571,47 @@ Use this method to list the user's collections contained in `parent` (by default ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -try: - # List the collections - api_response = api_instance.list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - pprint(api_response) -except ApiException as e: - print("Exception when calling CollectionApi->list_collections: %s\n" % e) + try: + # List the collections + api_response = api_instance.list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + pprint(api_response) + except ApiException as e: + print("Exception when calling CollectionApi->list_collections: %s\n" % e) ``` ### Parameters @@ -473,6 +638,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of collections | - | +**0** | Error | - | + [[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) # **untrash_collection** @@ -484,27 +655,41 @@ This method will restore the collection by removing it from the `trash` and add ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.CollectionApi(flat_api.ApiClient(configuration)) -collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - -try: - # Untrash a collection - api_instance.untrash_collection(collection) -except ApiException as e: - print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + try: + # Untrash a collection + api_instance.untrash_collection(collection) + except ApiException as e: + print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) ``` ### Parameters @@ -526,5 +711,13 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been untrashed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) diff --git a/docs/CollectionApp.md b/docs/CollectionApp.md index 4dd7784..c7ee3ac 100644 --- a/docs/CollectionApp.md +++ b/docs/CollectionApp.md @@ -1,5 +1,6 @@ # CollectionApp +For App collections, the details of the app that created the collection ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md index 17826ca..ff079a3 100644 --- a/docs/CollectionCapabilities.md +++ b/docs/CollectionCapabilities.md @@ -1,5 +1,6 @@ # CollectionCapabilities +Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md index cd4b3c6..0b66059 100644 --- a/docs/CollectionModification.md +++ b/docs/CollectionModification.md @@ -1,5 +1,6 @@ # CollectionModification +Edit the collection metadata ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/CollectionPrivacy.md b/docs/CollectionPrivacy.md index 7447ba9..2c55908 100644 --- a/docs/CollectionPrivacy.md +++ b/docs/CollectionPrivacy.md @@ -1,5 +1,6 @@ # CollectionPrivacy +The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/CollectionType.md b/docs/CollectionType.md index 9f6e24a..00a8406 100644 --- a/docs/CollectionType.md +++ b/docs/CollectionType.md @@ -1,5 +1,6 @@ # CollectionType +Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/FlatErrorResponse.md b/docs/FlatErrorResponse.md index 6f8d08a..914f13c 100644 --- a/docs/FlatErrorResponse.md +++ b/docs/FlatErrorResponse.md @@ -1,5 +1,6 @@ # FlatErrorResponse +An API Error response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/FlatLocales.md b/docs/FlatLocales.md index 0e35bd3..5cc6662 100644 --- a/docs/FlatLocales.md +++ b/docs/FlatLocales.md @@ -1,5 +1,6 @@ # FlatLocales +The user language ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GoogleClassroomCoursework.md b/docs/GoogleClassroomCoursework.md index 17bc845..ef83ab8 100644 --- a/docs/GoogleClassroomCoursework.md +++ b/docs/GoogleClassroomCoursework.md @@ -1,5 +1,6 @@ # GoogleClassroomCoursework +A coursework on Google Classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GoogleClassroomSubmission.md b/docs/GoogleClassroomSubmission.md index bd70302..f3c9478 100644 --- a/docs/GoogleClassroomSubmission.md +++ b/docs/GoogleClassroomSubmission.md @@ -1,5 +1,6 @@ # GoogleClassroomSubmission +A coursework submission on Google Classroom ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Group.md b/docs/Group.md index 6e25e3c..d8d0fa5 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -1,5 +1,6 @@ # Group +A group of users ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupApi.md b/docs/GroupApi.md index d26dd63..c4ef5e7 100644 --- a/docs/GroupApi.md +++ b/docs/GroupApi.md @@ -16,28 +16,42 @@ Get group information ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.GroupApi(flat_api.ApiClient(configuration)) -group = 'group_example' # str | Unique identifier of a Flat group - -try: - # Get group information - api_response = api_instance.get_group_details(group) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupApi->get_group_details: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + + try: + # Get group information + api_response = api_instance.get_group_details(group) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupApi->get_group_details: %s\n" % e) ``` ### Parameters @@ -59,6 +73,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group details | - | +**0** | Error | - | + [[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) # **get_group_scores** @@ -70,29 +90,43 @@ Get the list of scores shared with a group. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.GroupApi(flat_api.ApiClient(configuration)) -group = 'group_example' # str | Unique identifier of a Flat group +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) -try: - # List group's scores - api_response = api_instance.get_group_scores(group, parent=parent) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) + try: + # List group's scores + api_response = api_instance.get_group_scores(group, parent=parent) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) ``` ### Parameters @@ -115,6 +149,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group's scores | - | +**0** | Error | - | + [[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) # **list_group_users** @@ -124,29 +164,43 @@ List group's users ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.GroupApi(flat_api.ApiClient(configuration)) -group = 'group_example' # str | Unique identifier of a Flat group +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group source = 'source_example' # str | Filter the users by their source (optional) -try: - # List group's users - api_response = api_instance.list_group_users(group, source=source) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) + try: + # List group's users + api_response = api_instance.list_group_users(group, source=source) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) ``` ### Parameters @@ -169,5 +223,11 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of users member of the group | - | +**0** | Error | - | + [[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) diff --git a/docs/GroupDetails.md b/docs/GroupDetails.md index f09ca57..8cdac74 100644 --- a/docs/GroupDetails.md +++ b/docs/GroupDetails.md @@ -1,5 +1,6 @@ # GroupDetails +The details of a group ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupType.md b/docs/GroupType.md index 02d2c1c..7394a70 100644 --- a/docs/GroupType.md +++ b/docs/GroupType.md @@ -1,5 +1,6 @@ # GroupType +The type of the group ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LicenseMode.md b/docs/LicenseMode.md index af54571..2e93c82 100644 --- a/docs/LicenseMode.md +++ b/docs/LicenseMode.md @@ -1,5 +1,6 @@ # LicenseMode +Mode of the license ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LicenseSources.md b/docs/LicenseSources.md index f56b568..3a5dbc3 100644 --- a/docs/LicenseSources.md +++ b/docs/LicenseSources.md @@ -1,5 +1,6 @@ # LicenseSources +Source of the license ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LmsName.md b/docs/LmsName.md index 384f372..5c2f0eb 100644 --- a/docs/LmsName.md +++ b/docs/LmsName.md @@ -1,5 +1,6 @@ # LmsName +LMS name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LtiCredentials.md b/docs/LtiCredentials.md index 06c1662..2bc878c 100644 --- a/docs/LtiCredentials.md +++ b/docs/LtiCredentials.md @@ -1,5 +1,6 @@ # LtiCredentials +A couple of LTI 1.x OAuth credentials ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LtiCredentialsCreation.md b/docs/LtiCredentialsCreation.md index cc43b38..584dd59 100644 --- a/docs/LtiCredentialsCreation.md +++ b/docs/LtiCredentialsCreation.md @@ -1,5 +1,6 @@ # LtiCredentialsCreation +Creation of a couple of LTI 1.x OAuth credentials ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MediaAttachment.md b/docs/MediaAttachment.md index 77b32eb..6dab211 100644 --- a/docs/MediaAttachment.md +++ b/docs/MediaAttachment.md @@ -1,5 +1,6 @@ # MediaAttachment +Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MediaScoreSharingMode.md b/docs/MediaScoreSharingMode.md index 98d7bab..849a628 100644 --- a/docs/MediaScoreSharingMode.md +++ b/docs/MediaScoreSharingMode.md @@ -1,5 +1,6 @@ # MediaScoreSharingMode +The sharing mode of the score for classes post and assignments ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md index 3e496a7..fc0a389 100644 --- a/docs/MicrosoftGraphAssignment.md +++ b/docs/MicrosoftGraphAssignment.md @@ -1,5 +1,6 @@ # MicrosoftGraphAssignment +A Microsoft Teams asignment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MicrosoftGraphSubmission.md b/docs/MicrosoftGraphSubmission.md index 53d6ec7..74d50a8 100644 --- a/docs/MicrosoftGraphSubmission.md +++ b/docs/MicrosoftGraphSubmission.md @@ -1,5 +1,6 @@ # MicrosoftGraphSubmission +A Microsoft Teams submission ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 0168e62..28de4aa 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -20,37 +20,51 @@ Method | HTTP request | Description # **count_orga_users** -> int[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) +> list[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) Count the organization users using the provided filters ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -role = ['role_example'] # list[str] | Filter users by role (optional) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + role = ['role_example'] # list[str] | Filter users by role (optional) q = 'q_example' # str | The query to search (optional) group = ['group_example'] # list[str] | Filter users by group (optional) no_active_license = True # bool | Filter users who don't have an active license (optional) -try: - # Count the organization users using the provided filters - api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) + try: + # Count the organization users using the provided filters + api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) ``` ### Parameters @@ -64,7 +78,7 @@ Name | Type | Description | Notes ### Return type -[**int[UserDetailsAdmin]**](UserDetailsAdmin.md) +[**list[UserDetailsAdmin]**](UserDetailsAdmin.md) ### Authorization @@ -75,6 +89,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Number of users | - | +**0** | Error | - | + [[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) # **create_lti_credentials** @@ -86,28 +106,42 @@ Flat for Education is a Certified LTI Provider. You can use these API methods to ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | - -try: - # Create a new couple of LTI 1.x credentials - api_response = api_instance.create_lti_credentials(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | + + try: + # Create a new couple of LTI 1.x credentials + api_response = api_instance.create_lti_credentials(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) ``` ### Parameters @@ -129,6 +163,13 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The LTI Credentials | - | +**403** | Not admin of an organization | - | +**0** | Error | - | + [[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) # **create_organization_invitation** @@ -140,28 +181,42 @@ This method creates and sends invitation for teachers and admins. Invitations c ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) - -try: - # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) + + try: + # Create a new invitation to join the organization + api_response = api_instance.create_organization_invitation(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) ``` ### Parameters @@ -183,6 +238,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New invitation created | - | +**0** | Error | - | + [[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) # **create_organization_user** @@ -192,28 +253,42 @@ Create a new user account ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -body = flat_api.UserCreation() # UserCreation | (optional) - -try: - # Create a new user account - api_response = api_instance.create_organization_user(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.UserCreation() # UserCreation | (optional) + + try: + # Create a new user account + api_response = api_instance.create_organization_user(body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) ``` ### Parameters @@ -235,6 +310,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New user created | - | +**0** | Error | - | + [[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) # **create_organization_user_access_token** @@ -246,29 +327,43 @@ This operation will create an API access token for a chosen organization user. T ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of the Flat account +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account organization_user_access_token_creation = flat_api.OrganizationUserAccessTokenCreation() # OrganizationUserAccessTokenCreation | (optional) -try: - # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) + try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) ``` ### Parameters @@ -291,6 +386,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created API access token | - | +**0** | Error | - | + [[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) # **create_organization_user_signin_link** @@ -300,29 +401,43 @@ Create a sign in link for an organization user ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of the Flat account +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account organization_user_signin_link_creation = flat_api.OrganizationUserSigninLinkCreation() # OrganizationUserSigninLinkCreation | (optional) -try: - # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) + try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) ``` ### Parameters @@ -345,6 +460,12 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sign in link | - | +**0** | Error | - | + [[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) # **list_lti_credentials** @@ -354,27 +475,41 @@ List LTI 1.x credentials ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) - -try: - # List LTI 1.x credentials - api_response = api_instance.list_lti_credentials() - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + + try: + # List LTI 1.x credentials + api_response = api_instance.list_lti_credentials() + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) ``` ### Parameters @@ -393,6 +528,13 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of LTI Credentials | - | +**403** | Not admin of an organization | - | +**0** | Error | - | + [[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) # **list_organization_invitations** @@ -402,31 +544,45 @@ List the organization invitations ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -role = 'role_example' # str | Filter users by role (optional) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + role = 'role_example' # str | Filter users by role (optional) limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -try: - # List the organization invitations - api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) + try: + # List the organization invitations + api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) ``` ### Parameters @@ -451,6 +607,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of invitations | - | +**0** | Error | - | + [[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) # **list_organization_users** @@ -460,21 +622,35 @@ List the organization users ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -sort = ['sort_example'] # list[str] | The order to sort the user list (optional) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + sort = ['sort_example'] # list[str] | The order to sort the user list (optional) direction = 'direction_example' # str | Sort direction (optional) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) @@ -486,19 +662,19 @@ license_expiration_date = ['license_expiration_date_example'] # list[str] | Filt only_ids = True # bool | Return only user ids (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) -try: - # List the organization users - api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) + try: + # List the organization users + api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sort** | **list[str]**| The order to sort the user list | [optional] + **sort** | [**list[str]**](str.md)| The order to sort the user list | [optional] **direction** | **str**| Sort direction | [optional] **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] @@ -523,6 +699,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of users | - | +**0** | Error | - | + [[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) # **remove_organization_invitation** @@ -532,27 +714,41 @@ Remove an organization invitation ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -invitation = 'invitation_example' # str | Unique identifier of the invitation - -try: - # Remove an organization invitation - api_instance.remove_organization_invitation(invitation) -except ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + invitation = 'invitation_example' # str | Unique identifier of the invitation + + try: + # Remove an organization invitation + api_instance.remove_organization_invitation(invitation) + except ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) ``` ### Parameters @@ -574,6 +770,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The invitation has been removed | - | +**0** | Error | - | + [[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) # **remove_organization_user** @@ -585,28 +787,42 @@ This operation removes an account from Flat and its data, including: * The music ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of the Flat account +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) -try: - # Remove an account from Flat - api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual) -except ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) + try: + # Remove an account from Flat + api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual) + except ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) ``` ### Parameters @@ -629,6 +845,12 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User deleted | - | +**0** | Error | - | + [[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) # **revoke_lti_credentials** @@ -638,27 +860,41 @@ Revoke LTI 1.x credentials ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -credentials = 'credentials_example' # str | Credentials unique identifier - -try: - # Revoke LTI 1.x credentials - api_instance.revoke_lti_credentials(credentials) -except ApiException as e: - print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + credentials = 'credentials_example' # str | Credentials unique identifier + + try: + # Revoke LTI 1.x credentials + api_instance.revoke_lti_credentials(credentials) + except ApiException as e: + print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) ``` ### Parameters @@ -680,6 +916,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Credentials revoked | - | +**403** | Not admin of an organization | - | +**404** | Credentials not found | - | +**0** | Error | - | + [[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) # **update_organization_user** @@ -689,29 +933,43 @@ Update account information ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.OrganizationApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of the Flat account +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account body = flat_api.UserAdminUpdate() # UserAdminUpdate | -try: - # Update account information - api_response = api_instance.update_organization_user(user, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) + try: + # Update account information + api_response = api_instance.update_organization_user(user, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) ``` ### Parameters @@ -734,5 +992,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User updated | - | +**0** | Error | - | + [[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) diff --git a/docs/OrganizationInvitation.md b/docs/OrganizationInvitation.md index aa01f11..b796182 100644 --- a/docs/OrganizationInvitation.md +++ b/docs/OrganizationInvitation.md @@ -1,5 +1,6 @@ # OrganizationInvitation +Details of an invitation to join an organization ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OrganizationInvitationCreation.md b/docs/OrganizationInvitationCreation.md index 338b118..e16741b 100644 --- a/docs/OrganizationInvitationCreation.md +++ b/docs/OrganizationInvitationCreation.md @@ -1,5 +1,6 @@ # OrganizationInvitationCreation +The parameters to create an organization invitation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OrganizationRoles.md b/docs/OrganizationRoles.md index 6d49485..15e65a5 100644 --- a/docs/OrganizationRoles.md +++ b/docs/OrganizationRoles.md @@ -1,5 +1,6 @@ # OrganizationRoles +User's Organization Role (for Edu users only) ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/OrganizationUserAccessTokenCreation.md index 0f6702c..e4f7750 100644 --- a/docs/OrganizationUserAccessTokenCreation.md +++ b/docs/OrganizationUserAccessTokenCreation.md @@ -1,5 +1,6 @@ # OrganizationUserAccessTokenCreation +Creation of a delegated API access token for an organization user ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ResourceCollaboratorCreation.md b/docs/ResourceCollaboratorCreation.md index 2faa040..915ac51 100644 --- a/docs/ResourceCollaboratorCreation.md +++ b/docs/ResourceCollaboratorCreation.md @@ -1,5 +1,6 @@ # ResourceCollaboratorCreation +Add a collaborator to a resource. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ResourceRights.md b/docs/ResourceRights.md index 7ce4ce9..3c89fa8 100644 --- a/docs/ResourceRights.md +++ b/docs/ResourceRights.md @@ -1,5 +1,6 @@ # ResourceRights +The rights of the current user on a score or collection ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index 847f446..d0992da 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -45,29 +45,43 @@ Share a score with a single user or a group. This API call allows to add, invite ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | -try: - # Add a new collaborator - api_response = api_instance.add_score_collaborator(score, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) + try: + # Add a new collaborator + api_response = api_instance.add_score_collaborator(score, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) ``` ### Parameters @@ -90,6 +104,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The newly added collaborator metadata | - | +**402** | Account overquota | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **add_score_track** @@ -101,29 +124,43 @@ Use this method to add new track to the score. This track can then be played on ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreTrackCreation() # ScoreTrackCreation | -try: - # Add a new video or audio track to the score - api_response = api_instance.add_score_track(score, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->add_score_track: %s\n" % e) + try: + # Add a new video or audio track to the score + api_response = api_instance.add_score_track(score, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->add_score_track: %s\n" % e) ``` ### Parameters @@ -146,6 +183,14 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created track | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **create_export_task** @@ -157,32 +202,46 @@ Some of the exports of a score takes are longer to process than a simple API req ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. format = 'format_example' # str | The format of the file that will be generated or the target service name where the file will be exported sharing_key = 'sharing_key_example' # str | 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) body = flat_api.TaskExportOptions() # TaskExportOptions | (optional) -try: - # Create a new score export task - api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->create_export_task: %s\n" % e) + try: + # Create a new score export task + api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) ``` ### Parameters @@ -208,6 +267,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task associated to the generation of the file | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or associated file not found | - | +**0** | Error | - | + [[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) # **create_score** @@ -219,28 +287,42 @@ Use this API method to **create a new music score in the current User account**. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -body = flat_api.ScoreCreation() # ScoreCreation | - -try: - # Create a new score - api_response = api_instance.create_score(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->create_score: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + body = flat_api.ScoreCreation() # ScoreCreation | + + try: + # Create a new score + api_response = api_instance.create_score(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->create_score: %s\n" % e) ``` ### Parameters @@ -262,6 +344,14 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score created | - | +**400** | Bad score creation request | - | +**402** | Account overquota | - | +**0** | Error | - | + [[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) # **create_score_revision** @@ -273,29 +363,43 @@ Update a score by uploading a new revision for this one. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreRevisionCreation() # ScoreRevisionCreation | -try: - # Create a new revision - api_response = api_instance.create_score_revision(score, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) + try: + # Create a new revision + api_response = api_instance.create_score_revision(score, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) ``` ### Parameters @@ -318,6 +422,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new created revision metadata | - | +**402** | Account overquota | - | +**403** | Not granted to modify this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **delete_score** @@ -329,28 +442,42 @@ This method can be used by the owner/admin (`aclAdmin` rights) of a score as wel ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) (default to False) -try: - # Delete a score - api_instance.delete_score(score, now=now) -except ApiException as e: - print("Exception when calling ScoreApi->delete_score: %s\n" % e) + try: + # Delete a score + api_instance.delete_score(score, now=now) + except ApiException as e: + print("Exception when calling ScoreApi->delete_score: %s\n" % e) ``` ### Parameters @@ -373,6 +500,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been removed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **delete_score_comment** @@ -382,29 +517,43 @@ Delete a comment ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment sharing_key = 'sharing_key_example' # str | 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) -try: - # Delete a comment - api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) -except ApiException as e: - print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) + try: + # Delete a comment + api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) + except ApiException as e: + print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) ``` ### Parameters @@ -428,6 +577,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been deleted | - | +**403** | Not granted to access to this score or not the original comment creator | - | +**404** | Score or comment not found | - | +**0** | Error | - | + [[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) # **delete_score_track** @@ -437,28 +594,42 @@ Remove an audio or video track linked to the score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track -try: - # Remove an audio or video track linked to the score - api_instance.delete_score_track(score, track) -except ApiException as e: - print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) + try: + # Remove an audio or video track linked to the score + api_instance.delete_score_track(score, track) + except ApiException as e: + print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) ``` ### Parameters @@ -481,6 +652,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Track removed | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + [[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) # **edit_score** @@ -492,29 +671,43 @@ This API method allows you to change the metadata of a score document (e.g. its ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreModification() # ScoreModification | (optional) -try: - # Edit a score's metadata - api_response = api_instance.edit_score(score, body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->edit_score: %s\n" % e) + try: + # Edit a score's metadata + api_response = api_instance.edit_score(score, body=body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->edit_score: %s\n" % e) ``` ### Parameters @@ -537,6 +730,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **fork_score** @@ -548,30 +750,44 @@ This API call will make a copy of the last revision of the specified score and c ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | sharing_key = 'sharing_key_example' # str | 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) -try: - # Fork a score - api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->fork_score: %s\n" % e) + try: + # Fork a score + api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->fork_score: %s\n" % e) ``` ### Parameters @@ -595,6 +811,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **ger_user_likes** @@ -604,29 +829,43 @@ List liked scores ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + user = 'user_example' # str | 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 (optional) -try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) + try: + # List liked scores + api_response = api_instance.ger_user_likes(user, ids=ids) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) ``` ### Parameters @@ -649,6 +888,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of liked scores | - | +**0** | Error | - | + [[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) # **get_group_scores** @@ -660,29 +905,43 @@ Get the list of scores shared with a group. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -group = 'group_example' # str | Unique identifier of a Flat group +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) -try: - # List group's scores - api_response = api_instance.get_group_scores(group, parent=parent) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) + try: + # List group's scores + api_response = api_instance.get_group_scores(group, parent=parent) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) ``` ### Parameters @@ -705,6 +964,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group's scores | - | +**0** | Error | - | + [[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) # **get_score** @@ -716,29 +981,43 @@ Get the details of a score identified by the `score` parameter in the URL. The c ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) -try: - # Get a score's metadata - api_response = api_instance.get_score(score, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score: %s\n" % e) + try: + # Get a score's metadata + api_response = api_instance.get_score(score, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score: %s\n" % e) ``` ### Parameters @@ -761,6 +1040,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota and this document is out of the granted quota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_score_collaborator** @@ -772,30 +1060,44 @@ Get the information about a collaborator (User or Group). ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** sharing_key = 'sharing_key_example' # str | 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) -try: - # Get a collaborator - api_response = api_instance.get_score_collaborator(score, collaborator, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) + try: + # Get a collaborator + api_response = api_instance.get_score_collaborator(score, collaborator, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) ``` ### Parameters @@ -819,6 +1121,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collaborator information | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or collaborator not found | - | +**0** | Error | - | + [[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) # **get_score_collaborators** @@ -830,29 +1141,43 @@ This API call will list the different collaborators of a score and their rights ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) -try: - # List the collaborators - api_response = api_instance.get_score_collaborators(score, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) + try: + # List the collaborators + api_response = api_instance.get_score_collaborators(score, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) ``` ### Parameters @@ -875,6 +1200,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of collaborators | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_score_comments** @@ -886,32 +1220,46 @@ This method lists the different comments added on a music score (documents and i ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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 = 'type_example' # str | Filter the comments by type (optional) sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) -try: - # List comments - api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) + try: + # List comments + api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) ``` ### Parameters @@ -937,6 +1285,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comments of the score | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_score_revision** @@ -948,30 +1305,44 @@ When creating a score or saving a new version of a score, a revision is created ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. sharing_key = 'sharing_key_example' # str | 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) -try: - # Get a score revision - api_response = api_instance.get_score_revision(score, revision, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) + try: + # Get a score revision + api_response = api_instance.get_score_revision(score, revision, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) ``` ### Parameters @@ -995,6 +1366,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Revision metadata | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_score_revision_data** @@ -1006,21 +1386,35 @@ Retrieve the file corresponding to a score revision (the following formats are a ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. format = 'format_example' # str | The format of the file you will retrieve sharing_key = 'sharing_key_example' # str | 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) @@ -1028,12 +1422,12 @@ parts = 'parts_example' # str | An optional a set of parts uuid to be exported. default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) -try: - # Get a score revision data - api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) + try: + # Get a score revision data + api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) ``` ### Parameters @@ -1061,6 +1455,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Revision data | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or associated file not found | - | +**0** | Error | - | + [[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) # **get_score_revisions** @@ -1072,29 +1475,43 @@ When creating a score or saving a new version of a score, a revision is created ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) -try: - # List the revisions - api_response = api_instance.get_score_revisions(score, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) + try: + # List the revisions + api_response = api_instance.get_score_revisions(score, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) ``` ### Parameters @@ -1117,6 +1534,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of revisions | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **get_score_submissions** @@ -1128,28 +1554,42 @@ This API call will list the different assignments submissions where the score is ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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: - # List submissions related to the score - api_response = api_instance.get_score_submissions(score) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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: + # List submissions related to the score + api_response = api_instance.get_score_submissions(score) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) ``` ### Parameters @@ -1171,6 +1611,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + [[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) # **get_score_track** @@ -1180,30 +1626,44 @@ Retrieve the details of an audio or video track linked to a score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track sharing_key = 'sharing_key_example' # str | 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) -try: - # Retrieve the details of an audio or video track linked to a score - api_response = api_instance.get_score_track(score, track, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_score_track: %s\n" % e) + try: + # Retrieve the details of an audio or video track linked to a score + api_response = api_instance.get_score_track(score, track, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_score_track: %s\n" % e) ``` ### Parameters @@ -1227,6 +1687,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Track details | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + [[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) # **get_user_scores** @@ -1238,29 +1706,43 @@ Get the list of public scores owned by a User. **DEPRECATED**: Please note that ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) -try: - # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) + try: + # List user's scores + api_response = api_instance.get_user_scores(user, parent=parent) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) ``` ### Parameters @@ -1283,6 +1765,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user scores | - | +**0** | Error | - | + [[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) # **list_score_tracks** @@ -1292,31 +1780,45 @@ List the audio or video tracks linked to a score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) assignment = 'assignment_example' # str | An assignment id with which all the tracks returned will be related to (optional) list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) -try: - # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) + try: + # List the audio or video tracks linked to a score + api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) ``` ### Parameters @@ -1341,6 +1843,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of tracks | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **mark_score_comment_resolved** @@ -1350,29 +1860,43 @@ Mark the comment as resolved ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment sharing_key = 'sharing_key_example' # str | 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) -try: - # Mark the comment as resolved - api_instance.mark_score_comment_resolved(score, comment, sharing_key=sharing_key) -except ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) + try: + # Mark the comment as resolved + api_instance.mark_score_comment_resolved(score, comment, sharing_key=sharing_key) + except ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) ``` ### Parameters @@ -1396,6 +1920,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been marked as resolved | - | +**403** | Not granted to mark this comment as resolved | - | +**404** | Score or comment not found | - | +**0** | Error | - | + [[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) # **mark_score_comment_unresolved** @@ -1405,29 +1937,43 @@ Mark the comment as unresolved ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment sharing_key = 'sharing_key_example' # str | 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) -try: - # Mark the comment as unresolved - api_instance.mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) -except ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) + try: + # Mark the comment as unresolved + api_instance.mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) + except ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) ``` ### Parameters @@ -1451,6 +1997,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been unmarked as resolved | - | +**403** | Not granted to unmark this comment as resolved | - | +**404** | Score or comment not found | - | +**0** | Error | - | + [[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) # **post_score_comment** @@ -1462,30 +2016,44 @@ Post a document or a contextualized comment on a document. Please note that thi ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreCommentCreation() # ScoreCommentCreation | sharing_key = 'sharing_key_example' # str | 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) -try: - # Post a new comment - api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) + try: + # Post a new comment + api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) ``` ### Parameters @@ -1509,6 +2077,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new comment | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score, to post a comment, or your API call triggered our spam filter. | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **remove_score_collaborator** @@ -1520,28 +2097,42 @@ Remove the specified collaborator from the score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** -try: - # Delete a collaborator - api_instance.remove_score_collaborator(score, collaborator) -except ApiException as e: - print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) + try: + # Delete a collaborator + api_instance.remove_score_collaborator(score, collaborator) + except ApiException as e: + print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) ``` ### Parameters @@ -1564,6 +2155,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The collaborator has been removed | - | +**403** | Not granted to manage this score | - | +**404** | Score or collaborator not found | - | +**0** | Error | - | + [[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) # **untrash_score** @@ -1575,27 +2174,41 @@ This method will remove the score from the `trash` collection and from the delet ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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: - # Untrash a score - api_instance.untrash_score(score) -except ApiException as e: - print("Exception when calling ScoreApi->untrash_score: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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: + # Untrash a score + api_instance.untrash_score(score) + except ApiException as e: + print("Exception when calling ScoreApi->untrash_score: %s\n" % e) ``` ### Parameters @@ -1617,6 +2230,14 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been untrashed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **update_score_comment** @@ -1626,31 +2247,45 @@ Update an existing comment ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment body = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | sharing_key = 'sharing_key_example' # str | 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) -try: - # Update an existing comment - api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) + try: + # Update an existing comment + api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) ``` ### Parameters @@ -1675,6 +2310,15 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The edited comment | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score or not the original comment creator | - | +**404** | Score not found | - | +**0** | Error | - | + [[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) # **update_score_track** @@ -1684,30 +2328,44 @@ Update an audio or video track linked to a score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.ScoreApi(flat_api.ApiClient(configuration)) -score = 'score_example' # str | 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`). +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track body = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | -try: - # Update an audio or video track linked to a score - api_response = api_instance.update_score_track(score, track, body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ScoreApi->update_score_track: %s\n" % e) + try: + # Update an audio or video track linked to a score + api_response = api_instance.update_score_track(score, track, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ScoreApi->update_score_track: %s\n" % e) ``` ### Parameters @@ -1731,5 +2389,13 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated track | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + [[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) diff --git a/docs/ScoreComment.md b/docs/ScoreComment.md index 67ddca5..ebe6e7d 100644 --- a/docs/ScoreComment.md +++ b/docs/ScoreComment.md @@ -1,5 +1,6 @@ # ScoreComment +Comment added on a sheet music ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCommentContext.md b/docs/ScoreCommentContext.md index e0f75ec..1e9b4a8 100644 --- a/docs/ScoreCommentContext.md +++ b/docs/ScoreCommentContext.md @@ -1,5 +1,6 @@ # ScoreCommentContext +The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCommentCreation.md b/docs/ScoreCommentCreation.md index df97b0a..0b4458f 100644 --- a/docs/ScoreCommentCreation.md +++ b/docs/ScoreCommentCreation.md @@ -1,5 +1,6 @@ # ScoreCommentCreation +Creation of a comment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCommentModeration.md b/docs/ScoreCommentModeration.md index 25fee03..8ed95ce 100644 --- a/docs/ScoreCommentModeration.md +++ b/docs/ScoreCommentModeration.md @@ -1,5 +1,6 @@ # ScoreCommentModeration +Information about the comment being moderated ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCommentUpdate.md b/docs/ScoreCommentUpdate.md index ed69050..fe50435 100644 --- a/docs/ScoreCommentUpdate.md +++ b/docs/ScoreCommentUpdate.md @@ -1,5 +1,6 @@ # ScoreCommentUpdate +Update of a comment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCommentsCounts.md b/docs/ScoreCommentsCounts.md index 640b879..c012d83 100644 --- a/docs/ScoreCommentsCounts.md +++ b/docs/ScoreCommentsCounts.md @@ -1,5 +1,6 @@ # ScoreCommentsCounts +A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md index 783177a..1db00be 100644 --- a/docs/ScoreCreationBuilderData.md +++ b/docs/ScoreCreationBuilderData.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | [optional] +**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | **layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/ScoreCreationBuilderDataLayoutData.md index a8d9656..1b432f2 100644 --- a/docs/ScoreCreationBuilderDataLayoutData.md +++ b/docs/ScoreCreationBuilderDataLayoutData.md @@ -1,5 +1,6 @@ # ScoreCreationBuilderDataLayoutData +Control the appearance of the score. If missing, default values are used. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md index b9583fb..363d87c 100644 --- a/docs/ScoreCreationBuilderDataScoreData.md +++ b/docs/ScoreCreationBuilderDataScoreData.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] **nb_beats** | **float** | The number of beats in the measure | [optional] **beat_type** | **float** | The duration of a beat in the measure | [optional] -**instruments** | [**list[ScoreCreationBuilderDataScoreDataInstruments]**](ScoreCreationBuilderDataScoreDataInstruments.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | [optional] +**instruments** | [**list[ScoreCreationBuilderDataScoreDataInstruments]**](ScoreCreationBuilderDataScoreDataInstruments.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderDataScoreDataInstruments.md b/docs/ScoreCreationBuilderDataScoreDataInstruments.md index 318e898..95d71ec 100644 --- a/docs/ScoreCreationBuilderDataScoreDataInstruments.md +++ b/docs/ScoreCreationBuilderDataScoreDataInstruments.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | [optional] -**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | [optional] +**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | +**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | **long_name** | **str** | The full name of the instrument | [optional] **short_name** | **str** | The abbreviation of the name of the instrument | [optional] diff --git a/docs/ScoreCreationType.md b/docs/ScoreCreationType.md index d2e2aa7..72fb6ef 100644 --- a/docs/ScoreCreationType.md +++ b/docs/ScoreCreationType.md @@ -1,5 +1,6 @@ # ScoreCreationType +The type of creation (an orginal, an arrangement) ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreFork.md b/docs/ScoreFork.md index 1076623..b359db9 100644 --- a/docs/ScoreFork.md +++ b/docs/ScoreFork.md @@ -1,5 +1,6 @@ # ScoreFork +Options to fork the score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreLicense.md b/docs/ScoreLicense.md index a0fa12e..f939bad 100644 --- a/docs/ScoreLicense.md +++ b/docs/ScoreLicense.md @@ -1,5 +1,6 @@ # ScoreLicense +License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreLikesCounts.md b/docs/ScoreLikesCounts.md index ca874bd..f33c4b5 100644 --- a/docs/ScoreLikesCounts.md +++ b/docs/ScoreLikesCounts.md @@ -1,5 +1,6 @@ # ScoreLikesCounts +A computed version of the weekly, monthly and total of number of likes for a score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md index 8fdfc98..08a49fb 100644 --- a/docs/ScoreModification.md +++ b/docs/ScoreModification.md @@ -1,5 +1,6 @@ # ScoreModification +Edit the score metadata ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScorePlaysCounts.md b/docs/ScorePlaysCounts.md index e94d5c5..8b36c76 100644 --- a/docs/ScorePlaysCounts.md +++ b/docs/ScorePlaysCounts.md @@ -1,5 +1,6 @@ # ScorePlaysCounts +A computed version of the total, weekly, and monthly number of plays of the score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScorePrivacy.md b/docs/ScorePrivacy.md index 4f9dd0e..19bb9b9 100644 --- a/docs/ScorePrivacy.md +++ b/docs/ScorePrivacy.md @@ -1,5 +1,6 @@ # ScorePrivacy +The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreRevision.md b/docs/ScoreRevision.md index b7dcfaf..e8b10ce 100644 --- a/docs/ScoreRevision.md +++ b/docs/ScoreRevision.md @@ -1,5 +1,6 @@ # ScoreRevision +A score revision metadata ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md index 146794e..dde4ebd 100644 --- a/docs/ScoreRevisionCreation.md +++ b/docs/ScoreRevisionCreation.md @@ -1,5 +1,6 @@ # ScoreRevisionCreation +A new created revision ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreRevisionStatistics.md b/docs/ScoreRevisionStatistics.md index 81a336c..0039b4d 100644 --- a/docs/ScoreRevisionStatistics.md +++ b/docs/ScoreRevisionStatistics.md @@ -1,5 +1,6 @@ # ScoreRevisionStatistics +The statistics related to the score revision (additions and deletions) ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrack.md b/docs/ScoreTrack.md index abbae1d..7ec26b4 100644 --- a/docs/ScoreTrack.md +++ b/docs/ScoreTrack.md @@ -1,5 +1,6 @@ # ScoreTrack +An audio track for a score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrackCreation.md b/docs/ScoreTrackCreation.md index 1000486..fe459e8 100644 --- a/docs/ScoreTrackCreation.md +++ b/docs/ScoreTrackCreation.md @@ -1,5 +1,6 @@ # ScoreTrackCreation +Creation of a new track. This one must contain the URL of the track or the corresponding file ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrackPoint.md b/docs/ScoreTrackPoint.md index fe021b9..763eb57 100644 --- a/docs/ScoreTrackPoint.md +++ b/docs/ScoreTrackPoint.md @@ -1,5 +1,6 @@ # ScoreTrackPoint +A track synchronization point ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrackState.md b/docs/ScoreTrackState.md index 44955df..cc1485f 100644 --- a/docs/ScoreTrackState.md +++ b/docs/ScoreTrackState.md @@ -1,5 +1,6 @@ # ScoreTrackState +State of the track ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrackType.md b/docs/ScoreTrackType.md index 265e6c6..19ed22b 100644 --- a/docs/ScoreTrackType.md +++ b/docs/ScoreTrackType.md @@ -1,5 +1,6 @@ # ScoreTrackType +The type of an audio track ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreTrackUpdate.md b/docs/ScoreTrackUpdate.md index 44bb417..403033e 100644 --- a/docs/ScoreTrackUpdate.md +++ b/docs/ScoreTrackUpdate.md @@ -1,5 +1,6 @@ # ScoreTrackUpdate +Update an existing track. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ScoreViewsCounts.md b/docs/ScoreViewsCounts.md index bc9d3fb..bb33c0c 100644 --- a/docs/ScoreViewsCounts.md +++ b/docs/ScoreViewsCounts.md @@ -1,5 +1,6 @@ # ScoreViewsCounts +A computed version of the total, weekly, and monthly number of views of the score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Task.md b/docs/Task.md index 551f269..e1a0ab5 100644 --- a/docs/Task.md +++ b/docs/Task.md @@ -1,5 +1,6 @@ # Task +An asynchronous task ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/TaskApi.md b/docs/TaskApi.md index 7689b1f..ef0ea82 100644 --- a/docs/TaskApi.md +++ b/docs/TaskApi.md @@ -16,28 +16,42 @@ This method can be used to follow a task progression, for example while a score ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.TaskApi(flat_api.ApiClient(configuration)) -task = 'task_example' # str | Unique identifier for the task - -try: - # Get a task details - api_response = api_instance.get_task(task) - pprint(api_response) -except ApiException as e: - print("Exception when calling TaskApi->get_task: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.TaskApi(api_client) + task = 'task_example' # str | Unique identifier for the task + + try: + # Get a task details + api_response = api_instance.get_task(task) + pprint(api_response) + except ApiException as e: + print("Exception when calling TaskApi->get_task: %s\n" % e) ``` ### Parameters @@ -59,5 +73,11 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task details | - | +**0** | Error | - | + [[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) diff --git a/docs/TaskExportOptions.md b/docs/TaskExportOptions.md index 0326e22..682a41c 100644 --- a/docs/TaskExportOptions.md +++ b/docs/TaskExportOptions.md @@ -1,5 +1,6 @@ # TaskExportOptions +Options for the requested export ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/TaskProgress.md b/docs/TaskProgress.md index fe9b029..1110438 100644 --- a/docs/TaskProgress.md +++ b/docs/TaskProgress.md @@ -1,5 +1,6 @@ # TaskProgress +Details about the task progression ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/UserAdminUpdate.md b/docs/UserAdminUpdate.md index 284ade8..dcb21a0 100644 --- a/docs/UserAdminUpdate.md +++ b/docs/UserAdminUpdate.md @@ -1,5 +1,6 @@ # UserAdminUpdate +User update as an organization admin ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/UserApi.md b/docs/UserApi.md index 8f6fd30..aa16671 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -16,29 +16,43 @@ List liked scores ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.UserApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | 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 (optional) -try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) + try: + # List liked scores + api_response = api_instance.ger_user_likes(user, ids=ids) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->ger_user_likes: %s\n" % e) ``` ### Parameters @@ -61,6 +75,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of liked scores | - | +**0** | Error | - | + [[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) # **get_user** @@ -72,28 +92,42 @@ Get a profile of a Flat or Flat for Education User. ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.UserApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. - -try: - # Get a public user profile - api_response = api_instance.get_user(user) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user: %s\n" % e) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. + + try: + # Get a public user profile + api_response = api_instance.get_user(user) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user: %s\n" % e) ``` ### Parameters @@ -115,6 +149,12 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user public details | - | +**0** | Error | - | + [[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) # **get_user_scores** @@ -126,29 +166,43 @@ Get the list of public scores owned by a User. **DEPRECATED**: Please note that ### Example -* OAuth Authentication (OAuth2): +* OAuth Authentication (OAuth2): ```python from __future__ import print_function import time import flat_api from flat_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) configuration.access_token = 'YOUR_ACCESS_TOKEN' -# create an instance of the API class -api_instance = flat_api.UserApi(flat_api.ApiClient(configuration)) -user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) -try: - # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) - pprint(api_response) -except ApiException as e: - print("Exception when calling UserApi->get_user_scores: %s\n" % e) + try: + # List user's scores + api_response = api_instance.get_user_scores(user, parent=parent) + pprint(api_response) + except ApiException as e: + print("Exception when calling UserApi->get_user_scores: %s\n" % e) ``` ### Parameters @@ -171,5 +225,11 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user scores | - | +**0** | Error | - | + [[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) diff --git a/docs/UserCreation.md b/docs/UserCreation.md index 47b15a2..3a20ee4 100644 --- a/docs/UserCreation.md +++ b/docs/UserCreation.md @@ -1,5 +1,6 @@ # UserCreation +User creation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md index 23d7e45..9c4d957 100644 --- a/docs/UserDetailsAdminLicense.md +++ b/docs/UserDetailsAdminLicense.md @@ -1,5 +1,6 @@ # UserDetailsAdminLicense +Current active license of the user ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/flat_api/__init__.py b/flat_api/__init__.py index fd36f98..0b724eb 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -7,7 +7,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -30,6 +30,11 @@ # import ApiClient from flat_api.api_client import ApiClient from flat_api.configuration import Configuration +from flat_api.exceptions import OpenApiException +from flat_api.exceptions import ApiTypeError +from flat_api.exceptions import ApiValueError +from flat_api.exceptions import ApiKeyError +from flat_api.exceptions import ApiException # import models into sdk package from flat_api.models.api_access_token import ApiAccessToken from flat_api.models.app_scopes import AppScopes @@ -137,3 +142,4 @@ from flat_api.models.user_details_admin_license import UserDetailsAdminLicense from flat_api.models.user_public import UserPublic from flat_api.models.user_public_summary import UserPublicSummary + diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index 78c7e94..ad70319 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class AccountApi(object): @@ -42,18 +46,21 @@ def get_authenticated_user(self, **kwargs): # noqa: E501 >>> thread = api.get_authenticated_user(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param bool only_id: Only return the user id + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: UserDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 """Get current user profile # noqa: E501 @@ -64,24 +71,39 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.get_authenticated_user_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param bool only_id: Only return the user id - :return: UserDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UserDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['only_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'only_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_authenticated_user" % key ) @@ -93,7 +115,7 @@ def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'only_id' in local_var_params: + if 'only_id' in local_var_params and local_var_params['only_id'] is not None: # noqa: E501 query_params.append(('onlyId', local_var_params['only_id'])) # noqa: E501 header_params = {} diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index f74b617..8837c9c 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ClassApi(object): @@ -42,18 +46,21 @@ def activate_class(self, _class, **kwargs): # noqa: E501 >>> thread = api.activate_class(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Activate the class # noqa: E501 @@ -64,33 +71,48 @@ def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.activate_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method activate_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `activate_class`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `activate_class`") # noqa: E501 collection_formats = {} @@ -138,19 +160,22 @@ def add_class_user(self, _class, user, **kwargs): # noqa: E501 >>> thread = api.add_class_user(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - else: - (data) = self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - return data + return self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 """Add a user to the class # noqa: E501 @@ -161,9 +186,18 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 >>> thread = api.add_class_user_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -171,28 +205,35 @@ def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_class_user" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `add_class_user`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `add_class_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `add_class_user`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `add_class_user`") # noqa: E501 collection_formats = {} @@ -242,19 +283,22 @@ def archive_assignment(self, _class, assignment, **kwargs): # noqa: E501 >>> thread = api.archive_assignment(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - else: - (data) = self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - return data + return self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 def archive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 """Archive the assignment # noqa: E501 @@ -265,38 +309,54 @@ def archive_assignment_with_http_info(self, _class, assignment, **kwargs): # no >>> thread = api.archive_assignment_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: Assignment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method archive_assignment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `archive_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `archive_assignment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `archive_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `archive_assignment`") # noqa: E501 collection_formats = {} @@ -346,18 +406,21 @@ def archive_class(self, _class, **kwargs): # noqa: E501 >>> thread = api.archive_class(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Archive the class # noqa: E501 @@ -368,33 +431,48 @@ def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.archive_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method archive_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `archive_class`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `archive_class`") # noqa: E501 collection_formats = {} @@ -442,20 +520,23 @@ def copy_assignment(self, _class, assignment, body, **kwargs): # noqa: E501 >>> thread = api.copy_assignment(_class, assignment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param AssignmentCopy body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - else: - (data) = self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - return data + return self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 """Copy an assignment # noqa: E501 @@ -466,43 +547,60 @@ def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # >>> thread = api.copy_assignment_with_http_info(_class, assignment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param AssignmentCopy body: (required) - :return: Assignment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method copy_assignment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `copy_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `copy_assignment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `copy_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `copy_assignment`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `copy_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `copy_assignment`") # noqa: E501 collection_formats = {} @@ -558,19 +656,22 @@ def create_assignment(self, _class, **kwargs): # noqa: E501 >>> thread = api.create_assignment(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param AssignmentCreation body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 """Assignment creation # noqa: E501 @@ -581,34 +682,50 @@ def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.create_assignment_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param AssignmentCreation body: - :return: Assignment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_assignment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `create_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `create_assignment`") # noqa: E501 collection_formats = {} @@ -662,18 +779,21 @@ def create_class(self, body, **kwargs): # noqa: E501 >>> thread = api.create_class(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param ClassCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_class_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_class_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_class_with_http_info(body, **kwargs) # noqa: E501 def create_class_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new class # noqa: E501 @@ -684,33 +804,48 @@ def create_class_with_http_info(self, body, **kwargs): # noqa: E501 >>> thread = api.create_class_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param ClassCreation body: (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_class`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_class`") # noqa: E501 collection_formats = {} @@ -762,20 +897,23 @@ def create_submission(self, _class, assignment, body, **kwargs): # noqa: E501 >>> thread = api.create_submission(_class, assignment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param AssignmentSubmissionUpdate body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - else: - (data) = self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - return data + return self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 def create_submission_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 """Create or edit a submission # noqa: E501 @@ -786,43 +924,60 @@ def create_submission_with_http_info(self, _class, assignment, body, **kwargs): >>> thread = api.create_submission_with_http_info(_class, assignment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param AssignmentSubmissionUpdate body: (required) - :return: AssignmentSubmission + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `create_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `create_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `create_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `create_submission`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_submission`") # noqa: E501 collection_formats = {} @@ -878,19 +1033,22 @@ def delete_class_user(self, _class, user, **kwargs): # noqa: E501 >>> thread = api.delete_class_user(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - else: - (data) = self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - return data + return self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 """Remove a user from the class # noqa: E501 @@ -901,9 +1059,18 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 >>> thread = api.delete_class_user_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -911,28 +1078,35 @@ def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E50 local_var_params = locals() - all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_class_user" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `delete_class_user`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `delete_class_user`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `delete_class_user`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `delete_class_user`") # noqa: E501 collection_formats = {} @@ -982,20 +1156,23 @@ def delete_submission(self, _class, assignment, submission, **kwargs): # noqa: >>> thread = api.delete_submission(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - else: - (data) = self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - return data + return self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 def delete_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 """Delete a submission # noqa: E501 @@ -1006,10 +1183,19 @@ def delete_submission_with_http_info(self, _class, assignment, submission, **kwa >>> thread = api.delete_submission_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -1017,32 +1203,40 @@ def delete_submission_with_http_info(self, _class, assignment, submission, **kwa local_var_params = locals() - all_params = ['_class', 'assignment', 'submission'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `delete_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `delete_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `delete_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `delete_submission`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `delete_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `delete_submission`") # noqa: E501 collection_formats = {} @@ -1093,21 +1287,24 @@ def delete_submission_comment(self, _class, assignment, submission, comment, **k >>> thread = api.delete_submission_comment(_class, assignment, submission, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param str comment: Unique identifier of the comment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 - else: - (data) = self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 - return data + return self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 def delete_submission_comment_with_http_info(self, _class, assignment, submission, comment, **kwargs): # noqa: E501 """Delete a feedback comment to a submission # noqa: E501 @@ -1117,11 +1314,20 @@ def delete_submission_comment_with_http_info(self, _class, assignment, submissio >>> thread = api.delete_submission_comment_with_http_info(_class, assignment, submission, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param str comment: Unique identifier of the comment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -1129,36 +1335,45 @@ def delete_submission_comment_with_http_info(self, _class, assignment, submissio local_var_params = locals() - all_params = ['_class', 'assignment', 'submission', 'comment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission', + 'comment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_submission_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `delete_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `delete_submission_comment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `delete_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `delete_submission_comment`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `delete_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `delete_submission_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `delete_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `delete_submission_comment`") # noqa: E501 collection_formats = {} @@ -1212,21 +1427,24 @@ def edit_submission(self, _class, assignment, submission, body, **kwargs): # no >>> thread = api.edit_submission(_class, assignment, submission, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param AssignmentSubmissionUpdate body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 - else: - (data) = self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 - return data + return self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 def edit_submission_with_http_info(self, _class, assignment, submission, body, **kwargs): # noqa: E501 """Edit a submission # noqa: E501 @@ -1237,48 +1455,66 @@ def edit_submission_with_http_info(self, _class, assignment, submission, body, * >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param AssignmentSubmissionUpdate body: (required) - :return: AssignmentSubmission + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method edit_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `edit_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `edit_submission`") # noqa: E501 collection_formats = {} @@ -1336,18 +1572,21 @@ def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 >>> thread = api.enroll_class(enrollment_code, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 - else: - (data) = self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 - return data + return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 """Join a class # noqa: E501 @@ -1358,33 +1597,48 @@ def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 >>> thread = api.enroll_class_with_http_info(enrollment_code, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['enrollment_code'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'enrollment_code' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method enroll_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'enrollment_code' is set - if ('enrollment_code' not in local_var_params or - local_var_params['enrollment_code'] is None): - raise ValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 + if self.api_client.client_side_validation and ('enrollment_code' not in local_var_params or # noqa: E501 + local_var_params['enrollment_code'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 collection_formats = {} @@ -1432,19 +1686,22 @@ def export_submissions_reviews_as_csv(self, _class, assignment, **kwargs): # no >>> thread = api.export_submissions_reviews_as_csv(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 - else: - (data) = self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 - return data + return self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 def export_submissions_reviews_as_csv_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 """CSV Grades exports # noqa: E501 @@ -1455,38 +1712,54 @@ def export_submissions_reviews_as_csv_with_http_info(self, _class, assignment, * >>> thread = api.export_submissions_reviews_as_csv_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: file + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method export_submissions_reviews_as_csv" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_csv`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_csv`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_csv`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_csv`") # noqa: E501 collection_formats = {} @@ -1536,19 +1809,22 @@ def export_submissions_reviews_as_excel(self, _class, assignment, **kwargs): # >>> thread = api.export_submissions_reviews_as_excel(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 - else: - (data) = self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 - return data + return self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 def export_submissions_reviews_as_excel_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 """Excel Grades exports # noqa: E501 @@ -1559,38 +1835,54 @@ def export_submissions_reviews_as_excel_with_http_info(self, _class, assignment, >>> thread = api.export_submissions_reviews_as_excel_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: file + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method export_submissions_reviews_as_excel" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_excel`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_excel`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_excel`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_excel`") # noqa: E501 collection_formats = {} @@ -1640,20 +1932,23 @@ def fork_score(self, score, body, **kwargs): # noqa: E501 >>> thread = api.fork_score(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreFork body: (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 """Fork a score # noqa: E501 @@ -1664,39 +1959,56 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 >>> thread = api.fork_score_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreFork body: (required) :param str sharing_key: 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. - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method fork_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 collection_formats = {} @@ -1705,7 +2017,7 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1751,18 +2063,21 @@ def get_class(self, _class, **kwargs): # noqa: E501 >>> thread = api.get_class(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.get_class_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Get the details of a single class # noqa: E501 @@ -1772,33 +2087,48 @@ def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.get_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 collection_formats = {} @@ -1846,18 +2176,21 @@ def get_score_submissions(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_submissions(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 """List submissions related to the score # noqa: E501 @@ -1868,33 +2201,48 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :return: list[AssignmentSubmission] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_submissions" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 collection_formats = {} @@ -1941,20 +2289,23 @@ def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E50 >>> thread = api.get_submission(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: AssignmentSubmission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - else: - (data) = self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - return data + return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 def get_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 """Get a student submission # noqa: E501 @@ -1964,43 +2315,60 @@ def get_submission_with_http_info(self, _class, assignment, submission, **kwargs >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :return: AssignmentSubmission + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_submission" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 collection_formats = {} @@ -2051,20 +2419,23 @@ def get_submission_comments(self, _class, assignment, submission, **kwargs): # >>> thread = api.get_submission_comments(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmissionComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - else: - (data) = self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - return data + return self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 def get_submission_comments_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 """List the feedback comments of a submission # noqa: E501 @@ -2074,43 +2445,60 @@ def get_submission_comments_with_http_info(self, _class, assignment, submission, >>> thread = api.get_submission_comments_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :return: list[AssignmentSubmissionComment] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmissionComment], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_submission_comments" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submission_comments`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `get_submission_comments`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submission_comments`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission_comments`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `get_submission_comments`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `get_submission_comments`") # noqa: E501 collection_formats = {} @@ -2162,20 +2550,23 @@ def get_submission_history(self, _class, assignment, submission, **kwargs): # n >>> thread = api.get_submission_history(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmissionHistory] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - else: - (data) = self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - return data + return self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 def get_submission_history_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 """Get the history of the submission # noqa: E501 @@ -2186,43 +2577,60 @@ def get_submission_history_with_http_info(self, _class, assignment, submission, >>> thread = api.get_submission_history_with_http_info(_class, assignment, submission, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) - :return: list[AssignmentSubmissionHistory] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmissionHistory], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_submission_history" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submission_history`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `get_submission_history`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submission_history`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission_history`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `get_submission_history`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `get_submission_history`") # noqa: E501 collection_formats = {} @@ -2266,67 +2674,86 @@ def get_submission_history_with_http_info(self, _class, assignment, submission, collection_formats=collection_formats) def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 + """List the students' submissions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_submissions(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 - else: - (data) = self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 - return data + return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 + """List the students' submissions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_submissions_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: list[AssignmentSubmission] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_submissions" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 collection_formats = {} @@ -2375,18 +2802,21 @@ def list_assignments(self, _class, **kwargs): # noqa: E501 >>> thread = api.list_assignments(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[Assignment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 """Assignments listing # noqa: E501 @@ -2396,33 +2826,48 @@ def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.list_assignments_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) - :return: list[Assignment] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[Assignment], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_assignments" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 collection_formats = {} @@ -2470,19 +2915,22 @@ def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 >>> thread = api.list_class_student_submissions(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 - else: - (data) = self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 - return data + return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): # noqa: E501 """List the submissions for a student # noqa: E501 @@ -2493,38 +2941,54 @@ def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str user: Unique identifier of the user (required) - :return: list[AssignmentSubmission] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'user'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_class_student_submissions" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 collection_formats = {} @@ -2573,18 +3037,21 @@ def list_classes(self, **kwargs): # noqa: E501 >>> thread = api.list_classes(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str state: Filter the classes by state + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ClassDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_classes_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_classes_with_http_info(**kwargs) # noqa: E501 - return data + return self.list_classes_with_http_info(**kwargs) # noqa: E501 def list_classes_with_http_info(self, **kwargs): # noqa: E501 """List the classes available for the current user # noqa: E501 @@ -2594,24 +3061,39 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_classes_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str state: Filter the classes by state - :return: list[ClassDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ClassDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['state'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'state' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_classes" % key ) @@ -2623,7 +3105,7 @@ def list_classes_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'state' in local_var_params: + if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 query_params.append(('state', local_var_params['state'])) # noqa: E501 header_params = {} @@ -2663,21 +3145,24 @@ def post_submission_comment(self, _class, assignment, submission, assignment_sub >>> thread = api.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: AssignmentSubmissionComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 - else: - (data) = self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 - return data + return self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 def post_submission_comment_with_http_info(self, _class, assignment, submission, assignment_submission_comment_creation, **kwargs): # noqa: E501 """Add a feedback comment to a submission # noqa: E501 @@ -2687,48 +3172,66 @@ def post_submission_comment_with_http_info(self, _class, assignment, submission, >>> thread = api.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :return: AssignmentSubmissionComment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AssignmentSubmissionComment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission', 'assignment_submission_comment_creation'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission', + 'assignment_submission_comment_creation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method post_submission_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `post_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `post_submission_comment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `post_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `post_submission_comment`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `post_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `post_submission_comment`") # noqa: E501 # verify the required parameter 'assignment_submission_comment_creation' is set - if ('assignment_submission_comment_creation' not in local_var_params or - local_var_params['assignment_submission_comment_creation'] is None): - raise ValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `post_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment_submission_comment_creation' not in local_var_params or # noqa: E501 + local_var_params['assignment_submission_comment_creation'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `post_submission_comment`") # noqa: E501 collection_formats = {} @@ -2786,19 +3289,22 @@ def unarchive_assignment(self, _class, assignment, **kwargs): # noqa: E501 >>> thread = api.unarchive_assignment(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Assignment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - else: - (data) = self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - return data + return self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 def unarchive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 """Unarchive the assignment. # noqa: E501 @@ -2809,38 +3315,54 @@ def unarchive_assignment_with_http_info(self, _class, assignment, **kwargs): # >>> thread = api.unarchive_assignment_with_http_info(_class, assignment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) - :return: Assignment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method unarchive_assignment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `unarchive_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `unarchive_assignment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `unarchive_assignment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `unarchive_assignment`") # noqa: E501 collection_formats = {} @@ -2890,18 +3412,21 @@ def unarchive_class(self, _class, **kwargs): # noqa: E501 >>> thread = api.unarchive_class(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Unarchive the class # noqa: E501 @@ -2912,33 +3437,48 @@ def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.unarchive_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method unarchive_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 collection_formats = {} @@ -2986,19 +3526,22 @@ def update_class(self, _class, **kwargs): # noqa: E501 >>> thread = api.update_class(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param ClassUpdate body: Details of the Class + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ClassDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 - else: - (data) = self.update_class_with_http_info(_class, **kwargs) # noqa: E501 - return data + return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 """Update the class # noqa: E501 @@ -3009,34 +3552,50 @@ def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 >>> thread = api.update_class_with_http_info(_class, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param ClassUpdate body: Details of the Class - :return: ClassDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 collection_formats = {} @@ -3089,22 +3648,25 @@ def update_submission_comment(self, _class, assignment, submission, comment, ass >>> thread = api.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param str comment: Unique identifier of the comment (required) :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: AssignmentSubmissionComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 - else: - (data) = self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 - return data + return self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 def update_submission_comment_with_http_info(self, _class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs): # noqa: E501 """Update a feedback comment to a submission # noqa: E501 @@ -3114,53 +3676,72 @@ def update_submission_comment_with_http_info(self, _class, assignment, submissio >>> thread = api.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str _class: Unique identifier of the class (required) :param str assignment: Unique identifier of the assignment (required) :param str submission: Unique identifier of the submission (required) :param str comment: Unique identifier of the comment (required) :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :return: AssignmentSubmissionComment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AssignmentSubmissionComment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['_class', 'assignment', 'submission', 'comment', 'assignment_submission_comment_creation'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + '_class', + 'assignment', + 'submission', + 'comment', + 'assignment_submission_comment_creation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_submission_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter '_class' is set - if ('_class' not in local_var_params or - local_var_params['_class'] is None): - raise ValueError("Missing the required parameter `_class` when calling `update_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 + local_var_params['_class'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_class` when calling `update_submission_comment`") # noqa: E501 # verify the required parameter 'assignment' is set - if ('assignment' not in local_var_params or - local_var_params['assignment'] is None): - raise ValueError("Missing the required parameter `assignment` when calling `update_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 + local_var_params['assignment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment` when calling `update_submission_comment`") # noqa: E501 # verify the required parameter 'submission' is set - if ('submission' not in local_var_params or - local_var_params['submission'] is None): - raise ValueError("Missing the required parameter `submission` when calling `update_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 + local_var_params['submission'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `submission` when calling `update_submission_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `update_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `update_submission_comment`") # noqa: E501 # verify the required parameter 'assignment_submission_comment_creation' is set - if ('assignment_submission_comment_creation' not in local_var_params or - local_var_params['assignment_submission_comment_creation'] is None): - raise ValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `update_submission_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('assignment_submission_comment_creation' not in local_var_params or # noqa: E501 + local_var_params['assignment_submission_comment_creation'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `update_submission_comment`") # noqa: E501 collection_formats = {} diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index 0b5bc1f..2362891 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class CollectionApi(object): @@ -42,20 +46,23 @@ def add_score_to_collection(self, collection, score, **kwargs): # noqa: E501 >>> thread = api.add_score_to_collection(collection, score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - else: - (data) = self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - return data + return self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 def add_score_to_collection_with_http_info(self, collection, score, **kwargs): # noqa: E501 """Add a score to the collection # noqa: E501 @@ -66,39 +73,56 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): >>> thread = api.add_score_to_collection_with_http_info(collection, score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['collection', 'score', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection', + 'score', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_score_to_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `add_score_to_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `add_score_to_collection`") # noqa: E501 # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `add_score_to_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `add_score_to_collection`") # noqa: E501 collection_formats = {} @@ -109,7 +133,7 @@ def add_score_to_collection_with_http_info(self, collection, score, **kwargs): path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -150,18 +174,21 @@ def create_collection(self, body, **kwargs): # noqa: E501 >>> thread = api.create_collection(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param CollectionCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_collection_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_collection_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_collection_with_http_info(body, **kwargs) # noqa: E501 def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new collection # noqa: E501 @@ -172,33 +199,48 @@ def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 >>> thread = api.create_collection_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param CollectionCreation body: (required) - :return: Collection + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_collection`") # noqa: E501 collection_formats = {} @@ -250,18 +292,21 @@ def delete_collection(self, collection, **kwargs): # noqa: E501 >>> thread = api.delete_collection(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 - else: - (data) = self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 - return data + return self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 """Delete the collection # noqa: E501 @@ -272,8 +317,17 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> thread = api.delete_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -281,24 +335,30 @@ def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['collection'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `delete_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `delete_collection`") # noqa: E501 collection_formats = {} @@ -346,20 +406,23 @@ def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E5 >>> thread = api.delete_score_from_collection(collection, score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - else: - (data) = self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - return data + return self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 def delete_score_from_collection_with_http_info(self, collection, score, **kwargs): # noqa: E501 """Delete a score from the collection # noqa: E501 @@ -370,10 +433,19 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg >>> thread = api.delete_score_from_collection_with_http_info(collection, score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -381,28 +453,36 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg local_var_params = locals() - all_params = ['collection', 'score', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection', + 'score', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_from_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `delete_score_from_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `delete_score_from_collection`") # noqa: E501 # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `delete_score_from_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `delete_score_from_collection`") # noqa: E501 collection_formats = {} @@ -413,7 +493,7 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -446,63 +526,82 @@ def delete_score_from_collection_with_http_info(self, collection, score, **kwarg collection_formats=collection_formats) def edit_collection(self, collection, **kwargs): # noqa: E501 - """Update a collection's metadata # noqa: E501 + """Update a collection's metadata # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_collection(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param CollectionModification body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 - else: - (data) = self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 - return data + return self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 - """Update a collection's metadata # noqa: E501 + """Update a collection's metadata # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param CollectionModification body: - :return: Collection + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['collection', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method edit_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `edit_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `edit_collection`") # noqa: E501 collection_formats = {} @@ -555,19 +654,22 @@ def get_collection(self, collection, **kwargs): # noqa: E501 >>> thread = api.get_collection(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Collection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 - else: - (data) = self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 - return data + return self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 """Get collection details # noqa: E501 @@ -577,34 +679,50 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> thread = api.get_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. - :return: Collection + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['collection', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `get_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `get_collection`") # noqa: E501 collection_formats = {} @@ -613,7 +731,7 @@ def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -654,7 +772,7 @@ def list_collection_scores(self, collection, **kwargs): # noqa: E501 >>> thread = api.list_collection_scores(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort @@ -662,16 +780,19 @@ def list_collection_scores(self, collection, **kwargs): # noqa: E501 :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 - else: - (data) = self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 - return data + return self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: E501 """List the scores contained in a collection # noqa: E501 @@ -682,7 +803,7 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: >>> thread = api.list_collection_scores_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) :param str sharing_key: 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. :param str sort: Sort @@ -690,36 +811,57 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['collection', 'sharing_key', 'sort', 'direction', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection', + 'sharing_key', + 'sort', + 'direction', + 'limit', + 'next', + 'previous' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_collection_scores" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `list_collection_scores`") # noqa: E501 - - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `list_collection_scores`") # noqa: E501 + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} @@ -727,17 +869,17 @@ def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: path_params['collection'] = local_var_params['collection'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'sort' in local_var_params: + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params: + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'limit' in local_var_params: + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params: + if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params: + if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -778,23 +920,26 @@ def list_collections(self, **kwargs): # noqa: E501 >>> thread = api.list_collections(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. :param str sort: Sort :param str direction: Sort direction :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[Collection] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_collections_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_collections_with_http_info(**kwargs) # noqa: E501 - return data + return self.list_collections_with_http_info(**kwargs) # noqa: E501 def list_collections_with_http_info(self, **kwargs): # noqa: E501 """List the collections # noqa: E501 @@ -805,55 +950,75 @@ def list_collections_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_collections_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. :param str sort: Sort :param str direction: Sort direction :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :return: list[Collection] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[Collection], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['parent', 'sort', 'direction', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'parent', + 'sort', + 'direction', + 'limit', + 'next', + 'previous' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_collections" % key ) local_var_params[key] = val del local_var_params['kwargs'] - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'parent' in local_var_params: + if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - if 'sort' in local_var_params: + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params: + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'limit' in local_var_params: + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params: + if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params: + if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -894,18 +1059,21 @@ def untrash_collection(self, collection, **kwargs): # noqa: E501 >>> thread = api.untrash_collection(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 - else: - (data) = self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 - return data + return self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 """Untrash a collection # noqa: E501 @@ -916,8 +1084,17 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 >>> thread = api.untrash_collection_with_http_info(collection, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -925,24 +1102,30 @@ def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['collection'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'collection' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method untrash_collection" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'collection' is set - if ('collection' not in local_var_params or - local_var_params['collection'] is None): - raise ValueError("Missing the required parameter `collection` when calling `untrash_collection`") # noqa: E501 + if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 + local_var_params['collection'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collection` when calling `untrash_collection`") # noqa: E501 collection_formats = {} diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 03c1a17..edd6012 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class GroupApi(object): @@ -41,18 +45,21 @@ def get_group_details(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_details(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: GroupDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 - else: - (data) = self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 - return data + return self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 """Get group information # noqa: E501 @@ -62,33 +69,48 @@ def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_details_with_http_info(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) - :return: GroupDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['group'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_group_details" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in local_var_params or - local_var_params['group'] is None): - raise ValueError("Missing the required parameter `group` when calling `get_group_details`") # noqa: E501 + if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 + local_var_params['group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `get_group_details`") # noqa: E501 collection_formats = {} @@ -128,7 +150,7 @@ def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_group_scores(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 + """List group's scores # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -136,22 +158,25 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_scores(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - else: - (data) = self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - return data + return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 + """List group's scores # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -159,34 +184,50 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_scores_with_http_info(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['group', 'parent'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group', + 'parent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_group_scores" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in local_var_params or - local_var_params['group'] is None): - raise ValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 + if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 + local_var_params['group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 collection_formats = {} @@ -195,7 +236,7 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] - if 'parent' in local_var_params: + if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -228,63 +269,82 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 collection_formats=collection_formats) def list_group_users(self, group, **kwargs): # noqa: E501 - """List group's users # noqa: E501 + """List group's users # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_group_users(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str source: Filter the users by their source + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[UserPublic] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 - else: - (data) = self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 - return data + return self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's users # noqa: E501 + """List group's users # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_group_users_with_http_info(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str source: Filter the users by their source - :return: list[UserPublic] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[UserPublic], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['group', 'source'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group', + 'source' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_group_users" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in local_var_params or - local_var_params['group'] is None): - raise ValueError("Missing the required parameter `group` when calling `list_group_users`") # noqa: E501 + if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 + local_var_params['group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `list_group_users`") # noqa: E501 collection_formats = {} @@ -293,7 +353,7 @@ def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] - if 'source' in local_var_params: + if 'source' in local_var_params and local_var_params['source'] is not None: # noqa: E501 query_params.append(('source', local_var_params['source'])) # noqa: E501 header_params = {} diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 6554697..27a9d09 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class OrganizationApi(object): @@ -41,21 +45,24 @@ def count_orga_users(self, **kwargs): # noqa: E501 >>> thread = api.count_orga_users(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param list[str] role: Filter users by role :param str q: The query to search :param list[str] group: Filter users by group :param bool no_active_license: Filter users who don't have an active license - :return: int[UserDetailsAdmin] + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[UserDetailsAdmin] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.count_orga_users_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.count_orga_users_with_http_info(**kwargs) # noqa: E501 - return data + return self.count_orga_users_with_http_info(**kwargs) # noqa: E501 def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 """Count the organization users using the provided filters # noqa: E501 @@ -65,27 +72,45 @@ def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.count_orga_users_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param list[str] role: Filter users by role :param str q: The query to search :param list[str] group: Filter users by group :param bool no_active_license: Filter users who don't have an active license - :return: int[UserDetailsAdmin] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[UserDetailsAdmin], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['role', 'q', 'group', 'no_active_license'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'role', + 'q', + 'group', + 'no_active_license' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method count_orga_users" % key ) @@ -97,15 +122,15 @@ def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'role' in local_var_params: + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 query_params.append(('role', local_var_params['role'])) # noqa: E501 collection_formats['role'] = 'multi' # noqa: E501 - if 'q' in local_var_params: + if 'q' in local_var_params and local_var_params['q'] is not None: # noqa: E501 query_params.append(('q', local_var_params['q'])) # noqa: E501 - if 'group' in local_var_params: + if 'group' in local_var_params and local_var_params['group'] is not None: # noqa: E501 query_params.append(('group', local_var_params['group'])) # noqa: E501 collection_formats['group'] = 'multi' # noqa: E501 - if 'no_active_license' in local_var_params: + if 'no_active_license' in local_var_params and local_var_params['no_active_license'] is not None: # noqa: E501 query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 header_params = {} @@ -129,7 +154,7 @@ def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='int[UserDetailsAdmin]', # noqa: E501 + response_type='list[UserDetailsAdmin]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -146,18 +171,21 @@ def create_lti_credentials(self, body, **kwargs): # noqa: E501 >>> thread = api.create_lti_credentials(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param LtiCredentialsCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: LtiCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new couple of LTI 1.x credentials # noqa: E501 @@ -168,33 +196,48 @@ def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 >>> thread = api.create_lti_credentials_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param LtiCredentialsCreation body: (required) - :return: LtiCredentials + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(LtiCredentials, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_lti_credentials" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_lti_credentials`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_lti_credentials`") # noqa: E501 collection_formats = {} @@ -246,18 +289,21 @@ def create_organization_invitation(self, **kwargs): # noqa: E501 >>> thread = api.create_organization_invitation(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param OrganizationInvitationCreation body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: OrganizationInvitation If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 - return data + return self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 """Create a new invitation to join the organization # noqa: E501 @@ -268,24 +314,39 @@ def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.create_organization_invitation_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param OrganizationInvitationCreation body: - :return: OrganizationInvitation + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(OrganizationInvitation, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_invitation" % key ) @@ -341,18 +402,21 @@ def create_organization_user(self, **kwargs): # noqa: E501 >>> thread = api.create_organization_user(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param UserCreation body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_organization_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.create_organization_user_with_http_info(**kwargs) # noqa: E501 def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 """Create a new user account # noqa: E501 @@ -362,24 +426,39 @@ def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.create_organization_user_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param UserCreation body: - :return: UserDetailsAdmin + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UserDetailsAdmin, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_user" % key ) @@ -436,19 +515,22 @@ def create_organization_user_access_token(self, user, **kwargs): # noqa: E501 >>> thread = api.create_organization_user_access_token(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ApiAccessToken If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 def create_organization_user_access_token_with_http_info(self, user, **kwargs): # noqa: E501 """Create a delegated API access token for an organization user # noqa: E501 @@ -459,34 +541,50 @@ def create_organization_user_access_token_with_http_info(self, user, **kwargs): >>> thread = api.create_organization_user_access_token_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: - :return: ApiAccessToken + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ApiAccessToken, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'organization_user_access_token_creation'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'organization_user_access_token_creation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_user_access_token" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `create_organization_user_access_token`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `create_organization_user_access_token`") # noqa: E501 collection_formats = {} @@ -539,19 +637,22 @@ def create_organization_user_signin_link(self, user, **kwargs): # noqa: E501 >>> thread = api.create_organization_user_signin_link(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: OrganizationUserSigninLink If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 def create_organization_user_signin_link_with_http_info(self, user, **kwargs): # noqa: E501 """Create a sign in link for an organization user # noqa: E501 @@ -561,34 +662,50 @@ def create_organization_user_signin_link_with_http_info(self, user, **kwargs): >>> thread = api.create_organization_user_signin_link_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: - :return: OrganizationUserSigninLink + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(OrganizationUserSigninLink, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'organization_user_signin_link_creation'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'organization_user_signin_link_creation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_organization_user_signin_link" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `create_organization_user_signin_link`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `create_organization_user_signin_link`") # noqa: E501 collection_formats = {} @@ -641,17 +758,20 @@ def list_lti_credentials(self, **kwargs): # noqa: E501 >>> thread = api.list_lti_credentials(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[LtiCredentials] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 - return data + return self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 """List LTI 1.x credentials # noqa: E501 @@ -661,23 +781,37 @@ def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_lti_credentials_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :return: list[LtiCredentials] + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[LtiCredentials], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_lti_credentials" % key ) @@ -727,21 +861,24 @@ def list_organization_invitations(self, **kwargs): # noqa: E501 >>> thread = api.list_organization_invitations(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[OrganizationInvitation] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 - return data + return self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 """List the organization invitations # noqa: E501 @@ -751,49 +888,67 @@ def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_organization_invitations_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str role: Filter users by role :param int limit: This is the maximum number of objects that may be returned :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :return: list[OrganizationInvitation] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[OrganizationInvitation], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['role', 'limit', 'next', 'previous'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'role', + 'limit', + 'next', + 'previous' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_organization_invitations" % key ) local_var_params[key] = val del local_var_params['kwargs'] - if 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value less than or equal to `1000`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'role' in local_var_params: + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 query_params.append(('role', local_var_params['role'])) # noqa: E501 - if 'limit' in local_var_params: + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params: + if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params: + if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 query_params.append(('previous', local_var_params['previous'])) # noqa: E501 header_params = {} @@ -833,7 +988,7 @@ def list_organization_users(self, **kwargs): # noqa: E501 >>> thread = api.list_organization_users(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param list[str] sort: The order to sort the user list :param str direction: Sort direction :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -845,16 +1000,19 @@ def list_organization_users(self, **kwargs): # noqa: E501 :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` :param bool only_ids: Return only user ids :param int limit: This is the maximum number of objects that may be returned + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[UserDetailsAdmin] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organization_users_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_organization_users_with_http_info(**kwargs) # noqa: E501 - return data + return self.list_organization_users_with_http_info(**kwargs) # noqa: E501 def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 """List the organization users # noqa: E501 @@ -864,7 +1022,7 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_organization_users_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param list[str] sort: The order to sort the user list :param str direction: Sort direction :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -876,62 +1034,87 @@ def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` :param bool only_ids: Return only user ids :param int limit: This is the maximum number of objects that may be returned - :return: list[UserDetailsAdmin] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[UserDetailsAdmin], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['sort', 'direction', 'next', 'previous', 'role', 'q', 'group', 'no_active_license', 'license_expiration_date', 'only_ids', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'sort', + 'direction', + 'next', + 'previous', + 'role', + 'q', + 'group', + 'no_active_license', + 'license_expiration_date', + 'only_ids', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_organization_users" % key ) local_var_params[key] = val del local_var_params['kwargs'] - if 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value less than or equal to `1000`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'sort' in local_var_params: + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 collection_formats['sort'] = 'multi' # noqa: E501 - if 'direction' in local_var_params: + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'next' in local_var_params: + if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params: + if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - if 'role' in local_var_params: + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 query_params.append(('role', local_var_params['role'])) # noqa: E501 collection_formats['role'] = 'multi' # noqa: E501 - if 'q' in local_var_params: + if 'q' in local_var_params and local_var_params['q'] is not None: # noqa: E501 query_params.append(('q', local_var_params['q'])) # noqa: E501 - if 'group' in local_var_params: + if 'group' in local_var_params and local_var_params['group'] is not None: # noqa: E501 query_params.append(('group', local_var_params['group'])) # noqa: E501 collection_formats['group'] = 'multi' # noqa: E501 - if 'no_active_license' in local_var_params: + if 'no_active_license' in local_var_params and local_var_params['no_active_license'] is not None: # noqa: E501 query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 - if 'license_expiration_date' in local_var_params: + if 'license_expiration_date' in local_var_params and local_var_params['license_expiration_date'] is not None: # noqa: E501 query_params.append(('licenseExpirationDate', local_var_params['license_expiration_date'])) # noqa: E501 collection_formats['licenseExpirationDate'] = 'multi' # noqa: E501 - if 'only_ids' in local_var_params: + if 'only_ids' in local_var_params and local_var_params['only_ids'] is not None: # noqa: E501 query_params.append(('onlyIds', local_var_params['only_ids'])) # noqa: E501 - if 'limit' in local_var_params: + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -971,18 +1154,21 @@ def remove_organization_invitation(self, invitation, **kwargs): # noqa: E501 >>> thread = api.remove_organization_invitation(invitation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str invitation: Unique identifier of the invitation (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 - else: - (data) = self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 - return data + return self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 def remove_organization_invitation_with_http_info(self, invitation, **kwargs): # noqa: E501 """Remove an organization invitation # noqa: E501 @@ -992,8 +1178,17 @@ def remove_organization_invitation_with_http_info(self, invitation, **kwargs): >>> thread = api.remove_organization_invitation_with_http_info(invitation, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str invitation: Unique identifier of the invitation (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -1001,24 +1196,30 @@ def remove_organization_invitation_with_http_info(self, invitation, **kwargs): local_var_params = locals() - all_params = ['invitation'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'invitation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method remove_organization_invitation" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'invitation' is set - if ('invitation' not in local_var_params or - local_var_params['invitation'] is None): - raise ValueError("Missing the required parameter `invitation` when calling `remove_organization_invitation`") # noqa: E501 + if self.api_client.client_side_validation and ('invitation' not in local_var_params or # noqa: E501 + local_var_params['invitation'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `invitation` when calling `remove_organization_invitation`") # noqa: E501 collection_formats = {} @@ -1066,19 +1267,22 @@ def remove_organization_user(self, user, **kwargs): # noqa: E501 >>> thread = api.remove_organization_user(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 """Remove an account from Flat # noqa: E501 @@ -1089,9 +1293,18 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.remove_organization_user_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -1099,24 +1312,31 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['user', 'convert_to_individual'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'convert_to_individual' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method remove_organization_user" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `remove_organization_user`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `remove_organization_user`") # noqa: E501 collection_formats = {} @@ -1125,7 +1345,7 @@ def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'convert_to_individual' in local_var_params: + if 'convert_to_individual' in local_var_params and local_var_params['convert_to_individual'] is not None: # noqa: E501 query_params.append(('convertToIndividual', local_var_params['convert_to_individual'])) # noqa: E501 header_params = {} @@ -1165,18 +1385,21 @@ def revoke_lti_credentials(self, credentials, **kwargs): # noqa: E501 >>> thread = api.revoke_lti_credentials(credentials, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str credentials: Credentials unique identifier (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 - else: - (data) = self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 - return data + return self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: E501 """Revoke LTI 1.x credentials # noqa: E501 @@ -1186,8 +1409,17 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: >>> thread = api.revoke_lti_credentials_with_http_info(credentials, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str credentials: Credentials unique identifier (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -1195,24 +1427,30 @@ def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: local_var_params = locals() - all_params = ['credentials'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'credentials' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method revoke_lti_credentials" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'credentials' is set - if ('credentials' not in local_var_params or - local_var_params['credentials'] is None): - raise ValueError("Missing the required parameter `credentials` when calling `revoke_lti_credentials`") # noqa: E501 + if self.api_client.client_side_validation and ('credentials' not in local_var_params or # noqa: E501 + local_var_params['credentials'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `credentials` when calling `revoke_lti_credentials`") # noqa: E501 collection_formats = {} @@ -1259,19 +1497,22 @@ def update_organization_user(self, user, body, **kwargs): # noqa: E501 >>> thread = api.update_organization_user(user, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param UserAdminUpdate body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: UserDetailsAdmin If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 - else: - (data) = self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 - return data + return self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa: E501 """Update account information # noqa: E501 @@ -1281,38 +1522,54 @@ def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa >>> thread = api.update_organization_user_with_http_info(user, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of the Flat account (required) :param UserAdminUpdate body: (required) - :return: UserDetailsAdmin + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UserDetailsAdmin, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_organization_user" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `update_organization_user`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `update_organization_user`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_organization_user`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_organization_user`") # noqa: E501 collection_formats = {} diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index be8f27c..76c51d6 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ScoreApi(object): @@ -42,19 +46,22 @@ def add_score_collaborator(self, score, body, **kwargs): # noqa: E501 >>> thread = api.add_score_collaborator(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ResourceCollaboratorCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: E501 """Add a new collaborator # noqa: E501 @@ -65,38 +72,54 @@ def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: >>> thread = api.add_score_collaborator_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ResourceCollaboratorCreation body: (required) - :return: ResourceCollaborator + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ResourceCollaborator, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_score_collaborator" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `add_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `add_score_collaborator`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `add_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `add_score_collaborator`") # noqa: E501 collection_formats = {} @@ -150,19 +173,22 @@ def add_score_track(self, score, body, **kwargs): # noqa: E501 >>> thread = api.add_score_track(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreTrackCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 """Add a new video or audio track to the score # noqa: E501 @@ -173,38 +199,54 @@ def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 >>> thread = api.add_score_track_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreTrackCreation body: (required) - :return: ScoreTrack + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_score_track" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `add_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `add_score_track`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `add_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `add_score_track`") # noqa: E501 collection_formats = {} @@ -258,22 +300,25 @@ def create_export_task(self, score, revision, format, **kwargs): # noqa: E501 >>> thread = api.create_export_task(score, revision, format, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) :param str sharing_key: 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. :param TaskExportOptions body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Task If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 - else: - (data) = self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 - return data + return self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 def create_export_task_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 """Create a new score export task # noqa: E501 @@ -284,45 +329,64 @@ def create_export_task_with_http_info(self, score, revision, format, **kwargs): >>> thread = api.create_export_task_with_http_info(score, revision, format, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) :param str sharing_key: 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. :param TaskExportOptions body: - :return: Task + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Task, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'revision', 'format', 'sharing_key', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'revision', + 'format', + 'sharing_key', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_export_task" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `create_export_task`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `create_export_task`") # noqa: E501 # verify the required parameter 'revision' is set - if ('revision' not in local_var_params or - local_var_params['revision'] is None): - raise ValueError("Missing the required parameter `revision` when calling `create_export_task`") # noqa: E501 + if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 + local_var_params['revision'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `revision` when calling `create_export_task`") # noqa: E501 # verify the required parameter 'format' is set - if ('format' not in local_var_params or - local_var_params['format'] is None): - raise ValueError("Missing the required parameter `format` when calling `create_export_task`") # noqa: E501 + if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 + local_var_params['format'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `format` when calling `create_export_task`") # noqa: E501 collection_formats = {} @@ -335,7 +399,7 @@ def create_export_task_with_http_info(self, score, revision, format, **kwargs): path_params['format'] = local_var_params['format'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -382,18 +446,21 @@ def create_score(self, body, **kwargs): # noqa: E501 >>> thread = api.create_score(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param ScoreCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_score_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_score_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_score_with_http_info(body, **kwargs) # noqa: E501 def create_score_with_http_info(self, body, **kwargs): # noqa: E501 """Create a new score # noqa: E501 @@ -404,33 +471,48 @@ def create_score_with_http_info(self, body, **kwargs): # noqa: E501 >>> thread = api.create_score_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param ScoreCreation body: (required) - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_score`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_score`") # noqa: E501 collection_formats = {} @@ -482,19 +564,22 @@ def create_score_revision(self, score, body, **kwargs): # noqa: E501 >>> thread = api.create_score_revision(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreRevisionCreation body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreRevision If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: E501 """Create a new revision # noqa: E501 @@ -505,38 +590,54 @@ def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: >>> thread = api.create_score_revision_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreRevisionCreation body: (required) - :return: ScoreRevision + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreRevision, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_score_revision" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `create_score_revision`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `create_score_revision`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_score_revision`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_score_revision`") # noqa: E501 collection_formats = {} @@ -590,19 +691,22 @@ def delete_score(self, score, **kwargs): # noqa: E501 >>> thread = api.delete_score(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param bool now: If `true`, the score deletion will be scheduled to be done ASAP + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_score_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.delete_score_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.delete_score_with_http_info(score, **kwargs) # noqa: E501 def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 """Delete a score # noqa: E501 @@ -613,9 +717,18 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.delete_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param bool now: If `true`, the score deletion will be scheduled to be done ASAP + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -623,24 +736,31 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score', 'now'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'now' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `delete_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `delete_score`") # noqa: E501 collection_formats = {} @@ -649,7 +769,7 @@ def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'now' in local_var_params: + if 'now' in local_var_params and local_var_params['now'] is not None: # noqa: E501 query_params.append(('now', local_var_params['now'])) # noqa: E501 header_params = {} @@ -689,20 +809,23 @@ def delete_score_comment(self, score, comment, **kwargs): # noqa: E501 >>> thread = api.delete_score_comment(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 - else: - (data) = self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 - return data + return self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa: E501 """Delete a comment # noqa: E501 @@ -712,10 +835,19 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa >>> thread = api.delete_score_comment_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -723,28 +855,36 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa local_var_params = locals() - all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'comment', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `delete_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `delete_score_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `delete_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `delete_score_comment`") # noqa: E501 collection_formats = {} @@ -755,7 +895,7 @@ def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -795,19 +935,22 @@ def delete_score_track(self, score, track, **kwargs): # noqa: E501 >>> thread = api.delete_score_track(score, track, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - else: - (data) = self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - return data + return self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 """Remove an audio or video track linked to the score # noqa: E501 @@ -817,9 +960,18 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 >>> thread = api.delete_score_track_with_http_info(score, track, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -827,28 +979,35 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 local_var_params = locals() - all_params = ['score', 'track'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'track' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_score_track" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `delete_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `delete_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in local_var_params or - local_var_params['track'] is None): - raise ValueError("Missing the required parameter `track` when calling `delete_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 + local_var_params['track'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `track` when calling `delete_score_track`") # noqa: E501 collection_formats = {} @@ -890,7 +1049,7 @@ def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E5 collection_formats=collection_formats) def edit_score(self, score, **kwargs): # noqa: E501 - """Edit a score's metadata # noqa: E501 + """Edit a score's metadata # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -898,22 +1057,25 @@ def edit_score(self, score, **kwargs): # noqa: E501 >>> thread = api.edit_score(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreModification body: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.edit_score_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.edit_score_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.edit_score_with_http_info(score, **kwargs) # noqa: E501 def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Edit a score's metadata # noqa: E501 + """Edit a score's metadata # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -921,34 +1083,50 @@ def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.edit_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreModification body: - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method edit_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `edit_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `edit_score`") # noqa: E501 collection_formats = {} @@ -1002,20 +1180,23 @@ def fork_score(self, score, body, **kwargs): # noqa: E501 >>> thread = api.fork_score(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreFork body: (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 """Fork a score # noqa: E501 @@ -1026,39 +1207,56 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 >>> thread = api.fork_score_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreFork body: (required) :param str sharing_key: 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. - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method fork_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 collection_formats = {} @@ -1067,7 +1265,7 @@ def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1113,19 +1311,22 @@ def ger_user_likes(self, user, **kwargs): # noqa: E501 >>> thread = api.ger_user_likes(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 @@ -1135,34 +1336,50 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'ids' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ger_user_likes" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 collection_formats = {} @@ -1171,7 +1388,7 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'ids' in local_var_params: + if 'ids' in local_var_params and local_var_params['ids'] is not None: # noqa: E501 query_params.append(('ids', local_var_params['ids'])) # noqa: E501 header_params = {} @@ -1204,7 +1421,7 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_group_scores(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 + """List group's scores # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1212,22 +1429,25 @@ def get_group_scores(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_scores(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - else: - (data) = self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - return data + return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 + """List group's scores # noqa: E501 Get the list of scores shared with a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1235,34 +1455,50 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 >>> thread = api.get_group_scores_with_http_info(group, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str group: Unique identifier of a Flat group (required) :param str parent: Filter the score forked from the score id `parent` - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['group', 'parent'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group', + 'parent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_group_scores" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if ('group' not in local_var_params or - local_var_params['group'] is None): - raise ValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 + if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 + local_var_params['group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 collection_formats = {} @@ -1271,7 +1507,7 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 path_params['group'] = local_var_params['group'] # noqa: E501 query_params = [] - if 'parent' in local_var_params: + if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -1304,7 +1540,7 @@ def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_score(self, score, **kwargs): # noqa: E501 - """Get a score's metadata # noqa: E501 + """Get a score's metadata # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1312,22 +1548,25 @@ def get_score(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_with_http_info(score, **kwargs) # noqa: E501 def get_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Get a score's metadata # noqa: E501 + """Get a score's metadata # noqa: E501 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1335,34 +1574,50 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. - :return: ScoreDetails + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score`") # noqa: E501 collection_formats = {} @@ -1371,7 +1626,7 @@ def get_score_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1412,20 +1667,23 @@ def get_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 >>> thread = api.get_score_collaborator(score, collaborator, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ResourceCollaborator If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - else: - (data) = self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - return data + return self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): # noqa: E501 """Get a collaborator # noqa: E501 @@ -1436,39 +1694,56 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): >>> thread = api.get_score_collaborator_with_http_info(score, collaborator, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :param str sharing_key: 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. - :return: ResourceCollaborator + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ResourceCollaborator, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'collaborator', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'collaborator', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_collaborator" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set - if ('collaborator' not in local_var_params or - local_var_params['collaborator'] is None): - raise ValueError("Missing the required parameter `collaborator` when calling `get_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('collaborator' not in local_var_params or # noqa: E501 + local_var_params['collaborator'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collaborator` when calling `get_score_collaborator`") # noqa: E501 collection_formats = {} @@ -1479,7 +1754,7 @@ def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): path_params['collaborator'] = local_var_params['collaborator'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1520,19 +1795,22 @@ def get_score_collaborators(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_collaborators(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ResourceCollaborator] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 """List the collaborators # noqa: E501 @@ -1543,34 +1821,50 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_collaborators_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. - :return: list[ResourceCollaborator] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ResourceCollaborator], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_collaborators" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_collaborators`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_collaborators`") # noqa: E501 collection_formats = {} @@ -1579,7 +1873,7 @@ def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1620,22 +1914,25 @@ def get_score_comments(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_comments(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str type: Filter the comments by type :param str sort: Sort :param str direction: Sort direction + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 """List comments # noqa: E501 @@ -1646,37 +1943,56 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_comments_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str type: Filter the comments by type :param str sort: Sort :param str direction: Sort direction - :return: list[ScoreComment] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreComment], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'sharing_key', 'type', 'sort', 'direction'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'sharing_key', + 'type', + 'sort', + 'direction' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_comments" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_comments`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_comments`") # noqa: E501 collection_formats = {} @@ -1685,13 +2001,13 @@ def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'type' in local_var_params: + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'sort' in local_var_params: + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params: + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 query_params.append(('direction', local_var_params['direction'])) # noqa: E501 header_params = {} @@ -1732,20 +2048,23 @@ def get_score_revision(self, score, revision, **kwargs): # noqa: E501 >>> thread = api.get_score_revision(score, revision, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreRevision If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 - else: - (data) = self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 - return data + return self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: E501 """Get a score revision # noqa: E501 @@ -1756,39 +2075,56 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: >>> thread = api.get_score_revision_with_http_info(score, revision, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str sharing_key: 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. - :return: ScoreRevision + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreRevision, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'revision', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'revision', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revision" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_revision`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_revision`") # noqa: E501 # verify the required parameter 'revision' is set - if ('revision' not in local_var_params or - local_var_params['revision'] is None): - raise ValueError("Missing the required parameter `revision` when calling `get_score_revision`") # noqa: E501 + if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 + local_var_params['revision'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `revision` when calling `get_score_revision`") # noqa: E501 collection_formats = {} @@ -1799,7 +2135,7 @@ def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: path_params['revision'] = local_var_params['revision'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -1840,7 +2176,7 @@ def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) @@ -1848,16 +2184,19 @@ def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :param bool url: Returns a json with the `url` in it instead of redirecting + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: file If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 - else: - (data) = self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 - return data + return self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 def get_score_revision_data_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 """Get a score revision data # noqa: E501 @@ -1868,7 +2207,7 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar >>> thread = api.get_score_revision_data_with_http_info(score, revision, format, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) :param str format: The format of the file you will retrieve (required) @@ -1876,39 +2215,60 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :param bool url: Returns a json with the `url` in it instead of redirecting - :return: file + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'revision', 'format', 'sharing_key', 'parts', 'default_track', 'url'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'revision', + 'format', + 'sharing_key', + 'parts', + 'default_track', + 'url' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revision_data" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_revision_data`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_revision_data`") # noqa: E501 # verify the required parameter 'revision' is set - if ('revision' not in local_var_params or - local_var_params['revision'] is None): - raise ValueError("Missing the required parameter `revision` when calling `get_score_revision_data`") # noqa: E501 + if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 + local_var_params['revision'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `revision` when calling `get_score_revision_data`") # noqa: E501 # verify the required parameter 'format' is set - if ('format' not in local_var_params or - local_var_params['format'] is None): - raise ValueError("Missing the required parameter `format` when calling `get_score_revision_data`") # noqa: E501 + if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 + local_var_params['format'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `format` when calling `get_score_revision_data`") # noqa: E501 collection_formats = {} @@ -1921,13 +2281,13 @@ def get_score_revision_data_with_http_info(self, score, revision, format, **kwar path_params['format'] = local_var_params['format'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'parts' in local_var_params: + if 'parts' in local_var_params and local_var_params['parts'] is not None: # noqa: E501 query_params.append(('parts', local_var_params['parts'])) # noqa: E501 - if 'default_track' in local_var_params: + if 'default_track' in local_var_params and local_var_params['default_track'] is not None: # noqa: E501 query_params.append(('defaultTrack', local_var_params['default_track'])) # noqa: E501 - if 'url' in local_var_params: + if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 query_params.append(('url', local_var_params['url'])) # noqa: E501 header_params = {} @@ -1968,19 +2328,22 @@ def get_score_revisions(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_revisions(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreRevision] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 """List the revisions # noqa: E501 @@ -1991,34 +2354,50 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_revisions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. - :return: list[ScoreRevision] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreRevision], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_revisions" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_revisions`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_revisions`") # noqa: E501 collection_formats = {} @@ -2027,7 +2406,7 @@ def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2068,18 +2447,21 @@ def get_score_submissions(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_submissions(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[AssignmentSubmission] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 """List submissions related to the score # noqa: E501 @@ -2090,33 +2472,48 @@ def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :return: list[AssignmentSubmission] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_submissions" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 collection_formats = {} @@ -2163,20 +2560,23 @@ def get_score_track(self, score, track, **kwargs): # noqa: E501 >>> thread = api.get_score_track(score, track, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - else: - (data) = self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - return data + return self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 """Retrieve the details of an audio or video track linked to a score # noqa: E501 @@ -2186,39 +2586,56 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 >>> thread = api.get_score_track_with_http_info(score, track, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param str sharing_key: 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. - :return: ScoreTrack + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'track', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'track', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_score_track" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `get_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `get_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in local_var_params or - local_var_params['track'] is None): - raise ValueError("Missing the required parameter `track` when calling `get_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 + local_var_params['track'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `track` when calling `get_score_track`") # noqa: E501 collection_formats = {} @@ -2229,7 +2646,7 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 path_params['track'] = local_var_params['track'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2262,7 +2679,7 @@ def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_user_scores(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 + """List user's scores # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2270,22 +2687,25 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user_scores(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 + """List user's scores # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -2293,34 +2713,50 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user_scores_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'parent'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'parent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_user_scores" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 collection_formats = {} @@ -2329,7 +2765,7 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'parent' in local_var_params: + if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} @@ -2369,21 +2805,24 @@ def list_score_tracks(self, score, **kwargs): # noqa: E501 >>> thread = api.list_score_tracks(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str assignment: An assignment id with which all the tracks returned will be related to :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreTrack] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 """List the audio or video tracks linked to a score # noqa: E501 @@ -2393,36 +2832,54 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.list_score_tracks_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str sharing_key: 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. :param str assignment: An assignment id with which all the tracks returned will be related to :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track - :return: list[ScoreTrack] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreTrack], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'sharing_key', 'assignment', 'list_auto_track'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'sharing_key', + 'assignment', + 'list_auto_track' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method list_score_tracks" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `list_score_tracks`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `list_score_tracks`") # noqa: E501 collection_formats = {} @@ -2431,11 +2888,11 @@ def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'assignment' in local_var_params: + if 'assignment' in local_var_params and local_var_params['assignment'] is not None: # noqa: E501 query_params.append(('assignment', local_var_params['assignment'])) # noqa: E501 - if 'list_auto_track' in local_var_params: + if 'list_auto_track' in local_var_params and local_var_params['list_auto_track'] is not None: # noqa: E501 query_params.append(('listAutoTrack', local_var_params['list_auto_track'])) # noqa: E501 header_params = {} @@ -2475,20 +2932,23 @@ def mark_score_comment_resolved(self, score, comment, **kwargs): # noqa: E501 >>> thread = api.mark_score_comment_resolved(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 - else: - (data) = self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 - return data + return self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): # noqa: E501 """Mark the comment as resolved # noqa: E501 @@ -2498,10 +2958,19 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): >>> thread = api.mark_score_comment_resolved_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -2509,28 +2978,36 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): local_var_params = locals() - all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'comment', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method mark_score_comment_resolved" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `mark_score_comment_resolved`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `mark_score_comment_resolved`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `mark_score_comment_resolved`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `mark_score_comment_resolved`") # noqa: E501 collection_formats = {} @@ -2541,7 +3018,7 @@ def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2581,20 +3058,23 @@ def mark_score_comment_unresolved(self, score, comment, **kwargs): # noqa: E501 >>> thread = api.mark_score_comment_unresolved(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 - else: - (data) = self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 - return data + return self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs): # noqa: E501 """Mark the comment as unresolved # noqa: E501 @@ -2604,10 +3084,19 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) >>> thread = api.mark_score_comment_unresolved_with_http_info(score, comment, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param str sharing_key: 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. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -2615,28 +3104,36 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) local_var_params = locals() - all_params = ['score', 'comment', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'comment', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method mark_score_comment_unresolved" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `mark_score_comment_unresolved`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `mark_score_comment_unresolved`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `mark_score_comment_unresolved`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `mark_score_comment_unresolved`") # noqa: E501 collection_formats = {} @@ -2647,7 +3144,7 @@ def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs) path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2688,20 +3185,23 @@ def post_score_comment(self, score, body, **kwargs): # noqa: E501 >>> thread = api.post_score_comment(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreCommentCreation body: (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 - else: - (data) = self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 - return data + return self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E501 """Post a new comment # noqa: E501 @@ -2712,39 +3212,56 @@ def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E50 >>> thread = api.post_score_comment_with_http_info(score, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param ScoreCommentCreation body: (required) :param str sharing_key: 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. - :return: ScoreComment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreComment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'body', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method post_score_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `post_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `post_score_comment`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `post_score_comment`") # noqa: E501 collection_formats = {} @@ -2753,7 +3270,7 @@ def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E50 path_params['score'] = local_var_params['score'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -2800,19 +3317,22 @@ def remove_score_collaborator(self, score, collaborator, **kwargs): # noqa: E50 >>> thread = api.remove_score_collaborator(score, collaborator, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - else: - (data) = self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - return data + return self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs): # noqa: E501 """Delete a collaborator # noqa: E501 @@ -2823,9 +3343,18 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs >>> thread = api.remove_score_collaborator_with_http_info(score, collaborator, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -2833,28 +3362,35 @@ def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs local_var_params = locals() - all_params = ['score', 'collaborator'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'collaborator' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method remove_score_collaborator" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `remove_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `remove_score_collaborator`") # noqa: E501 # verify the required parameter 'collaborator' is set - if ('collaborator' not in local_var_params or - local_var_params['collaborator'] is None): - raise ValueError("Missing the required parameter `collaborator` when calling `remove_score_collaborator`") # noqa: E501 + if self.api_client.client_side_validation and ('collaborator' not in local_var_params or # noqa: E501 + local_var_params['collaborator'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `collaborator` when calling `remove_score_collaborator`") # noqa: E501 collection_formats = {} @@ -2904,18 +3440,21 @@ def untrash_score(self, score, **kwargs): # noqa: E501 >>> thread = api.untrash_score(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 - else: - (data) = self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 - return data + return self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 """Untrash a score # noqa: E501 @@ -2926,8 +3465,17 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 >>> thread = api.untrash_score_with_http_info(score, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: None If the method is called asynchronously, returns the request thread. @@ -2935,24 +3483,30 @@ def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['score'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method untrash_score" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `untrash_score`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `untrash_score`") # noqa: E501 collection_formats = {} @@ -2999,21 +3553,24 @@ def update_score_comment(self, score, comment, body, **kwargs): # noqa: E501 >>> thread = api.update_score_comment(score, comment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param ScoreCommentUpdate body: (required) :param str sharing_key: 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. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreComment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 - else: - (data) = self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 - return data + return self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 def update_score_comment_with_http_info(self, score, comment, body, **kwargs): # noqa: E501 """Update an existing comment # noqa: E501 @@ -3023,44 +3580,62 @@ def update_score_comment_with_http_info(self, score, comment, body, **kwargs): >>> thread = api.update_score_comment_with_http_info(score, comment, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str comment: Unique identifier of a sheet music comment (required) :param ScoreCommentUpdate body: (required) :param str sharing_key: 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. - :return: ScoreComment + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreComment, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'comment', 'body', 'sharing_key'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'comment', + 'body', + 'sharing_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_score_comment" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `update_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `update_score_comment`") # noqa: E501 # verify the required parameter 'comment' is set - if ('comment' not in local_var_params or - local_var_params['comment'] is None): - raise ValueError("Missing the required parameter `comment` when calling `update_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 + local_var_params['comment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `comment` when calling `update_score_comment`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_score_comment`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_score_comment`") # noqa: E501 collection_formats = {} @@ -3071,7 +3646,7 @@ def update_score_comment_with_http_info(self, score, comment, body, **kwargs): path_params['comment'] = local_var_params['comment'] # noqa: E501 query_params = [] - if 'sharing_key' in local_var_params: + if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 header_params = {} @@ -3117,20 +3692,23 @@ def update_score_track(self, score, track, body, **kwargs): # noqa: E501 >>> thread = api.update_score_track(score, track, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param ScoreTrackUpdate body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: ScoreTrack If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 - else: - (data) = self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 - return data + return self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 def update_score_track_with_http_info(self, score, track, body, **kwargs): # noqa: E501 """Update an audio or video track linked to a score # noqa: E501 @@ -3140,43 +3718,60 @@ def update_score_track_with_http_info(self, score, track, body, **kwargs): # no >>> thread = api.update_score_track_with_http_info(score, track, body, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :param str track: Unique identifier of a score audio track (required) :param ScoreTrackUpdate body: (required) - :return: ScoreTrack + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['score', 'track', 'body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'score', + 'track', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_score_track" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'score' is set - if ('score' not in local_var_params or - local_var_params['score'] is None): - raise ValueError("Missing the required parameter `score` when calling `update_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 + local_var_params['score'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `score` when calling `update_score_track`") # noqa: E501 # verify the required parameter 'track' is set - if ('track' not in local_var_params or - local_var_params['track'] is None): - raise ValueError("Missing the required parameter `track` when calling `update_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 + local_var_params['track'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `track` when calling `update_score_track`") # noqa: E501 # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update_score_track`") # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_score_track`") # noqa: E501 collection_formats = {} diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py index 1ca926c..9f2eb47 100644 --- a/flat_api/api/task_api.py +++ b/flat_api/api/task_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class TaskApi(object): @@ -42,18 +46,21 @@ def get_task(self, task, **kwargs): # noqa: E501 >>> thread = api.get_task(task, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str task: Unique identifier for the task (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Task If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_task_with_http_info(task, **kwargs) # noqa: E501 - else: - (data) = self.get_task_with_http_info(task, **kwargs) # noqa: E501 - return data + return self.get_task_with_http_info(task, **kwargs) # noqa: E501 def get_task_with_http_info(self, task, **kwargs): # noqa: E501 """Get a task details # noqa: E501 @@ -64,33 +71,48 @@ def get_task_with_http_info(self, task, **kwargs): # noqa: E501 >>> thread = api.get_task_with_http_info(task, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str task: Unique identifier for the task (required) - :return: Task + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Task, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['task'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'task' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_task" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'task' is set - if ('task' not in local_var_params or - local_var_params['task'] is None): - raise ValueError("Missing the required parameter `task` when calling `get_task`") # noqa: E501 + if self.api_client.client_side_validation and ('task' not in local_var_params or # noqa: E501 + local_var_params['task'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `task` when calling `get_task`") # noqa: E501 collection_formats = {} diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index 5582da2..77700ef 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -19,6 +19,10 @@ import six from flat_api.api_client import ApiClient +from flat_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class UserApi(object): @@ -41,19 +45,22 @@ def ger_user_likes(self, user, **kwargs): # noqa: E501 >>> thread = api.ger_user_likes(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 """List liked scores # noqa: E501 @@ -63,34 +70,50 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param bool ids: Return only the identifiers of the scores - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'ids' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ger_user_likes" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 collection_formats = {} @@ -99,7 +122,7 @@ def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'ids' in local_var_params: + if 'ids' in local_var_params and local_var_params['ids'] is not None: # noqa: E501 query_params.append(('ids', local_var_params['ids'])) # noqa: E501 header_params = {} @@ -140,18 +163,21 @@ def get_user(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: UserPublic If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.get_user_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.get_user_with_http_info(user, **kwargs) # noqa: E501 def get_user_with_http_info(self, user, **kwargs): # noqa: E501 """Get a public user profile # noqa: E501 @@ -162,33 +188,48 @@ def get_user_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) - :return: UserPublic + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UserPublic, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_user" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `get_user`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_user`") # noqa: E501 collection_formats = {} @@ -228,7 +269,7 @@ def get_user_with_http_info(self, user, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_user_scores(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 + """List user's scores # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -236,22 +277,25 @@ def get_user_scores(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user_scores(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: list[ScoreDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 + """List user's scores # noqa: E501 Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -259,34 +303,50 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 >>> thread = api.get_user_scores_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool + :param async_req bool: execute request asynchronously :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :param str parent: Filter the score forked from the score id `parent` - :return: list[ScoreDetails] + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ['user', 'parent'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'user', + 'parent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_user_scores" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 collection_formats = {} @@ -295,7 +355,7 @@ def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - if 'parent' in local_var_params: + if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 query_params.append(('parent', local_var_params['parent'])) # noqa: E501 header_params = {} diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 219af35..781343a 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -4,14 +4,16 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +import atexit import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -26,6 +28,7 @@ from flat_api.configuration import Configuration import flat_api.models from flat_api import rest +from flat_api.exceptions import ApiValueError, ApiException class ApiClient(object): @@ -46,6 +49,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -59,14 +64,15 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -74,10 +80,31 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'flat_api/1.0.0' + self.client_side_validation = configuration.client_side_validation - def __del__(self): - self.pool.close() - self.pool.join() + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -96,7 +123,7 @@ def __call_api( query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): + _preload_content=True, _request_timeout=None, _host=None): config = self.configuration @@ -130,10 +157,11 @@ def __call_api( # post parameters if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) + post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth(header_params, query_params, auth_settings) @@ -143,24 +171,44 @@ def __call_api( body = self.sanitize_for_serialization(body) # request url - url = self.configuration.host + resource_path + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') self.last_response = response_data return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None if _return_http_data_only: return (return_data) @@ -245,12 +293,12 @@ def __deserialize(self, data, klass): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): - sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} @@ -267,7 +315,7 @@ def __deserialize(self, data, klass): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -276,7 +324,7 @@ def call_api(self, resource_path, method, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): + _preload_content=True, _request_timeout=None, _host=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. @@ -319,17 +367,20 @@ def call_api(self, resource_path, method, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread + _preload_content, _request_timeout, _host) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -351,10 +402,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, @@ -387,7 +436,7 @@ def request(self, method, url, query_params=None, headers=None, _request_timeout=_request_timeout, body=body) else: - raise ValueError( + raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) @@ -422,18 +471,14 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - def prepare_post_parameters(self, post_params=None, files=None): + def files_parameters(self, files=None): """Builds form parameters. - :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - if post_params: - params = post_params - if files: for k, v in six.iteritems(files): if not v: @@ -495,14 +540,14 @@ def update_params_for_auth(self, headers, querys, auth_settings): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) else: - raise ValueError( + raise ApiValueError( 'Authentication token must be in `query` or `header`' ) @@ -559,7 +604,6 @@ def __deserialize_date(self, string): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -569,7 +613,7 @@ def __deserialize_date(self, string): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -578,7 +622,6 @@ def __deserialize_datatime(self, string): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string @@ -598,23 +641,26 @@ def __deserialize_model(self, data, klass): :param klass: class literal. :return: model object. """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True - if not klass.openapi_types and not hasattr(klass, - 'get_real_child_model'): + if not klass.openapi_types and has_discriminator is False: return data kwargs = {} - if klass.openapi_types is not None: + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): for attr, attr_type in six.iteritems(klass.openapi_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): + if klass.attribute_map[attr] in data: value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) instance = klass(**kwargs) - if hasattr(instance, 'get_real_child_model'): + if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) diff --git a/flat_api/configuration.py b/flat_api/configuration.py index 2513236..e5975df 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -23,86 +23,179 @@ from six.moves import http_client as httplib -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): +class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + :Example: """ - def __init__(self): - """Constructor""" - # Default Base url - self.host = "https://api.flat.io/v2" - # Temp file folder for downloading files - self.temp_folder_path = None + _default = None + def __init__(self, host="https://api.flat.io/v2", + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ # Authentication Settings - # dict to store API key(s) self.api_key = {} - # dict to store API prefix (e.g. Bearer) + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ self.api_key_prefix = {} - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - - # access token for OAuth - self.access_token = "" - - # Logging Settings + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.access_token = None + """access token for OAuth/Bearer + """ self.logger = {} + """Logging Settings + """ self.logger["package_logger"] = logging.getLogger("flat_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler + """Log format + """ self.logger_stream_handler = None - # Log file handler + """Log stream handler + """ self.logger_file_handler = None - # Debug file location + """Log file handler + """ self.logger_file = None - # Debug switch + """Debug file location + """ self.debug = False + """Debug switch + """ - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ self.ssl_ca_cert = None - # client certificate file + """Set this to customize the certificate file to verify the peer. + """ self.cert_file = None - # client key file + """client certificate file + """ self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. + """client key file + """ self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ - # Proxy URL self.proxy = None - # Safe chars for path_param + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property def logger_file(self): @@ -195,19 +288,29 @@ def get_api_key_with_prefix(self, identifier): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if (self.api_key.get(identifier) and - self.api_key_prefix.get(identifier)): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 - elif self.api_key.get(identifier): - return self.api_key[identifier] + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -215,17 +318,15 @@ def auth_settings(self): :return: The Auth Settings information dict. """ - return { - - 'OAuth2': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - - } + auth = {} + if self.access_token is not None: + auth['OAuth2'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. @@ -238,3 +339,50 @@ def to_debug_report(self): "Version of the API: 2.17.0\n"\ "SDK Package Version: 0.7.0".\ format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.flat.io/v2", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py new file mode 100644 index 0000000..3c73eaa --- /dev/null +++ b/flat_api/exceptions.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.17.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 670fcb9..1624c0e 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -6,7 +6,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py index a108d3f..0f4a8ce 100644 --- a/flat_api/models/api_access_token.py +++ b/flat_api/models/api_access_token.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ApiAccessToken(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class ApiAccessToken(object): 'scopes': 'scopes' } - def __init__(self, id=None, name=None, token=None, issued_date=None, expiration_date=None, scopes=None): # noqa: E501 + def __init__(self, id=None, name=None, token=None, issued_date=None, expiration_date=None, scopes=None, local_vars_configuration=None): # noqa: E501 """ApiAccessToken - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -248,8 +253,11 @@ def __eq__(self, other): if not isinstance(other, ApiAccessToken): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ApiAccessToken): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py index a3144ab..235bd81 100644 --- a/flat_api/models/app_scopes.py +++ b/flat_api/models/app_scopes.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AppScopes(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,6 +49,8 @@ class AppScopes(object): EDU_ADMIN_USERS_READONLY = "edu.admin.users.readonly" TASKS_READONLY = "tasks.readonly" + allowable_values = [ACCOUNT_PUBLIC_PROFILE, ACCOUNT_EMAIL, ACCOUNT_EDUCATION_PROFILE, SCORES_READONLY, SCORES_SOCIAL, SCORES, COLLECTIONS_READONLY, COLLECTIONS_ADD_SCORES, COLLECTIONS, EDU_CLASSES, EDU_CLASSES_READONLY, EDU_ASSIGNMENTS, EDU_ASSIGNMENTS_READONLY, EDU_ADMIN, EDU_ADMIN_LTI, EDU_ADMIN_LTI_READONLY, EDU_ADMIN_USERS, EDU_ADMIN_USERS_READONLY, TASKS_READONLY] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -60,8 +64,11 @@ class AppScopes(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """AppScopes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -101,8 +108,11 @@ def __eq__(self, other): if not isinstance(other, AppScopes): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AppScopes): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index fff90b3..9d35ba3 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class Assignment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -75,8 +77,11 @@ class Assignment(object): 'lti': 'lti' } - def __init__(self, state=None, type=None, title=None, classroom=None, description=None, cover=None, cover_file=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, max_points=None, google_classroom=None, microsoft_graph=None, mfc=None, canvas=None, lti=None): # noqa: E501 + def __init__(self, state=None, type=None, title=None, classroom=None, description=None, cover=None, cover_file=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, max_points=None, google_classroom=None, microsoft_graph=None, mfc=None, canvas=None, lti=None, local_vars_configuration=None): # noqa: E501 """Assignment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._state = None self._type = None @@ -159,7 +164,7 @@ def state(self, state): :type: str """ allowed_values = ["draft", "active", "archived"] # noqa: E501 - if state not in allowed_values: + if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 .format(state, allowed_values) @@ -602,8 +607,11 @@ def __eq__(self, other): if not isinstance(other, Assignment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Assignment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_canvas.py b/flat_api/models/assignment_canvas.py index 239f815..51367da 100644 --- a/flat_api/models/assignment_canvas.py +++ b/flat_api/models/assignment_canvas.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentCanvas(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class AssignmentCanvas(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """AssignmentCanvas - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._alternate_link = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentCanvas): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentCanvas): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index f0a21de..9b9af5b 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentCopy(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class AssignmentCopy(object): 'scheduled_date': 'scheduledDate' } - def __init__(self, classroom=None, assignment=None, scheduled_date=None): # noqa: E501 + def __init__(self, classroom=None, assignment=None, scheduled_date=None, local_vars_configuration=None): # noqa: E501 """AssignmentCopy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._classroom = None self._assignment = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentCopy): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentCopy): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation.py b/flat_api/models/assignment_creation.py index ce62941..4b360ad 100644 --- a/flat_api/models/assignment_creation.py +++ b/flat_api/models/assignment_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -71,8 +73,11 @@ class AssignmentCreation(object): 'shuffle_exercises': 'shuffleExercises' } - def __init__(self, type=None, state=None, title=None, description=None, attachments=None, due_date=None, scheduled_date=None, nb_playback_authorized=None, toolset=None, cover_file=None, cover=None, max_points=None, google_classroom=None, microsoft_graph=None, assignee_mode=None, assigned_students=None, shuffle_exercises=None): # noqa: E501 + def __init__(self, type=None, state=None, title=None, description=None, attachments=None, due_date=None, scheduled_date=None, nb_playback_authorized=None, toolset=None, cover_file=None, cover=None, max_points=None, google_classroom=None, microsoft_graph=None, assignee_mode=None, assigned_students=None, shuffle_exercises=None, local_vars_configuration=None): # noqa: E501 """AssignmentCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._type = None self._state = None @@ -163,7 +168,7 @@ def state(self, state): :type: str """ allowed_values = ["draft", "active"] # noqa: E501 - if state not in allowed_values: + if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 .format(state, allowed_values) @@ -396,9 +401,11 @@ def max_points(self, max_points): :param max_points: The max_points of this AssignmentCreation. # noqa: E501 :type: float """ - if max_points is not None and max_points > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + max_points is not None and max_points > 100): # noqa: E501 raise ValueError("Invalid value for `max_points`, must be a value less than or equal to `100`") # noqa: E501 - if max_points is not None and max_points < 0: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + max_points is not None and max_points < 0): # noqa: E501 raise ValueError("Invalid value for `max_points`, must be a value greater than or equal to `0`") # noqa: E501 self._max_points = max_points @@ -466,7 +473,7 @@ def assignee_mode(self, assignee_mode): :type: str """ allowed_values = ["everyone", "selected"] # noqa: E501 - if assignee_mode not in allowed_values: + if self.local_vars_configuration.client_side_validation and assignee_mode not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `assignee_mode` ({0}), must be one of {1}" # noqa: E501 .format(assignee_mode, allowed_values) @@ -557,8 +564,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation_google_classroom.py b/flat_api/models/assignment_creation_google_classroom.py index d2333c3..8365b39 100644 --- a/flat_api/models/assignment_creation_google_classroom.py +++ b/flat_api/models/assignment_creation_google_classroom.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentCreationGoogleClassroom(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class AssignmentCreationGoogleClassroom(object): 'topic_id': 'topicId' } - def __init__(self, topic_id=None): # noqa: E501 + def __init__(self, topic_id=None, local_vars_configuration=None): # noqa: E501 """AssignmentCreationGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._topic_id = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentCreationGoogleClassroom): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentCreationGoogleClassroom): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation_microsoft_graph.py b/flat_api/models/assignment_creation_microsoft_graph.py index 2d2a650..bb274e7 100644 --- a/flat_api/models/assignment_creation_microsoft_graph.py +++ b/flat_api/models/assignment_creation_microsoft_graph.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentCreationMicrosoftGraph(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class AssignmentCreationMicrosoftGraph(object): 'categories': 'categories' } - def __init__(self, categories=None): # noqa: E501 + def __init__(self, categories=None, local_vars_configuration=None): # noqa: E501 """AssignmentCreationMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._categories = None self.discriminator = None @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentCreationMicrosoftGraph): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentCreationMicrosoftGraph): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_lti.py b/flat_api/models/assignment_lti.py index 12edbc6..1cd59e8 100644 --- a/flat_api/models/assignment_lti.py +++ b/flat_api/models/assignment_lti.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentLti(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class AssignmentLti(object): 'id': 'id' } - def __init__(self, id=None): # noqa: E501 + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 """AssignmentLti - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentLti): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentLti): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_mfc.py b/flat_api/models/assignment_mfc.py index cd9817f..9ac0948 100644 --- a/flat_api/models/assignment_mfc.py +++ b/flat_api/models/assignment_mfc.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentMfc(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class AssignmentMfc(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """AssignmentMfc - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._alternate_link = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentMfc): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentMfc): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index 0932d26..752b626 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmission(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -69,8 +71,11 @@ class AssignmentSubmission(object): 'microsoft_graph': 'microsoftGraph' } - def __init__(self, id=None, state=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, return_date=None, return_creator=None, grade=None, draft_grade=None, max_points=None, exercises_ids=None, google_classroom=None, microsoft_graph=None): # noqa: E501 + def __init__(self, id=None, state=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, return_date=None, return_creator=None, grade=None, draft_grade=None, max_points=None, exercises_ids=None, google_classroom=None, microsoft_graph=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmission - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -517,8 +522,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmission): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmission): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py index 90b8cf6..5c0466d 100644 --- a/flat_api/models/assignment_submission_comment.py +++ b/flat_api/models/assignment_submission_comment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionComment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class AssignmentSubmissionComment(object): 'unread': 'unread' } - def __init__(self, id=None, user=None, submission=None, date=None, modification_date=None, comment=None, unread=None): # noqa: E501 + def __init__(self, id=None, user=None, submission=None, date=None, modification_date=None, comment=None, unread=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionComment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._user = None @@ -276,8 +281,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionComment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py index 392029e..2b28f8a 100644 --- a/flat_api/models/assignment_submission_comment_creation.py +++ b/flat_api/models/assignment_submission_comment_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionCommentCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class AssignmentSubmissionCommentCreation(object): 'comment': 'comment' } - def __init__(self, comment=None): # noqa: E501 + def __init__(self, comment=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionCommentCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._comment = None self.discriminator = None @@ -67,7 +72,7 @@ def comment(self, comment): :param comment: The comment of this AssignmentSubmissionCommentCreation. # noqa: E501 :type: str """ - if comment is None: + if self.local_vars_configuration.client_side_validation and comment is None: # noqa: E501 raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501 self._comment = comment @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionCommentCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionCommentCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py index 664f2d5..82d4835 100644 --- a/flat_api/models/assignment_submission_history.py +++ b/flat_api/models/assignment_submission_history.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionHistory(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class AssignmentSubmissionHistory(object): 'attachment': 'attachment' } - def __init__(self, date=None, users=None, state=None, draft_grade=None, grade=None, max_points=None, attachment=None): # noqa: E501 + def __init__(self, date=None, users=None, state=None, draft_grade=None, grade=None, max_points=None, attachment=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionHistory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._date = None self._users = None @@ -272,8 +277,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionHistory): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionHistory): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py index 3209d3d..35fcc99 100644 --- a/flat_api/models/assignment_submission_history_attachment.py +++ b/flat_api/models/assignment_submission_history_attachment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionHistoryAttachment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class AssignmentSubmissionHistoryAttachment(object): 'revision': 'revision' } - def __init__(self, score=None, revision=None): # noqa: E501 + def __init__(self, score=None, revision=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._score = None self._revision = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionHistoryAttachment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionHistoryAttachment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_state.py b/flat_api/models/assignment_submission_state.py index edaa15d..5d79220 100644 --- a/flat_api/models/assignment_submission_state.py +++ b/flat_api/models/assignment_submission_state.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionState(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class AssignmentSubmissionState(object): TURNEDIN = "turnedIn" RETURNED = "returned" + allowable_values = [CREATED, TURNEDIN, RETURNED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class AssignmentSubmissionState(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionState): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionState): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index b4fea84..3189038 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class AssignmentSubmissionUpdate(object): 'comments': 'comments' } - def __init__(self, attachments=None, submit=None, draft_grade=None, grade=None, exercises_ids=None, _return=None, comments=None): # noqa: E501 + def __init__(self, attachments=None, submit=None, draft_grade=None, grade=None, exercises_ids=None, _return=None, comments=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionUpdate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._attachments = None self._submit = None @@ -139,9 +144,11 @@ def draft_grade(self, draft_grade): :param draft_grade: The draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 :type: float """ - if draft_grade is not None and draft_grade > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + draft_grade is not None and draft_grade > 100): # noqa: E501 raise ValueError("Invalid value for `draft_grade`, must be a value less than or equal to `100`") # noqa: E501 - if draft_grade is not None and draft_grade < 0: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + draft_grade is not None and draft_grade < 0): # noqa: E501 raise ValueError("Invalid value for `draft_grade`, must be a value greater than or equal to `0`") # noqa: E501 self._draft_grade = draft_grade @@ -166,9 +173,11 @@ def grade(self, grade): :param grade: The grade of this AssignmentSubmissionUpdate. # noqa: E501 :type: float """ - if grade is not None and grade > 100: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + grade is not None and grade > 100): # noqa: E501 raise ValueError("Invalid value for `grade`, must be a value less than or equal to `100`") # noqa: E501 - if grade is not None and grade < 0: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + grade is not None and grade < 0): # noqa: E501 raise ValueError("Invalid value for `grade`, must be a value greater than or equal to `0`") # noqa: E501 self._grade = grade @@ -277,8 +286,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionUpdate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_update_comments.py b/flat_api/models/assignment_submission_update_comments.py index 47ad1eb..1759b00 100644 --- a/flat_api/models/assignment_submission_update_comments.py +++ b/flat_api/models/assignment_submission_update_comments.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentSubmissionUpdateComments(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class AssignmentSubmissionUpdateComments(object): 'unread': 'unread' } - def __init__(self, total=None, unread=None): # noqa: E501 + def __init__(self, total=None, unread=None, local_vars_configuration=None): # noqa: E501 """AssignmentSubmissionUpdateComments - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total = None self._unread = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentSubmissionUpdateComments): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentSubmissionUpdateComments): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_type.py b/flat_api/models/assignment_type.py index 03373c7..653a02c 100644 --- a/flat_api/models/assignment_type.py +++ b/flat_api/models/assignment_type.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class AssignmentType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -34,6 +36,8 @@ class AssignmentType(object): WORKSHEET = "worksheet" PERFORMANCE = "performance" + allowable_values = [NONE, NEWSCORE, SCORETEMPLATE, SHAREDWRITING, WORKSHEET, PERFORMANCE] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -47,8 +51,11 @@ class AssignmentType(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """AssignmentType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -88,8 +95,11 @@ def __eq__(self, other): if not isinstance(other, AssignmentType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AssignmentType): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index d497c41..031d382 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassAttachmentCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class ClassAttachmentCreation(object): 'google_drive_file_id': 'googleDriveFileId' } - def __init__(self, type=None, score=None, worksheet=None, sharing_mode=None, lock_score_template=None, url=None, google_drive_file_id=None): # noqa: E501 + def __init__(self, type=None, score=None, worksheet=None, sharing_mode=None, lock_score_template=None, url=None, google_drive_file_id=None, local_vars_configuration=None): # noqa: E501 """ClassAttachmentCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._type = None self._score = None @@ -99,7 +104,7 @@ def type(self, type): :type: str """ allowed_values = ["flat", "link", "googleDrive", "worksheet"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -280,8 +285,11 @@ def __eq__(self, other): if not isinstance(other, ClassAttachmentCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassAttachmentCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index 92339fa..005f836 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassCreation(object): 'section': 'section' } - def __init__(self, name=None, section=None): # noqa: E501 + def __init__(self, name=None, section=None, local_vars_configuration=None): # noqa: E501 """ClassCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._section = None @@ -72,9 +77,10 @@ def name(self, name): :param name: The name of this ClassCreation. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - if name is not None and len(name) > 255: + if (self.local_vars_configuration.client_side_validation and + name is not None and len(name) > 255): raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 self._name = name @@ -99,7 +105,8 @@ def section(self, section): :param section: The section of this ClassCreation. # noqa: E501 :type: str """ - if section is not None and len(section) > 255: + if (self.local_vars_configuration.client_side_validation and + section is not None and len(section) > 255): raise ValueError("Invalid value for `section`, length must be less than or equal to `255`") # noqa: E501 self._section = section @@ -141,8 +148,11 @@ def __eq__(self, other): if not isinstance(other, ClassCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 2cff47a..8a58cf4 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetails(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -79,8 +81,11 @@ class ClassDetails(object): 'clever': 'clever' } - def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, issues=None, google_classroom=None, google_drive=None, microsoft_graph=None, lti=None, canvas=None, mfc=None, clever=None): # noqa: E501 + def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, issues=None, google_classroom=None, google_drive=None, microsoft_graph=None, lti=None, canvas=None, mfc=None, clever=None, local_vars_configuration=None): # noqa: E501 """ClassDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -646,8 +651,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetails): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index ace1024..155a569 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsCanvas(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassDetailsCanvas(object): 'domain': 'domain' } - def __init__(self, id=None, domain=None): # noqa: E501 + def __init__(self, id=None, domain=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsCanvas - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._domain = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsCanvas): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsCanvas): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index 32ac831..21fd7c0 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsClever(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class ClassDetailsClever(object): 'term_end_date': 'termEndDate' } - def __init__(self, id=None, creation_date=None, modification_date=None, subject=None, term_name=None, term_start_date=None, term_end_date=None): # noqa: E501 + def __init__(self, id=None, creation_date=None, modification_date=None, subject=None, term_name=None, term_start_date=None, term_end_date=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsClever - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._creation_date = None @@ -168,7 +173,7 @@ def subject(self, subject): :type: str """ allowed_values = ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other"] # noqa: E501 - if subject not in allowed_values: + if self.local_vars_configuration.client_side_validation and subject not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `subject` ({0}), must be one of {1}" # noqa: E501 .format(subject, allowed_values) @@ -282,8 +287,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsClever): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsClever): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index 6ed06e0..5a9927a 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsGoogleClassroom(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassDetailsGoogleClassroom(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._alternate_link = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsGoogleClassroom): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsGoogleClassroom): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index ee1f509..2b0e81d 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsGoogleDrive(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassDetailsGoogleDrive(object): 'teacher_folder_alternate_link': 'teacherFolderAlternateLink' } - def __init__(self, teacher_folder_id=None, teacher_folder_alternate_link=None): # noqa: E501 + def __init__(self, teacher_folder_id=None, teacher_folder_alternate_link=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsGoogleDrive - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._teacher_folder_id = None self._teacher_folder_alternate_link = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsGoogleDrive): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsGoogleDrive): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py index eec2e4b..e1adfd6 100644 --- a/flat_api/models/class_details_issues.py +++ b/flat_api/models/class_details_issues.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsIssues(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ClassDetailsIssues(object): 'sync': 'sync' } - def __init__(self, sync=None): # noqa: E501 + def __init__(self, sync=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsIssues - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._sync = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsIssues): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsIssues): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_issues_sync.py b/flat_api/models/class_details_issues_sync.py index fed6b29..0cb4837 100644 --- a/flat_api/models/class_details_issues_sync.py +++ b/flat_api/models/class_details_issues_sync.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsIssuesSync(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ClassDetailsIssuesSync(object): 'reason': 'reason' } - def __init__(self, id=None, email=None, reason=None): # noqa: E501 + def __init__(self, id=None, email=None, reason=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsIssuesSync - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._email = None @@ -125,7 +130,7 @@ def reason(self, reason): :type: str """ allowed_values = ["otherOrgnanization", "personalSubscription"] # noqa: E501 - if reason not in allowed_values: + if self.local_vars_configuration.client_side_validation and reason not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 .format(reason, allowed_values) @@ -170,8 +175,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsIssuesSync): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsIssuesSync): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index ef1e05e..37f401f 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsLti(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ClassDetailsLti(object): 'context_label': 'contextLabel' } - def __init__(self, context_id=None, context_title=None, context_label=None): # noqa: E501 + def __init__(self, context_id=None, context_title=None, context_label=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsLti - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._context_id = None self._context_title = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsLti): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsLti): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py index 803f5ae..5de9552 100644 --- a/flat_api/models/class_details_mfc.py +++ b/flat_api/models/class_details_mfc.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsMfc(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassDetailsMfc(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsMfc - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._alternate_link = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsMfc): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsMfc): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py index 97387ab..487d542 100644 --- a/flat_api/models/class_details_microsoft_graph.py +++ b/flat_api/models/class_details_microsoft_graph.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassDetailsMicrosoftGraph(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ClassDetailsMicrosoftGraph(object): 'id': 'id' } - def __init__(self, id=None): # noqa: E501 + def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 """ClassDetailsMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, ClassDetailsMicrosoftGraph): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassDetailsMicrosoftGraph): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index 3deb734..3a6e50f 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassRoles(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -30,6 +32,8 @@ class ClassRoles(object): TEACHER = "teacher" STUDENT = "student" + allowable_values = [TEACHER, STUDENT] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -43,8 +47,11 @@ class ClassRoles(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ClassRoles - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +91,11 @@ def __eq__(self, other): if not isinstance(other, ClassRoles): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassRoles): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 697f7f4..973ecf6 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassState(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class ClassState(object): INACTIVE = "inactive" ARCHIVED = "archived" + allowable_values = [ACTIVE, INACTIVE, ARCHIVED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class ClassState(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ClassState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, ClassState): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassState): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index e44f12e..6402642 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ClassUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ClassUpdate(object): 'section': 'section' } - def __init__(self, name=None, section=None): # noqa: E501 + def __init__(self, name=None, section=None, local_vars_configuration=None): # noqa: E501 """ClassUpdate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._section = None @@ -73,7 +78,8 @@ def name(self, name): :param name: The name of this ClassUpdate. # noqa: E501 :type: str """ - if name is not None and len(name) > 255: + if (self.local_vars_configuration.client_side_validation and + name is not None and len(name) > 255): raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 self._name = name @@ -98,7 +104,8 @@ def section(self, section): :param section: The section of this ClassUpdate. # noqa: E501 :type: str """ - if section is not None and len(section) > 255: + if (self.local_vars_configuration.client_side_validation and + section is not None and len(section) > 255): raise ValueError("Invalid value for `section`, length must be less than or equal to `255`") # noqa: E501 self._section = section @@ -140,8 +147,11 @@ def __eq__(self, other): if not isinstance(other, ClassUpdate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ClassUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index 987857d..dbba8d9 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class Collection(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -63,8 +65,11 @@ class Collection(object): 'collections': 'collections' } - def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, sharing_key=None, app=None, creation_date=None, user=None, rights=None, collaborators=None, capabilities=None, collections=None): # noqa: E501 + def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, sharing_key=None, app=None, creation_date=None, user=None, rights=None, collaborators=None, capabilities=None, collections=None, local_vars_configuration=None): # noqa: E501 """Collection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._title = None @@ -432,8 +437,11 @@ def __eq__(self, other): if not isinstance(other, Collection): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Collection): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py index bec779f..95e415b 100644 --- a/flat_api/models/collection_app.py +++ b/flat_api/models/collection_app.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionApp(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class CollectionApp(object): 'logo': 'logo' } - def __init__(self, id=None, name=None, logo=None): # noqa: E501 + def __init__(self, id=None, name=None, logo=None, local_vars_configuration=None): # noqa: E501 """CollectionApp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, CollectionApp): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionApp): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 29f1448..f630261 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionCapabilities(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,8 +49,11 @@ class CollectionCapabilities(object): 'can_delete_scores': 'canDeleteScores' } - def __init__(self, can_edit=None, can_share=None, can_delete=None, can_add_scores=None, can_delete_scores=None): # noqa: E501 + def __init__(self, can_edit=None, can_share=None, can_delete=None, can_add_scores=None, can_delete_scores=None, local_vars_configuration=None): # noqa: E501 """CollectionCapabilities - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._can_edit = None self._can_share = None @@ -220,8 +225,11 @@ def __eq__(self, other): if not isinstance(other, CollectionCapabilities): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionCapabilities): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index 3f45666..7553f46 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class CollectionCreation(object): 'privacy': 'privacy' } - def __init__(self, title=None, privacy=None): # noqa: E501 + def __init__(self, title=None, privacy=None, local_vars_configuration=None): # noqa: E501 """CollectionCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._privacy = None @@ -71,11 +76,13 @@ def title(self, title): :param title: The title of this CollectionCreation. # noqa: E501 :type: str """ - if title is None: + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - if title is not None and len(title) > 300: + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) > 300): raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 - if title is not None and len(title) < 1: + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) < 1): raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -98,7 +105,7 @@ def privacy(self, privacy): :param privacy: The privacy of this CollectionCreation. # noqa: E501 :type: CollectionPrivacy """ - if privacy is None: + if self.local_vars_configuration.client_side_validation and privacy is None: # noqa: E501 raise ValueError("Invalid value for `privacy`, must not be `None`") # noqa: E501 self._privacy = privacy @@ -140,8 +147,11 @@ def __eq__(self, other): if not isinstance(other, CollectionCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index c48b446..01c244f 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionModification(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class CollectionModification(object): 'privacy': 'privacy' } - def __init__(self, title=None, privacy=None): # noqa: E501 + def __init__(self, title=None, privacy=None, local_vars_configuration=None): # noqa: E501 """CollectionModification - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._privacy = None @@ -73,9 +78,11 @@ def title(self, title): :param title: The title of this CollectionModification. # noqa: E501 :type: str """ - if title is not None and len(title) > 300: + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) > 300): raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 - if title is not None and len(title) < 1: + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) < 1): raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 self._title = title @@ -138,8 +145,11 @@ def __eq__(self, other): if not isinstance(other, CollectionModification): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionModification): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index 30da491..d0fed8a 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionPrivacy(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -29,6 +31,8 @@ class CollectionPrivacy(object): """ PRIVATE = "private" + allowable_values = [PRIVATE] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -42,8 +46,11 @@ class CollectionPrivacy(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """CollectionPrivacy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -83,8 +90,11 @@ def __eq__(self, other): if not isinstance(other, CollectionPrivacy): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionPrivacy): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index 32b9c2c..06623db 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class CollectionType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -34,6 +36,8 @@ class CollectionType(object): APP = "app" TRASH = "trash" + allowable_values = [ROOT, REGULAR, SHAREDWITHME, SHAREDWITHGROUP, APP, TRASH] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -47,8 +51,11 @@ class CollectionType(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """CollectionType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -88,8 +95,11 @@ def __eq__(self, other): if not isinstance(other, CollectionType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, CollectionType): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index 9911ce5..f8b748c 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class FlatErrorResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class FlatErrorResponse(object): 'param': 'param' } - def __init__(self, code=None, message=None, id=None, param=None): # noqa: E501 + def __init__(self, code=None, message=None, id=None, param=None, local_vars_configuration=None): # noqa: E501 """FlatErrorResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._code = None self._message = None @@ -192,8 +197,11 @@ def __eq__(self, other): if not isinstance(other, FlatErrorResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FlatErrorResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py index c9d6041..1c68851 100644 --- a/flat_api/models/flat_locales.py +++ b/flat_api/models/flat_locales.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class FlatLocales(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -46,6 +48,8 @@ class FlatLocales(object): TR = "tr" ZH_HANS = "zh-Hans" + allowable_values = [EN, EN_GB, ES, FR, DE, IT, JA, JA_HIRA, KO, NL, PL, PT, PT_BR, RO, RU, SV, TR, ZH_HANS] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -59,8 +63,11 @@ class FlatLocales(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """FlatLocales - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -100,8 +107,11 @@ def __eq__(self, other): if not isinstance(other, FlatLocales): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FlatLocales): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index c19eb4f..1977887 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class GoogleClassroomCoursework(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class GoogleClassroomCoursework(object): 'topic_id': 'topicId' } - def __init__(self, id=None, state=None, alternate_link=None, topic_id=None): # noqa: E501 + def __init__(self, id=None, state=None, alternate_link=None, topic_id=None, local_vars_configuration=None): # noqa: E501 """GoogleClassroomCoursework - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -191,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, GoogleClassroomCoursework): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GoogleClassroomCoursework): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index 07cdb3e..f8a5a69 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class GoogleClassroomSubmission(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class GoogleClassroomSubmission(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, state=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """GoogleClassroomSubmission - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, GoogleClassroomSubmission): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GoogleClassroomSubmission): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group.py b/flat_api/models/group.py index e3ce0ee..b047e79 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class Group(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class Group(object): 'creation_date': 'creationDate' } - def __init__(self, id=None, name=None, type=None, users_count=None, read_only=None, organization=None, creation_date=None): # noqa: E501 + def __init__(self, id=None, name=None, type=None, users_count=None, read_only=None, organization=None, creation_date=None, local_vars_configuration=None): # noqa: E501 """Group - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -145,7 +150,7 @@ def type(self, type): :type: str """ allowed_values = ["generic", "classTeachers", "classStudents"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -282,8 +287,11 @@ def __eq__(self, other): if not isinstance(other, Group): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Group): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index f8ce523..c0059c8 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class GroupDetails(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class GroupDetails(object): 'read_only': 'readOnly' } - def __init__(self, id=None, name=None, type=None, organization=None, creation_date=None, users_count=None, read_only=None): # noqa: E501 + def __init__(self, id=None, name=None, type=None, organization=None, creation_date=None, users_count=None, read_only=None, local_vars_configuration=None): # noqa: E501 """GroupDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -274,8 +279,11 @@ def __eq__(self, other): if not isinstance(other, GroupDetails): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index 32e303b..ce51edd 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class GroupType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class GroupType(object): CLASSTEACHERS = "classTeachers" CLASSSTUDENTS = "classStudents" + allowable_values = [GENERIC, CLASSTEACHERS, CLASSSTUDENTS] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class GroupType(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """GroupType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, GroupType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupType): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index 158d3c6..845178d 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class LicenseMode(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -30,6 +32,8 @@ class LicenseMode(object): CREDIT = "credit" SITE = "site" + allowable_values = [CREDIT, SITE] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -43,8 +47,11 @@ class LicenseMode(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """LicenseMode - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -84,8 +91,11 @@ def __eq__(self, other): if not isinstance(other, LicenseMode): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, LicenseMode): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index 6acd241..ef3f908 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class LicenseSources(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -34,6 +36,8 @@ class LicenseSources(object): SUBSCRIPTION = "subscription" APPSTORE = "appStore" + allowable_values = [ORDER, TRIAL, VOUCHER, DISTRIBUTOR, SUBSCRIPTION, APPSTORE] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -47,8 +51,11 @@ class LicenseSources(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """LicenseSources - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -88,8 +95,11 @@ def __eq__(self, other): if not isinstance(other, LicenseSources): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, LicenseSources): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index 1229411..301f631 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class LmsName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -36,6 +38,8 @@ class LmsName(object): SCHOOLBOX = "schoolbox" OTHER = "other" + allowable_values = [CANVAS, MOODLE, SCHOOLOGY, BLACKBOARD, DESIRE2LEARN, SAKAI, SCHOOLBOX, OTHER] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -49,8 +53,11 @@ class LmsName(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """LmsName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -90,8 +97,11 @@ def __eq__(self, other): if not isinstance(other, LmsName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, LmsName): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index 50c981e..e087a4f 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class LtiCredentials(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -55,8 +57,11 @@ class LtiCredentials(object): 'consumer_secret': 'consumerSecret' } - def __init__(self, id=None, name=None, lms=None, organization=None, creator=None, creation_date=None, last_usage=None, consumer_key=None, consumer_secret=None): # noqa: E501 + def __init__(self, id=None, name=None, lms=None, organization=None, creator=None, creation_date=None, last_usage=None, consumer_key=None, consumer_secret=None, local_vars_configuration=None): # noqa: E501 """LtiCredentials - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -330,8 +335,11 @@ def __eq__(self, other): if not isinstance(other, LtiCredentials): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, LtiCredentials): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index a31c1bd..7509ef2 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class LtiCredentialsCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class LtiCredentialsCreation(object): 'lms': 'lms' } - def __init__(self, name=None, lms=None): # noqa: E501 + def __init__(self, name=None, lms=None, local_vars_configuration=None): # noqa: E501 """LtiCredentialsCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._lms = None @@ -71,9 +76,10 @@ def name(self, name): :param name: The name of this LtiCredentialsCreation. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - if name is not None and len(name) > 300: + if (self.local_vars_configuration.client_side_validation and + name is not None and len(name) > 300): raise ValueError("Invalid value for `name`, length must be less than or equal to `300`") # noqa: E501 self._name = name @@ -96,7 +102,7 @@ def lms(self, lms): :param lms: The lms of this LtiCredentialsCreation. # noqa: E501 :type: LmsName """ - if lms is None: + if self.local_vars_configuration.client_side_validation and lms is None: # noqa: E501 raise ValueError("Invalid value for `lms`, must not be `None`") # noqa: E501 self._lms = lms @@ -138,8 +144,11 @@ def __eq__(self, other): if not isinstance(other, LtiCredentialsCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, LtiCredentialsCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index 3ffa8a4..660258e 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class MediaAttachment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -79,8 +81,11 @@ class MediaAttachment(object): 'google_drive_file_id': 'googleDriveFileId' } - def __init__(self, type=None, score=None, revision=None, worksheet=None, track=None, sharing_mode=None, lock_score_template=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None, icon_url=None, mime_type=None, google_drive_file_id=None): # noqa: E501 + def __init__(self, type=None, score=None, revision=None, worksheet=None, track=None, sharing_mode=None, lock_score_template=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None, icon_url=None, mime_type=None, google_drive_file_id=None, local_vars_configuration=None): # noqa: E501 """MediaAttachment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._type = None self._score = None @@ -169,7 +174,7 @@ def type(self, type): :type: str """ allowed_values = ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -672,8 +677,11 @@ def __eq__(self, other): if not isinstance(other, MediaAttachment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MediaAttachment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index 02e3897..0ee9289 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class MediaScoreSharingMode(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class MediaScoreSharingMode(object): COPY = "copy" PERFORMANCE = "performance" + allowable_values = [READ, WRITE, COPY, PERFORMANCE] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class MediaScoreSharingMode(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """MediaScoreSharingMode - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, MediaScoreSharingMode): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MediaScoreSharingMode): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py index 0487525..4bfd9e5 100644 --- a/flat_api/models/microsoft_graph_assignment.py +++ b/flat_api/models/microsoft_graph_assignment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class MicrosoftGraphAssignment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class MicrosoftGraphAssignment(object): 'categories': 'categories' } - def __init__(self, id=None, state=None, alternate_link=None, categories=None): # noqa: E501 + def __init__(self, id=None, state=None, alternate_link=None, categories=None, local_vars_configuration=None): # noqa: E501 """MicrosoftGraphAssignment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -192,8 +197,11 @@ def __eq__(self, other): if not isinstance(other, MicrosoftGraphAssignment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MicrosoftGraphAssignment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py index 319cbb8..67b0770 100644 --- a/flat_api/models/microsoft_graph_submission.py +++ b/flat_api/models/microsoft_graph_submission.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class MicrosoftGraphSubmission(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class MicrosoftGraphSubmission(object): 'alternate_link': 'alternateLink' } - def __init__(self, id=None, state=None, alternate_link=None): # noqa: E501 + def __init__(self, id=None, state=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 """MicrosoftGraphSubmission - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._state = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, MicrosoftGraphSubmission): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MicrosoftGraphSubmission): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index ddcb1ee..6c46dab 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationInvitation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class OrganizationInvitation(object): 'used_by': 'usedBy' } - def __init__(self, id=None, organization=None, organization_role=None, custom_code=None, email=None, invited_by=None, used_by=None): # noqa: E501 + def __init__(self, id=None, organization=None, organization_role=None, custom_code=None, email=None, invited_by=None, used_by=None, local_vars_configuration=None): # noqa: E501 """OrganizationInvitation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._organization = None @@ -274,8 +279,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationInvitation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationInvitation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index a4a2e94..15e553b 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationInvitationCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class OrganizationInvitationCreation(object): 'organization_role': 'organizationRole' } - def __init__(self, email=None, organization_role=None): # noqa: E501 + def __init__(self, email=None, organization_role=None, local_vars_configuration=None): # noqa: E501 """OrganizationInvitationCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._email = None self._organization_role = None @@ -134,8 +139,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationInvitationCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationInvitationCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index 3703892..00ac1c2 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationRoles(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class OrganizationRoles(object): TEACHER = "teacher" USER = "user" + allowable_values = [ADMIN, BILLING, TEACHER, USER] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class OrganizationRoles(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """OrganizationRoles - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationRoles): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationRoles): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py index df26fa2..3806e81 100644 --- a/flat_api/models/organization_user_access_token_creation.py +++ b/flat_api/models/organization_user_access_token_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationUserAccessTokenCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class OrganizationUserAccessTokenCreation(object): 'scopes': 'scopes' } - def __init__(self, scopes=None): # noqa: E501 + def __init__(self, scopes=None, local_vars_configuration=None): # noqa: E501 """OrganizationUserAccessTokenCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._scopes = None self.discriminator = None @@ -67,7 +72,7 @@ def scopes(self, scopes): :param scopes: The scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 :type: list[AppScopes] """ - if scopes is None: + if self.local_vars_configuration.client_side_validation and scopes is None: # noqa: E501 raise ValueError("Invalid value for `scopes`, must not be `None`") # noqa: E501 self._scopes = scopes @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationUserAccessTokenCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationUserAccessTokenCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_signin_link.py b/flat_api/models/organization_user_signin_link.py index 5c6ff53..3896db0 100644 --- a/flat_api/models/organization_user_signin_link.py +++ b/flat_api/models/organization_user_signin_link.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationUserSigninLink(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class OrganizationUserSigninLink(object): 'expiration_date': 'expirationDate' } - def __init__(self, url=None, expiration_date=None): # noqa: E501 + def __init__(self, url=None, expiration_date=None, local_vars_configuration=None): # noqa: E501 """OrganizationUserSigninLink - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._url = None self._expiration_date = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationUserSigninLink): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationUserSigninLink): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_signin_link_creation.py b/flat_api/models/organization_user_signin_link_creation.py index 7a29d20..25b953c 100644 --- a/flat_api/models/organization_user_signin_link_creation.py +++ b/flat_api/models/organization_user_signin_link_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class OrganizationUserSigninLinkCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class OrganizationUserSigninLinkCreation(object): 'destination_path': 'destinationPath' } - def __init__(self, destination_path='/'): # noqa: E501 + def __init__(self, destination_path='/', local_vars_configuration=None): # noqa: E501 """OrganizationUserSigninLinkCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._destination_path = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, OrganizationUserSigninLinkCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OrganizationUserSigninLinkCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index d787d85..f1d2136 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ResourceCollaborator(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -59,8 +61,11 @@ class ResourceCollaborator(object): 'acl_read': 'aclRead' } - def __init__(self, acl_admin=False, is_collaborator=False, group=None, acl_write=False, invited=None, user_email=None, collection=None, score=None, user=None, id=None, acl_read=False): # noqa: E501 + def __init__(self, acl_admin=False, is_collaborator=False, group=None, acl_write=False, invited=None, user_email=None, collection=None, score=None, user=None, id=None, acl_read=False, local_vars_configuration=None): # noqa: E501 """ResourceCollaborator - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._acl_admin = None self._is_collaborator = None @@ -384,8 +389,11 @@ def __eq__(self, other): if not isinstance(other, ResourceCollaborator): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ResourceCollaborator): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index 15c6f42..a2ddb10 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ResourceCollaboratorCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class ResourceCollaboratorCreation(object): 'acl_admin': 'aclAdmin' } - def __init__(self, user=None, group=None, user_email=None, user_token=None, acl_read=True, acl_write=False, acl_admin=False): # noqa: E501 + def __init__(self, user=None, group=None, user_email=None, user_token=None, acl_read=True, acl_write=False, acl_admin=False, local_vars_configuration=None): # noqa: E501 """ResourceCollaboratorCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._user = None self._group = None @@ -276,8 +281,11 @@ def __eq__(self, other): if not isinstance(other, ResourceCollaboratorCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ResourceCollaboratorCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index 9d5866e..c028194 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ResourceRights(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ResourceRights(object): 'is_collaborator': 'isCollaborator' } - def __init__(self, acl_read=False, acl_write=False, acl_admin=False, is_collaborator=False): # noqa: E501 + def __init__(self, acl_read=False, acl_write=False, acl_admin=False, is_collaborator=False, local_vars_configuration=None): # noqa: E501 """ResourceRights - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._acl_read = None self._acl_write = None @@ -192,8 +197,11 @@ def __eq__(self, other): if not isinstance(other, ResourceRights): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ResourceRights): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index e169d6d..631cd6f 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreComment(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -69,8 +71,11 @@ class ScoreComment(object): 'spam': 'spam' } - def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, moderation=None, spam=None): # noqa: E501 + def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, moderation=None, spam=None, local_vars_configuration=None): # noqa: E501 """ScoreComment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._type = None @@ -167,7 +172,7 @@ def type(self, type): :type: str """ allowed_values = ["document", "inline"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -530,8 +535,11 @@ def __eq__(self, other): if not isinstance(other, ScoreComment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index ec1d58b..23874ec 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCommentContext(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -53,8 +55,11 @@ class ScoreCommentContext(object): 'stop_dpq': 'stopDpq' } - def __init__(self, part_uuid=None, staff_idx=None, staff_uuid=None, measure_uuids=None, start_time_pos=None, stop_time_pos=None, start_dpq=None, stop_dpq=None): # noqa: E501 + def __init__(self, part_uuid=None, staff_idx=None, staff_uuid=None, measure_uuids=None, start_time_pos=None, stop_time_pos=None, start_dpq=None, stop_dpq=None, local_vars_configuration=None): # noqa: E501 """ScoreCommentContext - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._part_uuid = None self._staff_idx = None @@ -97,7 +102,7 @@ def part_uuid(self, part_uuid): :param part_uuid: The part_uuid of this ScoreCommentContext. # noqa: E501 :type: str """ - if part_uuid is None: + if self.local_vars_configuration.client_side_validation and part_uuid is None: # noqa: E501 raise ValueError("Invalid value for `part_uuid`, must not be `None`") # noqa: E501 self._part_uuid = part_uuid @@ -168,7 +173,7 @@ def measure_uuids(self, measure_uuids): :param measure_uuids: The measure_uuids of this ScoreCommentContext. # noqa: E501 :type: list[str] """ - if measure_uuids is None: + if self.local_vars_configuration.client_side_validation and measure_uuids is None: # noqa: E501 raise ValueError("Invalid value for `measure_uuids`, must not be `None`") # noqa: E501 self._measure_uuids = measure_uuids @@ -191,7 +196,7 @@ def start_time_pos(self, start_time_pos): :param start_time_pos: The start_time_pos of this ScoreCommentContext. # noqa: E501 :type: float """ - if start_time_pos is None: + if self.local_vars_configuration.client_side_validation and start_time_pos is None: # noqa: E501 raise ValueError("Invalid value for `start_time_pos`, must not be `None`") # noqa: E501 self._start_time_pos = start_time_pos @@ -214,7 +219,7 @@ def stop_time_pos(self, stop_time_pos): :param stop_time_pos: The stop_time_pos of this ScoreCommentContext. # noqa: E501 :type: float """ - if stop_time_pos is None: + if self.local_vars_configuration.client_side_validation and stop_time_pos is None: # noqa: E501 raise ValueError("Invalid value for `stop_time_pos`, must not be `None`") # noqa: E501 self._stop_time_pos = stop_time_pos @@ -237,7 +242,7 @@ def start_dpq(self, start_dpq): :param start_dpq: The start_dpq of this ScoreCommentContext. # noqa: E501 :type: float """ - if start_dpq is None: + if self.local_vars_configuration.client_side_validation and start_dpq is None: # noqa: E501 raise ValueError("Invalid value for `start_dpq`, must not be `None`") # noqa: E501 self._start_dpq = start_dpq @@ -260,7 +265,7 @@ def stop_dpq(self, stop_dpq): :param stop_dpq: The stop_dpq of this ScoreCommentContext. # noqa: E501 :type: float """ - if stop_dpq is None: + if self.local_vars_configuration.client_side_validation and stop_dpq is None: # noqa: E501 raise ValueError("Invalid value for `stop_dpq`, must not be `None`") # noqa: E501 self._stop_dpq = stop_dpq @@ -302,8 +307,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCommentContext): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCommentContext): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index b032bb3..cd91bf9 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCommentCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class ScoreCommentCreation(object): 'context': 'context' } - def __init__(self, revision=None, comment=None, raw_comment=None, mentions=None, reply_to=None, context=None): # noqa: E501 + def __init__(self, revision=None, comment=None, raw_comment=None, mentions=None, reply_to=None, context=None, local_vars_configuration=None): # noqa: E501 """ScoreCommentCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._revision = None self._comment = None @@ -115,7 +120,7 @@ def comment(self, comment): :param comment: The comment of this ScoreCommentCreation. # noqa: E501 :type: str """ - if comment is None: + if self.local_vars_configuration.client_side_validation and comment is None: # noqa: E501 raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501 self._comment = comment @@ -247,8 +252,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCommentCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCommentCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py index 4699226..bfc1e50 100644 --- a/flat_api/models/score_comment_moderation.py +++ b/flat_api/models/score_comment_moderation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCommentModeration(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ScoreCommentModeration(object): 'reason': 'reason' } - def __init__(self, hidden=None, reason=None): # noqa: E501 + def __init__(self, hidden=None, reason=None, local_vars_configuration=None): # noqa: E501 """ScoreCommentModeration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._hidden = None self._reason = None @@ -97,7 +102,7 @@ def reason(self, reason): :type: str """ allowed_values = ["spam", "inappropriate"] # noqa: E501 - if reason not in allowed_values: + if self.local_vars_configuration.client_side_validation and reason not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 .format(reason, allowed_values) @@ -142,8 +147,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCommentModeration): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCommentModeration): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index e14e6f6..9b5fafc 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCommentUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ScoreCommentUpdate(object): 'context': 'context' } - def __init__(self, revision=None, comment=None, raw_comment=None, context=None): # noqa: E501 + def __init__(self, revision=None, comment=None, raw_comment=None, context=None, local_vars_configuration=None): # noqa: E501 """ScoreCommentUpdate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._revision = None self._comment = None @@ -106,9 +111,11 @@ def comment(self, comment): :param comment: The comment of this ScoreCommentUpdate. # noqa: E501 :type: str """ - if comment is not None and len(comment) > 10000: + if (self.local_vars_configuration.client_side_validation and + comment is not None and len(comment) > 10000): raise ValueError("Invalid value for `comment`, length must be less than or equal to `10000`") # noqa: E501 - if comment is not None and len(comment) < 1: + if (self.local_vars_configuration.client_side_validation and + comment is not None and len(comment) < 1): raise ValueError("Invalid value for `comment`, length must be greater than or equal to `1`") # noqa: E501 self._comment = comment @@ -133,9 +140,11 @@ def raw_comment(self, raw_comment): :param raw_comment: The raw_comment of this ScoreCommentUpdate. # noqa: E501 :type: str """ - if raw_comment is not None and len(raw_comment) > 10000: + if (self.local_vars_configuration.client_side_validation and + raw_comment is not None and len(raw_comment) > 10000): raise ValueError("Invalid value for `raw_comment`, length must be less than or equal to `10000`") # noqa: E501 - if raw_comment is not None and len(raw_comment) < 1: + if (self.local_vars_configuration.client_side_validation and + raw_comment is not None and len(raw_comment) < 1): raise ValueError("Invalid value for `raw_comment`, length must be greater than or equal to `1`") # noqa: E501 self._raw_comment = raw_comment @@ -198,8 +207,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCommentUpdate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCommentUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index 7afafbd..fb1a4a4 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCommentsCounts(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ScoreCommentsCounts(object): 'monthly': 'monthly' } - def __init__(self, total=None, unique=None, weekly=None, monthly=None): # noqa: E501 + def __init__(self, total=None, unique=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 """ScoreCommentsCounts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total = None self._unique = None @@ -192,8 +197,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCommentsCounts): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCommentsCounts): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index ab71f21..d01b3ce 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -55,8 +57,11 @@ class ScoreCreation(object): 'google_drive_folder': 'googleDriveFolder' } - def __init__(self, data_encoding=None, title=None, privacy=None, builder_data=None, filename=None, source=None, collection=None, data=None, google_drive_folder=None): # noqa: E501 + def __init__(self, data_encoding=None, title=None, privacy=None, builder_data=None, filename=None, source=None, collection=None, data=None, google_drive_folder=None, local_vars_configuration=None): # noqa: E501 """ScoreCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._data_encoding = None self._title = None @@ -109,7 +114,7 @@ def data_encoding(self, data_encoding): :type: str """ allowed_values = ["base64"] # noqa: E501 - if data_encoding not in allowed_values: + if self.local_vars_configuration.client_side_validation and data_encoding not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 .format(data_encoding, allowed_values) @@ -332,8 +337,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py index 6e72814..fb02b7c 100644 --- a/flat_api/models/score_creation_builder_data.py +++ b/flat_api/models/score_creation_builder_data.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreationBuilderData(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,15 +43,17 @@ class ScoreCreationBuilderData(object): 'layout_data': 'layoutData' } - def __init__(self, score_data=None, layout_data=None): # noqa: E501 + def __init__(self, score_data=None, layout_data=None, local_vars_configuration=None): # noqa: E501 """ScoreCreationBuilderData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._score_data = None self._layout_data = None self.discriminator = None - if score_data is not None: - self.score_data = score_data + self.score_data = score_data if layout_data is not None: self.layout_data = layout_data @@ -71,6 +75,8 @@ def score_data(self, score_data): :param score_data: The score_data of this ScoreCreationBuilderData. # noqa: E501 :type: ScoreCreationBuilderDataScoreData """ + if self.local_vars_configuration.client_side_validation and score_data is None: # noqa: E501 + raise ValueError("Invalid value for `score_data`, must not be `None`") # noqa: E501 self._score_data = score_data @@ -132,8 +138,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreationBuilderData): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreationBuilderData): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_layout_data.py index 0457f37..82d3b4d 100644 --- a/flat_api/models/score_creation_builder_data_layout_data.py +++ b/flat_api/models/score_creation_builder_data_layout_data.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreationBuilderDataLayoutData(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -53,8 +55,11 @@ class ScoreCreationBuilderDataLayoutData(object): 'page_margin_right': 'pageMarginRight' } - def __init__(self, notes_spacing_coeff=None, length_unit='cm', page_height=None, page_width=None, page_margin_top=None, page_margin_bottom=None, page_margin_left=None, page_margin_right=None): # noqa: E501 + def __init__(self, notes_spacing_coeff=None, length_unit='cm', page_height=None, page_width=None, page_margin_top=None, page_margin_bottom=None, page_margin_left=None, page_margin_right=None, local_vars_configuration=None): # noqa: E501 """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._notes_spacing_coeff = None self._length_unit = None @@ -127,7 +132,7 @@ def length_unit(self, length_unit): :type: str """ allowed_values = ["cm", "inch"] # noqa: E501 - if length_unit not in allowed_values: + if self.local_vars_configuration.client_side_validation and length_unit not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `length_unit` ({0}), must be one of {1}" # noqa: E501 .format(length_unit, allowed_values) @@ -310,8 +315,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreationBuilderDataLayoutData): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreationBuilderDataLayoutData): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_score_data.py index 959a898..fd9bebb 100644 --- a/flat_api/models/score_creation_builder_data_score_data.py +++ b/flat_api/models/score_creation_builder_data_score_data.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreationBuilderDataScoreData(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class ScoreCreationBuilderDataScoreData(object): 'instruments': 'instruments' } - def __init__(self, use_tab_staff=None, use_chord_grid=None, fifths=None, nb_beats=None, beat_type=None, instruments=None): # noqa: E501 + def __init__(self, use_tab_staff=None, use_chord_grid=None, fifths=None, nb_beats=None, beat_type=None, instruments=None, local_vars_configuration=None): # noqa: E501 """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._use_tab_staff = None self._use_chord_grid = None @@ -70,8 +75,7 @@ def __init__(self, use_tab_staff=None, use_chord_grid=None, fifths=None, nb_beat self.nb_beats = nb_beats if beat_type is not None: self.beat_type = beat_type - if instruments is not None: - self.instruments = instruments + self.instruments = instruments @property def use_tab_staff(self): @@ -208,6 +212,8 @@ def instruments(self, instruments): :param instruments: The instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 :type: list[ScoreCreationBuilderDataScoreDataInstruments] """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 self._instruments = instruments @@ -248,8 +254,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreationBuilderDataScoreData): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreationBuilderDataScoreData): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_score_data_instruments.py b/flat_api/models/score_creation_builder_data_score_data_instruments.py index f57976b..a105a6a 100644 --- a/flat_api/models/score_creation_builder_data_score_data_instruments.py +++ b/flat_api/models/score_creation_builder_data_score_data_instruments.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreationBuilderDataScoreDataInstruments(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ScoreCreationBuilderDataScoreDataInstruments(object): 'short_name': 'shortName' } - def __init__(self, group=None, instrument=None, long_name=None, short_name=None): # noqa: E501 + def __init__(self, group=None, instrument=None, long_name=None, short_name=None, local_vars_configuration=None): # noqa: E501 """ScoreCreationBuilderDataScoreDataInstruments - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._group = None self._instrument = None @@ -54,10 +59,8 @@ def __init__(self, group=None, instrument=None, long_name=None, short_name=None) self._short_name = None self.discriminator = None - if group is not None: - self.group = group - if instrument is not None: - self.instrument = instrument + self.group = group + self.instrument = instrument if long_name is not None: self.long_name = long_name if short_name is not None: @@ -83,6 +86,8 @@ def group(self, group): :param group: The group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and group is None: # noqa: E501 + raise ValueError("Invalid value for `group`, must not be `None`") # noqa: E501 self._group = group @@ -106,6 +111,8 @@ def instrument(self, instrument): :param instrument: The instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 :type: str """ + if self.local_vars_configuration.client_side_validation and instrument is None: # noqa: E501 + raise ValueError("Invalid value for `instrument`, must not be `None`") # noqa: E501 self._instrument = instrument @@ -192,8 +199,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreationBuilderDataScoreDataInstruments): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreationBuilderDataScoreDataInstruments): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index 98f16cc..04a1652 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreCreationType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class ScoreCreationType(object): ARRANGEMENT = "arrangement" OTHER = "other" + allowable_values = [ORIGINAL, ARRANGEMENT, OTHER] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class ScoreCreationType(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ScoreCreationType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, ScoreCreationType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreCreationType): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index 336760d..72341b4 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreDetails(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -103,8 +105,11 @@ class ScoreDetails(object): 'likes': 'likes' } - def __init__(self, subtitle=None, instruments=None, lyricist=None, publication_date=None, composer=None, license_text=None, modification_date=None, id=None, plays=None, title=None, creation_type=None, comments=None, collections=None, samples=None, number_measures=None, google_drive_file_id=None, description=None, views=None, html_url=None, duration_time=None, user=None, main_tempo_qpm=None, creation_date=None, parent_score=None, tags=None, collaborators=None, sharing_key=None, license=None, rights=None, privacy=None, arranger=None, organization=None, likes=None): # noqa: E501 + def __init__(self, subtitle=None, instruments=None, lyricist=None, publication_date=None, composer=None, license_text=None, modification_date=None, id=None, plays=None, title=None, creation_type=None, comments=None, collections=None, samples=None, number_measures=None, google_drive_file_id=None, description=None, views=None, html_url=None, duration_time=None, user=None, main_tempo_qpm=None, creation_date=None, parent_score=None, tags=None, collaborators=None, sharing_key=None, license=None, rights=None, privacy=None, arranger=None, organization=None, likes=None, local_vars_configuration=None): # noqa: E501 """ScoreDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._subtitle = None self._instruments = None @@ -986,8 +991,11 @@ def __eq__(self, other): if not isinstance(other, ScoreDetails): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index 9e7aafc..c49a358 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreFork(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ScoreFork(object): 'collection': 'collection' } - def __init__(self, collection='root'): # noqa: E501 + def __init__(self, collection='root', local_vars_configuration=None): # noqa: E501 """ScoreFork - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._collection = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, ScoreFork): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreFork): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index 4dcc4bb..c241b9d 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreLicense(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -36,6 +38,8 @@ class ScoreLicense(object): CC_BY_NC_SA = "cc-by-nc-sa" CC_BY_NC_ND = "cc-by-nc-nd" + allowable_values = [COPYRIGHT, CC0, CC_BY, CC_BY_SA, CC_BY_ND, CC_BY_NC, CC_BY_NC_SA, CC_BY_NC_ND] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -49,8 +53,11 @@ class ScoreLicense(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ScoreLicense - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -90,8 +97,11 @@ def __eq__(self, other): if not isinstance(other, ScoreLicense): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreLicense): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index e02bc24..a6326d5 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreLikesCounts(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ScoreLikesCounts(object): 'monthly': 'monthly' } - def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 + def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 """ScoreLikesCounts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total = None self._weekly = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, ScoreLikesCounts): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreLikesCounts): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 760a253..cb29f8e 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreModification(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -61,8 +63,11 @@ class ScoreModification(object): 'license_text': 'licenseText' } - def __init__(self, title=None, subtitle=None, composer=None, lyricist=None, arranger=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None, license_text=None): # noqa: E501 + def __init__(self, title=None, subtitle=None, composer=None, lyricist=None, arranger=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None, license_text=None, local_vars_configuration=None): # noqa: E501 """ScoreModification - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._subtitle = None @@ -259,8 +264,9 @@ def sharing_key(self, sharing_key): :param sharing_key: The sharing_key of this ScoreModification. # noqa: E501 :type: str """ - if sharing_key is not None and not re.search('^[a-f0-9]{128}$', sharing_key): # noqa: E501 - raise ValueError("Invalid value for `sharing_key`, must be a follow pattern or equal to `/^[a-f0-9]{128}$/`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + sharing_key is not None and not re.search(r'^[a-f0-9]{128}$', sharing_key)): # noqa: E501 + raise ValueError(r"Invalid value for `sharing_key`, must be a follow pattern or equal to `/^[a-f0-9]{128}$/`") # noqa: E501 self._sharing_key = sharing_key @@ -284,7 +290,8 @@ def description(self, description): :param description: The description of this ScoreModification. # noqa: E501 :type: str """ - if description is not None and len(description) > 2000: + if (self.local_vars_configuration.client_side_validation and + description is not None and len(description) > 2000): raise ValueError("Invalid value for `description`, length must be less than or equal to `2000`") # noqa: E501 self._description = description @@ -414,8 +421,11 @@ def __eq__(self, other): if not isinstance(other, ScoreModification): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreModification): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py index 19414d8..19d3de3 100644 --- a/flat_api/models/score_plays_counts.py +++ b/flat_api/models/score_plays_counts.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScorePlaysCounts(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ScorePlaysCounts(object): 'monthly': 'monthly' } - def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 + def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 """ScorePlaysCounts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total = None self._weekly = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, ScorePlaysCounts): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScorePlaysCounts): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index c94cbde..82dd903 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScorePrivacy(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class ScorePrivacy(object): ORGANIZATIONPUBLIC = "organizationPublic" PRIVATELINK = "privateLink" + allowable_values = [PUBLIC, PRIVATE, ORGANIZATIONPUBLIC, PRIVATELINK] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class ScorePrivacy(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ScorePrivacy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, ScorePrivacy): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScorePrivacy): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index a170563..3bae357 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreRevision(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -53,8 +55,11 @@ class ScoreRevision(object): 'statistics': 'statistics' } - def __init__(self, id=None, user=None, collaborators=None, creation_date=None, event=None, description=None, autosave=None, statistics=None): # noqa: E501 + def __init__(self, id=None, user=None, collaborators=None, creation_date=None, event=None, description=None, autosave=None, statistics=None, local_vars_configuration=None): # noqa: E501 """ScoreRevision - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._user = None @@ -300,8 +305,11 @@ def __eq__(self, other): if not isinstance(other, ScoreRevision): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreRevision): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index bcc7fc8..c99489c 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreRevisionCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ScoreRevisionCreation(object): 'description': 'description' } - def __init__(self, data=None, data_encoding=None, autosave=None, description=None): # noqa: E501 + def __init__(self, data=None, data_encoding=None, autosave=None, description=None, local_vars_configuration=None): # noqa: E501 """ScoreRevisionCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._data = None self._data_encoding = None @@ -82,7 +87,7 @@ def data(self, data): :param data: The data of this ScoreRevisionCreation. # noqa: E501 :type: str """ - if data is None: + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 self._data = data @@ -108,7 +113,7 @@ def data_encoding(self, data_encoding): :type: str """ allowed_values = ["base64"] # noqa: E501 - if data_encoding not in allowed_values: + if self.local_vars_configuration.client_side_validation and data_encoding not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 .format(data_encoding, allowed_values) @@ -199,8 +204,11 @@ def __eq__(self, other): if not isinstance(other, ScoreRevisionCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreRevisionCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index 6dcf15a..9825728 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreRevisionStatistics(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ScoreRevisionStatistics(object): 'deletions': 'deletions' } - def __init__(self, additions=None, deletions=None): # noqa: E501 + def __init__(self, additions=None, deletions=None, local_vars_configuration=None): # noqa: E501 """ScoreRevisionStatistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additions = None self._deletions = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, ScoreRevisionStatistics): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreRevisionStatistics): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index 4c1518c..2b4c152 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreSource(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ScoreSource(object): 'google_drive': 'googleDrive' } - def __init__(self, google_drive=None): # noqa: E501 + def __init__(self, google_drive=None, local_vars_configuration=None): # noqa: E501 """ScoreSource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._google_drive = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, ScoreSource): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreSource): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index 9a13f2d..ca6f0d4 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrack(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -61,8 +63,11 @@ class ScoreTrack(object): 'synchronization_points': 'synchronizationPoints' } - def __init__(self, id=None, title=None, score=None, creator=None, creation_date=None, modification_date=None, default=None, state=None, type=None, url=None, media_id=None, synchronization_points=None): # noqa: E501 + def __init__(self, id=None, title=None, score=None, creator=None, creation_date=None, modification_date=None, default=None, state=None, type=None, url=None, media_id=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 """ScoreTrack - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._title = None @@ -410,8 +415,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrack): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrack): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index ad3eaeb..ac91572 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrackCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,8 +49,11 @@ class ScoreTrackCreation(object): 'synchronization_points': 'synchronizationPoints' } - def __init__(self, title=None, default=None, state=None, url=None, synchronization_points=None): # noqa: E501 + def __init__(self, title=None, default=None, state=None, url=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 """ScoreTrackCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._default = None @@ -216,8 +221,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrackCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrackCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index b0c31b5..66a0d51 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrackPoint(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ScoreTrackPoint(object): 'time': 'time' } - def __init__(self, type=None, measure_uuid=None, time=None): # noqa: E501 + def __init__(self, type=None, measure_uuid=None, time=None, local_vars_configuration=None): # noqa: E501 """ScoreTrackPoint - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._type = None self._measure_uuid = None @@ -76,10 +81,10 @@ def type(self, type): :param type: The type of this ScoreTrackPoint. # noqa: E501 :type: str """ - if type is None: + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 allowed_values = ["measure", "end"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -130,7 +135,7 @@ def time(self, time): :param time: The time of this ScoreTrackPoint. # noqa: E501 :type: float """ - if time is None: + if self.local_vars_configuration.client_side_validation and time is None: # noqa: E501 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 self._time = time @@ -172,8 +177,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrackPoint): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrackPoint): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index 6c6408a..5faede1 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrackState(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class ScoreTrackState(object): COMPLETED = "completed" DELETED = "deleted" + allowable_values = [DRAFT, COMPLETED, DELETED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class ScoreTrackState(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ScoreTrackState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrackState): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrackState): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index 4b70cb2..d8d62a1 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrackType(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class ScoreTrackType(object): YOUTUBE = "youtube" VIMEO = "vimeo" + allowable_values = [AUDIO, SOUNDCLOUD, YOUTUBE, VIMEO] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class ScoreTrackType(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ScoreTrackType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrackType): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrackType): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index 8e9e426..9601007 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreTrackUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ScoreTrackUpdate(object): 'synchronization_points': 'synchronizationPoints' } - def __init__(self, title=None, default=None, state=None, synchronization_points=None): # noqa: E501 + def __init__(self, title=None, default=None, state=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 """ScoreTrackUpdate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._default = None @@ -188,8 +193,11 @@ def __eq__(self, other): if not isinstance(other, ScoreTrackUpdate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreTrackUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index 3818932..81397f7 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class ScoreViewsCounts(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ScoreViewsCounts(object): 'monthly': 'monthly' } - def __init__(self, total=None, weekly=None, monthly=None): # noqa: E501 + def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 """ScoreViewsCounts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total = None self._weekly = None @@ -164,8 +169,11 @@ def __eq__(self, other): if not isinstance(other, ScoreViewsCounts): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ScoreViewsCounts): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task.py b/flat_api/models/task.py index 5d6b06d..0eda386 100644 --- a/flat_api/models/task.py +++ b/flat_api/models/task.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class Task(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class Task(object): 'done_date': 'doneDate' } - def __init__(self, id=None, type=None, state=None, progress=None, creation_date=None, modification_date=None, done_date=None): # noqa: E501 + def __init__(self, id=None, type=None, state=None, progress=None, creation_date=None, modification_date=None, done_date=None, local_vars_configuration=None): # noqa: E501 """Task - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._type = None @@ -122,7 +127,7 @@ def type(self, type): :type: str """ allowed_values = ["audio-export", "audio-low-prio"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -151,7 +156,7 @@ def state(self, state): :type: str """ allowed_values = ["created", "doing", "done", "canceled", "error"] # noqa: E501 - if state not in allowed_values: + if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 .format(state, allowed_values) @@ -286,8 +291,11 @@ def __eq__(self, other): if not isinstance(other, Task): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Task): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py index 179dbb5..64176ce 100644 --- a/flat_api/models/task_export_options.py +++ b/flat_api/models/task_export_options.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class TaskExportOptions(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class TaskExportOptions(object): 'parts': 'parts' } - def __init__(self, parts=None): # noqa: E501 + def __init__(self, parts=None, local_vars_configuration=None): # noqa: E501 """TaskExportOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._parts = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, TaskExportOptions): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TaskExportOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py index 058b043..dc613f3 100644 --- a/flat_api/models/task_progress.py +++ b/flat_api/models/task_progress.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class TaskProgress(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class TaskProgress(object): 'text': 'text' } - def __init__(self, percent=None, text=None): # noqa: E501 + def __init__(self, percent=None, text=None, local_vars_configuration=None): # noqa: E501 """TaskProgress - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._percent = None self._text = None @@ -136,8 +141,11 @@ def __eq__(self, other): if not isinstance(other, TaskProgress): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TaskProgress): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index ee74724..d6e8440 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserAdminUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class UserAdminUpdate(object): 'email': 'email' } - def __init__(self, password=None, organization_role=None, username=None, firstname=None, lastname=None, email=None): # noqa: E501 + def __init__(self, password=None, organization_role=None, username=None, firstname=None, lastname=None, email=None, local_vars_configuration=None): # noqa: E501 """UserAdminUpdate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._password = None self._organization_role = None @@ -93,9 +98,11 @@ def password(self, password): :param password: The password of this UserAdminUpdate. # noqa: E501 :type: str """ - if password is not None and len(password) > 1000: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 1000): raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 - if password is not None and len(password) < 6: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 6): raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 self._password = password @@ -141,12 +148,15 @@ def username(self, username): :param username: The username of this UserAdminUpdate. # noqa: E501 :type: str """ - if username is not None and len(username) > 30: + if (self.local_vars_configuration.client_side_validation and + username is not None and len(username) > 30): raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 - if username is not None and len(username) < 1: + if (self.local_vars_configuration.client_side_validation and + username is not None and len(username) < 1): raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 - if username is not None and not re.search('^[A-Za-z0-9\\-_.]+$', username): # noqa: E501 - raise ValueError("Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\\-_.]+$/`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + username is not None and not re.search(r'^[A-Za-z0-9\-_.]+$', username)): # noqa: E501 + raise ValueError(r"Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\-_.]+$/`") # noqa: E501 self._username = username @@ -170,7 +180,8 @@ def firstname(self, firstname): :param firstname: The firstname of this UserAdminUpdate. # noqa: E501 :type: str """ - if firstname is not None and len(firstname) > 60: + if (self.local_vars_configuration.client_side_validation and + firstname is not None and len(firstname) > 60): raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 self._firstname = firstname @@ -195,7 +206,8 @@ def lastname(self, lastname): :param lastname: The lastname of this UserAdminUpdate. # noqa: E501 :type: str """ - if lastname is not None and len(lastname) > 60: + if (self.local_vars_configuration.client_side_validation and + lastname is not None and len(lastname) > 60): raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 self._lastname = lastname @@ -260,8 +272,11 @@ def __eq__(self, other): if not isinstance(other, UserAdminUpdate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserAdminUpdate): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index 3bc5085..31845c5 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserCreation(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class UserCreation(object): 'role': 'role' } - def __init__(self, username=None, firstname=None, lastname=None, email=None, password=None, locale=None, role='user'): # noqa: E501 + def __init__(self, username=None, firstname=None, lastname=None, email=None, password=None, locale=None, role='user', local_vars_configuration=None): # noqa: E501 """UserCreation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._username = None self._firstname = None @@ -96,14 +101,17 @@ def username(self, username): :param username: The username of this UserCreation. # noqa: E501 :type: str """ - if username is None: + if self.local_vars_configuration.client_side_validation and username is None: # noqa: E501 raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - if username is not None and len(username) > 30: + if (self.local_vars_configuration.client_side_validation and + username is not None and len(username) > 30): raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 - if username is not None and len(username) < 1: + if (self.local_vars_configuration.client_side_validation and + username is not None and len(username) < 1): raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 - if username is not None and not re.search('^[A-Za-z0-9\\-_.]+$', username): # noqa: E501 - raise ValueError("Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\\-_.]+$/`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + username is not None and not re.search(r'^[A-Za-z0-9\-_.]+$', username)): # noqa: E501 + raise ValueError(r"Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\-_.]+$/`") # noqa: E501 self._username = username @@ -127,7 +135,8 @@ def firstname(self, firstname): :param firstname: The firstname of this UserCreation. # noqa: E501 :type: str """ - if firstname is not None and len(firstname) > 60: + if (self.local_vars_configuration.client_side_validation and + firstname is not None and len(firstname) > 60): raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 self._firstname = firstname @@ -152,7 +161,8 @@ def lastname(self, lastname): :param lastname: The lastname of this UserCreation. # noqa: E501 :type: str """ - if lastname is not None and len(lastname) > 60: + if (self.local_vars_configuration.client_side_validation and + lastname is not None and len(lastname) > 60): raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 self._lastname = lastname @@ -200,11 +210,13 @@ def password(self, password): :param password: The password of this UserCreation. # noqa: E501 :type: str """ - if password is None: + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if password is not None and len(password) > 1000: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) > 1000): raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 - if password is not None and len(password) < 6: + if (self.local_vars_configuration.client_side_validation and + password is not None and len(password) < 6): raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 self._password = password @@ -251,7 +263,7 @@ def role(self, role): :type: str """ allowed_values = ["user", "teacher", "admin"] # noqa: E501 - if role not in allowed_values: + if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 .format(role, allowed_values) @@ -296,8 +308,11 @@ def __eq__(self, other): if not isinstance(other, UserCreation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserCreation): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index 4d99438..b30f7b1 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserDetails(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -91,8 +93,11 @@ class UserDetails(object): 'registration_date': 'registrationDate' } - def __init__(self, username=None, class_role=None, private_profile=None, followers_count=None, firstname=None, is_power_user=None, locale=None, instruments=None, html_url=None, liked_scores_count=None, printable_name=None, bio=None, picture_file=None, id=None, cover_picture_file=None, picture=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, lastname=None, following_count=None, organization=None, type=None, registration_date=None): # noqa: E501 + def __init__(self, username=None, class_role=None, private_profile=None, followers_count=None, firstname=None, is_power_user=None, locale=None, instruments=None, html_url=None, liked_scores_count=None, printable_name=None, bio=None, picture_file=None, id=None, cover_picture_file=None, picture=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, lastname=None, following_count=None, organization=None, type=None, registration_date=None, local_vars_configuration=None): # noqa: E501 """UserDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._username = None self._class_role = None @@ -765,7 +770,7 @@ def type(self, type): :type: str """ allowed_values = ["user", "guest"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -833,8 +838,11 @@ def __eq__(self, other): if not isinstance(other, UserDetails): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index ab6cff2..7c2f23f 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserDetailsAdmin(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -71,8 +73,11 @@ class UserDetailsAdmin(object): 'id': 'id' } - def __init__(self, username=None, picture=None, license=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, last_activity_date=None, html_url=None, email=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None): # noqa: E501 + def __init__(self, username=None, picture=None, license=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, last_activity_date=None, html_url=None, email=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None, local_vars_configuration=None): # noqa: E501 """UserDetailsAdmin - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._username = None self._picture = None @@ -487,7 +492,7 @@ def type(self, type): :type: str """ allowed_values = ["user", "guest"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -555,8 +560,11 @@ def __eq__(self, other): if not isinstance(other, UserDetailsAdmin): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserDetailsAdmin): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py index ee05d77..b694e25 100644 --- a/flat_api/models/user_details_admin_license.py +++ b/flat_api/models/user_details_admin_license.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserDetailsAdminLicense(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,8 +49,11 @@ class UserDetailsAdminLicense(object): 'active': 'active' } - def __init__(self, id=None, expiration_date=None, source=None, mode=None, active=None): # noqa: E501 + def __init__(self, id=None, expiration_date=None, source=None, mode=None, active=None, local_vars_configuration=None): # noqa: E501 """UserDetailsAdminLicense - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._expiration_date = None @@ -216,8 +221,11 @@ def __eq__(self, other): if not isinstance(other, UserDetailsAdminLicense): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserDetailsAdminLicense): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index e260a41..169f901 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserPublic(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,8 +85,11 @@ class UserPublic(object): 'registration_date': 'registrationDate' } - def __init__(self, username=None, picture=None, followers_count=None, firstname=None, is_power_user=None, lastname=None, html_url=None, following_count=None, liked_scores_count=None, printable_name=None, bio=None, id=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, instruments=None, class_role=None, organization=None, type=None, registration_date=None): # noqa: E501 + def __init__(self, username=None, picture=None, followers_count=None, firstname=None, is_power_user=None, lastname=None, html_url=None, following_count=None, liked_scores_count=None, printable_name=None, bio=None, id=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, instruments=None, class_role=None, organization=None, type=None, registration_date=None, local_vars_configuration=None): # noqa: E501 """UserPublic - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._username = None self._picture = None @@ -657,7 +662,7 @@ def type(self, type): :type: str """ allowed_values = ["user", "guest"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -725,8 +730,11 @@ def __eq__(self, other): if not isinstance(other, UserPublic): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserPublic): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index ec75acd..d60bfd7 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -16,6 +16,8 @@ import six +from flat_api.configuration import Configuration + class UserPublicSummary(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -65,8 +67,11 @@ class UserPublicSummary(object): 'id': 'id' } - def __init__(self, username=None, picture=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, html_url=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None): # noqa: E501 + def __init__(self, username=None, picture=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, html_url=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None, local_vars_configuration=None): # noqa: E501 """UserPublicSummary - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._username = None self._picture = None @@ -405,7 +410,7 @@ def type(self, type): :type: str """ allowed_values = ["user", "guest"] # noqa: E501 - if type not in allowed_values: + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -473,8 +478,11 @@ def __eq__(self, other): if not isinstance(other, UserPublicSummary): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, UserPublicSummary): + return True + + return self.to_dict() != other.to_dict() diff --git a/flat_api/rest.py b/flat_api/rest.py index fd126e7..4b1ed92 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -5,7 +5,7 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.17.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ @@ -23,11 +23,9 @@ # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode +import urllib3 -try: - import urllib3 -except ImportError: - raise ImportError('OpenAPI Python client requires urllib3.') +from flat_api.exceptions import ApiException, ApiValueError logger = logging.getLogger(__name__) @@ -76,6 +74,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize @@ -92,6 +93,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, **addition_pool_args ) else: @@ -131,7 +133,7 @@ def request(self, method, url, query_params=None, headers=None, 'PATCH', 'OPTIONS'] if post_params and body: - raise ValueError( + raise ApiValueError( "body parameter cannot be used with post_params parameter." ) @@ -188,7 +190,7 @@ def request(self, method, url, query_params=None, headers=None, # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form - elif isinstance(body, str): + elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( method, url, @@ -216,11 +218,6 @@ def request(self, method, url, query_params=None, headers=None, if _preload_content: r = RESTResponse(r) - # In the python 3, the response.data is bytes. - # we need to decode it to string. - if six.PY3: - r.data = r.data.decode('utf8') - # log response body logger.debug("response body: %s", r.data) @@ -293,31 +290,3 @@ def PATCH(self, url, headers=None, query_params=None, post_params=None, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/requirements.txt b/requirements.txt index bafdc07..eb358ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 diff --git a/test-requirements.txt b/test-requirements.txt index 2702246..4ed3991 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,3 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 +pytest~=4.6.7 # needed for python 2.7+3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/tox.ini b/tox.ini index 3d0be61..e3381c4 100644 --- a/tox.ini +++ b/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=flat_api From 9ce5226581b86a0da38c1fc582effeb0b720635c Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 13:55:42 +0200 Subject: [PATCH 13/46] feat: update for API v2.18 --- .github/workflows/python-package.yml | 2 +- .gitlab-ci.yml | 24 + .openapi-generator/FILES | 488 +- .openapi-generator/VERSION | 2 +- README.md | 495 +- docs/AccountApi.md | 83 - docs/ApiAccessToken.md | 16 - docs/AppScopes.md | 10 - docs/Assignment.md | 29 - docs/AssignmentCanvas.md | 12 - docs/AssignmentCopy.md | 13 - docs/AssignmentCreation.md | 27 - docs/AssignmentCreationGoogleClassroom.md | 11 - docs/AssignmentCreationMicrosoftGraph.md | 11 - docs/AssignmentLti.md | 11 - docs/AssignmentMfc.md | 12 - docs/AssignmentSubmission.md | 26 - docs/AssignmentSubmissionComment.md | 17 - docs/AssignmentSubmissionCommentCreation.md | 11 - docs/AssignmentSubmissionHistory.md | 17 - docs/AssignmentSubmissionHistoryAttachment.md | 11 - docs/AssignmentSubmissionState.md | 10 - docs/AssignmentSubmissionUpdate.md | 17 - docs/AssignmentSubmissionUpdateComments.md | 11 - docs/AssignmentType.md | 10 - docs/ClassApi.md | 2322 ------- docs/ClassAttachmentCreation.md | 17 - docs/ClassCreation.md | 12 - docs/ClassDetails.md | 31 - docs/ClassDetailsCanvas.md | 12 - docs/ClassDetailsClever.md | 17 - docs/ClassDetailsGoogleClassroom.md | 12 - docs/ClassDetailsGoogleDrive.md | 12 - docs/ClassDetailsIssues.md | 11 - docs/ClassDetailsIssuesSync.md | 13 - docs/ClassDetailsLti.md | 13 - docs/ClassDetailsMfc.md | 12 - docs/ClassDetailsMicrosoftGraph.md | 10 - docs/ClassRoles.md | 10 - docs/ClassState.md | 10 - docs/ClassUpdate.md | 12 - docs/Collection.md | 23 - docs/CollectionApi.md | 723 --- docs/CollectionApp.md | 13 - docs/CollectionCapabilities.md | 15 - docs/CollectionCreation.md | 11 - docs/CollectionModification.md | 12 - docs/CollectionPrivacy.md | 10 - docs/CollectionType.md | 10 - docs/FlatErrorResponse.md | 14 - docs/FlatLocales.md | 10 - docs/GoogleClassroomCoursework.md | 14 - docs/GoogleClassroomSubmission.md | 13 - docs/Group.md | 17 - docs/GroupApi.md | 233 - docs/GroupDetails.md | 17 - docs/GroupType.md | 10 - docs/LicenseMode.md | 10 - docs/LicenseSources.md | 10 - docs/LmsName.md | 10 - docs/LtiCredentials.md | 19 - docs/LtiCredentialsCreation.md | 12 - docs/MediaAttachment.md | 31 - docs/MediaScoreSharingMode.md | 10 - docs/MicrosoftGraphAssignment.md | 14 - docs/MicrosoftGraphSubmission.md | 13 - docs/OrganizationApi.md | 1002 --- docs/OrganizationInvitation.md | 17 - docs/OrganizationInvitationCreation.md | 12 - docs/OrganizationRoles.md | 10 - docs/OrganizationUserAccessTokenCreation.md | 11 - docs/OrganizationUserSigninLink.md | 11 - docs/OrganizationUserSigninLinkCreation.md | 10 - docs/ResourceCollaborator.md | 20 - docs/ResourceCollaboratorCreation.md | 17 - docs/ResourceRights.md | 14 - docs/ScoreApi.md | 2401 ------- docs/ScoreComment.md | 26 - docs/ScoreCommentContext.md | 18 - docs/ScoreCommentCreation.md | 16 - docs/ScoreCommentModeration.md | 12 - docs/ScoreCommentUpdate.md | 14 - docs/ScoreCommentsCounts.md | 14 - docs/ScoreCreation.md | 18 - docs/ScoreCreationBuilderData.md | 11 - docs/ScoreCreationBuilderDataLayoutData.md | 18 - docs/ScoreCreationBuilderDataScoreData.md | 15 - ...CreationBuilderDataScoreDataInstruments.md | 13 - docs/ScoreCreationType.md | 10 - docs/ScoreDetails.md | 42 - docs/ScoreFork.md | 11 - docs/ScoreLicense.md | 10 - docs/ScoreLikesCounts.md | 13 - docs/ScoreModification.md | 22 - docs/ScorePlaysCounts.md | 13 - docs/ScorePrivacy.md | 10 - docs/ScoreRevision.md | 18 - docs/ScoreRevisionCreation.md | 14 - docs/ScoreRevisionStatistics.md | 12 - docs/ScoreSource.md | 10 - docs/ScoreTrack.md | 22 - docs/ScoreTrackCreation.md | 15 - docs/ScoreTrackPoint.md | 13 - docs/ScoreTrackState.md | 10 - docs/ScoreTrackType.md | 10 - docs/ScoreTrackUpdate.md | 14 - docs/ScoreViewsCounts.md | 13 - docs/Task.md | 17 - docs/TaskApi.md | 83 - docs/TaskExportOptions.md | 11 - docs/TaskProgress.md | 12 - docs/UserAdminUpdate.md | 16 - docs/UserApi.md | 235 - docs/UserCreation.md | 17 - docs/UserDetails.md | 36 - docs/UserDetailsAdmin.md | 26 - docs/UserDetailsAdminLicense.md | 15 - docs/UserPublic.md | 32 - docs/UserPublicSummary.md | 23 - docs/apis/tags/AccountApi.md | 125 + docs/apis/tags/CollectionApi.md | 1498 +++++ docs/apis/tags/EduResourcesApi.md | 1397 ++++ docs/apis/tags/GroupApi.md | 436 ++ docs/apis/tags/ModelClassApi.md | 4122 ++++++++++++ docs/apis/tags/OrganizationApi.md | 1826 ++++++ docs/apis/tags/ScoreApi.md | 5655 +++++++++++++++++ docs/apis/tags/TaskApi.md | 124 + docs/apis/tags/UserApi.md | 438 ++ docs/models/ApiAccessToken.md | 36 + docs/models/AppScopes.md | 11 + docs/models/Assignment.md | 77 + docs/models/AssignmentCopy.md | 18 + docs/models/AssignmentCopyResponse.md | 76 + docs/models/AssignmentSubmission.md | 58 + docs/models/AssignmentSubmissionComment.md | 23 + .../AssignmentSubmissionCommentCreation.md | 17 + docs/models/AssignmentSubmissionHistory.md | 55 + .../AssignmentSubmissionHistoryState.md | 11 + docs/models/AssignmentSubmissionState.md | 11 + docs/models/AssignmentSubmissionUpdate.md | 63 + docs/models/AssignmentType.md | 11 + docs/models/AssignmentUpdate.md | 39 + docs/models/ClassAssignment.md | 163 + docs/models/ClassAssignmentUpdate.md | 102 + docs/models/ClassAttachmentCreation.md | 23 + docs/models/ClassCreation.md | 21 + docs/models/ClassDetails.md | 201 + docs/models/ClassGradeLevel.md | 11 + docs/models/ClassRoles.md | 11 + docs/models/ClassState.md | 11 + docs/models/ClassUpdate.md | 21 + docs/models/Collection.md | 76 + docs/models/CollectionApp.md | 19 + docs/models/CollectionCreation.md | 16 + docs/models/CollectionModification.md | 18 + docs/models/CollectionPrivacy.md | 11 + docs/models/CollectionType.md | 11 + docs/models/EduLibrary.md | 20 + docs/models/EduResource.md | 131 + docs/models/EduResourceCopy.md | 17 + docs/models/EduResourceCreation.md | 19 + docs/models/EduResourceMove.md | 17 + docs/models/EduResourcePrivacy.md | 11 + docs/models/EduResourceType.md | 11 + docs/models/EduResourceUpdate.md | 17 + docs/models/EduResourceUseInClass.md | 18 + docs/models/EduSkillsFocused.md | 16 + docs/models/FlatErrorResponse.md | 20 + docs/models/FlatLocales.md | 11 + docs/models/GoogleClassroomCoursework.md | 20 + docs/models/GoogleClassroomSubmission.md | 19 + docs/models/Group.md | 23 + docs/models/GroupDetails.md | 23 + docs/models/GroupType.md | 11 + docs/models/LicenseMode.md | 11 + docs/models/LicenseSources.md | 11 + docs/models/LmsName.md | 11 + docs/models/LtiCredentials.md | 25 + docs/models/LtiCredentialsCreation.md | 18 + docs/models/MediaAttachment.md | 38 + docs/models/MediaScoreSharingMode.md | 11 + docs/models/MicrosoftGraphAssignment.md | 34 + docs/models/MicrosoftGraphSubmission.md | 19 + docs/models/OrganizationInvitation.md | 23 + docs/models/OrganizationInvitationCreation.md | 18 + docs/models/OrganizationRoles.md | 11 + .../OrganizationUserAccessTokenCreation.md | 31 + docs/models/ResourceCollaborator.md | 25 + docs/models/ResourceCollaboratorCreation.md | 23 + docs/models/ResourceRights.md | 20 + docs/models/ScoreComment.md | 62 + docs/models/ScoreCommentContext.md | 38 + docs/models/ScoreCommentCreation.md | 36 + docs/models/ScoreCommentUpdate.md | 20 + docs/models/ScoreCommentsCounts.md | 20 + docs/models/ScoreCreation.md | 108 + docs/models/ScoreCreationType.md | 11 + docs/models/ScoreDetails.md | 117 + docs/models/ScoreFork.md | 18 + docs/models/ScoreLicense.md | 11 + docs/models/ScoreLikesCounts.md | 19 + docs/models/ScoreModification.md | 42 + docs/models/ScorePlaysCounts.md | 19 + docs/models/ScorePrivacy.md | 11 + docs/models/ScoreRevision.md | 36 + docs/models/ScoreRevisionCreation.md | 20 + docs/models/ScoreRevisionStatistics.md | 20 + docs/models/ScoreSource.md | 15 + docs/models/ScoreTrack.md | 40 + docs/models/ScoreTrackCreation.md | 33 + docs/models/ScoreTrackPoint.md | 19 + docs/models/ScoreTrackState.md | 11 + docs/models/ScoreTrackType.md | 11 + docs/models/ScoreTrackUpdate.md | 32 + docs/models/ScoreViewsCounts.md | 19 + docs/models/Task.md | 73 + docs/models/TaskExportOptions.md | 31 + docs/models/UserAdminUpdate.md | 22 + docs/models/UserAzureDetails.md | 17 + docs/models/UserCommunityProfileLinks.md | 22 + docs/models/UserCreation.md | 23 + docs/models/UserDetails.md | 85 + docs/models/UserDetailsAdmin.md | 78 + docs/models/UserPublic.md | 65 + docs/models/UserPublicSummary.md | 41 + docs/models/UserSigninLink.md | 16 + docs/models/UserSigninLinkCreation.md | 15 + flat_api/__init__.py | 130 +- flat_api/api/__init__.py | 13 - flat_api/api/account_api.py | 148 - flat_api/api/class_api.py | 3793 ----------- flat_api/api/collection_api.py | 1165 ---- flat_api/api/group_api.py | 386 -- flat_api/api/organization_api.py | 1615 ----- flat_api/api/score_api.py | 3819 ----------- flat_api/api/task_api.py | 152 - flat_api/api/user_api.py | 388 -- flat_api/api_client.py | 1805 ++++-- flat_api/apis/__init__.py | 3 + flat_api/apis/path_to_api.py | 206 + flat_api/apis/paths/__init__.py | 3 + flat_api/apis/paths/classes.py | 9 + flat_api/apis/paths/classes_class.py | 9 + flat_api/apis/paths/classes_class_activate.py | 7 + flat_api/apis/paths/classes_class_archive.py | 9 + .../apis/paths/classes_class_assignments.py | 9 + ...es_class_assignments_assignment_archive.py | 9 + ...asses_class_assignments_assignment_copy.py | 7 + ...lass_assignments_assignment_submissions.py | 9 + ..._assignments_assignment_submissions_csv.py | 7 + ...ssignments_assignment_submissions_excel.py | 7 + ...ments_assignment_submissions_submission.py | 11 + ...ignment_submissions_submission_comments.py | 9 + ...submissions_submission_comments_comment.py | 9 + ...signment_submissions_submission_history.py | 7 + ...classes_class_students_user_submissions.py | 7 + .../apis/paths/classes_class_test_student.py | 7 + .../apis/paths/classes_class_users_user.py | 9 + .../paths/classes_enroll_enrollment_code.py | 7 + flat_api/apis/paths/collections.py | 9 + flat_api/apis/paths/collections_collection.py | 11 + .../paths/collections_collection_scores.py | 7 + .../collections_collection_scores_score.py | 9 + .../paths/collections_collection_untrash.py | 7 + flat_api/apis/paths/edu_resources.py | 9 + .../apis/paths/edu_resources_libraries.py | 7 + flat_api/apis/paths/edu_resources_resource.py | 11 + .../edu_resources_resource_assignment.py | 7 + .../apis/paths/edu_resources_resource_copy.py | 7 + ...u_resources_resource_copy_to_demo_class.py | 7 + .../apis/paths/edu_resources_resource_move.py | 7 + .../edu_resources_resource_use_in_class.py | 7 + flat_api/apis/paths/groups_group.py | 7 + flat_api/apis/paths/groups_group_scores.py | 7 + flat_api/apis/paths/groups_group_users.py | 7 + flat_api/apis/paths/me.py | 7 + .../apis/paths/organizations_invitations.py | 9 + .../organizations_invitations_invitation.py | 7 + .../paths/organizations_lti_credentials.py | 9 + ...ganizations_lti_credentials_credentials.py | 7 + flat_api/apis/paths/organizations_users.py | 9 + .../apis/paths/organizations_users_count.py | 7 + .../apis/paths/organizations_users_user.py | 9 + .../organizations_users_user_access_token.py | 7 + .../organizations_users_user_signin_link.py | 7 + flat_api/apis/paths/scores.py | 7 + flat_api/apis/paths/scores_score.py | 11 + .../apis/paths/scores_score_collaborators.py | 9 + ...scores_score_collaborators_collaborator.py | 9 + flat_api/apis/paths/scores_score_comments.py | 9 + .../paths/scores_score_comments_comment.py | 9 + .../scores_score_comments_comment_resolved.py | 9 + flat_api/apis/paths/scores_score_fork.py | 7 + flat_api/apis/paths/scores_score_revisions.py | 9 + .../paths/scores_score_revisions_revision.py | 7 + .../scores_score_revisions_revision_format.py | 7 + ...es_score_revisions_revision_format_task.py | 7 + .../apis/paths/scores_score_submissions.py | 7 + flat_api/apis/paths/scores_score_tracks.py | 9 + .../apis/paths/scores_score_tracks_track.py | 11 + flat_api/apis/paths/scores_score_untrash.py | 7 + flat_api/apis/paths/tasks_task.py | 7 + flat_api/apis/paths/users_user.py | 7 + flat_api/apis/paths/users_user_likes.py | 7 + flat_api/apis/paths/users_user_scores.py | 7 + flat_api/apis/tag_to_api.py | 41 + flat_api/apis/tags/__init__.py | 17 + flat_api/apis/tags/account_api.py | 24 + flat_api/apis/tags/collection_api.py | 40 + flat_api/apis/tags/edu_resources_api.py | 44 + flat_api/apis/tags/group_api.py | 28 + flat_api/apis/tags/model_class_api.py | 82 + flat_api/apis/tags/organization_api.py | 48 + flat_api/apis/tags/score_api.py | 82 + flat_api/apis/tags/task_api.py | 24 + flat_api/apis/tags/user_api.py | 28 + flat_api/configuration.py | 145 +- flat_api/exceptions.py | 59 +- flat_api/model/__init__.py | 5 + flat_api/model/api_access_token.py | 158 + flat_api/model/api_access_token.pyi | 158 + flat_api/model/app_scopes.py | 147 + flat_api/model/app_scopes.pyi | 121 + flat_api/model/assignment.py | 441 ++ flat_api/model/assignment.pyi | 434 ++ flat_api/model/assignment_copy.py | 109 + flat_api/model/assignment_copy.pyi | 109 + flat_api/model/assignment_copy_response.py | 436 ++ flat_api/model/assignment_copy_response.pyi | 429 ++ flat_api/model/assignment_submission.py | 346 + flat_api/model/assignment_submission.pyi | 346 + .../model/assignment_submission_comment.py | 141 + .../model/assignment_submission_comment.pyi | 141 + .../assignment_submission_comment_creation.py | 86 + ...assignment_submission_comment_creation.pyi | 86 + .../model/assignment_submission_history.py | 292 + .../model/assignment_submission_history.pyi | 284 + .../assignment_submission_history_state.py | 62 + .../assignment_submission_history_state.pyi | 53 + flat_api/model/assignment_submission_state.py | 57 + .../model/assignment_submission_state.pyi | 49 + .../model/assignment_submission_update.py | 296 + .../model/assignment_submission_update.pyi | 292 + flat_api/model/assignment_type.py | 72 + flat_api/model/assignment_type.pyi | 61 + flat_api/model/assignment_update.py | 341 + flat_api/model/assignment_update.pyi | 328 + flat_api/model/class_assignment.py | 844 +++ flat_api/model/class_assignment.pyi | 822 +++ flat_api/model/class_assignment_update.py | 659 ++ flat_api/model/class_assignment_update.pyi | 632 ++ flat_api/model/class_attachment_creation.py | 198 + flat_api/model/class_attachment_creation.pyi | 185 + flat_api/model/class_creation.py | 174 + flat_api/model/class_creation.pyi | 167 + flat_api/model/class_details.py | 1038 +++ flat_api/model/class_details.pyi | 1015 +++ flat_api/model/class_grade_level.py | 67 + flat_api/model/class_grade_level.pyi | 57 + flat_api/model/class_roles.py | 52 + .../model/class_roles.pyi | 63 +- flat_api/model/class_state.py | 57 + flat_api/model/class_state.pyi | 49 + flat_api/model/class_update.py | 169 + flat_api/model/class_update.pyi | 162 + flat_api/model/collection.py | 359 ++ flat_api/model/collection.pyi | 359 ++ flat_api/model/collection_app.py | 101 + flat_api/model/collection_app.pyi | 101 + flat_api/model/collection_creation.py | 110 + flat_api/model/collection_creation.pyi | 106 + flat_api/model/collection_modification.py | 105 + flat_api/model/collection_modification.pyi | 101 + flat_api/model/collection_privacy.py | 49 + .../model/collection_privacy.pyi | 47 +- flat_api/model/collection_type.py | 74 + flat_api/model/collection_type.pyi | 63 + flat_api/model/edu_library.py | 156 + flat_api/model/edu_library.pyi | 141 + flat_api/model/edu_resource.py | 687 ++ flat_api/model/edu_resource.pyi | 680 ++ flat_api/model/edu_resource_copy.py | 86 + flat_api/model/edu_resource_copy.pyi | 86 + flat_api/model/edu_resource_creation.py | 122 + flat_api/model/edu_resource_creation.pyi | 118 + flat_api/model/edu_resource_move.py | 86 + flat_api/model/edu_resource_move.pyi | 86 + flat_api/model/edu_resource_privacy.py | 53 + flat_api/model/edu_resource_privacy.pyi | 46 + flat_api/model/edu_resource_type.py | 52 + flat_api/model/edu_resource_type.pyi | 45 + flat_api/model/edu_resource_update.py | 90 + flat_api/model/edu_resource_update.pyi | 86 + flat_api/model/edu_resource_use_in_class.py | 96 + flat_api/model/edu_resource_use_in_class.pyi | 96 + flat_api/model/edu_skills_focused.py | 109 + flat_api/model/edu_skills_focused.pyi | 95 + flat_api/model/flat_error_response.py | 118 + flat_api/model/flat_error_response.pyi | 118 + flat_api/model/flat_locales.py | 132 + flat_api/model/flat_locales.pyi | 109 + flat_api/model/google_classroom_coursework.py | 130 + .../model/google_classroom_coursework.pyi | 130 + flat_api/model/google_classroom_submission.py | 101 + .../model/google_classroom_submission.pyi | 101 + flat_api/model/group.py | 166 + flat_api/model/group.pyi | 158 + flat_api/model/group_details.py | 146 + flat_api/model/group_details.pyi | 146 + flat_api/model/group_type.py | 57 + flat_api/model/group_type.pyi | 49 + flat_api/model/license_mode.py | 52 + .../model/license_mode.pyi | 63 +- flat_api/model/license_sources.py | 82 + flat_api/model/license_sources.pyi | 69 + flat_api/model/lms_name.py | 82 + flat_api/model/lms_name.pyi | 69 + flat_api/model/lti_credentials.py | 166 + flat_api/model/lti_credentials.pyi | 166 + flat_api/model/lti_credentials_creation.py | 111 + flat_api/model/lti_credentials_creation.pyi | 108 + flat_api/model/media_attachment.py | 353 + flat_api/model/media_attachment.pyi | 340 + flat_api/model/media_score_sharing_mode.py | 62 + flat_api/model/media_score_sharing_mode.pyi | 53 + flat_api/model/microsoft_graph_assignment.py | 133 + flat_api/model/microsoft_graph_assignment.pyi | 133 + flat_api/model/microsoft_graph_submission.py | 101 + flat_api/model/microsoft_graph_submission.pyi | 101 + flat_api/model/organization_invitation.py | 146 + flat_api/model/organization_invitation.pyi | 146 + .../model/organization_invitation_creation.py | 96 + .../organization_invitation_creation.pyi | 96 + flat_api/model/organization_roles.py | 62 + flat_api/model/organization_roles.pyi | 53 + ...organization_user_access_token_creation.py | 113 + ...rganization_user_access_token_creation.pyi | 113 + flat_api/model/resource_collaborator.py | 188 + flat_api/model/resource_collaborator.pyi | 188 + .../model/resource_collaborator_creation.py | 141 + .../model/resource_collaborator_creation.pyi | 141 + flat_api/model/resource_rights.py | 111 + flat_api/model/resource_rights.pyi | 111 + flat_api/model/score_comment.py | 357 ++ flat_api/model/score_comment.pyi | 343 + flat_api/model/score_comment_context.py | 189 + flat_api/model/score_comment_context.pyi | 189 + flat_api/model/score_comment_creation.py | 163 + flat_api/model/score_comment_creation.pyi | 163 + flat_api/model/score_comment_update.py | 134 + flat_api/model/score_comment_update.pyi | 126 + flat_api/model/score_comments_counts.py | 113 + flat_api/model/score_comments_counts.pyi | 113 + flat_api/model/score_creation.py | 608 ++ flat_api/model/score_creation.pyi | 595 ++ flat_api/model/score_creation_type.py | 57 + flat_api/model/score_creation_type.pyi | 49 + flat_api/model/score_details.py | 560 ++ flat_api/model/score_details.pyi | 555 ++ flat_api/model/score_fork.py | 110 + flat_api/model/score_fork.pyi | 110 + .../model/score_license.py | 116 +- flat_api/model/score_license.pyi | 70 + flat_api/model/score_likes_counts.py | 103 + flat_api/model/score_likes_counts.pyi | 103 + flat_api/model/score_modification.py | 244 + flat_api/model/score_modification.pyi | 236 + flat_api/model/score_plays_counts.py | 103 + flat_api/model/score_plays_counts.pyi | 103 + flat_api/model/score_privacy.py | 74 + flat_api/model/score_privacy.pyi | 65 + flat_api/model/score_revision.py | 178 + flat_api/model/score_revision.pyi | 178 + flat_api/model/score_revision_creation.py | 131 + flat_api/model/score_revision_creation.pyi | 125 + flat_api/model/score_revision_statistics.py | 112 + flat_api/model/score_revision_statistics.pyi | 112 + flat_api/model/score_source.py | 79 + flat_api/model/score_source.pyi | 79 + flat_api/model/score_track.py | 226 + flat_api/model/score_track.pyi | 226 + flat_api/model/score_track_creation.py | 153 + flat_api/model/score_track_creation.pyi | 153 + flat_api/model/score_track_point.py | 128 + flat_api/model/score_track_point.pyi | 121 + flat_api/model/score_track_state.py | 57 + flat_api/model/score_track_state.pyi | 49 + flat_api/model/score_track_type.py | 62 + flat_api/model/score_track_type.pyi | 53 + flat_api/model/score_track_update.py | 143 + flat_api/model/score_track_update.pyi | 143 + flat_api/model/score_views_counts.py | 103 + flat_api/model/score_views_counts.pyi | 103 + flat_api/model/task.py | 356 ++ flat_api/model/task.pyi | 346 + flat_api/model/task_export_options.py | 104 + flat_api/model/task_export_options.pyi | 104 + flat_api/model/user_admin_update.py | 174 + flat_api/model/user_admin_update.pyi | 156 + flat_api/model/user_azure_details.py | 99 + flat_api/model/user_azure_details.pyi | 99 + .../model/user_community_profile_links.py | 245 + .../model/user_community_profile_links.pyi | 245 + flat_api/model/user_creation.py | 216 + flat_api/model/user_creation.pyi | 190 + flat_api/model/user_details.py | 523 ++ flat_api/model/user_details.pyi | 516 ++ flat_api/model/user_details_admin.py | 428 ++ flat_api/model/user_details_admin.pyi | 421 ++ flat_api/model/user_public.py | 395 ++ flat_api/model/user_public.pyi | 388 ++ flat_api/model/user_public_summary.py | 269 + flat_api/model/user_public_summary.pyi | 262 + flat_api/model/user_signin_link.py | 89 + flat_api/model/user_signin_link.pyi | 89 + flat_api/model/user_signin_link_creation.py | 79 + flat_api/model/user_signin_link_creation.pyi | 79 + flat_api/models/__init__.py | 225 +- flat_api/models/api_access_token.py | 263 - flat_api/models/app_scopes.py | 118 - flat_api/models/assignment.py | 617 -- flat_api/models/assignment_canvas.py | 151 - flat_api/models/assignment_copy.py | 179 - flat_api/models/assignment_creation.py | 574 -- .../assignment_creation_google_classroom.py | 122 - .../assignment_creation_microsoft_graph.py | 122 - flat_api/models/assignment_lti.py | 123 - flat_api/models/assignment_mfc.py | 151 - flat_api/models/assignment_submission.py | 532 -- .../models/assignment_submission_comment.py | 291 - .../assignment_submission_comment_creation.py | 124 - .../models/assignment_submission_history.py | 287 - ...ssignment_submission_history_attachment.py | 151 - .../models/assignment_submission_state.py | 102 - .../models/assignment_submission_update.py | 296 - .../assignment_submission_update_comments.py | 151 - flat_api/models/assignment_type.py | 105 - flat_api/models/class_attachment_creation.py | 295 - flat_api/models/class_creation.py | 158 - flat_api/models/class_details.py | 661 -- flat_api/models/class_details_canvas.py | 151 - flat_api/models/class_details_clever.py | 297 - .../models/class_details_google_classroom.py | 151 - flat_api/models/class_details_google_drive.py | 151 - flat_api/models/class_details_issues.py | 123 - flat_api/models/class_details_issues_sync.py | 185 - flat_api/models/class_details_lti.py | 179 - flat_api/models/class_details_mfc.py | 151 - .../models/class_details_microsoft_graph.py | 123 - flat_api/models/class_roles.py | 101 - flat_api/models/class_state.py | 102 - flat_api/models/class_update.py | 157 - flat_api/models/collection.py | 447 -- flat_api/models/collection_app.py | 179 - flat_api/models/collection_capabilities.py | 235 - flat_api/models/collection_creation.py | 157 - flat_api/models/collection_modification.py | 155 - flat_api/models/collection_privacy.py | 100 - flat_api/models/collection_type.py | 105 - flat_api/models/flat_error_response.py | 207 - flat_api/models/flat_locales.py | 117 - .../models/google_classroom_coursework.py | 206 - .../models/google_classroom_submission.py | 179 - flat_api/models/group.py | 297 - flat_api/models/group_details.py | 289 - flat_api/models/group_type.py | 102 - flat_api/models/license_mode.py | 101 - flat_api/models/license_sources.py | 105 - flat_api/models/lms_name.py | 107 - flat_api/models/lti_credentials.py | 345 - flat_api/models/lti_credentials_creation.py | 154 - flat_api/models/media_attachment.py | 687 -- flat_api/models/media_score_sharing_mode.py | 103 - flat_api/models/microsoft_graph_assignment.py | 207 - flat_api/models/microsoft_graph_submission.py | 179 - flat_api/models/organization_invitation.py | 289 - .../organization_invitation_creation.py | 149 - flat_api/models/organization_roles.py | 103 - ...organization_user_access_token_creation.py | 124 - .../models/organization_user_signin_link.py | 151 - .../organization_user_signin_link_creation.py | 123 - flat_api/models/resource_collaborator.py | 399 -- .../models/resource_collaborator_creation.py | 291 - flat_api/models/resource_rights.py | 207 - flat_api/models/score_comment.py | 545 -- flat_api/models/score_comment_context.py | 317 - flat_api/models/score_comment_creation.py | 262 - flat_api/models/score_comment_moderation.py | 157 - flat_api/models/score_comment_update.py | 217 - flat_api/models/score_comments_counts.py | 207 - flat_api/models/score_creation.py | 347 - .../models/score_creation_builder_data.py | 148 - ...score_creation_builder_data_layout_data.py | 325 - .../score_creation_builder_data_score_data.py | 264 - ...ion_builder_data_score_data_instruments.py | 209 - flat_api/models/score_creation_type.py | 102 - flat_api/models/score_details.py | 1001 --- flat_api/models/score_fork.py | 123 - flat_api/models/score_license.py | 107 - flat_api/models/score_likes_counts.py | 179 - flat_api/models/score_modification.py | 431 -- flat_api/models/score_plays_counts.py | 179 - flat_api/models/score_privacy.py | 103 - flat_api/models/score_revision.py | 315 - flat_api/models/score_revision_creation.py | 214 - flat_api/models/score_revision_statistics.py | 151 - flat_api/models/score_source.py | 123 - flat_api/models/score_track.py | 425 -- flat_api/models/score_track_creation.py | 231 - flat_api/models/score_track_point.py | 187 - flat_api/models/score_track_state.py | 102 - flat_api/models/score_track_type.py | 103 - flat_api/models/score_track_update.py | 203 - flat_api/models/score_views_counts.py | 179 - flat_api/models/task.py | 301 - flat_api/models/task_export_options.py | 123 - flat_api/models/task_progress.py | 151 - flat_api/models/user_admin_update.py | 282 - flat_api/models/user_creation.py | 318 - flat_api/models/user_details.py | 848 --- flat_api/models/user_details_admin.py | 570 -- flat_api/models/user_details_admin_license.py | 231 - flat_api/models/user_public.py | 740 --- flat_api/models/user_public_summary.py | 488 -- flat_api/paths/__init__.py | 72 + flat_api/paths/classes/__init__.py | 7 + flat_api/paths/classes/get.py | 378 ++ flat_api/paths/classes/get.pyi | 361 ++ flat_api/paths/classes/post.py | 392 ++ flat_api/paths/classes/post.pyi | 382 ++ flat_api/paths/classes_class/__init__.py | 7 + flat_api/paths/classes_class/get.py | 328 + flat_api/paths/classes_class/get.pyi | 319 + flat_api/paths/classes_class/put.py | 426 ++ flat_api/paths/classes_class/put.pyi | 417 ++ .../paths/classes_class_activate/__init__.py | 7 + flat_api/paths/classes_class_activate/post.py | 328 + .../paths/classes_class_activate/post.pyi | 319 + .../paths/classes_class_archive/__init__.py | 7 + .../paths/classes_class_archive/delete.py | 328 + .../paths/classes_class_archive/delete.pyi | 319 + flat_api/paths/classes_class_archive/post.py | 328 + flat_api/paths/classes_class_archive/post.pyi | 319 + .../classes_class_assignments/__init__.py | 7 + .../paths/classes_class_assignments/get.py | 353 + .../paths/classes_class_assignments/get.pyi | 344 + .../paths/classes_class_assignments/post.py | 426 ++ .../paths/classes_class_assignments/post.pyi | 417 ++ .../__init__.py | 7 + .../delete.py | 337 + .../delete.pyi | 328 + .../post.py | 337 + .../post.pyi | 328 + .../__init__.py | 7 + .../post.py | 438 ++ .../post.pyi | 429 ++ .../__init__.py | 7 + .../get.py | 362 ++ .../get.pyi | 353 + .../put.py | 438 ++ .../put.pyi | 429 ++ .../__init__.py | 7 + .../get.py | 336 + .../get.pyi | 327 + .../__init__.py | 7 + .../get.py | 336 + .../get.pyi | 327 + .../__init__.py | 7 + .../delete.py | 346 + .../delete.pyi | 337 + .../get.py | 346 + .../get.pyi | 337 + .../put.py | 447 ++ .../put.pyi | 438 ++ .../__init__.py | 7 + .../get.py | 411 ++ .../get.pyi | 400 ++ .../post.py | 487 ++ .../post.pyi | 476 ++ .../__init__.py | 7 + .../delete.py | 347 + .../delete.pyi | 338 + .../put.py | 496 ++ .../put.pyi | 485 ++ .../__init__.py | 7 + .../get.py | 411 ++ .../get.pyi | 400 ++ .../__init__.py | 7 + .../get.py | 362 ++ .../get.pyi | 353 + .../classes_class_test_student/__init__.py | 7 + .../paths/classes_class_test_student/post.py | 382 ++ .../paths/classes_class_test_student/post.pyi | 373 ++ .../classes_class_users_user/__init__.py | 7 + .../paths/classes_class_users_user/delete.py | 329 + .../paths/classes_class_users_user/delete.pyi | 320 + .../paths/classes_class_users_user/put.py | 329 + .../paths/classes_class_users_user/put.pyi | 320 + .../__init__.py | 7 + .../classes_enroll_enrollment_code/post.py | 328 + .../classes_enroll_enrollment_code/post.pyi | 319 + flat_api/paths/collections/__init__.py | 7 + flat_api/paths/collections/get.py | 447 ++ flat_api/paths/collections/get.pyi | 420 ++ flat_api/paths/collections/post.py | 392 ++ flat_api/paths/collections/post.pyi | 382 ++ .../paths/collections_collection/__init__.py | 7 + .../paths/collections_collection/delete.py | 360 ++ .../paths/collections_collection/delete.pyi | 349 + flat_api/paths/collections_collection/get.py | 422 ++ flat_api/paths/collections_collection/get.pyi | 411 ++ flat_api/paths/collections_collection/put.py | 466 ++ flat_api/paths/collections_collection/put.pyi | 455 ++ .../collections_collection_scores/__init__.py | 7 + .../collections_collection_scores/get.py | 506 ++ .../collections_collection_scores/get.pyi | 478 ++ .../__init__.py | 7 + .../delete.py | 423 ++ .../delete.pyi | 412 ++ .../put.py | 431 ++ .../put.pyi | 420 ++ .../__init__.py | 7 + .../collections_collection_untrash/post.py | 360 ++ .../collections_collection_untrash/post.pyi | 349 + flat_api/paths/edu_resources/__init__.py | 7 + flat_api/paths/edu_resources/get.py | 481 ++ flat_api/paths/edu_resources/get.pyi | 446 ++ flat_api/paths/edu_resources/post.py | 372 ++ flat_api/paths/edu_resources/post.pyi | 363 ++ .../paths/edu_resources_libraries/__init__.py | 7 + flat_api/paths/edu_resources_libraries/get.py | 299 + .../paths/edu_resources_libraries/get.pyi | 290 + .../paths/edu_resources_resource/__init__.py | 7 + .../paths/edu_resources_resource/delete.py | 320 + .../paths/edu_resources_resource/delete.pyi | 311 + flat_api/paths/edu_resources_resource/get.py | 328 + flat_api/paths/edu_resources_resource/get.pyi | 319 + flat_api/paths/edu_resources_resource/put.py | 429 ++ flat_api/paths/edu_resources_resource/put.pyi | 420 ++ .../__init__.py | 7 + .../edu_resources_resource_assignment/put.py | 429 ++ .../edu_resources_resource_assignment/put.pyi | 420 ++ .../edu_resources_resource_copy/__init__.py | 7 + .../paths/edu_resources_resource_copy/post.py | 429 ++ .../edu_resources_resource_copy/post.pyi | 420 ++ .../__init__.py | 7 + .../post.py | 328 + .../post.pyi | 319 + .../edu_resources_resource_move/__init__.py | 7 + .../paths/edu_resources_resource_move/post.py | 429 ++ .../edu_resources_resource_move/post.pyi | 420 ++ .../__init__.py | 7 + .../post.py | 429 ++ .../post.pyi | 420 ++ flat_api/paths/groups_group/__init__.py | 7 + flat_api/paths/groups_group/get.py | 328 + flat_api/paths/groups_group/get.pyi | 319 + .../paths/groups_group_scores/__init__.py | 7 + flat_api/paths/groups_group_scores/get.py | 407 ++ flat_api/paths/groups_group_scores/get.pyi | 398 ++ flat_api/paths/groups_group_users/__init__.py | 7 + flat_api/paths/groups_group_users/get.py | 432 ++ flat_api/paths/groups_group_users/get.pyi | 415 ++ flat_api/paths/me/__init__.py | 7 + flat_api/paths/me/get.py | 328 + flat_api/paths/me/get.pyi | 319 + .../organizations_invitations/__init__.py | 7 + .../paths/organizations_invitations/get.py | 414 ++ .../paths/organizations_invitations/get.pyi | 393 ++ .../paths/organizations_invitations/post.py | 369 ++ .../paths/organizations_invitations/post.pyi | 360 ++ .../__init__.py | 7 + .../delete.py | 320 + .../delete.pyi | 311 + .../organizations_lti_credentials/__init__.py | 7 + .../organizations_lti_credentials/get.py | 319 + .../organizations_lti_credentials/get.pyi | 309 + .../organizations_lti_credentials/post.py | 392 ++ .../organizations_lti_credentials/post.pyi | 382 ++ .../__init__.py | 7 + .../delete.py | 360 ++ .../delete.pyi | 349 + .../paths/organizations_users/__init__.py | 7 + flat_api/paths/organizations_users/get.py | 615 ++ flat_api/paths/organizations_users/get.pyi | 578 ++ flat_api/paths/organizations_users/post.py | 369 ++ flat_api/paths/organizations_users/post.pyi | 360 ++ .../organizations_users_count/__init__.py | 7 + .../paths/organizations_users_count/get.py | 449 ++ .../paths/organizations_users_count/get.pyi | 432 ++ .../organizations_users_user/__init__.py | 7 + .../paths/organizations_users_user/delete.py | 374 ++ .../paths/organizations_users_user/delete.pyi | 365 ++ .../paths/organizations_users_user/put.py | 429 ++ .../paths/organizations_users_user/put.pyi | 420 ++ .../__init__.py | 7 + .../post.py | 426 ++ .../post.pyi | 417 ++ .../__init__.py | 7 + .../post.py | 426 ++ .../post.pyi | 417 ++ flat_api/paths/scores/__init__.py | 7 + flat_api/paths/scores/post.py | 412 ++ flat_api/paths/scores/post.pyi | 401 ++ flat_api/paths/scores_score/__init__.py | 7 + flat_api/paths/scores_score/delete.py | 414 ++ flat_api/paths/scores_score/delete.pyi | 403 ++ flat_api/paths/scores_score/get.py | 442 ++ flat_api/paths/scores_score/get.pyi | 430 ++ flat_api/paths/scores_score/put.py | 486 ++ flat_api/paths/scores_score/put.pyi | 474 ++ .../scores_score_collaborators/__init__.py | 7 + .../paths/scores_score_collaborators/get.py | 467 ++ .../paths/scores_score_collaborators/get.pyi | 455 ++ .../paths/scores_score_collaborators/post.py | 489 ++ .../paths/scores_score_collaborators/post.pyi | 477 ++ .../__init__.py | 7 + .../delete.py | 369 ++ .../delete.pyi | 358 ++ .../get.py | 451 ++ .../get.pyi | 439 ++ .../paths/scores_score_comments/__init__.py | 7 + flat_api/paths/scores_score_comments/get.py | 549 ++ flat_api/paths/scores_score_comments/get.pyi | 517 ++ flat_api/paths/scores_score_comments/post.py | 546 ++ flat_api/paths/scores_score_comments/post.pyi | 534 ++ .../scores_score_comments_comment/__init__.py | 7 + .../scores_score_comments_comment/delete.py | 423 ++ .../scores_score_comments_comment/delete.pyi | 412 ++ .../scores_score_comments_comment/put.py | 555 ++ .../scores_score_comments_comment/put.pyi | 543 ++ .../__init__.py | 7 + .../delete.py | 423 ++ .../delete.pyi | 412 ++ .../put.py | 423 ++ .../put.pyi | 412 ++ flat_api/paths/scores_score_fork/__init__.py | 7 + flat_api/paths/scores_score_fork/post.py | 546 ++ flat_api/paths/scores_score_fork/post.pyi | 534 ++ .../paths/scores_score_revisions/__init__.py | 7 + flat_api/paths/scores_score_revisions/get.py | 467 ++ flat_api/paths/scores_score_revisions/get.pyi | 455 ++ flat_api/paths/scores_score_revisions/post.py | 489 ++ .../paths/scores_score_revisions/post.pyi | 477 ++ .../__init__.py | 7 + .../scores_score_revisions_revision/get.py | 451 ++ .../scores_score_revisions_revision/get.pyi | 439 ++ .../__init__.py | 7 + .../get.py | 566 ++ .../get.pyi | 541 ++ .../__init__.py | 7 + .../post.py | 586 ++ .../post.pyi | 566 ++ .../scores_score_submissions/__init__.py | 7 + .../paths/scores_score_submissions/get.py | 353 + .../paths/scores_score_submissions/get.pyi | 344 + .../paths/scores_score_tracks/__init__.py | 7 + flat_api/paths/scores_score_tracks/get.py | 465 ++ flat_api/paths/scores_score_tracks/get.pyi | 454 ++ flat_api/paths/scores_score_tracks/post.py | 469 ++ flat_api/paths/scores_score_tracks/post.pyi | 458 ++ .../scores_score_tracks_track/__init__.py | 7 + .../paths/scores_score_tracks_track/delete.py | 369 ++ .../scores_score_tracks_track/delete.pyi | 358 ++ .../paths/scores_score_tracks_track/get.py | 431 ++ .../paths/scores_score_tracks_track/get.pyi | 420 ++ .../paths/scores_score_tracks_track/put.py | 478 ++ .../paths/scores_score_tracks_track/put.pyi | 467 ++ .../paths/scores_score_untrash/__init__.py | 7 + flat_api/paths/scores_score_untrash/post.py | 360 ++ flat_api/paths/scores_score_untrash/post.pyi | 349 + flat_api/paths/tasks_task/__init__.py | 7 + flat_api/paths/tasks_task/get.py | 328 + flat_api/paths/tasks_task/get.pyi | 319 + flat_api/paths/users_user/__init__.py | 7 + flat_api/paths/users_user/get.py | 328 + flat_api/paths/users_user/get.pyi | 319 + flat_api/paths/users_user_likes/__init__.py | 7 + flat_api/paths/users_user_likes/get.py | 407 ++ flat_api/paths/users_user_likes/get.pyi | 398 ++ flat_api/paths/users_user_scores/__init__.py | 7 + flat_api/paths/users_user_scores/get.py | 407 ++ flat_api/paths/users_user_scores/get.pyi | 398 ++ flat_api/rest.py | 218 +- flat_api/schemas.py | 2476 ++++++++ requirements.txt | 10 +- setup.cfg | 2 + setup.py | 2 +- test-requirements.txt | 4 +- ...est_assignment_creation_microsoft_graph.py | 40 - ...ssignment_submission_history_attachment.py | 40 - ...t_assignment_submission_update_comments.py | 40 - test/test_class_api.py | 244 - test/test_class_details_canvas.py | 40 - test/test_class_details_clever.py | 40 - test/test_class_details_google_classroom.py | 40 - test/test_class_details_google_drive.py | 40 - test/test_class_details_issues.py | 40 - test/test_class_details_issues_sync.py | 40 - test/test_class_details_lti.py | 40 - test/test_class_details_mfc.py | 40 - test/test_class_details_microsoft_graph.py | 40 - test/test_collection_api.py | 97 - test/test_collection_capabilities.py | 40 - test/test_models/__init__.py | 0 .../test_api_access_token.py | 22 +- test/{ => test_models}/test_app_scopes.py | 22 +- test/{ => test_models}/test_assignment.py | 22 +- .../{ => test_models}/test_assignment_copy.py | 22 +- .../test_assignment_copy_response.py} | 27 +- .../test_assignment_submission.py | 22 +- .../test_assignment_submission_comment.py | 22 +- ..._assignment_submission_comment_creation.py | 22 +- .../test_assignment_submission_history.py | 22 +- ...st_assignment_submission_history_state.py} | 26 +- .../test_assignment_submission_state.py | 22 +- .../test_assignment_submission_update.py | 22 +- .../{ => test_models}/test_assignment_type.py | 22 +- .../test_assignment_update.py} | 26 +- test/test_models/test_class_assignment.py | 26 + .../test_class_assignment_update.py | 26 + .../test_class_attachment_creation.py | 22 +- test/{ => test_models}/test_class_creation.py | 22 +- test/{ => test_models}/test_class_details.py | 22 +- test/test_models/test_class_grade_level.py | 26 + test/{ => test_models}/test_class_roles.py | 22 +- test/{ => test_models}/test_class_state.py | 22 +- test/{ => test_models}/test_class_update.py | 22 +- test/{ => test_models}/test_collection.py | 22 +- test/{ => test_models}/test_collection_app.py | 22 +- .../test_collection_creation.py | 22 +- .../test_collection_modification.py | 22 +- .../test_collection_privacy.py | 22 +- .../{ => test_models}/test_collection_type.py | 22 +- test/test_models/test_edu_library.py | 26 + test/test_models/test_edu_resource.py | 26 + test/test_models/test_edu_resource_copy.py | 26 + .../test_models/test_edu_resource_creation.py | 26 + test/test_models/test_edu_resource_move.py | 26 + test/test_models/test_edu_resource_privacy.py | 26 + test/test_models/test_edu_resource_type.py | 26 + .../test_edu_resource_update.py} | 27 +- .../test_edu_resource_use_in_class.py} | 26 +- test/test_models/test_edu_skills_focused.py | 26 + .../test_flat_error_response.py | 22 +- test/{ => test_models}/test_flat_locales.py | 22 +- .../test_google_classroom_coursework.py | 22 +- .../test_google_classroom_submission.py | 22 +- test/{ => test_models}/test_group.py | 22 +- test/{ => test_models}/test_group_details.py | 22 +- test/{ => test_models}/test_group_type.py | 22 +- test/{ => test_models}/test_license_mode.py | 22 +- .../{ => test_models}/test_license_sources.py | 22 +- test/{ => test_models}/test_lms_name.py | 22 +- .../{ => test_models}/test_lti_credentials.py | 22 +- .../test_lti_credentials_creation.py | 22 +- .../test_media_attachment.py | 22 +- .../test_media_score_sharing_mode.py | 22 +- .../test_microsoft_graph_assignment.py | 22 +- .../test_microsoft_graph_submission.py | 22 +- .../test_organization_invitation.py | 22 +- .../test_organization_invitation_creation.py | 22 +- .../test_organization_roles.py | 22 +- ...organization_user_access_token_creation.py | 22 +- .../test_resource_collaborator.py | 22 +- .../test_resource_collaborator_creation.py | 22 +- .../{ => test_models}/test_resource_rights.py | 22 +- test/{ => test_models}/test_score_comment.py | 22 +- .../test_score_comment_context.py | 22 +- .../test_score_comment_creation.py | 22 +- .../test_score_comment_update.py | 22 +- .../test_score_comments_counts.py | 22 +- test/{ => test_models}/test_score_creation.py | 22 +- .../test_score_creation_type.py | 22 +- test/{ => test_models}/test_score_details.py | 22 +- test/{ => test_models}/test_score_fork.py | 22 +- test/{ => test_models}/test_score_license.py | 22 +- .../test_score_likes_counts.py | 22 +- .../test_score_modification.py | 22 +- .../test_score_plays_counts.py | 22 +- test/{ => test_models}/test_score_privacy.py | 22 +- test/{ => test_models}/test_score_revision.py | 22 +- .../test_score_revision_creation.py | 22 +- .../test_score_revision_statistics.py | 22 +- test/{ => test_models}/test_score_source.py | 22 +- test/{ => test_models}/test_score_track.py | 22 +- .../test_score_track_creation.py | 22 +- .../test_score_track_point.py | 22 +- .../test_score_track_state.py | 22 +- .../test_score_track_type.py | 22 +- .../test_score_track_update.py | 22 +- .../test_score_views_counts.py | 22 +- test/{ => test_models}/test_task.py | 22 +- .../test_task_export_options.py | 22 +- .../test_user_admin_update.py | 22 +- test/test_models/test_user_azure_details.py | 26 + .../test_user_community_profile_links.py | 26 + test/{ => test_models}/test_user_creation.py | 22 +- test/{ => test_models}/test_user_details.py | 22 +- .../test_user_details_admin.py | 22 +- test/{ => test_models}/test_user_public.py | 22 +- .../test_user_public_summary.py | 22 +- test/test_models/test_user_signin_link.py | 26 + .../test_user_signin_link_creation.py | 26 + test/test_organization_api.py | 125 - test/test_organization_user_signin_link.py | 40 - ..._organization_user_signin_link_creation.py | 40 - test/test_paths/__init__.py | 68 + test/test_paths/test_classes/__init__.py | 0 test/test_paths/test_classes/test_get.py | 41 + test/test_paths/test_classes/test_post.py | 43 + .../test_paths/test_classes_class/__init__.py | 0 .../test_paths/test_classes_class/test_get.py | 41 + .../test_paths/test_classes_class/test_put.py | 41 + .../test_classes_class_activate/__init__.py | 0 .../test_classes_class_activate/test_post.py | 41 + .../test_classes_class_archive/__init__.py | 0 .../test_classes_class_archive/test_delete.py | 41 + .../test_classes_class_archive/test_post.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../test_post.py | 41 + .../__init__.py | 0 .../test_delete.py | 41 + .../test_post.py | 41 + .../__init__.py | 0 .../test_post.py | 43 + .../__init__.py | 0 .../test_get.py | 41 + .../test_put.py | 43 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_delete.py | 41 + .../test_get.py | 41 + .../test_put.py | 43 + .../__init__.py | 0 .../test_get.py | 41 + .../test_post.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_put.py | 43 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_post.py | 41 + .../test_classes_class_users_user/__init__.py | 0 .../test_delete.py | 40 + .../test_classes_class_users_user/test_put.py | 40 + .../__init__.py | 0 .../test_post.py | 41 + test/test_paths/test_collections/__init__.py | 0 test/test_paths/test_collections/test_get.py | 41 + test/test_paths/test_collections/test_post.py | 43 + .../test_collections_collection/__init__.py | 0 .../test_delete.py | 40 + .../test_collections_collection/test_get.py | 41 + .../test_collections_collection/test_put.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_put.py | 41 + .../__init__.py | 0 .../test_post.py | 40 + .../test_paths/test_edu_resources/__init__.py | 0 .../test_paths/test_edu_resources/test_get.py | 41 + .../test_edu_resources/test_post.py | 43 + .../test_edu_resources_libraries/__init__.py | 0 .../test_edu_resources_libraries/test_get.py | 41 + .../test_edu_resources_resource/__init__.py | 0 .../test_delete.py | 40 + .../test_edu_resources_resource/test_get.py | 41 + .../test_edu_resources_resource/test_put.py | 43 + .../__init__.py | 0 .../test_put.py | 43 + .../__init__.py | 0 .../test_post.py | 43 + .../__init__.py | 0 .../test_post.py | 41 + .../__init__.py | 0 .../test_post.py | 43 + .../__init__.py | 0 .../test_post.py | 43 + test/test_paths/test_groups_group/__init__.py | 0 test/test_paths/test_groups_group/test_get.py | 41 + .../test_groups_group_scores/__init__.py | 0 .../test_groups_group_scores/test_get.py | 41 + .../test_groups_group_users/__init__.py | 0 .../test_groups_group_users/test_get.py | 41 + test/test_paths/test_me/__init__.py | 0 test/test_paths/test_me/test_get.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../test_post.py | 41 + .../__init__.py | 0 .../test_delete.py | 40 + .../__init__.py | 0 .../test_get.py | 41 + .../test_post.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_organizations_users/__init__.py | 0 .../test_organizations_users/test_get.py | 41 + .../test_organizations_users/test_post.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../test_organizations_users_user/__init__.py | 0 .../test_delete.py | 40 + .../test_organizations_users_user/test_put.py | 43 + .../__init__.py | 0 .../test_post.py | 41 + .../__init__.py | 0 .../test_post.py | 41 + test/test_paths/test_scores/__init__.py | 0 test/test_paths/test_scores/test_post.py | 43 + test/test_paths/test_scores_score/__init__.py | 0 .../test_scores_score/test_delete.py | 40 + test/test_paths/test_scores_score/test_get.py | 41 + test/test_paths/test_scores_score/test_put.py | 41 + .../__init__.py | 0 .../test_get.py | 41 + .../test_post.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_get.py | 41 + .../test_scores_score_comments/__init__.py | 0 .../test_scores_score_comments/test_get.py | 41 + .../test_scores_score_comments/test_post.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_put.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_put.py | 40 + .../test_scores_score_fork/__init__.py | 0 .../test_scores_score_fork/test_post.py | 43 + .../test_scores_score_revisions/__init__.py | 0 .../test_scores_score_revisions/test_get.py | 41 + .../test_scores_score_revisions/test_post.py | 43 + .../__init__.py | 0 .../test_get.py | 41 + .../__init__.py | 0 .../test_get.py | 53 + .../__init__.py | 0 .../test_post.py | 41 + .../test_scores_score_submissions/__init__.py | 0 .../test_scores_score_submissions/test_get.py | 41 + .../test_scores_score_tracks/__init__.py | 0 .../test_scores_score_tracks/test_get.py | 41 + .../test_scores_score_tracks/test_post.py | 43 + .../__init__.py | 0 .../test_delete.py | 40 + .../test_get.py | 41 + .../test_put.py | 43 + .../test_scores_score_untrash/__init__.py | 0 .../test_scores_score_untrash/test_post.py | 40 + test/test_paths/test_tasks_task/__init__.py | 0 test/test_paths/test_tasks_task/test_get.py | 41 + test/test_paths/test_users_user/__init__.py | 0 test/test_paths/test_users_user/test_get.py | 41 + .../test_users_user_likes/__init__.py | 0 .../test_users_user_likes/test_get.py | 41 + .../test_users_user_scores/__init__.py | 0 .../test_users_user_scores/test_get.py | 41 + test/test_score_api.py | 244 - test/test_score_comment_moderation.py | 40 - test/test_score_creation_builder_data.py | 40 - ...score_creation_builder_data_layout_data.py | 40 - ..._score_creation_builder_data_score_data.py | 40 - ...ion_builder_data_score_data_instruments.py | 40 - test/test_user_api.py | 55 - test/test_user_details_admin_license.py | 40 - tox.ini | 3 +- 1178 files changed, 145099 insertions(+), 50248 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 docs/AccountApi.md delete mode 100644 docs/ApiAccessToken.md delete mode 100644 docs/AppScopes.md delete mode 100644 docs/Assignment.md delete mode 100644 docs/AssignmentCanvas.md delete mode 100644 docs/AssignmentCopy.md delete mode 100644 docs/AssignmentCreation.md delete mode 100644 docs/AssignmentCreationGoogleClassroom.md delete mode 100644 docs/AssignmentCreationMicrosoftGraph.md delete mode 100644 docs/AssignmentLti.md delete mode 100644 docs/AssignmentMfc.md delete mode 100644 docs/AssignmentSubmission.md delete mode 100644 docs/AssignmentSubmissionComment.md delete mode 100644 docs/AssignmentSubmissionCommentCreation.md delete mode 100644 docs/AssignmentSubmissionHistory.md delete mode 100644 docs/AssignmentSubmissionHistoryAttachment.md delete mode 100644 docs/AssignmentSubmissionState.md delete mode 100644 docs/AssignmentSubmissionUpdate.md delete mode 100644 docs/AssignmentSubmissionUpdateComments.md delete mode 100644 docs/AssignmentType.md delete mode 100644 docs/ClassApi.md delete mode 100644 docs/ClassAttachmentCreation.md delete mode 100644 docs/ClassCreation.md delete mode 100644 docs/ClassDetails.md delete mode 100644 docs/ClassDetailsCanvas.md delete mode 100644 docs/ClassDetailsClever.md delete mode 100644 docs/ClassDetailsGoogleClassroom.md delete mode 100644 docs/ClassDetailsGoogleDrive.md delete mode 100644 docs/ClassDetailsIssues.md delete mode 100644 docs/ClassDetailsIssuesSync.md delete mode 100644 docs/ClassDetailsLti.md delete mode 100644 docs/ClassDetailsMfc.md delete mode 100644 docs/ClassDetailsMicrosoftGraph.md delete mode 100644 docs/ClassRoles.md delete mode 100644 docs/ClassState.md delete mode 100644 docs/ClassUpdate.md delete mode 100644 docs/Collection.md delete mode 100644 docs/CollectionApi.md delete mode 100644 docs/CollectionApp.md delete mode 100644 docs/CollectionCapabilities.md delete mode 100644 docs/CollectionCreation.md delete mode 100644 docs/CollectionModification.md delete mode 100644 docs/CollectionPrivacy.md delete mode 100644 docs/CollectionType.md delete mode 100644 docs/FlatErrorResponse.md delete mode 100644 docs/FlatLocales.md delete mode 100644 docs/GoogleClassroomCoursework.md delete mode 100644 docs/GoogleClassroomSubmission.md delete mode 100644 docs/Group.md delete mode 100644 docs/GroupApi.md delete mode 100644 docs/GroupDetails.md delete mode 100644 docs/GroupType.md delete mode 100644 docs/LicenseMode.md delete mode 100644 docs/LicenseSources.md delete mode 100644 docs/LmsName.md delete mode 100644 docs/LtiCredentials.md delete mode 100644 docs/LtiCredentialsCreation.md delete mode 100644 docs/MediaAttachment.md delete mode 100644 docs/MediaScoreSharingMode.md delete mode 100644 docs/MicrosoftGraphAssignment.md delete mode 100644 docs/MicrosoftGraphSubmission.md delete mode 100644 docs/OrganizationApi.md delete mode 100644 docs/OrganizationInvitation.md delete mode 100644 docs/OrganizationInvitationCreation.md delete mode 100644 docs/OrganizationRoles.md delete mode 100644 docs/OrganizationUserAccessTokenCreation.md delete mode 100644 docs/OrganizationUserSigninLink.md delete mode 100644 docs/OrganizationUserSigninLinkCreation.md delete mode 100644 docs/ResourceCollaborator.md delete mode 100644 docs/ResourceCollaboratorCreation.md delete mode 100644 docs/ResourceRights.md delete mode 100644 docs/ScoreApi.md delete mode 100644 docs/ScoreComment.md delete mode 100644 docs/ScoreCommentContext.md delete mode 100644 docs/ScoreCommentCreation.md delete mode 100644 docs/ScoreCommentModeration.md delete mode 100644 docs/ScoreCommentUpdate.md delete mode 100644 docs/ScoreCommentsCounts.md delete mode 100644 docs/ScoreCreation.md delete mode 100644 docs/ScoreCreationBuilderData.md delete mode 100644 docs/ScoreCreationBuilderDataLayoutData.md delete mode 100644 docs/ScoreCreationBuilderDataScoreData.md delete mode 100644 docs/ScoreCreationBuilderDataScoreDataInstruments.md delete mode 100644 docs/ScoreCreationType.md delete mode 100644 docs/ScoreDetails.md delete mode 100644 docs/ScoreFork.md delete mode 100644 docs/ScoreLicense.md delete mode 100644 docs/ScoreLikesCounts.md delete mode 100644 docs/ScoreModification.md delete mode 100644 docs/ScorePlaysCounts.md delete mode 100644 docs/ScorePrivacy.md delete mode 100644 docs/ScoreRevision.md delete mode 100644 docs/ScoreRevisionCreation.md delete mode 100644 docs/ScoreRevisionStatistics.md delete mode 100644 docs/ScoreSource.md delete mode 100644 docs/ScoreTrack.md delete mode 100644 docs/ScoreTrackCreation.md delete mode 100644 docs/ScoreTrackPoint.md delete mode 100644 docs/ScoreTrackState.md delete mode 100644 docs/ScoreTrackType.md delete mode 100644 docs/ScoreTrackUpdate.md delete mode 100644 docs/ScoreViewsCounts.md delete mode 100644 docs/Task.md delete mode 100644 docs/TaskApi.md delete mode 100644 docs/TaskExportOptions.md delete mode 100644 docs/TaskProgress.md delete mode 100644 docs/UserAdminUpdate.md delete mode 100644 docs/UserApi.md delete mode 100644 docs/UserCreation.md delete mode 100644 docs/UserDetails.md delete mode 100644 docs/UserDetailsAdmin.md delete mode 100644 docs/UserDetailsAdminLicense.md delete mode 100644 docs/UserPublic.md delete mode 100644 docs/UserPublicSummary.md create mode 100644 docs/apis/tags/AccountApi.md create mode 100644 docs/apis/tags/CollectionApi.md create mode 100644 docs/apis/tags/EduResourcesApi.md create mode 100644 docs/apis/tags/GroupApi.md create mode 100644 docs/apis/tags/ModelClassApi.md create mode 100644 docs/apis/tags/OrganizationApi.md create mode 100644 docs/apis/tags/ScoreApi.md create mode 100644 docs/apis/tags/TaskApi.md create mode 100644 docs/apis/tags/UserApi.md create mode 100644 docs/models/ApiAccessToken.md create mode 100644 docs/models/AppScopes.md create mode 100644 docs/models/Assignment.md create mode 100644 docs/models/AssignmentCopy.md create mode 100644 docs/models/AssignmentCopyResponse.md create mode 100644 docs/models/AssignmentSubmission.md create mode 100644 docs/models/AssignmentSubmissionComment.md create mode 100644 docs/models/AssignmentSubmissionCommentCreation.md create mode 100644 docs/models/AssignmentSubmissionHistory.md create mode 100644 docs/models/AssignmentSubmissionHistoryState.md create mode 100644 docs/models/AssignmentSubmissionState.md create mode 100644 docs/models/AssignmentSubmissionUpdate.md create mode 100644 docs/models/AssignmentType.md create mode 100644 docs/models/AssignmentUpdate.md create mode 100644 docs/models/ClassAssignment.md create mode 100644 docs/models/ClassAssignmentUpdate.md create mode 100644 docs/models/ClassAttachmentCreation.md create mode 100644 docs/models/ClassCreation.md create mode 100644 docs/models/ClassDetails.md create mode 100644 docs/models/ClassGradeLevel.md create mode 100644 docs/models/ClassRoles.md create mode 100644 docs/models/ClassState.md create mode 100644 docs/models/ClassUpdate.md create mode 100644 docs/models/Collection.md create mode 100644 docs/models/CollectionApp.md create mode 100644 docs/models/CollectionCreation.md create mode 100644 docs/models/CollectionModification.md create mode 100644 docs/models/CollectionPrivacy.md create mode 100644 docs/models/CollectionType.md create mode 100644 docs/models/EduLibrary.md create mode 100644 docs/models/EduResource.md create mode 100644 docs/models/EduResourceCopy.md create mode 100644 docs/models/EduResourceCreation.md create mode 100644 docs/models/EduResourceMove.md create mode 100644 docs/models/EduResourcePrivacy.md create mode 100644 docs/models/EduResourceType.md create mode 100644 docs/models/EduResourceUpdate.md create mode 100644 docs/models/EduResourceUseInClass.md create mode 100644 docs/models/EduSkillsFocused.md create mode 100644 docs/models/FlatErrorResponse.md create mode 100644 docs/models/FlatLocales.md create mode 100644 docs/models/GoogleClassroomCoursework.md create mode 100644 docs/models/GoogleClassroomSubmission.md create mode 100644 docs/models/Group.md create mode 100644 docs/models/GroupDetails.md create mode 100644 docs/models/GroupType.md create mode 100644 docs/models/LicenseMode.md create mode 100644 docs/models/LicenseSources.md create mode 100644 docs/models/LmsName.md create mode 100644 docs/models/LtiCredentials.md create mode 100644 docs/models/LtiCredentialsCreation.md create mode 100644 docs/models/MediaAttachment.md create mode 100644 docs/models/MediaScoreSharingMode.md create mode 100644 docs/models/MicrosoftGraphAssignment.md create mode 100644 docs/models/MicrosoftGraphSubmission.md create mode 100644 docs/models/OrganizationInvitation.md create mode 100644 docs/models/OrganizationInvitationCreation.md create mode 100644 docs/models/OrganizationRoles.md create mode 100644 docs/models/OrganizationUserAccessTokenCreation.md create mode 100644 docs/models/ResourceCollaborator.md create mode 100644 docs/models/ResourceCollaboratorCreation.md create mode 100644 docs/models/ResourceRights.md create mode 100644 docs/models/ScoreComment.md create mode 100644 docs/models/ScoreCommentContext.md create mode 100644 docs/models/ScoreCommentCreation.md create mode 100644 docs/models/ScoreCommentUpdate.md create mode 100644 docs/models/ScoreCommentsCounts.md create mode 100644 docs/models/ScoreCreation.md create mode 100644 docs/models/ScoreCreationType.md create mode 100644 docs/models/ScoreDetails.md create mode 100644 docs/models/ScoreFork.md create mode 100644 docs/models/ScoreLicense.md create mode 100644 docs/models/ScoreLikesCounts.md create mode 100644 docs/models/ScoreModification.md create mode 100644 docs/models/ScorePlaysCounts.md create mode 100644 docs/models/ScorePrivacy.md create mode 100644 docs/models/ScoreRevision.md create mode 100644 docs/models/ScoreRevisionCreation.md create mode 100644 docs/models/ScoreRevisionStatistics.md create mode 100644 docs/models/ScoreSource.md create mode 100644 docs/models/ScoreTrack.md create mode 100644 docs/models/ScoreTrackCreation.md create mode 100644 docs/models/ScoreTrackPoint.md create mode 100644 docs/models/ScoreTrackState.md create mode 100644 docs/models/ScoreTrackType.md create mode 100644 docs/models/ScoreTrackUpdate.md create mode 100644 docs/models/ScoreViewsCounts.md create mode 100644 docs/models/Task.md create mode 100644 docs/models/TaskExportOptions.md create mode 100644 docs/models/UserAdminUpdate.md create mode 100644 docs/models/UserAzureDetails.md create mode 100644 docs/models/UserCommunityProfileLinks.md create mode 100644 docs/models/UserCreation.md create mode 100644 docs/models/UserDetails.md create mode 100644 docs/models/UserDetailsAdmin.md create mode 100644 docs/models/UserPublic.md create mode 100644 docs/models/UserPublicSummary.md create mode 100644 docs/models/UserSigninLink.md create mode 100644 docs/models/UserSigninLinkCreation.md delete mode 100644 flat_api/api/__init__.py delete mode 100644 flat_api/api/account_api.py delete mode 100644 flat_api/api/class_api.py delete mode 100644 flat_api/api/collection_api.py delete mode 100644 flat_api/api/group_api.py delete mode 100644 flat_api/api/organization_api.py delete mode 100644 flat_api/api/score_api.py delete mode 100644 flat_api/api/task_api.py delete mode 100644 flat_api/api/user_api.py create mode 100644 flat_api/apis/__init__.py create mode 100644 flat_api/apis/path_to_api.py create mode 100644 flat_api/apis/paths/__init__.py create mode 100644 flat_api/apis/paths/classes.py create mode 100644 flat_api/apis/paths/classes_class.py create mode 100644 flat_api/apis/paths/classes_class_activate.py create mode 100644 flat_api/apis/paths/classes_class_archive.py create mode 100644 flat_api/apis/paths/classes_class_assignments.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_archive.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_copy.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py create mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py create mode 100644 flat_api/apis/paths/classes_class_students_user_submissions.py create mode 100644 flat_api/apis/paths/classes_class_test_student.py create mode 100644 flat_api/apis/paths/classes_class_users_user.py create mode 100644 flat_api/apis/paths/classes_enroll_enrollment_code.py create mode 100644 flat_api/apis/paths/collections.py create mode 100644 flat_api/apis/paths/collections_collection.py create mode 100644 flat_api/apis/paths/collections_collection_scores.py create mode 100644 flat_api/apis/paths/collections_collection_scores_score.py create mode 100644 flat_api/apis/paths/collections_collection_untrash.py create mode 100644 flat_api/apis/paths/edu_resources.py create mode 100644 flat_api/apis/paths/edu_resources_libraries.py create mode 100644 flat_api/apis/paths/edu_resources_resource.py create mode 100644 flat_api/apis/paths/edu_resources_resource_assignment.py create mode 100644 flat_api/apis/paths/edu_resources_resource_copy.py create mode 100644 flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py create mode 100644 flat_api/apis/paths/edu_resources_resource_move.py create mode 100644 flat_api/apis/paths/edu_resources_resource_use_in_class.py create mode 100644 flat_api/apis/paths/groups_group.py create mode 100644 flat_api/apis/paths/groups_group_scores.py create mode 100644 flat_api/apis/paths/groups_group_users.py create mode 100644 flat_api/apis/paths/me.py create mode 100644 flat_api/apis/paths/organizations_invitations.py create mode 100644 flat_api/apis/paths/organizations_invitations_invitation.py create mode 100644 flat_api/apis/paths/organizations_lti_credentials.py create mode 100644 flat_api/apis/paths/organizations_lti_credentials_credentials.py create mode 100644 flat_api/apis/paths/organizations_users.py create mode 100644 flat_api/apis/paths/organizations_users_count.py create mode 100644 flat_api/apis/paths/organizations_users_user.py create mode 100644 flat_api/apis/paths/organizations_users_user_access_token.py create mode 100644 flat_api/apis/paths/organizations_users_user_signin_link.py create mode 100644 flat_api/apis/paths/scores.py create mode 100644 flat_api/apis/paths/scores_score.py create mode 100644 flat_api/apis/paths/scores_score_collaborators.py create mode 100644 flat_api/apis/paths/scores_score_collaborators_collaborator.py create mode 100644 flat_api/apis/paths/scores_score_comments.py create mode 100644 flat_api/apis/paths/scores_score_comments_comment.py create mode 100644 flat_api/apis/paths/scores_score_comments_comment_resolved.py create mode 100644 flat_api/apis/paths/scores_score_fork.py create mode 100644 flat_api/apis/paths/scores_score_revisions.py create mode 100644 flat_api/apis/paths/scores_score_revisions_revision.py create mode 100644 flat_api/apis/paths/scores_score_revisions_revision_format.py create mode 100644 flat_api/apis/paths/scores_score_revisions_revision_format_task.py create mode 100644 flat_api/apis/paths/scores_score_submissions.py create mode 100644 flat_api/apis/paths/scores_score_tracks.py create mode 100644 flat_api/apis/paths/scores_score_tracks_track.py create mode 100644 flat_api/apis/paths/scores_score_untrash.py create mode 100644 flat_api/apis/paths/tasks_task.py create mode 100644 flat_api/apis/paths/users_user.py create mode 100644 flat_api/apis/paths/users_user_likes.py create mode 100644 flat_api/apis/paths/users_user_scores.py create mode 100644 flat_api/apis/tag_to_api.py create mode 100644 flat_api/apis/tags/__init__.py create mode 100644 flat_api/apis/tags/account_api.py create mode 100644 flat_api/apis/tags/collection_api.py create mode 100644 flat_api/apis/tags/edu_resources_api.py create mode 100644 flat_api/apis/tags/group_api.py create mode 100644 flat_api/apis/tags/model_class_api.py create mode 100644 flat_api/apis/tags/organization_api.py create mode 100644 flat_api/apis/tags/score_api.py create mode 100644 flat_api/apis/tags/task_api.py create mode 100644 flat_api/apis/tags/user_api.py create mode 100644 flat_api/model/__init__.py create mode 100644 flat_api/model/api_access_token.py create mode 100644 flat_api/model/api_access_token.pyi create mode 100644 flat_api/model/app_scopes.py create mode 100644 flat_api/model/app_scopes.pyi create mode 100644 flat_api/model/assignment.py create mode 100644 flat_api/model/assignment.pyi create mode 100644 flat_api/model/assignment_copy.py create mode 100644 flat_api/model/assignment_copy.pyi create mode 100644 flat_api/model/assignment_copy_response.py create mode 100644 flat_api/model/assignment_copy_response.pyi create mode 100644 flat_api/model/assignment_submission.py create mode 100644 flat_api/model/assignment_submission.pyi create mode 100644 flat_api/model/assignment_submission_comment.py create mode 100644 flat_api/model/assignment_submission_comment.pyi create mode 100644 flat_api/model/assignment_submission_comment_creation.py create mode 100644 flat_api/model/assignment_submission_comment_creation.pyi create mode 100644 flat_api/model/assignment_submission_history.py create mode 100644 flat_api/model/assignment_submission_history.pyi create mode 100644 flat_api/model/assignment_submission_history_state.py create mode 100644 flat_api/model/assignment_submission_history_state.pyi create mode 100644 flat_api/model/assignment_submission_state.py create mode 100644 flat_api/model/assignment_submission_state.pyi create mode 100644 flat_api/model/assignment_submission_update.py create mode 100644 flat_api/model/assignment_submission_update.pyi create mode 100644 flat_api/model/assignment_type.py create mode 100644 flat_api/model/assignment_type.pyi create mode 100644 flat_api/model/assignment_update.py create mode 100644 flat_api/model/assignment_update.pyi create mode 100644 flat_api/model/class_assignment.py create mode 100644 flat_api/model/class_assignment.pyi create mode 100644 flat_api/model/class_assignment_update.py create mode 100644 flat_api/model/class_assignment_update.pyi create mode 100644 flat_api/model/class_attachment_creation.py create mode 100644 flat_api/model/class_attachment_creation.pyi create mode 100644 flat_api/model/class_creation.py create mode 100644 flat_api/model/class_creation.pyi create mode 100644 flat_api/model/class_details.py create mode 100644 flat_api/model/class_details.pyi create mode 100644 flat_api/model/class_grade_level.py create mode 100644 flat_api/model/class_grade_level.pyi create mode 100644 flat_api/model/class_roles.py rename test/test_assignment_canvas.py => flat_api/model/class_roles.pyi (69%) create mode 100644 flat_api/model/class_state.py create mode 100644 flat_api/model/class_state.pyi create mode 100644 flat_api/model/class_update.py create mode 100644 flat_api/model/class_update.pyi create mode 100644 flat_api/model/collection.py create mode 100644 flat_api/model/collection.pyi create mode 100644 flat_api/model/collection_app.py create mode 100644 flat_api/model/collection_app.pyi create mode 100644 flat_api/model/collection_creation.py create mode 100644 flat_api/model/collection_creation.pyi create mode 100644 flat_api/model/collection_modification.py create mode 100644 flat_api/model/collection_modification.pyi create mode 100644 flat_api/model/collection_privacy.py rename test/test_assignment_creation_google_classroom.py => flat_api/model/collection_privacy.pyi (68%) create mode 100644 flat_api/model/collection_type.py create mode 100644 flat_api/model/collection_type.pyi create mode 100644 flat_api/model/edu_library.py create mode 100644 flat_api/model/edu_library.pyi create mode 100644 flat_api/model/edu_resource.py create mode 100644 flat_api/model/edu_resource.pyi create mode 100644 flat_api/model/edu_resource_copy.py create mode 100644 flat_api/model/edu_resource_copy.pyi create mode 100644 flat_api/model/edu_resource_creation.py create mode 100644 flat_api/model/edu_resource_creation.pyi create mode 100644 flat_api/model/edu_resource_move.py create mode 100644 flat_api/model/edu_resource_move.pyi create mode 100644 flat_api/model/edu_resource_privacy.py create mode 100644 flat_api/model/edu_resource_privacy.pyi create mode 100644 flat_api/model/edu_resource_type.py create mode 100644 flat_api/model/edu_resource_type.pyi create mode 100644 flat_api/model/edu_resource_update.py create mode 100644 flat_api/model/edu_resource_update.pyi create mode 100644 flat_api/model/edu_resource_use_in_class.py create mode 100644 flat_api/model/edu_resource_use_in_class.pyi create mode 100644 flat_api/model/edu_skills_focused.py create mode 100644 flat_api/model/edu_skills_focused.pyi create mode 100644 flat_api/model/flat_error_response.py create mode 100644 flat_api/model/flat_error_response.pyi create mode 100644 flat_api/model/flat_locales.py create mode 100644 flat_api/model/flat_locales.pyi create mode 100644 flat_api/model/google_classroom_coursework.py create mode 100644 flat_api/model/google_classroom_coursework.pyi create mode 100644 flat_api/model/google_classroom_submission.py create mode 100644 flat_api/model/google_classroom_submission.pyi create mode 100644 flat_api/model/group.py create mode 100644 flat_api/model/group.pyi create mode 100644 flat_api/model/group_details.py create mode 100644 flat_api/model/group_details.pyi create mode 100644 flat_api/model/group_type.py create mode 100644 flat_api/model/group_type.pyi create mode 100644 flat_api/model/license_mode.py rename test/test_assignment_creation.py => flat_api/model/license_mode.pyi (70%) create mode 100644 flat_api/model/license_sources.py create mode 100644 flat_api/model/license_sources.pyi create mode 100644 flat_api/model/lms_name.py create mode 100644 flat_api/model/lms_name.pyi create mode 100644 flat_api/model/lti_credentials.py create mode 100644 flat_api/model/lti_credentials.pyi create mode 100644 flat_api/model/lti_credentials_creation.py create mode 100644 flat_api/model/lti_credentials_creation.pyi create mode 100644 flat_api/model/media_attachment.py create mode 100644 flat_api/model/media_attachment.pyi create mode 100644 flat_api/model/media_score_sharing_mode.py create mode 100644 flat_api/model/media_score_sharing_mode.pyi create mode 100644 flat_api/model/microsoft_graph_assignment.py create mode 100644 flat_api/model/microsoft_graph_assignment.pyi create mode 100644 flat_api/model/microsoft_graph_submission.py create mode 100644 flat_api/model/microsoft_graph_submission.pyi create mode 100644 flat_api/model/organization_invitation.py create mode 100644 flat_api/model/organization_invitation.pyi create mode 100644 flat_api/model/organization_invitation_creation.py create mode 100644 flat_api/model/organization_invitation_creation.pyi create mode 100644 flat_api/model/organization_roles.py create mode 100644 flat_api/model/organization_roles.pyi create mode 100644 flat_api/model/organization_user_access_token_creation.py create mode 100644 flat_api/model/organization_user_access_token_creation.pyi create mode 100644 flat_api/model/resource_collaborator.py create mode 100644 flat_api/model/resource_collaborator.pyi create mode 100644 flat_api/model/resource_collaborator_creation.py create mode 100644 flat_api/model/resource_collaborator_creation.pyi create mode 100644 flat_api/model/resource_rights.py create mode 100644 flat_api/model/resource_rights.pyi create mode 100644 flat_api/model/score_comment.py create mode 100644 flat_api/model/score_comment.pyi create mode 100644 flat_api/model/score_comment_context.py create mode 100644 flat_api/model/score_comment_context.pyi create mode 100644 flat_api/model/score_comment_creation.py create mode 100644 flat_api/model/score_comment_creation.pyi create mode 100644 flat_api/model/score_comment_update.py create mode 100644 flat_api/model/score_comment_update.pyi create mode 100644 flat_api/model/score_comments_counts.py create mode 100644 flat_api/model/score_comments_counts.pyi create mode 100644 flat_api/model/score_creation.py create mode 100644 flat_api/model/score_creation.pyi create mode 100644 flat_api/model/score_creation_type.py create mode 100644 flat_api/model/score_creation_type.pyi create mode 100644 flat_api/model/score_details.py create mode 100644 flat_api/model/score_details.pyi create mode 100644 flat_api/model/score_fork.py create mode 100644 flat_api/model/score_fork.pyi rename test/test_group_api.py => flat_api/model/score_license.py (52%) create mode 100644 flat_api/model/score_license.pyi create mode 100644 flat_api/model/score_likes_counts.py create mode 100644 flat_api/model/score_likes_counts.pyi create mode 100644 flat_api/model/score_modification.py create mode 100644 flat_api/model/score_modification.pyi create mode 100644 flat_api/model/score_plays_counts.py create mode 100644 flat_api/model/score_plays_counts.pyi create mode 100644 flat_api/model/score_privacy.py create mode 100644 flat_api/model/score_privacy.pyi create mode 100644 flat_api/model/score_revision.py create mode 100644 flat_api/model/score_revision.pyi create mode 100644 flat_api/model/score_revision_creation.py create mode 100644 flat_api/model/score_revision_creation.pyi create mode 100644 flat_api/model/score_revision_statistics.py create mode 100644 flat_api/model/score_revision_statistics.pyi create mode 100644 flat_api/model/score_source.py create mode 100644 flat_api/model/score_source.pyi create mode 100644 flat_api/model/score_track.py create mode 100644 flat_api/model/score_track.pyi create mode 100644 flat_api/model/score_track_creation.py create mode 100644 flat_api/model/score_track_creation.pyi create mode 100644 flat_api/model/score_track_point.py create mode 100644 flat_api/model/score_track_point.pyi create mode 100644 flat_api/model/score_track_state.py create mode 100644 flat_api/model/score_track_state.pyi create mode 100644 flat_api/model/score_track_type.py create mode 100644 flat_api/model/score_track_type.pyi create mode 100644 flat_api/model/score_track_update.py create mode 100644 flat_api/model/score_track_update.pyi create mode 100644 flat_api/model/score_views_counts.py create mode 100644 flat_api/model/score_views_counts.pyi create mode 100644 flat_api/model/task.py create mode 100644 flat_api/model/task.pyi create mode 100644 flat_api/model/task_export_options.py create mode 100644 flat_api/model/task_export_options.pyi create mode 100644 flat_api/model/user_admin_update.py create mode 100644 flat_api/model/user_admin_update.pyi create mode 100644 flat_api/model/user_azure_details.py create mode 100644 flat_api/model/user_azure_details.pyi create mode 100644 flat_api/model/user_community_profile_links.py create mode 100644 flat_api/model/user_community_profile_links.pyi create mode 100644 flat_api/model/user_creation.py create mode 100644 flat_api/model/user_creation.pyi create mode 100644 flat_api/model/user_details.py create mode 100644 flat_api/model/user_details.pyi create mode 100644 flat_api/model/user_details_admin.py create mode 100644 flat_api/model/user_details_admin.pyi create mode 100644 flat_api/model/user_public.py create mode 100644 flat_api/model/user_public.pyi create mode 100644 flat_api/model/user_public_summary.py create mode 100644 flat_api/model/user_public_summary.pyi create mode 100644 flat_api/model/user_signin_link.py create mode 100644 flat_api/model/user_signin_link.pyi create mode 100644 flat_api/model/user_signin_link_creation.py create mode 100644 flat_api/model/user_signin_link_creation.pyi delete mode 100644 flat_api/models/api_access_token.py delete mode 100644 flat_api/models/app_scopes.py delete mode 100644 flat_api/models/assignment.py delete mode 100644 flat_api/models/assignment_canvas.py delete mode 100644 flat_api/models/assignment_copy.py delete mode 100644 flat_api/models/assignment_creation.py delete mode 100644 flat_api/models/assignment_creation_google_classroom.py delete mode 100644 flat_api/models/assignment_creation_microsoft_graph.py delete mode 100644 flat_api/models/assignment_lti.py delete mode 100644 flat_api/models/assignment_mfc.py delete mode 100644 flat_api/models/assignment_submission.py delete mode 100644 flat_api/models/assignment_submission_comment.py delete mode 100644 flat_api/models/assignment_submission_comment_creation.py delete mode 100644 flat_api/models/assignment_submission_history.py delete mode 100644 flat_api/models/assignment_submission_history_attachment.py delete mode 100644 flat_api/models/assignment_submission_state.py delete mode 100644 flat_api/models/assignment_submission_update.py delete mode 100644 flat_api/models/assignment_submission_update_comments.py delete mode 100644 flat_api/models/assignment_type.py delete mode 100644 flat_api/models/class_attachment_creation.py delete mode 100644 flat_api/models/class_creation.py delete mode 100644 flat_api/models/class_details.py delete mode 100644 flat_api/models/class_details_canvas.py delete mode 100644 flat_api/models/class_details_clever.py delete mode 100644 flat_api/models/class_details_google_classroom.py delete mode 100644 flat_api/models/class_details_google_drive.py delete mode 100644 flat_api/models/class_details_issues.py delete mode 100644 flat_api/models/class_details_issues_sync.py delete mode 100644 flat_api/models/class_details_lti.py delete mode 100644 flat_api/models/class_details_mfc.py delete mode 100644 flat_api/models/class_details_microsoft_graph.py delete mode 100644 flat_api/models/class_roles.py delete mode 100644 flat_api/models/class_state.py delete mode 100644 flat_api/models/class_update.py delete mode 100644 flat_api/models/collection.py delete mode 100644 flat_api/models/collection_app.py delete mode 100644 flat_api/models/collection_capabilities.py delete mode 100644 flat_api/models/collection_creation.py delete mode 100644 flat_api/models/collection_modification.py delete mode 100644 flat_api/models/collection_privacy.py delete mode 100644 flat_api/models/collection_type.py delete mode 100644 flat_api/models/flat_error_response.py delete mode 100644 flat_api/models/flat_locales.py delete mode 100644 flat_api/models/google_classroom_coursework.py delete mode 100644 flat_api/models/google_classroom_submission.py delete mode 100644 flat_api/models/group.py delete mode 100644 flat_api/models/group_details.py delete mode 100644 flat_api/models/group_type.py delete mode 100644 flat_api/models/license_mode.py delete mode 100644 flat_api/models/license_sources.py delete mode 100644 flat_api/models/lms_name.py delete mode 100644 flat_api/models/lti_credentials.py delete mode 100644 flat_api/models/lti_credentials_creation.py delete mode 100644 flat_api/models/media_attachment.py delete mode 100644 flat_api/models/media_score_sharing_mode.py delete mode 100644 flat_api/models/microsoft_graph_assignment.py delete mode 100644 flat_api/models/microsoft_graph_submission.py delete mode 100644 flat_api/models/organization_invitation.py delete mode 100644 flat_api/models/organization_invitation_creation.py delete mode 100644 flat_api/models/organization_roles.py delete mode 100644 flat_api/models/organization_user_access_token_creation.py delete mode 100644 flat_api/models/organization_user_signin_link.py delete mode 100644 flat_api/models/organization_user_signin_link_creation.py delete mode 100644 flat_api/models/resource_collaborator.py delete mode 100644 flat_api/models/resource_collaborator_creation.py delete mode 100644 flat_api/models/resource_rights.py delete mode 100644 flat_api/models/score_comment.py delete mode 100644 flat_api/models/score_comment_context.py delete mode 100644 flat_api/models/score_comment_creation.py delete mode 100644 flat_api/models/score_comment_moderation.py delete mode 100644 flat_api/models/score_comment_update.py delete mode 100644 flat_api/models/score_comments_counts.py delete mode 100644 flat_api/models/score_creation.py delete mode 100644 flat_api/models/score_creation_builder_data.py delete mode 100644 flat_api/models/score_creation_builder_data_layout_data.py delete mode 100644 flat_api/models/score_creation_builder_data_score_data.py delete mode 100644 flat_api/models/score_creation_builder_data_score_data_instruments.py delete mode 100644 flat_api/models/score_creation_type.py delete mode 100644 flat_api/models/score_details.py delete mode 100644 flat_api/models/score_fork.py delete mode 100644 flat_api/models/score_license.py delete mode 100644 flat_api/models/score_likes_counts.py delete mode 100644 flat_api/models/score_modification.py delete mode 100644 flat_api/models/score_plays_counts.py delete mode 100644 flat_api/models/score_privacy.py delete mode 100644 flat_api/models/score_revision.py delete mode 100644 flat_api/models/score_revision_creation.py delete mode 100644 flat_api/models/score_revision_statistics.py delete mode 100644 flat_api/models/score_source.py delete mode 100644 flat_api/models/score_track.py delete mode 100644 flat_api/models/score_track_creation.py delete mode 100644 flat_api/models/score_track_point.py delete mode 100644 flat_api/models/score_track_state.py delete mode 100644 flat_api/models/score_track_type.py delete mode 100644 flat_api/models/score_track_update.py delete mode 100644 flat_api/models/score_views_counts.py delete mode 100644 flat_api/models/task.py delete mode 100644 flat_api/models/task_export_options.py delete mode 100644 flat_api/models/task_progress.py delete mode 100644 flat_api/models/user_admin_update.py delete mode 100644 flat_api/models/user_creation.py delete mode 100644 flat_api/models/user_details.py delete mode 100644 flat_api/models/user_details_admin.py delete mode 100644 flat_api/models/user_details_admin_license.py delete mode 100644 flat_api/models/user_public.py delete mode 100644 flat_api/models/user_public_summary.py create mode 100644 flat_api/paths/__init__.py create mode 100644 flat_api/paths/classes/__init__.py create mode 100644 flat_api/paths/classes/get.py create mode 100644 flat_api/paths/classes/get.pyi create mode 100644 flat_api/paths/classes/post.py create mode 100644 flat_api/paths/classes/post.pyi create mode 100644 flat_api/paths/classes_class/__init__.py create mode 100644 flat_api/paths/classes_class/get.py create mode 100644 flat_api/paths/classes_class/get.pyi create mode 100644 flat_api/paths/classes_class/put.py create mode 100644 flat_api/paths/classes_class/put.pyi create mode 100644 flat_api/paths/classes_class_activate/__init__.py create mode 100644 flat_api/paths/classes_class_activate/post.py create mode 100644 flat_api/paths/classes_class_activate/post.pyi create mode 100644 flat_api/paths/classes_class_archive/__init__.py create mode 100644 flat_api/paths/classes_class_archive/delete.py create mode 100644 flat_api/paths/classes_class_archive/delete.pyi create mode 100644 flat_api/paths/classes_class_archive/post.py create mode 100644 flat_api/paths/classes_class_archive/post.pyi create mode 100644 flat_api/paths/classes_class_assignments/__init__.py create mode 100644 flat_api/paths/classes_class_assignments/get.py create mode 100644 flat_api/paths/classes_class_assignments/get.pyi create mode 100644 flat_api/paths/classes_class_assignments/post.py create mode 100644 flat_api/paths/classes_class_assignments/post.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/delete.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/post.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/post.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/post.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/post.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/put.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py create mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi create mode 100644 flat_api/paths/classes_class_students_user_submissions/__init__.py create mode 100644 flat_api/paths/classes_class_students_user_submissions/get.py create mode 100644 flat_api/paths/classes_class_students_user_submissions/get.pyi create mode 100644 flat_api/paths/classes_class_test_student/__init__.py create mode 100644 flat_api/paths/classes_class_test_student/post.py create mode 100644 flat_api/paths/classes_class_test_student/post.pyi create mode 100644 flat_api/paths/classes_class_users_user/__init__.py create mode 100644 flat_api/paths/classes_class_users_user/delete.py create mode 100644 flat_api/paths/classes_class_users_user/delete.pyi create mode 100644 flat_api/paths/classes_class_users_user/put.py create mode 100644 flat_api/paths/classes_class_users_user/put.pyi create mode 100644 flat_api/paths/classes_enroll_enrollment_code/__init__.py create mode 100644 flat_api/paths/classes_enroll_enrollment_code/post.py create mode 100644 flat_api/paths/classes_enroll_enrollment_code/post.pyi create mode 100644 flat_api/paths/collections/__init__.py create mode 100644 flat_api/paths/collections/get.py create mode 100644 flat_api/paths/collections/get.pyi create mode 100644 flat_api/paths/collections/post.py create mode 100644 flat_api/paths/collections/post.pyi create mode 100644 flat_api/paths/collections_collection/__init__.py create mode 100644 flat_api/paths/collections_collection/delete.py create mode 100644 flat_api/paths/collections_collection/delete.pyi create mode 100644 flat_api/paths/collections_collection/get.py create mode 100644 flat_api/paths/collections_collection/get.pyi create mode 100644 flat_api/paths/collections_collection/put.py create mode 100644 flat_api/paths/collections_collection/put.pyi create mode 100644 flat_api/paths/collections_collection_scores/__init__.py create mode 100644 flat_api/paths/collections_collection_scores/get.py create mode 100644 flat_api/paths/collections_collection_scores/get.pyi create mode 100644 flat_api/paths/collections_collection_scores_score/__init__.py create mode 100644 flat_api/paths/collections_collection_scores_score/delete.py create mode 100644 flat_api/paths/collections_collection_scores_score/delete.pyi create mode 100644 flat_api/paths/collections_collection_scores_score/put.py create mode 100644 flat_api/paths/collections_collection_scores_score/put.pyi create mode 100644 flat_api/paths/collections_collection_untrash/__init__.py create mode 100644 flat_api/paths/collections_collection_untrash/post.py create mode 100644 flat_api/paths/collections_collection_untrash/post.pyi create mode 100644 flat_api/paths/edu_resources/__init__.py create mode 100644 flat_api/paths/edu_resources/get.py create mode 100644 flat_api/paths/edu_resources/get.pyi create mode 100644 flat_api/paths/edu_resources/post.py create mode 100644 flat_api/paths/edu_resources/post.pyi create mode 100644 flat_api/paths/edu_resources_libraries/__init__.py create mode 100644 flat_api/paths/edu_resources_libraries/get.py create mode 100644 flat_api/paths/edu_resources_libraries/get.pyi create mode 100644 flat_api/paths/edu_resources_resource/__init__.py create mode 100644 flat_api/paths/edu_resources_resource/delete.py create mode 100644 flat_api/paths/edu_resources_resource/delete.pyi create mode 100644 flat_api/paths/edu_resources_resource/get.py create mode 100644 flat_api/paths/edu_resources_resource/get.pyi create mode 100644 flat_api/paths/edu_resources_resource/put.py create mode 100644 flat_api/paths/edu_resources_resource/put.pyi create mode 100644 flat_api/paths/edu_resources_resource_assignment/__init__.py create mode 100644 flat_api/paths/edu_resources_resource_assignment/put.py create mode 100644 flat_api/paths/edu_resources_resource_assignment/put.pyi create mode 100644 flat_api/paths/edu_resources_resource_copy/__init__.py create mode 100644 flat_api/paths/edu_resources_resource_copy/post.py create mode 100644 flat_api/paths/edu_resources_resource_copy/post.pyi create mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py create mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py create mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi create mode 100644 flat_api/paths/edu_resources_resource_move/__init__.py create mode 100644 flat_api/paths/edu_resources_resource_move/post.py create mode 100644 flat_api/paths/edu_resources_resource_move/post.pyi create mode 100644 flat_api/paths/edu_resources_resource_use_in_class/__init__.py create mode 100644 flat_api/paths/edu_resources_resource_use_in_class/post.py create mode 100644 flat_api/paths/edu_resources_resource_use_in_class/post.pyi create mode 100644 flat_api/paths/groups_group/__init__.py create mode 100644 flat_api/paths/groups_group/get.py create mode 100644 flat_api/paths/groups_group/get.pyi create mode 100644 flat_api/paths/groups_group_scores/__init__.py create mode 100644 flat_api/paths/groups_group_scores/get.py create mode 100644 flat_api/paths/groups_group_scores/get.pyi create mode 100644 flat_api/paths/groups_group_users/__init__.py create mode 100644 flat_api/paths/groups_group_users/get.py create mode 100644 flat_api/paths/groups_group_users/get.pyi create mode 100644 flat_api/paths/me/__init__.py create mode 100644 flat_api/paths/me/get.py create mode 100644 flat_api/paths/me/get.pyi create mode 100644 flat_api/paths/organizations_invitations/__init__.py create mode 100644 flat_api/paths/organizations_invitations/get.py create mode 100644 flat_api/paths/organizations_invitations/get.pyi create mode 100644 flat_api/paths/organizations_invitations/post.py create mode 100644 flat_api/paths/organizations_invitations/post.pyi create mode 100644 flat_api/paths/organizations_invitations_invitation/__init__.py create mode 100644 flat_api/paths/organizations_invitations_invitation/delete.py create mode 100644 flat_api/paths/organizations_invitations_invitation/delete.pyi create mode 100644 flat_api/paths/organizations_lti_credentials/__init__.py create mode 100644 flat_api/paths/organizations_lti_credentials/get.py create mode 100644 flat_api/paths/organizations_lti_credentials/get.pyi create mode 100644 flat_api/paths/organizations_lti_credentials/post.py create mode 100644 flat_api/paths/organizations_lti_credentials/post.pyi create mode 100644 flat_api/paths/organizations_lti_credentials_credentials/__init__.py create mode 100644 flat_api/paths/organizations_lti_credentials_credentials/delete.py create mode 100644 flat_api/paths/organizations_lti_credentials_credentials/delete.pyi create mode 100644 flat_api/paths/organizations_users/__init__.py create mode 100644 flat_api/paths/organizations_users/get.py create mode 100644 flat_api/paths/organizations_users/get.pyi create mode 100644 flat_api/paths/organizations_users/post.py create mode 100644 flat_api/paths/organizations_users/post.pyi create mode 100644 flat_api/paths/organizations_users_count/__init__.py create mode 100644 flat_api/paths/organizations_users_count/get.py create mode 100644 flat_api/paths/organizations_users_count/get.pyi create mode 100644 flat_api/paths/organizations_users_user/__init__.py create mode 100644 flat_api/paths/organizations_users_user/delete.py create mode 100644 flat_api/paths/organizations_users_user/delete.pyi create mode 100644 flat_api/paths/organizations_users_user/put.py create mode 100644 flat_api/paths/organizations_users_user/put.pyi create mode 100644 flat_api/paths/organizations_users_user_access_token/__init__.py create mode 100644 flat_api/paths/organizations_users_user_access_token/post.py create mode 100644 flat_api/paths/organizations_users_user_access_token/post.pyi create mode 100644 flat_api/paths/organizations_users_user_signin_link/__init__.py create mode 100644 flat_api/paths/organizations_users_user_signin_link/post.py create mode 100644 flat_api/paths/organizations_users_user_signin_link/post.pyi create mode 100644 flat_api/paths/scores/__init__.py create mode 100644 flat_api/paths/scores/post.py create mode 100644 flat_api/paths/scores/post.pyi create mode 100644 flat_api/paths/scores_score/__init__.py create mode 100644 flat_api/paths/scores_score/delete.py create mode 100644 flat_api/paths/scores_score/delete.pyi create mode 100644 flat_api/paths/scores_score/get.py create mode 100644 flat_api/paths/scores_score/get.pyi create mode 100644 flat_api/paths/scores_score/put.py create mode 100644 flat_api/paths/scores_score/put.pyi create mode 100644 flat_api/paths/scores_score_collaborators/__init__.py create mode 100644 flat_api/paths/scores_score_collaborators/get.py create mode 100644 flat_api/paths/scores_score_collaborators/get.pyi create mode 100644 flat_api/paths/scores_score_collaborators/post.py create mode 100644 flat_api/paths/scores_score_collaborators/post.pyi create mode 100644 flat_api/paths/scores_score_collaborators_collaborator/__init__.py create mode 100644 flat_api/paths/scores_score_collaborators_collaborator/delete.py create mode 100644 flat_api/paths/scores_score_collaborators_collaborator/delete.pyi create mode 100644 flat_api/paths/scores_score_collaborators_collaborator/get.py create mode 100644 flat_api/paths/scores_score_collaborators_collaborator/get.pyi create mode 100644 flat_api/paths/scores_score_comments/__init__.py create mode 100644 flat_api/paths/scores_score_comments/get.py create mode 100644 flat_api/paths/scores_score_comments/get.pyi create mode 100644 flat_api/paths/scores_score_comments/post.py create mode 100644 flat_api/paths/scores_score_comments/post.pyi create mode 100644 flat_api/paths/scores_score_comments_comment/__init__.py create mode 100644 flat_api/paths/scores_score_comments_comment/delete.py create mode 100644 flat_api/paths/scores_score_comments_comment/delete.pyi create mode 100644 flat_api/paths/scores_score_comments_comment/put.py create mode 100644 flat_api/paths/scores_score_comments_comment/put.pyi create mode 100644 flat_api/paths/scores_score_comments_comment_resolved/__init__.py create mode 100644 flat_api/paths/scores_score_comments_comment_resolved/delete.py create mode 100644 flat_api/paths/scores_score_comments_comment_resolved/delete.pyi create mode 100644 flat_api/paths/scores_score_comments_comment_resolved/put.py create mode 100644 flat_api/paths/scores_score_comments_comment_resolved/put.pyi create mode 100644 flat_api/paths/scores_score_fork/__init__.py create mode 100644 flat_api/paths/scores_score_fork/post.py create mode 100644 flat_api/paths/scores_score_fork/post.pyi create mode 100644 flat_api/paths/scores_score_revisions/__init__.py create mode 100644 flat_api/paths/scores_score_revisions/get.py create mode 100644 flat_api/paths/scores_score_revisions/get.pyi create mode 100644 flat_api/paths/scores_score_revisions/post.py create mode 100644 flat_api/paths/scores_score_revisions/post.pyi create mode 100644 flat_api/paths/scores_score_revisions_revision/__init__.py create mode 100644 flat_api/paths/scores_score_revisions_revision/get.py create mode 100644 flat_api/paths/scores_score_revisions_revision/get.pyi create mode 100644 flat_api/paths/scores_score_revisions_revision_format/__init__.py create mode 100644 flat_api/paths/scores_score_revisions_revision_format/get.py create mode 100644 flat_api/paths/scores_score_revisions_revision_format/get.pyi create mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/__init__.py create mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/post.py create mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/post.pyi create mode 100644 flat_api/paths/scores_score_submissions/__init__.py create mode 100644 flat_api/paths/scores_score_submissions/get.py create mode 100644 flat_api/paths/scores_score_submissions/get.pyi create mode 100644 flat_api/paths/scores_score_tracks/__init__.py create mode 100644 flat_api/paths/scores_score_tracks/get.py create mode 100644 flat_api/paths/scores_score_tracks/get.pyi create mode 100644 flat_api/paths/scores_score_tracks/post.py create mode 100644 flat_api/paths/scores_score_tracks/post.pyi create mode 100644 flat_api/paths/scores_score_tracks_track/__init__.py create mode 100644 flat_api/paths/scores_score_tracks_track/delete.py create mode 100644 flat_api/paths/scores_score_tracks_track/delete.pyi create mode 100644 flat_api/paths/scores_score_tracks_track/get.py create mode 100644 flat_api/paths/scores_score_tracks_track/get.pyi create mode 100644 flat_api/paths/scores_score_tracks_track/put.py create mode 100644 flat_api/paths/scores_score_tracks_track/put.pyi create mode 100644 flat_api/paths/scores_score_untrash/__init__.py create mode 100644 flat_api/paths/scores_score_untrash/post.py create mode 100644 flat_api/paths/scores_score_untrash/post.pyi create mode 100644 flat_api/paths/tasks_task/__init__.py create mode 100644 flat_api/paths/tasks_task/get.py create mode 100644 flat_api/paths/tasks_task/get.pyi create mode 100644 flat_api/paths/users_user/__init__.py create mode 100644 flat_api/paths/users_user/get.py create mode 100644 flat_api/paths/users_user/get.pyi create mode 100644 flat_api/paths/users_user_likes/__init__.py create mode 100644 flat_api/paths/users_user_likes/get.py create mode 100644 flat_api/paths/users_user_likes/get.pyi create mode 100644 flat_api/paths/users_user_scores/__init__.py create mode 100644 flat_api/paths/users_user_scores/get.py create mode 100644 flat_api/paths/users_user_scores/get.pyi create mode 100644 flat_api/schemas.py create mode 100644 setup.cfg delete mode 100644 test/test_assignment_creation_microsoft_graph.py delete mode 100644 test/test_assignment_submission_history_attachment.py delete mode 100644 test/test_assignment_submission_update_comments.py delete mode 100644 test/test_class_api.py delete mode 100644 test/test_class_details_canvas.py delete mode 100644 test/test_class_details_clever.py delete mode 100644 test/test_class_details_google_classroom.py delete mode 100644 test/test_class_details_google_drive.py delete mode 100644 test/test_class_details_issues.py delete mode 100644 test/test_class_details_issues_sync.py delete mode 100644 test/test_class_details_lti.py delete mode 100644 test/test_class_details_mfc.py delete mode 100644 test/test_class_details_microsoft_graph.py delete mode 100644 test/test_collection_api.py delete mode 100644 test/test_collection_capabilities.py create mode 100644 test/test_models/__init__.py rename test/{ => test_models}/test_api_access_token.py (79%) rename test/{ => test_models}/test_app_scopes.py (80%) rename test/{ => test_models}/test_assignment.py (80%) rename test/{ => test_models}/test_assignment_copy.py (79%) rename test/{test_account_api.py => test_models/test_assignment_copy_response.py} (77%) rename test/{ => test_models}/test_assignment_submission.py (78%) rename test/{ => test_models}/test_assignment_submission_comment.py (77%) rename test/{ => test_models}/test_assignment_submission_comment_creation.py (76%) rename test/{ => test_models}/test_assignment_submission_history.py (77%) rename test/{test_task_progress.py => test_models/test_assignment_submission_history_state.py} (76%) rename test/{ => test_models}/test_assignment_submission_state.py (77%) rename test/{ => test_models}/test_assignment_submission_update.py (77%) rename test/{ => test_models}/test_assignment_type.py (79%) rename test/{test_assignment_lti.py => test_models/test_assignment_update.py} (76%) create mode 100644 test/test_models/test_class_assignment.py create mode 100644 test/test_models/test_class_assignment_update.py rename test/{ => test_models}/test_class_attachment_creation.py (78%) rename test/{ => test_models}/test_class_creation.py (79%) rename test/{ => test_models}/test_class_details.py (80%) create mode 100644 test/test_models/test_class_grade_level.py rename test/{ => test_models}/test_class_roles.py (80%) rename test/{ => test_models}/test_class_state.py (80%) rename test/{ => test_models}/test_class_update.py (80%) rename test/{ => test_models}/test_collection.py (80%) rename test/{ => test_models}/test_collection_app.py (79%) rename test/{ => test_models}/test_collection_creation.py (79%) rename test/{ => test_models}/test_collection_modification.py (78%) rename test/{ => test_models}/test_collection_privacy.py (79%) rename test/{ => test_models}/test_collection_type.py (79%) create mode 100644 test/test_models/test_edu_library.py create mode 100644 test/test_models/test_edu_resource.py create mode 100644 test/test_models/test_edu_resource_copy.py create mode 100644 test/test_models/test_edu_resource_creation.py create mode 100644 test/test_models/test_edu_resource_move.py create mode 100644 test/test_models/test_edu_resource_privacy.py create mode 100644 test/test_models/test_edu_resource_type.py rename test/{test_task_api.py => test_models/test_edu_resource_update.py} (79%) rename test/{test_assignment_mfc.py => test_models/test_edu_resource_use_in_class.py} (76%) create mode 100644 test/test_models/test_edu_skills_focused.py rename test/{ => test_models}/test_flat_error_response.py (79%) rename test/{ => test_models}/test_flat_locales.py (80%) rename test/{ => test_models}/test_google_classroom_coursework.py (77%) rename test/{ => test_models}/test_google_classroom_submission.py (77%) rename test/{ => test_models}/test_group.py (81%) rename test/{ => test_models}/test_group_details.py (80%) rename test/{ => test_models}/test_group_type.py (80%) rename test/{ => test_models}/test_license_mode.py (80%) rename test/{ => test_models}/test_license_sources.py (79%) rename test/{ => test_models}/test_lms_name.py (81%) rename test/{ => test_models}/test_lti_credentials.py (79%) rename test/{ => test_models}/test_lti_credentials_creation.py (78%) rename test/{ => test_models}/test_media_attachment.py (79%) rename test/{ => test_models}/test_media_score_sharing_mode.py (78%) rename test/{ => test_models}/test_microsoft_graph_assignment.py (77%) rename test/{ => test_models}/test_microsoft_graph_submission.py (77%) rename test/{ => test_models}/test_organization_invitation.py (78%) rename test/{ => test_models}/test_organization_invitation_creation.py (77%) rename test/{ => test_models}/test_organization_roles.py (79%) rename test/{ => test_models}/test_organization_user_access_token_creation.py (76%) rename test/{ => test_models}/test_resource_collaborator.py (78%) rename test/{ => test_models}/test_resource_collaborator_creation.py (77%) rename test/{ => test_models}/test_resource_rights.py (79%) rename test/{ => test_models}/test_score_comment.py (80%) rename test/{ => test_models}/test_score_comment_context.py (78%) rename test/{ => test_models}/test_score_comment_creation.py (78%) rename test/{ => test_models}/test_score_comment_update.py (78%) rename test/{ => test_models}/test_score_comments_counts.py (78%) rename test/{ => test_models}/test_score_creation.py (79%) rename test/{ => test_models}/test_score_creation_type.py (79%) rename test/{ => test_models}/test_score_details.py (80%) rename test/{ => test_models}/test_score_fork.py (80%) rename test/{ => test_models}/test_score_license.py (80%) rename test/{ => test_models}/test_score_likes_counts.py (79%) rename test/{ => test_models}/test_score_modification.py (79%) rename test/{ => test_models}/test_score_plays_counts.py (79%) rename test/{ => test_models}/test_score_privacy.py (80%) rename test/{ => test_models}/test_score_revision.py (79%) rename test/{ => test_models}/test_score_revision_creation.py (78%) rename test/{ => test_models}/test_score_revision_statistics.py (78%) rename test/{ => test_models}/test_score_source.py (80%) rename test/{ => test_models}/test_score_track.py (80%) rename test/{ => test_models}/test_score_track_creation.py (78%) rename test/{ => test_models}/test_score_track_point.py (79%) rename test/{ => test_models}/test_score_track_state.py (79%) rename test/{ => test_models}/test_score_track_type.py (79%) rename test/{ => test_models}/test_score_track_update.py (79%) rename test/{ => test_models}/test_score_views_counts.py (79%) rename test/{ => test_models}/test_task.py (81%) rename test/{ => test_models}/test_task_export_options.py (79%) rename test/{ => test_models}/test_user_admin_update.py (79%) create mode 100644 test/test_models/test_user_azure_details.py create mode 100644 test/test_models/test_user_community_profile_links.py rename test/{ => test_models}/test_user_creation.py (80%) rename test/{ => test_models}/test_user_details.py (80%) rename test/{ => test_models}/test_user_details_admin.py (79%) rename test/{ => test_models}/test_user_public.py (80%) rename test/{ => test_models}/test_user_public_summary.py (79%) create mode 100644 test/test_models/test_user_signin_link.py create mode 100644 test/test_models/test_user_signin_link_creation.py delete mode 100644 test/test_organization_api.py delete mode 100644 test/test_organization_user_signin_link.py delete mode 100644 test/test_organization_user_signin_link_creation.py create mode 100644 test/test_paths/__init__.py create mode 100644 test/test_paths/test_classes/__init__.py create mode 100644 test/test_paths/test_classes/test_get.py create mode 100644 test/test_paths/test_classes/test_post.py create mode 100644 test/test_paths/test_classes_class/__init__.py create mode 100644 test/test_paths/test_classes_class/test_get.py create mode 100644 test/test_paths/test_classes_class/test_put.py create mode 100644 test/test_paths/test_classes_class_activate/__init__.py create mode 100644 test/test_paths/test_classes_class_activate/test_post.py create mode 100644 test/test_paths/test_classes_class_archive/__init__.py create mode 100644 test/test_paths/test_classes_class_archive/test_delete.py create mode 100644 test/test_paths/test_classes_class_archive/test_post.py create mode 100644 test/test_paths/test_classes_class_assignments/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments/test_post.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py create mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py create mode 100644 test/test_paths/test_classes_class_students_user_submissions/__init__.py create mode 100644 test/test_paths/test_classes_class_students_user_submissions/test_get.py create mode 100644 test/test_paths/test_classes_class_test_student/__init__.py create mode 100644 test/test_paths/test_classes_class_test_student/test_post.py create mode 100644 test/test_paths/test_classes_class_users_user/__init__.py create mode 100644 test/test_paths/test_classes_class_users_user/test_delete.py create mode 100644 test/test_paths/test_classes_class_users_user/test_put.py create mode 100644 test/test_paths/test_classes_enroll_enrollment_code/__init__.py create mode 100644 test/test_paths/test_classes_enroll_enrollment_code/test_post.py create mode 100644 test/test_paths/test_collections/__init__.py create mode 100644 test/test_paths/test_collections/test_get.py create mode 100644 test/test_paths/test_collections/test_post.py create mode 100644 test/test_paths/test_collections_collection/__init__.py create mode 100644 test/test_paths/test_collections_collection/test_delete.py create mode 100644 test/test_paths/test_collections_collection/test_get.py create mode 100644 test/test_paths/test_collections_collection/test_put.py create mode 100644 test/test_paths/test_collections_collection_scores/__init__.py create mode 100644 test/test_paths/test_collections_collection_scores/test_get.py create mode 100644 test/test_paths/test_collections_collection_scores_score/__init__.py create mode 100644 test/test_paths/test_collections_collection_scores_score/test_delete.py create mode 100644 test/test_paths/test_collections_collection_scores_score/test_put.py create mode 100644 test/test_paths/test_collections_collection_untrash/__init__.py create mode 100644 test/test_paths/test_collections_collection_untrash/test_post.py create mode 100644 test/test_paths/test_edu_resources/__init__.py create mode 100644 test/test_paths/test_edu_resources/test_get.py create mode 100644 test/test_paths/test_edu_resources/test_post.py create mode 100644 test/test_paths/test_edu_resources_libraries/__init__.py create mode 100644 test/test_paths/test_edu_resources_libraries/test_get.py create mode 100644 test/test_paths/test_edu_resources_resource/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource/test_delete.py create mode 100644 test/test_paths/test_edu_resources_resource/test_get.py create mode 100644 test/test_paths/test_edu_resources_resource/test_put.py create mode 100644 test/test_paths/test_edu_resources_resource_assignment/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource_assignment/test_put.py create mode 100644 test/test_paths/test_edu_resources_resource_copy/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource_copy/test_post.py create mode 100644 test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py create mode 100644 test/test_paths/test_edu_resources_resource_move/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource_move/test_post.py create mode 100644 test/test_paths/test_edu_resources_resource_use_in_class/__init__.py create mode 100644 test/test_paths/test_edu_resources_resource_use_in_class/test_post.py create mode 100644 test/test_paths/test_groups_group/__init__.py create mode 100644 test/test_paths/test_groups_group/test_get.py create mode 100644 test/test_paths/test_groups_group_scores/__init__.py create mode 100644 test/test_paths/test_groups_group_scores/test_get.py create mode 100644 test/test_paths/test_groups_group_users/__init__.py create mode 100644 test/test_paths/test_groups_group_users/test_get.py create mode 100644 test/test_paths/test_me/__init__.py create mode 100644 test/test_paths/test_me/test_get.py create mode 100644 test/test_paths/test_organizations_invitations/__init__.py create mode 100644 test/test_paths/test_organizations_invitations/test_get.py create mode 100644 test/test_paths/test_organizations_invitations/test_post.py create mode 100644 test/test_paths/test_organizations_invitations_invitation/__init__.py create mode 100644 test/test_paths/test_organizations_invitations_invitation/test_delete.py create mode 100644 test/test_paths/test_organizations_lti_credentials/__init__.py create mode 100644 test/test_paths/test_organizations_lti_credentials/test_get.py create mode 100644 test/test_paths/test_organizations_lti_credentials/test_post.py create mode 100644 test/test_paths/test_organizations_lti_credentials_credentials/__init__.py create mode 100644 test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py create mode 100644 test/test_paths/test_organizations_users/__init__.py create mode 100644 test/test_paths/test_organizations_users/test_get.py create mode 100644 test/test_paths/test_organizations_users/test_post.py create mode 100644 test/test_paths/test_organizations_users_count/__init__.py create mode 100644 test/test_paths/test_organizations_users_count/test_get.py create mode 100644 test/test_paths/test_organizations_users_user/__init__.py create mode 100644 test/test_paths/test_organizations_users_user/test_delete.py create mode 100644 test/test_paths/test_organizations_users_user/test_put.py create mode 100644 test/test_paths/test_organizations_users_user_access_token/__init__.py create mode 100644 test/test_paths/test_organizations_users_user_access_token/test_post.py create mode 100644 test/test_paths/test_organizations_users_user_signin_link/__init__.py create mode 100644 test/test_paths/test_organizations_users_user_signin_link/test_post.py create mode 100644 test/test_paths/test_scores/__init__.py create mode 100644 test/test_paths/test_scores/test_post.py create mode 100644 test/test_paths/test_scores_score/__init__.py create mode 100644 test/test_paths/test_scores_score/test_delete.py create mode 100644 test/test_paths/test_scores_score/test_get.py create mode 100644 test/test_paths/test_scores_score/test_put.py create mode 100644 test/test_paths/test_scores_score_collaborators/__init__.py create mode 100644 test/test_paths/test_scores_score_collaborators/test_get.py create mode 100644 test/test_paths/test_scores_score_collaborators/test_post.py create mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/__init__.py create mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py create mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/test_get.py create mode 100644 test/test_paths/test_scores_score_comments/__init__.py create mode 100644 test/test_paths/test_scores_score_comments/test_get.py create mode 100644 test/test_paths/test_scores_score_comments/test_post.py create mode 100644 test/test_paths/test_scores_score_comments_comment/__init__.py create mode 100644 test/test_paths/test_scores_score_comments_comment/test_delete.py create mode 100644 test/test_paths/test_scores_score_comments_comment/test_put.py create mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/__init__.py create mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py create mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/test_put.py create mode 100644 test/test_paths/test_scores_score_fork/__init__.py create mode 100644 test/test_paths/test_scores_score_fork/test_post.py create mode 100644 test/test_paths/test_scores_score_revisions/__init__.py create mode 100644 test/test_paths/test_scores_score_revisions/test_get.py create mode 100644 test/test_paths/test_scores_score_revisions/test_post.py create mode 100644 test/test_paths/test_scores_score_revisions_revision/__init__.py create mode 100644 test/test_paths/test_scores_score_revisions_revision/test_get.py create mode 100644 test/test_paths/test_scores_score_revisions_revision_format/__init__.py create mode 100644 test/test_paths/test_scores_score_revisions_revision_format/test_get.py create mode 100644 test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py create mode 100644 test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py create mode 100644 test/test_paths/test_scores_score_submissions/__init__.py create mode 100644 test/test_paths/test_scores_score_submissions/test_get.py create mode 100644 test/test_paths/test_scores_score_tracks/__init__.py create mode 100644 test/test_paths/test_scores_score_tracks/test_get.py create mode 100644 test/test_paths/test_scores_score_tracks/test_post.py create mode 100644 test/test_paths/test_scores_score_tracks_track/__init__.py create mode 100644 test/test_paths/test_scores_score_tracks_track/test_delete.py create mode 100644 test/test_paths/test_scores_score_tracks_track/test_get.py create mode 100644 test/test_paths/test_scores_score_tracks_track/test_put.py create mode 100644 test/test_paths/test_scores_score_untrash/__init__.py create mode 100644 test/test_paths/test_scores_score_untrash/test_post.py create mode 100644 test/test_paths/test_tasks_task/__init__.py create mode 100644 test/test_paths/test_tasks_task/test_get.py create mode 100644 test/test_paths/test_users_user/__init__.py create mode 100644 test/test_paths/test_users_user/test_get.py create mode 100644 test/test_paths/test_users_user_likes/__init__.py create mode 100644 test/test_paths/test_users_user_likes/test_get.py create mode 100644 test/test_paths/test_users_user_scores/__init__.py create mode 100644 test/test_paths/test_users_user_scores/test_get.py delete mode 100644 test/test_score_api.py delete mode 100644 test/test_score_comment_moderation.py delete mode 100644 test/test_score_creation_builder_data.py delete mode 100644 test/test_score_creation_builder_data_layout_data.py delete mode 100644 test/test_score_creation_builder_data_score_data.py delete mode 100644 test/test_score_creation_builder_data_score_data_instruments.py delete mode 100644 test/test_user_api.py delete mode 100644 test/test_user_details_admin_license.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2cf9e5d..31e7c2a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7" "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..21132e1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.tests: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=flat_api + +test-3.5: + extends: .tests + image: python:3.5-alpine +test-3.6: + extends: .tests + image: python:3.6-alpine +test-3.7: + extends: .tests + image: python:3.7-alpine +test-3.8: + extends: .tests + image: python:3.8-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6c3f85a..b199c04 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,245 +1,431 @@ .gitlab-ci.yml README.md -docs/AccountApi.md -docs/ApiAccessToken.md -docs/AppScopes.md -docs/Assignment.md -docs/AssignmentCanvas.md -docs/AssignmentCopy.md -docs/AssignmentCreation.md -docs/AssignmentCreationGoogleClassroom.md -docs/AssignmentCreationMicrosoftGraph.md -docs/AssignmentLti.md -docs/AssignmentMfc.md -docs/AssignmentSubmission.md -docs/AssignmentSubmissionComment.md -docs/AssignmentSubmissionCommentCreation.md -docs/AssignmentSubmissionHistory.md -docs/AssignmentSubmissionHistoryAttachment.md -docs/AssignmentSubmissionState.md -docs/AssignmentSubmissionUpdate.md -docs/AssignmentSubmissionUpdateComments.md -docs/AssignmentType.md -docs/ClassApi.md -docs/ClassAttachmentCreation.md -docs/ClassCreation.md -docs/ClassDetails.md -docs/ClassDetailsCanvas.md -docs/ClassDetailsClever.md -docs/ClassDetailsGoogleClassroom.md -docs/ClassDetailsGoogleDrive.md -docs/ClassDetailsIssues.md -docs/ClassDetailsIssuesSync.md -docs/ClassDetailsLti.md -docs/ClassDetailsMfc.md -docs/ClassDetailsMicrosoftGraph.md -docs/ClassRoles.md -docs/ClassState.md -docs/ClassUpdate.md -docs/Collection.md -docs/CollectionApi.md -docs/CollectionApp.md -docs/CollectionCapabilities.md -docs/CollectionCreation.md -docs/CollectionModification.md -docs/CollectionPrivacy.md -docs/CollectionType.md -docs/FlatErrorResponse.md -docs/FlatLocales.md -docs/GoogleClassroomCoursework.md -docs/GoogleClassroomSubmission.md -docs/Group.md -docs/GroupApi.md -docs/GroupDetails.md -docs/GroupType.md -docs/LicenseMode.md -docs/LicenseSources.md -docs/LmsName.md -docs/LtiCredentials.md -docs/LtiCredentialsCreation.md -docs/MediaAttachment.md -docs/MediaScoreSharingMode.md -docs/MicrosoftGraphAssignment.md -docs/MicrosoftGraphSubmission.md -docs/OrganizationApi.md -docs/OrganizationInvitation.md -docs/OrganizationInvitationCreation.md -docs/OrganizationRoles.md -docs/OrganizationUserAccessTokenCreation.md -docs/OrganizationUserSigninLink.md -docs/OrganizationUserSigninLinkCreation.md -docs/ResourceCollaborator.md -docs/ResourceCollaboratorCreation.md -docs/ResourceRights.md -docs/ScoreApi.md -docs/ScoreComment.md -docs/ScoreCommentContext.md -docs/ScoreCommentCreation.md -docs/ScoreCommentModeration.md -docs/ScoreCommentUpdate.md -docs/ScoreCommentsCounts.md -docs/ScoreCreation.md -docs/ScoreCreationBuilderData.md -docs/ScoreCreationBuilderDataLayoutData.md -docs/ScoreCreationBuilderDataScoreData.md -docs/ScoreCreationBuilderDataScoreDataInstruments.md -docs/ScoreCreationType.md -docs/ScoreDetails.md -docs/ScoreFork.md -docs/ScoreLicense.md -docs/ScoreLikesCounts.md -docs/ScoreModification.md -docs/ScorePlaysCounts.md -docs/ScorePrivacy.md -docs/ScoreRevision.md -docs/ScoreRevisionCreation.md -docs/ScoreRevisionStatistics.md -docs/ScoreSource.md -docs/ScoreTrack.md -docs/ScoreTrackCreation.md -docs/ScoreTrackPoint.md -docs/ScoreTrackState.md -docs/ScoreTrackType.md -docs/ScoreTrackUpdate.md -docs/ScoreViewsCounts.md -docs/Task.md -docs/TaskApi.md -docs/TaskExportOptions.md -docs/TaskProgress.md -docs/UserAdminUpdate.md -docs/UserApi.md -docs/UserCreation.md -docs/UserDetails.md -docs/UserDetailsAdmin.md -docs/UserDetailsAdminLicense.md -docs/UserPublic.md -docs/UserPublicSummary.md +docs/apis/tags/AccountApi.md +docs/apis/tags/CollectionApi.md +docs/apis/tags/EduResourcesApi.md +docs/apis/tags/GroupApi.md +docs/apis/tags/ModelClassApi.md +docs/apis/tags/OrganizationApi.md +docs/apis/tags/ScoreApi.md +docs/apis/tags/TaskApi.md +docs/apis/tags/UserApi.md +docs/models/ApiAccessToken.md +docs/models/AppScopes.md +docs/models/Assignment.md +docs/models/AssignmentCopy.md +docs/models/AssignmentCopyResponse.md +docs/models/AssignmentSubmission.md +docs/models/AssignmentSubmissionComment.md +docs/models/AssignmentSubmissionCommentCreation.md +docs/models/AssignmentSubmissionHistory.md +docs/models/AssignmentSubmissionHistoryState.md +docs/models/AssignmentSubmissionState.md +docs/models/AssignmentSubmissionUpdate.md +docs/models/AssignmentType.md +docs/models/AssignmentUpdate.md +docs/models/ClassAssignment.md +docs/models/ClassAssignmentUpdate.md +docs/models/ClassAttachmentCreation.md +docs/models/ClassCreation.md +docs/models/ClassDetails.md +docs/models/ClassGradeLevel.md +docs/models/ClassRoles.md +docs/models/ClassState.md +docs/models/ClassUpdate.md +docs/models/Collection.md +docs/models/CollectionApp.md +docs/models/CollectionCreation.md +docs/models/CollectionModification.md +docs/models/CollectionPrivacy.md +docs/models/CollectionType.md +docs/models/EduLibrary.md +docs/models/EduResource.md +docs/models/EduResourceCopy.md +docs/models/EduResourceCreation.md +docs/models/EduResourceMove.md +docs/models/EduResourcePrivacy.md +docs/models/EduResourceType.md +docs/models/EduResourceUpdate.md +docs/models/EduResourceUseInClass.md +docs/models/EduSkillsFocused.md +docs/models/FlatErrorResponse.md +docs/models/FlatLocales.md +docs/models/GoogleClassroomCoursework.md +docs/models/GoogleClassroomSubmission.md +docs/models/Group.md +docs/models/GroupDetails.md +docs/models/GroupType.md +docs/models/LicenseMode.md +docs/models/LicenseSources.md +docs/models/LmsName.md +docs/models/LtiCredentials.md +docs/models/LtiCredentialsCreation.md +docs/models/MediaAttachment.md +docs/models/MediaScoreSharingMode.md +docs/models/MicrosoftGraphAssignment.md +docs/models/MicrosoftGraphSubmission.md +docs/models/OrganizationInvitation.md +docs/models/OrganizationInvitationCreation.md +docs/models/OrganizationRoles.md +docs/models/OrganizationUserAccessTokenCreation.md +docs/models/ResourceCollaborator.md +docs/models/ResourceCollaboratorCreation.md +docs/models/ResourceRights.md +docs/models/ScoreComment.md +docs/models/ScoreCommentContext.md +docs/models/ScoreCommentCreation.md +docs/models/ScoreCommentUpdate.md +docs/models/ScoreCommentsCounts.md +docs/models/ScoreCreation.md +docs/models/ScoreCreationType.md +docs/models/ScoreDetails.md +docs/models/ScoreFork.md +docs/models/ScoreLicense.md +docs/models/ScoreLikesCounts.md +docs/models/ScoreModification.md +docs/models/ScorePlaysCounts.md +docs/models/ScorePrivacy.md +docs/models/ScoreRevision.md +docs/models/ScoreRevisionCreation.md +docs/models/ScoreRevisionStatistics.md +docs/models/ScoreSource.md +docs/models/ScoreTrack.md +docs/models/ScoreTrackCreation.md +docs/models/ScoreTrackPoint.md +docs/models/ScoreTrackState.md +docs/models/ScoreTrackType.md +docs/models/ScoreTrackUpdate.md +docs/models/ScoreViewsCounts.md +docs/models/Task.md +docs/models/TaskExportOptions.md +docs/models/UserAdminUpdate.md +docs/models/UserAzureDetails.md +docs/models/UserCommunityProfileLinks.md +docs/models/UserCreation.md +docs/models/UserDetails.md +docs/models/UserDetailsAdmin.md +docs/models/UserPublic.md +docs/models/UserPublicSummary.md +docs/models/UserSigninLink.md +docs/models/UserSigninLinkCreation.md flat_api/__init__.py -flat_api/api/__init__.py -flat_api/api/account_api.py -flat_api/api/class_api.py -flat_api/api/collection_api.py -flat_api/api/group_api.py -flat_api/api/organization_api.py -flat_api/api/score_api.py -flat_api/api/task_api.py -flat_api/api/user_api.py flat_api/api_client.py flat_api/apis/__init__.py +flat_api/apis/tags/account_api.py +flat_api/apis/tags/collection_api.py +flat_api/apis/tags/edu_resources_api.py +flat_api/apis/tags/group_api.py +flat_api/apis/tags/model_class_api.py +flat_api/apis/tags/organization_api.py +flat_api/apis/tags/score_api.py +flat_api/apis/tags/task_api.py +flat_api/apis/tags/user_api.py flat_api/configuration.py flat_api/exceptions.py flat_api/model/__init__.py flat_api/model/api_access_token.py +flat_api/model/api_access_token.pyi flat_api/model/app_scopes.py +flat_api/model/app_scopes.pyi flat_api/model/assignment.py -flat_api/model/assignment_canvas.py +flat_api/model/assignment.pyi flat_api/model/assignment_copy.py -flat_api/model/assignment_creation.py -flat_api/model/assignment_creation_google_classroom.py -flat_api/model/assignment_creation_microsoft_graph.py -flat_api/model/assignment_lti.py -flat_api/model/assignment_mfc.py +flat_api/model/assignment_copy.pyi +flat_api/model/assignment_copy_response.py +flat_api/model/assignment_copy_response.pyi flat_api/model/assignment_submission.py +flat_api/model/assignment_submission.pyi flat_api/model/assignment_submission_comment.py +flat_api/model/assignment_submission_comment.pyi flat_api/model/assignment_submission_comment_creation.py +flat_api/model/assignment_submission_comment_creation.pyi flat_api/model/assignment_submission_history.py -flat_api/model/assignment_submission_history_attachment.py +flat_api/model/assignment_submission_history.pyi +flat_api/model/assignment_submission_history_state.py +flat_api/model/assignment_submission_history_state.pyi flat_api/model/assignment_submission_state.py +flat_api/model/assignment_submission_state.pyi flat_api/model/assignment_submission_update.py -flat_api/model/assignment_submission_update_comments.py +flat_api/model/assignment_submission_update.pyi flat_api/model/assignment_type.py +flat_api/model/assignment_type.pyi +flat_api/model/assignment_update.py +flat_api/model/assignment_update.pyi +flat_api/model/class_assignment.py +flat_api/model/class_assignment.pyi +flat_api/model/class_assignment_update.py +flat_api/model/class_assignment_update.pyi flat_api/model/class_attachment_creation.py +flat_api/model/class_attachment_creation.pyi flat_api/model/class_creation.py +flat_api/model/class_creation.pyi flat_api/model/class_details.py -flat_api/model/class_details_canvas.py -flat_api/model/class_details_clever.py -flat_api/model/class_details_google_classroom.py -flat_api/model/class_details_google_drive.py -flat_api/model/class_details_issues.py -flat_api/model/class_details_issues_sync.py -flat_api/model/class_details_lti.py -flat_api/model/class_details_mfc.py -flat_api/model/class_details_microsoft_graph.py +flat_api/model/class_details.pyi +flat_api/model/class_grade_level.py +flat_api/model/class_grade_level.pyi flat_api/model/class_roles.py +flat_api/model/class_roles.pyi flat_api/model/class_state.py +flat_api/model/class_state.pyi flat_api/model/class_update.py +flat_api/model/class_update.pyi flat_api/model/collection.py +flat_api/model/collection.pyi flat_api/model/collection_app.py -flat_api/model/collection_capabilities.py +flat_api/model/collection_app.pyi flat_api/model/collection_creation.py +flat_api/model/collection_creation.pyi flat_api/model/collection_modification.py +flat_api/model/collection_modification.pyi flat_api/model/collection_privacy.py +flat_api/model/collection_privacy.pyi flat_api/model/collection_type.py +flat_api/model/collection_type.pyi +flat_api/model/edu_library.py +flat_api/model/edu_library.pyi +flat_api/model/edu_resource.py +flat_api/model/edu_resource.pyi +flat_api/model/edu_resource_copy.py +flat_api/model/edu_resource_copy.pyi +flat_api/model/edu_resource_creation.py +flat_api/model/edu_resource_creation.pyi +flat_api/model/edu_resource_move.py +flat_api/model/edu_resource_move.pyi +flat_api/model/edu_resource_privacy.py +flat_api/model/edu_resource_privacy.pyi +flat_api/model/edu_resource_type.py +flat_api/model/edu_resource_type.pyi +flat_api/model/edu_resource_update.py +flat_api/model/edu_resource_update.pyi +flat_api/model/edu_resource_use_in_class.py +flat_api/model/edu_resource_use_in_class.pyi +flat_api/model/edu_skills_focused.py +flat_api/model/edu_skills_focused.pyi flat_api/model/flat_error_response.py +flat_api/model/flat_error_response.pyi flat_api/model/flat_locales.py +flat_api/model/flat_locales.pyi flat_api/model/google_classroom_coursework.py +flat_api/model/google_classroom_coursework.pyi flat_api/model/google_classroom_submission.py +flat_api/model/google_classroom_submission.pyi flat_api/model/group.py +flat_api/model/group.pyi flat_api/model/group_details.py +flat_api/model/group_details.pyi flat_api/model/group_type.py +flat_api/model/group_type.pyi flat_api/model/license_mode.py +flat_api/model/license_mode.pyi flat_api/model/license_sources.py +flat_api/model/license_sources.pyi flat_api/model/lms_name.py +flat_api/model/lms_name.pyi flat_api/model/lti_credentials.py +flat_api/model/lti_credentials.pyi flat_api/model/lti_credentials_creation.py +flat_api/model/lti_credentials_creation.pyi flat_api/model/media_attachment.py +flat_api/model/media_attachment.pyi flat_api/model/media_score_sharing_mode.py +flat_api/model/media_score_sharing_mode.pyi flat_api/model/microsoft_graph_assignment.py +flat_api/model/microsoft_graph_assignment.pyi flat_api/model/microsoft_graph_submission.py +flat_api/model/microsoft_graph_submission.pyi flat_api/model/organization_invitation.py +flat_api/model/organization_invitation.pyi flat_api/model/organization_invitation_creation.py +flat_api/model/organization_invitation_creation.pyi flat_api/model/organization_roles.py +flat_api/model/organization_roles.pyi flat_api/model/organization_user_access_token_creation.py -flat_api/model/organization_user_signin_link.py -flat_api/model/organization_user_signin_link_creation.py +flat_api/model/organization_user_access_token_creation.pyi flat_api/model/resource_collaborator.py +flat_api/model/resource_collaborator.pyi flat_api/model/resource_collaborator_creation.py +flat_api/model/resource_collaborator_creation.pyi flat_api/model/resource_rights.py +flat_api/model/resource_rights.pyi flat_api/model/score_comment.py +flat_api/model/score_comment.pyi flat_api/model/score_comment_context.py +flat_api/model/score_comment_context.pyi flat_api/model/score_comment_creation.py -flat_api/model/score_comment_moderation.py +flat_api/model/score_comment_creation.pyi flat_api/model/score_comment_update.py +flat_api/model/score_comment_update.pyi flat_api/model/score_comments_counts.py +flat_api/model/score_comments_counts.pyi flat_api/model/score_creation.py -flat_api/model/score_creation_builder_data.py -flat_api/model/score_creation_builder_data_layout_data.py -flat_api/model/score_creation_builder_data_score_data.py -flat_api/model/score_creation_builder_data_score_data_instruments.py +flat_api/model/score_creation.pyi flat_api/model/score_creation_type.py +flat_api/model/score_creation_type.pyi flat_api/model/score_details.py +flat_api/model/score_details.pyi flat_api/model/score_fork.py +flat_api/model/score_fork.pyi flat_api/model/score_license.py +flat_api/model/score_license.pyi flat_api/model/score_likes_counts.py +flat_api/model/score_likes_counts.pyi flat_api/model/score_modification.py +flat_api/model/score_modification.pyi flat_api/model/score_plays_counts.py +flat_api/model/score_plays_counts.pyi flat_api/model/score_privacy.py +flat_api/model/score_privacy.pyi flat_api/model/score_revision.py +flat_api/model/score_revision.pyi flat_api/model/score_revision_creation.py +flat_api/model/score_revision_creation.pyi flat_api/model/score_revision_statistics.py +flat_api/model/score_revision_statistics.pyi flat_api/model/score_source.py +flat_api/model/score_source.pyi flat_api/model/score_track.py +flat_api/model/score_track.pyi flat_api/model/score_track_creation.py +flat_api/model/score_track_creation.pyi flat_api/model/score_track_point.py +flat_api/model/score_track_point.pyi flat_api/model/score_track_state.py +flat_api/model/score_track_state.pyi flat_api/model/score_track_type.py +flat_api/model/score_track_type.pyi flat_api/model/score_track_update.py +flat_api/model/score_track_update.pyi flat_api/model/score_views_counts.py +flat_api/model/score_views_counts.pyi flat_api/model/task.py +flat_api/model/task.pyi flat_api/model/task_export_options.py -flat_api/model/task_progress.py +flat_api/model/task_export_options.pyi flat_api/model/user_admin_update.py +flat_api/model/user_admin_update.pyi +flat_api/model/user_azure_details.py +flat_api/model/user_azure_details.pyi +flat_api/model/user_community_profile_links.py +flat_api/model/user_community_profile_links.pyi flat_api/model/user_creation.py +flat_api/model/user_creation.pyi flat_api/model/user_details.py +flat_api/model/user_details.pyi flat_api/model/user_details_admin.py -flat_api/model/user_details_admin_license.py +flat_api/model/user_details_admin.pyi flat_api/model/user_public.py +flat_api/model/user_public.pyi flat_api/model/user_public_summary.py -flat_api/model_utils.py +flat_api/model/user_public_summary.pyi +flat_api/model/user_signin_link.py +flat_api/model/user_signin_link.pyi +flat_api/model/user_signin_link_creation.py +flat_api/model/user_signin_link_creation.pyi flat_api/models/__init__.py flat_api/rest.py +flat_api/schemas.py requirements.txt setup.cfg test-requirements.txt test/__init__.py +test/test_models/__init__.py +test/test_models/test_api_access_token.py +test/test_models/test_app_scopes.py +test/test_models/test_assignment.py +test/test_models/test_assignment_copy.py +test/test_models/test_assignment_copy_response.py +test/test_models/test_assignment_submission.py +test/test_models/test_assignment_submission_comment.py +test/test_models/test_assignment_submission_comment_creation.py +test/test_models/test_assignment_submission_history.py +test/test_models/test_assignment_submission_history_state.py +test/test_models/test_assignment_submission_state.py +test/test_models/test_assignment_submission_update.py +test/test_models/test_assignment_type.py +test/test_models/test_assignment_update.py +test/test_models/test_class_assignment.py +test/test_models/test_class_assignment_update.py +test/test_models/test_class_attachment_creation.py +test/test_models/test_class_creation.py +test/test_models/test_class_details.py +test/test_models/test_class_grade_level.py +test/test_models/test_class_roles.py +test/test_models/test_class_state.py +test/test_models/test_class_update.py +test/test_models/test_collection.py +test/test_models/test_collection_app.py +test/test_models/test_collection_creation.py +test/test_models/test_collection_modification.py +test/test_models/test_collection_privacy.py +test/test_models/test_collection_type.py +test/test_models/test_edu_library.py +test/test_models/test_edu_resource.py +test/test_models/test_edu_resource_copy.py +test/test_models/test_edu_resource_creation.py +test/test_models/test_edu_resource_move.py +test/test_models/test_edu_resource_privacy.py +test/test_models/test_edu_resource_type.py +test/test_models/test_edu_resource_update.py +test/test_models/test_edu_resource_use_in_class.py +test/test_models/test_edu_skills_focused.py +test/test_models/test_flat_error_response.py +test/test_models/test_flat_locales.py +test/test_models/test_google_classroom_coursework.py +test/test_models/test_google_classroom_submission.py +test/test_models/test_group.py +test/test_models/test_group_details.py +test/test_models/test_group_type.py +test/test_models/test_license_mode.py +test/test_models/test_license_sources.py +test/test_models/test_lms_name.py +test/test_models/test_lti_credentials.py +test/test_models/test_lti_credentials_creation.py +test/test_models/test_media_attachment.py +test/test_models/test_media_score_sharing_mode.py +test/test_models/test_microsoft_graph_assignment.py +test/test_models/test_microsoft_graph_submission.py +test/test_models/test_organization_invitation.py +test/test_models/test_organization_invitation_creation.py +test/test_models/test_organization_roles.py +test/test_models/test_organization_user_access_token_creation.py +test/test_models/test_resource_collaborator.py +test/test_models/test_resource_collaborator_creation.py +test/test_models/test_resource_rights.py +test/test_models/test_score_comment.py +test/test_models/test_score_comment_context.py +test/test_models/test_score_comment_creation.py +test/test_models/test_score_comment_update.py +test/test_models/test_score_comments_counts.py +test/test_models/test_score_creation.py +test/test_models/test_score_creation_type.py +test/test_models/test_score_details.py +test/test_models/test_score_fork.py +test/test_models/test_score_license.py +test/test_models/test_score_likes_counts.py +test/test_models/test_score_modification.py +test/test_models/test_score_plays_counts.py +test/test_models/test_score_privacy.py +test/test_models/test_score_revision.py +test/test_models/test_score_revision_creation.py +test/test_models/test_score_revision_statistics.py +test/test_models/test_score_source.py +test/test_models/test_score_track.py +test/test_models/test_score_track_creation.py +test/test_models/test_score_track_point.py +test/test_models/test_score_track_state.py +test/test_models/test_score_track_type.py +test/test_models/test_score_track_update.py +test/test_models/test_score_views_counts.py +test/test_models/test_task.py +test/test_models/test_task_export_options.py +test/test_models/test_user_admin_update.py +test/test_models/test_user_azure_details.py +test/test_models/test_user_community_profile_links.py +test/test_models/test_user_creation.py +test/test_models/test_user_details.py +test/test_models/test_user_details_admin.py +test/test_models/test_user_public.py +test/test_models/test_user_public_summary.py +test/test_models/test_user_signin_link.py +test/test_models/test_user_signin_link_creation.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index ecedc98..cd802a1 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.1 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/README.md b/README.md index 7688b10..25de9fa 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ To request some API credentials, please visit [https://flat.io/developers](https ## Requirements. -Python 2.7 and 3.4+ +Python >= 3.7 ## Installation & Usage ### pip install @@ -22,6 +22,8 @@ Python 2.7 and 3.4+ pip install flat_api ``` +or install from this repository + ```sh pip install git+https://github.com/FlatIO/api-client-python.git ``` @@ -50,27 +52,56 @@ import flat_api Please follow the [installation procedure](#installation--usage) and then run the following: ```python -from __future__ import print_function + import time import flat_api -from flat_api.rest import ApiException from pprint import pprint +from flat_api.apis.tags import account_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_details import UserDetails +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. # Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration() -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# create an instance of the API class -api_instance = flat_api.AccountApi(flat_api.ApiClient(configuration)) -only_id = False # bool | Only return the user id (optional) (default to False) - -try: - # Get current user profile - api_response = api_instance.get_authenticated_user(only_id=only_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) - +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = account_api.AccountApi(api_client) + only_id = False # bool | Only return the user id (optional) (default to CodegenParameter{isFormParam=false, isQueryParam=true, isPathParam=false, isHeaderParam=false, isCookieParam=false, isBodyParam=false, isContainer=false, isCollectionFormatMulti=false, isPrimitiveType=true, isModel=false, isExplode=true, baseName='onlyId', paramName='only_id', dataType='bool', datatypeWithEnum='null', dataFormat='null', collectionFormat='null', description='Only return the user id', unescapedDescription='Only return the user id', baseType='null', defaultValue='False', enumDefaultValue='null', enumName='null', style='FORM', deepObject='false', allowEmptyValue='false', example='False', jsonSchema='{ + "name" : "onlyId", + "in" : "query", + "description" : "Only return the user id", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "boolean", + "default" : false + } +}', isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isBoolean=true, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isAnyType=false, isArray=false, isMap=false, isFile=false, isEnum=false, isEnumRef=false, _enum=null, allowableValues=null, items=null, mostInnerItems=null, additionalProperties=null, vars=[], requiredVars=[], vendorExtensions={}, hasValidation=false, maxProperties=null, minProperties=null, isNullable=false, isDeprecated=false, required=false, maximum='null', exclusiveMaximum=false, minimum='null', exclusiveMinimum=false, maxLength=null, minLength=null, pattern='null', maxItems=null, minItems=null, uniqueItems=false, uniqueItemsBoolean=null, contentType=null, multipleOf=null, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, schema=CodegenProperty{openApiType='boolean', baseName='OnlyIdSchema', complexType='null', getter='getOnlyId', setter='setOnlyId', description='null', dataType='bool', datatypeWithEnum='bool', dataFormat='null', name='only_id', min='null', max='null', defaultValue='False', defaultValueWithParam=' = data.onlyId;', baseType='bool', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='False', jsonSchema='{ + "type" : "boolean", + "default" : false +}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=true, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='OnlyId', nameInSnakeCase='null', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, content=null, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false}) + + try: + # Get current user account + api_response = api_instance.get_authenticated_user(only_id=only_id) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) ``` ## Documentation for API Endpoints @@ -79,212 +110,215 @@ All URIs are relative to *https://api.flat.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AccountApi* | [**get_authenticated_user**](docs/AccountApi.md#get_authenticated_user) | **GET** /me | Get current user profile -*ClassApi* | [**activate_class**](docs/ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class -*ClassApi* | [**add_class_user**](docs/ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class -*ClassApi* | [**archive_assignment**](docs/ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment -*ClassApi* | [**archive_class**](docs/ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class -*ClassApi* | [**copy_assignment**](docs/ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment -*ClassApi* | [**create_assignment**](docs/ClassApi.md#create_assignment) | **POST** /classes/{class}/assignments | Assignment creation -*ClassApi* | [**create_class**](docs/ClassApi.md#create_class) | **POST** /classes | Create a new class -*ClassApi* | [**create_submission**](docs/ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission -*ClassApi* | [**delete_class_user**](docs/ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class -*ClassApi* | [**delete_submission**](docs/ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Delete a submission -*ClassApi* | [**delete_submission_comment**](docs/ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission -*ClassApi* | [**edit_submission**](docs/ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission -*ClassApi* | [**enroll_class**](docs/ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class -*ClassApi* | [**export_submissions_reviews_as_csv**](docs/ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports -*ClassApi* | [**export_submissions_reviews_as_excel**](docs/ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports -*ClassApi* | [**fork_score**](docs/ClassApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -*ClassApi* | [**get_class**](docs/ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class -*ClassApi* | [**get_score_submissions**](docs/ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -*ClassApi* | [**get_submission**](docs/ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission -*ClassApi* | [**get_submission_comments**](docs/ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission -*ClassApi* | [**get_submission_history**](docs/ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission -*ClassApi* | [**get_submissions**](docs/ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions -*ClassApi* | [**list_assignments**](docs/ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing -*ClassApi* | [**list_class_student_submissions**](docs/ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student -*ClassApi* | [**list_classes**](docs/ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user -*ClassApi* | [**post_submission_comment**](docs/ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission -*ClassApi* | [**unarchive_assignment**](docs/ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. -*ClassApi* | [**unarchive_class**](docs/ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class -*ClassApi* | [**update_class**](docs/ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class -*ClassApi* | [**update_submission_comment**](docs/ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission -*CollectionApi* | [**add_score_to_collection**](docs/CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection -*CollectionApi* | [**create_collection**](docs/CollectionApi.md#create_collection) | **POST** /collections | Create a new collection -*CollectionApi* | [**delete_collection**](docs/CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection -*CollectionApi* | [**delete_score_from_collection**](docs/CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection -*CollectionApi* | [**edit_collection**](docs/CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata -*CollectionApi* | [**get_collection**](docs/CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details -*CollectionApi* | [**list_collection_scores**](docs/CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection -*CollectionApi* | [**list_collections**](docs/CollectionApi.md#list_collections) | **GET** /collections | List the collections -*CollectionApi* | [**untrash_collection**](docs/CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection -*GroupApi* | [**get_group_details**](docs/GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information -*GroupApi* | [**get_group_scores**](docs/GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -*GroupApi* | [**list_group_users**](docs/GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users -*OrganizationApi* | [**count_orga_users**](docs/OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters -*OrganizationApi* | [**create_lti_credentials**](docs/OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials -*OrganizationApi* | [**create_organization_invitation**](docs/OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization -*OrganizationApi* | [**create_organization_user**](docs/OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account -*OrganizationApi* | [**create_organization_user_access_token**](docs/OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user -*OrganizationApi* | [**create_organization_user_signin_link**](docs/OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user -*OrganizationApi* | [**list_lti_credentials**](docs/OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials -*OrganizationApi* | [**list_organization_invitations**](docs/OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations -*OrganizationApi* | [**list_organization_users**](docs/OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users -*OrganizationApi* | [**remove_organization_invitation**](docs/OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation -*OrganizationApi* | [**remove_organization_user**](docs/OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat -*OrganizationApi* | [**revoke_lti_credentials**](docs/OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials -*OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information -*ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator -*ScoreApi* | [**add_score_track**](docs/ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score -*ScoreApi* | [**create_export_task**](docs/ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task -*ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score -*ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision -*ScoreApi* | [**delete_score**](docs/ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score -*ScoreApi* | [**delete_score_comment**](docs/ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment -*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 -*ScoreApi* | [**edit_score**](docs/ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata -*ScoreApi* | [**fork_score**](docs/ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -*ScoreApi* | [**ger_user_likes**](docs/ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -*ScoreApi* | [**get_group_scores**](docs/ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -*ScoreApi* | [**get_score**](docs/ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata -*ScoreApi* | [**get_score_collaborator**](docs/ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator -*ScoreApi* | [**get_score_collaborators**](docs/ScoreApi.md#get_score_collaborators) | **GET** /scores/{score}/collaborators | List the collaborators -*ScoreApi* | [**get_score_comments**](docs/ScoreApi.md#get_score_comments) | **GET** /scores/{score}/comments | List comments -*ScoreApi* | [**get_score_revision**](docs/ScoreApi.md#get_score_revision) | **GET** /scores/{score}/revisions/{revision} | Get a score revision -*ScoreApi* | [**get_score_revision_data**](docs/ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data -*ScoreApi* | [**get_score_revisions**](docs/ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions -*ScoreApi* | [**get_score_submissions**](docs/ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -*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 -*ScoreApi* | [**get_user_scores**](docs/ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores -*ScoreApi* | [**list_score_tracks**](docs/ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score -*ScoreApi* | [**mark_score_comment_resolved**](docs/ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved -*ScoreApi* | [**mark_score_comment_unresolved**](docs/ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved -*ScoreApi* | [**post_score_comment**](docs/ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment -*ScoreApi* | [**remove_score_collaborator**](docs/ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator -*ScoreApi* | [**untrash_score**](docs/ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score -*ScoreApi* | [**update_score_comment**](docs/ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment -*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 -*TaskApi* | [**get_task**](docs/TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details -*UserApi* | [**ger_user_likes**](docs/UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile -*UserApi* | [**get_user_scores**](docs/UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores - +*AccountApi* | [**get_authenticated_user**](docs/apis/tags/AccountApi.md#get_authenticated_user) | **get** /me | Get current user account +*ModelClassApi* | [**activate_class**](docs/apis/tags/ModelClassApi.md#activate_class) | **post** /classes/{class}/activate | Activate the class +*ModelClassApi* | [**add_class_user**](docs/apis/tags/ModelClassApi.md#add_class_user) | **put** /classes/{class}/users/{user} | Add a user to the class +*ModelClassApi* | [**archive_assignment**](docs/apis/tags/ModelClassApi.md#archive_assignment) | **post** /classes/{class}/assignments/{assignment}/archive | Archive the assignment +*ModelClassApi* | [**archive_class**](docs/apis/tags/ModelClassApi.md#archive_class) | **post** /classes/{class}/archive | Archive the class +*ModelClassApi* | [**copy_assignment**](docs/apis/tags/ModelClassApi.md#copy_assignment) | **post** /classes/{class}/assignments/{assignment}/copy | Copy an assignment +*ModelClassApi* | [**create_class**](docs/apis/tags/ModelClassApi.md#create_class) | **post** /classes | Create a new class +*ModelClassApi* | [**create_class_assignment**](docs/apis/tags/ModelClassApi.md#create_class_assignment) | **post** /classes/{class}/assignments | Assignment creation +*ModelClassApi* | [**create_submission**](docs/apis/tags/ModelClassApi.md#create_submission) | **put** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission +*ModelClassApi* | [**create_test_student_account**](docs/apis/tags/ModelClassApi.md#create_test_student_account) | **post** /classes/{class}/testStudent | Create a test student account +*ModelClassApi* | [**delete_class_user**](docs/apis/tags/ModelClassApi.md#delete_class_user) | **delete** /classes/{class}/users/{user} | Remove a user from the class +*ModelClassApi* | [**delete_submission**](docs/apis/tags/ModelClassApi.md#delete_submission) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission +*ModelClassApi* | [**delete_submission_comment**](docs/apis/tags/ModelClassApi.md#delete_submission_comment) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission +*ModelClassApi* | [**edit_submission**](docs/apis/tags/ModelClassApi.md#edit_submission) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission +*ModelClassApi* | [**enroll_class**](docs/apis/tags/ModelClassApi.md#enroll_class) | **post** /classes/enroll/{enrollmentCode} | Join a class +*ModelClassApi* | [**export_submissions_reviews_as_csv**](docs/apis/tags/ModelClassApi.md#export_submissions_reviews_as_csv) | **get** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +*ModelClassApi* | [**export_submissions_reviews_as_excel**](docs/apis/tags/ModelClassApi.md#export_submissions_reviews_as_excel) | **get** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +*ModelClassApi* | [**get_class**](docs/apis/tags/ModelClassApi.md#get_class) | **get** /classes/{class} | Get the details of a single class +*ModelClassApi* | [**get_score_submissions**](docs/apis/tags/ModelClassApi.md#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score +*ModelClassApi* | [**get_submission**](docs/apis/tags/ModelClassApi.md#get_submission) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +*ModelClassApi* | [**get_submission_comments**](docs/apis/tags/ModelClassApi.md#get_submission_comments) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +*ModelClassApi* | [**get_submission_history**](docs/apis/tags/ModelClassApi.md#get_submission_history) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission +*ModelClassApi* | [**get_submissions**](docs/apis/tags/ModelClassApi.md#get_submissions) | **get** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions +*ModelClassApi* | [**list_assignments**](docs/apis/tags/ModelClassApi.md#list_assignments) | **get** /classes/{class}/assignments | Assignments listing +*ModelClassApi* | [**list_class_student_submissions**](docs/apis/tags/ModelClassApi.md#list_class_student_submissions) | **get** /classes/{class}/students/{user}/submissions | List the submissions for a student +*ModelClassApi* | [**list_classes**](docs/apis/tags/ModelClassApi.md#list_classes) | **get** /classes | List the classes available for the current user +*ModelClassApi* | [**post_submission_comment**](docs/apis/tags/ModelClassApi.md#post_submission_comment) | **post** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +*ModelClassApi* | [**unarchive_assignment**](docs/apis/tags/ModelClassApi.md#unarchive_assignment) | **delete** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. +*ModelClassApi* | [**unarchive_class**](docs/apis/tags/ModelClassApi.md#unarchive_class) | **delete** /classes/{class}/archive | Unarchive the class +*ModelClassApi* | [**update_class**](docs/apis/tags/ModelClassApi.md#update_class) | **put** /classes/{class} | Update the class +*ModelClassApi* | [**update_submission_comment**](docs/apis/tags/ModelClassApi.md#update_submission_comment) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission +*CollectionApi* | [**add_score_to_collection**](docs/apis/tags/CollectionApi.md#add_score_to_collection) | **put** /collections/{collection}/scores/{score} | Add a score to the collection +*CollectionApi* | [**create_collection**](docs/apis/tags/CollectionApi.md#create_collection) | **post** /collections | Create a new collection +*CollectionApi* | [**delete_collection**](docs/apis/tags/CollectionApi.md#delete_collection) | **delete** /collections/{collection} | Delete the collection +*CollectionApi* | [**delete_score_from_collection**](docs/apis/tags/CollectionApi.md#delete_score_from_collection) | **delete** /collections/{collection}/scores/{score} | Delete a score from the collection +*CollectionApi* | [**edit_collection**](docs/apis/tags/CollectionApi.md#edit_collection) | **put** /collections/{collection} | Update a collection's metadata +*CollectionApi* | [**get_collection**](docs/apis/tags/CollectionApi.md#get_collection) | **get** /collections/{collection} | Get collection details +*CollectionApi* | [**list_collection_scores**](docs/apis/tags/CollectionApi.md#list_collection_scores) | **get** /collections/{collection}/scores | List the scores contained in a collection +*CollectionApi* | [**list_collections**](docs/apis/tags/CollectionApi.md#list_collections) | **get** /collections | List the collections +*CollectionApi* | [**untrash_collection**](docs/apis/tags/CollectionApi.md#untrash_collection) | **post** /collections/{collection}/untrash | Untrash a collection +*EduResourcesApi* | [**copy_edu_resource**](docs/apis/tags/EduResourcesApi.md#copy_edu_resource) | **post** /eduResources/{resource}/copy | Copy an education resource to a Resource Library +*EduResourcesApi* | [**copy_edu_resource_to_demo_class**](docs/apis/tags/EduResourcesApi.md#copy_edu_resource_to_demo_class) | **post** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class +*EduResourcesApi* | [**create_edu_resource**](docs/apis/tags/EduResourcesApi.md#create_edu_resource) | **post** /eduResources | Create a new education resource +*EduResourcesApi* | [**delete_edu_resource**](docs/apis/tags/EduResourcesApi.md#delete_edu_resource) | **delete** /eduResources/{resource} | Delete an education resource +*EduResourcesApi* | [**get_edu_resource**](docs/apis/tags/EduResourcesApi.md#get_edu_resource) | **get** /eduResources/{resource} | Get an education resource +*EduResourcesApi* | [**list_edu_libraries**](docs/apis/tags/EduResourcesApi.md#list_edu_libraries) | **get** /eduResources/libraries | List the education libraries +*EduResourcesApi* | [**list_edu_resources**](docs/apis/tags/EduResourcesApi.md#list_edu_resources) | **get** /eduResources | List education resources in a library or folder +*EduResourcesApi* | [**move_edu_resource**](docs/apis/tags/EduResourcesApi.md#move_edu_resource) | **post** /eduResources/{resource}/move | Move an education resource +*EduResourcesApi* | [**update_edu_resource**](docs/apis/tags/EduResourcesApi.md#update_edu_resource) | **put** /eduResources/{resource} | Update an education resource metadata +*EduResourcesApi* | [**update_edu_resource_assignment**](docs/apis/tags/EduResourcesApi.md#update_edu_resource_assignment) | **put** /eduResources/{resource}/assignment | Update an education resource assignment +*EduResourcesApi* | [**use_edu_resource_in_class**](docs/apis/tags/EduResourcesApi.md#use_edu_resource_in_class) | **post** /eduResources/{resource}/useInClass | Use an education resource in a class +*GroupApi* | [**get_group_details**](docs/apis/tags/GroupApi.md#get_group_details) | **get** /groups/{group} | Get group information +*GroupApi* | [**get_group_scores**](docs/apis/tags/GroupApi.md#get_group_scores) | **get** /groups/{group}/scores | List group's scores +*GroupApi* | [**list_group_users**](docs/apis/tags/GroupApi.md#list_group_users) | **get** /groups/{group}/users | List group's users +*OrganizationApi* | [**count_orga_users**](docs/apis/tags/OrganizationApi.md#count_orga_users) | **get** /organizations/users/count | Count the organization users using the provided filters +*OrganizationApi* | [**create_lti_credentials**](docs/apis/tags/OrganizationApi.md#create_lti_credentials) | **post** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials +*OrganizationApi* | [**create_organization_invitation**](docs/apis/tags/OrganizationApi.md#create_organization_invitation) | **post** /organizations/invitations | Create a new invitation to join the organization +*OrganizationApi* | [**create_organization_user**](docs/apis/tags/OrganizationApi.md#create_organization_user) | **post** /organizations/users | Create a new user account +*OrganizationApi* | [**create_organization_user_access_token**](docs/apis/tags/OrganizationApi.md#create_organization_user_access_token) | **post** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +*OrganizationApi* | [**create_organization_user_signin_link**](docs/apis/tags/OrganizationApi.md#create_organization_user_signin_link) | **post** /organizations/users/{user}/signinLink | Create a sign in link for an organization user +*OrganizationApi* | [**list_lti_credentials**](docs/apis/tags/OrganizationApi.md#list_lti_credentials) | **get** /organizations/lti/credentials | List LTI 1.x credentials +*OrganizationApi* | [**list_organization_invitations**](docs/apis/tags/OrganizationApi.md#list_organization_invitations) | **get** /organizations/invitations | List the organization invitations +*OrganizationApi* | [**list_organization_users**](docs/apis/tags/OrganizationApi.md#list_organization_users) | **get** /organizations/users | List the organization users +*OrganizationApi* | [**remove_organization_invitation**](docs/apis/tags/OrganizationApi.md#remove_organization_invitation) | **delete** /organizations/invitations/{invitation} | Remove an organization invitation +*OrganizationApi* | [**remove_organization_user**](docs/apis/tags/OrganizationApi.md#remove_organization_user) | **delete** /organizations/users/{user} | Remove an account from Flat +*OrganizationApi* | [**revoke_lti_credentials**](docs/apis/tags/OrganizationApi.md#revoke_lti_credentials) | **delete** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials +*OrganizationApi* | [**update_organization_user**](docs/apis/tags/OrganizationApi.md#update_organization_user) | **put** /organizations/users/{user} | Update account information +*ScoreApi* | [**add_score_collaborator**](docs/apis/tags/ScoreApi.md#add_score_collaborator) | **post** /scores/{score}/collaborators | Add a new collaborator +*ScoreApi* | [**add_score_track**](docs/apis/tags/ScoreApi.md#add_score_track) | **post** /scores/{score}/tracks | Add a new video or audio track to the score +*ScoreApi* | [**create_export_task**](docs/apis/tags/ScoreApi.md#create_export_task) | **post** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task +*ScoreApi* | [**create_score**](docs/apis/tags/ScoreApi.md#create_score) | **post** /scores | Create a new score +*ScoreApi* | [**create_score_revision**](docs/apis/tags/ScoreApi.md#create_score_revision) | **post** /scores/{score}/revisions | Create a new revision +*ScoreApi* | [**delete_score**](docs/apis/tags/ScoreApi.md#delete_score) | **delete** /scores/{score} | Delete a score +*ScoreApi* | [**delete_score_comment**](docs/apis/tags/ScoreApi.md#delete_score_comment) | **delete** /scores/{score}/comments/{comment} | Delete a comment +*ScoreApi* | [**delete_score_track**](docs/apis/tags/ScoreApi.md#delete_score_track) | **delete** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score +*ScoreApi* | [**edit_score**](docs/apis/tags/ScoreApi.md#edit_score) | **put** /scores/{score} | Edit a score's metadata +*ScoreApi* | [**fork_score**](docs/apis/tags/ScoreApi.md#fork_score) | **post** /scores/{score}/fork | Fork a score +*ScoreApi* | [**ger_user_likes**](docs/apis/tags/ScoreApi.md#ger_user_likes) | **get** /users/{user}/likes | List liked scores +*ScoreApi* | [**get_group_scores**](docs/apis/tags/ScoreApi.md#get_group_scores) | **get** /groups/{group}/scores | List group's scores +*ScoreApi* | [**get_score**](docs/apis/tags/ScoreApi.md#get_score) | **get** /scores/{score} | Get a score's metadata +*ScoreApi* | [**get_score_collaborator**](docs/apis/tags/ScoreApi.md#get_score_collaborator) | **get** /scores/{score}/collaborators/{collaborator} | Get a collaborator +*ScoreApi* | [**get_score_collaborators**](docs/apis/tags/ScoreApi.md#get_score_collaborators) | **get** /scores/{score}/collaborators | List the collaborators +*ScoreApi* | [**get_score_comments**](docs/apis/tags/ScoreApi.md#get_score_comments) | **get** /scores/{score}/comments | List comments +*ScoreApi* | [**get_score_revision**](docs/apis/tags/ScoreApi.md#get_score_revision) | **get** /scores/{score}/revisions/{revision} | Get a score revision +*ScoreApi* | [**get_score_revision_data**](docs/apis/tags/ScoreApi.md#get_score_revision_data) | **get** /scores/{score}/revisions/{revision}/{format} | Get a score revision data +*ScoreApi* | [**get_score_revisions**](docs/apis/tags/ScoreApi.md#get_score_revisions) | **get** /scores/{score}/revisions | List the revisions +*ScoreApi* | [**get_score_submissions**](docs/apis/tags/ScoreApi.md#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score +*ScoreApi* | [**get_score_track**](docs/apis/tags/ScoreApi.md#get_score_track) | **get** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score +*ScoreApi* | [**get_user_scores**](docs/apis/tags/ScoreApi.md#get_user_scores) | **get** /users/{user}/scores | List user's scores +*ScoreApi* | [**list_score_tracks**](docs/apis/tags/ScoreApi.md#list_score_tracks) | **get** /scores/{score}/tracks | List the audio or video tracks linked to a score +*ScoreApi* | [**mark_score_comment_resolved**](docs/apis/tags/ScoreApi.md#mark_score_comment_resolved) | **put** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved +*ScoreApi* | [**mark_score_comment_unresolved**](docs/apis/tags/ScoreApi.md#mark_score_comment_unresolved) | **delete** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved +*ScoreApi* | [**post_score_comment**](docs/apis/tags/ScoreApi.md#post_score_comment) | **post** /scores/{score}/comments | Post a new comment +*ScoreApi* | [**remove_score_collaborator**](docs/apis/tags/ScoreApi.md#remove_score_collaborator) | **delete** /scores/{score}/collaborators/{collaborator} | Delete a collaborator +*ScoreApi* | [**untrash_score**](docs/apis/tags/ScoreApi.md#untrash_score) | **post** /scores/{score}/untrash | Untrash a score +*ScoreApi* | [**update_score_comment**](docs/apis/tags/ScoreApi.md#update_score_comment) | **put** /scores/{score}/comments/{comment} | Update an existing comment +*ScoreApi* | [**update_score_track**](docs/apis/tags/ScoreApi.md#update_score_track) | **put** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score +*TaskApi* | [**get_task**](docs/apis/tags/TaskApi.md#get_task) | **get** /tasks/{task} | Get a task details +*UserApi* | [**ger_user_likes**](docs/apis/tags/UserApi.md#ger_user_likes) | **get** /users/{user}/likes | List liked scores +*UserApi* | [**get_user**](docs/apis/tags/UserApi.md#get_user) | **get** /users/{user} | Get a public user profile +*UserApi* | [**get_user_scores**](docs/apis/tags/UserApi.md#get_user_scores) | **get** /users/{user}/scores | List user's scores ## Documentation For Models - - [ApiAccessToken](docs/ApiAccessToken.md) - - [AppScopes](docs/AppScopes.md) - - [Assignment](docs/Assignment.md) - - [AssignmentCanvas](docs/AssignmentCanvas.md) - - [AssignmentCopy](docs/AssignmentCopy.md) - - [AssignmentCreation](docs/AssignmentCreation.md) - - [AssignmentCreationGoogleClassroom](docs/AssignmentCreationGoogleClassroom.md) - - [AssignmentCreationMicrosoftGraph](docs/AssignmentCreationMicrosoftGraph.md) - - [AssignmentLti](docs/AssignmentLti.md) - - [AssignmentMfc](docs/AssignmentMfc.md) - - [AssignmentSubmission](docs/AssignmentSubmission.md) - - [AssignmentSubmissionComment](docs/AssignmentSubmissionComment.md) - - [AssignmentSubmissionCommentCreation](docs/AssignmentSubmissionCommentCreation.md) - - [AssignmentSubmissionHistory](docs/AssignmentSubmissionHistory.md) - - [AssignmentSubmissionHistoryAttachment](docs/AssignmentSubmissionHistoryAttachment.md) - - [AssignmentSubmissionState](docs/AssignmentSubmissionState.md) - - [AssignmentSubmissionUpdate](docs/AssignmentSubmissionUpdate.md) - - [AssignmentSubmissionUpdateComments](docs/AssignmentSubmissionUpdateComments.md) - - [AssignmentType](docs/AssignmentType.md) - - [ClassAttachmentCreation](docs/ClassAttachmentCreation.md) - - [ClassCreation](docs/ClassCreation.md) - - [ClassDetails](docs/ClassDetails.md) - - [ClassDetailsCanvas](docs/ClassDetailsCanvas.md) - - [ClassDetailsClever](docs/ClassDetailsClever.md) - - [ClassDetailsGoogleClassroom](docs/ClassDetailsGoogleClassroom.md) - - [ClassDetailsGoogleDrive](docs/ClassDetailsGoogleDrive.md) - - [ClassDetailsIssues](docs/ClassDetailsIssues.md) - - [ClassDetailsIssuesSync](docs/ClassDetailsIssuesSync.md) - - [ClassDetailsLti](docs/ClassDetailsLti.md) - - [ClassDetailsMfc](docs/ClassDetailsMfc.md) - - [ClassDetailsMicrosoftGraph](docs/ClassDetailsMicrosoftGraph.md) - - [ClassRoles](docs/ClassRoles.md) - - [ClassState](docs/ClassState.md) - - [ClassUpdate](docs/ClassUpdate.md) - - [Collection](docs/Collection.md) - - [CollectionApp](docs/CollectionApp.md) - - [CollectionCapabilities](docs/CollectionCapabilities.md) - - [CollectionCreation](docs/CollectionCreation.md) - - [CollectionModification](docs/CollectionModification.md) - - [CollectionPrivacy](docs/CollectionPrivacy.md) - - [CollectionType](docs/CollectionType.md) - - [FlatErrorResponse](docs/FlatErrorResponse.md) - - [FlatLocales](docs/FlatLocales.md) - - [GoogleClassroomCoursework](docs/GoogleClassroomCoursework.md) - - [GoogleClassroomSubmission](docs/GoogleClassroomSubmission.md) - - [Group](docs/Group.md) - - [GroupDetails](docs/GroupDetails.md) - - [GroupType](docs/GroupType.md) - - [LicenseMode](docs/LicenseMode.md) - - [LicenseSources](docs/LicenseSources.md) - - [LmsName](docs/LmsName.md) - - [LtiCredentials](docs/LtiCredentials.md) - - [LtiCredentialsCreation](docs/LtiCredentialsCreation.md) - - [MediaAttachment](docs/MediaAttachment.md) - - [MediaScoreSharingMode](docs/MediaScoreSharingMode.md) - - [MicrosoftGraphAssignment](docs/MicrosoftGraphAssignment.md) - - [MicrosoftGraphSubmission](docs/MicrosoftGraphSubmission.md) - - [OrganizationInvitation](docs/OrganizationInvitation.md) - - [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md) - - [OrganizationRoles](docs/OrganizationRoles.md) - - [OrganizationUserAccessTokenCreation](docs/OrganizationUserAccessTokenCreation.md) - - [OrganizationUserSigninLink](docs/OrganizationUserSigninLink.md) - - [OrganizationUserSigninLinkCreation](docs/OrganizationUserSigninLinkCreation.md) - - [ResourceCollaborator](docs/ResourceCollaborator.md) - - [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md) - - [ResourceRights](docs/ResourceRights.md) - - [ScoreComment](docs/ScoreComment.md) - - [ScoreCommentContext](docs/ScoreCommentContext.md) - - [ScoreCommentCreation](docs/ScoreCommentCreation.md) - - [ScoreCommentModeration](docs/ScoreCommentModeration.md) - - [ScoreCommentUpdate](docs/ScoreCommentUpdate.md) - - [ScoreCommentsCounts](docs/ScoreCommentsCounts.md) - - [ScoreCreation](docs/ScoreCreation.md) - - [ScoreCreationBuilderData](docs/ScoreCreationBuilderData.md) - - [ScoreCreationBuilderDataLayoutData](docs/ScoreCreationBuilderDataLayoutData.md) - - [ScoreCreationBuilderDataScoreData](docs/ScoreCreationBuilderDataScoreData.md) - - [ScoreCreationBuilderDataScoreDataInstruments](docs/ScoreCreationBuilderDataScoreDataInstruments.md) - - [ScoreCreationType](docs/ScoreCreationType.md) - - [ScoreDetails](docs/ScoreDetails.md) - - [ScoreFork](docs/ScoreFork.md) - - [ScoreLicense](docs/ScoreLicense.md) - - [ScoreLikesCounts](docs/ScoreLikesCounts.md) - - [ScoreModification](docs/ScoreModification.md) - - [ScorePlaysCounts](docs/ScorePlaysCounts.md) - - [ScorePrivacy](docs/ScorePrivacy.md) - - [ScoreRevision](docs/ScoreRevision.md) - - [ScoreRevisionCreation](docs/ScoreRevisionCreation.md) - - [ScoreRevisionStatistics](docs/ScoreRevisionStatistics.md) - - [ScoreSource](docs/ScoreSource.md) - - [ScoreTrack](docs/ScoreTrack.md) - - [ScoreTrackCreation](docs/ScoreTrackCreation.md) - - [ScoreTrackPoint](docs/ScoreTrackPoint.md) - - [ScoreTrackState](docs/ScoreTrackState.md) - - [ScoreTrackType](docs/ScoreTrackType.md) - - [ScoreTrackUpdate](docs/ScoreTrackUpdate.md) - - [ScoreViewsCounts](docs/ScoreViewsCounts.md) - - [Task](docs/Task.md) - - [TaskExportOptions](docs/TaskExportOptions.md) - - [TaskProgress](docs/TaskProgress.md) - - [UserAdminUpdate](docs/UserAdminUpdate.md) - - [UserCreation](docs/UserCreation.md) - - [UserDetails](docs/UserDetails.md) - - [UserDetailsAdmin](docs/UserDetailsAdmin.md) - - [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md) - - [UserPublic](docs/UserPublic.md) - - [UserPublicSummary](docs/UserPublicSummary.md) - + - [ApiAccessToken](docs/models/ApiAccessToken.md) + - [AppScopes](docs/models/AppScopes.md) + - [Assignment](docs/models/Assignment.md) + - [AssignmentCopy](docs/models/AssignmentCopy.md) + - [AssignmentCopyResponse](docs/models/AssignmentCopyResponse.md) + - [AssignmentSubmission](docs/models/AssignmentSubmission.md) + - [AssignmentSubmissionComment](docs/models/AssignmentSubmissionComment.md) + - [AssignmentSubmissionCommentCreation](docs/models/AssignmentSubmissionCommentCreation.md) + - [AssignmentSubmissionHistory](docs/models/AssignmentSubmissionHistory.md) + - [AssignmentSubmissionHistoryState](docs/models/AssignmentSubmissionHistoryState.md) + - [AssignmentSubmissionState](docs/models/AssignmentSubmissionState.md) + - [AssignmentSubmissionUpdate](docs/models/AssignmentSubmissionUpdate.md) + - [AssignmentType](docs/models/AssignmentType.md) + - [AssignmentUpdate](docs/models/AssignmentUpdate.md) + - [ClassAssignment](docs/models/ClassAssignment.md) + - [ClassAssignmentUpdate](docs/models/ClassAssignmentUpdate.md) + - [ClassAttachmentCreation](docs/models/ClassAttachmentCreation.md) + - [ClassCreation](docs/models/ClassCreation.md) + - [ClassDetails](docs/models/ClassDetails.md) + - [ClassGradeLevel](docs/models/ClassGradeLevel.md) + - [ClassRoles](docs/models/ClassRoles.md) + - [ClassState](docs/models/ClassState.md) + - [ClassUpdate](docs/models/ClassUpdate.md) + - [Collection](docs/models/Collection.md) + - [CollectionApp](docs/models/CollectionApp.md) + - [CollectionCreation](docs/models/CollectionCreation.md) + - [CollectionModification](docs/models/CollectionModification.md) + - [CollectionPrivacy](docs/models/CollectionPrivacy.md) + - [CollectionType](docs/models/CollectionType.md) + - [EduLibrary](docs/models/EduLibrary.md) + - [EduResource](docs/models/EduResource.md) + - [EduResourceCopy](docs/models/EduResourceCopy.md) + - [EduResourceCreation](docs/models/EduResourceCreation.md) + - [EduResourceMove](docs/models/EduResourceMove.md) + - [EduResourcePrivacy](docs/models/EduResourcePrivacy.md) + - [EduResourceType](docs/models/EduResourceType.md) + - [EduResourceUpdate](docs/models/EduResourceUpdate.md) + - [EduResourceUseInClass](docs/models/EduResourceUseInClass.md) + - [EduSkillsFocused](docs/models/EduSkillsFocused.md) + - [FlatErrorResponse](docs/models/FlatErrorResponse.md) + - [FlatLocales](docs/models/FlatLocales.md) + - [GoogleClassroomCoursework](docs/models/GoogleClassroomCoursework.md) + - [GoogleClassroomSubmission](docs/models/GoogleClassroomSubmission.md) + - [Group](docs/models/Group.md) + - [GroupDetails](docs/models/GroupDetails.md) + - [GroupType](docs/models/GroupType.md) + - [LicenseMode](docs/models/LicenseMode.md) + - [LicenseSources](docs/models/LicenseSources.md) + - [LmsName](docs/models/LmsName.md) + - [LtiCredentials](docs/models/LtiCredentials.md) + - [LtiCredentialsCreation](docs/models/LtiCredentialsCreation.md) + - [MediaAttachment](docs/models/MediaAttachment.md) + - [MediaScoreSharingMode](docs/models/MediaScoreSharingMode.md) + - [MicrosoftGraphAssignment](docs/models/MicrosoftGraphAssignment.md) + - [MicrosoftGraphSubmission](docs/models/MicrosoftGraphSubmission.md) + - [OrganizationInvitation](docs/models/OrganizationInvitation.md) + - [OrganizationInvitationCreation](docs/models/OrganizationInvitationCreation.md) + - [OrganizationRoles](docs/models/OrganizationRoles.md) + - [OrganizationUserAccessTokenCreation](docs/models/OrganizationUserAccessTokenCreation.md) + - [ResourceCollaborator](docs/models/ResourceCollaborator.md) + - [ResourceCollaboratorCreation](docs/models/ResourceCollaboratorCreation.md) + - [ResourceRights](docs/models/ResourceRights.md) + - [ScoreComment](docs/models/ScoreComment.md) + - [ScoreCommentContext](docs/models/ScoreCommentContext.md) + - [ScoreCommentCreation](docs/models/ScoreCommentCreation.md) + - [ScoreCommentUpdate](docs/models/ScoreCommentUpdate.md) + - [ScoreCommentsCounts](docs/models/ScoreCommentsCounts.md) + - [ScoreCreation](docs/models/ScoreCreation.md) + - [ScoreCreationType](docs/models/ScoreCreationType.md) + - [ScoreDetails](docs/models/ScoreDetails.md) + - [ScoreFork](docs/models/ScoreFork.md) + - [ScoreLicense](docs/models/ScoreLicense.md) + - [ScoreLikesCounts](docs/models/ScoreLikesCounts.md) + - [ScoreModification](docs/models/ScoreModification.md) + - [ScorePlaysCounts](docs/models/ScorePlaysCounts.md) + - [ScorePrivacy](docs/models/ScorePrivacy.md) + - [ScoreRevision](docs/models/ScoreRevision.md) + - [ScoreRevisionCreation](docs/models/ScoreRevisionCreation.md) + - [ScoreRevisionStatistics](docs/models/ScoreRevisionStatistics.md) + - [ScoreSource](docs/models/ScoreSource.md) + - [ScoreTrack](docs/models/ScoreTrack.md) + - [ScoreTrackCreation](docs/models/ScoreTrackCreation.md) + - [ScoreTrackPoint](docs/models/ScoreTrackPoint.md) + - [ScoreTrackState](docs/models/ScoreTrackState.md) + - [ScoreTrackType](docs/models/ScoreTrackType.md) + - [ScoreTrackUpdate](docs/models/ScoreTrackUpdate.md) + - [ScoreViewsCounts](docs/models/ScoreViewsCounts.md) + - [Task](docs/models/Task.md) + - [TaskExportOptions](docs/models/TaskExportOptions.md) + - [UserAdminUpdate](docs/models/UserAdminUpdate.md) + - [UserAzureDetails](docs/models/UserAzureDetails.md) + - [UserCommunityProfileLinks](docs/models/UserCommunityProfileLinks.md) + - [UserCreation](docs/models/UserCreation.md) + - [UserDetails](docs/models/UserDetails.md) + - [UserDetailsAdmin](docs/models/UserDetailsAdmin.md) + - [UserPublic](docs/models/UserPublic.md) + - [UserPublicSummary](docs/models/UserPublicSummary.md) + - [UserSigninLink](docs/models/UserSigninLink.md) + - [UserSigninLinkCreation](docs/models/UserSigninLinkCreation.md) ## Documentation For Authorization - -## OAuth2 +Authentication schemes defined for the API: + +### OAuth2 - **Type**: OAuth - **Flow**: accessCode @@ -299,6 +333,8 @@ Class | Method | HTTP request | Description - **collections.readonly**: Allow read-only access to a user's collections. - **collections.add_scores**: Allow to add scores to a user's collections. - **collections**: Full, permissive scope to access all of a user's collections. + - **edu.resources**: Read-write access to the resource library. + - **edu.resources.readonly**: Read-only access to the resource library. - **edu.classes**: Full, permissive scope to manage the classes. - **edu.classes.readonly**: Read-only access to the classes. - **edu.assignments**: Read-write access to the assignments and submissions. @@ -314,5 +350,30 @@ Class | Method | HTTP request | Description ## Author developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io +developers@flat.io + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in flat_api.apis and flat_api.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: +Solution 1: +Use specific imports for apis and models like: +- `from flat_api.apis.default_api import DefaultApi` +- `from flat_api.model.pet import Pet` +Solution 1: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import flat_api +from flat_api.apis import * +from flat_api.models import * +``` diff --git a/docs/AccountApi.md b/docs/AccountApi.md deleted file mode 100644 index 5c26eee..0000000 --- a/docs/AccountApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# flat_api.AccountApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_authenticated_user**](AccountApi.md#get_authenticated_user) | **GET** /me | Get current user profile - - -# **get_authenticated_user** -> UserDetails get_authenticated_user(only_id=only_id) - -Get current user profile - -Get details about the current authenticated User. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.AccountApi(api_client) - only_id = False # bool | Only return the user id (optional) (default to False) - - try: - # Get current user profile - api_response = api_instance.get_authenticated_user(only_id=only_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **only_id** | **bool**| Only return the user id | [optional] [default to False] - -### Return type - -[**UserDetails**](UserDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current user details | - | -**0** | Error | - | - -[[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) - diff --git a/docs/ApiAccessToken.md b/docs/ApiAccessToken.md deleted file mode 100644 index 16fba33..0000000 --- a/docs/ApiAccessToken.md +++ /dev/null @@ -1,16 +0,0 @@ -# ApiAccessToken - -An API access token -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of this private token | [optional] -**name** | **str** | Name of the personal access token | [optional] -**token** | **str** | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] -**issued_date** | **datetime** | The date then this token was issued | [optional] -**expiration_date** | **datetime** | The date then this token will expire | [optional] -**scopes** | [**list[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AppScopes.md b/docs/AppScopes.md deleted file mode 100644 index 1b7c1a7..0000000 --- a/docs/AppScopes.md +++ /dev/null @@ -1,10 +0,0 @@ -# AppScopes - -Available scopes -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Assignment.md b/docs/Assignment.md deleted file mode 100644 index 050552f..0000000 --- a/docs/Assignment.md +++ /dev/null @@ -1,29 +0,0 @@ -# Assignment - -Assignment details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | State of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**title** | **str** | Title of the assignment | [optional] -**classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] -**description** | **str** | Description and content of the assignment | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**list[MediaAttachment]**](MediaAttachment.md) | | [optional] -**submissions** | [**list[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] -**creator** | **str** | The User unique identifier of the creator of this assignment | [optional] -**creation_date** | **datetime** | The creation date of this assignment | [optional] -**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] -**google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] -**microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] -**mfc** | [**AssignmentMfc**](AssignmentMfc.md) | | [optional] -**canvas** | [**AssignmentCanvas**](AssignmentCanvas.md) | | [optional] -**lti** | [**AssignmentLti**](AssignmentLti.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCanvas.md b/docs/AssignmentCanvas.md deleted file mode 100644 index 7a3818b..0000000 --- a/docs/AssignmentCanvas.md +++ /dev/null @@ -1,12 +0,0 @@ -# AssignmentCanvas - -A Canvas LMS assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on Canvas assignment | [optional] -**alternate_link** | **str** | Link to Canvas assignment | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCopy.md b/docs/AssignmentCopy.md deleted file mode 100644 index ff7b4ab..0000000 --- a/docs/AssignmentCopy.md +++ /dev/null @@ -1,13 +0,0 @@ -# AssignmentCopy - -Assignment copy operation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**classroom** | **str** | The destination classroom where the assignment will be copied | [optional] -**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] -**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCreation.md b/docs/AssignmentCreation.md deleted file mode 100644 index 7618d3f..0000000 --- a/docs/AssignmentCreation.md +++ /dev/null @@ -1,27 +0,0 @@ -# AssignmentCreation - -Assignment creation details -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**state** | **str** | State of the assignment | [optional] -**title** | **str** | Title of the assignment | [optional] -**description** | **str** | Description and content of the assignment | [optional] -**attachments** | [**list[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] -**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | **str** | The id of the associated toolset | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] -**google_classroom** | [**AssignmentCreationGoogleClassroom**](AssignmentCreationGoogleClassroom.md) | | [optional] -**microsoft_graph** | [**AssignmentCreationMicrosoftGraph**](AssignmentCreationMicrosoftGraph.md) | | [optional] -**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] -**assigned_students** | **list[str]** | Identifiers for the students that have access to the assignment | [optional] -**shuffle_exercises** | **bool** | Mixing exercises for each students | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCreationGoogleClassroom.md b/docs/AssignmentCreationGoogleClassroom.md deleted file mode 100644 index 071f81b..0000000 --- a/docs/AssignmentCreationGoogleClassroom.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentCreationGoogleClassroom - -Google Classroom options for this assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCreationMicrosoftGraph.md b/docs/AssignmentCreationMicrosoftGraph.md deleted file mode 100644 index ec8f0f4..0000000 --- a/docs/AssignmentCreationMicrosoftGraph.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentCreationMicrosoftGraph - -Microsoft Graph options for this assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**categories** | **list[str]** | List of categories this assignment belongs to | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentLti.md b/docs/AssignmentLti.md deleted file mode 100644 index 0048ff5..0000000 --- a/docs/AssignmentLti.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentLti - -An LTI assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Resource ID in the LMS | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentMfc.md b/docs/AssignmentMfc.md deleted file mode 100644 index 332da6f..0000000 --- a/docs/AssignmentMfc.md +++ /dev/null @@ -1,12 +0,0 @@ -# AssignmentMfc - -A MusicFirst Classroom assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on MusicFirst Task | [optional] -**alternate_link** | **str** | Link to MusicFirst Classroom task | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmission.md b/docs/AssignmentSubmission.md deleted file mode 100644 index 84d3474..0000000 --- a/docs/AssignmentSubmission.md +++ /dev/null @@ -1,26 +0,0 @@ -# AssignmentSubmission - -Assignment Submission -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the submission | [optional] -**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | [optional] -**classroom** | **str** | Unique identifier of the classroom where the assignment was posted | [optional] -**assignment** | **str** | Unique identifier of the assignment | [optional] -**creator** | **str** | The User identifier of the student who created the submission | [optional] -**creation_date** | **str** | The date when the submission was created | [optional] -**attachments** | [**list[MediaAttachment]**](MediaAttachment.md) | | [optional] -**submission_date** | **str** | The date when the student submitted his work | [optional] -**return_date** | **str** | The date when the teacher returned the work | [optional] -**return_creator** | **str** | The User unique identifier of the teacher who returned the submission | [optional] -**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] -**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] -**max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] -**exercises_ids** | **list[str]** | The ids of exercises when they need to be in a specific order | [optional] -**google_classroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] -**microsoft_graph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionComment.md b/docs/AssignmentSubmissionComment.md deleted file mode 100644 index a0429be..0000000 --- a/docs/AssignmentSubmissionComment.md +++ /dev/null @@ -1,17 +0,0 @@ -# AssignmentSubmissionComment - -Feedback comment added to an assignment submission -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The comment unique identifier | [optional] -**user** | **str** | The author unique identifier | [optional] -**submission** | **str** | The submission unique identifier | [optional] -**date** | **datetime** | The date when the comment was posted | [optional] -**modification_date** | **datetime** | The date of the last comment modification | [optional] -**comment** | **str** | The comment text | [optional] -**unread** | **bool** | True if the comment is unread by the current user | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/AssignmentSubmissionCommentCreation.md deleted file mode 100644 index 9335acd..0000000 --- a/docs/AssignmentSubmissionCommentCreation.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentSubmissionCommentCreation - -Creation of a assignment submission comment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**comment** | **str** | The comment text | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionHistory.md b/docs/AssignmentSubmissionHistory.md deleted file mode 100644 index f87c9ec..0000000 --- a/docs/AssignmentSubmissionHistory.md +++ /dev/null @@ -1,17 +0,0 @@ -# AssignmentSubmissionHistory - -History item of the submission -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date** | **datetime** | The date when the submission was changed | [optional] -**users** | **list[str]** | The user(s) unique identifier(s) who made the change | [optional] -**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | [optional] -**draft_grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] -**grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] -**max_points** | **float** | The denominator of the grade at this time in the submission grade history | [optional] -**attachment** | [**AssignmentSubmissionHistoryAttachment**](AssignmentSubmissionHistoryAttachment.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionHistoryAttachment.md b/docs/AssignmentSubmissionHistoryAttachment.md deleted file mode 100644 index 6bcd671..0000000 --- a/docs/AssignmentSubmissionHistoryAttachment.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentSubmissionHistoryAttachment - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**score** | **str** | The score identifier that changed | [optional] -**revision** | **str** | The revision identifier that changed | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionState.md b/docs/AssignmentSubmissionState.md deleted file mode 100644 index 54390a1..0000000 --- a/docs/AssignmentSubmissionState.md +++ /dev/null @@ -1,10 +0,0 @@ -# AssignmentSubmissionState - -State of the submission -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/AssignmentSubmissionUpdate.md deleted file mode 100644 index 058598e..0000000 --- a/docs/AssignmentSubmissionUpdate.md +++ /dev/null @@ -1,17 +0,0 @@ -# AssignmentSubmissionUpdate - -Assignment Submission creation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attachments** | [**list[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**submit** | **bool** | If `true`, the submission will be marked as done | [optional] -**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] -**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] -**exercises_ids** | **list[str]** | The ids of exercises when they need to be in a specific order | [optional] -**_return** | **bool** | If `true`, the submission will be marked as done | [optional] -**comments** | [**AssignmentSubmissionUpdateComments**](AssignmentSubmissionUpdateComments.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionUpdateComments.md b/docs/AssignmentSubmissionUpdateComments.md deleted file mode 100644 index d643876..0000000 --- a/docs/AssignmentSubmissionUpdateComments.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssignmentSubmissionUpdateComments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of comments added to the submission | [optional] -**unread** | **float** | The number of unread comments for the current user | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentType.md b/docs/AssignmentType.md deleted file mode 100644 index 6211653..0000000 --- a/docs/AssignmentType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AssignmentType - -Type of the assignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassApi.md b/docs/ClassApi.md deleted file mode 100644 index 0b05cb6..0000000 --- a/docs/ClassApi.md +++ /dev/null @@ -1,2322 +0,0 @@ -# flat_api.ClassApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**activate_class**](ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class -[**add_class_user**](ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class -[**archive_assignment**](ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment -[**archive_class**](ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class -[**copy_assignment**](ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment -[**create_assignment**](ClassApi.md#create_assignment) | **POST** /classes/{class}/assignments | Assignment creation -[**create_class**](ClassApi.md#create_class) | **POST** /classes | Create a new class -[**create_submission**](ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission -[**delete_class_user**](ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class -[**delete_submission**](ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Delete a submission -[**delete_submission_comment**](ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission -[**edit_submission**](ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission -[**enroll_class**](ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class -[**export_submissions_reviews_as_csv**](ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports -[**export_submissions_reviews_as_excel**](ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports -[**fork_score**](ClassApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -[**get_class**](ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class -[**get_score_submissions**](ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -[**get_submission**](ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission -[**get_submission_comments**](ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission -[**get_submission_history**](ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission -[**get_submissions**](ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions -[**list_assignments**](ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing -[**list_class_student_submissions**](ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student -[**list_classes**](ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user -[**post_submission_comment**](ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission -[**unarchive_assignment**](ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. -[**unarchive_class**](ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class -[**update_class**](ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class -[**update_submission_comment**](ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission - - -# **activate_class** -> ClassDetails activate_class(_class) - -Activate the class - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class - - try: - # Activate the class - api_response = api_instance.activate_class(_class) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->activate_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The class details | - | -**0** | Error | - | - -[[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) - -# **add_class_user** -> add_class_user(_class, user) - -Add a user to the class - -This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -user = 'user_example' # str | Unique identifier of the user - - try: - # Add a user to the class - api_instance.add_class_user(_class, user) - except ApiException as e: - print("Exception when calling ClassApi->add_class_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The user has been added to the class | - | -**0** | Error | - | - -[[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) - -# **archive_assignment** -> Assignment archive_assignment(_class, assignment) - -Archive the assignment - -Archive the assignment - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment - - try: - # Archive the assignment - api_response = api_instance.archive_assignment(_class, assignment) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->archive_assignment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - -### Return type - -[**Assignment**](Assignment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The assignment details | - | -**0** | Error | - | - -[[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) - -# **archive_class** -> ClassDetails archive_class(_class) - -Archive the class - -Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class - - try: - # Archive the class - api_response = api_instance.archive_class(_class) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->archive_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The class details | - | -**0** | Error | - | - -[[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) - -# **copy_assignment** -> Assignment copy_assignment(_class, assignment, body) - -Copy an assignment - -Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -body = flat_api.AssignmentCopy() # AssignmentCopy | - - try: - # Copy an assignment - api_response = api_instance.copy_assignment(_class, assignment, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->copy_assignment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentCopy**](AssignmentCopy.md)| | - -### Return type - -[**Assignment**](Assignment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new created assingment | - | -**0** | Error | - | - -[[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) - -# **create_assignment** -> Assignment create_assignment(_class, body=body) - -Assignment creation - -Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -body = flat_api.AssignmentCreation() # AssignmentCreation | (optional) - - try: - # Assignment creation - api_response = api_instance.create_assignment(_class, body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->create_assignment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **body** | [**AssignmentCreation**](AssignmentCreation.md)| | [optional] - -### Return type - -[**Assignment**](Assignment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The assignment has been created | - | -**0** | Error | - | - -[[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) - -# **create_class** -> ClassDetails create_class(body) - -Create a new class - -Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - body = flat_api.ClassCreation() # ClassCreation | - - try: - # Create a new class - api_response = api_instance.create_class(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->create_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClassCreation**](ClassCreation.md)| | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new class details | - | -**402** | Account overquota | - | -**0** | Error | - | - -[[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) - -# **create_submission** -> AssignmentSubmission create_submission(_class, assignment, body) - -Create or edit a submission - -Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | - - try: - # Create or edit a submission - api_response = api_instance.create_submission(_class, assignment, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->create_submission: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | - -### Return type - -[**AssignmentSubmission**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The submission | - | -**0** | Error | - | - -[[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) - -# **delete_class_user** -> delete_class_user(_class, user) - -Remove a user from the class - -This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -user = 'user_example' # str | Unique identifier of the user - - try: - # Remove a user from the class - api_instance.delete_class_user(_class, user) - except ApiException as e: - print("Exception when calling ClassApi->delete_class_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The user has been removed from the class | - | -**0** | Error | - | - -[[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) - -# **delete_submission** -> delete_submission(_class, assignment, submission) - -Delete a submission - -Use this method as a teacher to delete a submission and allow student to start over the assignment - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission - - try: - # Delete a submission - api_instance.delete_submission(_class, assignment, submission) - except ApiException as e: - print("Exception when calling ClassApi->delete_submission: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The submission has been deleted | - | -**0** | Error | - | - -[[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) - -# **delete_submission_comment** -> delete_submission_comment(_class, assignment, submission, comment) - -Delete a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission -comment = 'comment_example' # str | Unique identifier of the comment - - try: - # Delete a feedback comment to a submission - api_instance.delete_submission_comment(_class, assignment, submission, comment) - except ApiException as e: - print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **comment** | **str**| Unique identifier of the comment | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The comment has been deleted | - | -**0** | Error | - | - -[[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) - -# **edit_submission** -> AssignmentSubmission edit_submission(_class, assignment, submission, body) - -Edit a submission - -Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission -body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | - - try: - # Edit a submission - api_response = api_instance.edit_submission(_class, assignment, submission, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->edit_submission: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | - -### Return type - -[**AssignmentSubmission**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The submission | - | -**0** | Error | - | - -[[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) - -# **enroll_class** -> ClassDetails enroll_class(enrollment_code) - -Join a class - -Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` - - try: - # Join a class - api_response = api_instance.enroll_class(enrollment_code) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->enroll_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new class details | - | -**0** | Error | - | - -[[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) - -# **export_submissions_reviews_as_csv** -> file export_submissions_reviews_as_csv(_class, assignment) - -CSV Grades exports - -Export list of submissions grades to a CSV file - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment - - try: - # CSV Grades exports - api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - -### Return type - -**file** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/csv - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of submissions | - | -**0** | Error | - | - -[[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) - -# **export_submissions_reviews_as_excel** -> file export_submissions_reviews_as_excel(_class, assignment) - -Excel Grades exports - -Export list of submissions grades to an Excel file - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment - - try: - # Excel Grades exports - api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - -### Return type - -**file** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of submissions | - | -**0** | Error | - | - -[[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) - -# **fork_score** -> ScoreDetails fork_score(score, body, sharing_key=sharing_key) - -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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Fork a score - api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->fork_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score details | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_class** -> ClassDetails get_class(_class) - -Get the details of a single class - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class - - try: - # Get the details of a single class - api_response = api_instance.get_class(_class) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new class details | - | -**0** | Error | - | - -[[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) - -# **get_score_submissions** -> list[AssignmentSubmission] get_score_submissions(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - score = 'score_example' # str | 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: - # List submissions related to the score - api_response = api_instance.get_score_submissions(score) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - -### Return type - -[**list[AssignmentSubmission]**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of submissions | - | -**0** | Error | - | - -[[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) - -# **get_submission** -> AssignmentSubmission get_submission(_class, assignment, submission) - -Get a student submission - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission - - try: - # Get a student submission - api_response = api_instance.get_submission(_class, assignment, submission) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_submission: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - -### Return type - -[**AssignmentSubmission**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A submission | - | -**0** | Error | - | - -[[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) - -# **get_submission_comments** -> list[AssignmentSubmissionComment] get_submission_comments(_class, assignment, submission) - -List the feedback comments of a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission - - try: - # List the feedback comments of a submission - api_response = api_instance.get_submission_comments(_class, assignment, submission) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - -### Return type - -[**list[AssignmentSubmissionComment]**](AssignmentSubmissionComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The comments of the score | - | -**403** | Not granted to access to this submission | - | -**404** | Submission not found | - | -**0** | Error | - | - -[[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) - -# **get_submission_history** -> list[AssignmentSubmissionHistory] get_submission_history(_class, assignment, submission) - -Get the history of the submission - -For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission - - try: - # Get the history of the submission - api_response = api_instance.get_submission_history(_class, assignment, submission) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_submission_history: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - -### Return type - -[**list[AssignmentSubmissionHistory]**](AssignmentSubmissionHistory.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The history of the submission | - | -**403** | Not granted to access to this submission | - | -**404** | Submission not found | - | -**0** | Error | - | - -[[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) - -# **get_submissions** -> list[AssignmentSubmission] get_submissions(_class, assignment) - -List the students' submissions - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment - - try: - # List the students' submissions - api_response = api_instance.get_submissions(_class, assignment) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->get_submissions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - -### Return type - -[**list[AssignmentSubmission]**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The submissions | - | -**0** | Error | - | - -[[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) - -# **list_assignments** -> list[Assignment] list_assignments(_class) - -Assignments listing - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class - - try: - # Assignments listing - api_response = api_instance.list_assignments(_class) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->list_assignments: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - -### Return type - -[**list[Assignment]**](Assignment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of assignments for the class | - | -**0** | Error | - | - -[[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) - -# **list_class_student_submissions** -> list[AssignmentSubmission] list_class_student_submissions(_class, user) - -List the submissions for a student - -Use this method as a teacher to list all the assignment submissions sent by a student of the class - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -user = 'user_example' # str | Unique identifier of the user - - try: - # List the submissions for a student - api_response = api_instance.list_class_student_submissions(_class, user) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | - -### Return type - -[**list[AssignmentSubmission]**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The list of submissions | - | -**0** | Error | - | - -[[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) - -# **list_classes** -> list[ClassDetails] list_classes(state=state) - -List the classes available for the current user - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - state = 'active' # str | Filter the classes by state (optional) (default to 'active') - - try: - # List the classes available for the current user - api_response = api_instance.list_classes(state=state) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->list_classes: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **state** | **str**| Filter the classes by state | [optional] [default to 'active'] - -### Return type - -[**list[ClassDetails]**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The list of classes | - | -**0** | Error | - | - -[[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) - -# **post_submission_comment** -> AssignmentSubmissionComment post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) - -Add a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission -assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | - - try: - # Add a feedback comment to a submission - api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | - -### Return type - -[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The comment | - | -**403** | Not granted to access to this submission | - | -**404** | Submission not found | - | -**0** | Error | - | - -[[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) - -# **unarchive_assignment** -> Assignment unarchive_assignment(_class, assignment) - -Unarchive the assignment. - -Mark the assignment as `active`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment - - try: - # Unarchive the assignment. - api_response = api_instance.unarchive_assignment(_class, assignment) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - -### Return type - -[**Assignment**](Assignment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The assignment details | - | -**0** | Error | - | - -[[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) - -# **unarchive_class** -> ClassDetails unarchive_class(_class) - -Unarchive the class - -Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class - - try: - # Unarchive the class - api_response = api_instance.unarchive_class(_class) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->unarchive_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The class details | - | -**0** | Error | - | - -[[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) - -# **update_class** -> ClassDetails update_class(_class, body=body) - -Update the class - -Update the meta information of the class - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class (optional) - - try: - # Update the class - api_response = api_instance.update_class(_class, body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->update_class: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] - -### Return type - -[**ClassDetails**](ClassDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new class details | - | -**0** | Error | - | - -[[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) - -# **update_submission_comment** -> AssignmentSubmissionComment update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) - -Update a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ClassApi(api_client) - _class = '_class_example' # str | Unique identifier of the class -assignment = 'assignment_example' # str | Unique identifier of the assignment -submission = 'submission_example' # str | Unique identifier of the submission -comment = 'comment_example' # str | Unique identifier of the comment -assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | - - try: - # Update a feedback comment to a submission - api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) - pprint(api_response) - except ApiException as e: - print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **comment** | **str**| Unique identifier of the comment | - **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | - -### Return type - -[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The comment | - | -**403** | Not granted to access to this submission | - | -**404** | Submission not found | - | -**0** | Error | - | - -[[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) - diff --git a/docs/ClassAttachmentCreation.md b/docs/ClassAttachmentCreation.md deleted file mode 100644 index 8badb79..0000000 --- a/docs/ClassAttachmentCreation.md +++ /dev/null @@ -1,17 +0,0 @@ -# ClassAttachmentCreation - -Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | The type of the attachment posted | [optional] -**score** | **str** | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] -**worksheet** | **str** | An unique worksheet identifier | [optional] -**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] -**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] -**url** | **str** | The URL of the attachment. | [optional] -**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassCreation.md b/docs/ClassCreation.md deleted file mode 100644 index 77542ef..0000000 --- a/docs/ClassCreation.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassCreation - -Creation of a classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the new class | -**section** | **str** | The section of the new class | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetails.md b/docs/ClassDetails.md deleted file mode 100644 index cfb515d..0000000 --- a/docs/ClassDetails.md +++ /dev/null @@ -1,31 +0,0 @@ -# ClassDetails - -A classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the class | [optional] -**state** | [**ClassState**](ClassState.md) | | [optional] -**name** | **str** | The name of the class | [optional] -**section** | **str** | The section of the class | [optional] -**description** | **str** | An optionnal description for this class | [optional] -**organization** | **str** | The unique identifier of the Organization owning this class | [optional] -**owner** | **str** | The unique identifier of the User owning this class | [optional] -**creation_date** | **datetime** | The date when the class was create | [optional] -**enrollment_code** | **str** | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] -**theme** | **str** | The theme identifier using in Flat User Interface | [optional] -**assignments_count** | **float** | The number of assignments created in the class | [optional] -**students_group** | [**GroupDetails**](GroupDetails.md) | | [optional] -**teachers_group** | [**GroupDetails**](GroupDetails.md) | | [optional] -**issues** | [**ClassDetailsIssues**](ClassDetailsIssues.md) | | [optional] -**google_classroom** | [**ClassDetailsGoogleClassroom**](ClassDetailsGoogleClassroom.md) | | [optional] -**google_drive** | [**ClassDetailsGoogleDrive**](ClassDetailsGoogleDrive.md) | | [optional] -**microsoft_graph** | [**ClassDetailsMicrosoftGraph**](ClassDetailsMicrosoftGraph.md) | | [optional] -**lti** | [**ClassDetailsLti**](ClassDetailsLti.md) | | [optional] -**canvas** | [**ClassDetailsCanvas**](ClassDetailsCanvas.md) | | [optional] -**mfc** | [**ClassDetailsMfc**](ClassDetailsMfc.md) | | [optional] -**clever** | [**ClassDetailsClever**](ClassDetailsClever.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md deleted file mode 100644 index b5d19af..0000000 --- a/docs/ClassDetailsCanvas.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassDetailsCanvas - -Meta information provided by Canvs LMS -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on Canvas | [optional] -**domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md deleted file mode 100644 index 7a67398..0000000 --- a/docs/ClassDetailsClever.md +++ /dev/null @@ -1,17 +0,0 @@ -# ClassDetailsClever - -Clever.com section-related information -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Clever section unique identifier | [optional] -**creation_date** | **datetime** | The creation date of the section on clever | [optional] -**modification_date** | **datetime** | The last modification date of the section on clever | [optional] -**subject** | **str** | Normalized subject of the course | [optional] -**term_name** | **str** | Name of the term when this course happens | [optional] -**term_start_date** | **datetime** | Beginning date of the term | [optional] -**term_end_date** | **datetime** | End date of the term | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md deleted file mode 100644 index 588a2ac..0000000 --- a/docs/ClassDetailsGoogleClassroom.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassDetailsGoogleClassroom - -Google Classroom course-related information -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The course identifier on Google Classroom | [optional] -**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsGoogleDrive.md b/docs/ClassDetailsGoogleDrive.md deleted file mode 100644 index 804ee63..0000000 --- a/docs/ClassDetailsGoogleDrive.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassDetailsGoogleDrive - -Google Drive course-related information provided by Google Classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**teacher_folder_id** | **str** | [Teachers only] The Drive directory identifier of the teachers' folder | [optional] -**teacher_folder_alternate_link** | **str** | [Teachers only] The Drive URL of the teachers' folder | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsIssues.md b/docs/ClassDetailsIssues.md deleted file mode 100644 index 215482f..0000000 --- a/docs/ClassDetailsIssues.md +++ /dev/null @@ -1,11 +0,0 @@ -# ClassDetailsIssues - -Detected issues for this class -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sync** | [**list[ClassDetailsIssuesSync]**](ClassDetailsIssuesSync.md) | Synchronization issues for the class | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsIssuesSync.md b/docs/ClassDetailsIssuesSync.md deleted file mode 100644 index 9b7f953..0000000 --- a/docs/ClassDetailsIssuesSync.md +++ /dev/null @@ -1,13 +0,0 @@ -# ClassDetailsIssuesSync - -A sync issue -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The account user identifier | [optional] -**email** | **str** | The email address of the user concerned by this sync issue | [optional] -**reason** | **str** | The reason why the account cannot be synced | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsLti.md b/docs/ClassDetailsLti.md deleted file mode 100644 index 8dcf986..0000000 --- a/docs/ClassDetailsLti.md +++ /dev/null @@ -1,13 +0,0 @@ -# ClassDetailsLti - -Meta information provided by the LTI consumer -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**context_id** | **str** | Unique context identifier provided | [optional] -**context_title** | **str** | Context title | [optional] -**context_label** | **str** | Context label | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsMfc.md b/docs/ClassDetailsMfc.md deleted file mode 100644 index 180a2d7..0000000 --- a/docs/ClassDetailsMfc.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassDetailsMfc - -Meta information provided by Canvs LMS -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on MusicFirst Classroom | [optional] -**alternate_link** | **str** | Link to MusicFirst Classroom class | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassDetailsMicrosoftGraph.md b/docs/ClassDetailsMicrosoftGraph.md deleted file mode 100644 index 70a459a..0000000 --- a/docs/ClassDetailsMicrosoftGraph.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassDetailsMicrosoftGraph - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The course identifier on Microsoft Graph | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassRoles.md b/docs/ClassRoles.md deleted file mode 100644 index af894b6..0000000 --- a/docs/ClassRoles.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassRoles - -User's Class Role (for Edu users only) -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassState.md b/docs/ClassState.md deleted file mode 100644 index 2e5c26f..0000000 --- a/docs/ClassState.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassState - -The state of a classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassUpdate.md b/docs/ClassUpdate.md deleted file mode 100644 index a3ef0f9..0000000 --- a/docs/ClassUpdate.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClassUpdate - -Update of a classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the class | [optional] -**section** | **str** | The section of the class | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Collection.md b/docs/Collection.md deleted file mode 100644 index ed4896a..0000000 --- a/docs/Collection.md +++ /dev/null @@ -1,23 +0,0 @@ -# Collection - -Collection of scores -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the collection | [optional] -**title** | **str** | The title of the collection | [optional] -**html_url** | **str** | The url where the collection can be viewed in a web browser | [optional] -**type** | [**CollectionType**](CollectionType.md) | | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] -**sharing_key** | **str** | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] -**app** | [**CollectionApp**](CollectionApp.md) | | [optional] -**creation_date** | **datetime** | The date when the collection was created | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**collaborators** | [**list[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] -**capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | [optional] -**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md deleted file mode 100644 index dfd5331..0000000 --- a/docs/CollectionApi.md +++ /dev/null @@ -1,723 +0,0 @@ -# flat_api.CollectionApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_score_to_collection**](CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection -[**create_collection**](CollectionApi.md#create_collection) | **POST** /collections | Create a new collection -[**delete_collection**](CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection -[**delete_score_from_collection**](CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection -[**edit_collection**](CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata -[**get_collection**](CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details -[**list_collection_scores**](CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection -[**list_collections**](CollectionApi.md#list_collections) | **GET** /collections | List the collections -[**untrash_collection**](CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection - - -# **add_score_to_collection** -> ScoreDetails add_score_to_collection(collection, score, sharing_key=sharing_key) - -Add a score to the collection - -This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Add a score to the collection - api_response = api_instance.add_score_to_collection(collection, score, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score details | - | -**403** | Not granted to access to this collection or score | - | -**404** | Collection or score not found | - | -**0** | Error | - | - -[[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) - -# **create_collection** -> Collection create_collection(body) - -Create a new collection - -This method will create a new collection and add it to your `root` collection. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - body = flat_api.CollectionCreation() # CollectionCreation | - - try: - # Create a new collection - api_response = api_instance.create_collection(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->create_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CollectionCreation**](CollectionCreation.md)| | - -### Return type - -[**Collection**](Collection.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Collection created | - | -**400** | Bad collection creation request | - | -**0** | Error | - | - -[[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) - -# **delete_collection** -> delete_collection(collection) - -Delete the collection - -This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - try: - # Delete the collection - api_instance.delete_collection(collection) - except ApiException as e: - print("Exception when calling CollectionApi->delete_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Collection deleted | - | -**403** | Not granted to access to this collection | - | -**404** | Collection not found | - | -**0** | Error | - | - -[[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) - -# **delete_score_from_collection** -> delete_score_from_collection(collection, score, sharing_key=sharing_key) - -Delete a score from the collection - -This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Delete a score from the collection - api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) - except ApiException as e: - print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Score removed from the collection | - | -**403** | Not granted to access to this collection | - | -**404** | Collection not found | - | -**0** | Error | - | - -[[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) - -# **edit_collection** -> Collection edit_collection(collection, body=body) - -Update a collection's metadata - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -body = flat_api.CollectionModification() # CollectionModification | (optional) - - try: - # Update a collection's metadata - api_response = api_instance.edit_collection(collection, body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->edit_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **body** | [**CollectionModification**](CollectionModification.md)| | [optional] - -### Return type - -[**Collection**](Collection.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Collection details | - | -**403** | Not granted to access to this collection | - | -**404** | Collection not found | - | -**0** | Error | - | - -[[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) - -# **get_collection** -> Collection get_collection(collection, sharing_key=sharing_key) - -Get collection details - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Get collection details - api_response = api_instance.get_collection(collection, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->get_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **sharing_key** | **str**| 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] - -### Return type - -[**Collection**](Collection.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Collection details | - | -**403** | Not granted to access to this collection | - | -**404** | Collection not found | - | -**0** | Error | - | - -[[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) - -# **list_collection_scores** -> list[ScoreDetails] list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - -List the scores contained in a collection - -Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted -sharing_key = 'sharing_key_example' # str | 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) -sort = 'sort_example' # str | Sort (optional) -direction = 'direction_example' # str | Sort direction (optional) -limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) -next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - try: - # List the scores contained in a collection - api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **sharing_key** | **str**| 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] - **sort** | **str**| Sort | [optional] - **direction** | **str**| Sort direction | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of scores | - | -**0** | Error | - | - -[[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) - -# **list_collections** -> list[Collection] list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - -List the collections - -Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') -sort = 'sort_example' # str | Sort (optional) -direction = 'direction_example' # str | Sort direction (optional) -limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) -next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - try: - # List the collections - api_response = api_instance.list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) - pprint(api_response) - except ApiException as e: - print("Exception when calling CollectionApi->list_collections: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] [default to 'root'] - **sort** | **str**| Sort | [optional] - **direction** | **str**| Sort direction | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - -### Return type - -[**list[Collection]**](Collection.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of collections | - | -**0** | Error | - | - -[[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) - -# **untrash_collection** -> untrash_collection(collection) - -Untrash a collection - -This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - try: - # Untrash a collection - api_instance.untrash_collection(collection) - except ApiException as e: - print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The score has been untrashed | - | -**403** | Not granted to manage this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - diff --git a/docs/CollectionApp.md b/docs/CollectionApp.md deleted file mode 100644 index c7ee3ac..0000000 --- a/docs/CollectionApp.md +++ /dev/null @@ -1,13 +0,0 @@ -# CollectionApp - -For App collections, the details of the app that created the collection -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The app unique identifier | [optional] -**name** | **str** | The name of the app | [optional] -**logo** | **str** | The app logo url | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md deleted file mode 100644 index ff079a3..0000000 --- a/docs/CollectionCapabilities.md +++ /dev/null @@ -1,15 +0,0 @@ -# CollectionCapabilities - -Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**can_edit** | **bool** | Whether the current user can modify the metadata for the collection | [optional] -**can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | [optional] -**can_delete** | **bool** | Whether the current user can delete the collection | [optional] -**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] -**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionCreation.md b/docs/CollectionCreation.md deleted file mode 100644 index ae2eff6..0000000 --- a/docs/CollectionCreation.md +++ /dev/null @@ -1,11 +0,0 @@ -# CollectionCreation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | The title of the collection | -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md deleted file mode 100644 index 0b66059..0000000 --- a/docs/CollectionModification.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollectionModification - -Edit the collection metadata -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | The title of the collection | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionPrivacy.md b/docs/CollectionPrivacy.md deleted file mode 100644 index 2c55908..0000000 --- a/docs/CollectionPrivacy.md +++ /dev/null @@ -1,10 +0,0 @@ -# CollectionPrivacy - -The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionType.md b/docs/CollectionType.md deleted file mode 100644 index 00a8406..0000000 --- a/docs/CollectionType.md +++ /dev/null @@ -1,10 +0,0 @@ -# CollectionType - -Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlatErrorResponse.md b/docs/FlatErrorResponse.md deleted file mode 100644 index 914f13c..0000000 --- a/docs/FlatErrorResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# FlatErrorResponse - -An API Error response -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | A corresponding code for this error | [optional] -**message** | **str** | A printable message for this message | [optional] -**id** | **str** | An unique error identifier generated for the request | [optional] -**param** | **str** | The related parameter that caused the error | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlatLocales.md b/docs/FlatLocales.md deleted file mode 100644 index 5cc6662..0000000 --- a/docs/FlatLocales.md +++ /dev/null @@ -1,10 +0,0 @@ -# FlatLocales - -The user language -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GoogleClassroomCoursework.md b/docs/GoogleClassroomCoursework.md deleted file mode 100644 index ef83ab8..0000000 --- a/docs/GoogleClassroomCoursework.md +++ /dev/null @@ -1,14 +0,0 @@ -# GoogleClassroomCoursework - -A coursework on Google Classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the coursework assigned by Classroom | [optional] -**state** | **str** | State of the coursework | [optional] -**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] -**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GoogleClassroomSubmission.md b/docs/GoogleClassroomSubmission.md deleted file mode 100644 index f3c9478..0000000 --- a/docs/GoogleClassroomSubmission.md +++ /dev/null @@ -1,13 +0,0 @@ -# GoogleClassroomSubmission - -A coursework submission on Google Classroom -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the coursework submission assigned by Classroom | [optional] -**state** | **str** | State of the submission on Google Classroom | [optional] -**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Group.md b/docs/Group.md deleted file mode 100644 index d8d0fa5..0000000 --- a/docs/Group.md +++ /dev/null @@ -1,17 +0,0 @@ -# Group - -A group of users -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the group | [optional] -**name** | **str** | The display name of the group | [optional] -**type** | **str** | The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class | [optional] -**users_count** | **float** | The number of users in this group | [optional] -**read_only** | **bool** | `True` if the group is set in read-only | [optional] -**organization** | **str** | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] -**creation_date** | **datetime** | The creation date of the group | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupApi.md b/docs/GroupApi.md deleted file mode 100644 index c4ef5e7..0000000 --- a/docs/GroupApi.md +++ /dev/null @@ -1,233 +0,0 @@ -# flat_api.GroupApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_group_details**](GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information -[**get_group_scores**](GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -[**list_group_users**](GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users - - -# **get_group_details** -> GroupDetails get_group_details(group) - -Get group information - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group - - try: - # Get group information - api_response = api_instance.get_group_details(group) - pprint(api_response) - except ApiException as e: - print("Exception when calling GroupApi->get_group_details: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - -### Return type - -[**GroupDetails**](GroupDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The group details | - | -**0** | Error | - | - -[[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) - -# **get_group_scores** -> list[ScoreDetails] get_group_scores(group, parent=parent) - -List group's scores - -Get the list of scores shared with a group. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group -parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - - try: - # List group's scores - api_response = api_instance.get_group_scores(group, parent=parent) - pprint(api_response) - except ApiException as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The group's scores | - | -**0** | Error | - | - -[[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) - -# **list_group_users** -> list[UserPublic] list_group_users(group, source=source) - -List group's users - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group -source = 'source_example' # str | Filter the users by their source (optional) - - try: - # List group's users - api_response = api_instance.list_group_users(group, source=source) - pprint(api_response) - except ApiException as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **source** | **str**| Filter the users by their source | [optional] - -### Return type - -[**list[UserPublic]**](UserPublic.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The list of users member of the group | - | -**0** | Error | - | - -[[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) - diff --git a/docs/GroupDetails.md b/docs/GroupDetails.md deleted file mode 100644 index 8cdac74..0000000 --- a/docs/GroupDetails.md +++ /dev/null @@ -1,17 +0,0 @@ -# GroupDetails - -The details of a group -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the group | [optional] -**name** | **str** | The displayable name of the group | [optional] -**type** | [**GroupType**](GroupType.md) | | [optional] -**organization** | **str** | The unique identifier of the Organization owning the group | [optional] -**creation_date** | **datetime** | The date when the group was create | [optional] -**users_count** | **float** | The number of students in this group | [optional] -**read_only** | **bool** | `true` if the properties and members of this group are in in read-only | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupType.md b/docs/GroupType.md deleted file mode 100644 index 7394a70..0000000 --- a/docs/GroupType.md +++ /dev/null @@ -1,10 +0,0 @@ -# GroupType - -The type of the group -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseMode.md b/docs/LicenseMode.md deleted file mode 100644 index 2e93c82..0000000 --- a/docs/LicenseMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# LicenseMode - -Mode of the license -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseSources.md b/docs/LicenseSources.md deleted file mode 100644 index 3a5dbc3..0000000 --- a/docs/LicenseSources.md +++ /dev/null @@ -1,10 +0,0 @@ -# LicenseSources - -Source of the license -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LmsName.md b/docs/LmsName.md deleted file mode 100644 index 5c2f0eb..0000000 --- a/docs/LmsName.md +++ /dev/null @@ -1,10 +0,0 @@ -# LmsName - -LMS name -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LtiCredentials.md b/docs/LtiCredentials.md deleted file mode 100644 index 2bc878c..0000000 --- a/docs/LtiCredentials.md +++ /dev/null @@ -1,19 +0,0 @@ -# LtiCredentials - -A couple of LTI 1.x OAuth credentials -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of this couple of credentials | [optional] -**name** | **str** | Name of the couple of credentials | [optional] -**lms** | [**LmsName**](LmsName.md) | | [optional] -**organization** | **str** | The unique identifier of the Organization associated to these credentials | [optional] -**creator** | **str** | Unique identifier of the user who created these credentials | [optional] -**creation_date** | **datetime** | The creation date of thse credentials | [optional] -**last_usage** | **datetime** | The last time these credentials were used | [optional] -**consumer_key** | **str** | OAuth 1 Consumer Key | [optional] -**consumer_secret** | **str** | OAuth 1 Consumer Secret | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LtiCredentialsCreation.md b/docs/LtiCredentialsCreation.md deleted file mode 100644 index 584dd59..0000000 --- a/docs/LtiCredentialsCreation.md +++ /dev/null @@ -1,12 +0,0 @@ -# LtiCredentialsCreation - -Creation of a couple of LTI 1.x OAuth credentials -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the couple of credentials | -**lms** | [**LmsName**](LmsName.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MediaAttachment.md b/docs/MediaAttachment.md deleted file mode 100644 index 6dab211..0000000 --- a/docs/MediaAttachment.md +++ /dev/null @@ -1,31 +0,0 @@ -# MediaAttachment - -Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] -**score** | **str** | An unique Flat score identifier | [optional] -**revision** | **str** | An unique revision identifier of a score | [optional] -**worksheet** | **str** | An unique worksheet identifier | [optional] -**track** | **str** | A unique track identifier | [optional] -**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] -**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] -**title** | **str** | The resolved title of the attachment | [optional] -**description** | **str** | The resolved description of the attachment | [optional] -**html** | **str** | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] -**html_width** | **str** | If the `html` is available, the width of the widget | [optional] -**html_height** | **str** | If the `html` is available, the height of the widget | [optional] -**url** | **str** | The url of the attachment | [optional] -**thumbnail_url** | **str** | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] -**thumbnail_width** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**thumbnail_height** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**author_name** | **str** | The resolved author name of the attachment | [optional] -**author_url** | **str** | The resolved author url of the attachment | [optional] -**icon_url** | **str** | The URL of the icon | [optional] -**mime_type** | **str** | The mine type of the file | [optional] -**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MediaScoreSharingMode.md b/docs/MediaScoreSharingMode.md deleted file mode 100644 index 849a628..0000000 --- a/docs/MediaScoreSharingMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# MediaScoreSharingMode - -The sharing mode of the score for classes post and assignments -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md deleted file mode 100644 index fc0a389..0000000 --- a/docs/MicrosoftGraphAssignment.md +++ /dev/null @@ -1,14 +0,0 @@ -# MicrosoftGraphAssignment - -A Microsoft Teams asignment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the assignement assigned by Microsoft Teams | [optional] -**state** | **str** | State of the assignment | [optional] -**alternate_link** | **str** | Absolute link to this assignement in the Microsoft Teams web UI | [optional] -**categories** | **list[str]** | List of categories where this assignment is published under | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MicrosoftGraphSubmission.md b/docs/MicrosoftGraphSubmission.md deleted file mode 100644 index 74d50a8..0000000 --- a/docs/MicrosoftGraphSubmission.md +++ /dev/null @@ -1,13 +0,0 @@ -# MicrosoftGraphSubmission - -A Microsoft Teams submission -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the submission assigned by Microsoft Teams | [optional] -**state** | **str** | State of the submission | [optional] -**alternate_link** | **str** | Absolute link to this submission in the Microsoft Teams web UI | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md deleted file mode 100644 index 28de4aa..0000000 --- a/docs/OrganizationApi.md +++ /dev/null @@ -1,1002 +0,0 @@ -# flat_api.OrganizationApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**count_orga_users**](OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters -[**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials -[**create_organization_invitation**](OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization -[**create_organization_user**](OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account -[**create_organization_user_access_token**](OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user -[**create_organization_user_signin_link**](OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user -[**list_lti_credentials**](OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials -[**list_organization_invitations**](OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations -[**list_organization_users**](OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users -[**remove_organization_invitation**](OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation -[**remove_organization_user**](OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat -[**revoke_lti_credentials**](OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials -[**update_organization_user**](OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information - - -# **count_orga_users** -> list[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) - -Count the organization users using the provided filters - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - role = ['role_example'] # list[str] | Filter users by role (optional) -q = 'q_example' # str | The query to search (optional) -group = ['group_example'] # list[str] | Filter users by group (optional) -no_active_license = True # bool | Filter users who don't have an active license (optional) - - try: - # Count the organization users using the provided filters - api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **role** | [**list[str]**](str.md)| Filter users by role | [optional] - **q** | **str**| The query to search | [optional] - **group** | [**list[str]**](str.md)| Filter users by group | [optional] - **no_active_license** | **bool**| Filter users who don't have an active license | [optional] - -### Return type - -[**list[UserDetailsAdmin]**](UserDetailsAdmin.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Number of users | - | -**0** | Error | - | - -[[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) - -# **create_lti_credentials** -> LtiCredentials create_lti_credentials(body) - -Create a new couple of LTI 1.x credentials - -Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | - - try: - # Create a new couple of LTI 1.x credentials - api_response = api_instance.create_lti_credentials(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | - -### Return type - -[**LtiCredentials**](LtiCredentials.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The LTI Credentials | - | -**403** | Not admin of an organization | - | -**0** | Error | - | - -[[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) - -# **create_organization_invitation** -> OrganizationInvitation create_organization_invitation(body=body) - -Create a new invitation to join the organization - -This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | (optional) - - try: - # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation(body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] - -### Return type - -[**OrganizationInvitation**](OrganizationInvitation.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | New invitation created | - | -**0** | Error | - | - -[[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) - -# **create_organization_user** -> UserDetailsAdmin create_organization_user(body=body) - -Create a new user account - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - body = flat_api.UserCreation() # UserCreation | (optional) - - try: - # Create a new user account - api_response = api_instance.create_organization_user(body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UserCreation**](UserCreation.md)| | [optional] - -### Return type - -[**UserDetailsAdmin**](UserDetailsAdmin.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | New user created | - | -**0** | Error | - | - -[[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) - -# **create_organization_user_access_token** -> ApiAccessToken create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) - -Create a delegated API access token for an organization user - -This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - user = 'user_example' # str | Unique identifier of the Flat account -organization_user_access_token_creation = flat_api.OrganizationUserAccessTokenCreation() # OrganizationUserAccessTokenCreation | (optional) - - try: - # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **organization_user_access_token_creation** | [**OrganizationUserAccessTokenCreation**](OrganizationUserAccessTokenCreation.md)| | [optional] - -### Return type - -[**ApiAccessToken**](ApiAccessToken.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Created API access token | - | -**0** | Error | - | - -[[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) - -# **create_organization_user_signin_link** -> OrganizationUserSigninLink create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) - -Create a sign in link for an organization user - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - user = 'user_example' # str | Unique identifier of the Flat account -organization_user_signin_link_creation = flat_api.OrganizationUserSigninLinkCreation() # OrganizationUserSigninLinkCreation | (optional) - - try: - # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link(user, organization_user_signin_link_creation=organization_user_signin_link_creation) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **organization_user_signin_link_creation** | [**OrganizationUserSigninLinkCreation**](OrganizationUserSigninLinkCreation.md)| | [optional] - -### Return type - -[**OrganizationUserSigninLink**](OrganizationUserSigninLink.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Sign in link | - | -**0** | Error | - | - -[[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) - -# **list_lti_credentials** -> list[LtiCredentials] list_lti_credentials() - -List LTI 1.x credentials - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - - try: - # List LTI 1.x credentials - api_response = api_instance.list_lti_credentials() - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[LtiCredentials]**](LtiCredentials.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The list of LTI Credentials | - | -**403** | Not admin of an organization | - | -**0** | Error | - | - -[[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) - -# **list_organization_invitations** -> list[OrganizationInvitation] list_organization_invitations(role=role, limit=limit, next=next, previous=previous) - -List the organization invitations - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - role = 'role_example' # str | Filter users by role (optional) -limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) -next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - try: - # List the organization invitations - api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **role** | **str**| Filter users by role | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 50] - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - -### Return type - -[**list[OrganizationInvitation]**](OrganizationInvitation.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of invitations | - | -**0** | Error | - | - -[[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) - -# **list_organization_users** -> list[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) - -List the organization users - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - sort = ['sort_example'] # list[str] | The order to sort the user list (optional) -direction = 'direction_example' # str | Sort direction (optional) -next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) -role = ['role_example'] # list[str] | Filter users by role (optional) -q = 'q_example' # str | The query to search (optional) -group = ['group_example'] # list[str] | Filter users by group (optional) -no_active_license = True # bool | Filter users who don't have an active license (optional) -license_expiration_date = ['license_expiration_date_example'] # list[str] | Filter users by license expiration date or `active` / `notActive` (optional) -only_ids = True # bool | Return only user ids (optional) -limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) - - try: - # List the organization users - api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sort** | [**list[str]**](str.md)| The order to sort the user list | [optional] - **direction** | **str**| Sort direction | [optional] - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **role** | [**list[str]**](str.md)| Filter users by role | [optional] - **q** | **str**| The query to search | [optional] - **group** | [**list[str]**](str.md)| Filter users by group | [optional] - **no_active_license** | **bool**| Filter users who don't have an active license | [optional] - **license_expiration_date** | [**list[str]**](str.md)| Filter users by license expiration date or `active` / `notActive` | [optional] - **only_ids** | **bool**| Return only user ids | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] - -### Return type - -[**list[UserDetailsAdmin]**](UserDetailsAdmin.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of users | - | -**0** | Error | - | - -[[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) - -# **remove_organization_invitation** -> remove_organization_invitation(invitation) - -Remove an organization invitation - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - invitation = 'invitation_example' # str | Unique identifier of the invitation - - try: - # Remove an organization invitation - api_instance.remove_organization_invitation(invitation) - except ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **invitation** | **str**| Unique identifier of the invitation | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The invitation has been removed | - | -**0** | Error | - | - -[[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) - -# **remove_organization_user** -> remove_organization_user(user, convert_to_individual=convert_to_individual) - -Remove an account from Flat - -This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - user = 'user_example' # str | Unique identifier of the Flat account -convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) - - try: - # Remove an account from Flat - api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual) - except ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | User deleted | - | -**0** | Error | - | - -[[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) - -# **revoke_lti_credentials** -> revoke_lti_credentials(credentials) - -Revoke LTI 1.x credentials - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - credentials = 'credentials_example' # str | Credentials unique identifier - - try: - # Revoke LTI 1.x credentials - api_instance.revoke_lti_credentials(credentials) - except ApiException as e: - print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **credentials** | **str**| Credentials unique identifier | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Credentials revoked | - | -**403** | Not admin of an organization | - | -**404** | Credentials not found | - | -**0** | Error | - | - -[[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) - -# **update_organization_user** -> UserDetailsAdmin update_organization_user(user, body) - -Update account information - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.OrganizationApi(api_client) - user = 'user_example' # str | Unique identifier of the Flat account -body = flat_api.UserAdminUpdate() # UserAdminUpdate | - - try: - # Update account information - api_response = api_instance.update_organization_user(user, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | - -### Return type - -[**UserDetailsAdmin**](UserDetailsAdmin.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User updated | - | -**0** | Error | - | - -[[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) - diff --git a/docs/OrganizationInvitation.md b/docs/OrganizationInvitation.md deleted file mode 100644 index b796182..0000000 --- a/docs/OrganizationInvitation.md +++ /dev/null @@ -1,17 +0,0 @@ -# OrganizationInvitation - -Details of an invitation to join an organization -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The invitation unique identifier | [optional] -**organization** | **str** | The unique identifier of the Organization owning this class | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**custom_code** | **str** | Enrollment code to use when joining this organization | [optional] -**email** | **str** | The email address this invitation was sent to | [optional] -**invited_by** | **str** | The unique identifier of the User who created this invitation | [optional] -**used_by** | **str** | The unique identifier of the User who used this invitation | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationInvitationCreation.md b/docs/OrganizationInvitationCreation.md deleted file mode 100644 index e16741b..0000000 --- a/docs/OrganizationInvitationCreation.md +++ /dev/null @@ -1,12 +0,0 @@ -# OrganizationInvitationCreation - -The parameters to create an organization invitation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | The email address you want to send the invitation to | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationRoles.md b/docs/OrganizationRoles.md deleted file mode 100644 index 15e65a5..0000000 --- a/docs/OrganizationRoles.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationRoles - -User's Organization Role (for Edu users only) -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/OrganizationUserAccessTokenCreation.md deleted file mode 100644 index e4f7750..0000000 --- a/docs/OrganizationUserAccessTokenCreation.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationUserAccessTokenCreation - -Creation of a delegated API access token for an organization user -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scopes** | [**list[AppScopes]**](AppScopes.md) | List of requested scopes for this credential | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationUserSigninLink.md b/docs/OrganizationUserSigninLink.md deleted file mode 100644 index 240993d..0000000 --- a/docs/OrganizationUserSigninLink.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationUserSigninLink - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **str** | URL to use to sign in to this account | [optional] -**expiration_date** | **datetime** | Date when the link expires | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationUserSigninLinkCreation.md b/docs/OrganizationUserSigninLinkCreation.md deleted file mode 100644 index 586e039..0000000 --- a/docs/OrganizationUserSigninLinkCreation.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationUserSigninLinkCreation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**destination_path** | **str** | Path to redirect to after signin | [optional] [default to '/'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResourceCollaborator.md b/docs/ResourceCollaborator.md deleted file mode 100644 index 8d5d2a5..0000000 --- a/docs/ResourceCollaborator.md +++ /dev/null @@ -1,20 +0,0 @@ -# ResourceCollaborator - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] -**group** | [**Group**](Group.md) | | [optional] -**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] -**invited** | **bool** | If this property is `true`, this is still a pending invitation | [optional] -**user_email** | **str** | If the collaborator is not a user of Flat yet, this field will contain his email. | [optional] -**collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] -**score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] -**user** | [**UserPublic**](UserPublic.md) | | [optional] -**id** | **str** | The unique identifier of the permission | [optional] -**acl_read** | **bool** | `True` if the current user can read the current document | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResourceCollaboratorCreation.md b/docs/ResourceCollaboratorCreation.md deleted file mode 100644 index 915ac51..0000000 --- a/docs/ResourceCollaboratorCreation.md +++ /dev/null @@ -1,17 +0,0 @@ -# ResourceCollaboratorCreation - -Add a collaborator to a resource. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **str** | The unique identifier of a Flat user | [optional] -**group** | **str** | The unique identifier of a Flat group | [optional] -**user_email** | **str** | Fill this field to invite an individual user by email. | [optional] -**user_token** | **str** | Token received in an invitation to join the score. | [optional] -**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] [default to True] -**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResourceRights.md b/docs/ResourceRights.md deleted file mode 100644 index 3c89fa8..0000000 --- a/docs/ResourceRights.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResourceRights - -The rights of the current user on a score or collection -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acl_read** | **bool** | `True` if the current user can read the current document | [optional] [default to False] -**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] [default to False] -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md deleted file mode 100644 index d0992da..0000000 --- a/docs/ScoreApi.md +++ /dev/null @@ -1,2401 +0,0 @@ -# flat_api.ScoreApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_score_collaborator**](ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator -[**add_score_track**](ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score -[**create_export_task**](ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task -[**create_score**](ScoreApi.md#create_score) | **POST** /scores | Create a new score -[**create_score_revision**](ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision -[**delete_score**](ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score -[**delete_score_comment**](ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment -[**delete_score_track**](ScoreApi.md#delete_score_track) | **DELETE** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score -[**edit_score**](ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata -[**fork_score**](ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -[**ger_user_likes**](ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -[**get_group_scores**](ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -[**get_score**](ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata -[**get_score_collaborator**](ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator -[**get_score_collaborators**](ScoreApi.md#get_score_collaborators) | **GET** /scores/{score}/collaborators | List the collaborators -[**get_score_comments**](ScoreApi.md#get_score_comments) | **GET** /scores/{score}/comments | List comments -[**get_score_revision**](ScoreApi.md#get_score_revision) | **GET** /scores/{score}/revisions/{revision} | Get a score revision -[**get_score_revision_data**](ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data -[**get_score_revisions**](ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions -[**get_score_submissions**](ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -[**get_score_track**](ScoreApi.md#get_score_track) | **GET** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score -[**get_user_scores**](ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores -[**list_score_tracks**](ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score -[**mark_score_comment_resolved**](ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved -[**mark_score_comment_unresolved**](ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved -[**post_score_comment**](ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment -[**remove_score_collaborator**](ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator -[**untrash_score**](ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score -[**update_score_comment**](ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment -[**update_score_track**](ScoreApi.md#update_score_track) | **PUT** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score - - -# **add_score_collaborator** -> ResourceCollaborator add_score_collaborator(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | - - try: - # Add a new collaborator - api_response = api_instance.add_score_collaborator(score, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | - -### Return type - -[**ResourceCollaborator**](ResourceCollaborator.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The newly added collaborator metadata | - | -**402** | Account overquota | - | -**403** | Not granted to manage this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **add_score_track** -> ScoreTrack add_score_track(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ScoreTrackCreation() # ScoreTrackCreation | - - try: - # Add a new video or audio track to the score - api_response = api_instance.add_score_track(score, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->add_score_track: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | - -### Return type - -[**ScoreTrack**](ScoreTrack.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Created track | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **create_export_task** -> Task create_export_task(score, revision, format, sharing_key=sharing_key, body=body) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. -format = 'format_example' # str | The format of the file that will be generated or the target service name where the file will be exported -sharing_key = 'sharing_key_example' # str | 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) -body = flat_api.TaskExportOptions() # TaskExportOptions | (optional) - - try: - # Create a new score export task - api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->create_export_task: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **format** | **str**| The format of the file that will be generated or the target service name where the file will be exported | - **sharing_key** | **str**| 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] - **body** | [**TaskExportOptions**](TaskExportOptions.md)| | [optional] - -### Return type - -[**Task**](Task.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Task associated to the generation of the file | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score or associated file not found | - | -**0** | Error | - | - -[[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) - -# **create_score** -> ScoreDetails create_score(body) - -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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - body = flat_api.ScoreCreation() # ScoreCreation | - - try: - # Create a new score - api_response = api_instance.create_score(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->create_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ScoreCreation**](ScoreCreation.md)| | - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score created | - | -**400** | Bad score creation request | - | -**402** | Account overquota | - | -**0** | Error | - | - -[[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) - -# **create_score_revision** -> ScoreRevision create_score_revision(score, body) - -Create a new revision - -Update a score by uploading a new revision for this one. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ScoreRevisionCreation() # ScoreRevisionCreation | - - try: - # Create a new revision - api_response = api_instance.create_score_revision(score, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | - -### Return type - -[**ScoreRevision**](ScoreRevision.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new created revision metadata | - | -**402** | Account overquota | - | -**403** | Not granted to modify this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **delete_score** -> delete_score(score, now=now) - -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). - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) (default to False) - - try: - # Delete a score - api_instance.delete_score(score, now=now) - except ApiException as e: - print("Exception when calling ScoreApi->delete_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] [default to False] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The score has been removed | - | -**403** | Not granted to manage this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **delete_score_comment** -> delete_score_comment(score, comment, sharing_key=sharing_key) - -Delete a comment - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Delete a comment - api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) - except ApiException as e: - print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The comment has been deleted | - | -**403** | Not granted to access to this score or not the original comment creator | - | -**404** | Score or comment not found | - | -**0** | Error | - | - -[[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) - -# **delete_score_track** -> delete_score_track(score, track) - -Remove an audio or video track linked to the score - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score audio track - - try: - # Remove an audio or video track linked to the score - api_instance.delete_score_track(score, track) - except ApiException as e: - print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Track removed | - | -**403** | Not granted to access to this score | - | -**404** | Score or Track not found | - | -**0** | Error | - | - -[[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) - -# **edit_score** -> ScoreDetails edit_score(score, body=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`, `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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ScoreModification() # ScoreModification | (optional) - - try: - # Edit a score's metadata - api_response = api_instance.edit_score(score, body=body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->edit_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreModification**](ScoreModification.md)| | [optional] - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score details | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **fork_score** -> ScoreDetails fork_score(score, body, sharing_key=sharing_key) - -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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Fork a score - api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->fork_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score details | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **ger_user_likes** -> list[ScoreDetails] ger_user_likes(user, ids=ids) - -List liked scores - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - user = 'user_example' # str | 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 (optional) - - try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| 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] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of liked scores | - | -**0** | Error | - | - -[[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) - -# **get_group_scores** -> list[ScoreDetails] get_group_scores(group, parent=parent) - -List group's scores - -Get the list of scores shared with a group. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group -parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - - try: - # List group's scores - api_response = api_instance.get_group_scores(group, parent=parent) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The group's scores | - | -**0** | Error | - | - -[[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) - -# **get_score** -> ScoreDetails get_score(score, sharing_key=sharing_key) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Get a score's metadata - api_response = api_instance.get_score(score, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreDetails**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Score details | - | -**402** | Account overquota and this document is out of the granted quota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_score_collaborator** -> ResourceCollaborator get_score_collaborator(score, collaborator, sharing_key=sharing_key) - -Get a collaborator - -Get the information about a collaborator (User or Group). - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Get a collaborator - api_response = api_instance.get_score_collaborator(score, collaborator, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | - **sharing_key** | **str**| 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] - -### Return type - -[**ResourceCollaborator**](ResourceCollaborator.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Collaborator information | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score or collaborator not found | - | -**0** | Error | - | - -[[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) - -# **get_score_collaborators** -> list[ResourceCollaborator] get_score_collaborators(score, sharing_key=sharing_key) - -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). - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) - - try: - # List the collaborators - api_response = api_instance.get_score_collaborators(score, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - -### Return type - -[**list[ResourceCollaborator]**](ResourceCollaborator.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of collaborators | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_score_comments** -> list[ScoreComment] get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) - -List comments - -This method lists the different comments added on a music score (documents and inline) sorted by their post dates. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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 = 'type_example' # str | Filter the comments by type (optional) -sort = 'sort_example' # str | Sort (optional) -direction = 'direction_example' # str | Sort direction (optional) - - try: - # List comments - api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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** | **str**| Filter the comments by type | [optional] - **sort** | **str**| Sort | [optional] - **direction** | **str**| Sort direction | [optional] - -### Return type - -[**list[ScoreComment]**](ScoreComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The comments of the score | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_score_revision** -> ScoreRevision get_score_revision(score, revision, sharing_key=sharing_key) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Get a score revision - api_response = api_instance.get_score_revision(score, revision, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreRevision**](ScoreRevision.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Revision metadata | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_score_revision_data** -> file get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) - -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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. -format = 'format_example' # str | The format of the file you will retrieve -sharing_key = 'sharing_key_example' # str | 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 = 'parts_example' # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) -default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) -url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) - - try: - # Get a score revision data - api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **format** | **str**| The format of the file you will retrieve | - **sharing_key** | **str**| 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** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] - **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] - **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] - -### Return type - -**file** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Revision data | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score or associated file not found | - | -**0** | Error | - | - -[[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) - -# **get_score_revisions** -> list[ScoreRevision] get_score_revisions(score, sharing_key=sharing_key) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) - - try: - # List the revisions - api_response = api_instance.get_score_revisions(score, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - -### Return type - -[**list[ScoreRevision]**](ScoreRevision.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of revisions | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **get_score_submissions** -> list[AssignmentSubmission] get_score_submissions(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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: - # List submissions related to the score - api_response = api_instance.get_score_submissions(score) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - -### Return type - -[**list[AssignmentSubmission]**](AssignmentSubmission.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of submissions | - | -**0** | Error | - | - -[[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) - -# **get_score_track** -> ScoreTrack get_score_track(score, track, sharing_key=sharing_key) - -Retrieve the details of an audio or video track linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score audio track -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Retrieve the details of an audio or video track linked to a score - api_response = api_instance.get_score_track(score, track, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_score_track: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreTrack**](ScoreTrack.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Track details | - | -**403** | Not granted to access to this score | - | -**404** | Score or Track not found | - | -**0** | Error | - | - -[[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) - -# **get_user_scores** -> list[ScoreDetails] get_user_scores(user, parent=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](#tag/Collection) instead. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. -parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - - try: - # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The user scores | - | -**0** | Error | - | - -[[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) - -# **list_score_tracks** -> list[ScoreTrack] list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) - -List the audio or video tracks linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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`). -sharing_key = 'sharing_key_example' # str | 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) -assignment = 'assignment_example' # str | An assignment id with which all the tracks returned will be related to (optional) -list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) - - try: - # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] - **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] - -### Return type - -[**list[ScoreTrack]**](ScoreTrack.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of tracks | - | -**403** | Not granted to access to this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **mark_score_comment_resolved** -> mark_score_comment_resolved(score, comment, sharing_key=sharing_key) - -Mark the comment as resolved - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Mark the comment as resolved - api_instance.mark_score_comment_resolved(score, comment, sharing_key=sharing_key) - except ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The comment has been marked as resolved | - | -**403** | Not granted to mark this comment as resolved | - | -**404** | Score or comment not found | - | -**0** | Error | - | - -[[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) - -# **mark_score_comment_unresolved** -> mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) - -Mark the comment as unresolved - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Mark the comment as unresolved - api_instance.mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) - except ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The comment has been unmarked as resolved | - | -**403** | Not granted to unmark this comment as resolved | - | -**404** | Score or comment not found | - | -**0** | Error | - | - -[[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) - -# **post_score_comment** -> ScoreComment post_score_comment(score, body, sharing_key=sharing_key) - -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`. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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_api.ScoreCommentCreation() # ScoreCommentCreation | -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Post a new comment - api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreComment**](ScoreComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The new comment | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score, to post a comment, or your API call triggered our spam filter. | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **remove_score_collaborator** -> remove_score_collaborator(score, collaborator) - -Delete a collaborator - -Remove the specified collaborator from the score - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - - try: - # Delete a collaborator - api_instance.remove_score_collaborator(score, collaborator) - except ApiException as e: - print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The collaborator has been removed | - | -**403** | Not granted to manage this score | - | -**404** | Score or collaborator not found | - | -**0** | Error | - | - -[[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) - -# **untrash_score** -> untrash_score(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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: - # Untrash a score - api_instance.untrash_score(score) - except ApiException as e: - print("Exception when calling ScoreApi->untrash_score: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - -### Return type - -void (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The score has been untrashed | - | -**403** | Not granted to manage this score | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **update_score_comment** -> ScoreComment update_score_comment(score, comment, body, sharing_key=sharing_key) - -Update an existing comment - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment -body = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | -sharing_key = 'sharing_key_example' # str | 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) - - try: - # Update an existing comment - api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | - **sharing_key** | **str**| 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] - -### Return type - -[**ScoreComment**](ScoreComment.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The edited comment | - | -**402** | Account overquota | - | -**403** | Not granted to access to this score or not the original comment creator | - | -**404** | Score not found | - | -**0** | Error | - | - -[[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) - -# **update_score_track** -> ScoreTrack update_score_track(score, track, body) - -Update an audio or video track linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.ScoreApi(api_client) - score = 'score_example' # str | 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' # str | Unique identifier of a score audio track -body = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | - - try: - # Update an audio or video track linked to a score - api_response = api_instance.update_score_track(score, track, body) - pprint(api_response) - except ApiException as e: - print("Exception when calling ScoreApi->update_score_track: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | - -### Return type - -[**ScoreTrack**](ScoreTrack.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Updated track | - | -**403** | Not granted to access to this score | - | -**404** | Score or Track not found | - | -**0** | Error | - | - -[[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) - diff --git a/docs/ScoreComment.md b/docs/ScoreComment.md deleted file mode 100644 index ebe6e7d..0000000 --- a/docs/ScoreComment.md +++ /dev/null @@ -1,26 +0,0 @@ -# ScoreComment - -Comment added on a sheet music -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The comment unique identifier | [optional] -**type** | **str** | The type of the comment | [optional] -**user** | **str** | The author unique identifier | [optional] -**score** | **str** | The unique identifier of the score where the comment was posted | [optional] -**revision** | **str** | The unique identifier of revision the comment was posted | [optional] -**reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**date** | **datetime** | The date when the comment was posted | [optional] -**modification_date** | **datetime** | The date of the last comment modification | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] -**raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**mentions** | **list[str]** | The list of user identifier mentioned on the score | [optional] -**resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] -**resolved_by** | **str** | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] -**moderation** | [**ScoreCommentModeration**](ScoreCommentModeration.md) | | [optional] -**spam** | **bool** | `true if the message has been detected as spam and hidden from other users | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCommentContext.md b/docs/ScoreCommentContext.md deleted file mode 100644 index 1e9b4a8..0000000 --- a/docs/ScoreCommentContext.md +++ /dev/null @@ -1,18 +0,0 @@ -# ScoreCommentContext - -The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**part_uuid** | **str** | The unique identifier (UUID) of the score part | -**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] -**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] -**measure_uuids** | **list[str]** | The list of measure UUIds | -**start_time_pos** | **float** | | -**stop_time_pos** | **float** | | -**start_dpq** | **float** | | -**stop_dpq** | **float** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCommentCreation.md b/docs/ScoreCommentCreation.md deleted file mode 100644 index 0b4458f..0000000 --- a/docs/ScoreCommentCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# ScoreCommentCreation - -Creation of a comment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | -**raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] -**mentions** | **list[str]** | The list of user identifiers mentioned in this comment | [optional] -**reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCommentModeration.md b/docs/ScoreCommentModeration.md deleted file mode 100644 index 8ed95ce..0000000 --- a/docs/ScoreCommentModeration.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScoreCommentModeration - -Information about the comment being moderated -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hidden** | **bool** | If true, this comment will be hidden from other users | [optional] -**reason** | **str** | If the comment is hidden, the reason why this one has been moderated | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCommentUpdate.md b/docs/ScoreCommentUpdate.md deleted file mode 100644 index fe50435..0000000 --- a/docs/ScoreCommentUpdate.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScoreCommentUpdate - -Update of a comment -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] -**raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCommentsCounts.md b/docs/ScoreCommentsCounts.md deleted file mode 100644 index c012d83..0000000 --- a/docs/ScoreCommentsCounts.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScoreCommentsCounts - -A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of comments added to the score | [optional] -**unique** | **float** | The unique (1/user) number of comments added to the score | [optional] -**weekly** | **float** | The weekly unique number of comments added to the score | [optional] -**monthly** | **float** | The monthly unique number of comments added to the score | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreation.md b/docs/ScoreCreation.md deleted file mode 100644 index 89ad133..0000000 --- a/docs/ScoreCreation.md +++ /dev/null @@ -1,18 +0,0 @@ -# ScoreCreation - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] -**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**builder_data** | [**ScoreCreationBuilderData**](ScoreCreationBuilderData.md) | | [optional] -**filename** | **str** | If this is an imported file, its filename | [optional] -**source** | [**ScoreSource**](ScoreSource.md) | | [optional] -**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md deleted file mode 100644 index 1db00be..0000000 --- a/docs/ScoreCreationBuilderData.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScoreCreationBuilderData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | -**layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/ScoreCreationBuilderDataLayoutData.md deleted file mode 100644 index 1b432f2..0000000 --- a/docs/ScoreCreationBuilderDataLayoutData.md +++ /dev/null @@ -1,18 +0,0 @@ -# ScoreCreationBuilderDataLayoutData - -Control the appearance of the score. If missing, default values are used. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**notes_spacing_coeff** | **float** | A float value >= 1 that controls the spacing between notes. | [optional] -**length_unit** | **str** | The unit to use for layout customizations | [optional] [default to 'cm'] -**page_height** | **float** | The height of the page in chosen unit (`lengthUnit`). | [optional] -**page_width** | **float** | The width of the page in chosen unit (`lengthUnit`). | [optional] -**page_margin_top** | **float** | The top margin of the page in chosen unit (`lengthUnit`). | [optional] -**page_margin_bottom** | **float** | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] -**page_margin_left** | **float** | The left margin of the page in chosen unit (`lengthUnit`). | [optional] -**page_margin_right** | **float** | The right margin of the page in chosen unit (`lengthUnit`). | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md deleted file mode 100644 index 363d87c..0000000 --- a/docs/ScoreCreationBuilderDataScoreData.md +++ /dev/null @@ -1,15 +0,0 @@ -# ScoreCreationBuilderDataScoreData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] -**use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] -**fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] -**nb_beats** | **float** | The number of beats in the measure | [optional] -**beat_type** | **float** | The duration of a beat in the measure | [optional] -**instruments** | [**list[ScoreCreationBuilderDataScoreDataInstruments]**](ScoreCreationBuilderDataScoreDataInstruments.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderDataScoreDataInstruments.md b/docs/ScoreCreationBuilderDataScoreDataInstruments.md deleted file mode 100644 index 95d71ec..0000000 --- a/docs/ScoreCreationBuilderDataScoreDataInstruments.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScoreCreationBuilderDataScoreDataInstruments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | -**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | -**long_name** | **str** | The full name of the instrument | [optional] -**short_name** | **str** | The abbreviation of the name of the instrument | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationType.md b/docs/ScoreCreationType.md deleted file mode 100644 index 72fb6ef..0000000 --- a/docs/ScoreCreationType.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScoreCreationType - -The type of creation (an orginal, an arrangement) -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreDetails.md b/docs/ScoreDetails.md deleted file mode 100644 index db81407..0000000 --- a/docs/ScoreDetails.md +++ /dev/null @@ -1,42 +0,0 @@ -# ScoreDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subtitle** | **str** | Subtitle of the score | [optional] -**instruments** | **list[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**lyricist** | **str** | Lyricist of the score | [optional] -**publication_date** | **datetime** | The date when the score was published on Flat | [optional] -**composer** | **str** | Composer of the score | [optional] -**license_text** | **str** | Additional license text written on the exported/printed score | [optional] -**modification_date** | **datetime** | The date of the last revision of the score | [optional] -**id** | **str** | The unique identifier of the score | [optional] -**plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] -**title** | **str** | The title of the score | [optional] -**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] -**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] -**collections** | **list[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] -**samples** | **list[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] -**number_measures** | **int** | The number of measures in the score | [optional] -**google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] -**description** | **str** | Description of the creation | [optional] -**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] -**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] -**duration_time** | **float** | In seconds, an approximative duration of the score | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] -**creation_date** | **datetime** | The date when the score was created | [optional] -**parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] -**tags** | **list[str]** | Tags describing the score | [optional] -**collaborators** | [**list[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] -**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] -**license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] -**rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**arranger** | **str** | Arranger of the score | [optional] -**organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] -**likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreFork.md b/docs/ScoreFork.md deleted file mode 100644 index b359db9..0000000 --- a/docs/ScoreFork.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScoreFork - -Options to fork the score -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] [default to 'root'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreLicense.md b/docs/ScoreLicense.md deleted file mode 100644 index f939bad..0000000 --- a/docs/ScoreLicense.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScoreLicense - -License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreLikesCounts.md b/docs/ScoreLikesCounts.md deleted file mode 100644 index f33c4b5..0000000 --- a/docs/ScoreLikesCounts.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScoreLikesCounts - -A computed version of the weekly, monthly and total of number of likes for a score -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of likes of the score | [optional] -**weekly** | **float** | The number of new likes during the last week | [optional] -**monthly** | **float** | The number of new likes during the last month | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md deleted file mode 100644 index 08a49fb..0000000 --- a/docs/ScoreModification.md +++ /dev/null @@ -1,22 +0,0 @@ -# ScoreModification - -Edit the score metadata -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | The title of the score | [optional] -**subtitle** | **str** | The subtitle of the score | [optional] -**composer** | **str** | The composer of the score | [optional] -**lyricist** | **str** | The lyricist of the score | [optional] -**arranger** | **str** | The arranger of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] -**description** | **str** | Description of the creation | [optional] -**tags** | **list[str]** | Tags describing the score | [optional] -**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] -**license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] -**license_text** | **str** | The rights info written on the score | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScorePlaysCounts.md b/docs/ScorePlaysCounts.md deleted file mode 100644 index 8b36c76..0000000 --- a/docs/ScorePlaysCounts.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScorePlaysCounts - -A computed version of the total, weekly, and monthly number of plays of the score -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of plays of the score | [optional] -**weekly** | **float** | The weekly number of plays of the score | [optional] -**monthly** | **float** | The monthly number of plays of the score | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScorePrivacy.md b/docs/ScorePrivacy.md deleted file mode 100644 index 19bb9b9..0000000 --- a/docs/ScorePrivacy.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScorePrivacy - -The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreRevision.md b/docs/ScoreRevision.md deleted file mode 100644 index e8b10ce..0000000 --- a/docs/ScoreRevision.md +++ /dev/null @@ -1,18 +0,0 @@ -# ScoreRevision - -A score revision metadata -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the revision. | [optional] -**user** | **str** | The user identifier who created the revision | [optional] -**collaborators** | **list[str]** | | [optional] -**creation_date** | **datetime** | The date when this revision was created | [optional] -**event** | **str** | The last event (action id) of the revision | [optional] -**description** | **str** | A description associated to the revision | [optional] -**autosave** | **bool** | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] -**statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md deleted file mode 100644 index dde4ebd..0000000 --- a/docs/ScoreRevisionCreation.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScoreRevisionCreation - -A new created revision -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | -**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] -**autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] -**description** | **str** | A description associated to the revision | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreRevisionStatistics.md b/docs/ScoreRevisionStatistics.md deleted file mode 100644 index 0039b4d..0000000 --- a/docs/ScoreRevisionStatistics.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScoreRevisionStatistics - -The statistics related to the score revision (additions and deletions) -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additions** | **float** | The number of additions operations in the last revision | [optional] -**deletions** | **float** | The number of deletions operations in the last revision | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreSource.md b/docs/ScoreSource.md deleted file mode 100644 index 181250c..0000000 --- a/docs/ScoreSource.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScoreSource - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**google_drive** | **str** | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrack.md b/docs/ScoreTrack.md deleted file mode 100644 index 7ec26b4..0000000 --- a/docs/ScoreTrack.md +++ /dev/null @@ -1,22 +0,0 @@ -# ScoreTrack - -An audio track for a score -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score track | [optional] -**title** | **str** | Title of the track | [optional] -**score** | **str** | The unique identifier of the score | [optional] -**creator** | **str** | The unique identifier of the track creator | [optional] -**creation_date** | **datetime** | The creation date of the track | [optional] -**modification_date** | **datetime** | The modification date of the track | [optional] -**default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**type** | [**ScoreTrackType**](ScoreTrackType.md) | | [optional] -**url** | **str** | The URL of the track | [optional] -**media_id** | **str** | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] -**synchronization_points** | [**list[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrackCreation.md b/docs/ScoreTrackCreation.md deleted file mode 100644 index fe459e8..0000000 --- a/docs/ScoreTrackCreation.md +++ /dev/null @@ -1,15 +0,0 @@ -# ScoreTrackCreation - -Creation of a new track. This one must contain the URL of the track or the corresponding file -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | Title of the track | [optional] -**default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**url** | **str** | The URL of the track | [optional] -**synchronization_points** | [**list[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrackPoint.md b/docs/ScoreTrackPoint.md deleted file mode 100644 index 763eb57..0000000 --- a/docs/ScoreTrackPoint.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScoreTrackPoint - -A track synchronization point -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | -**measure_uuid** | **str** | The measure unique identifier | [optional] -**time** | **float** | The corresponding time in seconds | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrackState.md b/docs/ScoreTrackState.md deleted file mode 100644 index cc1485f..0000000 --- a/docs/ScoreTrackState.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScoreTrackState - -State of the track -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrackType.md b/docs/ScoreTrackType.md deleted file mode 100644 index 19ed22b..0000000 --- a/docs/ScoreTrackType.md +++ /dev/null @@ -1,10 +0,0 @@ -# ScoreTrackType - -The type of an audio track -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreTrackUpdate.md b/docs/ScoreTrackUpdate.md deleted file mode 100644 index 403033e..0000000 --- a/docs/ScoreTrackUpdate.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScoreTrackUpdate - -Update an existing track. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | Title of the track | [optional] -**default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**synchronization_points** | [**list[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreViewsCounts.md b/docs/ScoreViewsCounts.md deleted file mode 100644 index bb33c0c..0000000 --- a/docs/ScoreViewsCounts.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScoreViewsCounts - -A computed version of the total, weekly, and monthly number of views of the score -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of views of the score | [optional] -**weekly** | **float** | The weekly number of views of the score | [optional] -**monthly** | **float** | The monthly number of views of the score | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Task.md b/docs/Task.md deleted file mode 100644 index e1a0ab5..0000000 --- a/docs/Task.md +++ /dev/null @@ -1,17 +0,0 @@ -# Task - -An asynchronous task -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the task | [optional] -**type** | **str** | Type of the task | [optional] -**state** | **str** | State of the Task | [optional] -**progress** | [**TaskProgress**](TaskProgress.md) | | [optional] -**creation_date** | **datetime** | The creation date of the task | [optional] -**modification_date** | **datetime** | The last modification date of the task | [optional] -**done_date** | **datetime** | The date when the task has been completed | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TaskApi.md b/docs/TaskApi.md deleted file mode 100644 index ef0ea82..0000000 --- a/docs/TaskApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# flat_api.TaskApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_task**](TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details - - -# **get_task** -> Task get_task(task) - -Get a task details - -This method can be used to follow a task progression, for example while a score is being exported. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.TaskApi(api_client) - task = 'task_example' # str | Unique identifier for the task - - try: - # Get a task details - api_response = api_instance.get_task(task) - pprint(api_response) - except ApiException as e: - print("Exception when calling TaskApi->get_task: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **task** | **str**| Unique identifier for the task | - -### Return type - -[**Task**](Task.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Task details | - | -**0** | Error | - | - -[[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) - diff --git a/docs/TaskExportOptions.md b/docs/TaskExportOptions.md deleted file mode 100644 index 682a41c..0000000 --- a/docs/TaskExportOptions.md +++ /dev/null @@ -1,11 +0,0 @@ -# TaskExportOptions - -Options for the requested export -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parts** | **list[str]** | A list of parts to specifically export | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TaskProgress.md b/docs/TaskProgress.md deleted file mode 100644 index 1110438..0000000 --- a/docs/TaskProgress.md +++ /dev/null @@ -1,12 +0,0 @@ -# TaskProgress - -Details about the task progression -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**percent** | **float** | Percent of the task progression | [optional] -**text** | **str** | Text details of the task progress | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserAdminUpdate.md b/docs/UserAdminUpdate.md deleted file mode 100644 index dcb21a0..0000000 --- a/docs/UserAdminUpdate.md +++ /dev/null @@ -1,16 +0,0 @@ -# UserAdminUpdate - -User update as an organization admin -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**password** | **str** | Password of the account | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**username** | **str** | Username of the account | [optional] -**firstname** | **str** | First name of the user | [optional] -**lastname** | **str** | Last name of the user | [optional] -**email** | **str** | Email of the account | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserApi.md b/docs/UserApi.md deleted file mode 100644 index aa16671..0000000 --- a/docs/UserApi.md +++ /dev/null @@ -1,235 +0,0 @@ -# flat_api.UserApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ger_user_likes**](UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -[**get_user**](UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile -[**get_user_scores**](UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores - - -# **ger_user_likes** -> list[ScoreDetails] ger_user_likes(user, ids=ids) - -List liked scores - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.UserApi(api_client) - user = 'user_example' # str | 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 (optional) - - try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) - pprint(api_response) - except ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| 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] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of liked scores | - | -**0** | Error | - | - -[[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) - -# **get_user** -> UserPublic get_user(user) - -Get a public user profile - -Get a profile of a Flat or Flat for Education User. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.UserApi(api_client) - user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. - - try: - # Get a public user profile - api_response = api_instance.get_user(user) - pprint(api_response) - except ApiException as e: - print("Exception when calling UserApi->get_user: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | - -### Return type - -[**UserPublic**](UserPublic.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The user public details | - | -**0** | Error | - | - -[[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) - -# **get_user_scores** -> list[ScoreDetails] get_user_scores(user, parent=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](#tag/Collection) instead. - -### Example - -* OAuth Authentication (OAuth2): -```python -from __future__ import print_function -import time -import flat_api -from flat_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.UserApi(api_client) - user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. -parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - - try: - # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) - pprint(api_response) - except ApiException as e: - print("Exception when calling UserApi->get_user_scores: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] - -### Return type - -[**list[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The user scores | - | -**0** | Error | - | - -[[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) - diff --git a/docs/UserCreation.md b/docs/UserCreation.md deleted file mode 100644 index 3a20ee4..0000000 --- a/docs/UserCreation.md +++ /dev/null @@ -1,17 +0,0 @@ -# UserCreation - -User creation -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | Username of the new account | -**firstname** | **str** | First name of the user | [optional] -**lastname** | **str** | Last name of the user | [optional] -**email** | **str** | Email of the new account | [optional] -**password** | **str** | Password of the new account | -**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] -**role** | **str** | Role of the new account | [optional] [default to 'user'] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDetails.md b/docs/UserDetails.md deleted file mode 100644 index 79ccf24..0000000 --- a/docs/UserDetails.md +++ /dev/null @@ -1,36 +0,0 @@ -# UserDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | The user name (unique for the organization) | [optional] -**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] -**private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] -**followers_count** | **int** | Number of followers the user have | [optional] -**firstname** | **str** | Firstname of the user (for education users) | [optional] -**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] -**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] -**instruments** | **list[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] -**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] -**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**bio** | **str** | User's biography | [optional] -**picture_file** | **str** | The ID of the user profile picture | [optional] -**id** | **str** | Identifier of the user | [optional] -**cover_picture_file** | **str** | The ID of the user profile cover picture | [optional] -**picture** | **str** | The URL of the picture to display | [optional] -**name** | **str** | A displayable name for the user (for consumer users) | [optional] -**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**profile_theme** | **str** | Theme (background) for the profile | [optional] -**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] -**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] -**lastname** | **str** | Lastname of the user (for education users) | [optional] -**following_count** | **int** | Number of people the user follow | [optional] -**organization** | **str** | Organization ID (for Edu users only) | [optional] -**type** | **str** | The type of account | [optional] -**registration_date** | **datetime** | Date the user signed up | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDetailsAdmin.md b/docs/UserDetailsAdmin.md deleted file mode 100644 index 07703c8..0000000 --- a/docs/UserDetailsAdmin.md +++ /dev/null @@ -1,26 +0,0 @@ -# UserDetailsAdmin - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | The user name (unique for the organization) | [optional] -**picture** | **str** | The URL of the picture to display | [optional] -**license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] -**name** | **str** | A displayable name for the user (for consumer users) | [optional] -**firstname** | **str** | Firstname of the user (for education users) | [optional] -**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] -**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] -**lastname** | **str** | Lastname of the user (for education users) | [optional] -**last_activity_date** | **datetime** | Date of the last user activity | [optional] -**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] -**email** | **str** | Email of the user | [optional] -**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] -**organization** | **str** | Organization ID (for Edu users only) | [optional] -**type** | **str** | The type of user account | [optional] -**id** | **str** | The user unique identifier | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md deleted file mode 100644 index 9c4d957..0000000 --- a/docs/UserDetailsAdminLicense.md +++ /dev/null @@ -1,15 +0,0 @@ -# UserDetailsAdminLicense - -Current active license of the user -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | ID of the current license | [optional] -**expiration_date** | **datetime** | Date when the license expires | [optional] -**source** | [**LicenseSources**](LicenseSources.md) | | [optional] -**mode** | [**LicenseMode**](LicenseMode.md) | | [optional] -**active** | **bool** | ID of the current license | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserPublic.md b/docs/UserPublic.md deleted file mode 100644 index d11f13a..0000000 --- a/docs/UserPublic.md +++ /dev/null @@ -1,32 +0,0 @@ -# UserPublic - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | The user name (unique for the organization) | [optional] -**picture** | **str** | The URL of the picture to display | [optional] -**followers_count** | **int** | Number of followers the user have | [optional] -**firstname** | **str** | Firstname of the user (for education users) | [optional] -**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] -**lastname** | **str** | Lastname of the user (for education users) | [optional] -**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] -**following_count** | **int** | Number of people the user follow | [optional] -**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] -**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**bio** | **str** | User's biography | [optional] -**id** | **str** | The user unique identifier | [optional] -**name** | **str** | A displayable name for the user (for consumer users) | [optional] -**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**profile_theme** | **str** | Theme (background) for the profile | [optional] -**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] -**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] -**instruments** | **list[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] -**organization** | **str** | Organization ID (for Edu users only) | [optional] -**type** | **str** | The type of user account | [optional] -**registration_date** | **datetime** | Date the user signed up | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserPublicSummary.md b/docs/UserPublicSummary.md deleted file mode 100644 index 5ad668a..0000000 --- a/docs/UserPublicSummary.md +++ /dev/null @@ -1,23 +0,0 @@ -# UserPublicSummary - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | The user name (unique for the organization) | [optional] -**picture** | **str** | The URL of the picture to display | [optional] -**name** | **str** | A displayable name for the user (for consumer users) | [optional] -**firstname** | **str** | Firstname of the user (for education users) | [optional] -**is_power_user** | **bool** | User license status. 'true' if user is an individual Power user | [optional] -**is_flat_team** | **bool** | Will be 'true' if user is part of the Flat Team | [optional] -**lastname** | **str** | Lastname of the user (for education users) | [optional] -**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] -**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] -**organization** | **str** | Organization ID (for Edu users only) | [optional] -**type** | **str** | The type of user account | [optional] -**id** | **str** | The user unique identifier | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/apis/tags/AccountApi.md b/docs/apis/tags/AccountApi.md new file mode 100644 index 0000000..e66f1e7 --- /dev/null +++ b/docs/apis/tags/AccountApi.md @@ -0,0 +1,125 @@ + +# flat_api.apis.tags.account_api.AccountApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_authenticated_user**](#get_authenticated_user) | **get** /me | Get current user account + +# **get_authenticated_user** + +> UserDetails get_authenticated_user() + +Get current user account + +Get details about the current authenticated User. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import account_api +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = account_api.AccountApi(api_client) + + # example passing only optional values + query_params = { + 'onlyId': False, + } + try: + # Get current user account + api_response = api_instance.get_authenticated_user( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +onlyId | OnlyIdSchema | | optional + + +# OnlyIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_authenticated_user.ApiResponseFor200) | Current user details +default | [ApiResponseForDefault](#get_authenticated_user.ApiResponseForDefault) | Error + +#### get_authenticated_user.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserDetails**](../../models/UserDetails.md) | | + + +#### get_authenticated_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/CollectionApi.md b/docs/apis/tags/CollectionApi.md new file mode 100644 index 0000000..72f7fb2 --- /dev/null +++ b/docs/apis/tags/CollectionApi.md @@ -0,0 +1,1498 @@ + +# flat_api.apis.tags.collection_api.CollectionApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_score_to_collection**](#add_score_to_collection) | **put** /collections/{collection}/scores/{score} | Add a score to the collection +[**create_collection**](#create_collection) | **post** /collections | Create a new collection +[**delete_collection**](#delete_collection) | **delete** /collections/{collection} | Delete the collection +[**delete_score_from_collection**](#delete_score_from_collection) | **delete** /collections/{collection}/scores/{score} | Delete a score from the collection +[**edit_collection**](#edit_collection) | **put** /collections/{collection} | Update a collection's metadata +[**get_collection**](#get_collection) | **get** /collections/{collection} | Get collection details +[**list_collection_scores**](#list_collection_scores) | **get** /collections/{collection}/scores | List the scores contained in a collection +[**list_collections**](#list_collections) | **get** /collections | List the collections +[**untrash_collection**](#untrash_collection) | **post** /collections/{collection}/untrash | Untrash a collection + +# **add_score_to_collection** + +> ScoreDetails add_score_to_collection(collectionscore) + +Add a score to the collection + +This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + 'score': "score_example", + } + query_params = { + } + try: + # Add a score to the collection + api_response = api_instance.add_score_to_collection( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) + + # example passing only optional values + path_params = { + 'collection': "collection_example", + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Add a score to the collection + api_response = api_instance.add_score_to_collection( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | +score | ScoreSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#add_score_to_collection.ApiResponseFor200) | Score details +403 | [ApiResponseFor403](#add_score_to_collection.ApiResponseFor403) | Not granted to access to this collection or score +404 | [ApiResponseFor404](#add_score_to_collection.ApiResponseFor404) | Collection or score not found +default | [ApiResponseForDefault](#add_score_to_collection.ApiResponseForDefault) | Error + +#### add_score_to_collection.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreDetails**](../../models/ScoreDetails.md) | | + + +#### add_score_to_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_to_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_to_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_collection** + +> Collection create_collection(body) + +Create a new collection + +This method will create a new collection and add it to your `root` collection. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + body = CollectionCreation( + title="title_example", + privacy=CollectionPrivacy("private"), + ) + try: + # Create a new collection + api_response = api_instance.create_collection( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->create_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**CollectionCreation**](../../models/CollectionCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_collection.ApiResponseFor200) | Collection created +400 | [ApiResponseFor400](#create_collection.ApiResponseFor400) | Bad collection creation request +default | [ApiResponseForDefault](#create_collection.ApiResponseForDefault) | Error + +#### create_collection.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Collection**](../../models/Collection.md) | | + + +#### create_collection.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_collection** + +> delete_collection(collection) + +Delete the collection + +This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + } + try: + # Delete the collection + api_response = api_instance.delete_collection( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_collection.ApiResponseFor204) | Collection deleted +403 | [ApiResponseFor403](#delete_collection.ApiResponseFor403) | Not granted to access to this collection +404 | [ApiResponseFor404](#delete_collection.ApiResponseFor404) | Collection not found +default | [ApiResponseForDefault](#delete_collection.ApiResponseForDefault) | Error + +#### delete_collection.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_score_from_collection** + +> delete_score_from_collection(collectionscore) + +Delete a score from the collection + +This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + 'score': "score_example", + } + query_params = { + } + try: + # Delete a score from the collection + api_response = api_instance.delete_score_from_collection( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) + + # example passing only optional values + path_params = { + 'collection': "collection_example", + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Delete a score from the collection + api_response = api_instance.delete_score_from_collection( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | +score | ScoreSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_score_from_collection.ApiResponseFor204) | Score removed from the collection +403 | [ApiResponseFor403](#delete_score_from_collection.ApiResponseFor403) | Not granted to access to this collection +404 | [ApiResponseFor404](#delete_score_from_collection.ApiResponseFor404) | Collection not found +default | [ApiResponseForDefault](#delete_score_from_collection.ApiResponseForDefault) | Error + +#### delete_score_from_collection.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_score_from_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_from_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_from_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **edit_collection** + +> Collection edit_collection(collection) + +Update a collection's metadata + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.collection_modification import CollectionModification +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + } + try: + # Update a collection's metadata + api_response = api_instance.edit_collection( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->edit_collection: %s\n" % e) + + # example passing only optional values + path_params = { + 'collection': "collection_example", + } + body = CollectionModification( + title="title_example", + privacy=CollectionPrivacy("private"), + ) + try: + # Update a collection's metadata + api_response = api_instance.edit_collection( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->edit_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**CollectionModification**](../../models/CollectionModification.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#edit_collection.ApiResponseFor200) | Collection details +403 | [ApiResponseFor403](#edit_collection.ApiResponseFor403) | Not granted to access to this collection +404 | [ApiResponseFor404](#edit_collection.ApiResponseFor404) | Collection not found +default | [ApiResponseForDefault](#edit_collection.ApiResponseForDefault) | Error + +#### edit_collection.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Collection**](../../models/Collection.md) | | + + +#### edit_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### edit_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### edit_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_collection** + +> Collection get_collection(collection) + +Get collection details + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + } + query_params = { + } + try: + # Get collection details + api_response = api_instance.get_collection( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->get_collection: %s\n" % e) + + # example passing only optional values + path_params = { + 'collection': "collection_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Get collection details + api_response = api_instance.get_collection( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->get_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_collection.ApiResponseFor200) | Collection details +403 | [ApiResponseFor403](#get_collection.ApiResponseFor403) | Not granted to access to this collection +404 | [ApiResponseFor404](#get_collection.ApiResponseFor404) | Collection not found +default | [ApiResponseForDefault](#get_collection.ApiResponseForDefault) | Error + +#### get_collection.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Collection**](../../models/Collection.md) | | + + +#### get_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_collection_scores** + +> [ScoreDetails] list_collection_scores(collection) + +List the scores contained in a collection + +Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + } + query_params = { + } + try: + # List the scores contained in a collection + api_response = api_instance.list_collection_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) + + # example passing only optional values + path_params = { + 'collection': "collection_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + 'sort': "creationDate", + 'direction': "asc", + 'limit': 25, + 'next': "next_example", + 'previous': "previous_example", + } + try: + # List the scores contained in a collection + api_response = api_instance.list_collection_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional +sort | SortSchema | | optional +direction | DirectionSchema | | optional +limit | LimitSchema | | optional +next | NextSchema | | optional +previous | PreviousSchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SortSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["creationDate", "modificationDate", "title", ] + +# DirectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["asc", "desc", ] + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 + +# NextSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PreviousSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_collection_scores.ApiResponseFor200) | List of scores +default | [ApiResponseForDefault](#list_collection_scores.ApiResponseForDefault) | Error + +#### list_collection_scores.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### list_collection_scores.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_collections** + +> [Collection] list_collections() + +List the collections + +Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only optional values + query_params = { + 'parent': "root", + 'sort': "creationDate", + 'direction': "asc", + 'limit': 25, + 'next': "next_example", + 'previous': "previous_example", + } + try: + # List the collections + api_response = api_instance.list_collections( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collections: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional +sort | SortSchema | | optional +direction | DirectionSchema | | optional +limit | LimitSchema | | optional +next | NextSchema | | optional +previous | PreviousSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | if omitted the server will use the default value of "root" + +# SortSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["creationDate", "title", ] + +# DirectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["asc", "desc", ] + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 + +# NextSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PreviousSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_collections.ApiResponseFor200) | List of collections +default | [ApiResponseForDefault](#list_collections.ApiResponseForDefault) | Error + +#### list_collections.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**Collection**]({{complexTypePrefix}}Collection.md) | [**Collection**]({{complexTypePrefix}}Collection.md) | [**Collection**]({{complexTypePrefix}}Collection.md) | | + +#### list_collections.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **untrash_collection** + +> untrash_collection(collection) + +Untrash a collection + +This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'collection': "collection_example", + } + try: + # Untrash a collection + api_response = api_instance.untrash_collection( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +collection | CollectionSchema | | + +# CollectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#untrash_collection.ApiResponseFor204) | The score has been untrashed +403 | [ApiResponseFor403](#untrash_collection.ApiResponseFor403) | Not granted to manage this score +404 | [ApiResponseFor404](#untrash_collection.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#untrash_collection.ApiResponseForDefault) | Error + +#### untrash_collection.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### untrash_collection.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### untrash_collection.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### untrash_collection.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/EduResourcesApi.md b/docs/apis/tags/EduResourcesApi.md new file mode 100644 index 0000000..92db4de --- /dev/null +++ b/docs/apis/tags/EduResourcesApi.md @@ -0,0 +1,1397 @@ + +# flat_api.apis.tags.edu_resources_api.EduResourcesApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**copy_edu_resource**](#copy_edu_resource) | **post** /eduResources/{resource}/copy | Copy an education resource to a Resource Library +[**copy_edu_resource_to_demo_class**](#copy_edu_resource_to_demo_class) | **post** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class +[**create_edu_resource**](#create_edu_resource) | **post** /eduResources | Create a new education resource +[**delete_edu_resource**](#delete_edu_resource) | **delete** /eduResources/{resource} | Delete an education resource +[**get_edu_resource**](#get_edu_resource) | **get** /eduResources/{resource} | Get an education resource +[**list_edu_libraries**](#list_edu_libraries) | **get** /eduResources/libraries | List the education libraries +[**list_edu_resources**](#list_edu_resources) | **get** /eduResources | List education resources in a library or folder +[**move_edu_resource**](#move_edu_resource) | **post** /eduResources/{resource}/move | Move an education resource +[**update_edu_resource**](#update_edu_resource) | **put** /eduResources/{resource} | Update an education resource metadata +[**update_edu_resource_assignment**](#update_edu_resource_assignment) | **put** /eduResources/{resource}/assignment | Update an education resource assignment +[**use_edu_resource_in_class**](#use_edu_resource_in_class) | **post** /eduResources/{resource}/useInClass | Use an education resource in a class + +# **copy_edu_resource** + +> EduResource copy_edu_resource(resourceedu_resource_copy) + +Copy an education resource to a Resource Library + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + body = EduResourceCopy( + destination="destination_example", + ) + try: + # Copy an education resource to a Resource Library + api_response = api_instance.copy_edu_resource( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->copy_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResourceCopy**](../../models/EduResourceCopy.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#copy_edu_resource.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#copy_edu_resource.ApiResponseForDefault) | Error + +#### copy_edu_resource.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResource**](../../models/EduResource.md) | | + + +#### copy_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **copy_edu_resource_to_demo_class** + +> ClassAssignment copy_edu_resource_to_demo_class(resource) + +Copy an education assignment to a teacher demo class + +Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + try: + # Copy an education assignment to a teacher demo class + api_response = api_instance.copy_edu_resource_to_demo_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->copy_edu_resource_to_demo_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#copy_edu_resource_to_demo_class.ApiResponseFor200) | Assignment copied to the demo class +default | [ApiResponseForDefault](#copy_edu_resource_to_demo_class.ApiResponseForDefault) | Error + +#### copy_edu_resource_to_demo_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassAssignment**](../../models/ClassAssignment.md) | | + + +#### copy_edu_resource_to_demo_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_edu_resource** + +> EduResource create_edu_resource(edu_resource_creation) + +Create a new education resource + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + body = EduResourceCreation( + type=EduResourceType("assignment"), + title="title_example", + parent="root", + ) + try: + # Create a new education resource + api_response = api_instance.create_edu_resource( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->create_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResourceCreation**](../../models/EduResourceCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_edu_resource.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#create_edu_resource.ApiResponseForDefault) | Error + +#### create_edu_resource.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResource**](../../models/EduResource.md) | | + + +#### create_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_edu_resource** + +> delete_edu_resource(resource) + +Delete an education resource + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + try: + # Delete an education resource + api_response = api_instance.delete_edu_resource( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->delete_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_edu_resource.ApiResponseFor204) | Resource deleted +default | [ApiResponseForDefault](#delete_edu_resource.ApiResponseForDefault) | Error + +#### delete_edu_resource.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_edu_resource** + +> EduResource get_edu_resource(resource) + +Get an education resource + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + try: + # Get an education resource + api_response = api_instance.get_edu_resource( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->get_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_edu_resource.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#get_edu_resource.ApiResponseForDefault) | Error + +#### get_edu_resource.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResource**](../../models/EduResource.md) | | + + +#### get_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_edu_libraries** + +> [EduLibrary] list_edu_libraries() + +List the education libraries + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.edu_library import EduLibrary +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List the education libraries + api_response = api_instance.list_edu_libraries() + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->list_edu_libraries: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_edu_libraries.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#list_edu_libraries.ApiResponseForDefault) | Error + +#### list_edu_libraries.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +List of libraries to display + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of libraries to display | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | [**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | [**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | | + +#### list_edu_libraries.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_edu_resources** + +> [EduResource] list_edu_resources() + +List education resources in a library or folder + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only optional values + query_params = { + 'parent': "root", + 'type': "assignment", + 'sort': "creationDate", + 'direction': "asc", + 'limit': 25, + 'next': "next_example", + 'previous': "previous_example", + } + try: + # List education resources in a library or folder + api_response = api_instance.list_edu_resources( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->list_edu_resources: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional +type | TypeSchema | | optional +sort | SortSchema | | optional +direction | DirectionSchema | | optional +limit | LimitSchema | | optional +next | NextSchema | | optional +previous | PreviousSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | if omitted the server will use the default value of "root" + +# TypeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["assignment", "folder", ] + +# SortSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["creationDate", "updateDate", "title", ] if omitted the server will use the default value of "creationDate" + +# DirectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["asc", "desc", ] + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 + +# NextSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PreviousSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_edu_resources.ApiResponseFor200) | List of resources +default | [ApiResponseForDefault](#list_edu_resources.ApiResponseForDefault) | Error + +#### list_edu_resources.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**EduResource**]({{complexTypePrefix}}EduResource.md) | [**EduResource**]({{complexTypePrefix}}EduResource.md) | [**EduResource**]({{complexTypePrefix}}EduResource.md) | | + +#### list_edu_resources.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **move_edu_resource** + +> EduResource move_edu_resource(resourceedu_resource_move) + +Move an education resource + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + body = EduResourceMove( + destination="destination_example", + ) + try: + # Move an education resource + api_response = api_instance.move_edu_resource( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->move_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResourceMove**](../../models/EduResourceMove.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#move_edu_resource.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#move_edu_resource.ApiResponseForDefault) | Error + +#### move_edu_resource.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResource**](../../models/EduResource.md) | | + + +#### move_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_edu_resource** + +> EduResource update_edu_resource(resourceedu_resource_update) + +Update an education resource metadata + +Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_update import EduResourceUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + body = EduResourceUpdate( + title="title_example", + ) + try: + # Update an education resource metadata + api_response = api_instance.update_edu_resource( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->update_edu_resource: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResourceUpdate**](../../models/EduResourceUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_edu_resource.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#update_edu_resource.ApiResponseForDefault) | Error + +#### update_edu_resource.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResource**](../../models/EduResource.md) | | + + +#### update_edu_resource.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_edu_resource_assignment** + +> Assignment update_edu_resource_assignment(resourceassignment_update) + +Update an education resource assignment + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + body = AssignmentUpdate( + type=AssignmentType("none"), + title="title_example", + description="description_example", + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ) + ], + nb_playback_authorized=3.14, + toolset="toolset_example", + cover_file="cover_file_example", + cover="cover_example", + max_points=0, + release_grades="auto", + shuffle_exercises=True, + ) + try: + # Update an education resource assignment + api_response = api_instance.update_edu_resource_assignment( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->update_edu_resource_assignment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentUpdate**](../../models/AssignmentUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_edu_resource_assignment.ApiResponseFor200) | Fetched resource +default | [ApiResponseForDefault](#update_edu_resource_assignment.ApiResponseForDefault) | Error + +#### update_edu_resource_assignment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Assignment**](../../models/Assignment.md) | | + + +#### update_edu_resource_assignment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **use_edu_resource_in_class** + +> ClassAssignment use_edu_resource_in_class(resourceedu_resource_use_in_class) + +Use an education resource in a class + +This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import edu_resources_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'resource': "resource_example", + } + body = EduResourceUseInClass( + classroom="classroom_example", + assignment="assignment_example", + ) + try: + # Use an education resource in a class + api_response = api_instance.use_edu_resource_in_class( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->use_edu_resource_in_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**EduResourceUseInClass**](../../models/EduResourceUseInClass.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +resource | ResourceSchema | | + +# ResourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#use_edu_resource_in_class.ApiResponseFor200) | Assignment copied to the chosen class +default | [ApiResponseForDefault](#use_edu_resource_in_class.ApiResponseForDefault) | Error + +#### use_edu_resource_in_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassAssignment**](../../models/ClassAssignment.md) | | + + +#### use_edu_resource_in_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/GroupApi.md b/docs/apis/tags/GroupApi.md new file mode 100644 index 0000000..a70d516 --- /dev/null +++ b/docs/apis/tags/GroupApi.md @@ -0,0 +1,436 @@ + +# flat_api.apis.tags.group_api.GroupApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_group_details**](#get_group_details) | **get** /groups/{group} | Get group information +[**get_group_scores**](#get_group_scores) | **get** /groups/{group}/scores | List group's scores +[**list_group_users**](#list_group_users) | **get** /groups/{group}/users | List group's users + +# **get_group_details** + +> GroupDetails get_group_details(group) + +Get group information + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import group_api +from flat_api.model.group_details import GroupDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'group': "group_example", + } + try: + # Get group information + api_response = api_instance.get_group_details( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_details: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +group | GroupSchema | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_group_details.ApiResponseFor200) | The group details +default | [ApiResponseForDefault](#get_group_details.ApiResponseForDefault) | Error + +#### get_group_details.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**GroupDetails**](../../models/GroupDetails.md) | | + + +#### get_group_details.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_group_scores** + +> [ScoreDetails] get_group_scores(group) + +List group's scores + +Get the list of scores shared with a group. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import group_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'group': "group_example", + } + query_params = { + } + try: + # List group's scores + api_response = api_instance.get_group_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) + + # example passing only optional values + path_params = { + 'group': "group_example", + } + query_params = { + 'parent': "parent_example", + } + try: + # List group's scores + api_response = api_instance.get_group_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +group | GroupSchema | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_group_scores.ApiResponseFor200) | The group's scores +default | [ApiResponseForDefault](#get_group_scores.ApiResponseForDefault) | Error + +#### get_group_scores.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### get_group_scores.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_group_users** + +> [UserPublic] list_group_users(group) + +List group's users + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import group_api +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'group': "group_example", + } + query_params = { + } + try: + # List group's users + api_response = api_instance.list_group_users( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) + + # example passing only optional values + path_params = { + 'group': "group_example", + } + query_params = { + 'source': "googleClassroom", + } + try: + # List group's users + api_response = api_instance.list_group_users( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +source | SourceSchema | | optional + + +# SourceSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["googleClassroom", "microsoftGraph", "clever", ] + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +group | GroupSchema | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_group_users.ApiResponseFor200) | The list of users member of the group +default | [ApiResponseForDefault](#list_group_users.ApiResponseForDefault) | Error + +#### list_group_users.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**UserPublic**]({{complexTypePrefix}}UserPublic.md) | [**UserPublic**]({{complexTypePrefix}}UserPublic.md) | [**UserPublic**]({{complexTypePrefix}}UserPublic.md) | | + +#### list_group_users.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/ModelClassApi.md b/docs/apis/tags/ModelClassApi.md new file mode 100644 index 0000000..7c621f2 --- /dev/null +++ b/docs/apis/tags/ModelClassApi.md @@ -0,0 +1,4122 @@ + +# flat_api.apis.tags.model_class_api.ModelClassApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activate_class**](#activate_class) | **post** /classes/{class}/activate | Activate the class +[**add_class_user**](#add_class_user) | **put** /classes/{class}/users/{user} | Add a user to the class +[**archive_assignment**](#archive_assignment) | **post** /classes/{class}/assignments/{assignment}/archive | Archive the assignment +[**archive_class**](#archive_class) | **post** /classes/{class}/archive | Archive the class +[**copy_assignment**](#copy_assignment) | **post** /classes/{class}/assignments/{assignment}/copy | Copy an assignment +[**create_class**](#create_class) | **post** /classes | Create a new class +[**create_class_assignment**](#create_class_assignment) | **post** /classes/{class}/assignments | Assignment creation +[**create_submission**](#create_submission) | **put** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission +[**create_test_student_account**](#create_test_student_account) | **post** /classes/{class}/testStudent | Create a test student account +[**delete_class_user**](#delete_class_user) | **delete** /classes/{class}/users/{user} | Remove a user from the class +[**delete_submission**](#delete_submission) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission +[**delete_submission_comment**](#delete_submission_comment) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission +[**edit_submission**](#edit_submission) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission +[**enroll_class**](#enroll_class) | **post** /classes/enroll/{enrollmentCode} | Join a class +[**export_submissions_reviews_as_csv**](#export_submissions_reviews_as_csv) | **get** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +[**export_submissions_reviews_as_excel**](#export_submissions_reviews_as_excel) | **get** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +[**get_class**](#get_class) | **get** /classes/{class} | Get the details of a single class +[**get_score_submissions**](#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score +[**get_submission**](#get_submission) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +[**get_submission_comments**](#get_submission_comments) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +[**get_submission_history**](#get_submission_history) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission +[**get_submissions**](#get_submissions) | **get** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions +[**list_assignments**](#list_assignments) | **get** /classes/{class}/assignments | Assignments listing +[**list_class_student_submissions**](#list_class_student_submissions) | **get** /classes/{class}/students/{user}/submissions | List the submissions for a student +[**list_classes**](#list_classes) | **get** /classes | List the classes available for the current user +[**post_submission_comment**](#post_submission_comment) | **post** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +[**unarchive_assignment**](#unarchive_assignment) | **delete** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. +[**unarchive_class**](#unarchive_class) | **delete** /classes/{class}/archive | Unarchive the class +[**update_class**](#update_class) | **put** /classes/{class} | Update the class +[**update_submission_comment**](#update_submission_comment) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission + +# **activate_class** + +> ClassDetails activate_class(_class) + +Activate the class + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Activate the class + api_response = api_instance.activate_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->activate_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#activate_class.ApiResponseFor200) | The class details +default | [ApiResponseForDefault](#activate_class.ApiResponseForDefault) | Error + +#### activate_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### activate_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **add_class_user** + +> add_class_user(_classuser) + +Add a user to the class + +This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'user': "user_example", + } + try: + # Add a user to the class + api_response = api_instance.add_class_user( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->add_class_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +user | UserSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#add_class_user.ApiResponseFor204) | The user has been added to the class +default | [ApiResponseForDefault](#add_class_user.ApiResponseForDefault) | Error + +#### add_class_user.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### add_class_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **archive_assignment** + +> Assignment archive_assignment(_classassignment) + +Archive the assignment + +Archive the assignment + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + try: + # Archive the assignment + api_response = api_instance.archive_assignment( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->archive_assignment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#archive_assignment.ApiResponseFor200) | The assignment details +default | [ApiResponseForDefault](#archive_assignment.ApiResponseForDefault) | Error + +#### archive_assignment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Assignment**](../../models/Assignment.md) | | + + +#### archive_assignment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **archive_class** + +> ClassDetails archive_class(_class) + +Archive the class + +Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Archive the class + api_response = api_instance.archive_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->archive_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#archive_class.ApiResponseFor200) | The class details +default | [ApiResponseForDefault](#archive_class.ApiResponseForDefault) | Error + +#### archive_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### archive_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **copy_assignment** + +> AssignmentCopyResponse copy_assignment(_classassignmentbody) + +Copy an assignment + +Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + body = AssignmentCopy( + classroom="classroom_example", + assignment="assignment_example", + scheduled_date="1970-01-01T00:00:00.00Z", + library_parent="library_parent_example", + ) + try: + # Copy an assignment + api_response = api_instance.copy_assignment( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->copy_assignment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentCopy**](../../models/AssignmentCopy.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#copy_assignment.ApiResponseFor200) | The new created assignment +default | [ApiResponseForDefault](#copy_assignment.ApiResponseForDefault) | Error + +#### copy_assignment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentCopyResponse**](../../models/AssignmentCopyResponse.md) | | + + +#### copy_assignment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_class** + +> ClassDetails create_class(body) + +Create a new class + +Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_creation import ClassCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + body = ClassCreation( + name="name_example", + section="section_example", + level=ClassGradeLevel("elementary"), + skills_focused=EduSkillsFocused([ + "notation" + ]), + size=0, + ) + try: + # Create a new class + api_response = api_instance.create_class( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassCreation**](../../models/ClassCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_class.ApiResponseFor200) | The new class details +402 | [ApiResponseFor402](#create_class.ApiResponseFor402) | Account overquota +default | [ApiResponseForDefault](#create_class.ApiResponseForDefault) | Error + +#### create_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### create_class.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_class_assignment** + +> Assignment create_class_assignment(_class) + +Assignment creation + +Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Assignment creation + api_response = api_instance.create_class_assignment( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_class_assignment: %s\n" % e) + + # example passing only optional values + path_params = { + 'class': "class_example", + } + body = ClassAssignmentUpdate( + type=AssignmentType("none"), + title="title_example", + description="description_example", + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ) + ], + nb_playback_authorized=3.14, + toolset="toolset_example", + cover_file="cover_file_example", + cover="cover_example", + max_points=0, + release_grades="auto", + shuffle_exercises=True, + state="draft", + due_date="1970-01-01T00:00:00.00Z", + scheduled_date="1970-01-01T00:00:00.00Z", + google_classroom=dict( + topic_id="topic_id_example", + ), + microsoft_graph=dict( + categories=[ + "categories_example" + ], + ), + assignee_mode="everyone", + assigned_students=[ + "assigned_students_example" + ], + ) + try: + # Assignment creation + api_response = api_instance.create_class_assignment( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_class_assignment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassAssignmentUpdate**](../../models/ClassAssignmentUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_class_assignment.ApiResponseFor200) | The assignment has been created +default | [ApiResponseForDefault](#create_class_assignment.ApiResponseForDefault) | Error + +#### create_class_assignment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Assignment**](../../models/Assignment.md) | | + + +#### create_class_assignment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_submission** + +> AssignmentSubmission create_submission(_classassignmentbody) + +Create or edit a submission + +Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + body = AssignmentSubmissionUpdate( + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ) + ], + submit=True, + draft_grade=0, + grade=0, + exercises_ids=[ + "exercises_ids_example" + ], + _return=True, + comments=dict( + total=3.14, + unread=3.14, + ), + ) + try: + # Create or edit a submission + api_response = api_instance.create_submission( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_submission: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionUpdate**](../../models/AssignmentSubmissionUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_submission.ApiResponseFor200) | The submission +default | [ApiResponseForDefault](#create_submission.ApiResponseForDefault) | Error + +#### create_submission.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | + + +#### create_submission.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_test_student_account** + +> UserDetails create_test_student_account(_class) + +Create a test student account + +Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + query_params = { + } + try: + # Create a test student account + api_response = api_instance.create_test_student_account( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_test_student_account: %s\n" % e) + + # example passing only optional values + path_params = { + 'class': "class_example", + } + query_params = { + 'reset': True, + } + try: + # Create a test student account + api_response = api_instance.create_test_student_account( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->create_test_student_account: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +reset | ResetSchema | | optional + + +# ResetSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_test_student_account.ApiResponseFor200) | Test account created +default | [ApiResponseForDefault](#create_test_student_account.ApiResponseForDefault) | Error + +#### create_test_student_account.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserDetails**](../../models/UserDetails.md) | | + + +#### create_test_student_account.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_class_user** + +> delete_class_user(_classuser) + +Remove a user from the class + +This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'user': "user_example", + } + try: + # Remove a user from the class + api_response = api_instance.delete_class_user( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->delete_class_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +user | UserSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_class_user.ApiResponseFor204) | The user has been removed from the class +default | [ApiResponseForDefault](#delete_class_user.ApiResponseForDefault) | Error + +#### delete_class_user.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_class_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_submission** + +> AssignmentSubmission delete_submission(_classassignmentsubmission) + +Reset a submission + +Use this method as a teacher to reset a submission and allow student to start over the assignment + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + try: + # Reset a submission + api_response = api_instance.delete_submission( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->delete_submission: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_submission.ApiResponseFor200) | The submission object once reset +default | [ApiResponseForDefault](#delete_submission.ApiResponseForDefault) | Error + +#### delete_submission.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | + + +#### delete_submission.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_submission_comment** + +> delete_submission_comment(_classassignmentsubmissioncomment) + +Delete a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + 'comment': "comment_example", + } + try: + # Delete a feedback comment to a submission + api_response = api_instance.delete_submission_comment( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->delete_submission_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | +comment | CommentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_submission_comment.ApiResponseFor204) | The comment has been deleted +default | [ApiResponseForDefault](#delete_submission_comment.ApiResponseForDefault) | Error + +#### delete_submission_comment.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_submission_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **edit_submission** + +> AssignmentSubmission edit_submission(_classassignmentsubmissionbody) + +Edit a submission + +Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + body = AssignmentSubmissionUpdate( + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ) + ], + submit=True, + draft_grade=0, + grade=0, + exercises_ids=[ + "exercises_ids_example" + ], + _return=True, + comments=dict( + total=3.14, + unread=3.14, + ), + ) + try: + # Edit a submission + api_response = api_instance.edit_submission( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->edit_submission: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionUpdate**](../../models/AssignmentSubmissionUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#edit_submission.ApiResponseFor200) | The submission +default | [ApiResponseForDefault](#edit_submission.ApiResponseForDefault) | Error + +#### edit_submission.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | + + +#### edit_submission.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **enroll_class** + +> ClassDetails enroll_class(enrollment_code) + +Join a class + +Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'enrollmentCode': "enrollmentCode_example", + } + try: + # Join a class + api_response = api_instance.enroll_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->enroll_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +enrollmentCode | EnrollmentCodeSchema | | + +# EnrollmentCodeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#enroll_class.ApiResponseFor200) | The new class details +default | [ApiResponseForDefault](#enroll_class.ApiResponseForDefault) | Error + +#### enroll_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### enroll_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **export_submissions_reviews_as_csv** + +> file_type export_submissions_reviews_as_csv(_classassignment) + +CSV Grades exports + +Export list of submissions grades to a CSV file + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + try: + # CSV Grades exports + api_response = api_instance.export_submissions_reviews_as_csv( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->export_submissions_reviews_as_csv: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('text/csv', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#export_submissions_reviews_as_csv.ApiResponseFor200) | List of submissions +default | [ApiResponseForDefault](#export_submissions_reviews_as_csv.ApiResponseForDefault) | Error + +#### export_submissions_reviews_as_csv.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyTextCsv, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyTextCsv + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +#### export_submissions_reviews_as_csv.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyTextCsv, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyTextCsv +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **export_submissions_reviews_as_excel** + +> file_type export_submissions_reviews_as_excel(_classassignment) + +Excel Grades exports + +Export list of submissions grades to an Excel file + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + try: + # Excel Grades exports + api_response = api_instance.export_submissions_reviews_as_excel( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->export_submissions_reviews_as_excel: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#export_submissions_reviews_as_excel.ApiResponseFor200) | List of submissions +default | [ApiResponseForDefault](#export_submissions_reviews_as_excel.ApiResponseForDefault) | Error + +#### export_submissions_reviews_as_excel.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +#### export_submissions_reviews_as_excel.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_class** + +> ClassDetails get_class(_class) + +Get the details of a single class + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Get the details of a single class + api_response = api_instance.get_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_class.ApiResponseFor200) | The new class details +default | [ApiResponseForDefault](#get_class.ApiResponseForDefault) | Error + +#### get_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### get_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_submissions** + +> [AssignmentSubmission] get_score_submissions(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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + try: + # List submissions related to the score + api_response = api_instance.get_score_submissions( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_score_submissions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_submissions.ApiResponseFor200) | List of submissions +default | [ApiResponseForDefault](#get_score_submissions.ApiResponseForDefault) | Error + +#### get_score_submissions.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | + +#### get_score_submissions.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_submission** + +> AssignmentSubmission get_submission(_classassignmentsubmission) + +Get a student submission + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + try: + # Get a student submission + api_response = api_instance.get_submission( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_submission: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_submission.ApiResponseFor200) | A submission +default | [ApiResponseForDefault](#get_submission.ApiResponseForDefault) | Error + +#### get_submission.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | + + +#### get_submission.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_submission_comments** + +> [AssignmentSubmissionComment] get_submission_comments(_classassignmentsubmission) + +List the feedback comments of a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + try: + # List the feedback comments of a submission + api_response = api_instance.get_submission_comments( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_submission_comments: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_submission_comments.ApiResponseFor200) | The comments of the score +403 | [ApiResponseFor403](#get_submission_comments.ApiResponseFor403) | Not granted to access to this submission +404 | [ApiResponseFor404](#get_submission_comments.ApiResponseFor404) | Submission not found +default | [ApiResponseForDefault](#get_submission_comments.ApiResponseForDefault) | Error + +#### get_submission_comments.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | [**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | [**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | | + +#### get_submission_comments.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_submission_comments.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_submission_comments.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_submission_history** + +> [AssignmentSubmissionHistory] get_submission_history(_classassignmentsubmission) + +Get the history of the submission + +For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + try: + # Get the history of the submission + api_response = api_instance.get_submission_history( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_submission_history: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_submission_history.ApiResponseFor200) | The history of the submission +403 | [ApiResponseFor403](#get_submission_history.ApiResponseFor403) | Not granted to access to this submission +404 | [ApiResponseFor404](#get_submission_history.ApiResponseFor404) | Submission not found +default | [ApiResponseForDefault](#get_submission_history.ApiResponseForDefault) | Error + +#### get_submission_history.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | [**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | [**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | | + +#### get_submission_history.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_submission_history.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_submission_history.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_submissions** + +> [AssignmentSubmission] get_submissions(_classassignment) + +List the students' submissions + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + try: + # List the students' submissions + api_response = api_instance.get_submissions( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->get_submissions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_submissions.ApiResponseFor200) | The submissions +default | [ApiResponseForDefault](#get_submissions.ApiResponseForDefault) | Error + +#### get_submissions.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | + +#### get_submissions.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_assignments** + +> [ClassAssignment] list_assignments(_class) + +Assignments listing + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Assignments listing + api_response = api_instance.list_assignments( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->list_assignments: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_assignments.ApiResponseFor200) | List of assignments for the class +default | [ApiResponseForDefault](#list_assignments.ApiResponseForDefault) | Error + +#### list_assignments.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | [**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | [**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | | + +#### list_assignments.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_class_student_submissions** + +> [AssignmentSubmission] list_class_student_submissions(_classuser) + +List the submissions for a student + +Use this method as a teacher to list all the assignment submissions sent by a student of the class + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'user': "user_example", + } + try: + # List the submissions for a student + api_response = api_instance.list_class_student_submissions( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->list_class_student_submissions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +user | UserSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_class_student_submissions.ApiResponseFor200) | The list of submissions +default | [ApiResponseForDefault](#list_class_student_submissions.ApiResponseForDefault) | Error + +#### list_class_student_submissions.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | + +#### list_class_student_submissions.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_classes** + +> [ClassDetails] list_classes() + +List the classes available for the current user + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only optional values + query_params = { + 'state': "active", + } + try: + # List the classes available for the current user + api_response = api_instance.list_classes( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->list_classes: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +state | StateSchema | | optional + + +# StateSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["active", "inactive", "archived", ] if omitted the server will use the default value of "active" + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_classes.ApiResponseFor200) | The list of classes +default | [ApiResponseForDefault](#list_classes.ApiResponseForDefault) | Error + +#### list_classes.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | [**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | [**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | | + +#### list_classes.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **post_submission_comment** + +> AssignmentSubmissionComment post_submission_comment(_classassignmentsubmissionassignment_submission_comment_creation) + +Add a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + } + body = AssignmentSubmissionCommentCreation( + comment="comment_example", + ) + try: + # Add a feedback comment to a submission + api_response = api_instance.post_submission_comment( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->post_submission_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionCommentCreation**](../../models/AssignmentSubmissionCommentCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#post_submission_comment.ApiResponseFor200) | The comment +403 | [ApiResponseFor403](#post_submission_comment.ApiResponseFor403) | Not granted to access to this submission +404 | [ApiResponseFor404](#post_submission_comment.ApiResponseFor404) | Submission not found +default | [ApiResponseForDefault](#post_submission_comment.ApiResponseForDefault) | Error + +#### post_submission_comment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionComment**](../../models/AssignmentSubmissionComment.md) | | + + +#### post_submission_comment.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### post_submission_comment.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### post_submission_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **unarchive_assignment** + +> Assignment unarchive_assignment(_classassignment) + +Unarchive the assignment. + +Mark the assignment as `active`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + } + try: + # Unarchive the assignment. + api_response = api_instance.unarchive_assignment( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->unarchive_assignment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#unarchive_assignment.ApiResponseFor200) | The assignment details +default | [ApiResponseForDefault](#unarchive_assignment.ApiResponseForDefault) | Error + +#### unarchive_assignment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Assignment**](../../models/Assignment.md) | | + + +#### unarchive_assignment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **unarchive_class** + +> ClassDetails unarchive_class(_class) + +Unarchive the class + +Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Unarchive the class + api_response = api_instance.unarchive_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->unarchive_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#unarchive_class.ApiResponseFor200) | The class details +default | [ApiResponseForDefault](#unarchive_class.ApiResponseForDefault) | Error + +#### unarchive_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### unarchive_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_class** + +> ClassDetails update_class(_class) + +Update the class + +Update the meta information of the class + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_update import ClassUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + } + try: + # Update the class + api_response = api_instance.update_class( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->update_class: %s\n" % e) + + # example passing only optional values + path_params = { + 'class': "class_example", + } + body = ClassUpdate( + name="name_example", + section="section_example", + level=ClassGradeLevel("elementary"), + skills_focused=EduSkillsFocused([ + "notation" + ]), + size=0, + ) + try: + # Update the class + api_response = api_instance.update_class( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->update_class: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassUpdate**](../../models/ClassUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_class.ApiResponseFor200) | The new class details +default | [ApiResponseForDefault](#update_class.ApiResponseForDefault) | Error + +#### update_class.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ClassDetails**](../../models/ClassDetails.md) | | + + +#### update_class.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_submission_comment** + +> AssignmentSubmissionComment update_submission_comment(_classassignmentsubmissioncommentassignment_submission_comment_creation) + +Update a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import model_class_api +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = model_class_api.ModelClassApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'class': "class_example", + 'assignment': "assignment_example", + 'submission': "submission_example", + 'comment': "comment_example", + } + body = AssignmentSubmissionCommentCreation( + comment="comment_example", + ) + try: + # Update a feedback comment to a submission + api_response = api_instance.update_submission_comment( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ModelClassApi->update_submission_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionCommentCreation**](../../models/AssignmentSubmissionCommentCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +class | ModelClassSchema | | +assignment | AssignmentSchema | | +submission | SubmissionSchema | | +comment | CommentSchema | | + +# ModelClassSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# SubmissionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_submission_comment.ApiResponseFor200) | The comment +403 | [ApiResponseFor403](#update_submission_comment.ApiResponseFor403) | Not granted to access to this submission +404 | [ApiResponseFor404](#update_submission_comment.ApiResponseFor404) | Submission not found +default | [ApiResponseForDefault](#update_submission_comment.ApiResponseForDefault) | Error + +#### update_submission_comment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**AssignmentSubmissionComment**](../../models/AssignmentSubmissionComment.md) | | + + +#### update_submission_comment.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_submission_comment.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_submission_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/OrganizationApi.md b/docs/apis/tags/OrganizationApi.md new file mode 100644 index 0000000..d6aeaf3 --- /dev/null +++ b/docs/apis/tags/OrganizationApi.md @@ -0,0 +1,1826 @@ + +# flat_api.apis.tags.organization_api.OrganizationApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**count_orga_users**](#count_orga_users) | **get** /organizations/users/count | Count the organization users using the provided filters +[**create_lti_credentials**](#create_lti_credentials) | **post** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials +[**create_organization_invitation**](#create_organization_invitation) | **post** /organizations/invitations | Create a new invitation to join the organization +[**create_organization_user**](#create_organization_user) | **post** /organizations/users | Create a new user account +[**create_organization_user_access_token**](#create_organization_user_access_token) | **post** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +[**create_organization_user_signin_link**](#create_organization_user_signin_link) | **post** /organizations/users/{user}/signinLink | Create a sign in link for an organization user +[**list_lti_credentials**](#list_lti_credentials) | **get** /organizations/lti/credentials | List LTI 1.x credentials +[**list_organization_invitations**](#list_organization_invitations) | **get** /organizations/invitations | List the organization invitations +[**list_organization_users**](#list_organization_users) | **get** /organizations/users | List the organization users +[**remove_organization_invitation**](#remove_organization_invitation) | **delete** /organizations/invitations/{invitation} | Remove an organization invitation +[**remove_organization_user**](#remove_organization_user) | **delete** /organizations/users/{user} | Remove an account from Flat +[**revoke_lti_credentials**](#revoke_lti_credentials) | **delete** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials +[**update_organization_user**](#update_organization_user) | **put** /organizations/users/{user} | Update account information + +# **count_orga_users** + +> [UserDetailsAdmin] count_orga_users() + +Count the organization users using the provided filters + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only optional values + query_params = { + 'role': [ + "user" + ], + 'q': "q_example", + 'group': [ + "group_example" + ], + 'noActiveLicense': True, + } + try: + # Count the organization users using the provided filters + api_response = api_instance.count_orga_users( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +role | RoleSchema | | optional +q | QSchema | | optional +group | GroupSchema | | optional +noActiveLicense | NoActiveLicenseSchema | | optional + + +# RoleSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | must be one of ["user", "teacher", "admin", ] + +# QSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# NoActiveLicenseSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#count_orga_users.ApiResponseFor200) | Number of users +default | [ApiResponseForDefault](#count_orga_users.ApiResponseForDefault) | Error + +#### count_orga_users.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | | + +#### count_orga_users.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_lti_credentials** + +> LtiCredentials create_lti_credentials(body) + +Create a new couple of LTI 1.x credentials + +Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + body = LtiCredentialsCreation( + name="name_example", + lms=LmsName("canvas"), + ) + try: + # Create a new couple of LTI 1.x credentials + api_response = api_instance.create_lti_credentials( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**LtiCredentialsCreation**](../../models/LtiCredentialsCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_lti_credentials.ApiResponseFor200) | The LTI Credentials +403 | [ApiResponseFor403](#create_lti_credentials.ApiResponseFor403) | Not admin of an organization +default | [ApiResponseForDefault](#create_lti_credentials.ApiResponseForDefault) | Error + +#### create_lti_credentials.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**LtiCredentials**](../../models/LtiCredentials.md) | | + + +#### create_lti_credentials.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_lti_credentials.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_organization_invitation** + +> OrganizationInvitation create_organization_invitation() + +Create a new invitation to join the organization + +This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_invitation import OrganizationInvitation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only optional values + body = OrganizationInvitationCreation( + email="email_example", + organization_role=OrganizationRoles("admin"), + ) + try: + # Create a new invitation to join the organization + api_response = api_instance.create_organization_invitation( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OrganizationInvitationCreation**](../../models/OrganizationInvitationCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_organization_invitation.ApiResponseFor200) | New invitation created +default | [ApiResponseForDefault](#create_organization_invitation.ApiResponseForDefault) | Error + +#### create_organization_invitation.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OrganizationInvitation**](../../models/OrganizationInvitation.md) | | + + +#### create_organization_invitation.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_organization_user** + +> UserDetailsAdmin create_organization_user() + +Create a new user account + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only optional values + body = UserCreation( + username="2", + firstname="firstname_example", + lastname="lastname_example", + email="email_example", + password="password_example", + locale=FlatLocales("en"), + role="user", + ) + try: + # Create a new user account + api_response = api_instance.create_organization_user( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserCreation**](../../models/UserCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_organization_user.ApiResponseFor200) | New user created +default | [ApiResponseForDefault](#create_organization_user.ApiResponseForDefault) | Error + +#### create_organization_user.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserDetailsAdmin**](../../models/UserDetailsAdmin.md) | | + + +#### create_organization_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_organization_user_access_token** + +> ApiAccessToken create_organization_user_access_token(user) + +Create a delegated API access token for an organization user + +This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + body = OrganizationUserAccessTokenCreation( + scopes=[ + AppScopes("account.public_profile") + ], + ) + try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OrganizationUserAccessTokenCreation**](../../models/OrganizationUserAccessTokenCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_organization_user_access_token.ApiResponseFor200) | Created API access token +default | [ApiResponseForDefault](#create_organization_user_access_token.ApiResponseForDefault) | Error + +#### create_organization_user_access_token.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ApiAccessToken**](../../models/ApiAccessToken.md) | | + + +#### create_organization_user_access_token.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_organization_user_signin_link** + +> UserSigninLink create_organization_user_signin_link(user) + +Create a sign in link for an organization user + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_signin_link import UserSigninLink +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + body = UserSigninLinkCreation( + destination_path="/", + ) + try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserSigninLinkCreation**](../../models/UserSigninLinkCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_organization_user_signin_link.ApiResponseFor200) | Sign in link +default | [ApiResponseForDefault](#create_organization_user_signin_link.ApiResponseForDefault) | Error + +#### create_organization_user_signin_link.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserSigninLink**](../../models/UserSigninLink.md) | | + + +#### create_organization_user_signin_link.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_lti_credentials** + +> [LtiCredentials] list_lti_credentials() + +List LTI 1.x credentials + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List LTI 1.x credentials + api_response = api_instance.list_lti_credentials() + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_lti_credentials.ApiResponseFor200) | The list of LTI Credentials +403 | [ApiResponseFor403](#list_lti_credentials.ApiResponseFor403) | Not admin of an organization +default | [ApiResponseForDefault](#list_lti_credentials.ApiResponseForDefault) | Error + +#### list_lti_credentials.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | [**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | [**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | | + +#### list_lti_credentials.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### list_lti_credentials.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_organization_invitations** + +> [OrganizationInvitation] list_organization_invitations() + +List the organization invitations + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation import OrganizationInvitation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only optional values + query_params = { + 'role': "user", + 'limit': 50, + 'next': "next_example", + 'previous': "previous_example", + } + try: + # List the organization invitations + api_response = api_instance.list_organization_invitations( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +role | RoleSchema | | optional +limit | LimitSchema | | optional +next | NextSchema | | optional +previous | PreviousSchema | | optional + + +# RoleSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["user", "teacher", "admin", ] + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 50 + +# NextSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PreviousSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_organization_invitations.ApiResponseFor200) | List of invitations +default | [ApiResponseForDefault](#list_organization_invitations.ApiResponseForDefault) | Error + +#### list_organization_invitations.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | [**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | [**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | | + +#### list_organization_invitations.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_organization_users** + +> [UserDetailsAdmin] list_organization_users() + +List the organization users + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only optional values + query_params = { + 'sort': [ + "firstname" + ], + 'direction': "asc", + 'next': "next_example", + 'previous': "previous_example", + 'role': [ + "user" + ], + 'q': "q_example", + 'group': [ + "group_example" + ], + 'noActiveLicense': True, + 'licenseExpirationDate': [ + "licenseExpirationDate_example" + ], + 'onlyIds': True, + 'limit': 25, + } + try: + # List the organization users + api_response = api_instance.list_organization_users( + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sort | SortSchema | | optional +direction | DirectionSchema | | optional +next | NextSchema | | optional +previous | PreviousSchema | | optional +role | RoleSchema | | optional +q | QSchema | | optional +group | GroupSchema | | optional +noActiveLicense | NoActiveLicenseSchema | | optional +licenseExpirationDate | LicenseExpirationDateSchema | | optional +onlyIds | OnlyIdsSchema | | optional +limit | LimitSchema | | optional + + +# SortSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | must be one of ["firstname", "lastname", "lastActivityDate", "licenseExpirationDate", ] + +# DirectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["asc", "desc", ] + +# NextSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PreviousSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# RoleSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | must be one of ["user", "teacher", "admin", ] + +# QSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# NoActiveLicenseSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +# LicenseExpirationDateSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# OnlyIdsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_organization_users.ApiResponseFor200) | List of users +default | [ApiResponseForDefault](#list_organization_users.ApiResponseForDefault) | Error + +#### list_organization_users.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | | + +#### list_organization_users.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **remove_organization_invitation** + +> remove_organization_invitation(invitation) + +Remove an organization invitation + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'invitation': "invitation_example", + } + try: + # Remove an organization invitation + api_response = api_instance.remove_organization_invitation( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +invitation | InvitationSchema | | + +# InvitationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#remove_organization_invitation.ApiResponseFor204) | The invitation has been removed +default | [ApiResponseForDefault](#remove_organization_invitation.ApiResponseForDefault) | Error + +#### remove_organization_invitation.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### remove_organization_invitation.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **remove_organization_user** + +> remove_organization_user(user) + +Remove an account from Flat + +This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + query_params = { + } + try: + # Remove an account from Flat + api_response = api_instance.remove_organization_user( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + query_params = { + 'convertToIndividual': True, + } + try: + # Remove an account from Flat + api_response = api_instance.remove_organization_user( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +convertToIndividual | ConvertToIndividualSchema | | optional + + +# ConvertToIndividualSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#remove_organization_user.ApiResponseFor204) | User deleted +default | [ApiResponseForDefault](#remove_organization_user.ApiResponseForDefault) | Error + +#### remove_organization_user.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### remove_organization_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **revoke_lti_credentials** + +> revoke_lti_credentials(credentials) + +Revoke LTI 1.x credentials + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'credentials': "credentials_example", + } + try: + # Revoke LTI 1.x credentials + api_response = api_instance.revoke_lti_credentials( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +credentials | CredentialsSchema | | + +# CredentialsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#revoke_lti_credentials.ApiResponseFor204) | Credentials revoked +403 | [ApiResponseFor403](#revoke_lti_credentials.ApiResponseFor403) | Not admin of an organization +404 | [ApiResponseFor404](#revoke_lti_credentials.ApiResponseFor404) | Credentials not found +default | [ApiResponseForDefault](#revoke_lti_credentials.ApiResponseForDefault) | Error + +#### revoke_lti_credentials.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### revoke_lti_credentials.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### revoke_lti_credentials.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### revoke_lti_credentials.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_organization_user** + +> UserDetailsAdmin update_organization_user(userbody) + +Update account information + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_admin_update import UserAdminUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + body = UserAdminUpdate( + password="password_example", + organization_role=OrganizationRoles("admin"), + username="2", + firstname="firstname_example", + lastname="lastname_example", + email="email_example", + ) + try: + # Update account information + api_response = api_instance.update_organization_user( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserAdminUpdate**](../../models/UserAdminUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_organization_user.ApiResponseFor200) | User updated +default | [ApiResponseForDefault](#update_organization_user.ApiResponseForDefault) | Error + +#### update_organization_user.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserDetailsAdmin**](../../models/UserDetailsAdmin.md) | | + + +#### update_organization_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/ScoreApi.md b/docs/apis/tags/ScoreApi.md new file mode 100644 index 0000000..d5cf4ad --- /dev/null +++ b/docs/apis/tags/ScoreApi.md @@ -0,0 +1,5655 @@ + +# flat_api.apis.tags.score_api.ScoreApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_score_collaborator**](#add_score_collaborator) | **post** /scores/{score}/collaborators | Add a new collaborator +[**add_score_track**](#add_score_track) | **post** /scores/{score}/tracks | Add a new video or audio track to the score +[**create_export_task**](#create_export_task) | **post** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task +[**create_score**](#create_score) | **post** /scores | Create a new score +[**create_score_revision**](#create_score_revision) | **post** /scores/{score}/revisions | Create a new revision +[**delete_score**](#delete_score) | **delete** /scores/{score} | Delete a score +[**delete_score_comment**](#delete_score_comment) | **delete** /scores/{score}/comments/{comment} | Delete a comment +[**delete_score_track**](#delete_score_track) | **delete** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score +[**edit_score**](#edit_score) | **put** /scores/{score} | Edit a score's metadata +[**fork_score**](#fork_score) | **post** /scores/{score}/fork | Fork a score +[**ger_user_likes**](#ger_user_likes) | **get** /users/{user}/likes | List liked scores +[**get_group_scores**](#get_group_scores) | **get** /groups/{group}/scores | List group's scores +[**get_score**](#get_score) | **get** /scores/{score} | Get a score's metadata +[**get_score_collaborator**](#get_score_collaborator) | **get** /scores/{score}/collaborators/{collaborator} | Get a collaborator +[**get_score_collaborators**](#get_score_collaborators) | **get** /scores/{score}/collaborators | List the collaborators +[**get_score_comments**](#get_score_comments) | **get** /scores/{score}/comments | List comments +[**get_score_revision**](#get_score_revision) | **get** /scores/{score}/revisions/{revision} | Get a score revision +[**get_score_revision_data**](#get_score_revision_data) | **get** /scores/{score}/revisions/{revision}/{format} | Get a score revision data +[**get_score_revisions**](#get_score_revisions) | **get** /scores/{score}/revisions | List the revisions +[**get_score_submissions**](#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score +[**get_score_track**](#get_score_track) | **get** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score +[**get_user_scores**](#get_user_scores) | **get** /users/{user}/scores | List user's scores +[**list_score_tracks**](#list_score_tracks) | **get** /scores/{score}/tracks | List the audio or video tracks linked to a score +[**mark_score_comment_resolved**](#mark_score_comment_resolved) | **put** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved +[**mark_score_comment_unresolved**](#mark_score_comment_unresolved) | **delete** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved +[**post_score_comment**](#post_score_comment) | **post** /scores/{score}/comments | Post a new comment +[**remove_score_collaborator**](#remove_score_collaborator) | **delete** /scores/{score}/collaborators/{collaborator} | Delete a collaborator +[**untrash_score**](#untrash_score) | **post** /scores/{score}/untrash | Untrash a score +[**update_score_comment**](#update_score_comment) | **put** /scores/{score}/comments/{comment} | Update an existing comment +[**update_score_track**](#update_score_track) | **put** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score + +# **add_score_collaborator** + +> ResourceCollaborator add_score_collaborator(scorebody) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + body = ResourceCollaboratorCreation( + user="user_example", + group="group_example", + user_email="user_email_example", + user_token="user_token_example", + acl_read=True, + acl_write=False, + acl_admin=False, + ) + try: + # Add a new collaborator + api_response = api_instance.add_score_collaborator( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ResourceCollaboratorCreation**](../../models/ResourceCollaboratorCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#add_score_collaborator.ApiResponseFor200) | The newly added collaborator metadata +402 | [ApiResponseFor402](#add_score_collaborator.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#add_score_collaborator.ApiResponseFor403) | Not granted to manage this score +404 | [ApiResponseFor404](#add_score_collaborator.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#add_score_collaborator.ApiResponseForDefault) | Error + +#### add_score_collaborator.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ResourceCollaborator**](../../models/ResourceCollaborator.md) | | + + +#### add_score_collaborator.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_collaborator.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_collaborator.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_collaborator.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **add_score_track** + +> ScoreTrack add_score_track(scorebody) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_creation import ScoreTrackCreation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + body = ScoreTrackCreation( + title="title_example", + default=True, + state=ScoreTrackState("draft"), + url="url_example", + synchronization_points=[ + ScoreTrackPoint( + type="measure", + measure_uuid="measure_uuid_example", + time=3.14, + ) + ], + ) + try: + # Add a new video or audio track to the score + api_response = api_instance.add_score_track( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->add_score_track: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreTrackCreation**](../../models/ScoreTrackCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#add_score_track.ApiResponseFor200) | Created track +403 | [ApiResponseFor403](#add_score_track.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#add_score_track.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#add_score_track.ApiResponseForDefault) | Error + +#### add_score_track.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreTrack**](../../models/ScoreTrack.md) | | + + +#### add_score_track.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_track.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### add_score_track.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_export_task** + +> Task create_export_task(scorerevisionformat) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'revision': "revision_example", + 'format': "mp3", + } + query_params = { + } + try: + # Create a new score export task + api_response = api_instance.create_export_task( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'revision': "revision_example", + 'format': "mp3", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + body = TaskExportOptions( + parts=[ + "parts_example" + ], + ) + try: + # Create a new score export task + api_response = api_instance.create_export_task( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**TaskExportOptions**](../../models/TaskExportOptions.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +revision | RevisionSchema | | +format | FormatSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# RevisionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# FormatSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["mp3", "wav", "practicefirst", ] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_export_task.ApiResponseFor200) | Task associated to the generation of the file +402 | [ApiResponseFor402](#create_export_task.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#create_export_task.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#create_export_task.ApiResponseFor404) | Score or associated file not found +default | [ApiResponseForDefault](#create_export_task.ApiResponseForDefault) | Error + +#### create_export_task.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Task**](../../models/Task.md) | | + + +#### create_export_task.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_export_task.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_export_task.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_export_task.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_score** + +> ScoreDetails create_score(body) + +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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + body = ScoreCreation( + title="title_example", + privacy=ScorePrivacy("private"), + collection="collection_example", + google_drive_folder="google_drive_folder_example", + builder_data=dict( + score_data=dict( + use_tab_staff=True, + use_chord_grid=True, + fifths=3.14, + nb_beats=3.14, + beat_type=3.14, + instruments=[ + dict( + group="group_example", + instrument="instrument_example", + long_name="long_name_example", + short_name="short_name_example", + has_quarter_tone=True, + ) + ], + ), + layout_data=dict( + notes_spacing_coeff=3.14, + length_unit="cm", + page_height=3.14, + page_width=3.14, + page_margin_top=3.14, + page_margin_bottom=3.14, + page_margin_left=3.14, + page_margin_right=3.14, + ), + ), + filename="filename_example", + data="data_example", + data_encoding="base64", + source=ScoreSource( + google_drive="google_drive_example", + ), + ) + try: + # Create a new score + api_response = api_instance.create_score( + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreCreation**](../../models/ScoreCreation.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_score.ApiResponseFor200) | Score created +400 | [ApiResponseFor400](#create_score.ApiResponseFor400) | Bad score creation request +402 | [ApiResponseFor402](#create_score.ApiResponseFor402) | Account overquota +default | [ApiResponseForDefault](#create_score.ApiResponseForDefault) | Error + +#### create_score.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreDetails**](../../models/ScoreDetails.md) | | + + +#### create_score.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_score.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_score_revision** + +> ScoreRevision create_score_revision(scorebody) + +Create a new revision + +Update a score by uploading a new revision for this one. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + body = ScoreRevisionCreation( + data="", + data_encoding="base64", + autosave=True, + description="description_example", + ) + try: + # Create a new revision + api_response = api_instance.create_score_revision( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreRevisionCreation**](../../models/ScoreRevisionCreation.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_score_revision.ApiResponseFor200) | The new created revision metadata +402 | [ApiResponseFor402](#create_score_revision.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#create_score_revision.ApiResponseFor403) | Not granted to modify this score +404 | [ApiResponseFor404](#create_score_revision.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#create_score_revision.ApiResponseForDefault) | Error + +#### create_score_revision.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreRevision**](../../models/ScoreRevision.md) | | + + +#### create_score_revision.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_score_revision.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_score_revision.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### create_score_revision.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_score** + +> delete_score(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). + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # Delete a score + api_response = api_instance.delete_score( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'now': False, + } + try: + # Delete a score + api_response = api_instance.delete_score( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +now | NowSchema | | optional + + +# NowSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_score.ApiResponseFor204) | The score has been removed +403 | [ApiResponseFor403](#delete_score.ApiResponseFor403) | Not granted to manage this score +404 | [ApiResponseFor404](#delete_score.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#delete_score.ApiResponseForDefault) | Error + +#### delete_score.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_score.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_score_comment** + +> delete_score_comment(scorecomment) + +Delete a comment + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + } + try: + # Delete a comment + api_response = api_instance.delete_score_comment( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Delete a comment + api_response = api_instance.delete_score_comment( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +comment | CommentSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_score_comment.ApiResponseFor204) | The comment has been deleted +403 | [ApiResponseFor403](#delete_score_comment.ApiResponseFor403) | Not granted to access to this score or not the original comment creator +404 | [ApiResponseFor404](#delete_score_comment.ApiResponseFor404) | Score or comment not found +default | [ApiResponseForDefault](#delete_score_comment.ApiResponseForDefault) | Error + +#### delete_score_comment.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_score_comment.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_comment.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_score_track** + +> delete_score_track(scoretrack) + +Remove an audio or video track linked to the score + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'track': "track_example", + } + try: + # Remove an audio or video track linked to the score + api_response = api_instance.delete_score_track( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +track | TrackSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# TrackSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#delete_score_track.ApiResponseFor204) | Track removed +403 | [ApiResponseFor403](#delete_score_track.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#delete_score_track.ApiResponseFor404) | Score or Track not found +default | [ApiResponseForDefault](#delete_score_track.ApiResponseForDefault) | Error + +#### delete_score_track.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### delete_score_track.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_track.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### delete_score_track.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **edit_score** + +> ScoreDetails edit_score(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + try: + # Edit a score's metadata + api_response = api_instance.edit_score( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->edit_score: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + body = ScoreModification( + title="title_example", + subtitle="subtitle_example", + composer="composer_example", + lyricist="lyricist_example", + arranger="arranger_example", + privacy=ScorePrivacy("private"), + sharing_key="bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3", + description="description_example", + tags=[ + "tags_example" + ], + creation_type=ScoreCreationType("original"), + license=ScoreLicense("copyright"), + license_text="license_text_example", + ) + try: + # Edit a score's metadata + api_response = api_instance.edit_score( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->edit_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreModification**](../../models/ScoreModification.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#edit_score.ApiResponseFor200) | Score details +402 | [ApiResponseFor402](#edit_score.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#edit_score.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#edit_score.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#edit_score.ApiResponseForDefault) | Error + +#### edit_score.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreDetails**](../../models/ScoreDetails.md) | | + + +#### edit_score.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### edit_score.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### edit_score.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### edit_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **fork_score** + +> ScoreDetails fork_score(scorebody) + +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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_fork import ScoreFork +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + body = ScoreFork( + collection="root", + keep_original_title=True, + ) + try: + # Fork a score + api_response = api_instance.fork_score( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->fork_score: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + body = ScoreFork( + collection="root", + keep_original_title=True, + ) + try: + # Fork a score + api_response = api_instance.fork_score( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->fork_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreFork**](../../models/ScoreFork.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#fork_score.ApiResponseFor200) | Score details +402 | [ApiResponseFor402](#fork_score.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#fork_score.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#fork_score.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#fork_score.ApiResponseForDefault) | Error + +#### fork_score.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreDetails**](../../models/ScoreDetails.md) | | + + +#### fork_score.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### fork_score.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### fork_score.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### fork_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **ger_user_likes** + +> [ScoreDetails] ger_user_likes(user) + +List liked scores + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + query_params = { + } + try: + # List liked scores + api_response = api_instance.ger_user_likes( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + query_params = { + 'ids': True, + } + try: + # List liked scores + api_response = api_instance.ger_user_likes( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +ids | IdsSchema | | optional + + +# IdsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#ger_user_likes.ApiResponseFor200) | List of liked scores +default | [ApiResponseForDefault](#ger_user_likes.ApiResponseForDefault) | Error + +#### ger_user_likes.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### ger_user_likes.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_group_scores** + +> [ScoreDetails] get_group_scores(group) + +List group's scores + +Get the list of scores shared with a group. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'group': "group_example", + } + query_params = { + } + try: + # List group's scores + api_response = api_instance.get_group_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) + + # example passing only optional values + path_params = { + 'group': "group_example", + } + query_params = { + 'parent': "parent_example", + } + try: + # List group's scores + api_response = api_instance.get_group_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +group | GroupSchema | | + +# GroupSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_group_scores.ApiResponseFor200) | The group's scores +default | [ApiResponseForDefault](#get_group_scores.ApiResponseForDefault) | Error + +#### get_group_scores.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### get_group_scores.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score** + +> ScoreDetails get_score(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # Get a score's metadata + api_response = api_instance.get_score( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Get a score's metadata + api_response = api_instance.get_score( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score.ApiResponseFor200) | Score details +402 | [ApiResponseFor402](#get_score.ApiResponseFor402) | Account overquota and this document is out of the granted quota +403 | [ApiResponseFor403](#get_score.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#get_score.ApiResponseForDefault) | Error + +#### get_score.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreDetails**](../../models/ScoreDetails.md) | | + + +#### get_score.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_collaborator** + +> ResourceCollaborator get_score_collaborator(scorecollaborator) + +Get a collaborator + +Get the information about a collaborator (User or Group). + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'collaborator': "collaborator_example", + } + query_params = { + } + try: + # Get a collaborator + api_response = api_instance.get_score_collaborator( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'collaborator': "collaborator_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Get a collaborator + api_response = api_instance.get_score_collaborator( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +collaborator | CollaboratorSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CollaboratorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_collaborator.ApiResponseFor200) | Collaborator information +402 | [ApiResponseFor402](#get_score_collaborator.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_collaborator.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_collaborator.ApiResponseFor404) | Score or collaborator not found +default | [ApiResponseForDefault](#get_score_collaborator.ApiResponseForDefault) | Error + +#### get_score_collaborator.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ResourceCollaborator**](../../models/ResourceCollaborator.md) | | + + +#### get_score_collaborator.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborator.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborator.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborator.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_collaborators** + +> [ResourceCollaborator] get_score_collaborators(score) + +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). + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # List the collaborators + api_response = api_instance.get_score_collaborators( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # List the collaborators + api_response = api_instance.get_score_collaborators( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_collaborators.ApiResponseFor200) | List of collaborators +402 | [ApiResponseFor402](#get_score_collaborators.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_collaborators.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_collaborators.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#get_score_collaborators.ApiResponseForDefault) | Error + +#### get_score_collaborators.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | [**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | [**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | | + +#### get_score_collaborators.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborators.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborators.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_collaborators.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_comments** + +> [ScoreComment] get_score_comments(score) + +List comments + +This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # List comments + api_response = api_instance.get_score_comments( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + 'type': "document", + 'sort': "date", + 'direction': "asc", + } + try: + # List comments + api_response = api_instance.get_score_comments( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional +type | TypeSchema | | optional +sort | SortSchema | | optional +direction | DirectionSchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# TypeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["document", "inline", ] + +# SortSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["date", ] + +# DirectionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["asc", "desc", ] + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_comments.ApiResponseFor200) | The comments of the score +402 | [ApiResponseFor402](#get_score_comments.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_comments.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_comments.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#get_score_comments.ApiResponseForDefault) | Error + +#### get_score_comments.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | [**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | [**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | | + +#### get_score_comments.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_comments.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_comments.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_comments.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_revision** + +> ScoreRevision get_score_revision(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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'revision': "revision_example", + } + query_params = { + } + try: + # Get a score revision + api_response = api_instance.get_score_revision( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'revision': "revision_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Get a score revision + api_response = api_instance.get_score_revision( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +revision | RevisionSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# RevisionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_revision.ApiResponseFor200) | Revision metadata +402 | [ApiResponseFor402](#get_score_revision.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_revision.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_revision.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#get_score_revision.ApiResponseForDefault) | Error + +#### get_score_revision.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreRevision**](../../models/ScoreRevision.md) | | + + +#### get_score_revision.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_revision_data** + +> file_type get_score_revision_data(scorerevisionformat) + +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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'revision': "revision_example", + 'format': "json", + } + query_params = { + } + try: + # Get a score revision data + api_response = api_instance.get_score_revision_data( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'revision': "revision_example", + 'format': "json", + } + query_params = { + 'sharingKey': "sharingKey_example", + 'parts': "parts_example", + 'defaultTrack': True, + 'url': True, + } + try: + # Get a score revision data + api_response = api_instance.get_score_revision_data( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional +parts | PartsSchema | | optional +defaultTrack | DefaultTrackSchema | | optional +url | UrlSchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PartsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# DefaultTrackSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +# UrlSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +revision | RevisionSchema | | +format | FormatSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# RevisionSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# FormatSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["json", "mxl", "xml", "mp3", "wav", "midi", "thumbnail.png", "synchronizationPoints", ] + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_revision_data.ApiResponseFor200) | Revision data +402 | [ApiResponseFor402](#get_score_revision_data.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_revision_data.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_revision_data.ApiResponseFor404) | Score or associated file not found +default | [ApiResponseForDefault](#get_score_revision_data.ApiResponseForDefault) | Error + +#### get_score_revision_data.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, SchemaFor200ResponseBodyAudioMp3, SchemaFor200ResponseBodyAudioWav, SchemaFor200ResponseBodyAudioMidi, SchemaFor200ResponseBodyImagePng, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyApplicationVndRecordareMusicxml + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyAudioMp3 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyAudioWav + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyAudioMidi + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +# SchemaFor200ResponseBodyImagePng + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | + +#### get_score_revision_data.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision_data.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision_data.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revision_data.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_revisions** + +> [ScoreRevision] get_score_revisions(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # List the revisions + api_response = api_instance.get_score_revisions( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # List the revisions + api_response = api_instance.get_score_revisions( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_revisions.ApiResponseFor200) | List of revisions +402 | [ApiResponseFor402](#get_score_revisions.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#get_score_revisions.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_revisions.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#get_score_revisions.ApiResponseForDefault) | Error + +#### get_score_revisions.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | [**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | [**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | | + +#### get_score_revisions.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revisions.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revisions.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_revisions.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_submissions** + +> [AssignmentSubmission] get_score_submissions(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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + try: + # List submissions related to the score + api_response = api_instance.get_score_submissions( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_submissions.ApiResponseFor200) | List of submissions +default | [ApiResponseForDefault](#get_score_submissions.ApiResponseForDefault) | Error + +#### get_score_submissions.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | + +#### get_score_submissions.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_score_track** + +> ScoreTrack get_score_track(scoretrack) + +Retrieve the details of an audio or video track linked to a score + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'track': "track_example", + } + query_params = { + } + try: + # Retrieve the details of an audio or video track linked to a score + api_response = api_instance.get_score_track( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_track: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'track': "track_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Retrieve the details of an audio or video track linked to a score + api_response = api_instance.get_score_track( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_track: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +track | TrackSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# TrackSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_score_track.ApiResponseFor200) | Track details +403 | [ApiResponseFor403](#get_score_track.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#get_score_track.ApiResponseFor404) | Score or Track not found +default | [ApiResponseForDefault](#get_score_track.ApiResponseForDefault) | Error + +#### get_score_track.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreTrack**](../../models/ScoreTrack.md) | | + + +#### get_score_track.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_track.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### get_score_track.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_user_scores** + +> [ScoreDetails] get_user_scores(user) + +List user's scores + +Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + query_params = { + } + try: + # List user's scores + api_response = api_instance.get_user_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + query_params = { + 'parent': "parent_example", + } + try: + # List user's scores + api_response = api_instance.get_user_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_user_scores.ApiResponseFor200) | The user scores +default | [ApiResponseForDefault](#get_user_scores.ApiResponseForDefault) | Error + +#### get_user_scores.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### get_user_scores.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **list_score_tracks** + +> [ScoreTrack] list_score_tracks(score) + +List the audio or video tracks linked to a score + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + try: + # List the audio or video tracks linked to a score + api_response = api_instance.list_score_tracks( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + 'assignment': "assignment_example", + 'listAutoTrack': True, + } + try: + # List the audio or video tracks linked to a score + api_response = api_instance.list_score_tracks( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional +assignment | AssignmentSchema | | optional +listAutoTrack | ListAutoTrackSchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AssignmentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ListAutoTrackSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#list_score_tracks.ApiResponseFor200) | List of tracks +403 | [ApiResponseFor403](#list_score_tracks.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#list_score_tracks.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#list_score_tracks.ApiResponseForDefault) | Error + +#### list_score_tracks.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | [**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | [**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | | + +#### list_score_tracks.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### list_score_tracks.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### list_score_tracks.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **mark_score_comment_resolved** + +> mark_score_comment_resolved(scorecomment) + +Mark the comment as resolved + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + } + try: + # Mark the comment as resolved + api_response = api_instance.mark_score_comment_resolved( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Mark the comment as resolved + api_response = api_instance.mark_score_comment_resolved( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +comment | CommentSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#mark_score_comment_resolved.ApiResponseFor204) | The comment has been marked as resolved +403 | [ApiResponseFor403](#mark_score_comment_resolved.ApiResponseFor403) | Not granted to mark this comment as resolved +404 | [ApiResponseFor404](#mark_score_comment_resolved.ApiResponseFor404) | Score or comment not found +default | [ApiResponseForDefault](#mark_score_comment_resolved.ApiResponseForDefault) | Error + +#### mark_score_comment_resolved.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### mark_score_comment_resolved.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### mark_score_comment_resolved.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### mark_score_comment_resolved.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **mark_score_comment_unresolved** + +> mark_score_comment_unresolved(scorecomment) + +Mark the comment as unresolved + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + } + try: + # Mark the comment as unresolved + api_response = api_instance.mark_score_comment_unresolved( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + try: + # Mark the comment as unresolved + api_response = api_instance.mark_score_comment_unresolved( + path_params=path_params, + query_params=query_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +comment | CommentSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#mark_score_comment_unresolved.ApiResponseFor204) | The comment has been unmarked as resolved +403 | [ApiResponseFor403](#mark_score_comment_unresolved.ApiResponseFor403) | Not granted to unmark this comment as resolved +404 | [ApiResponseFor404](#mark_score_comment_unresolved.ApiResponseFor404) | Score or comment not found +default | [ApiResponseForDefault](#mark_score_comment_unresolved.ApiResponseForDefault) | Error + +#### mark_score_comment_unresolved.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### mark_score_comment_unresolved.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### mark_score_comment_unresolved.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### mark_score_comment_unresolved.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **post_score_comment** + +> ScoreComment post_score_comment(scorebody) + +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`. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + query_params = { + } + body = ScoreCommentCreation( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + mentions=[ + "mentions_example" + ], + reply_to="reply_to_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example" + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) + try: + # Post a new comment + api_response = api_instance.post_score_comment( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + body = ScoreCommentCreation( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + mentions=[ + "mentions_example" + ], + reply_to="reply_to_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example" + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) + try: + # Post a new comment + api_response = api_instance.post_score_comment( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreCommentCreation**](../../models/ScoreCommentCreation.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#post_score_comment.ApiResponseFor200) | The new comment +402 | [ApiResponseFor402](#post_score_comment.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#post_score_comment.ApiResponseFor403) | Not granted to access to this score, to post a comment, or your API call triggered our spam filter. +404 | [ApiResponseFor404](#post_score_comment.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#post_score_comment.ApiResponseForDefault) | Error + +#### post_score_comment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreComment**](../../models/ScoreComment.md) | | + + +#### post_score_comment.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### post_score_comment.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### post_score_comment.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### post_score_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **remove_score_collaborator** + +> remove_score_collaborator(scorecollaborator) + +Delete a collaborator + +Remove the specified collaborator from the score + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'collaborator': "collaborator_example", + } + try: + # Delete a collaborator + api_response = api_instance.remove_score_collaborator( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +collaborator | CollaboratorSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CollaboratorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#remove_score_collaborator.ApiResponseFor204) | The collaborator has been removed +403 | [ApiResponseFor403](#remove_score_collaborator.ApiResponseFor403) | Not granted to manage this score +404 | [ApiResponseFor404](#remove_score_collaborator.ApiResponseFor404) | Score or collaborator not found +default | [ApiResponseForDefault](#remove_score_collaborator.ApiResponseForDefault) | Error + +#### remove_score_collaborator.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### remove_score_collaborator.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### remove_score_collaborator.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### remove_score_collaborator.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **untrash_score** + +> untrash_score(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. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + } + try: + # Untrash a score + api_response = api_instance.untrash_score( + path_params=path_params, + ) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->untrash_score: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +204 | [ApiResponseFor204](#untrash_score.ApiResponseFor204) | The score has been untrashed +403 | [ApiResponseFor403](#untrash_score.ApiResponseFor403) | Not granted to manage this score +404 | [ApiResponseFor404](#untrash_score.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#untrash_score.ApiResponseForDefault) | Error + +#### untrash_score.ApiResponseFor204 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### untrash_score.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### untrash_score.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### untrash_score.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_score_comment** + +> ScoreComment update_score_comment(scorecommentbody) + +Update an existing comment + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_comment_update import ScoreCommentUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + } + body = ScoreCommentUpdate( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example" + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) + try: + # Update an existing comment + api_response = api_instance.update_score_comment( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) + + # example passing only optional values + path_params = { + 'score': "score_example", + 'comment': "comment_example", + } + query_params = { + 'sharingKey': "sharingKey_example", + } + body = ScoreCommentUpdate( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example" + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) + try: + # Update an existing comment + api_response = api_instance.update_score_comment( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreCommentUpdate**](../../models/ScoreCommentUpdate.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +sharingKey | SharingKeySchema | | optional + + +# SharingKeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +comment | CommentSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# CommentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_score_comment.ApiResponseFor200) | The edited comment +402 | [ApiResponseFor402](#update_score_comment.ApiResponseFor402) | Account overquota +403 | [ApiResponseFor403](#update_score_comment.ApiResponseFor403) | Not granted to access to this score or not the original comment creator +404 | [ApiResponseFor404](#update_score_comment.ApiResponseFor404) | Score not found +default | [ApiResponseForDefault](#update_score_comment.ApiResponseForDefault) | Error + +#### update_score_comment.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreComment**](../../models/ScoreComment.md) | | + + +#### update_score_comment.ApiResponseFor402 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor402ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_score_comment.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_score_comment.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_score_comment.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_score_track** + +> ScoreTrack update_score_track(scoretrackbody) + +Update an audio or video track linked to a score + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_update import ScoreTrackUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'score': "score_example", + 'track': "track_example", + } + body = ScoreTrackUpdate( + title="title_example", + default=True, + state=ScoreTrackState("draft"), + synchronization_points=[ + ScoreTrackPoint( + type="measure", + measure_uuid="measure_uuid_example", + time=3.14, + ) + ], + ) + try: + # Update an audio or video track linked to a score + api_response = api_instance.update_score_track( + path_params=path_params, + body=body, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_track: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreTrackUpdate**](../../models/ScoreTrackUpdate.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +score | ScoreSchema | | +track | TrackSchema | | + +# ScoreSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# TrackSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_score_track.ApiResponseFor200) | Updated track +403 | [ApiResponseFor403](#update_score_track.ApiResponseFor403) | Not granted to access to this score +404 | [ApiResponseFor404](#update_score_track.ApiResponseFor404) | Score or Track not found +default | [ApiResponseForDefault](#update_score_track.ApiResponseForDefault) | Error + +#### update_score_track.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ScoreTrack**](../../models/ScoreTrack.md) | | + + +#### update_score_track.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_score_track.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +#### update_score_track.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/TaskApi.md b/docs/apis/tags/TaskApi.md new file mode 100644 index 0000000..0212dd1 --- /dev/null +++ b/docs/apis/tags/TaskApi.md @@ -0,0 +1,124 @@ + +# flat_api.apis.tags.task_api.TaskApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_task**](#get_task) | **get** /tasks/{task} | Get a task details + +# **get_task** + +> Task get_task(task) + +Get a task details + +This method can be used to follow a task progression, for example while a score is being exported. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import task_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = task_api.TaskApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'task': "task_example", + } + try: + # Get a task details + api_response = api_instance.get_task( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling TaskApi->get_task: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +task | TaskSchema | | + +# TaskSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_task.ApiResponseFor200) | Task details +default | [ApiResponseForDefault](#get_task.ApiResponseForDefault) | Error + +#### get_task.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Task**](../../models/Task.md) | | + + +#### get_task.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/apis/tags/UserApi.md b/docs/apis/tags/UserApi.md new file mode 100644 index 0000000..f7242c9 --- /dev/null +++ b/docs/apis/tags/UserApi.md @@ -0,0 +1,438 @@ + +# flat_api.apis.tags.user_api.UserApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ger_user_likes**](#ger_user_likes) | **get** /users/{user}/likes | List liked scores +[**get_user**](#get_user) | **get** /users/{user} | Get a public user profile +[**get_user_scores**](#get_user_scores) | **get** /users/{user}/scores | List user's scores + +# **ger_user_likes** + +> [ScoreDetails] ger_user_likes(user) + +List liked scores + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import user_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + query_params = { + } + try: + # List liked scores + api_response = api_instance.ger_user_likes( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->ger_user_likes: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + query_params = { + 'ids': True, + } + try: + # List liked scores + api_response = api_instance.ger_user_likes( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->ger_user_likes: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +ids | IdsSchema | | optional + + +# IdsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#ger_user_likes.ApiResponseFor200) | List of liked scores +default | [ApiResponseForDefault](#ger_user_likes.ApiResponseForDefault) | Error + +#### ger_user_likes.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### ger_user_likes.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_user** + +> UserPublic get_user(user) + +Get a public user profile + +Get a profile of a Flat or Flat for Education User. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import user_api +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + try: + # Get a public user profile + api_response = api_instance.get_user( + path_params=path_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_user.ApiResponseFor200) | The user public details +default | [ApiResponseForDefault](#get_user.ApiResponseForDefault) | Error + +#### get_user.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**UserPublic**](../../models/UserPublic.md) | | + + +#### get_user.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_user_scores** + +> [ScoreDetails] get_user_scores(user) + +List user's scores + +Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + +### Example + +* OAuth Authentication (OAuth2): +```python +import flat_api +from flat_api.apis.tags import user_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'user': "user_example", + } + query_params = { + } + try: + # List user's scores + api_response = api_instance.get_user_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user_scores: %s\n" % e) + + # example passing only optional values + path_params = { + 'user': "user_example", + } + query_params = { + 'parent': "parent_example", + } + try: + # List user's scores + api_response = api_instance.get_user_scores( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user_scores: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +parent | ParentSchema | | optional + + +# ParentSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +user | UserSchema | | + +# UserSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_user_scores.ApiResponseFor200) | The user scores +default | [ApiResponseForDefault](#get_user_scores.ApiResponseForDefault) | Error + +#### get_user_scores.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | + +#### get_user_scores.ApiResponseForDefault +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor0ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | + + +### Authorization + +[OAuth2](../../../README.md#OAuth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/models/ApiAccessToken.md b/docs/models/ApiAccessToken.md new file mode 100644 index 0000000..4b6dbd7 --- /dev/null +++ b/docs/models/ApiAccessToken.md @@ -0,0 +1,36 @@ +# flat_api.model.api_access_token.ApiAccessToken + +An API access token + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | An API access token | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of this private token | [optional] +**name** | str, | str, | Name of the personal access token | [optional] +**token** | str, | str, | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] +**issuedDate** | str, datetime, | str, | The date then this token was issued | [optional] value must conform to RFC-3339 date-time +**expirationDate** | str, datetime, | str, | The date then this token will expire | [optional] value must conform to RFC-3339 date-time +**[scopes](#scopes)** | list, tuple, | tuple, | The list of scopes associated to the token | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# scopes + +The list of scopes associated to the token + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of scopes associated to the token | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AppScopes.md b/docs/models/AppScopes.md new file mode 100644 index 0000000..28aa6c2 --- /dev/null +++ b/docs/models/AppScopes.md @@ -0,0 +1,11 @@ +# flat_api.model.app_scopes.AppScopes + +Available scopes + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Available scopes | must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/Assignment.md b/docs/models/Assignment.md new file mode 100644 index 0000000..b1e9f5b --- /dev/null +++ b/docs/models/Assignment.md @@ -0,0 +1,77 @@ +# flat_api.model.assignment.Assignment + +Assignment details + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Assignment details | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[attachments](#attachments)** | list, tuple, | tuple, | | +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | +**id** | str, | str, | Unique identifier of the assignment | +**title** | str, | str, | Title of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | +**description** | str, | str, | Description and content of the assignment | [optional] +**cover** | str, | str, | The URL of the cover to display | [optional] +**coverFile** | str, | str, | The id of the cover to display | [optional] +**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**toolset** | str, | str, | The id of the associated toolset | [optional] +**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# capabilities + +Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | +**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | +**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | +**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | +**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | str, | str, | A corresponding code for this error | +**message** | str, | str, | A printable and localized message for this error | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentCopy.md b/docs/models/AssignmentCopy.md new file mode 100644 index 0000000..955fe86 --- /dev/null +++ b/docs/models/AssignmentCopy.md @@ -0,0 +1,18 @@ +# flat_api.model.assignment_copy.AssignmentCopy + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**classroom** | str, | str, | The destination classroom where the assignment will be copied | [optional] +**assignment** | str, | str, | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**scheduledDate** | str, datetime, | str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] value must conform to RFC-3339 date-time +**libraryParent** | str, | str, | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentCopyResponse.md b/docs/models/AssignmentCopyResponse.md new file mode 100644 index 0000000..3f5a084 --- /dev/null +++ b/docs/models/AssignmentCopyResponse.md @@ -0,0 +1,76 @@ +# flat_api.model.assignment_copy_response.AssignmentCopyResponse + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] +**title** | str, | str, | Title of the assignment | [optional] +**description** | str, | str, | Description and content of the assignment | [optional] +**cover** | str, | str, | The URL of the cover to display | [optional] +**coverFile** | str, | str, | The id of the cover to display | [optional] +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**toolset** | str, | str, | The id of the associated toolset | [optional] +**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**resource** | str, | str, | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# capabilities + +Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | +**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | +**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | +**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | +**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | str, | str, | A corresponding code for this error | +**message** | str, | str, | A printable and localized message for this error | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmission.md b/docs/models/AssignmentSubmission.md new file mode 100644 index 0000000..cad6b11 --- /dev/null +++ b/docs/models/AssignmentSubmission.md @@ -0,0 +1,58 @@ +# flat_api.model.assignment_submission.AssignmentSubmission + +Assignment Submission + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Submission | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**creator** | str, | str, | The User identifier of the student who created the submission | +**[attachments](#attachments)** | list, tuple, | tuple, | | +**assignment** | str, | str, | Unique identifier of the assignment | +**classroom** | str, | str, | Unique identifier of the classroom where the assignment was posted | +**id** | str, | str, | Unique identifier of the submission | +**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | +**creationDate** | str, | str, | The date when the submission was created | [optional] +**submissionDate** | str, | str, | The date when the student submitted their work | [optional] +**returnDate** | str, | str, | The date when the teacher returned the work | [optional] +**returnCreator** | str, | str, | The User unique identifier of the teacher who returned the submission | [optional] +**grade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. | [optional] +**draftGrade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] +**[exercisesIds](#exercisesIds)** | list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | [optional] +**googleClassroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] +**microsoftGraph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | + +# exercisesIds + +The ids of exercises when they need to be in a specific order + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionComment.md b/docs/models/AssignmentSubmissionComment.md new file mode 100644 index 0000000..7856e56 --- /dev/null +++ b/docs/models/AssignmentSubmissionComment.md @@ -0,0 +1,23 @@ +# flat_api.model.assignment_submission_comment.AssignmentSubmissionComment + +Feedback comment added to an assignment submission + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Feedback comment added to an assignment submission | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The comment unique identifier | [optional] +**user** | str, | str, | The author unique identifier | [optional] +**submission** | str, | str, | The submission unique identifier | [optional] +**date** | str, datetime, | str, | The date when the comment was posted | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The date of the last comment modification | [optional] value must conform to RFC-3339 date-time +**comment** | str, | str, | The comment text | [optional] +**unread** | bool, | BoolClass, | True if the comment is unread by the current user | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionCommentCreation.md b/docs/models/AssignmentSubmissionCommentCreation.md new file mode 100644 index 0000000..392e87e --- /dev/null +++ b/docs/models/AssignmentSubmissionCommentCreation.md @@ -0,0 +1,17 @@ +# flat_api.model.assignment_submission_comment_creation.AssignmentSubmissionCommentCreation + +Creation of a assignment submission comment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a assignment submission comment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**comment** | str, | str, | The comment text | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionHistory.md b/docs/models/AssignmentSubmissionHistory.md new file mode 100644 index 0000000..27db4b1 --- /dev/null +++ b/docs/models/AssignmentSubmissionHistory.md @@ -0,0 +1,55 @@ +# flat_api.model.assignment_submission_history.AssignmentSubmissionHistory + +History item of the submission + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | History item of the submission | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**date** | str, datetime, | str, | The date when the submission was changed | [optional] value must conform to RFC-3339 date-time +**[users](#users)** | list, tuple, | tuple, | The user(s) unique identifier(s) who made the change | [optional] +**source** | str, | str, | The source of the change if the change was made by a third-party software | [optional] must be one of ["lti", "googleClassroom", "microsoftGraph", ] +**state** | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | | [optional] +**draftGrade** | decimal.Decimal, int, float, | decimal.Decimal, | The numerator of the grade at this time in the submission grade history | [optional] +**grade** | decimal.Decimal, int, float, | decimal.Decimal, | The numerator of the grade at this time in the submission grade history | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | The denominator of the grade at this time in the submission grade history | [optional] +**comment** | str, | str, | The comment that is made to this submission | [optional] +**dueDate** | str, datetime, | str, | The due date of this assignment | [optional] value must conform to RFC-3339 date-time +**[attachment](#attachment)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# users + +The user(s) unique identifier(s) who made the change + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The user(s) unique identifier(s) who made the change | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# attachment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**score** | str, | str, | The score identifier that changed | [optional] +**revision** | str, | str, | The revision identifier that changed | [optional] +**title** | str, | str, | The title of the score that changed | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionHistoryState.md b/docs/models/AssignmentSubmissionHistoryState.md new file mode 100644 index 0000000..43a302f --- /dev/null +++ b/docs/models/AssignmentSubmissionHistoryState.md @@ -0,0 +1,11 @@ +# flat_api.model.assignment_submission_history_state.AssignmentSubmissionHistoryState + +State of the submission history + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | State of the submission history | must be one of ["created", "turnedIn", "returned", "reset", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionState.md b/docs/models/AssignmentSubmissionState.md new file mode 100644 index 0000000..098f2fc --- /dev/null +++ b/docs/models/AssignmentSubmissionState.md @@ -0,0 +1,11 @@ +# flat_api.model.assignment_submission_state.AssignmentSubmissionState + +State of the submission + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | State of the submission | must be one of ["created", "turnedIn", "returned", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentSubmissionUpdate.md b/docs/models/AssignmentSubmissionUpdate.md new file mode 100644 index 0000000..9da6e8e --- /dev/null +++ b/docs/models/AssignmentSubmissionUpdate.md @@ -0,0 +1,63 @@ +# flat_api.model.assignment_submission_update.AssignmentSubmissionUpdate + +Assignment Submission creation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Submission creation | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**submit** | bool, | BoolClass, | If `true`, the submission will be marked as done | [optional] +**draftGrade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**grade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. | [optional] +**[exercisesIds](#exercisesIds)** | list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | [optional] +**return** | bool, | BoolClass, | If `true`, the submission will be marked as done | [optional] +**[comments](#comments)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | + +# exercisesIds + +The ids of exercises when they need to be in a specific order + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# comments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of comments added to the submission | [optional] +**unread** | decimal.Decimal, int, float, | decimal.Decimal, | The number of unread comments for the current user | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentType.md b/docs/models/AssignmentType.md new file mode 100644 index 0000000..1159207 --- /dev/null +++ b/docs/models/AssignmentType.md @@ -0,0 +1,11 @@ +# flat_api.model.assignment_type.AssignmentType + +Type of the assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Type of the assignment | must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/AssignmentUpdate.md b/docs/models/AssignmentUpdate.md new file mode 100644 index 0000000..2f3719f --- /dev/null +++ b/docs/models/AssignmentUpdate.md @@ -0,0 +1,39 @@ +# flat_api.model.assignment_update.AssignmentUpdate + +Assignment Resource Editing + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Resource Editing | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | str, | str, | Title of the assignment | [optional] +**description** | str, | str, | Description and content of the assignment | [optional] +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**nbPlaybackAuthorized** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | None, str, | NoneClass, str, | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**coverFile** | None, str, | NoneClass, str, | The id of the cover to display | [optional] +**cover** | None, str, | NoneClass, str, | The URL of the cover to display | [optional] +**maxPoints** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassAssignment.md b/docs/models/ClassAssignment.md new file mode 100644 index 0000000..2324c91 --- /dev/null +++ b/docs/models/ClassAssignment.md @@ -0,0 +1,163 @@ +# flat_api.model.class_assignment.ClassAssignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] +**title** | str, | str, | Title of the assignment | [optional] +**description** | str, | str, | Description and content of the assignment | [optional] +**cover** | str, | str, | The URL of the cover to display | [optional] +**coverFile** | str, | str, | The id of the cover to display | [optional] +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**toolset** | str, | str, | The id of the associated toolset | [optional] +**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**creator** | str, | str, | The User unique identifier of the creator of this assignment | [optional] +**state** | str, | str, | State of the assignment | [optional] must be one of ["draft", "active", "archived", ] +**classroom** | str, | str, | The unique identifier of the class where this assignment was posted | [optional] +**creationDate** | str, datetime, | str, | The creation date of this assignment | [optional] value must conform to RFC-3339 date-time +**scheduledDate** | str, datetime, | str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] value must conform to RFC-3339 date-time +**dueDate** | str, datetime, | str, | The due date of this assignment, late submissions will be marked as paste due. | [optional] value must conform to RFC-3339 date-time +**assigneeMode** | str, | str, | Possible modes of assigning assignments | [optional] must be one of ["everyone", "selected", ] +**[assignedStudents](#assignedStudents)** | list, tuple, | tuple, | Identifiers for the students that have access to the assignment | [optional] +**[submissions](#submissions)** | list, tuple, | tuple, | | [optional] +**googleClassroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] +**microsoftGraph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] +**[mfc](#mfc)** | dict, frozendict.frozendict, | frozendict.frozendict, | A MusicFirst Classroom assignment | [optional] +**[canvas](#canvas)** | dict, frozendict.frozendict, | frozendict.frozendict, | A Canvas LMS assignment | [optional] +**[lti](#lti)** | dict, frozendict.frozendict, | frozendict.frozendict, | An LTI assignment | [optional] +**issue** | str, | str, | Detected issue for this assignment | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# capabilities + +Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | +**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | +**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | +**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | +**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | str, | str, | A corresponding code for this error | +**message** | str, | str, | A printable and localized message for this error | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | + +# assignedStudents + +Identifiers for the students that have access to the assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Identifiers for the students that have access to the assignment | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# submissions + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AssignmentSubmission**](AssignmentSubmission.md) | [**AssignmentSubmission**](AssignmentSubmission.md) | [**AssignmentSubmission**](AssignmentSubmission.md) | | + +# mfc + +A MusicFirst Classroom assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A MusicFirst Classroom assignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the course on MusicFirst Task | [optional] +**alternateLink** | str, | str, | Link to MusicFirst Classroom task | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canvas + +A Canvas LMS assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A Canvas LMS assignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the course on Canvas assignment | [optional] +**alternateLink** | str, | str, | Link to Canvas assignment | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# lti + +An LTI assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | An LTI assignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Resource ID in the LMS | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassAssignmentUpdate.md b/docs/models/ClassAssignmentUpdate.md new file mode 100644 index 0000000..24537cc --- /dev/null +++ b/docs/models/ClassAssignmentUpdate.md @@ -0,0 +1,102 @@ +# flat_api.model.class_assignment_update.ClassAssignmentUpdate + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | str, | str, | Title of the assignment | [optional] +**description** | str, | str, | Description and content of the assignment | [optional] +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**nbPlaybackAuthorized** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | None, str, | NoneClass, str, | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**coverFile** | None, str, | NoneClass, str, | The id of the cover to display | [optional] +**cover** | None, str, | NoneClass, str, | The URL of the cover to display | [optional] +**maxPoints** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**state** | str, | str, | State of the assignment | [optional] must be one of ["draft", "active", ] +**dueDate** | None, str, datetime, | NoneClass, str, | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] value must conform to RFC-3339 date-time +**scheduledDate** | None, str, datetime, | NoneClass, str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] value must conform to RFC-3339 date-time +**[googleClassroom](#googleClassroom)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom options for this assignment | [optional] +**[microsoftGraph](#microsoftGraph)** | dict, frozendict.frozendict, | frozendict.frozendict, | Microsoft Graph options for this assignment | [optional] +**assigneeMode** | str, | str, | Possible modes of assigning assignments | [optional] must be one of ["everyone", "selected", ] +**[assignedStudents](#assignedStudents)** | list, tuple, | tuple, | Identifiers for the students that have access to the assignment | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | + +# googleClassroom + +Google Classroom options for this assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom options for this assignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**topicId** | None, str, | NoneClass, str, | Identifier of the topic where the assignment is created | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# microsoftGraph + +Microsoft Graph options for this assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Microsoft Graph options for this assignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[categories](#categories)** | list, tuple, None, | tuple, NoneClass, | List of categories this assignment belongs to | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# categories + +List of categories this assignment belongs to + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, None, | tuple, NoneClass, | List of categories this assignment belongs to | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# assignedStudents + +Identifiers for the students that have access to the assignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Identifiers for the students that have access to the assignment | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassAttachmentCreation.md b/docs/models/ClassAttachmentCreation.md new file mode 100644 index 0000000..9aceaa9 --- /dev/null +++ b/docs/models/ClassAttachmentCreation.md @@ -0,0 +1,23 @@ +# flat_api.model.class_attachment_creation.ClassAttachmentCreation + +Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**type** | str, | str, | The type of the attachment posted: * `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] must be one of ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance", ] +**score** | str, | str, | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] +**worksheet** | str, | str, | An unique worksheet identifier | [optional] +**sharingMode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lockScoreTemplate** | bool, | BoolClass, | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] +**url** | str, | str, | The URL of the attachment. | [optional] +**googleDriveFileId** | str, | str, | The ID of the Google Drive File | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassCreation.md b/docs/models/ClassCreation.md new file mode 100644 index 0000000..4a699aa --- /dev/null +++ b/docs/models/ClassCreation.md @@ -0,0 +1,21 @@ +# flat_api.model.class_creation.ClassCreation + +Creation of a classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**name** | str, | str, | The name of the new class | +**section** | str, | str, | The section of the new class | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassDetails.md b/docs/models/ClassDetails.md new file mode 100644 index 0000000..6dc35ed --- /dev/null +++ b/docs/models/ClassDetails.md @@ -0,0 +1,201 @@ +# flat_api.model.class_details.ClassDetails + +A classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the class | [optional] +**state** | [**ClassState**](ClassState.md) | [**ClassState**](ClassState.md) | | [optional] +**name** | str, | str, | The name of the class | [optional] +**section** | str, | str, | The section of the class | [optional] +**description** | str, | str, | An optionnal description for this class | [optional] +**organization** | str, | str, | The unique identifier of the Organization owning this class | [optional] +**owner** | str, | str, | The unique identifier of the User owning this class | [optional] +**creationDate** | str, datetime, | str, | The date when the class was create | [optional] value must conform to RFC-3339 date-time +**enrollmentCode** | str, | str, | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] +**theme** | str, | str, | The theme identifier using in Flat User Interface | [optional] +**assignmentsCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of assignments created in the class | [optional] +**studentsGroup** | [**GroupDetails**](GroupDetails.md) | [**GroupDetails**](GroupDetails.md) | | [optional] +**teachersGroup** | [**GroupDetails**](GroupDetails.md) | [**GroupDetails**](GroupDetails.md) | | [optional] +**[issues](#issues)** | dict, frozendict.frozendict, | frozendict.frozendict, | Detected issues for this class | [optional] +**[googleClassroom](#googleClassroom)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom course-related information | [optional] +**[googleDrive](#googleDrive)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Drive course-related information provided by Google Classroom | [optional] +**[microsoftGraph](#microsoftGraph)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] +**[lti](#lti)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by the LTI consumer | [optional] +**[canvas](#canvas)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | [optional] +**[mfc](#mfc)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | [optional] +**[clever](#clever)** | dict, frozendict.frozendict, | frozendict.frozendict, | Clever.com section-related information | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# issues + +Detected issues for this class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Detected issues for this class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[sync](#sync)** | list, tuple, | tuple, | Synchronization issues for the class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# sync + +Synchronization issues for the class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Synchronization issues for the class | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | A sync issue | + +# items + +A sync issue + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A sync issue | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The account user identifier | [optional] +**email** | str, | str, | The email address of the user concerned by this sync issue | [optional] +**reason** | str, | str, | The reason why the account cannot be synced | [optional] must be one of ["otherOrgnanization", "personalSubscription", ] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# googleClassroom + +Google Classroom course-related information + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom course-related information | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The course identifier on Google Classroom | [optional] +**alternateLink** | str, | str, | Absolute link to this course in the Classroom web UI | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# googleDrive + +Google Drive course-related information provided by Google Classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Google Drive course-related information provided by Google Classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**teacherFolderId** | str, | str, | [Teachers only] The Drive directory identifier of the teachers' folder | [optional] +**teacherFolderAlternateLink** | str, | str, | [Teachers only] The Drive URL of the teachers' folder | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# microsoftGraph + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The course identifier on Microsoft Graph | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# lti + +Meta information provided by the LTI consumer + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by the LTI consumer | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**contextId** | str, | str, | Unique context identifier provided | [optional] +**contextTitle** | str, | str, | Context title | [optional] +**contextLabel** | str, | str, | Context label | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canvas + +Meta information provided by Canvs LMS + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the course on Canvas | [optional] +**domain** | str, | str, | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# mfc + +Meta information provided by Canvs LMS + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the course on MusicFirst Classroom | [optional] +**alternateLink** | str, | str, | Link to MusicFirst Classroom class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# clever + +Clever.com section-related information + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Clever.com section-related information | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Clever section unique identifier | [optional] +**creationDate** | str, datetime, | str, | The creation date of the section on clever | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The last modification date of the section on clever | [optional] value must conform to RFC-3339 date-time +**subject** | str, | str, | Normalized subject of the course | [optional] must be one of ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other", ] +**termName** | str, | str, | Name of the term when this course happens | [optional] +**termStartDate** | str, datetime, | str, | Beginning date of the term | [optional] value must conform to RFC-3339 date-time +**termEndDate** | str, datetime, | str, | End date of the term | [optional] value must conform to RFC-3339 date-time +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassGradeLevel.md b/docs/models/ClassGradeLevel.md new file mode 100644 index 0000000..866e1de --- /dev/null +++ b/docs/models/ClassGradeLevel.md @@ -0,0 +1,11 @@ +# flat_api.model.class_grade_level.ClassGradeLevel + +Class grade level + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Class grade level | must be one of ["elementary", "middle", "high", "university", "other", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassRoles.md b/docs/models/ClassRoles.md new file mode 100644 index 0000000..34201d5 --- /dev/null +++ b/docs/models/ClassRoles.md @@ -0,0 +1,11 @@ +# flat_api.model.class_roles.ClassRoles + +User's Class Role (for Edu users only) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | User's Class Role (for Edu users only) | must be one of ["teacher", "student", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassState.md b/docs/models/ClassState.md new file mode 100644 index 0000000..037e1a7 --- /dev/null +++ b/docs/models/ClassState.md @@ -0,0 +1,11 @@ +# flat_api.model.class_state.ClassState + +The state of a classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The state of a classroom | must be one of ["active", "inactive", "archived", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ClassUpdate.md b/docs/models/ClassUpdate.md new file mode 100644 index 0000000..ad8cbbc --- /dev/null +++ b/docs/models/ClassUpdate.md @@ -0,0 +1,21 @@ +# flat_api.model.class_update.ClassUpdate + +Update of a classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Update of a classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**name** | str, | str, | The name of the class | [optional] +**section** | str, | str, | The section of the class | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/Collection.md b/docs/models/Collection.md new file mode 100644 index 0000000..68874fd --- /dev/null +++ b/docs/models/Collection.md @@ -0,0 +1,76 @@ +# flat_api.model.collection.Collection + +Collection of scores + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Collection of scores | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the collection | [optional] +**title** | str, | str, | The title of the collection | [optional] +**htmlUrl** | str, | str, | The url where the collection can be viewed in a web browser | [optional] +**type** | [**CollectionType**](CollectionType.md) | [**CollectionType**](CollectionType.md) | | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**sharingKey** | str, | str, | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] +**app** | [**CollectionApp**](CollectionApp.md) | [**CollectionApp**](CollectionApp.md) | | [optional] +**creationDate** | str, datetime, | str, | The date when the collection was created | [optional] value must conform to RFC-3339 date-time +**user** | [**UserPublicSummary**](UserPublicSummary.md) | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**rights** | [**ResourceRights**](ResourceRights.md) | [**ResourceRights**](ResourceRights.md) | | [optional] +**[collaborators](#collaborators)** | list, tuple, | tuple, | The list of the collaborators of the collection | [optional] +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. | [optional] +**[collections](#collections)** | list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# collaborators + +The list of the collaborators of the collection + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of the collaborators of the collection | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | | + +# capabilities + +Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canEdit** | bool, | BoolClass, | Whether the current user can modify the metadata for the collection | [optional] +**canShare** | bool, | BoolClass, | Whether the current user can modify the sharing settings for the collection | [optional] +**canDelete** | bool, | BoolClass, | Whether the current user can delete the collection | [optional] +**canAddScores** | bool, | BoolClass, | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] +**canDeleteScores** | bool, | BoolClass, | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# collections + +The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/CollectionApp.md b/docs/models/CollectionApp.md new file mode 100644 index 0000000..c3be3f0 --- /dev/null +++ b/docs/models/CollectionApp.md @@ -0,0 +1,19 @@ +# flat_api.model.collection_app.CollectionApp + +For App collections, the details of the app that created the collection + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | For App collections, the details of the app that created the collection | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The app unique identifier | [optional] +**name** | str, | str, | The name of the app | [optional] +**logo** | str, | str, | The app logo url | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/CollectionCreation.md b/docs/models/CollectionCreation.md new file mode 100644 index 0000000..8939057 --- /dev/null +++ b/docs/models/CollectionCreation.md @@ -0,0 +1,16 @@ +# flat_api.model.collection_creation.CollectionCreation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | +**title** | str, | str, | The title of the collection | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/CollectionModification.md b/docs/models/CollectionModification.md new file mode 100644 index 0000000..41fd240 --- /dev/null +++ b/docs/models/CollectionModification.md @@ -0,0 +1,18 @@ +# flat_api.model.collection_modification.CollectionModification + +Edit the collection metadata + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Edit the collection metadata | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | The title of the collection | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/CollectionPrivacy.md b/docs/models/CollectionPrivacy.md new file mode 100644 index 0000000..ffc6057 --- /dev/null +++ b/docs/models/CollectionPrivacy.md @@ -0,0 +1,11 @@ +# flat_api.model.collection_privacy.CollectionPrivacy + +The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. | must be one of ["private", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/CollectionType.md b/docs/models/CollectionType.md new file mode 100644 index 0000000..6224689 --- /dev/null +++ b/docs/models/CollectionType.md @@ -0,0 +1,11 @@ +# flat_api.model.collection_type.CollectionType + +Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. | must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduLibrary.md b/docs/models/EduLibrary.md new file mode 100644 index 0000000..05dbf93 --- /dev/null +++ b/docs/models/EduLibrary.md @@ -0,0 +1,20 @@ +# flat_api.model.edu_library.EduLibrary + +A Flat for Education Library + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A Flat for Education Library | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | [optional] +**name** | str, | str, | Name of the lirbary | [optional] +**type** | str, | str, | Type of the library | [optional] must be one of ["myResources", "flatEduSamples", ] +**visibility** | str, | str, | Visibility of the library | [optional] must be one of ["private", "organization", "public", ] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResource.md b/docs/models/EduResource.md new file mode 100644 index 0000000..82e2cd3 --- /dev/null +++ b/docs/models/EduResource.md @@ -0,0 +1,131 @@ +# flat_api.model.edu_resource.EduResource + +A Flat for Education resource contained in a resources library + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A Flat for Education resource contained in a resources library | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities available for this resource | +**id** | str, | str, | Resource unique identifier | +**title** | str, | str, | Title of the resource | +**type** | [**EduResourceType**](EduResourceType.md) | [**EduResourceType**](EduResourceType.md) | | +**creator** | str, | str, | The User identifier of the resource creator | [optional] +**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] +**[tags](#tags)** | list, tuple, | tuple, | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] +**parent** | str, | str, | Identifier of the parent resource, e.g. a folder or root | [optional] +**creationDate** | str, datetime, | str, | The date when the resource was created | [optional] value must conform to RFC-3339 date-time +**updateDate** | str, datetime, | str, | The date when the resource was updated | [optional] value must conform to RFC-3339 date-time +**[resource](#resource)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# capabilities + +Capabilities available for this resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities available for this resource | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canEdit** | bool, | BoolClass, | Whether the current user can modify this resource | [optional] +**canAddResources** | bool, | BoolClass, | Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) | [optional] +**canAddFolders** | bool, | BoolClass, | Whether the current user can add folders within this resource (e.g. `folder` inside `root`) | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# tags + +Specific attributes for the resource (e.g. sample resources with custom design) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Specific attributes for the resource (e.g. sample resources with custom design) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] +**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] +**title** | str, | str, | Title of the folder | [optional] +**description** | str, | str, | Description and content of the assignment | [optional] +**cover** | str, | str, | The URL of the cover to display | [optional] +**coverFile** | str, | str, | The id of the cover to display | [optional] +**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] +**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] +**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] +**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] +**toolset** | str, | str, | The id of the associated toolset | [optional] +**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# capabilities + +Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | +**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | +**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | +**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | +**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# canPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | str, | str, | A corresponding code for this error | +**message** | str, | str, | A printable and localized message for this error | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# attachments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceCopy.md b/docs/models/EduResourceCopy.md new file mode 100644 index 0000000..4069e35 --- /dev/null +++ b/docs/models/EduResourceCopy.md @@ -0,0 +1,17 @@ +# flat_api.model.edu_resource_copy.EduResourceCopy + +Copy an education resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Copy an education resource | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**destination** | str, | str, | Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceCreation.md b/docs/models/EduResourceCreation.md new file mode 100644 index 0000000..22003fc --- /dev/null +++ b/docs/models/EduResourceCreation.md @@ -0,0 +1,19 @@ +# flat_api.model.edu_resource_creation.EduResourceCreation + +Creation of an education resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of an education resource | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | Title of the resource | +**type** | [**EduResourceType**](EduResourceType.md) | [**EduResourceType**](EduResourceType.md) | | +**parent** | str, | str, | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] if omitted the server will use the default value of "root" +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceMove.md b/docs/models/EduResourceMove.md new file mode 100644 index 0000000..8cc8883 --- /dev/null +++ b/docs/models/EduResourceMove.md @@ -0,0 +1,17 @@ +# flat_api.model.edu_resource_move.EduResourceMove + +Move an education resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Move an education resource | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**destination** | str, | str, | Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourcePrivacy.md b/docs/models/EduResourcePrivacy.md new file mode 100644 index 0000000..1a0ae1d --- /dev/null +++ b/docs/models/EduResourcePrivacy.md @@ -0,0 +1,11 @@ +# flat_api.model.edu_resource_privacy.EduResourcePrivacy + +The Education resource privacy mode. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The Education resource privacy mode. | must be one of ["private", "public", ] if omitted the server will use the default value of "private" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceType.md b/docs/models/EduResourceType.md new file mode 100644 index 0000000..7f65028 --- /dev/null +++ b/docs/models/EduResourceType.md @@ -0,0 +1,11 @@ +# flat_api.model.edu_resource_type.EduResourceType + +Type of an education resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Type of an education resource | must be one of ["assignment", "folder", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceUpdate.md b/docs/models/EduResourceUpdate.md new file mode 100644 index 0000000..1de2a63 --- /dev/null +++ b/docs/models/EduResourceUpdate.md @@ -0,0 +1,17 @@ +# flat_api.model.edu_resource_update.EduResourceUpdate + +Update of an education resource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Update of an education resource | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | Title of the resource | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduResourceUseInClass.md b/docs/models/EduResourceUseInClass.md new file mode 100644 index 0000000..2b6252f --- /dev/null +++ b/docs/models/EduResourceUseInClass.md @@ -0,0 +1,18 @@ +# flat_api.model.edu_resource_use_in_class.EduResourceUseInClass + +Use an education resource in class + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Use an education resource in class | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**classroom** | str, | str, | The destination classroom where the resource will be copied. | +**assignment** | str, | str, | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/EduSkillsFocused.md b/docs/models/EduSkillsFocused.md new file mode 100644 index 0000000..191d588 --- /dev/null +++ b/docs/models/EduSkillsFocused.md @@ -0,0 +1,16 @@ +# flat_api.model.edu_skills_focused.EduSkillsFocused + +Specific skills that will be focused in classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Specific skills that will be focused in classroom | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | must be one of ["notation", "sight-reading", "performance-instrumental", "ear-training", "music-theory", "composition", "jazz-ensemble", "music-technology", "other", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/FlatErrorResponse.md b/docs/models/FlatErrorResponse.md new file mode 100644 index 0000000..fa3dd80 --- /dev/null +++ b/docs/models/FlatErrorResponse.md @@ -0,0 +1,20 @@ +# flat_api.model.flat_error_response.FlatErrorResponse + +An API Error response + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | An API Error response | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | str, | str, | A corresponding code for this error | +**message** | str, | str, | A printable message for this error | +**id** | str, | str, | An unique error identifier generated for the request | [optional] +**param** | str, | str, | The related parameter that caused the error | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/FlatLocales.md b/docs/models/FlatLocales.md new file mode 100644 index 0000000..040d899 --- /dev/null +++ b/docs/models/FlatLocales.md @@ -0,0 +1,11 @@ +# flat_api.model.flat_locales.FlatLocales + +The user language + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The user language | must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] if omitted the server will use the default value of "en" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/GoogleClassroomCoursework.md b/docs/models/GoogleClassroomCoursework.md new file mode 100644 index 0000000..fbfaf32 --- /dev/null +++ b/docs/models/GoogleClassroomCoursework.md @@ -0,0 +1,20 @@ +# flat_api.model.google_classroom_coursework.GoogleClassroomCoursework + +A coursework on Google Classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A coursework on Google Classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Identifier of the coursework assigned by Classroom | [optional] +**state** | str, | str, | State of the coursework | [optional] +**alternateLink** | str, | str, | Absolute link to this coursework in the Classroom web UI | [optional] +**topicId** | None, str, | NoneClass, str, | Identifier of the topic where the assignment is created | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/GoogleClassroomSubmission.md b/docs/models/GoogleClassroomSubmission.md new file mode 100644 index 0000000..4db8750 --- /dev/null +++ b/docs/models/GoogleClassroomSubmission.md @@ -0,0 +1,19 @@ +# flat_api.model.google_classroom_submission.GoogleClassroomSubmission + +A coursework submission on Google Classroom + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A coursework submission on Google Classroom | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Identifier of the coursework submission assigned by Classroom | [optional] +**state** | str, | str, | State of the submission on Google Classroom | [optional] +**alternateLink** | str, | str, | Absolute link to this coursework in the Classroom web UI | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/Group.md b/docs/models/Group.md new file mode 100644 index 0000000..8ebc007 --- /dev/null +++ b/docs/models/Group.md @@ -0,0 +1,23 @@ +# flat_api.model.group.Group + +A group of users + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A group of users | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the group | [optional] +**name** | str, | str, | The display name of the group | [optional] +**type** | str, | str, | The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class | [optional] must be one of ["generic", "classTeachers", "classStudents", ] +**usersCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of users in this group | [optional] +**readOnly** | bool, | BoolClass, | `True` if the group is set in read-only | [optional] +**organization** | str, | str, | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] +**creationDate** | str, datetime, | str, | The creation date of the group | [optional] value must conform to RFC-3339 date-time +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/GroupDetails.md b/docs/models/GroupDetails.md new file mode 100644 index 0000000..ec43fbe --- /dev/null +++ b/docs/models/GroupDetails.md @@ -0,0 +1,23 @@ +# flat_api.model.group_details.GroupDetails + +The details of a group + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | The details of a group | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the group | [optional] +**name** | str, | str, | The displayable name of the group | [optional] +**type** | [**GroupType**](GroupType.md) | [**GroupType**](GroupType.md) | | [optional] +**organization** | str, | str, | The unique identifier of the Organization owning the group | [optional] +**creationDate** | str, datetime, | str, | The date when the group was create | [optional] value must conform to RFC-3339 date-time +**usersCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of students in this group | [optional] +**readOnly** | bool, | BoolClass, | `true` if the properties and members of this group are in in read-only | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/GroupType.md b/docs/models/GroupType.md new file mode 100644 index 0000000..3bcc976 --- /dev/null +++ b/docs/models/GroupType.md @@ -0,0 +1,11 @@ +# flat_api.model.group_type.GroupType + +The type of the group + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The type of the group | must be one of ["generic", "classTeachers", "classStudents", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/LicenseMode.md b/docs/models/LicenseMode.md new file mode 100644 index 0000000..2d20051 --- /dev/null +++ b/docs/models/LicenseMode.md @@ -0,0 +1,11 @@ +# flat_api.model.license_mode.LicenseMode + +Mode of the license + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Mode of the license | must be one of ["credit", "site", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/LicenseSources.md b/docs/models/LicenseSources.md new file mode 100644 index 0000000..8198990 --- /dev/null +++ b/docs/models/LicenseSources.md @@ -0,0 +1,11 @@ +# flat_api.model.license_sources.LicenseSources + +Source of the license + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | Source of the license | must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] if omitted the server will use the default value of "order" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/LmsName.md b/docs/models/LmsName.md new file mode 100644 index 0000000..1831660 --- /dev/null +++ b/docs/models/LmsName.md @@ -0,0 +1,11 @@ +# flat_api.model.lms_name.LmsName + +LMS name + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | LMS name | must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/LtiCredentials.md b/docs/models/LtiCredentials.md new file mode 100644 index 0000000..d540070 --- /dev/null +++ b/docs/models/LtiCredentials.md @@ -0,0 +1,25 @@ +# flat_api.model.lti_credentials.LtiCredentials + +A couple of LTI 1.x OAuth credentials + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A couple of LTI 1.x OAuth credentials | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of this couple of credentials | [optional] +**name** | str, | str, | Name of the couple of credentials | [optional] +**lms** | [**LmsName**](LmsName.md) | [**LmsName**](LmsName.md) | | [optional] +**organization** | str, | str, | The unique identifier of the Organization associated to these credentials | [optional] +**creator** | str, | str, | Unique identifier of the user who created these credentials | [optional] +**creationDate** | str, datetime, | str, | The creation date of thse credentials | [optional] value must conform to RFC-3339 date-time +**lastUsage** | str, datetime, | str, | The last time these credentials were used | [optional] value must conform to RFC-3339 date-time +**consumerKey** | str, | str, | OAuth 1 Consumer Key | [optional] +**consumerSecret** | str, | str, | OAuth 1 Consumer Secret | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/LtiCredentialsCreation.md b/docs/models/LtiCredentialsCreation.md new file mode 100644 index 0000000..9e9256a --- /dev/null +++ b/docs/models/LtiCredentialsCreation.md @@ -0,0 +1,18 @@ +# flat_api.model.lti_credentials_creation.LtiCredentialsCreation + +Creation of a couple of LTI 1.x OAuth credentials + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a couple of LTI 1.x OAuth credentials | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**lms** | [**LmsName**](LmsName.md) | [**LmsName**](LmsName.md) | | +**name** | str, | str, | Name of the couple of credentials | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/MediaAttachment.md b/docs/models/MediaAttachment.md new file mode 100644 index 0000000..bcb662e --- /dev/null +++ b/docs/models/MediaAttachment.md @@ -0,0 +1,38 @@ +# flat_api.model.media_attachment.MediaAttachment + +Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**type** | str, | str, | The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | must be one of ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance", ] +**score** | str, | str, | An unique Flat score identifier | [optional] +**revision** | str, | str, | An unique revision identifier of a score | [optional] +**worksheet** | str, | str, | An unique worksheet identifier | [optional] +**dedicated** | bool, | BoolClass, | True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment | [optional] +**track** | str, | str, | A unique track identifier | [optional] +**sharingMode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lockScoreTemplate** | bool, | BoolClass, | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] +**title** | str, | str, | The resolved title of the attachment | [optional] +**description** | str, | str, | The resolved description of the attachment | [optional] +**html** | str, | str, | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] +**htmlWidth** | str, | str, | If the `html` is available, the width of the widget | [optional] +**htmlHeight** | str, | str, | If the `html` is available, the height of the widget | [optional] +**url** | str, | str, | The url of the attachment | [optional] +**thumbnailUrl** | str, | str, | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] +**thumbnailWidth** | decimal.Decimal, int, | decimal.Decimal, | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**thumbnailHeight** | decimal.Decimal, int, | decimal.Decimal, | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**authorName** | str, | str, | The resolved author name of the attachment | [optional] +**authorUrl** | str, | str, | The resolved author url of the attachment | [optional] +**iconUrl** | str, | str, | The URL of the icon | [optional] +**mimeType** | str, | str, | The mine type of the file | [optional] +**googleDriveFileId** | str, | str, | The ID of the Google Drive File | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/MediaScoreSharingMode.md b/docs/models/MediaScoreSharingMode.md new file mode 100644 index 0000000..f4ffd6c --- /dev/null +++ b/docs/models/MediaScoreSharingMode.md @@ -0,0 +1,11 @@ +# flat_api.model.media_score_sharing_mode.MediaScoreSharingMode + +The sharing mode of the score for classes post and assignments + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The sharing mode of the score for classes post and assignments | must be one of ["read", "write", "copy", "performance", ] if omitted the server will use the default value of "read" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/MicrosoftGraphAssignment.md b/docs/models/MicrosoftGraphAssignment.md new file mode 100644 index 0000000..b0b3219 --- /dev/null +++ b/docs/models/MicrosoftGraphAssignment.md @@ -0,0 +1,34 @@ +# flat_api.model.microsoft_graph_assignment.MicrosoftGraphAssignment + +A Microsoft Teams asignment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A Microsoft Teams asignment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Identifier of the assignement assigned by Microsoft Teams | [optional] +**state** | str, | str, | State of the assignment | [optional] +**alternateLink** | str, | str, | Absolute link to this assignement in the Microsoft Teams web UI | [optional] +**[categories](#categories)** | list, tuple, | tuple, | List of categories where this assignment is published under | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# categories + +List of categories where this assignment is published under + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of categories where this assignment is published under | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | A Microsoft Teams assignment category ID | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/MicrosoftGraphSubmission.md b/docs/models/MicrosoftGraphSubmission.md new file mode 100644 index 0000000..9d2a066 --- /dev/null +++ b/docs/models/MicrosoftGraphSubmission.md @@ -0,0 +1,19 @@ +# flat_api.model.microsoft_graph_submission.MicrosoftGraphSubmission + +A Microsoft Teams submission + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A Microsoft Teams submission | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Identifier of the submission assigned by Microsoft Teams | [optional] +**state** | str, | str, | State of the submission | [optional] +**alternateLink** | str, | str, | Absolute link to this submission in the Microsoft Teams web UI | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/OrganizationInvitation.md b/docs/models/OrganizationInvitation.md new file mode 100644 index 0000000..a154032 --- /dev/null +++ b/docs/models/OrganizationInvitation.md @@ -0,0 +1,23 @@ +# flat_api.model.organization_invitation.OrganizationInvitation + +Details of an invitation to join an organization + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Details of an invitation to join an organization | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The invitation unique identifier | [optional] +**organization** | str, | str, | The unique identifier of the Organization owning this class | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**customCode** | str, | str, | Enrollment code to use when joining this organization | [optional] +**email** | str, | str, | The email address this invitation was sent to | [optional] +**invitedBy** | str, | str, | The unique identifier of the User who created this invitation | [optional] +**usedBy** | str, | str, | The unique identifier of the User who used this invitation | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/OrganizationInvitationCreation.md b/docs/models/OrganizationInvitationCreation.md new file mode 100644 index 0000000..8d7d312 --- /dev/null +++ b/docs/models/OrganizationInvitationCreation.md @@ -0,0 +1,18 @@ +# flat_api.model.organization_invitation_creation.OrganizationInvitationCreation + +The parameters to create an organization invitation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | The parameters to create an organization invitation | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**email** | str, | str, | The email address you want to send the invitation to | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/OrganizationRoles.md b/docs/models/OrganizationRoles.md new file mode 100644 index 0000000..251b4ec --- /dev/null +++ b/docs/models/OrganizationRoles.md @@ -0,0 +1,11 @@ +# flat_api.model.organization_roles.OrganizationRoles + +User's Organization Role (for Edu users only) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | User's Organization Role (for Edu users only) | must be one of ["admin", "billing", "teacher", "user", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/OrganizationUserAccessTokenCreation.md b/docs/models/OrganizationUserAccessTokenCreation.md new file mode 100644 index 0000000..9a322a8 --- /dev/null +++ b/docs/models/OrganizationUserAccessTokenCreation.md @@ -0,0 +1,31 @@ +# flat_api.model.organization_user_access_token_creation.OrganizationUserAccessTokenCreation + +Creation of a delegated API access token for an organization user + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a delegated API access token for an organization user | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[scopes](#scopes)** | list, tuple, | tuple, | List of requested scopes for this credential | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# scopes + +List of requested scopes for this credential + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of requested scopes for this credential | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ResourceCollaborator.md b/docs/models/ResourceCollaborator.md new file mode 100644 index 0000000..5c6d662 --- /dev/null +++ b/docs/models/ResourceCollaborator.md @@ -0,0 +1,25 @@ +# flat_api.model.resource_collaborator.ResourceCollaborator + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**aclRead** | bool, | BoolClass, | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False +**aclWrite** | bool, | BoolClass, | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**aclAdmin** | bool, | BoolClass, | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**isCollaborator** | bool, | BoolClass, | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False +**id** | str, | str, | The unique identifier of the permission | [optional] +**score** | str, | str, | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] +**collection** | str, | str, | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] +**user** | [**UserPublic**](UserPublic.md) | [**UserPublic**](UserPublic.md) | | [optional] +**group** | [**Group**](Group.md) | [**Group**](Group.md) | | [optional] +**userEmail** | str, | str, | If the collaborator is not a user of Flat yet, this field will contain their email. | [optional] +**invited** | bool, | BoolClass, | If this property is `true`, this is still a pending invitation | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ResourceCollaboratorCreation.md b/docs/models/ResourceCollaboratorCreation.md new file mode 100644 index 0000000..e821bb5 --- /dev/null +++ b/docs/models/ResourceCollaboratorCreation.md @@ -0,0 +1,23 @@ +# flat_api.model.resource_collaborator_creation.ResourceCollaboratorCreation + +Add a collaborator to a resource. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Add a collaborator to a resource. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**user** | str, | str, | The unique identifier of a Flat user | [optional] +**group** | str, | str, | The unique identifier of a Flat group | [optional] +**userEmail** | str, | str, | Fill this field to invite an individual user by email. | [optional] +**userToken** | str, | str, | Token received in an invitation to join the score. | [optional] +**aclRead** | bool, | BoolClass, | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] if omitted the server will use the default value of True +**aclWrite** | bool, | BoolClass, | `True` if the related user can modify the score. | [optional] if omitted the server will use the default value of False +**aclAdmin** | bool, | BoolClass, | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] if omitted the server will use the default value of False +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ResourceRights.md b/docs/models/ResourceRights.md new file mode 100644 index 0000000..9cdbcb2 --- /dev/null +++ b/docs/models/ResourceRights.md @@ -0,0 +1,20 @@ +# flat_api.model.resource_rights.ResourceRights + +The rights of the current user on a score or collection + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | The rights of the current user on a score or collection | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**aclRead** | bool, | BoolClass, | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False +**aclWrite** | bool, | BoolClass, | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**aclAdmin** | bool, | BoolClass, | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**isCollaborator** | bool, | BoolClass, | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreComment.md b/docs/models/ScoreComment.md new file mode 100644 index 0000000..6172cda --- /dev/null +++ b/docs/models/ScoreComment.md @@ -0,0 +1,62 @@ +# flat_api.model.score_comment.ScoreComment + +Comment added on a sheet music + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Comment added on a sheet music | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The comment unique identifier | [optional] +**type** | str, | str, | The type of the comment | [optional] must be one of ["document", "inline", ] +**user** | str, | str, | The author unique identifier | [optional] +**score** | str, | str, | The unique identifier of the score where the comment was posted | [optional] +**revision** | str, | str, | The unique identifier of revision the comment was posted | [optional] +**replyTo** | str, | str, | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] +**date** | str, datetime, | str, | The date when the comment was posted | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The date of the last comment modification | [optional] value must conform to RFC-3339 date-time +**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] +**rawComment** | str, | str, | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**[mentions](#mentions)** | list, tuple, | tuple, | The list of user identifier mentioned on the score | [optional] +**resolved** | bool, | BoolClass, | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] +**resolvedBy** | str, | str, | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] +**[moderation](#moderation)** | dict, frozendict.frozendict, | frozendict.frozendict, | Information about the comment being moderated | [optional] +**spam** | bool, | BoolClass, | `true if the message has been detected as spam and hidden from other users | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# mentions + +The list of user identifier mentioned on the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of user identifier mentioned on the score | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# moderation + +Information about the comment being moderated + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Information about the comment being moderated | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**hidden** | bool, | BoolClass, | If true, this comment will be hidden from other users | [optional] +**reason** | str, | str, | If the comment is hidden, the reason why this one has been moderated | [optional] must be one of ["spam", "inappropriate", ] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCommentContext.md b/docs/models/ScoreCommentContext.md new file mode 100644 index 0000000..0afc524 --- /dev/null +++ b/docs/models/ScoreCommentContext.md @@ -0,0 +1,38 @@ +# flat_api.model.score_comment_context.ScoreCommentContext + +The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[measureUuids](#measureUuids)** | list, tuple, | tuple, | The list of measure UUIds | +**partUuid** | str, | str, | The unique identifier (UUID) of the score part | +**stopDpq** | decimal.Decimal, int, float, | decimal.Decimal, | | +**startTimePos** | decimal.Decimal, int, float, | decimal.Decimal, | | +**startDpq** | decimal.Decimal, int, float, | decimal.Decimal, | | +**stopTimePos** | decimal.Decimal, int, float, | decimal.Decimal, | | +**staffIdx** | decimal.Decimal, int, float, | decimal.Decimal, | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] +**staffUuid** | str, | str, | The unique identififer (UUID) of the staff | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# measureUuids + +The list of measure UUIds + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of measure UUIds | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCommentCreation.md b/docs/models/ScoreCommentCreation.md new file mode 100644 index 0000000..94e3b2b --- /dev/null +++ b/docs/models/ScoreCommentCreation.md @@ -0,0 +1,36 @@ +# flat_api.model.score_comment_creation.ScoreCommentCreation + +Creation of a comment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a comment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | +**revision** | str, | str, | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**rawComment** | str, | str, | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] +**[mentions](#mentions)** | list, tuple, | tuple, | The list of user identifiers mentioned in this comment | [optional] +**replyTo** | str, | str, | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# mentions + +The list of user identifiers mentioned in this comment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of user identifiers mentioned in this comment | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCommentUpdate.md b/docs/models/ScoreCommentUpdate.md new file mode 100644 index 0000000..a1c7eb5 --- /dev/null +++ b/docs/models/ScoreCommentUpdate.md @@ -0,0 +1,20 @@ +# flat_api.model.score_comment_update.ScoreCommentUpdate + +Update of a comment + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Update of a comment | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**revision** | str, | str, | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] +**rawComment** | str, | str, | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCommentsCounts.md b/docs/models/ScoreCommentsCounts.md new file mode 100644 index 0000000..dffb02d --- /dev/null +++ b/docs/models/ScoreCommentsCounts.md @@ -0,0 +1,20 @@ +# flat_api.model.score_comments_counts.ScoreCommentsCounts + +A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of comments added to the score | [optional] +**unique** | decimal.Decimal, int, float, | decimal.Decimal, | The unique (1/user) number of comments added to the score | [optional] +**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly unique number of comments added to the score | [optional] +**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly unique number of comments added to the score | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCreation.md b/docs/models/ScoreCreation.md new file mode 100644 index 0000000..6158acd --- /dev/null +++ b/docs/models/ScoreCreation.md @@ -0,0 +1,108 @@ +# flat_api.model.score_creation.ScoreCreation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**collection** | str, | str, | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] +**googleDriveFolder** | str, | str, | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**[builderData](#builderData)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] +**filename** | str, | str, | If this is an imported file, its filename | [optional] +**data** | str, | str, | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] +**dataEncoding** | str, | str, | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] must be one of ["base64", ] +**source** | [**ScoreSource**](ScoreSource.md) | [**ScoreSource**](ScoreSource.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# builderData + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[scoreData](#scoreData)** | dict, frozendict.frozendict, | frozendict.frozendict, | | +**[layoutData](#layoutData)** | dict, frozendict.frozendict, | frozendict.frozendict, | Control the appearance of the score. If missing, default values are used. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# scoreData + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[instruments](#instruments)** | list, tuple, | tuple, | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | +**useTabStaff** | bool, | BoolClass, | true if the TAB staff is displayed with fretted instruments | [optional] +**useChordGrid** | bool, | BoolClass, | true if the chord grid must be displayed with fretted instruments | [optional] +**fifths** | decimal.Decimal, int, float, | decimal.Decimal, | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] +**nbBeats** | decimal.Decimal, int, float, | decimal.Decimal, | The number of beats in the measure | [optional] +**beatType** | decimal.Decimal, int, float, | decimal.Decimal, | The duration of a beat in the measure | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# instruments + +The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | + +# items + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**instrument** | str, | str, | The identifier of the instrument (e.g. `piano`, `trumpet`) | +**group** | str, | str, | The of the instrument group (e.g. `keyboards`, `brass`) | +**longName** | str, | str, | The full name of the instrument | [optional] +**shortName** | str, | str, | The abbreviation of the name of the instrument | [optional] +**hasQuarterTone** | bool, | BoolClass, | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# layoutData + +Control the appearance of the score. If missing, default values are used. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Control the appearance of the score. If missing, default values are used. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**notesSpacingCoeff** | decimal.Decimal, int, float, | decimal.Decimal, | A float value >= 1 that controls the spacing between notes. | [optional] +**lengthUnit** | str, | str, | The unit to use for layout customizations | [optional] must be one of ["cm", "inch", ] if omitted the server will use the default value of "cm" +**pageHeight** | decimal.Decimal, int, float, | decimal.Decimal, | The height of the page in chosen unit (`lengthUnit`). | [optional] +**pageWidth** | decimal.Decimal, int, float, | decimal.Decimal, | The width of the page in chosen unit (`lengthUnit`). | [optional] +**pageMarginTop** | decimal.Decimal, int, float, | decimal.Decimal, | The top margin of the page in chosen unit (`lengthUnit`). | [optional] +**pageMarginBottom** | decimal.Decimal, int, float, | decimal.Decimal, | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] +**pageMarginLeft** | decimal.Decimal, int, float, | decimal.Decimal, | The left margin of the page in chosen unit (`lengthUnit`). | [optional] +**pageMarginRight** | decimal.Decimal, int, float, | decimal.Decimal, | The right margin of the page in chosen unit (`lengthUnit`). | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreCreationType.md b/docs/models/ScoreCreationType.md new file mode 100644 index 0000000..b4df61d --- /dev/null +++ b/docs/models/ScoreCreationType.md @@ -0,0 +1,11 @@ +# flat_api.model.score_creation_type.ScoreCreationType + +The type of creation (an orginal, an arrangement) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The type of creation (an orginal, an arrangement) | must be one of ["original", "arrangement", "other", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreDetails.md b/docs/models/ScoreDetails.md new file mode 100644 index 0000000..c4b1a6a --- /dev/null +++ b/docs/models/ScoreDetails.md @@ -0,0 +1,117 @@ +# flat_api.model.score_details.ScoreDetails + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the score | [optional] +**sharingKey** | str, | str, | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] +**title** | str, | str, | The title of the score | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**user** | [**UserPublicSummary**](UserPublicSummary.md) | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**htmlUrl** | str, | str, | The url where the score can be viewed in a web browser | [optional] +**subtitle** | str, | str, | Subtitle of the score | [optional] +**lyricist** | str, | str, | Lyricist of the score | [optional] +**arranger** | str, | str, | Arranger of the score | [optional] +**composer** | str, | str, | Composer of the score | [optional] +**description** | str, | str, | Description of the creation | [optional] +**[tags](#tags)** | list, tuple, | tuple, | Tags describing the score | [optional] +**creationType** | [**ScoreCreationType**](ScoreCreationType.md) | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**license** | [**ScoreLicense**](ScoreLicense.md) | [**ScoreLicense**](ScoreLicense.md) | | [optional] +**licenseText** | str, | str, | Additional license text written on the exported/printed score | [optional] +**durationTime** | decimal.Decimal, int, float, | decimal.Decimal, | In seconds, an approximative duration of the score | [optional] +**numberMeasures** | decimal.Decimal, int, | decimal.Decimal, | The number of measures in the score | [optional] +**mainTempoQpm** | decimal.Decimal, int, float, | decimal.Decimal, | The main tempo of the score (in QPM) | [optional] +**rights** | [**ResourceRights**](ResourceRights.md) | [**ResourceRights**](ResourceRights.md) | | [optional] +**[collaborators](#collaborators)** | list, tuple, | tuple, | The list of the collaborators of the score | [optional] +**creationDate** | str, datetime, | str, | The date when the score was created | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The date of the last revision of the score | [optional] value must conform to RFC-3339 date-time +**publicationDate** | str, datetime, | str, | The date when the score was published on Flat | [optional] value must conform to RFC-3339 date-time +**organization** | str, | str, | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] +**parentScore** | str, | str, | If the score has been forked, the unique identifier of the parent score. | [optional] +**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**[samples](#samples)** | list, tuple, | tuple, | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] +**googleDriveFileId** | str, | str, | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] +**likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] +**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] +**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] +**plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] +**[collections](#collections)** | list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# tags + +Tags describing the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Tags describing the score | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# collaborators + +The list of the collaborators of the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The list of the collaborators of the score | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | | + +# instruments + +An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# samples + +An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# collections + +The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreFork.md b/docs/models/ScoreFork.md new file mode 100644 index 0000000..b891f5d --- /dev/null +++ b/docs/models/ScoreFork.md @@ -0,0 +1,18 @@ +# flat_api.model.score_fork.ScoreFork + +Options to fork the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Options to fork the score | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**collection** | None, str, | NoneClass, str, | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] if omitted the server will use the default value of "root" +**keepOriginalTitle** | bool, | BoolClass, | Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreLicense.md b/docs/models/ScoreLicense.md new file mode 100644 index 0000000..b2c6ac1 --- /dev/null +++ b/docs/models/ScoreLicense.md @@ -0,0 +1,11 @@ +# flat_api.model.score_license.ScoreLicense + +License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ | must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreLikesCounts.md b/docs/models/ScoreLikesCounts.md new file mode 100644 index 0000000..a5cf6d9 --- /dev/null +++ b/docs/models/ScoreLikesCounts.md @@ -0,0 +1,19 @@ +# flat_api.model.score_likes_counts.ScoreLikesCounts + +A computed version of the weekly, monthly and total of number of likes for a score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the weekly, monthly and total of number of likes for a score | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of likes of the score | [optional] +**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The number of new likes during the last week | [optional] +**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The number of new likes during the last month | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreModification.md b/docs/models/ScoreModification.md new file mode 100644 index 0000000..0aa29fd --- /dev/null +++ b/docs/models/ScoreModification.md @@ -0,0 +1,42 @@ +# flat_api.model.score_modification.ScoreModification + +Edit the score metadata + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Edit the score metadata | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | The title of the score | [optional] +**subtitle** | str, | str, | The subtitle of the score | [optional] +**composer** | str, | str, | The composer of the score | [optional] +**lyricist** | str, | str, | The lyricist of the score | [optional] +**arranger** | str, | str, | The arranger of the score | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**sharingKey** | str, | str, | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] +**description** | str, | str, | Description of the creation | [optional] +**[tags](#tags)** | list, tuple, | tuple, | Tags describing the score | [optional] +**creationType** | [**ScoreCreationType**](ScoreCreationType.md) | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**license** | [**ScoreLicense**](ScoreLicense.md) | [**ScoreLicense**](ScoreLicense.md) | | [optional] +**licenseText** | str, | str, | The rights info written on the score | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# tags + +Tags describing the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Tags describing the score | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScorePlaysCounts.md b/docs/models/ScorePlaysCounts.md new file mode 100644 index 0000000..3a65f19 --- /dev/null +++ b/docs/models/ScorePlaysCounts.md @@ -0,0 +1,19 @@ +# flat_api.model.score_plays_counts.ScorePlaysCounts + +A computed version of the total, weekly, and monthly number of plays of the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, weekly, and monthly number of plays of the score | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of plays of the score | [optional] +**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly number of plays of the score | [optional] +**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly number of plays of the score | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScorePrivacy.md b/docs/models/ScorePrivacy.md new file mode 100644 index 0000000..579a125 --- /dev/null +++ b/docs/models/ScorePrivacy.md @@ -0,0 +1,11 @@ +# flat_api.model.score_privacy.ScorePrivacy + +The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). | must be one of ["public", "private", "organizationPublic", "privateLink", ] if omitted the server will use the default value of "private" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreRevision.md b/docs/models/ScoreRevision.md new file mode 100644 index 0000000..e0317cb --- /dev/null +++ b/docs/models/ScoreRevision.md @@ -0,0 +1,36 @@ +# flat_api.model.score_revision.ScoreRevision + +A score revision metadata + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A score revision metadata | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the revision. | [optional] +**user** | str, | str, | The user identifier who created the revision | [optional] +**[collaborators](#collaborators)** | list, tuple, | tuple, | | [optional] +**creationDate** | str, datetime, | str, | The date when this revision was created | [optional] value must conform to RFC-3339 date-time +**event** | str, | str, | The last event (action id) of the revision | [optional] +**description** | str, | str, | A description associated to the revision | [optional] +**autosave** | bool, | BoolClass, | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] +**statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# collaborators + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | The list of user identifier or collaborators who worked on this revision. This is list is built from the history of the revision specified during the creation of the revision. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreRevisionCreation.md b/docs/models/ScoreRevisionCreation.md new file mode 100644 index 0000000..2ce91e5 --- /dev/null +++ b/docs/models/ScoreRevisionCreation.md @@ -0,0 +1,20 @@ +# flat_api.model.score_revision_creation.ScoreRevisionCreation + +A new created revision + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A new created revision | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**data** | str, | str, | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | +**dataEncoding** | str, | str, | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] must be one of ["base64", ] +**autosave** | bool, | BoolClass, | Must be set to `true` if the revision was created automatically. | [optional] +**description** | str, | str, | A description associated to the revision | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreRevisionStatistics.md b/docs/models/ScoreRevisionStatistics.md new file mode 100644 index 0000000..fbfcdc9 --- /dev/null +++ b/docs/models/ScoreRevisionStatistics.md @@ -0,0 +1,20 @@ +# flat_api.model.score_revision_statistics.ScoreRevisionStatistics + +The statistics related to the score revision (additions and deletions) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | The statistics related to the score revision (additions and deletions) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**additions** | decimal.Decimal, int, float, | decimal.Decimal, | The number of additions operations in the last revision | [optional] +**deletions** | decimal.Decimal, int, float, | decimal.Decimal, | The number of deletions operations in the last revision | [optional] +**startDate** | str, datetime, | str, | The date of the first action included in this revision | [optional] value must conform to RFC-3339 date-time +**endDate** | str, datetime, | str, | The date of the latest action included in this revision | [optional] value must conform to RFC-3339 date-time +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreSource.md b/docs/models/ScoreSource.md new file mode 100644 index 0000000..1491166 --- /dev/null +++ b/docs/models/ScoreSource.md @@ -0,0 +1,15 @@ +# flat_api.model.score_source.ScoreSource + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**googleDrive** | str, | str, | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrack.md b/docs/models/ScoreTrack.md new file mode 100644 index 0000000..06ccb57 --- /dev/null +++ b/docs/models/ScoreTrack.md @@ -0,0 +1,40 @@ +# flat_api.model.score_track.ScoreTrack + +An audio track for a score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | An audio track for a score | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The unique identifier of the score track | [optional] +**title** | str, | str, | Title of the track | [optional] +**score** | str, | str, | The unique identifier of the score | [optional] +**creator** | str, | str, | The unique identifier of the track creator | [optional] +**creationDate** | str, datetime, | str, | The creation date of the track | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The modification date of the track | [optional] value must conform to RFC-3339 date-time +**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**type** | [**ScoreTrackType**](ScoreTrackType.md) | [**ScoreTrackType**](ScoreTrackType.md) | | [optional] +**url** | str, | str, | The URL of the track | [optional] +**mediaId** | str, | str, | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] +**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# synchronizationPoints + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrackCreation.md b/docs/models/ScoreTrackCreation.md new file mode 100644 index 0000000..adbc34d --- /dev/null +++ b/docs/models/ScoreTrackCreation.md @@ -0,0 +1,33 @@ +# flat_api.model.score_track_creation.ScoreTrackCreation + +Creation of a new track. This one must contain the URL of the track or the corresponding file + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a new track. This one must contain the URL of the track or the corresponding file | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | Title of the track | [optional] +**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**url** | str, | str, | The URL of the track | [optional] +**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# synchronizationPoints + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrackPoint.md b/docs/models/ScoreTrackPoint.md new file mode 100644 index 0000000..9e2e020 --- /dev/null +++ b/docs/models/ScoreTrackPoint.md @@ -0,0 +1,19 @@ +# flat_api.model.score_track_point.ScoreTrackPoint + +A track synchronization point + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A track synchronization point | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**time** | decimal.Decimal, int, float, | decimal.Decimal, | The corresponding time in seconds | +**type** | str, | str, | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | must be one of ["measure", "end", ] +**measureUuid** | str, uuid.UUID, | str, | The measure unique identifier | [optional] value must be a uuid +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrackState.md b/docs/models/ScoreTrackState.md new file mode 100644 index 0000000..56e43b2 --- /dev/null +++ b/docs/models/ScoreTrackState.md @@ -0,0 +1,11 @@ +# flat_api.model.score_track_state.ScoreTrackState + +State of the track + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | State of the track | must be one of ["draft", "completed", "deleted", ] if omitted the server will use the default value of "draft" + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrackType.md b/docs/models/ScoreTrackType.md new file mode 100644 index 0000000..7ce08d8 --- /dev/null +++ b/docs/models/ScoreTrackType.md @@ -0,0 +1,11 @@ +# flat_api.model.score_track_type.ScoreTrackType + +The type of an audio track + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | The type of an audio track | must be one of ["audio", "soundcloud", "youtube", "vimeo", ] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreTrackUpdate.md b/docs/models/ScoreTrackUpdate.md new file mode 100644 index 0000000..bffbb87 --- /dev/null +++ b/docs/models/ScoreTrackUpdate.md @@ -0,0 +1,32 @@ +# flat_api.model.score_track_update.ScoreTrackUpdate + +Update an existing track. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Update an existing track. | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**title** | str, | str, | Title of the track | [optional] +**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# synchronizationPoints + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ScoreViewsCounts.md b/docs/models/ScoreViewsCounts.md new file mode 100644 index 0000000..449b75b --- /dev/null +++ b/docs/models/ScoreViewsCounts.md @@ -0,0 +1,19 @@ +# flat_api.model.score_views_counts.ScoreViewsCounts + +A computed version of the total, weekly, and monthly number of views of the score + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, weekly, and monthly number of views of the score | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of views of the score | [optional] +**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly number of views of the score | [optional] +**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly number of views of the score | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/Task.md b/docs/models/Task.md new file mode 100644 index 0000000..a1ac7fe --- /dev/null +++ b/docs/models/Task.md @@ -0,0 +1,73 @@ +# flat_api.model.task.Task + +An asynchronous task + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | An asynchronous task | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Unique identifier of the task | [optional] +**type** | str, | str, | Type of the task (e.g. audio-export) | [optional] +**state** | str, | str, | State of the Task | [optional] must be one of ["created", "doing", "done", "canceled", "error", ] +**format** | str, | str, | For files processing, the file format (e.g. `mp3`, `wav`) | [optional] +**score** | str, | str, | The score unique identifier for tasks related to scores | [optional] +**[progress](#progress)** | dict, frozendict.frozendict, | frozendict.frozendict, | Details about the task progression | [optional] +**creationDate** | str, datetime, | str, | The creation date of the task | [optional] value must conform to RFC-3339 date-time +**modificationDate** | str, datetime, | str, | The last modification date of the task | [optional] value must conform to RFC-3339 date-time +**doneDate** | str, datetime, | str, | The date when the task has been completed | [optional] value must conform to RFC-3339 date-time +**[result](#result)** | dict, frozendict.frozendict, | frozendict.frozendict, | Optional result information about this task | [optional] +**[errorHistory](#errorHistory)** | list, tuple, | tuple, | If any errors happened when processing this task, the list of errors identifiers | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# progress + +Details about the task progression + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Details about the task progression | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**percent** | decimal.Decimal, int, float, | decimal.Decimal, | Percent of the task progression | [optional] +**text** | str, | str, | Text details of the task progress | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# result + +Optional result information about this task + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Optional result information about this task | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**url** | str, | str, | URL returned by the task worker | [optional] +**error** | str, | str, | Error returned by task worker | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# errorHistory + +If any errors happened when processing this task, the list of errors identifiers + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | If any errors happened when processing this task, the list of errors identifiers | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/TaskExportOptions.md b/docs/models/TaskExportOptions.md new file mode 100644 index 0000000..8ad7fa1 --- /dev/null +++ b/docs/models/TaskExportOptions.md @@ -0,0 +1,31 @@ +# flat_api.model.task_export_options.TaskExportOptions + +Options for the requested export + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Options for the requested export | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[parts](#parts)** | list, tuple, | tuple, | A list of parts to specifically export | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# parts + +A list of parts to specifically export + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | A list of parts to specifically export | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserAdminUpdate.md b/docs/models/UserAdminUpdate.md new file mode 100644 index 0000000..502c94e --- /dev/null +++ b/docs/models/UserAdminUpdate.md @@ -0,0 +1,22 @@ +# flat_api.model.user_admin_update.UserAdminUpdate + +User update as an organization admin + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | User update as an organization admin | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**password** | str, | str, | Password of the account | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**username** | str, | str, | Username of the account | [optional] +**firstname** | str, | str, | First name of the user | [optional] +**lastname** | str, | str, | Last name of the user | [optional] +**email** | str, | str, | Email of the account | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserAzureDetails.md b/docs/models/UserAzureDetails.md new file mode 100644 index 0000000..90f4668 --- /dev/null +++ b/docs/models/UserAzureDetails.md @@ -0,0 +1,17 @@ +# flat_api.model.user_azure_details.UserAzureDetails + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**oid** | str, | str, | User object identifier on Azure AD | [optional] +**hd** | str, | str, | User tenant (domain name) | [optional] +**preferredUsername** | str, | str, | User Preferred Username (UPN), i.e. the main email of the user | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserCommunityProfileLinks.md b/docs/models/UserCommunityProfileLinks.md new file mode 100644 index 0000000..4a119e4 --- /dev/null +++ b/docs/models/UserCommunityProfileLinks.md @@ -0,0 +1,22 @@ +# flat_api.model.user_community_profile_links.UserCommunityProfileLinks + +Social networks links + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Social networks links | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**spotifyUrl** | None, str, | NoneClass, str, | Spotify Profile URL | [optional] +**youtubeUrl** | None, str, | NoneClass, str, | YouTube channel URL | [optional] +**soundcloudUrl** | None, str, | NoneClass, str, | SoundCloud Profile URL | [optional] +**tiktokUrl** | None, str, | NoneClass, str, | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] +**instagramUrl** | None, str, | NoneClass, str, | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] +**websiteUrl** | None, str, | NoneClass, str, | Personnal website URL | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserCreation.md b/docs/models/UserCreation.md new file mode 100644 index 0000000..1bdf1ce --- /dev/null +++ b/docs/models/UserCreation.md @@ -0,0 +1,23 @@ +# flat_api.model.user_creation.UserCreation + +User creation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | User creation | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**password** | str, | str, | Password of the new account | +**username** | str, | str, | Username of the new account | +**firstname** | str, | str, | First name of the user | [optional] +**lastname** | str, | str, | Last name of the user | [optional] +**email** | str, | str, | Email of the new account | [optional] +**locale** | [**FlatLocales**](FlatLocales.md) | [**FlatLocales**](FlatLocales.md) | | [optional] +**role** | str, | str, | Role of the new account | [optional] must be one of ["user", "teacher", "admin", ] if omitted the server will use the default value of "user" +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserDetails.md b/docs/models/UserDetails.md new file mode 100644 index 0000000..d127ad3 --- /dev/null +++ b/docs/models/UserDetails.md @@ -0,0 +1,85 @@ +# flat_api.model.user_details.UserDetails + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | Identifier of the user | [optional] +**type** | str, | str, | The type of account | [optional] must be one of ["user", "guest", ] +**username** | str, | str, | The user name (unique for the organization) | [optional] +**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | str, | str, | Firstname of the user (for education users) | [optional] +**lastname** | str, | str, | Lastname of the user (for education users) | [optional] +**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] +**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] +**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] +**organization** | str, | str, | Organization ID (for Edu users only) | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] +**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] +**bio** | str, | str, | User's biography | [optional] +**registrationDate** | str, datetime, | str, | Date the user signed up | [optional] value must conform to RFC-3339 date-time +**likedScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of the scores liked by the user | [optional] +**followersCount** | decimal.Decimal, int, | decimal.Decimal, | Number of followers the user have | [optional] +**followingCount** | decimal.Decimal, int, | decimal.Decimal, | Number of people the user follow | [optional] +**ownedPublicScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of public scores the user have | [optional] +**coverPicture** | str, | str, | Cover picture (backgroud) for the profile | [optional] +**profileTheme** | str, | str, | Theme (background) for the profile | [optional] +**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] +**azureDetails** | [**UserAzureDetails**](UserAzureDetails.md) | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] +**privateProfile** | bool, | BoolClass, | Tell either this user profile is private or not (individual accounts only) | [optional] +**locale** | [**FlatLocales**](FlatLocales.md) | [**FlatLocales**](FlatLocales.md) | | [optional] +**[groups](#groups)** | list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**pictureFile** | None, str, | NoneClass, str, | The ID of the user profile picture | [optional] +**coverPictureFile** | None, str, | NoneClass, str, | The ID of the user profile cover picture | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# badges + +List of badges for the user profile + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of badges for the user profile | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | + +# instruments + +An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# groups + +For Flat for Education accounts, list of Group identifiers the user is part of. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Unique group identifier | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserDetailsAdmin.md b/docs/models/UserDetailsAdmin.md new file mode 100644 index 0000000..e422da0 --- /dev/null +++ b/docs/models/UserDetailsAdmin.md @@ -0,0 +1,78 @@ +# flat_api.model.user_details_admin.UserDetailsAdmin + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The user unique identifier | [optional] +**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] +**username** | str, | str, | The user name (unique for the organization) | [optional] +**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | str, | str, | Firstname of the user (for education users) | [optional] +**lastname** | str, | str, | Lastname of the user (for education users) | [optional] +**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] +**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] +**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] +**organization** | str, | str, | Organization ID (for Edu users only) | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] +**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] +**email** | str, | str, | Email of the user | [optional] +**lastActivityDate** | str, datetime, | str, | Date of the last user activity | [optional] value must conform to RFC-3339 date-time +**[license](#license)** | dict, frozendict.frozendict, | frozendict.frozendict, | Current active license of the user | [optional] +**[groups](#groups)** | list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# badges + +List of badges for the user profile + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of badges for the user profile | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | + +# license + +Current active license of the user + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Current active license of the user | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | ID of the current license | [optional] +**expirationDate** | str, datetime, | str, | Date when the license expires | [optional] value must conform to RFC-3339 date-time +**source** | [**LicenseSources**](LicenseSources.md) | [**LicenseSources**](LicenseSources.md) | | [optional] +**mode** | [**LicenseMode**](LicenseMode.md) | [**LicenseMode**](LicenseMode.md) | | [optional] +**active** | bool, | BoolClass, | ID of the current license | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# groups + +For Flat for Education accounts, list of Group identifiers the user is part of. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Unique group identifier | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserPublic.md b/docs/models/UserPublic.md new file mode 100644 index 0000000..09bdded --- /dev/null +++ b/docs/models/UserPublic.md @@ -0,0 +1,65 @@ +# flat_api.model.user_public.UserPublic + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The user unique identifier | [optional] +**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] +**username** | str, | str, | The user name (unique for the organization) | [optional] +**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | str, | str, | Firstname of the user (for education users) | [optional] +**lastname** | str, | str, | Lastname of the user (for education users) | [optional] +**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] +**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] +**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] +**organization** | str, | str, | Organization ID (for Edu users only) | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] +**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] +**bio** | str, | str, | User's biography | [optional] +**registrationDate** | str, datetime, | str, | Date the user signed up | [optional] value must conform to RFC-3339 date-time +**likedScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of the scores liked by the user | [optional] +**followersCount** | decimal.Decimal, int, | decimal.Decimal, | Number of followers the user have | [optional] +**followingCount** | decimal.Decimal, int, | decimal.Decimal, | Number of people the user follow | [optional] +**ownedPublicScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of public scores the user have | [optional] +**coverPicture** | str, | str, | Cover picture (backgroud) for the profile | [optional] +**profileTheme** | str, | str, | Theme (background) for the profile | [optional] +**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# badges + +List of badges for the user profile + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of badges for the user profile | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | + +# instruments + +An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserPublicSummary.md b/docs/models/UserPublicSummary.md new file mode 100644 index 0000000..a72988d --- /dev/null +++ b/docs/models/UserPublicSummary.md @@ -0,0 +1,41 @@ +# flat_api.model.user_public_summary.UserPublicSummary + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, | str, | The user unique identifier | [optional] +**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] +**username** | str, | str, | The user name (unique for the organization) | [optional] +**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | str, | str, | Firstname of the user (for education users) | [optional] +**lastname** | str, | str, | Lastname of the user (for education users) | [optional] +**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] +**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] +**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] +**organization** | str, | str, | Organization ID (for Edu users only) | [optional] +**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] +**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# badges + +List of badges for the user profile + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of badges for the user profile | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserSigninLink.md b/docs/models/UserSigninLink.md new file mode 100644 index 0000000..ad64934 --- /dev/null +++ b/docs/models/UserSigninLink.md @@ -0,0 +1,16 @@ +# flat_api.model.user_signin_link.UserSigninLink + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**url** | str, | str, | URL to use to sign in to this account | [optional] +**expirationDate** | str, datetime, | str, | Date when the link expires | [optional] value must conform to RFC-3339 date-time +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/UserSigninLinkCreation.md b/docs/models/UserSigninLinkCreation.md new file mode 100644 index 0000000..11e8611 --- /dev/null +++ b/docs/models/UserSigninLinkCreation.md @@ -0,0 +1,15 @@ +# flat_api.model.user_signin_link_creation.UserSigninLinkCreation + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**destinationPath** | str, | str, | Path to redirect to after signin | [optional] if omitted the server will use the default value of "/" +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 0b724eb..2ee8c17 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -7,139 +7,23 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - The version of the OpenAPI document: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - -__version__ = "0.7.0" - -# import apis into sdk package -from flat_api.api.account_api import AccountApi -from flat_api.api.class_api import ClassApi -from flat_api.api.collection_api import CollectionApi -from flat_api.api.group_api import GroupApi -from flat_api.api.organization_api import OrganizationApi -from flat_api.api.score_api import ScoreApi -from flat_api.api.task_api import TaskApi -from flat_api.api.user_api import UserApi +__version__ = "0.9.0" # import ApiClient from flat_api.api_client import ApiClient + +# import Configuration from flat_api.configuration import Configuration + +# import exceptions from flat_api.exceptions import OpenApiException +from flat_api.exceptions import ApiAttributeError from flat_api.exceptions import ApiTypeError from flat_api.exceptions import ApiValueError from flat_api.exceptions import ApiKeyError from flat_api.exceptions import ApiException -# import models into sdk package -from flat_api.models.api_access_token import ApiAccessToken -from flat_api.models.app_scopes import AppScopes -from flat_api.models.assignment import Assignment -from flat_api.models.assignment_canvas import AssignmentCanvas -from flat_api.models.assignment_copy import AssignmentCopy -from flat_api.models.assignment_creation import AssignmentCreation -from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom -from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph -from flat_api.models.assignment_lti import AssignmentLti -from flat_api.models.assignment_mfc import AssignmentMfc -from flat_api.models.assignment_submission import AssignmentSubmission -from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment -from flat_api.models.assignment_submission_state import AssignmentSubmissionState -from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments -from flat_api.models.assignment_type import AssignmentType -from flat_api.models.class_attachment_creation import ClassAttachmentCreation -from flat_api.models.class_creation import ClassCreation -from flat_api.models.class_details import ClassDetails -from flat_api.models.class_details_canvas import ClassDetailsCanvas -from flat_api.models.class_details_clever import ClassDetailsClever -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive -from flat_api.models.class_details_issues import ClassDetailsIssues -from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync -from flat_api.models.class_details_lti import ClassDetailsLti -from flat_api.models.class_details_mfc import ClassDetailsMfc -from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph -from flat_api.models.class_roles import ClassRoles -from flat_api.models.class_state import ClassState -from flat_api.models.class_update import ClassUpdate -from flat_api.models.collection import Collection -from flat_api.models.collection_app import CollectionApp -from flat_api.models.collection_capabilities import CollectionCapabilities -from flat_api.models.collection_creation import CollectionCreation -from flat_api.models.collection_modification import CollectionModification -from flat_api.models.collection_privacy import CollectionPrivacy -from flat_api.models.collection_type import CollectionType -from flat_api.models.flat_error_response import FlatErrorResponse -from flat_api.models.flat_locales import FlatLocales -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission -from flat_api.models.group import Group -from flat_api.models.group_details import GroupDetails -from flat_api.models.group_type import GroupType -from flat_api.models.license_mode import LicenseMode -from flat_api.models.license_sources import LicenseSources -from flat_api.models.lms_name import LmsName -from flat_api.models.lti_credentials import LtiCredentials -from flat_api.models.lti_credentials_creation import LtiCredentialsCreation -from flat_api.models.media_attachment import MediaAttachment -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment -from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission -from flat_api.models.organization_invitation import OrganizationInvitation -from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.models.organization_roles import OrganizationRoles -from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink -from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation -from flat_api.models.resource_collaborator import ResourceCollaborator -from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.models.resource_rights import ResourceRights -from flat_api.models.score_comment import ScoreComment -from flat_api.models.score_comment_context import ScoreCommentContext -from flat_api.models.score_comment_creation import ScoreCommentCreation -from flat_api.models.score_comment_moderation import ScoreCommentModeration -from flat_api.models.score_comment_update import ScoreCommentUpdate -from flat_api.models.score_comments_counts import ScoreCommentsCounts -from flat_api.models.score_creation import ScoreCreation -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments -from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_details import ScoreDetails -from flat_api.models.score_fork import ScoreFork -from flat_api.models.score_license import ScoreLicense -from flat_api.models.score_likes_counts import ScoreLikesCounts -from flat_api.models.score_modification import ScoreModification -from flat_api.models.score_plays_counts import ScorePlaysCounts -from flat_api.models.score_privacy import ScorePrivacy -from flat_api.models.score_revision import ScoreRevision -from flat_api.models.score_revision_creation import ScoreRevisionCreation -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics -from flat_api.models.score_source import ScoreSource -from flat_api.models.score_track import ScoreTrack -from flat_api.models.score_track_creation import ScoreTrackCreation -from flat_api.models.score_track_point import ScoreTrackPoint -from flat_api.models.score_track_state import ScoreTrackState -from flat_api.models.score_track_type import ScoreTrackType -from flat_api.models.score_track_update import ScoreTrackUpdate -from flat_api.models.score_views_counts import ScoreViewsCounts -from flat_api.models.task import Task -from flat_api.models.task_export_options import TaskExportOptions -from flat_api.models.task_progress import TaskProgress -from flat_api.models.user_admin_update import UserAdminUpdate -from flat_api.models.user_creation import UserCreation -from flat_api.models.user_details import UserDetails -from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense -from flat_api.models.user_public import UserPublic -from flat_api.models.user_public_summary import UserPublicSummary - diff --git a/flat_api/api/__init__.py b/flat_api/api/__init__.py deleted file mode 100644 index 7f25776..0000000 --- a/flat_api/api/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from flat_api.api.account_api import AccountApi -from flat_api.api.class_api import ClassApi -from flat_api.api.collection_api import CollectionApi -from flat_api.api.group_api import GroupApi -from flat_api.api.organization_api import OrganizationApi -from flat_api.api.score_api import ScoreApi -from flat_api.api.task_api import TaskApi -from flat_api.api.user_api import UserApi diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py deleted file mode 100644 index ad70319..0000000 --- a/flat_api/api/account_api.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AccountApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_authenticated_user(self, **kwargs): # noqa: E501 - """Get current user profile # noqa: E501 - - Get details about the current authenticated User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authenticated_user(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool only_id: Only return the user id - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: UserDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_authenticated_user_with_http_info(**kwargs) # noqa: E501 - - def get_authenticated_user_with_http_info(self, **kwargs): # noqa: E501 - """Get current user profile # noqa: E501 - - Get details about the current authenticated User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authenticated_user_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool only_id: Only return the user id - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(UserDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'only_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_authenticated_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'only_id' in local_var_params and local_var_params['only_id'] is not None: # noqa: E501 - query_params.append(('onlyId', local_var_params['only_id'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/me', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py deleted file mode 100644 index 8837c9c..0000000 --- a/flat_api/api/class_api.py +++ /dev/null @@ -1,3793 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ClassApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def activate_class(self, _class, **kwargs): # noqa: E501 - """Activate the class # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_class(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.activate_class_with_http_info(_class, **kwargs) # noqa: E501 - - def activate_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Activate the class # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_class_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method activate_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `activate_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/activate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def add_class_user(self, _class, user, **kwargs): # noqa: E501 - """Add a user to the class # noqa: E501 - - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_class_user(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.add_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - - def add_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 - """Add a user to the class # noqa: E501 - - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_class_user_with_http_info(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'user' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_class_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `add_class_user`") # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `add_class_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/users/{user}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def archive_assignment(self, _class, assignment, **kwargs): # noqa: E501 - """Archive the assignment # noqa: E501 - - Archive the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.archive_assignment(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Assignment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.archive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - - def archive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """Archive the assignment # noqa: E501 - - Archive the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.archive_assignment_with_http_info(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method archive_assignment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `archive_assignment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `archive_assignment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/archive', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Assignment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def archive_class(self, _class, **kwargs): # noqa: E501 - """Archive the class # noqa: E501 - - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.archive_class(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.archive_class_with_http_info(_class, **kwargs) # noqa: E501 - - def archive_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Archive the class # noqa: E501 - - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.archive_class_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method archive_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `archive_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/archive', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def copy_assignment(self, _class, assignment, body, **kwargs): # noqa: E501 - """Copy an assignment # noqa: E501 - - Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.copy_assignment(_class, assignment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Assignment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.copy_assignment_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - - def copy_assignment_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 - """Copy an assignment # noqa: E501 - - Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.copy_assignment_with_http_info(_class, assignment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param AssignmentCopy body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method copy_assignment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `copy_assignment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `copy_assignment`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `copy_assignment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/copy', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Assignment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_assignment(self, _class, **kwargs): # noqa: E501 - """Assignment creation # noqa: E501 - - Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_assignment(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param AssignmentCreation body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Assignment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_assignment_with_http_info(_class, **kwargs) # noqa: E501 - - def create_assignment_with_http_info(self, _class, **kwargs): # noqa: E501 - """Assignment creation # noqa: E501 - - Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_assignment_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param AssignmentCreation body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_assignment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `create_assignment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Assignment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_class(self, body, **kwargs): # noqa: E501 - """Create a new class # noqa: E501 - - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_class(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param ClassCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_class_with_http_info(body, **kwargs) # noqa: E501 - - def create_class_with_http_info(self, body, **kwargs): # noqa: E501 - """Create a new class # noqa: E501 - - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_class_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param ClassCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_submission(self, _class, assignment, body, **kwargs): # noqa: E501 - """Create or edit a submission # noqa: E501 - - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_submission(_class, assignment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: AssignmentSubmission - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_submission_with_http_info(_class, assignment, body, **kwargs) # noqa: E501 - - def create_submission_with_http_info(self, _class, assignment, body, **kwargs): # noqa: E501 - """Create or edit a submission # noqa: E501 - - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_submission_with_http_info(_class, assignment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param AssignmentSubmissionUpdate body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_submission" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `create_submission`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `create_submission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_submission`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AssignmentSubmission', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_class_user(self, _class, user, **kwargs): # noqa: E501 - """Remove a user from the class # noqa: E501 - - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_class_user(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_class_user_with_http_info(_class, user, **kwargs) # noqa: E501 - - def delete_class_user_with_http_info(self, _class, user, **kwargs): # noqa: E501 - """Remove a user from the class # noqa: E501 - - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_class_user_with_http_info(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'user' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_class_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `delete_class_user`") # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `delete_class_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/users/{user}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Delete a submission # noqa: E501 - - Use this method as a teacher to delete a submission and allow student to start over the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_submission(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - - def delete_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Delete a submission # noqa: E501 - - Use this method as a teacher to delete a submission and allow student to start over the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_submission_with_http_info(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_submission" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `delete_submission`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `delete_submission`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `delete_submission`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_submission_comment(self, _class, assignment, submission, comment, **kwargs): # noqa: E501 - """Delete a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_submission_comment(_class, assignment, submission, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param str comment: Unique identifier of the comment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_submission_comment_with_http_info(_class, assignment, submission, comment, **kwargs) # noqa: E501 - - def delete_submission_comment_with_http_info(self, _class, assignment, submission, comment, **kwargs): # noqa: E501 - """Delete a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_submission_comment_with_http_info(_class, assignment, submission, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param str comment: Unique identifier of the comment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission', - 'comment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_submission_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `delete_submission_comment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `delete_submission_comment`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `delete_submission_comment`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `delete_submission_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_submission(self, _class, assignment, submission, body, **kwargs): # noqa: E501 - """Edit a submission # noqa: E501 - - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_submission(_class, assignment, submission, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: AssignmentSubmission - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.edit_submission_with_http_info(_class, assignment, submission, body, **kwargs) # noqa: E501 - - def edit_submission_with_http_info(self, _class, assignment, submission, body, **kwargs): # noqa: E501 - """Edit a submission # noqa: E501 - - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_submission_with_http_info(_class, assignment, submission, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionUpdate body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_submission" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `edit_submission`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `edit_submission`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `edit_submission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `edit_submission`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AssignmentSubmission', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def enroll_class(self, enrollment_code, **kwargs): # noqa: E501 - """Join a class # noqa: E501 - - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enroll_class(enrollment_code, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.enroll_class_with_http_info(enrollment_code, **kwargs) # noqa: E501 - - def enroll_class_with_http_info(self, enrollment_code, **kwargs): # noqa: E501 - """Join a class # noqa: E501 - - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enroll_class_with_http_info(enrollment_code, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'enrollment_code' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method enroll_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'enrollment_code' is set - if self.api_client.client_side_validation and ('enrollment_code' not in local_var_params or # noqa: E501 - local_var_params['enrollment_code'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `enrollment_code` when calling `enroll_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'enrollment_code' in local_var_params: - path_params['enrollmentCode'] = local_var_params['enrollment_code'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/enroll/{enrollmentCode}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def export_submissions_reviews_as_csv(self, _class, assignment, **kwargs): # noqa: E501 - """CSV Grades exports # noqa: E501 - - Export list of submissions grades to a CSV file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_submissions_reviews_as_csv(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: file - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.export_submissions_reviews_as_csv_with_http_info(_class, assignment, **kwargs) # noqa: E501 - - def export_submissions_reviews_as_csv_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """CSV Grades exports # noqa: E501 - - Export list of submissions grades to a CSV file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_submissions_reviews_as_csv_with_http_info(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method export_submissions_reviews_as_csv" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_csv`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_csv`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/csv']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/csv', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='file', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def export_submissions_reviews_as_excel(self, _class, assignment, **kwargs): # noqa: E501 - """Excel Grades exports # noqa: E501 - - Export list of submissions grades to an Excel file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_submissions_reviews_as_excel(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: file - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.export_submissions_reviews_as_excel_with_http_info(_class, assignment, **kwargs) # noqa: E501 - - def export_submissions_reviews_as_excel_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """Excel Grades exports # noqa: E501 - - Export list of submissions grades to an Excel file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_submissions_reviews_as_excel_with_http_info(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method export_submissions_reviews_as_excel" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `export_submissions_reviews_as_excel`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `export_submissions_reviews_as_excel`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/excel', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='file', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def fork_score(self, score, body, **kwargs): # noqa: E501 - """Fork a score # noqa: E501 - - 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - - def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Fork a score # noqa: E501 - - 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method fork_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/fork', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_class(self, _class, **kwargs): # noqa: E501 - """Get the details of a single class # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_class(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_class_with_http_info(_class, **kwargs) # noqa: E501 - - def get_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Get the details of a single class # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_class_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `get_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_submissions(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmission] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_submissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/submissions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_submission(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get a student submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: AssignmentSubmission - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_submission_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - - def get_submission_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get a student submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_with_http_info(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(AssignmentSubmission, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_submission" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `get_submission`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `get_submission`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AssignmentSubmission', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_submission_comments(self, _class, assignment, submission, **kwargs): # noqa: E501 - """List the feedback comments of a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_comments(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmissionComment] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_submission_comments_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - - def get_submission_comments_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 - """List the feedback comments of a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_comments_with_http_info(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmissionComment], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_submission_comments" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `get_submission_comments`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission_comments`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `get_submission_comments`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmissionComment]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_submission_history(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get the history of the submission # noqa: E501 - - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_history(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmissionHistory] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_submission_history_with_http_info(_class, assignment, submission, **kwargs) # noqa: E501 - - def get_submission_history_with_http_info(self, _class, assignment, submission, **kwargs): # noqa: E501 - """Get the history of the submission # noqa: E501 - - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submission_history_with_http_info(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmissionHistory], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_submission_history" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `get_submission_history`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `get_submission_history`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `get_submission_history`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}/history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmissionHistory]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_submissions(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submissions(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmission] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_submissions_with_http_info(_class, assignment, **kwargs) # noqa: E501 - - def get_submissions_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """List the students' submissions # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_submissions_with_http_info(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_submissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `get_submissions`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `get_submissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_assignments(self, _class, **kwargs): # noqa: E501 - """Assignments listing # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_assignments(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[Assignment] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_assignments_with_http_info(_class, **kwargs) # noqa: E501 - - def list_assignments_with_http_info(self, _class, **kwargs): # noqa: E501 - """Assignments listing # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_assignments_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[Assignment], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_assignments" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `list_assignments`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Assignment]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_class_student_submissions(self, _class, user, **kwargs): # noqa: E501 - """List the submissions for a student # noqa: E501 - - Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_class_student_submissions(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmission] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_class_student_submissions_with_http_info(_class, user, **kwargs) # noqa: E501 - - def list_class_student_submissions_with_http_info(self, _class, user, **kwargs): # noqa: E501 - """List the submissions for a student # noqa: E501 - - Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_class_student_submissions_with_http_info(_class, user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str user: Unique identifier of the user (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'user' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_class_student_submissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `list_class_student_submissions`") # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `list_class_student_submissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/students/{user}/submissions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_classes(self, **kwargs): # noqa: E501 - """List the classes available for the current user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_classes(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: Filter the classes by state - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ClassDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_classes_with_http_info(**kwargs) # noqa: E501 - - def list_classes_with_http_info(self, **kwargs): # noqa: E501 - """List the classes available for the current user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_classes_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str state: Filter the classes by state - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ClassDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'state' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_classes" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 - query_params.append(('state', local_var_params['state'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ClassDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def post_submission_comment(self, _class, assignment, submission, assignment_submission_comment_creation, **kwargs): # noqa: E501 - """Add a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: AssignmentSubmissionComment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, **kwargs) # noqa: E501 - - def post_submission_comment_with_http_info(self, _class, assignment, submission, assignment_submission_comment_creation, **kwargs): # noqa: E501 - """Add a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_submission_comment_with_http_info(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(AssignmentSubmissionComment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission', - 'assignment_submission_comment_creation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method post_submission_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `post_submission_comment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `post_submission_comment`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `post_submission_comment`") # noqa: E501 - # verify the required parameter 'assignment_submission_comment_creation' is set - if self.api_client.client_side_validation and ('assignment_submission_comment_creation' not in local_var_params or # noqa: E501 - local_var_params['assignment_submission_comment_creation'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `post_submission_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'assignment_submission_comment_creation' in local_var_params: - body_params = local_var_params['assignment_submission_comment_creation'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AssignmentSubmissionComment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def unarchive_assignment(self, _class, assignment, **kwargs): # noqa: E501 - """Unarchive the assignment. # noqa: E501 - - Mark the assignment as `active`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_assignment(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Assignment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.unarchive_assignment_with_http_info(_class, assignment, **kwargs) # noqa: E501 - - def unarchive_assignment_with_http_info(self, _class, assignment, **kwargs): # noqa: E501 - """Unarchive the assignment. # noqa: E501 - - Mark the assignment as `active`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_assignment_with_http_info(_class, assignment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Assignment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method unarchive_assignment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `unarchive_assignment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `unarchive_assignment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/archive', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Assignment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def unarchive_class(self, _class, **kwargs): # noqa: E501 - """Unarchive the class # noqa: E501 - - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_class(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.unarchive_class_with_http_info(_class, **kwargs) # noqa: E501 - - def unarchive_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Unarchive the class # noqa: E501 - - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unarchive_class_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method unarchive_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `unarchive_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/archive', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_class(self, _class, **kwargs): # noqa: E501 - """Update the class # noqa: E501 - - Update the meta information of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_class(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param ClassUpdate body: Details of the Class - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ClassDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_class_with_http_info(_class, **kwargs) # noqa: E501 - - def update_class_with_http_info(self, _class, **kwargs): # noqa: E501 - """Update the class # noqa: E501 - - Update the meta information of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_class_with_http_info(_class, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param ClassUpdate body: Details of the Class - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ClassDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `update_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ClassDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_submission_comment(self, _class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs): # noqa: E501 - """Update a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param str comment: Unique identifier of the comment (required) - :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: AssignmentSubmissionComment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs) # noqa: E501 - - def update_submission_comment_with_http_info(self, _class, assignment, submission, comment, assignment_submission_comment_creation, **kwargs): # noqa: E501 - """Update a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_submission_comment_with_http_info(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str _class: Unique identifier of the class (required) - :param str assignment: Unique identifier of the assignment (required) - :param str submission: Unique identifier of the submission (required) - :param str comment: Unique identifier of the comment (required) - :param AssignmentSubmissionCommentCreation assignment_submission_comment_creation: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(AssignmentSubmissionComment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - '_class', - 'assignment', - 'submission', - 'comment', - 'assignment_submission_comment_creation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_submission_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter '_class' is set - if self.api_client.client_side_validation and ('_class' not in local_var_params or # noqa: E501 - local_var_params['_class'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `_class` when calling `update_submission_comment`") # noqa: E501 - # verify the required parameter 'assignment' is set - if self.api_client.client_side_validation and ('assignment' not in local_var_params or # noqa: E501 - local_var_params['assignment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment` when calling `update_submission_comment`") # noqa: E501 - # verify the required parameter 'submission' is set - if self.api_client.client_side_validation and ('submission' not in local_var_params or # noqa: E501 - local_var_params['submission'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `submission` when calling `update_submission_comment`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `update_submission_comment`") # noqa: E501 - # verify the required parameter 'assignment_submission_comment_creation' is set - if self.api_client.client_side_validation and ('assignment_submission_comment_creation' not in local_var_params or # noqa: E501 - local_var_params['assignment_submission_comment_creation'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assignment_submission_comment_creation` when calling `update_submission_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if '_class' in local_var_params: - path_params['class'] = local_var_params['_class'] # noqa: E501 - if 'assignment' in local_var_params: - path_params['assignment'] = local_var_params['assignment'] # noqa: E501 - if 'submission' in local_var_params: - path_params['submission'] = local_var_params['submission'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'assignment_submission_comment_creation' in local_var_params: - body_params = local_var_params['assignment_submission_comment_creation'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='AssignmentSubmissionComment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py deleted file mode 100644 index 2362891..0000000 --- a/flat_api/api/collection_api.py +++ /dev/null @@ -1,1165 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class CollectionApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def add_score_to_collection(self, collection, score, **kwargs): # noqa: E501 - """Add a score to the collection # noqa: E501 - - This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_to_collection(collection, score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.add_score_to_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - - def add_score_to_collection_with_http_info(self, collection, score, **kwargs): # noqa: E501 - """Add a score to the collection # noqa: E501 - - This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_to_collection_with_http_info(collection, score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection', - 'score', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_score_to_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `add_score_to_collection`") # noqa: E501 - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `add_score_to_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}/scores/{score}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_collection(self, body, **kwargs): # noqa: E501 - """Create a new collection # noqa: E501 - - This method will create a new collection and add it to your `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_collection(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CollectionCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Collection - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_collection_with_http_info(body, **kwargs) # noqa: E501 - - def create_collection_with_http_info(self, body, **kwargs): # noqa: E501 - """Create a new collection # noqa: E501 - - This method will create a new collection and add it to your `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_collection_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CollectionCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Collection', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection(self, collection, **kwargs): # noqa: E501 - """Delete the collection # noqa: E501 - - This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_with_http_info(collection, **kwargs) # noqa: E501 - - def delete_collection_with_http_info(self, collection, **kwargs): # noqa: E501 - """Delete the collection # noqa: E501 - - This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_with_http_info(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `delete_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_score_from_collection(self, collection, score, **kwargs): # noqa: E501 - """Delete a score from the collection # noqa: E501 - - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_from_collection(collection, score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_score_from_collection_with_http_info(collection, score, **kwargs) # noqa: E501 - - def delete_score_from_collection_with_http_info(self, collection, score, **kwargs): # noqa: E501 - """Delete a score from the collection # noqa: E501 - - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_from_collection_with_http_info(collection, score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection', - 'score', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_score_from_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `delete_score_from_collection`") # noqa: E501 - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `delete_score_from_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}/scores/{score}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_collection(self, collection, **kwargs): # noqa: E501 - """Update a collection's metadata # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_collection(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Collection - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.edit_collection_with_http_info(collection, **kwargs) # noqa: E501 - - def edit_collection_with_http_info(self, collection, **kwargs): # noqa: E501 - """Update a collection's metadata # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_collection_with_http_info(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param CollectionModification body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `edit_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Collection', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_collection(self, collection, **kwargs): # noqa: E501 - """Get collection details # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collection(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Collection - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_collection_with_http_info(collection, **kwargs) # noqa: E501 - - def get_collection_with_http_info(self, collection, **kwargs): # noqa: E501 - """Get collection details # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_collection_with_http_info(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `get_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Collection', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_collection_scores(self, collection, **kwargs): # noqa: E501 - """List the scores contained in a collection # noqa: E501 - - Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collection_scores(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str sharing_key: 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. - :param str sort: Sort - :param str direction: Sort direction - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_collection_scores_with_http_info(collection, **kwargs) # noqa: E501 - - def list_collection_scores_with_http_info(self, collection, **kwargs): # noqa: E501 - """List the scores contained in a collection # noqa: E501 - - Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collection_scores_with_http_info(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param str sharing_key: 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. - :param str sort: Sort - :param str direction: Sort direction - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection', - 'sharing_key', - 'sort', - 'direction', - 'limit', - 'next', - 'previous' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_collection_scores" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `list_collection_scores`") # noqa: E501 - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collection_scores`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 - query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 - query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 - query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}/scores', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_collections(self, **kwargs): # noqa: E501 - """List the collections # noqa: E501 - - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collections(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. - :param str sort: Sort - :param str direction: Sort direction - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[Collection] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_collections_with_http_info(**kwargs) # noqa: E501 - - def list_collections_with_http_info(self, **kwargs): # noqa: E501 - """List the collections # noqa: E501 - - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collections_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. - :param str sort: Sort - :param str direction: Sort direction - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[Collection], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'parent', - 'sort', - 'direction', - 'limit', - 'next', - 'previous' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_collections" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value less than or equal to `100`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_collections`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 - query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 - query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 - query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 - query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[Collection]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def untrash_collection(self, collection, **kwargs): # noqa: E501 - """Untrash a collection # noqa: E501 - - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.untrash_collection(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.untrash_collection_with_http_info(collection, **kwargs) # noqa: E501 - - def untrash_collection_with_http_info(self, collection, **kwargs): # noqa: E501 - """Untrash a collection # noqa: E501 - - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.untrash_collection_with_http_info(collection, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'collection' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method untrash_collection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'collection' is set - if self.api_client.client_side_validation and ('collection' not in local_var_params or # noqa: E501 - local_var_params['collection'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collection` when calling `untrash_collection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'collection' in local_var_params: - path_params['collection'] = local_var_params['collection'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/collections/{collection}/untrash', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py deleted file mode 100644 index edd6012..0000000 --- a/flat_api/api/group_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class GroupApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_group_details(self, group, **kwargs): # noqa: E501 - """Get group information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_details(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: GroupDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_group_details_with_http_info(group, **kwargs) # noqa: E501 - - def get_group_details_with_http_info(self, group, **kwargs): # noqa: E501 - """Get group information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_details_with_http_info(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(GroupDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'group' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_group_details" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `group` when calling `get_group_details`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'group' in local_var_params: - path_params['group'] = local_var_params['group'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/groups/{group}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='GroupDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_group_scores(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_scores(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str parent: Filter the score forked from the score id `parent` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - - def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_scores_with_http_info(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str parent: Filter the score forked from the score id `parent` - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'group', - 'parent' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_group_scores" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'group' in local_var_params: - path_params['group'] = local_var_params['group'] # noqa: E501 - - query_params = [] - if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 - query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/groups/{group}/scores', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_group_users(self, group, **kwargs): # noqa: E501 - """List group's users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_group_users(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str source: Filter the users by their source - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[UserPublic] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_group_users_with_http_info(group, **kwargs) # noqa: E501 - - def list_group_users_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_group_users_with_http_info(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str source: Filter the users by their source - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[UserPublic], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'group', - 'source' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_group_users" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `group` when calling `list_group_users`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'group' in local_var_params: - path_params['group'] = local_var_params['group'] # noqa: E501 - - query_params = [] - if 'source' in local_var_params and local_var_params['source'] is not None: # noqa: E501 - query_params.append(('source', local_var_params['source'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/groups/{group}/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UserPublic]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py deleted file mode 100644 index 27a9d09..0000000 --- a/flat_api/api/organization_api.py +++ /dev/null @@ -1,1615 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class OrganizationApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def count_orga_users(self, **kwargs): # noqa: E501 - """Count the organization users using the provided filters # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.count_orga_users(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param list[str] role: Filter users by role - :param str q: The query to search - :param list[str] group: Filter users by group - :param bool no_active_license: Filter users who don't have an active license - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[UserDetailsAdmin] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.count_orga_users_with_http_info(**kwargs) # noqa: E501 - - def count_orga_users_with_http_info(self, **kwargs): # noqa: E501 - """Count the organization users using the provided filters # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.count_orga_users_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param list[str] role: Filter users by role - :param str q: The query to search - :param list[str] group: Filter users by group - :param bool no_active_license: Filter users who don't have an active license - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[UserDetailsAdmin], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'role', - 'q', - 'group', - 'no_active_license' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method count_orga_users" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 - query_params.append(('role', local_var_params['role'])) # noqa: E501 - collection_formats['role'] = 'multi' # noqa: E501 - if 'q' in local_var_params and local_var_params['q'] is not None: # noqa: E501 - query_params.append(('q', local_var_params['q'])) # noqa: E501 - if 'group' in local_var_params and local_var_params['group'] is not None: # noqa: E501 - query_params.append(('group', local_var_params['group'])) # noqa: E501 - collection_formats['group'] = 'multi' # noqa: E501 - if 'no_active_license' in local_var_params and local_var_params['no_active_license'] is not None: # noqa: E501 - query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users/count', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UserDetailsAdmin]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_lti_credentials(self, body, **kwargs): # noqa: E501 - """Create a new couple of LTI 1.x credentials # noqa: E501 - - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_lti_credentials(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LtiCredentialsCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: LtiCredentials - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_lti_credentials_with_http_info(body, **kwargs) # noqa: E501 - - def create_lti_credentials_with_http_info(self, body, **kwargs): # noqa: E501 - """Create a new couple of LTI 1.x credentials # noqa: E501 - - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_lti_credentials_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param LtiCredentialsCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(LtiCredentials, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_lti_credentials" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_lti_credentials`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/lti/credentials', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='LtiCredentials', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_organization_invitation(self, **kwargs): # noqa: E501 - """Create a new invitation to join the organization # noqa: E501 - - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_invitation(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param OrganizationInvitationCreation body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: OrganizationInvitation - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_organization_invitation_with_http_info(**kwargs) # noqa: E501 - - def create_organization_invitation_with_http_info(self, **kwargs): # noqa: E501 - """Create a new invitation to join the organization # noqa: E501 - - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_invitation_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param OrganizationInvitationCreation body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(OrganizationInvitation, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization_invitation" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/invitations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrganizationInvitation', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_organization_user(self, **kwargs): # noqa: E501 - """Create a new user account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UserCreation body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: UserDetailsAdmin - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_organization_user_with_http_info(**kwargs) # noqa: E501 - - def create_organization_user_with_http_info(self, **kwargs): # noqa: E501 - """Create a new user account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param UserCreation body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(UserDetailsAdmin, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDetailsAdmin', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_organization_user_access_token(self, user, **kwargs): # noqa: E501 - """Create a delegated API access token for an organization user # noqa: E501 - - This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user_access_token(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ApiAccessToken - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_organization_user_access_token_with_http_info(user, **kwargs) # noqa: E501 - - def create_organization_user_access_token_with_http_info(self, user, **kwargs): # noqa: E501 - """Create a delegated API access token for an organization user # noqa: E501 - - This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user_access_token_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param OrganizationUserAccessTokenCreation organization_user_access_token_creation: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ApiAccessToken, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'organization_user_access_token_creation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization_user_access_token" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `create_organization_user_access_token`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'organization_user_access_token_creation' in local_var_params: - body_params = local_var_params['organization_user_access_token_creation'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users/{user}/accessToken', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ApiAccessToken', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_organization_user_signin_link(self, user, **kwargs): # noqa: E501 - """Create a sign in link for an organization user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user_signin_link(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: OrganizationUserSigninLink - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_organization_user_signin_link_with_http_info(user, **kwargs) # noqa: E501 - - def create_organization_user_signin_link_with_http_info(self, user, **kwargs): # noqa: E501 - """Create a sign in link for an organization user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_user_signin_link_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param OrganizationUserSigninLinkCreation organization_user_signin_link_creation: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(OrganizationUserSigninLink, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'organization_user_signin_link_creation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization_user_signin_link" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `create_organization_user_signin_link`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'organization_user_signin_link_creation' in local_var_params: - body_params = local_var_params['organization_user_signin_link_creation'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users/{user}/signinLink', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OrganizationUserSigninLink', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_lti_credentials(self, **kwargs): # noqa: E501 - """List LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_lti_credentials(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[LtiCredentials] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_lti_credentials_with_http_info(**kwargs) # noqa: E501 - - def list_lti_credentials_with_http_info(self, **kwargs): # noqa: E501 - """List LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_lti_credentials_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[LtiCredentials], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_lti_credentials" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/lti/credentials', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[LtiCredentials]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_organization_invitations(self, **kwargs): # noqa: E501 - """List the organization invitations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_invitations(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str role: Filter users by role - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[OrganizationInvitation] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_organization_invitations_with_http_info(**kwargs) # noqa: E501 - - def list_organization_invitations_with_http_info(self, **kwargs): # noqa: E501 - """List the organization invitations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_invitations_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str role: Filter users by role - :param int limit: This is the maximum number of objects that may be returned - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[OrganizationInvitation], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'role', - 'limit', - 'next', - 'previous' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organization_invitations" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_invitations`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 - query_params.append(('role', local_var_params['role'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 - query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 - query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/invitations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OrganizationInvitation]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_organization_users(self, **kwargs): # noqa: E501 - """List the organization users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_users(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param list[str] sort: The order to sort the user list - :param str direction: Sort direction - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param list[str] role: Filter users by role - :param str q: The query to search - :param list[str] group: Filter users by group - :param bool no_active_license: Filter users who don't have an active license - :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` - :param bool only_ids: Return only user ids - :param int limit: This is the maximum number of objects that may be returned - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[UserDetailsAdmin] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_organization_users_with_http_info(**kwargs) # noqa: E501 - - def list_organization_users_with_http_info(self, **kwargs): # noqa: E501 - """List the organization users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_users_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param list[str] sort: The order to sort the user list - :param str direction: Sort direction - :param str next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param str previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. - :param list[str] role: Filter users by role - :param str q: The query to search - :param list[str] group: Filter users by group - :param bool no_active_license: Filter users who don't have an active license - :param list[str] license_expiration_date: Filter users by license expiration date or `active` / `notActive` - :param bool only_ids: Return only user ids - :param int limit: This is the maximum number of objects that may be returned - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[UserDetailsAdmin], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'sort', - 'direction', - 'next', - 'previous', - 'role', - 'q', - 'group', - 'no_active_license', - 'license_expiration_date', - 'only_ids', - 'limit' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organization_users" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value less than or equal to `1000`") # noqa: E501 - if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ApiValueError("Invalid value for parameter `limit` when calling `list_organization_users`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - - query_params = [] - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - collection_formats['sort'] = 'multi' # noqa: E501 - if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 - query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - if 'next' in local_var_params and local_var_params['next'] is not None: # noqa: E501 - query_params.append(('next', local_var_params['next'])) # noqa: E501 - if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 - query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 - query_params.append(('role', local_var_params['role'])) # noqa: E501 - collection_formats['role'] = 'multi' # noqa: E501 - if 'q' in local_var_params and local_var_params['q'] is not None: # noqa: E501 - query_params.append(('q', local_var_params['q'])) # noqa: E501 - if 'group' in local_var_params and local_var_params['group'] is not None: # noqa: E501 - query_params.append(('group', local_var_params['group'])) # noqa: E501 - collection_formats['group'] = 'multi' # noqa: E501 - if 'no_active_license' in local_var_params and local_var_params['no_active_license'] is not None: # noqa: E501 - query_params.append(('noActiveLicense', local_var_params['no_active_license'])) # noqa: E501 - if 'license_expiration_date' in local_var_params and local_var_params['license_expiration_date'] is not None: # noqa: E501 - query_params.append(('licenseExpirationDate', local_var_params['license_expiration_date'])) # noqa: E501 - collection_formats['licenseExpirationDate'] = 'multi' # noqa: E501 - if 'only_ids' in local_var_params and local_var_params['only_ids'] is not None: # noqa: E501 - query_params.append(('onlyIds', local_var_params['only_ids'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UserDetailsAdmin]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_organization_invitation(self, invitation, **kwargs): # noqa: E501 - """Remove an organization invitation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_invitation(invitation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str invitation: Unique identifier of the invitation (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.remove_organization_invitation_with_http_info(invitation, **kwargs) # noqa: E501 - - def remove_organization_invitation_with_http_info(self, invitation, **kwargs): # noqa: E501 - """Remove an organization invitation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_invitation_with_http_info(invitation, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str invitation: Unique identifier of the invitation (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'invitation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_organization_invitation" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'invitation' is set - if self.api_client.client_side_validation and ('invitation' not in local_var_params or # noqa: E501 - local_var_params['invitation'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `invitation` when calling `remove_organization_invitation`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'invitation' in local_var_params: - path_params['invitation'] = local_var_params['invitation'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/invitations/{invitation}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_organization_user(self, user, **kwargs): # noqa: E501 - """Remove an account from Flat # noqa: E501 - - This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_user(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.remove_organization_user_with_http_info(user, **kwargs) # noqa: E501 - - def remove_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 - """Remove an account from Flat # noqa: E501 - - This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_user_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param bool convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'convert_to_individual' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_organization_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `remove_organization_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - if 'convert_to_individual' in local_var_params and local_var_params['convert_to_individual'] is not None: # noqa: E501 - query_params.append(('convertToIndividual', local_var_params['convert_to_individual'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users/{user}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def revoke_lti_credentials(self, credentials, **kwargs): # noqa: E501 - """Revoke LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.revoke_lti_credentials(credentials, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str credentials: Credentials unique identifier (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.revoke_lti_credentials_with_http_info(credentials, **kwargs) # noqa: E501 - - def revoke_lti_credentials_with_http_info(self, credentials, **kwargs): # noqa: E501 - """Revoke LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.revoke_lti_credentials_with_http_info(credentials, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str credentials: Credentials unique identifier (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'credentials' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method revoke_lti_credentials" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'credentials' is set - if self.api_client.client_side_validation and ('credentials' not in local_var_params or # noqa: E501 - local_var_params['credentials'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `credentials` when calling `revoke_lti_credentials`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'credentials' in local_var_params: - path_params['credentials'] = local_var_params['credentials'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/lti/credentials/{credentials}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_organization_user(self, user, body, **kwargs): # noqa: E501 - """Update account information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_organization_user(user, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: UserDetailsAdmin - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_organization_user_with_http_info(user, body, **kwargs) # noqa: E501 - - def update_organization_user_with_http_info(self, user, body, **kwargs): # noqa: E501 - """Update account information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_organization_user_with_http_info(user, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of the Flat account (required) - :param UserAdminUpdate body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(UserDetailsAdmin, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_organization_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `update_organization_user`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `update_organization_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/organizations/users/{user}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDetailsAdmin', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py deleted file mode 100644 index 76c51d6..0000000 --- a/flat_api/api/score_api.py +++ /dev/null @@ -1,3819 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ScoreApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def add_score_collaborator(self, score, body, **kwargs): # noqa: E501 - """Add a new collaborator # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_collaborator(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ResourceCollaborator - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.add_score_collaborator_with_http_info(score, body, **kwargs) # noqa: E501 - - def add_score_collaborator_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Add a new collaborator # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_collaborator_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ResourceCollaboratorCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ResourceCollaborator, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_score_collaborator" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `add_score_collaborator`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `add_score_collaborator`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/collaborators', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceCollaborator', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def add_score_track(self, score, body, **kwargs): # noqa: E501 - """Add a new video or audio track to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_track(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreTrack - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.add_score_track_with_http_info(score, body, **kwargs) # noqa: E501 - - def add_score_track_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Add a new video or audio track to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_score_track_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreTrackCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_score_track" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `add_score_track`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `add_score_track`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/tracks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreTrack', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_export_task(self, score, revision, format, **kwargs): # noqa: E501 - """Create a new score export task # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_export_task(score, revision, format, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) - :param str sharing_key: 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. - :param TaskExportOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Task - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_export_task_with_http_info(score, revision, format, **kwargs) # noqa: E501 - - def create_export_task_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 - """Create a new score export task # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_export_task_with_http_info(score, revision, format, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str format: The format of the file that will be generated or the target service name where the file will be exported (required) - :param str sharing_key: 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. - :param TaskExportOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Task, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'revision', - 'format', - 'sharing_key', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_export_task" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `create_export_task`") # noqa: E501 - # verify the required parameter 'revision' is set - if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 - local_var_params['revision'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `revision` when calling `create_export_task`") # noqa: E501 - # verify the required parameter 'format' is set - if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 - local_var_params['format'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `format` when calling `create_export_task`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'revision' in local_var_params: - path_params['revision'] = local_var_params['revision'] # noqa: E501 - if 'format' in local_var_params: - path_params['format'] = local_var_params['format'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/revisions/{revision}/{format}/task', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Task', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_score(self, body, **kwargs): # noqa: E501 - """Create a new score # noqa: E501 - - 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param ScoreCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_score_with_http_info(body, **kwargs) # noqa: E501 - - def create_score_with_http_info(self, body, **kwargs): # noqa: E501 - """Create a new score # noqa: E501 - - 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param ScoreCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_score_revision(self, score, body, **kwargs): # noqa: E501 - """Create a new revision # noqa: E501 - - Update a score by uploading a new revision for this one. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_revision(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreRevision - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_score_revision_with_http_info(score, body, **kwargs) # noqa: E501 - - def create_score_revision_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Create a new revision # noqa: E501 - - Update a score by uploading a new revision for this one. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_score_revision_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreRevisionCreation body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreRevision, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_score_revision" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `create_score_revision`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_score_revision`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/revisions', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreRevision', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_score(self, score, **kwargs): # noqa: E501 - """Delete a score # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param bool now: If `true`, the score deletion will be scheduled to be done ASAP - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_score_with_http_info(score, **kwargs) # noqa: E501 - - def delete_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Delete a score # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param bool now: If `true`, the score deletion will be scheduled to be done ASAP - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'now' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `delete_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'now' in local_var_params and local_var_params['now'] is not None: # noqa: E501 - query_params.append(('now', local_var_params['now'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_score_comment(self, score, comment, **kwargs): # noqa: E501 - """Delete a comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_comment(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_score_comment_with_http_info(score, comment, **kwargs) # noqa: E501 - - def delete_score_comment_with_http_info(self, score, comment, **kwargs): # noqa: E501 - """Delete a comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_comment_with_http_info(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'comment', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_score_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `delete_score_comment`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `delete_score_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments/{comment}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_score_track(self, score, track, **kwargs): # noqa: E501 - """Remove an audio or video track linked to the score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_track(score, track, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - - def delete_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 - """Remove an audio or video track linked to the score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_score_track_with_http_info(score, track, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'track' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_score_track" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `delete_score_track`") # noqa: E501 - # verify the required parameter 'track' is set - if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 - local_var_params['track'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `track` when calling `delete_score_track`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'track' in local_var_params: - path_params['track'] = local_var_params['track'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/tracks/{track}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def edit_score(self, score, **kwargs): # noqa: E501 - """Edit a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_score(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.edit_score_with_http_info(score, **kwargs) # noqa: E501 - - def edit_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Edit a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.edit_score_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreModification body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method edit_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `edit_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def fork_score(self, score, body, **kwargs): # noqa: E501 - """Fork a score # noqa: E501 - - 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.fork_score_with_http_info(score, body, **kwargs) # noqa: E501 - - def fork_score_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Fork a score # noqa: E501 - - 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fork_score_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreFork body: (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method fork_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `fork_score`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `fork_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/fork', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def ger_user_likes(self, user, **kwargs): # noqa: E501 - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.ger_user_likes(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param bool ids: Return only the identifiers of the scores - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - - def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param bool ids: Return only the identifiers of the scores - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'ids' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method ger_user_likes" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - if 'ids' in local_var_params and local_var_params['ids'] is not None: # noqa: E501 - query_params.append(('ids', local_var_params['ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/users/{user}/likes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_group_scores(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_scores(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str parent: Filter the score forked from the score id `parent` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_group_scores_with_http_info(group, **kwargs) # noqa: E501 - - def get_group_scores_with_http_info(self, group, **kwargs): # noqa: E501 - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_scores_with_http_info(group, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str group: Unique identifier of a Flat group (required) - :param str parent: Filter the score forked from the score id `parent` - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'group', - 'parent' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_group_scores" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `group` when calling `get_group_scores`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'group' in local_var_params: - path_params['group'] = local_var_params['group'] # noqa: E501 - - query_params = [] - if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 - query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/groups/{group}/scores', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score(self, score, **kwargs): # noqa: E501 - """Get a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreDetails - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Get a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreDetails, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreDetails', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 - """Get a collaborator # noqa: E501 - - Get the information about a collaborator (User or Group). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_collaborator(score, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ResourceCollaborator - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - - def get_score_collaborator_with_http_info(self, score, collaborator, **kwargs): # noqa: E501 - """Get a collaborator # noqa: E501 - - Get the information about a collaborator (User or Group). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_collaborator_with_http_info(score, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ResourceCollaborator, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'collaborator', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_collaborator" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_collaborator`") # noqa: E501 - # verify the required parameter 'collaborator' is set - if self.api_client.client_side_validation and ('collaborator' not in local_var_params or # noqa: E501 - local_var_params['collaborator'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collaborator` when calling `get_score_collaborator`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'collaborator' in local_var_params: - path_params['collaborator'] = local_var_params['collaborator'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/collaborators/{collaborator}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceCollaborator', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_collaborators(self, score, **kwargs): # noqa: E501 - """List the collaborators # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_collaborators(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ResourceCollaborator] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_collaborators_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_collaborators_with_http_info(self, score, **kwargs): # noqa: E501 - """List the collaborators # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_collaborators_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ResourceCollaborator], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_collaborators" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_collaborators`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/collaborators', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ResourceCollaborator]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_comments(self, score, **kwargs): # noqa: E501 - """List comments # noqa: E501 - - This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_comments(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param str type: Filter the comments by type - :param str sort: Sort - :param str direction: Sort direction - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreComment] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_comments_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_comments_with_http_info(self, score, **kwargs): # noqa: E501 - """List comments # noqa: E501 - - This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_comments_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param str type: Filter the comments by type - :param str sort: Sort - :param str direction: Sort direction - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreComment], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'sharing_key', - 'type', - 'sort', - 'direction' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_comments" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_comments`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 - query_params.append(('direction', local_var_params['direction'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreComment]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_revision(self, score, revision, **kwargs): # noqa: E501 - """Get a score revision # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revision(score, revision, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreRevision - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_revision_with_http_info(score, revision, **kwargs) # noqa: E501 - - def get_score_revision_with_http_info(self, score, revision, **kwargs): # noqa: E501 - """Get a score revision # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revision_with_http_info(score, revision, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreRevision, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'revision', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_revision" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_revision`") # noqa: E501 - # verify the required parameter 'revision' is set - if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 - local_var_params['revision'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `revision` when calling `get_score_revision`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'revision' in local_var_params: - path_params['revision'] = local_var_params['revision'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/revisions/{revision}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreRevision', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_revision_data(self, score, revision, format, **kwargs): # noqa: E501 - """Get a score revision data # noqa: E501 - - 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str format: The format of the file you will retrieve (required) - :param str sharing_key: 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. - :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". - :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. - :param bool url: Returns a json with the `url` in it instead of redirecting - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: file - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_revision_data_with_http_info(score, revision, format, **kwargs) # noqa: E501 - - def get_score_revision_data_with_http_info(self, score, revision, format, **kwargs): # noqa: E501 - """Get a score revision data # noqa: E501 - - 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revision_data_with_http_info(score, revision, format, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) - :param str format: The format of the file you will retrieve (required) - :param str sharing_key: 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. - :param str parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". - :param bool default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. - :param bool url: Returns a json with the `url` in it instead of redirecting - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(file, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'revision', - 'format', - 'sharing_key', - 'parts', - 'default_track', - 'url' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_revision_data" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_revision_data`") # noqa: E501 - # verify the required parameter 'revision' is set - if self.api_client.client_side_validation and ('revision' not in local_var_params or # noqa: E501 - local_var_params['revision'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `revision` when calling `get_score_revision_data`") # noqa: E501 - # verify the required parameter 'format' is set - if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 - local_var_params['format'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `format` when calling `get_score_revision_data`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'revision' in local_var_params: - path_params['revision'] = local_var_params['revision'] # noqa: E501 - if 'format' in local_var_params: - path_params['format'] = local_var_params['format'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'parts' in local_var_params and local_var_params['parts'] is not None: # noqa: E501 - query_params.append(('parts', local_var_params['parts'])) # noqa: E501 - if 'default_track' in local_var_params and local_var_params['default_track'] is not None: # noqa: E501 - query_params.append(('defaultTrack', local_var_params['default_track'])) # noqa: E501 - if 'url' in local_var_params and local_var_params['url'] is not None: # noqa: E501 - query_params.append(('url', local_var_params['url'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/revisions/{revision}/{format}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='file', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_revisions(self, score, **kwargs): # noqa: E501 - """List the revisions # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revisions(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreRevision] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_revisions_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_revisions_with_http_info(self, score, **kwargs): # noqa: E501 - """List the revisions # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_revisions_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreRevision], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_revisions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_revisions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/revisions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreRevision]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_submissions(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[AssignmentSubmission] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_submissions_with_http_info(score, **kwargs) # noqa: E501 - - def get_score_submissions_with_http_info(self, score, **kwargs): # noqa: E501 - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_submissions_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[AssignmentSubmission], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_submissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_submissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/submissions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[AssignmentSubmission]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_score_track(self, score, track, **kwargs): # noqa: E501 - """Retrieve the details of an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_track(score, track, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreTrack - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_score_track_with_http_info(score, track, **kwargs) # noqa: E501 - - def get_score_track_with_http_info(self, score, track, **kwargs): # noqa: E501 - """Retrieve the details of an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_score_track_with_http_info(score, track, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'track', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_score_track" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `get_score_track`") # noqa: E501 - # verify the required parameter 'track' is set - if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 - local_var_params['track'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `track` when calling `get_score_track`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'track' in local_var_params: - path_params['track'] = local_var_params['track'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/tracks/{track}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreTrack', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_scores(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_scores(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param str parent: Filter the score forked from the score id `parent` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - - def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_scores_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param str parent: Filter the score forked from the score id `parent` - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'parent' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_scores" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 - query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/users/{user}/scores', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_score_tracks(self, score, **kwargs): # noqa: E501 - """List the audio or video tracks linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_score_tracks(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param str assignment: An assignment id with which all the tracks returned will be related to - :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreTrack] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_score_tracks_with_http_info(score, **kwargs) # noqa: E501 - - def list_score_tracks_with_http_info(self, score, **kwargs): # noqa: E501 - """List the audio or video tracks linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_score_tracks_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str sharing_key: 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. - :param str assignment: An assignment id with which all the tracks returned will be related to - :param bool list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreTrack], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'sharing_key', - 'assignment', - 'list_auto_track' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_score_tracks" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `list_score_tracks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - if 'assignment' in local_var_params and local_var_params['assignment'] is not None: # noqa: E501 - query_params.append(('assignment', local_var_params['assignment'])) # noqa: E501 - if 'list_auto_track' in local_var_params and local_var_params['list_auto_track'] is not None: # noqa: E501 - query_params.append(('listAutoTrack', local_var_params['list_auto_track'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/tracks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreTrack]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def mark_score_comment_resolved(self, score, comment, **kwargs): # noqa: E501 - """Mark the comment as resolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mark_score_comment_resolved(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.mark_score_comment_resolved_with_http_info(score, comment, **kwargs) # noqa: E501 - - def mark_score_comment_resolved_with_http_info(self, score, comment, **kwargs): # noqa: E501 - """Mark the comment as resolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mark_score_comment_resolved_with_http_info(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'comment', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method mark_score_comment_resolved" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `mark_score_comment_resolved`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `mark_score_comment_resolved`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments/{comment}/resolved', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def mark_score_comment_unresolved(self, score, comment, **kwargs): # noqa: E501 - """Mark the comment as unresolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mark_score_comment_unresolved(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.mark_score_comment_unresolved_with_http_info(score, comment, **kwargs) # noqa: E501 - - def mark_score_comment_unresolved_with_http_info(self, score, comment, **kwargs): # noqa: E501 - """Mark the comment as unresolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mark_score_comment_unresolved_with_http_info(score, comment, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'comment', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method mark_score_comment_unresolved" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `mark_score_comment_unresolved`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `mark_score_comment_unresolved`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments/{comment}/resolved', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def post_score_comment(self, score, body, **kwargs): # noqa: E501 - """Post a new comment # noqa: E501 - - 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`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_score_comment(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation body: (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreComment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.post_score_comment_with_http_info(score, body, **kwargs) # noqa: E501 - - def post_score_comment_with_http_info(self, score, body, **kwargs): # noqa: E501 - """Post a new comment # noqa: E501 - - 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`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_score_comment_with_http_info(score, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param ScoreCommentCreation body: (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreComment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'body', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method post_score_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `post_score_comment`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `post_score_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreComment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_score_collaborator(self, score, collaborator, **kwargs): # noqa: E501 - """Delete a collaborator # noqa: E501 - - Remove the specified collaborator from the score # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_score_collaborator(score, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.remove_score_collaborator_with_http_info(score, collaborator, **kwargs) # noqa: E501 - - def remove_score_collaborator_with_http_info(self, score, collaborator, **kwargs): # noqa: E501 - """Delete a collaborator # noqa: E501 - - Remove the specified collaborator from the score # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_score_collaborator_with_http_info(score, collaborator, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'collaborator' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_score_collaborator" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `remove_score_collaborator`") # noqa: E501 - # verify the required parameter 'collaborator' is set - if self.api_client.client_side_validation and ('collaborator' not in local_var_params or # noqa: E501 - local_var_params['collaborator'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `collaborator` when calling `remove_score_collaborator`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'collaborator' in local_var_params: - path_params['collaborator'] = local_var_params['collaborator'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/collaborators/{collaborator}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def untrash_score(self, score, **kwargs): # noqa: E501 - """Untrash a score # noqa: E501 - - This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.untrash_score(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.untrash_score_with_http_info(score, **kwargs) # noqa: E501 - - def untrash_score_with_http_info(self, score, **kwargs): # noqa: E501 - """Untrash a score # noqa: E501 - - This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.untrash_score_with_http_info(score, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method untrash_score" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `untrash_score`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/untrash', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_score_comment(self, score, comment, body, **kwargs): # noqa: E501 - """Update an existing comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_comment(score, comment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate body: (required) - :param str sharing_key: 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. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreComment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_score_comment_with_http_info(score, comment, body, **kwargs) # noqa: E501 - - def update_score_comment_with_http_info(self, score, comment, body, **kwargs): # noqa: E501 - """Update an existing comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_comment_with_http_info(score, comment, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str comment: Unique identifier of a sheet music comment (required) - :param ScoreCommentUpdate body: (required) - :param str sharing_key: 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. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreComment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'comment', - 'body', - 'sharing_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_score_comment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `update_score_comment`") # noqa: E501 - # verify the required parameter 'comment' is set - if self.api_client.client_side_validation and ('comment' not in local_var_params or # noqa: E501 - local_var_params['comment'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `comment` when calling `update_score_comment`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `update_score_comment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'comment' in local_var_params: - path_params['comment'] = local_var_params['comment'] # noqa: E501 - - query_params = [] - if 'sharing_key' in local_var_params and local_var_params['sharing_key'] is not None: # noqa: E501 - query_params.append(('sharingKey', local_var_params['sharing_key'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/comments/{comment}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreComment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_score_track(self, score, track, body, **kwargs): # noqa: E501 - """Update an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_track(score, track, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate body: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: ScoreTrack - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.update_score_track_with_http_info(score, track, body, **kwargs) # noqa: E501 - - def update_score_track_with_http_info(self, score, track, body, **kwargs): # noqa: E501 - """Update an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_score_track_with_http_info(score, track, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :param str track: Unique identifier of a score audio track (required) - :param ScoreTrackUpdate body: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(ScoreTrack, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'score', - 'track', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_score_track" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'score' is set - if self.api_client.client_side_validation and ('score' not in local_var_params or # noqa: E501 - local_var_params['score'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `score` when calling `update_score_track`") # noqa: E501 - # verify the required parameter 'track' is set - if self.api_client.client_side_validation and ('track' not in local_var_params or # noqa: E501 - local_var_params['track'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `track` when calling `update_score_track`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `update_score_track`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'score' in local_var_params: - path_params['score'] = local_var_params['score'] # noqa: E501 - if 'track' in local_var_params: - path_params['track'] = local_var_params['track'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/scores/{score}/tracks/{track}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ScoreTrack', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py deleted file mode 100644 index 9f2eb47..0000000 --- a/flat_api/api/task_api.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class TaskApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_task(self, task, **kwargs): # noqa: E501 - """Get a task details # noqa: E501 - - This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_task(task, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str task: Unique identifier for the task (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Task - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_task_with_http_info(task, **kwargs) # noqa: E501 - - def get_task_with_http_info(self, task, **kwargs): # noqa: E501 - """Get a task details # noqa: E501 - - This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_task_with_http_info(task, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str task: Unique identifier for the task (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Task, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'task' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_task" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task' is set - if self.api_client.client_side_validation and ('task' not in local_var_params or # noqa: E501 - local_var_params['task'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `task` when calling `get_task`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task' in local_var_params: - path_params['task'] = local_var_params['task'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/tasks/{task}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Task', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py deleted file mode 100644 index 77700ef..0000000 --- a/flat_api/api/user_api.py +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from flat_api.api_client import ApiClient -from flat_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class UserApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def ger_user_likes(self, user, **kwargs): # noqa: E501 - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.ger_user_likes(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param bool ids: Return only the identifiers of the scores - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.ger_user_likes_with_http_info(user, **kwargs) # noqa: E501 - - def ger_user_likes_with_http_info(self, user, **kwargs): # noqa: E501 - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.ger_user_likes_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param bool ids: Return only the identifiers of the scores - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'ids' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method ger_user_likes" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `ger_user_likes`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - if 'ids' in local_var_params and local_var_params['ids'] is not None: # noqa: E501 - query_params.append(('ids', local_var_params['ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/users/{user}/likes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user(self, user, **kwargs): # noqa: E501 - """Get a public user profile # noqa: E501 - - Get a profile of a Flat or Flat for Education User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: UserPublic - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_with_http_info(user, **kwargs) # noqa: E501 - - def get_user_with_http_info(self, user, **kwargs): # noqa: E501 - """Get a public user profile # noqa: E501 - - Get a profile of a Flat or Flat for Education User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(UserPublic, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `get_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/users/{user}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserPublic', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_user_scores(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_scores(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param str parent: Filter the score forked from the score id `parent` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: list[ScoreDetails] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_user_scores_with_http_info(user, **kwargs) # noqa: E501 - - def get_user_scores_with_http_info(self, user, **kwargs): # noqa: E501 - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_scores_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) - :param str parent: Filter the score forked from the score id `parent` - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(list[ScoreDetails], status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'user', - 'parent' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_scores" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 - local_var_params['user'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user` when calling `get_user_scores`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user' in local_var_params: - path_params['user'] = local_var_params['user'] # noqa: E501 - - query_params = [] - if 'parent' in local_var_params and local_var_params['parent'] is not None: # noqa: E501 - query_params.append(('parent', local_var_params['parent'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['OAuth2'] # noqa: E501 - - return self.api_client.call_api( - '/users/{user}/scores', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ScoreDetails]', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 781343a..379a96e 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -4,34 +4,964 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - The version of the OpenAPI document: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - -import atexit -import datetime -from dateutil.parser import parse +from dataclasses import dataclass +from decimal import Decimal +import enum +import email import json -import mimetypes -from multiprocessing.pool import ThreadPool import os +import io +import atexit +from multiprocessing.pool import ThreadPool import re import tempfile +import typing +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict +from urllib.parse import urlparse, quote +from urllib3.fields import RequestField as RequestFieldBase -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote +import frozendict -from flat_api.configuration import Configuration -import flat_api.models from flat_api import rest -from flat_api.exceptions import ApiValueError, ApiException +from flat_api.configuration import Configuration +from flat_api.exceptions import ApiTypeError, ApiValueError +from flat_api.schemas import ( + NoneClass, + BoolClass, + Schema, + FileIO, + BinarySchema, + date, + datetime, + none_type, + Unset, + unset, +) + + +class RequestField(RequestFieldBase): + def __eq__(self, other): + if not isinstance(other, RequestField): + return False + return self.__dict__ == other.__dict__ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return float(obj) + elif isinstance(obj, int): + return int(obj) + elif isinstance(obj, Decimal): + if obj.as_tuple().exponent >= 0: + return int(obj) + return float(obj) + elif isinstance(obj, NoneClass): + return None + elif isinstance(obj, BoolClass): + return bool(obj) + elif isinstance(obj, (dict, frozendict.frozendict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + + def __init__(self, prefix: str, separator: str): + self.prefix = prefix + self.separator = separator + self.first = True + if separator in {'.', '|', '%20'}: + item_separator = separator + else: + item_separator = ',' + self.item_separator = item_separator + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @classmethod + def _get_default_explode(cls, style: ParameterStyle) -> bool: + return False + + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return quote(str(in_data)) + return str(in_data) + elif isinstance(in_data, none_type): + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, none_type): + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _get_default_explode(cls, style: ParameterStyle) -> bool: + if style is ParameterStyle.FORM: + return True + return super()._get_default_explode(style) + + def _serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return self._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + def _serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return self._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +@dataclass +class ParameterBase(JSONDetector): + name: str + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] + + __style_to_in_type = { + ParameterStyle.MATRIX: {ParameterInType.PATH}, + ParameterStyle.LABEL: {ParameterInType.PATH}, + ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, + ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, + ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, + } + __in_type_to_default_style = { + ParameterInType.QUERY: ParameterStyle.FORM, + ParameterInType.PATH: ParameterStyle.SIMPLE, + ParameterInType.HEADER: ParameterStyle.SIMPLE, + ParameterInType.COOKIE: ParameterStyle.FORM, + } + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + _json_encoder = JSONEncoder() + + @classmethod + def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): + if style is None: + return + in_type_set = cls.__style_to_in_type[style] + if in_type not in in_type_set: + raise ValueError( + 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( + style, in_type_set + ) + ) + + def __init__( + self, + name: str, + in_type: ParameterInType, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if schema is None and content is None: + raise ValueError('Value missing; Pass in either schema or content') + if schema and content: + raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.__verify_style_to_in_type(style, in_type) + if content is None and style is None: + style = self.__in_type_to_default_style[in_type] + if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: + raise ValueError('Invalid content length, content length must equal 1') + self.in_type = in_type + self.name = name + self.required = required + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + self.schema = schema + self.content = content + + def _serialize_json( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) + return json.dumps(in_data) + + +class PathParameter(ParameterBase, StyleSimpleSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.PATH, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_label( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) + + def __serialize_matrix( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) + + def __serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = self._serialize_simple( + in_data=in_data, + name=self.name, + explode=self.explode, + percent_encode=True + ) + return self._to_dict(self.name, value) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if self.style: + if self.style is ParameterStyle.SIMPLE: + return self.__serialize_simple(cast_in_data) + elif self.style is ParameterStyle.LABEL: + return self.__serialize_label(cast_in_data) + elif self.style is ParameterStyle.MATRIX: + return self.__serialize_matrix(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self._to_dict(self.name, value) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class QueryParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: typing.Optional[bool] = None, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + used_style = ParameterStyle.FORM if style is None else style + used_explode = self._get_default_explode(used_style) if explode is None else explode + + super().__init__( + name, + in_type=ParameterInType.QUERY, + required=required, + style=used_style, + explode=used_explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def __serialize_space_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) + + def __serialize_pipe_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) + + def __serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._serialize_form( + in_data, + name=self.name, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) + + def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: + if self.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif self.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif self.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if self.style: + # TODO update query ones to omit setting values when [] {} or None is input + if self.style is ParameterStyle.FORM: + return self.__serialize_form(cast_in_data, prefix_separator_iterator) + elif self.style is ParameterStyle.SPACE_DELIMITED: + return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) + elif self.style is ParameterStyle.PIPE_DELIMITED: + return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) + # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class CookieParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: typing.Optional[bool] = None, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_explode = self._get_default_explode(used_style) if explode is None else explode + + super().__init__( + name, + in_type=ParameterInType.COOKIE, + required=required, + style=used_style, + explode=used_explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if self.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + value = self._serialize_form( + cast_in_data, + explode=self.explode, + name=self.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return self._to_dict(self.name, value) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self._to_dict(self.name, value) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(ParameterBase, StyleSimpleSerializer): + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + value = self._serialize_simple(cast_in_data, self.name, self.explode, False) + return self.__to_headers(((self.name, value),)) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self.__to_headers(((self.name, value),)) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class Encoding: + def __init__( + self, + content_type: str, + headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: bool = False, + ): + self.content_type = content_type + self.headers = headers + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + + +@dataclass +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +@dataclass +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + + def __init__( + self, + response: urllib3.HTTPResponse, + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + ): + """ + pycharm needs this to prevent 'Unexpected argument' warnings + """ + self.response = response + self.body = body + self.headers = headers + + +@dataclass +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] = unset + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset + + +class OpenApiResponse(JSONDetector): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + + def __init__( + self, + response_cls: typing.Type[ApiResponse] = ApiResponse, + content: typing.Optional[typing.Dict[str, MediaType]] = None, + headers: typing.Optional[typing.List[HeaderParameter]] = None, + ): + self.headers = headers + if content is not None and len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + self.response_cls = response_cls + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + def __deserialize_application_octet_stream( + self, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + self.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or self.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as new_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + new_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: + content_type = response.getheader('content-type') + deserialized_body = unset + streamed = response.supports_chunked_reads() + + deserialized_headers = unset + if self.headers is not None: + # TODO add header deserialiation here + pass + + if self.content is not None: + if content_type not in self.content: + raise ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" + ) + body_schema = self.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return self.response_cls( + response=response, + headers=deserialized_headers, + body=unset + ) + + if self._content_type_is_json(content_type): + body_data = self.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = self.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = self.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + deserialized_body = body_schema.from_openapi_data_oapg( + body_data, _configuration=configuration) + elif streamed: + response.release_conn() -class ApiClient(object): + return self.response_cls( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -53,34 +983,28 @@ class ApiClient(object): to the API. More threads means more concurrent API requests. """ - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration: typing.Optional[Configuration] = None, + header_name: typing.Optional[str] = None, + header_value: typing.Optional[str] = None, + cookie: typing.Optional[str] = None, + pool_threads: int = 1 + ): if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} + self.default_headers = HTTPHeaderDict() if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'flat_api/1.0.0' - self.client_side_validation = configuration.client_side_validation + self.user_agent = 'flat_api/0.9.0' def __enter__(self): return self @@ -119,241 +1043,89 @@ def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): - - config = self.configuration + self, + resource_path: str, + method: str, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) + used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) + headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) + self.update_params_for_auth(used_headers, + auth_settings, resource_path, method, body) - # body - if body: - body = self.sanitize_for_serialization(body) + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) # request url - if _host is None: + if host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead - url = _host + resource_path - - try: - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') if six.PY3 else e.body - raise e - - content_type = response_data.getheader('content-type') - - self.last_response = response_data - - return_data = response_data - - if not _preload_content: - return return_data - - if six.PY3 and response_type not in ["file", "bytes"]: - match = None - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(flat_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + url = host + resource_path + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def call_api( + self, + resource_path: str, + method: str, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be + :param headers: Header parameters to be placed in the request header. :param body: Request body. - :param post_params dict: Request post form parameters, + :param fields: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will + :param auth_settings: Auth Settings names for the request. + :param async_req: execute request asynchronously + :type async_req: bool, optional TODO remove, unused + :param stream: if True, the urllib3.HTTPResponse object will be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystme file and the BinarySchema + instance will also inherit from FileSchema and FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param host: api endpoint host :return: If async_req parameter is True, the request will be called asynchronously. @@ -361,79 +1133,90 @@ def call_api(self, resource_path, method, If parameter async_req is False or missing, then the method will return the response directly. """ + if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): + return self.__call_api( + resource_path, + method, + headers, + body, + fields, + auth_settings, + stream, + timeout, + host, + ) + + return self.pool.apply_async( + self.__call_api, + ( + resource_path, + method, + headers, + body, + json, + fields, + auth_settings, + stream, + timeout, + host, + ) + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + stream=stream, + timeout=timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + stream=stream, + timeout=timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, - query_params=query_params, headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + fields=fields, + stream=stream, + timeout=timeout, + body=body) elif method == "POST": return self.rest_client.POST(url, - query_params=query_params, headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + fields=fields, + stream=stream, + timeout=timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, - query_params=query_params, headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + fields=fields, + stream=stream, + timeout=timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, - query_params=query_params, headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + fields=fields, + stream=stream, + timeout=timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, - query_params=query_params, headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, + stream=stream, + timeout=timeout, body=body) else: raise ApiValueError( @@ -441,227 +1224,277 @@ def request(self, method, url, query_params=None, headers=None, " `POST`, `PATCH`, `PUT` or `DELETE`." ) - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): + def update_params_for_auth(self, headers, auth_settings, + resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). """ if not auth_settings: return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) + if not auth_setting: + continue + if auth_setting['in'] == 'cookie': + headers.add('Cookie', auth_setting['value']) + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers.add(auth_setting['key'], auth_setting['value']) + elif auth_setting['in'] == 'query': + """ TODO implement auth in query + need to pass in prefix_separator_iterator + and need to output resource_path with query params added + """ + raise ApiValueError("Auth in query not yet implemented") + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) - with open(path, "wb") as f: - f.write(response.data) - return path +class Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. + Do not edit the class manually. + """ - :param data: str. - :param klass: class literal. + def __init__(self, api_client: typing.Optional[ApiClient] = None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client - :return: int, long, float, str, bool. + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes """ - return value + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) + ) - def __deserialize_date(self, string): - """Deserializes string to date. + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) - :param string: str. - :return: date. - """ + def _get_host_oapg( + self, + operation_id: str, + servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), + host_index: typing.Optional[int] = None + ) -> typing.Optional[str]: + configuration = self.api_client.configuration try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + if host_index is None: + index = configuration.server_operation_index.get( + operation_id, configuration.server_index + ) + else: + index = host_index + server_variables = configuration.server_operation_variables.get( + operation_id, configuration.server_variables + ) + host = configuration.get_host_from_settings( + index, variables=server_variables, servers=servers ) + except IndexError: + if servers: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(servers) + ) + host = None + return host - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - The string should be in iso8601 datetime format. +class SerializedRequestBody(typing_extensions.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - :param string: str. - :return: datetime. + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType Schema info + """ + __json_encoder = JSONEncoder() + + def __init__( + self, + content: typing.Dict[str, MediaType], + required: bool = False, + ): + self.required = required + if len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + + def __serialize_json( + self, + in_data: typing.Any + ) -> typing.Dict[str, bytes]: + in_data = self.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return dict(body=json_str) + + @staticmethod + def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: + if isinstance(in_data, frozendict.frozendict): + raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') + elif isinstance(in_data, tuple): + raise ValueError('Unable to serialize type tuple to text/plain') + elif isinstance(in_data, NoneClass): + raise ValueError('Unable to serialize type NoneClass to text/plain') + elif isinstance(in_data, BoolClass): + raise ValueError('Unable to serialize type BoolClass to text/plain') + return dict(body=str(in_data)) + + def __multipart_json_item(self, key: str, value: Schema) -> RequestField: + json_value = self.__json_encoder.default(value) + request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + def __multipart_form_item(self, key: str, value: Schema) -> RequestField: + if isinstance(value, str): + request_field = RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, FileIO): + # TODO use content.encoding to limit allowed content types if they are present + request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) + value.close() + else: + request_field = self.__multipart_json_item(key=key, value=value) + return request_field + + def __serialize_multipart_form_data( + self, in_data: Schema + ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + if not isinstance(in_data, frozendict.frozendict): + raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: - :param data: dict, list. - :param klass: class literal. - :return: model object. + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a RequestField for each item with name=key + for item in value: + request_field = self.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = self.__multipart_json_item(key=key, value=value) + fields.append(request_field) + else: + request_field = self.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return dict(fields=tuple(fields)) + + def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: + if isinstance(in_data, bytes): + return dict(body=in_data) + # FileIO type + result = dict(body=in_data.read()) + in_data.close() + return result + + def __serialize_application_x_www_form_data( + self, in_data: typing.Any + ) -> SerializedRequestBody: + """ + POST submission of form data in body """ - has_discriminator = False - if (hasattr(klass, 'get_real_child_model') - and klass.discriminator_value_class_map): - has_discriminator = True - - if not klass.openapi_types and has_discriminator is False: - return data - - kwargs = {} - if (data is not None and - klass.openapi_types is not None and - isinstance(data, (list, dict))): - for attr, attr_type in six.iteritems(klass.openapi_types): - if klass.attribute_map[attr] in data: - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if has_discriminator: - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance + if not isinstance(in_data, frozendict.frozendict): + raise ValueError( + f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') + cast_in_data = self.__json_encoder.default(in_data) + value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return dict(body=value) + + def serialize( + self, in_data: typing.Any, content_type: str + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = self.content[content_type] + if isinstance(in_data, media_type.schema): + cast_in_data = in_data + elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: + cast_in_data = media_type.schema(**in_data) + else: + cast_in_data = media_type.schema(in_data) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if self._content_type_is_json(content_type): + return self.__serialize_json(cast_in_data) + elif content_type == 'text/plain': + return self.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + return self.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + return self.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + return self.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file diff --git a/flat_api/apis/__init__.py b/flat_api/apis/__init__.py new file mode 100644 index 0000000..7840f77 --- /dev/null +++ b/flat_api/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/flat_api/apis/path_to_api.py b/flat_api/apis/path_to_api.py new file mode 100644 index 0000000..8f687e2 --- /dev/null +++ b/flat_api/apis/path_to_api.py @@ -0,0 +1,206 @@ +import typing_extensions + +from flat_api.paths import PathValues +from flat_api.apis.paths.me import Me +from flat_api.apis.paths.scores import Scores +from flat_api.apis.paths.scores_score import ScoresScore +from flat_api.apis.paths.scores_score_untrash import ScoresScoreUntrash +from flat_api.apis.paths.scores_score_submissions import ScoresScoreSubmissions +from flat_api.apis.paths.scores_score_fork import ScoresScoreFork +from flat_api.apis.paths.scores_score_collaborators import ScoresScoreCollaborators +from flat_api.apis.paths.scores_score_collaborators_collaborator import ScoresScoreCollaboratorsCollaborator +from flat_api.apis.paths.scores_score_tracks import ScoresScoreTracks +from flat_api.apis.paths.scores_score_tracks_track import ScoresScoreTracksTrack +from flat_api.apis.paths.scores_score_comments import ScoresScoreComments +from flat_api.apis.paths.scores_score_comments_comment import ScoresScoreCommentsComment +from flat_api.apis.paths.scores_score_comments_comment_resolved import ScoresScoreCommentsCommentResolved +from flat_api.apis.paths.scores_score_revisions import ScoresScoreRevisions +from flat_api.apis.paths.scores_score_revisions_revision import ScoresScoreRevisionsRevision +from flat_api.apis.paths.scores_score_revisions_revision_format import ScoresScoreRevisionsRevisionFormat +from flat_api.apis.paths.scores_score_revisions_revision_format_task import ScoresScoreRevisionsRevisionFormatTask +from flat_api.apis.paths.collections import Collections +from flat_api.apis.paths.collections_collection import CollectionsCollection +from flat_api.apis.paths.collections_collection_untrash import CollectionsCollectionUntrash +from flat_api.apis.paths.collections_collection_scores import CollectionsCollectionScores +from flat_api.apis.paths.collections_collection_scores_score import CollectionsCollectionScoresScore +from flat_api.apis.paths.tasks_task import TasksTask +from flat_api.apis.paths.users_user import UsersUser +from flat_api.apis.paths.users_user_likes import UsersUserLikes +from flat_api.apis.paths.users_user_scores import UsersUserScores +from flat_api.apis.paths.organizations_users import OrganizationsUsers +from flat_api.apis.paths.organizations_users_count import OrganizationsUsersCount +from flat_api.apis.paths.organizations_users_user import OrganizationsUsersUser +from flat_api.apis.paths.organizations_users_user_signin_link import OrganizationsUsersUserSigninLink +from flat_api.apis.paths.organizations_users_user_access_token import OrganizationsUsersUserAccessToken +from flat_api.apis.paths.organizations_invitations import OrganizationsInvitations +from flat_api.apis.paths.organizations_invitations_invitation import OrganizationsInvitationsInvitation +from flat_api.apis.paths.organizations_lti_credentials import OrganizationsLtiCredentials +from flat_api.apis.paths.organizations_lti_credentials_credentials import OrganizationsLtiCredentialsCredentials +from flat_api.apis.paths.classes import Classes +from flat_api.apis.paths.classes_class import ClassesClass +from flat_api.apis.paths.classes_class_archive import ClassesClassArchive +from flat_api.apis.paths.classes_class_activate import ClassesClassActivate +from flat_api.apis.paths.classes_class_users_user import ClassesClassUsersUser +from flat_api.apis.paths.classes_class_students_user_submissions import ClassesClassStudentsUserSubmissions +from flat_api.apis.paths.classes_class_assignments import ClassesClassAssignments +from flat_api.apis.paths.classes_class_assignments_assignment_copy import ClassesClassAssignmentsAssignmentCopy +from flat_api.apis.paths.classes_class_assignments_assignment_archive import ClassesClassAssignmentsAssignmentArchive +from flat_api.apis.paths.classes_class_assignments_assignment_submissions import ClassesClassAssignmentsAssignmentSubmissions +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_csv import ClassesClassAssignmentsAssignmentSubmissionsCsv +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_excel import ClassesClassAssignmentsAssignmentSubmissionsExcel +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission import ClassesClassAssignmentsAssignmentSubmissionsSubmission +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_history import ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_comments import ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments +from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment +from flat_api.apis.paths.classes_class_test_student import ClassesClassTestStudent +from flat_api.apis.paths.classes_enroll_enrollment_code import ClassesEnrollEnrollmentCode +from flat_api.apis.paths.groups_group import GroupsGroup +from flat_api.apis.paths.groups_group_users import GroupsGroupUsers +from flat_api.apis.paths.groups_group_scores import GroupsGroupScores +from flat_api.apis.paths.edu_resources import EduResources +from flat_api.apis.paths.edu_resources_libraries import EduResourcesLibraries +from flat_api.apis.paths.edu_resources_resource import EduResourcesResource +from flat_api.apis.paths.edu_resources_resource_move import EduResourcesResourceMove +from flat_api.apis.paths.edu_resources_resource_copy import EduResourcesResourceCopy +from flat_api.apis.paths.edu_resources_resource_copy_to_demo_class import EduResourcesResourceCopyToDemoClass +from flat_api.apis.paths.edu_resources_resource_use_in_class import EduResourcesResourceUseInClass +from flat_api.apis.paths.edu_resources_resource_assignment import EduResourcesResourceAssignment + +PathToApi = typing_extensions.TypedDict( + 'PathToApi', + { + PathValues.ME: Me, + PathValues.SCORES: Scores, + PathValues.SCORES_SCORE: ScoresScore, + PathValues.SCORES_SCORE_UNTRASH: ScoresScoreUntrash, + PathValues.SCORES_SCORE_SUBMISSIONS: ScoresScoreSubmissions, + PathValues.SCORES_SCORE_FORK: ScoresScoreFork, + PathValues.SCORES_SCORE_COLLABORATORS: ScoresScoreCollaborators, + PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR: ScoresScoreCollaboratorsCollaborator, + PathValues.SCORES_SCORE_TRACKS: ScoresScoreTracks, + PathValues.SCORES_SCORE_TRACKS_TRACK: ScoresScoreTracksTrack, + PathValues.SCORES_SCORE_COMMENTS: ScoresScoreComments, + PathValues.SCORES_SCORE_COMMENTS_COMMENT: ScoresScoreCommentsComment, + PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED: ScoresScoreCommentsCommentResolved, + PathValues.SCORES_SCORE_REVISIONS: ScoresScoreRevisions, + PathValues.SCORES_SCORE_REVISIONS_REVISION: ScoresScoreRevisionsRevision, + PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT: ScoresScoreRevisionsRevisionFormat, + PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK: ScoresScoreRevisionsRevisionFormatTask, + PathValues.COLLECTIONS: Collections, + PathValues.COLLECTIONS_COLLECTION: CollectionsCollection, + PathValues.COLLECTIONS_COLLECTION_UNTRASH: CollectionsCollectionUntrash, + PathValues.COLLECTIONS_COLLECTION_SCORES: CollectionsCollectionScores, + PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE: CollectionsCollectionScoresScore, + PathValues.TASKS_TASK: TasksTask, + PathValues.USERS_USER: UsersUser, + PathValues.USERS_USER_LIKES: UsersUserLikes, + PathValues.USERS_USER_SCORES: UsersUserScores, + PathValues.ORGANIZATIONS_USERS: OrganizationsUsers, + PathValues.ORGANIZATIONS_USERS_COUNT: OrganizationsUsersCount, + PathValues.ORGANIZATIONS_USERS_USER: OrganizationsUsersUser, + PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK: OrganizationsUsersUserSigninLink, + PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN: OrganizationsUsersUserAccessToken, + PathValues.ORGANIZATIONS_INVITATIONS: OrganizationsInvitations, + PathValues.ORGANIZATIONS_INVITATIONS_INVITATION: OrganizationsInvitationsInvitation, + PathValues.ORGANIZATIONS_LTI_CREDENTIALS: OrganizationsLtiCredentials, + PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS: OrganizationsLtiCredentialsCredentials, + PathValues.CLASSES: Classes, + PathValues.CLASSES_CLASS: ClassesClass, + PathValues.CLASSES_CLASS_ARCHIVE: ClassesClassArchive, + PathValues.CLASSES_CLASS_ACTIVATE: ClassesClassActivate, + PathValues.CLASSES_CLASS_USERS_USER: ClassesClassUsersUser, + PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS: ClassesClassStudentsUserSubmissions, + PathValues.CLASSES_CLASS_ASSIGNMENTS: ClassesClassAssignments, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY: ClassesClassAssignmentsAssignmentCopy, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE: ClassesClassAssignmentsAssignmentArchive, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS: ClassesClassAssignmentsAssignmentSubmissions, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV: ClassesClassAssignmentsAssignmentSubmissionsCsv, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL: ClassesClassAssignmentsAssignmentSubmissionsExcel, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION: ClassesClassAssignmentsAssignmentSubmissionsSubmission, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY: ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS: ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT: ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment, + PathValues.CLASSES_CLASS_TEST_STUDENT: ClassesClassTestStudent, + PathValues.CLASSES_ENROLL_ENROLLMENT_CODE: ClassesEnrollEnrollmentCode, + PathValues.GROUPS_GROUP: GroupsGroup, + PathValues.GROUPS_GROUP_USERS: GroupsGroupUsers, + PathValues.GROUPS_GROUP_SCORES: GroupsGroupScores, + PathValues.EDU_RESOURCES: EduResources, + PathValues.EDU_RESOURCES_LIBRARIES: EduResourcesLibraries, + PathValues.EDU_RESOURCES_RESOURCE: EduResourcesResource, + PathValues.EDU_RESOURCES_RESOURCE_MOVE: EduResourcesResourceMove, + PathValues.EDU_RESOURCES_RESOURCE_COPY: EduResourcesResourceCopy, + PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS: EduResourcesResourceCopyToDemoClass, + PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS: EduResourcesResourceUseInClass, + PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT: EduResourcesResourceAssignment, + } +) + +path_to_api = PathToApi( + { + PathValues.ME: Me, + PathValues.SCORES: Scores, + PathValues.SCORES_SCORE: ScoresScore, + PathValues.SCORES_SCORE_UNTRASH: ScoresScoreUntrash, + PathValues.SCORES_SCORE_SUBMISSIONS: ScoresScoreSubmissions, + PathValues.SCORES_SCORE_FORK: ScoresScoreFork, + PathValues.SCORES_SCORE_COLLABORATORS: ScoresScoreCollaborators, + PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR: ScoresScoreCollaboratorsCollaborator, + PathValues.SCORES_SCORE_TRACKS: ScoresScoreTracks, + PathValues.SCORES_SCORE_TRACKS_TRACK: ScoresScoreTracksTrack, + PathValues.SCORES_SCORE_COMMENTS: ScoresScoreComments, + PathValues.SCORES_SCORE_COMMENTS_COMMENT: ScoresScoreCommentsComment, + PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED: ScoresScoreCommentsCommentResolved, + PathValues.SCORES_SCORE_REVISIONS: ScoresScoreRevisions, + PathValues.SCORES_SCORE_REVISIONS_REVISION: ScoresScoreRevisionsRevision, + PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT: ScoresScoreRevisionsRevisionFormat, + PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK: ScoresScoreRevisionsRevisionFormatTask, + PathValues.COLLECTIONS: Collections, + PathValues.COLLECTIONS_COLLECTION: CollectionsCollection, + PathValues.COLLECTIONS_COLLECTION_UNTRASH: CollectionsCollectionUntrash, + PathValues.COLLECTIONS_COLLECTION_SCORES: CollectionsCollectionScores, + PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE: CollectionsCollectionScoresScore, + PathValues.TASKS_TASK: TasksTask, + PathValues.USERS_USER: UsersUser, + PathValues.USERS_USER_LIKES: UsersUserLikes, + PathValues.USERS_USER_SCORES: UsersUserScores, + PathValues.ORGANIZATIONS_USERS: OrganizationsUsers, + PathValues.ORGANIZATIONS_USERS_COUNT: OrganizationsUsersCount, + PathValues.ORGANIZATIONS_USERS_USER: OrganizationsUsersUser, + PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK: OrganizationsUsersUserSigninLink, + PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN: OrganizationsUsersUserAccessToken, + PathValues.ORGANIZATIONS_INVITATIONS: OrganizationsInvitations, + PathValues.ORGANIZATIONS_INVITATIONS_INVITATION: OrganizationsInvitationsInvitation, + PathValues.ORGANIZATIONS_LTI_CREDENTIALS: OrganizationsLtiCredentials, + PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS: OrganizationsLtiCredentialsCredentials, + PathValues.CLASSES: Classes, + PathValues.CLASSES_CLASS: ClassesClass, + PathValues.CLASSES_CLASS_ARCHIVE: ClassesClassArchive, + PathValues.CLASSES_CLASS_ACTIVATE: ClassesClassActivate, + PathValues.CLASSES_CLASS_USERS_USER: ClassesClassUsersUser, + PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS: ClassesClassStudentsUserSubmissions, + PathValues.CLASSES_CLASS_ASSIGNMENTS: ClassesClassAssignments, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY: ClassesClassAssignmentsAssignmentCopy, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE: ClassesClassAssignmentsAssignmentArchive, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS: ClassesClassAssignmentsAssignmentSubmissions, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV: ClassesClassAssignmentsAssignmentSubmissionsCsv, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL: ClassesClassAssignmentsAssignmentSubmissionsExcel, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION: ClassesClassAssignmentsAssignmentSubmissionsSubmission, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY: ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS: ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments, + PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT: ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment, + PathValues.CLASSES_CLASS_TEST_STUDENT: ClassesClassTestStudent, + PathValues.CLASSES_ENROLL_ENROLLMENT_CODE: ClassesEnrollEnrollmentCode, + PathValues.GROUPS_GROUP: GroupsGroup, + PathValues.GROUPS_GROUP_USERS: GroupsGroupUsers, + PathValues.GROUPS_GROUP_SCORES: GroupsGroupScores, + PathValues.EDU_RESOURCES: EduResources, + PathValues.EDU_RESOURCES_LIBRARIES: EduResourcesLibraries, + PathValues.EDU_RESOURCES_RESOURCE: EduResourcesResource, + PathValues.EDU_RESOURCES_RESOURCE_MOVE: EduResourcesResourceMove, + PathValues.EDU_RESOURCES_RESOURCE_COPY: EduResourcesResourceCopy, + PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS: EduResourcesResourceCopyToDemoClass, + PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS: EduResourcesResourceUseInClass, + PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT: EduResourcesResourceAssignment, + } +) diff --git a/flat_api/apis/paths/__init__.py b/flat_api/apis/paths/__init__.py new file mode 100644 index 0000000..3fdcb1a --- /dev/null +++ b/flat_api/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.apis.path_to_api import path_to_api diff --git a/flat_api/apis/paths/classes.py b/flat_api/apis/paths/classes.py new file mode 100644 index 0000000..4585167 --- /dev/null +++ b/flat_api/apis/paths/classes.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes.get import ApiForget +from flat_api.paths.classes.post import ApiForpost + + +class Classes( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class.py b/flat_api/apis/paths/classes_class.py new file mode 100644 index 0000000..3d4922c --- /dev/null +++ b/flat_api/apis/paths/classes_class.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class.get import ApiForget +from flat_api.paths.classes_class.put import ApiForput + + +class ClassesClass( + ApiForget, + ApiForput, +): + pass diff --git a/flat_api/apis/paths/classes_class_activate.py b/flat_api/apis/paths/classes_class_activate.py new file mode 100644 index 0000000..198bed8 --- /dev/null +++ b/flat_api/apis/paths/classes_class_activate.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_activate.post import ApiForpost + + +class ClassesClassActivate( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class_archive.py b/flat_api/apis/paths/classes_class_archive.py new file mode 100644 index 0000000..e2d987a --- /dev/null +++ b/flat_api/apis/paths/classes_class_archive.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_archive.post import ApiForpost +from flat_api.paths.classes_class_archive.delete import ApiFordelete + + +class ClassesClassArchive( + ApiForpost, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments.py b/flat_api/apis/paths/classes_class_assignments.py new file mode 100644 index 0000000..a77d0f0 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_assignments.get import ApiForget +from flat_api.paths.classes_class_assignments.post import ApiForpost + + +class ClassesClassAssignments( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_archive.py b/flat_api/apis/paths/classes_class_assignments_assignment_archive.py new file mode 100644 index 0000000..8fe80d0 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_archive.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_assignments_assignment_archive.post import ApiForpost +from flat_api.paths.classes_class_assignments_assignment_archive.delete import ApiFordelete + + +class ClassesClassAssignmentsAssignmentArchive( + ApiForpost, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_copy.py b/flat_api/apis/paths/classes_class_assignments_assignment_copy.py new file mode 100644 index 0000000..db80313 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_copy.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_assignments_assignment_copy.post import ApiForpost + + +class ClassesClassAssignmentsAssignmentCopy( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py new file mode 100644 index 0000000..6f2bf87 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions.get import ApiForget +from flat_api.paths.classes_class_assignments_assignment_submissions.put import ApiForput + + +class ClassesClassAssignmentsAssignmentSubmissions( + ApiForget, + ApiForput, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py new file mode 100644 index 0000000..2041b73 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_csv.get import ApiForget + + +class ClassesClassAssignmentsAssignmentSubmissionsCsv( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py new file mode 100644 index 0000000..024355a --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_excel.get import ApiForget + + +class ClassesClassAssignmentsAssignmentSubmissionsExcel( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py new file mode 100644 index 0000000..6f7422c --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py @@ -0,0 +1,11 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.get import ApiForget +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.put import ApiForput +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.delete import ApiFordelete + + +class ClassesClassAssignmentsAssignmentSubmissionsSubmission( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py new file mode 100644 index 0000000..e494234 --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.get import ApiForget +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.post import ApiForpost + + +class ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py new file mode 100644 index 0000000..61cb69a --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.put import ApiForput +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.delete import ApiFordelete + + +class ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py new file mode 100644 index 0000000..4dc3e5a --- /dev/null +++ b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history.get import ApiForget + + +class ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/classes_class_students_user_submissions.py b/flat_api/apis/paths/classes_class_students_user_submissions.py new file mode 100644 index 0000000..625d7ab --- /dev/null +++ b/flat_api/apis/paths/classes_class_students_user_submissions.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_students_user_submissions.get import ApiForget + + +class ClassesClassStudentsUserSubmissions( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/classes_class_test_student.py b/flat_api/apis/paths/classes_class_test_student.py new file mode 100644 index 0000000..18a7a20 --- /dev/null +++ b/flat_api/apis/paths/classes_class_test_student.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_class_test_student.post import ApiForpost + + +class ClassesClassTestStudent( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/classes_class_users_user.py b/flat_api/apis/paths/classes_class_users_user.py new file mode 100644 index 0000000..3f95af9 --- /dev/null +++ b/flat_api/apis/paths/classes_class_users_user.py @@ -0,0 +1,9 @@ +from flat_api.paths.classes_class_users_user.put import ApiForput +from flat_api.paths.classes_class_users_user.delete import ApiFordelete + + +class ClassesClassUsersUser( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/classes_enroll_enrollment_code.py b/flat_api/apis/paths/classes_enroll_enrollment_code.py new file mode 100644 index 0000000..ac3406b --- /dev/null +++ b/flat_api/apis/paths/classes_enroll_enrollment_code.py @@ -0,0 +1,7 @@ +from flat_api.paths.classes_enroll_enrollment_code.post import ApiForpost + + +class ClassesEnrollEnrollmentCode( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/collections.py b/flat_api/apis/paths/collections.py new file mode 100644 index 0000000..e80f80c --- /dev/null +++ b/flat_api/apis/paths/collections.py @@ -0,0 +1,9 @@ +from flat_api.paths.collections.get import ApiForget +from flat_api.paths.collections.post import ApiForpost + + +class Collections( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/collections_collection.py b/flat_api/apis/paths/collections_collection.py new file mode 100644 index 0000000..215cd77 --- /dev/null +++ b/flat_api/apis/paths/collections_collection.py @@ -0,0 +1,11 @@ +from flat_api.paths.collections_collection.get import ApiForget +from flat_api.paths.collections_collection.put import ApiForput +from flat_api.paths.collections_collection.delete import ApiFordelete + + +class CollectionsCollection( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/collections_collection_scores.py b/flat_api/apis/paths/collections_collection_scores.py new file mode 100644 index 0000000..96746e5 --- /dev/null +++ b/flat_api/apis/paths/collections_collection_scores.py @@ -0,0 +1,7 @@ +from flat_api.paths.collections_collection_scores.get import ApiForget + + +class CollectionsCollectionScores( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/collections_collection_scores_score.py b/flat_api/apis/paths/collections_collection_scores_score.py new file mode 100644 index 0000000..2ff692a --- /dev/null +++ b/flat_api/apis/paths/collections_collection_scores_score.py @@ -0,0 +1,9 @@ +from flat_api.paths.collections_collection_scores_score.put import ApiForput +from flat_api.paths.collections_collection_scores_score.delete import ApiFordelete + + +class CollectionsCollectionScoresScore( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/collections_collection_untrash.py b/flat_api/apis/paths/collections_collection_untrash.py new file mode 100644 index 0000000..d93351e --- /dev/null +++ b/flat_api/apis/paths/collections_collection_untrash.py @@ -0,0 +1,7 @@ +from flat_api.paths.collections_collection_untrash.post import ApiForpost + + +class CollectionsCollectionUntrash( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/edu_resources.py b/flat_api/apis/paths/edu_resources.py new file mode 100644 index 0000000..f4eaff0 --- /dev/null +++ b/flat_api/apis/paths/edu_resources.py @@ -0,0 +1,9 @@ +from flat_api.paths.edu_resources.get import ApiForget +from flat_api.paths.edu_resources.post import ApiForpost + + +class EduResources( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/edu_resources_libraries.py b/flat_api/apis/paths/edu_resources_libraries.py new file mode 100644 index 0000000..ac0e10d --- /dev/null +++ b/flat_api/apis/paths/edu_resources_libraries.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_libraries.get import ApiForget + + +class EduResourcesLibraries( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource.py b/flat_api/apis/paths/edu_resources_resource.py new file mode 100644 index 0000000..e425a6d --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource.py @@ -0,0 +1,11 @@ +from flat_api.paths.edu_resources_resource.get import ApiForget +from flat_api.paths.edu_resources_resource.put import ApiForput +from flat_api.paths.edu_resources_resource.delete import ApiFordelete + + +class EduResourcesResource( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource_assignment.py b/flat_api/apis/paths/edu_resources_resource_assignment.py new file mode 100644 index 0000000..fb3270e --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource_assignment.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_resource_assignment.put import ApiForput + + +class EduResourcesResourceAssignment( + ApiForput, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource_copy.py b/flat_api/apis/paths/edu_resources_resource_copy.py new file mode 100644 index 0000000..5243f76 --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource_copy.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_resource_copy.post import ApiForpost + + +class EduResourcesResourceCopy( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py b/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py new file mode 100644 index 0000000..53044bc --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_resource_copy_to_demo_class.post import ApiForpost + + +class EduResourcesResourceCopyToDemoClass( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource_move.py b/flat_api/apis/paths/edu_resources_resource_move.py new file mode 100644 index 0000000..a8f66bf --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource_move.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_resource_move.post import ApiForpost + + +class EduResourcesResourceMove( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/edu_resources_resource_use_in_class.py b/flat_api/apis/paths/edu_resources_resource_use_in_class.py new file mode 100644 index 0000000..4bfc946 --- /dev/null +++ b/flat_api/apis/paths/edu_resources_resource_use_in_class.py @@ -0,0 +1,7 @@ +from flat_api.paths.edu_resources_resource_use_in_class.post import ApiForpost + + +class EduResourcesResourceUseInClass( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/groups_group.py b/flat_api/apis/paths/groups_group.py new file mode 100644 index 0000000..f1ab841 --- /dev/null +++ b/flat_api/apis/paths/groups_group.py @@ -0,0 +1,7 @@ +from flat_api.paths.groups_group.get import ApiForget + + +class GroupsGroup( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/groups_group_scores.py b/flat_api/apis/paths/groups_group_scores.py new file mode 100644 index 0000000..57b6935 --- /dev/null +++ b/flat_api/apis/paths/groups_group_scores.py @@ -0,0 +1,7 @@ +from flat_api.paths.groups_group_scores.get import ApiForget + + +class GroupsGroupScores( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/groups_group_users.py b/flat_api/apis/paths/groups_group_users.py new file mode 100644 index 0000000..8ad42cc --- /dev/null +++ b/flat_api/apis/paths/groups_group_users.py @@ -0,0 +1,7 @@ +from flat_api.paths.groups_group_users.get import ApiForget + + +class GroupsGroupUsers( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/me.py b/flat_api/apis/paths/me.py new file mode 100644 index 0000000..79c07b3 --- /dev/null +++ b/flat_api/apis/paths/me.py @@ -0,0 +1,7 @@ +from flat_api.paths.me.get import ApiForget + + +class Me( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/organizations_invitations.py b/flat_api/apis/paths/organizations_invitations.py new file mode 100644 index 0000000..98ec5d0 --- /dev/null +++ b/flat_api/apis/paths/organizations_invitations.py @@ -0,0 +1,9 @@ +from flat_api.paths.organizations_invitations.get import ApiForget +from flat_api.paths.organizations_invitations.post import ApiForpost + + +class OrganizationsInvitations( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/organizations_invitations_invitation.py b/flat_api/apis/paths/organizations_invitations_invitation.py new file mode 100644 index 0000000..3ffc4fb --- /dev/null +++ b/flat_api/apis/paths/organizations_invitations_invitation.py @@ -0,0 +1,7 @@ +from flat_api.paths.organizations_invitations_invitation.delete import ApiFordelete + + +class OrganizationsInvitationsInvitation( + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/organizations_lti_credentials.py b/flat_api/apis/paths/organizations_lti_credentials.py new file mode 100644 index 0000000..107b2a4 --- /dev/null +++ b/flat_api/apis/paths/organizations_lti_credentials.py @@ -0,0 +1,9 @@ +from flat_api.paths.organizations_lti_credentials.get import ApiForget +from flat_api.paths.organizations_lti_credentials.post import ApiForpost + + +class OrganizationsLtiCredentials( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/organizations_lti_credentials_credentials.py b/flat_api/apis/paths/organizations_lti_credentials_credentials.py new file mode 100644 index 0000000..a88cdc0 --- /dev/null +++ b/flat_api/apis/paths/organizations_lti_credentials_credentials.py @@ -0,0 +1,7 @@ +from flat_api.paths.organizations_lti_credentials_credentials.delete import ApiFordelete + + +class OrganizationsLtiCredentialsCredentials( + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/organizations_users.py b/flat_api/apis/paths/organizations_users.py new file mode 100644 index 0000000..e8eb946 --- /dev/null +++ b/flat_api/apis/paths/organizations_users.py @@ -0,0 +1,9 @@ +from flat_api.paths.organizations_users.get import ApiForget +from flat_api.paths.organizations_users.post import ApiForpost + + +class OrganizationsUsers( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/organizations_users_count.py b/flat_api/apis/paths/organizations_users_count.py new file mode 100644 index 0000000..6e365b7 --- /dev/null +++ b/flat_api/apis/paths/organizations_users_count.py @@ -0,0 +1,7 @@ +from flat_api.paths.organizations_users_count.get import ApiForget + + +class OrganizationsUsersCount( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/organizations_users_user.py b/flat_api/apis/paths/organizations_users_user.py new file mode 100644 index 0000000..15c68c2 --- /dev/null +++ b/flat_api/apis/paths/organizations_users_user.py @@ -0,0 +1,9 @@ +from flat_api.paths.organizations_users_user.put import ApiForput +from flat_api.paths.organizations_users_user.delete import ApiFordelete + + +class OrganizationsUsersUser( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/organizations_users_user_access_token.py b/flat_api/apis/paths/organizations_users_user_access_token.py new file mode 100644 index 0000000..72a56ba --- /dev/null +++ b/flat_api/apis/paths/organizations_users_user_access_token.py @@ -0,0 +1,7 @@ +from flat_api.paths.organizations_users_user_access_token.post import ApiForpost + + +class OrganizationsUsersUserAccessToken( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/organizations_users_user_signin_link.py b/flat_api/apis/paths/organizations_users_user_signin_link.py new file mode 100644 index 0000000..f5b7236 --- /dev/null +++ b/flat_api/apis/paths/organizations_users_user_signin_link.py @@ -0,0 +1,7 @@ +from flat_api.paths.organizations_users_user_signin_link.post import ApiForpost + + +class OrganizationsUsersUserSigninLink( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores.py b/flat_api/apis/paths/scores.py new file mode 100644 index 0000000..6ef7c6b --- /dev/null +++ b/flat_api/apis/paths/scores.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores.post import ApiForpost + + +class Scores( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score.py b/flat_api/apis/paths/scores_score.py new file mode 100644 index 0000000..52b501e --- /dev/null +++ b/flat_api/apis/paths/scores_score.py @@ -0,0 +1,11 @@ +from flat_api.paths.scores_score.get import ApiForget +from flat_api.paths.scores_score.put import ApiForput +from flat_api.paths.scores_score.delete import ApiFordelete + + +class ScoresScore( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/scores_score_collaborators.py b/flat_api/apis/paths/scores_score_collaborators.py new file mode 100644 index 0000000..3c117ef --- /dev/null +++ b/flat_api/apis/paths/scores_score_collaborators.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_collaborators.get import ApiForget +from flat_api.paths.scores_score_collaborators.post import ApiForpost + + +class ScoresScoreCollaborators( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_collaborators_collaborator.py b/flat_api/apis/paths/scores_score_collaborators_collaborator.py new file mode 100644 index 0000000..8e5721d --- /dev/null +++ b/flat_api/apis/paths/scores_score_collaborators_collaborator.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_collaborators_collaborator.get import ApiForget +from flat_api.paths.scores_score_collaborators_collaborator.delete import ApiFordelete + + +class ScoresScoreCollaboratorsCollaborator( + ApiForget, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/scores_score_comments.py b/flat_api/apis/paths/scores_score_comments.py new file mode 100644 index 0000000..615dfd3 --- /dev/null +++ b/flat_api/apis/paths/scores_score_comments.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_comments.get import ApiForget +from flat_api.paths.scores_score_comments.post import ApiForpost + + +class ScoresScoreComments( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_comments_comment.py b/flat_api/apis/paths/scores_score_comments_comment.py new file mode 100644 index 0000000..302d0d3 --- /dev/null +++ b/flat_api/apis/paths/scores_score_comments_comment.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_comments_comment.put import ApiForput +from flat_api.paths.scores_score_comments_comment.delete import ApiFordelete + + +class ScoresScoreCommentsComment( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/scores_score_comments_comment_resolved.py b/flat_api/apis/paths/scores_score_comments_comment_resolved.py new file mode 100644 index 0000000..603e7ec --- /dev/null +++ b/flat_api/apis/paths/scores_score_comments_comment_resolved.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_comments_comment_resolved.put import ApiForput +from flat_api.paths.scores_score_comments_comment_resolved.delete import ApiFordelete + + +class ScoresScoreCommentsCommentResolved( + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/scores_score_fork.py b/flat_api/apis/paths/scores_score_fork.py new file mode 100644 index 0000000..c02e361 --- /dev/null +++ b/flat_api/apis/paths/scores_score_fork.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_fork.post import ApiForpost + + +class ScoresScoreFork( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_revisions.py b/flat_api/apis/paths/scores_score_revisions.py new file mode 100644 index 0000000..2f1c3b9 --- /dev/null +++ b/flat_api/apis/paths/scores_score_revisions.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_revisions.get import ApiForget +from flat_api.paths.scores_score_revisions.post import ApiForpost + + +class ScoresScoreRevisions( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision.py b/flat_api/apis/paths/scores_score_revisions_revision.py new file mode 100644 index 0000000..1d678ff --- /dev/null +++ b/flat_api/apis/paths/scores_score_revisions_revision.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_revisions_revision.get import ApiForget + + +class ScoresScoreRevisionsRevision( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision_format.py b/flat_api/apis/paths/scores_score_revisions_revision_format.py new file mode 100644 index 0000000..c0abe55 --- /dev/null +++ b/flat_api/apis/paths/scores_score_revisions_revision_format.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_revisions_revision_format.get import ApiForget + + +class ScoresScoreRevisionsRevisionFormat( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision_format_task.py b/flat_api/apis/paths/scores_score_revisions_revision_format_task.py new file mode 100644 index 0000000..f0e0c8b --- /dev/null +++ b/flat_api/apis/paths/scores_score_revisions_revision_format_task.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_revisions_revision_format_task.post import ApiForpost + + +class ScoresScoreRevisionsRevisionFormatTask( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_submissions.py b/flat_api/apis/paths/scores_score_submissions.py new file mode 100644 index 0000000..aabe8fc --- /dev/null +++ b/flat_api/apis/paths/scores_score_submissions.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_submissions.get import ApiForget + + +class ScoresScoreSubmissions( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/scores_score_tracks.py b/flat_api/apis/paths/scores_score_tracks.py new file mode 100644 index 0000000..421f8d2 --- /dev/null +++ b/flat_api/apis/paths/scores_score_tracks.py @@ -0,0 +1,9 @@ +from flat_api.paths.scores_score_tracks.get import ApiForget +from flat_api.paths.scores_score_tracks.post import ApiForpost + + +class ScoresScoreTracks( + ApiForget, + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/scores_score_tracks_track.py b/flat_api/apis/paths/scores_score_tracks_track.py new file mode 100644 index 0000000..96e5e82 --- /dev/null +++ b/flat_api/apis/paths/scores_score_tracks_track.py @@ -0,0 +1,11 @@ +from flat_api.paths.scores_score_tracks_track.get import ApiForget +from flat_api.paths.scores_score_tracks_track.put import ApiForput +from flat_api.paths.scores_score_tracks_track.delete import ApiFordelete + + +class ScoresScoreTracksTrack( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/flat_api/apis/paths/scores_score_untrash.py b/flat_api/apis/paths/scores_score_untrash.py new file mode 100644 index 0000000..3e95359 --- /dev/null +++ b/flat_api/apis/paths/scores_score_untrash.py @@ -0,0 +1,7 @@ +from flat_api.paths.scores_score_untrash.post import ApiForpost + + +class ScoresScoreUntrash( + ApiForpost, +): + pass diff --git a/flat_api/apis/paths/tasks_task.py b/flat_api/apis/paths/tasks_task.py new file mode 100644 index 0000000..6d0a5a7 --- /dev/null +++ b/flat_api/apis/paths/tasks_task.py @@ -0,0 +1,7 @@ +from flat_api.paths.tasks_task.get import ApiForget + + +class TasksTask( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/users_user.py b/flat_api/apis/paths/users_user.py new file mode 100644 index 0000000..8d2e460 --- /dev/null +++ b/flat_api/apis/paths/users_user.py @@ -0,0 +1,7 @@ +from flat_api.paths.users_user.get import ApiForget + + +class UsersUser( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/users_user_likes.py b/flat_api/apis/paths/users_user_likes.py new file mode 100644 index 0000000..b4ea868 --- /dev/null +++ b/flat_api/apis/paths/users_user_likes.py @@ -0,0 +1,7 @@ +from flat_api.paths.users_user_likes.get import ApiForget + + +class UsersUserLikes( + ApiForget, +): + pass diff --git a/flat_api/apis/paths/users_user_scores.py b/flat_api/apis/paths/users_user_scores.py new file mode 100644 index 0000000..5734be7 --- /dev/null +++ b/flat_api/apis/paths/users_user_scores.py @@ -0,0 +1,7 @@ +from flat_api.paths.users_user_scores.get import ApiForget + + +class UsersUserScores( + ApiForget, +): + pass diff --git a/flat_api/apis/tag_to_api.py b/flat_api/apis/tag_to_api.py new file mode 100644 index 0000000..3eb8e6d --- /dev/null +++ b/flat_api/apis/tag_to_api.py @@ -0,0 +1,41 @@ +import typing_extensions + +from flat_api.apis.tags import TagValues +from flat_api.apis.tags.account_api import AccountApi +from flat_api.apis.tags.score_api import ScoreApi +from flat_api.apis.tags.collection_api import CollectionApi +from flat_api.apis.tags.user_api import UserApi +from flat_api.apis.tags.organization_api import OrganizationApi +from flat_api.apis.tags.model_class_api import ModelClassApi +from flat_api.apis.tags.edu_resources_api import EduResourcesApi +from flat_api.apis.tags.group_api import GroupApi +from flat_api.apis.tags.task_api import TaskApi + +TagToApi = typing_extensions.TypedDict( + 'TagToApi', + { + TagValues.ACCOUNT: AccountApi, + TagValues.SCORE: ScoreApi, + TagValues.COLLECTION: CollectionApi, + TagValues.USER: UserApi, + TagValues.ORGANIZATION: OrganizationApi, + TagValues.CLASS: ModelClassApi, + TagValues.EDU_RESOURCES: EduResourcesApi, + TagValues.GROUP: GroupApi, + TagValues.TASK: TaskApi, + } +) + +tag_to_api = TagToApi( + { + TagValues.ACCOUNT: AccountApi, + TagValues.SCORE: ScoreApi, + TagValues.COLLECTION: CollectionApi, + TagValues.USER: UserApi, + TagValues.ORGANIZATION: OrganizationApi, + TagValues.CLASS: ModelClassApi, + TagValues.EDU_RESOURCES: EduResourcesApi, + TagValues.GROUP: GroupApi, + TagValues.TASK: TaskApi, + } +) diff --git a/flat_api/apis/tags/__init__.py b/flat_api/apis/tags/__init__.py new file mode 100644 index 0000000..87dadc1 --- /dev/null +++ b/flat_api/apis/tags/__init__.py @@ -0,0 +1,17 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.apis.tag_to_api import tag_to_api + +import enum + + +class TagValues(str, enum.Enum): + ACCOUNT = "Account" + SCORE = "Score" + COLLECTION = "Collection" + USER = "User" + ORGANIZATION = "Organization" + CLASS = "Class" + EDU_RESOURCES = "EduResources" + GROUP = "Group" + TASK = "Task" diff --git a/flat_api/apis/tags/account_api.py b/flat_api/apis/tags/account_api.py new file mode 100644 index 0000000..bf92799 --- /dev/null +++ b/flat_api/apis/tags/account_api.py @@ -0,0 +1,24 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.me.get import GetAuthenticatedUser + + +class AccountApi( + GetAuthenticatedUser, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/collection_api.py b/flat_api/apis/tags/collection_api.py new file mode 100644 index 0000000..274ab61 --- /dev/null +++ b/flat_api/apis/tags/collection_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.collections_collection_scores_score.put import AddScoreToCollection +from flat_api.paths.collections.post import CreateCollection +from flat_api.paths.collections_collection.delete import DeleteCollection +from flat_api.paths.collections_collection_scores_score.delete import DeleteScoreFromCollection +from flat_api.paths.collections_collection.put import EditCollection +from flat_api.paths.collections_collection.get import GetCollection +from flat_api.paths.collections_collection_scores.get import ListCollectionScores +from flat_api.paths.collections.get import ListCollections +from flat_api.paths.collections_collection_untrash.post import UntrashCollection + + +class CollectionApi( + AddScoreToCollection, + CreateCollection, + DeleteCollection, + DeleteScoreFromCollection, + EditCollection, + GetCollection, + ListCollectionScores, + ListCollections, + UntrashCollection, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/edu_resources_api.py b/flat_api/apis/tags/edu_resources_api.py new file mode 100644 index 0000000..788a2f7 --- /dev/null +++ b/flat_api/apis/tags/edu_resources_api.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.edu_resources_resource_copy.post import CopyEduResource +from flat_api.paths.edu_resources_resource_copy_to_demo_class.post import CopyEduResourceToDemoClass +from flat_api.paths.edu_resources.post import CreateEduResource +from flat_api.paths.edu_resources_resource.delete import DeleteEduResource +from flat_api.paths.edu_resources_resource.get import GetEduResource +from flat_api.paths.edu_resources_libraries.get import ListEduLibraries +from flat_api.paths.edu_resources.get import ListEduResources +from flat_api.paths.edu_resources_resource_move.post import MoveEduResource +from flat_api.paths.edu_resources_resource.put import UpdateEduResource +from flat_api.paths.edu_resources_resource_assignment.put import UpdateEduResourceAssignment +from flat_api.paths.edu_resources_resource_use_in_class.post import UseEduResourceInClass + + +class EduResourcesApi( + CopyEduResource, + CopyEduResourceToDemoClass, + CreateEduResource, + DeleteEduResource, + GetEduResource, + ListEduLibraries, + ListEduResources, + MoveEduResource, + UpdateEduResource, + UpdateEduResourceAssignment, + UseEduResourceInClass, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/group_api.py b/flat_api/apis/tags/group_api.py new file mode 100644 index 0000000..7d8d5b1 --- /dev/null +++ b/flat_api/apis/tags/group_api.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.groups_group.get import GetGroupDetails +from flat_api.paths.groups_group_scores.get import GetGroupScores +from flat_api.paths.groups_group_users.get import ListGroupUsers + + +class GroupApi( + GetGroupDetails, + GetGroupScores, + ListGroupUsers, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/model_class_api.py b/flat_api/apis/tags/model_class_api.py new file mode 100644 index 0000000..5371d4d --- /dev/null +++ b/flat_api/apis/tags/model_class_api.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.classes_class_activate.post import ActivateClass +from flat_api.paths.classes_class_users_user.put import AddClassUser +from flat_api.paths.classes_class_assignments_assignment_archive.post import ArchiveAssignment +from flat_api.paths.classes_class_archive.post import ArchiveClass +from flat_api.paths.classes_class_assignments_assignment_copy.post import CopyAssignment +from flat_api.paths.classes.post import CreateClass +from flat_api.paths.classes_class_assignments.post import CreateClassAssignment +from flat_api.paths.classes_class_assignments_assignment_submissions.put import CreateSubmission +from flat_api.paths.classes_class_test_student.post import CreateTestStudentAccount +from flat_api.paths.classes_class_users_user.delete import DeleteClassUser +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.delete import DeleteSubmission +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.delete import DeleteSubmissionComment +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.put import EditSubmission +from flat_api.paths.classes_enroll_enrollment_code.post import EnrollClass +from flat_api.paths.classes_class_assignments_assignment_submissions_csv.get import ExportSubmissionsReviewsAsCsv +from flat_api.paths.classes_class_assignments_assignment_submissions_excel.get import ExportSubmissionsReviewsAsExcel +from flat_api.paths.classes_class.get import GetClass +from flat_api.paths.scores_score_submissions.get import GetScoreSubmissions +from flat_api.paths.classes_class_assignments_assignment_submissions_submission.get import GetSubmission +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.get import GetSubmissionComments +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history.get import GetSubmissionHistory +from flat_api.paths.classes_class_assignments_assignment_submissions.get import GetSubmissions +from flat_api.paths.classes_class_assignments.get import ListAssignments +from flat_api.paths.classes_class_students_user_submissions.get import ListClassStudentSubmissions +from flat_api.paths.classes.get import ListClasses +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.post import PostSubmissionComment +from flat_api.paths.classes_class_assignments_assignment_archive.delete import UnarchiveAssignment +from flat_api.paths.classes_class_archive.delete import UnarchiveClass +from flat_api.paths.classes_class.put import UpdateClass +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.put import UpdateSubmissionComment + + +class ModelClassApi( + ActivateClass, + AddClassUser, + ArchiveAssignment, + ArchiveClass, + CopyAssignment, + CreateClass, + CreateClassAssignment, + CreateSubmission, + CreateTestStudentAccount, + DeleteClassUser, + DeleteSubmission, + DeleteSubmissionComment, + EditSubmission, + EnrollClass, + ExportSubmissionsReviewsAsCsv, + ExportSubmissionsReviewsAsExcel, + GetClass, + GetScoreSubmissions, + GetSubmission, + GetSubmissionComments, + GetSubmissionHistory, + GetSubmissions, + ListAssignments, + ListClassStudentSubmissions, + ListClasses, + PostSubmissionComment, + UnarchiveAssignment, + UnarchiveClass, + UpdateClass, + UpdateSubmissionComment, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/organization_api.py b/flat_api/apis/tags/organization_api.py new file mode 100644 index 0000000..e818ac4 --- /dev/null +++ b/flat_api/apis/tags/organization_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.organizations_users_count.get import CountOrgaUsers +from flat_api.paths.organizations_lti_credentials.post import CreateLtiCredentials +from flat_api.paths.organizations_invitations.post import CreateOrganizationInvitation +from flat_api.paths.organizations_users.post import CreateOrganizationUser +from flat_api.paths.organizations_users_user_access_token.post import CreateOrganizationUserAccessToken +from flat_api.paths.organizations_users_user_signin_link.post import CreateOrganizationUserSigninLink +from flat_api.paths.organizations_lti_credentials.get import ListLtiCredentials +from flat_api.paths.organizations_invitations.get import ListOrganizationInvitations +from flat_api.paths.organizations_users.get import ListOrganizationUsers +from flat_api.paths.organizations_invitations_invitation.delete import RemoveOrganizationInvitation +from flat_api.paths.organizations_users_user.delete import RemoveOrganizationUser +from flat_api.paths.organizations_lti_credentials_credentials.delete import RevokeLtiCredentials +from flat_api.paths.organizations_users_user.put import UpdateOrganizationUser + + +class OrganizationApi( + CountOrgaUsers, + CreateLtiCredentials, + CreateOrganizationInvitation, + CreateOrganizationUser, + CreateOrganizationUserAccessToken, + CreateOrganizationUserSigninLink, + ListLtiCredentials, + ListOrganizationInvitations, + ListOrganizationUsers, + RemoveOrganizationInvitation, + RemoveOrganizationUser, + RevokeLtiCredentials, + UpdateOrganizationUser, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/score_api.py b/flat_api/apis/tags/score_api.py new file mode 100644 index 0000000..de8b1f0 --- /dev/null +++ b/flat_api/apis/tags/score_api.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.scores_score_collaborators.post import AddScoreCollaborator +from flat_api.paths.scores_score_tracks.post import AddScoreTrack +from flat_api.paths.scores_score_revisions_revision_format_task.post import CreateExportTask +from flat_api.paths.scores.post import CreateScore +from flat_api.paths.scores_score_revisions.post import CreateScoreRevision +from flat_api.paths.scores_score.delete import DeleteScore +from flat_api.paths.scores_score_comments_comment.delete import DeleteScoreComment +from flat_api.paths.scores_score_tracks_track.delete import DeleteScoreTrack +from flat_api.paths.scores_score.put import EditScore +from flat_api.paths.scores_score_fork.post import ForkScore +from flat_api.paths.users_user_likes.get import GerUserLikes +from flat_api.paths.groups_group_scores.get import GetGroupScores +from flat_api.paths.scores_score.get import GetScore +from flat_api.paths.scores_score_collaborators_collaborator.get import GetScoreCollaborator +from flat_api.paths.scores_score_collaborators.get import GetScoreCollaborators +from flat_api.paths.scores_score_comments.get import GetScoreComments +from flat_api.paths.scores_score_revisions_revision.get import GetScoreRevision +from flat_api.paths.scores_score_revisions_revision_format.get import GetScoreRevisionData +from flat_api.paths.scores_score_revisions.get import GetScoreRevisions +from flat_api.paths.scores_score_submissions.get import GetScoreSubmissions +from flat_api.paths.scores_score_tracks_track.get import GetScoreTrack +from flat_api.paths.users_user_scores.get import GetUserScores +from flat_api.paths.scores_score_tracks.get import ListScoreTracks +from flat_api.paths.scores_score_comments_comment_resolved.put import MarkScoreCommentResolved +from flat_api.paths.scores_score_comments_comment_resolved.delete import MarkScoreCommentUnresolved +from flat_api.paths.scores_score_comments.post import PostScoreComment +from flat_api.paths.scores_score_collaborators_collaborator.delete import RemoveScoreCollaborator +from flat_api.paths.scores_score_untrash.post import UntrashScore +from flat_api.paths.scores_score_comments_comment.put import UpdateScoreComment +from flat_api.paths.scores_score_tracks_track.put import UpdateScoreTrack + + +class ScoreApi( + AddScoreCollaborator, + AddScoreTrack, + CreateExportTask, + CreateScore, + CreateScoreRevision, + DeleteScore, + DeleteScoreComment, + DeleteScoreTrack, + EditScore, + ForkScore, + GerUserLikes, + GetGroupScores, + GetScore, + GetScoreCollaborator, + GetScoreCollaborators, + GetScoreComments, + GetScoreRevision, + GetScoreRevisionData, + GetScoreRevisions, + GetScoreSubmissions, + GetScoreTrack, + GetUserScores, + ListScoreTracks, + MarkScoreCommentResolved, + MarkScoreCommentUnresolved, + PostScoreComment, + RemoveScoreCollaborator, + UntrashScore, + UpdateScoreComment, + UpdateScoreTrack, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/task_api.py b/flat_api/apis/tags/task_api.py new file mode 100644 index 0000000..af0f9b8 --- /dev/null +++ b/flat_api/apis/tags/task_api.py @@ -0,0 +1,24 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.tasks_task.get import GetTask + + +class TaskApi( + GetTask, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/apis/tags/user_api.py b/flat_api/apis/tags/user_api.py new file mode 100644 index 0000000..ccefa50 --- /dev/null +++ b/flat_api/apis/tags/user_api.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from flat_api.paths.users_user_likes.get import GerUserLikes +from flat_api.paths.users_user.get import GetUser +from flat_api.paths.users_user_scores.get import GetUserScores + + +class UserApi( + GerUserLikes, + GetUser, + GetUserScores, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/flat_api/configuration.py b/flat_api/configuration.py index e5975df..cd13954 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -5,24 +5,28 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - The version of the OpenAPI document: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import copy import logging import multiprocessing import sys import urllib3 -import six -from six.moves import http_client as httplib +from http import client as http_client +from flat_api.exceptions import ApiValueError +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems', + 'uniqueItems', 'maxProperties', 'minProperties', +} + class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator @@ -50,46 +54,63 @@ class Configuration(object): then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. :Example: """ _default = None - def __init__(self, host="https://api.flat.io/v2", - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - ): + def __init__( + self, + host=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + access_token=None, + ): """Constructor """ - self.host = host + self._base_path = "https://api.flat.io/v2" if host is None else host """Default Base url """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.access_token = None """access token for OAuth/Bearer """ @@ -131,6 +152,10 @@ def __init__(self, host="https://api.flat.io/v2", self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -152,9 +177,12 @@ def __init__(self, host="https://api.flat.io/v2", self.retries = None """Adding retries to override urllib3 default value 3 """ - # Disable client side validation + # Enable client side validation self.client_side_validation = True + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) @@ -171,6 +199,13 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -225,7 +260,7 @@ def logger_file(self, value): # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.addHandler(self.logger_file_handler) @property @@ -247,17 +282,17 @@ def debug(self, value): self.__debug = value if self.__debug: # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -282,15 +317,16 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier): + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -336,8 +372,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.17.0\n"\ - "SDK Package Version: 0.7.0".\ + "Version of the API: 2.18.0\n"\ + "SDK Package Version: 0.9.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -352,14 +388,18 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None): + def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None :return: URL based on host settings """ + if index is None: + return self._base_path + variables = {} if variables is None else variables - servers = self.get_host_settings() + servers = self.get_host_settings() if servers is None else servers try: server = servers[index] @@ -371,7 +411,7 @@ def get_host_from_settings(self, index, variables=None): url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server['variables'].items(): + for variable_name, variable in server.get('variables', {}).items(): used_value = variables.get( variable_name, variable['default_value']) @@ -386,3 +426,14 @@ def get_host_from_settings(self, index, variables=None): url = url.replace("{" + variable_name + "}", used_value) return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py index 3c73eaa..68b2d7a 100644 --- a/flat_api/exceptions.py +++ b/flat_api/exceptions.py @@ -5,13 +5,14 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - The version of the OpenAPI document: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ +import dataclasses +import typing - -import six +from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -65,6 +66,25 @@ def __init__(self, msg, path_to_item=None): super(ApiValueError, self).__init__(full_msg) +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + class ApiKeyError(OpenApiException, KeyError): def __init__(self, msg, path_to_item=None): """ @@ -82,19 +102,26 @@ def __init__(self, msg, path_to_item=None): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): +T = typing.TypeVar("T") - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" @@ -114,7 +141,7 @@ def render_path(path_to_item): """Returns a string representation of a path""" result = "" for pth in path_to_item: - if isinstance(pth, six.integer_types): + if isinstance(pth, int): result += "[{0}]".format(pth) else: result += "['{0}']".format(pth) diff --git a/flat_api/model/__init__.py b/flat_api/model/__init__.py new file mode 100644 index 0000000..6daffc2 --- /dev/null +++ b/flat_api/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from flat_api.models import ModelA, ModelB diff --git a/flat_api/model/api_access_token.py b/flat_api/model/api_access_token.py new file mode 100644 index 0000000..5cf3d15 --- /dev/null +++ b/flat_api/model/api_access_token.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ApiAccessToken( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An API access token + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + token = schemas.StrSchema + issuedDate = schemas.DateTimeSchema + expirationDate = schemas.DateTimeSchema + + + class scopes( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AppScopes']: + return AppScopes + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scopes': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AppScopes': + return super().__getitem__(i) + __annotations__ = { + "id": id, + "name": name, + "token": token, + "issuedDate": issuedDate, + "expirationDate": expirationDate, + "scopes": scopes, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issuedDate"]) -> MetaOapg.properties.issuedDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issuedDate"]) -> typing.Union[MetaOapg.properties.issuedDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> typing.Union[MetaOapg.properties.scopes, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset, + issuedDate: typing.Union[MetaOapg.properties.issuedDate, str, datetime, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ApiAccessToken': + return super().__new__( + cls, + *_args, + id=id, + name=name, + token=token, + issuedDate=issuedDate, + expirationDate=expirationDate, + scopes=scopes, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/api_access_token.pyi b/flat_api/model/api_access_token.pyi new file mode 100644 index 0000000..5cf3d15 --- /dev/null +++ b/flat_api/model/api_access_token.pyi @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ApiAccessToken( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An API access token + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + token = schemas.StrSchema + issuedDate = schemas.DateTimeSchema + expirationDate = schemas.DateTimeSchema + + + class scopes( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AppScopes']: + return AppScopes + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scopes': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AppScopes': + return super().__getitem__(i) + __annotations__ = { + "id": id, + "name": name, + "token": token, + "issuedDate": issuedDate, + "expirationDate": expirationDate, + "scopes": scopes, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issuedDate"]) -> MetaOapg.properties.issuedDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issuedDate"]) -> typing.Union[MetaOapg.properties.issuedDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> typing.Union[MetaOapg.properties.scopes, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset, + issuedDate: typing.Union[MetaOapg.properties.issuedDate, str, datetime, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ApiAccessToken': + return super().__new__( + cls, + *_args, + id=id, + name=name, + token=token, + issuedDate=issuedDate, + expirationDate=expirationDate, + scopes=scopes, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/app_scopes.py b/flat_api/model/app_scopes.py new file mode 100644 index 0000000..3032118 --- /dev/null +++ b/flat_api/model/app_scopes.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AppScopes( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Available scopes + """ + + + class MetaOapg: + enum_value_to_name = { + "account.public_profile": "ACCOUNT_PUBLIC_PROFILE", + "account.email": "ACCOUNT_EMAIL", + "account.education_profile": "ACCOUNT_EDUCATION_PROFILE", + "scores.readonly": "SCORES_READONLY", + "scores.social": "SCORES_SOCIAL", + "scores": "SCORES", + "collections.readonly": "COLLECTIONS_READONLY", + "collections.add_scores": "COLLECTIONS_ADD_SCORES", + "collections": "COLLECTIONS", + "edu.resources": "EDU_RESOURCES", + "edu.resources.readonly": "EDU_RESOURCES_READONLY", + "edu.classes": "EDU_CLASSES", + "edu.classes.readonly": "EDU_CLASSES_READONLY", + "edu.assignments": "EDU_ASSIGNMENTS", + "edu.assignments.readonly": "EDU_ASSIGNMENTS_READONLY", + "edu.admin": "EDU_ADMIN", + "edu.admin.lti": "EDU_ADMIN_LTI", + "edu.admin.lti.readonly": "EDU_ADMIN_LTI_READONLY", + "edu.admin.users": "EDU_ADMIN_USERS", + "edu.admin.users.readonly": "EDU_ADMIN_USERS_READONLY", + "tasks.readonly": "TASKS_READONLY", + } + + @schemas.classproperty + def ACCOUNT_PUBLIC_PROFILE(cls): + return cls("account.public_profile") + + @schemas.classproperty + def ACCOUNT_EMAIL(cls): + return cls("account.email") + + @schemas.classproperty + def ACCOUNT_EDUCATION_PROFILE(cls): + return cls("account.education_profile") + + @schemas.classproperty + def SCORES_READONLY(cls): + return cls("scores.readonly") + + @schemas.classproperty + def SCORES_SOCIAL(cls): + return cls("scores.social") + + @schemas.classproperty + def SCORES(cls): + return cls("scores") + + @schemas.classproperty + def COLLECTIONS_READONLY(cls): + return cls("collections.readonly") + + @schemas.classproperty + def COLLECTIONS_ADD_SCORES(cls): + return cls("collections.add_scores") + + @schemas.classproperty + def COLLECTIONS(cls): + return cls("collections") + + @schemas.classproperty + def EDU_RESOURCES(cls): + return cls("edu.resources") + + @schemas.classproperty + def EDU_RESOURCES_READONLY(cls): + return cls("edu.resources.readonly") + + @schemas.classproperty + def EDU_CLASSES(cls): + return cls("edu.classes") + + @schemas.classproperty + def EDU_CLASSES_READONLY(cls): + return cls("edu.classes.readonly") + + @schemas.classproperty + def EDU_ASSIGNMENTS(cls): + return cls("edu.assignments") + + @schemas.classproperty + def EDU_ASSIGNMENTS_READONLY(cls): + return cls("edu.assignments.readonly") + + @schemas.classproperty + def EDU_ADMIN(cls): + return cls("edu.admin") + + @schemas.classproperty + def EDU_ADMIN_LTI(cls): + return cls("edu.admin.lti") + + @schemas.classproperty + def EDU_ADMIN_LTI_READONLY(cls): + return cls("edu.admin.lti.readonly") + + @schemas.classproperty + def EDU_ADMIN_USERS(cls): + return cls("edu.admin.users") + + @schemas.classproperty + def EDU_ADMIN_USERS_READONLY(cls): + return cls("edu.admin.users.readonly") + + @schemas.classproperty + def TASKS_READONLY(cls): + return cls("tasks.readonly") diff --git a/flat_api/model/app_scopes.pyi b/flat_api/model/app_scopes.pyi new file mode 100644 index 0000000..8c9c2c8 --- /dev/null +++ b/flat_api/model/app_scopes.pyi @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AppScopes( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Available scopes + """ + + @schemas.classproperty + def ACCOUNT_PUBLIC_PROFILE(cls): + return cls("account.public_profile") + + @schemas.classproperty + def ACCOUNT_EMAIL(cls): + return cls("account.email") + + @schemas.classproperty + def ACCOUNT_EDUCATION_PROFILE(cls): + return cls("account.education_profile") + + @schemas.classproperty + def SCORES_READONLY(cls): + return cls("scores.readonly") + + @schemas.classproperty + def SCORES_SOCIAL(cls): + return cls("scores.social") + + @schemas.classproperty + def SCORES(cls): + return cls("scores") + + @schemas.classproperty + def COLLECTIONS_READONLY(cls): + return cls("collections.readonly") + + @schemas.classproperty + def COLLECTIONS_ADD_SCORES(cls): + return cls("collections.add_scores") + + @schemas.classproperty + def COLLECTIONS(cls): + return cls("collections") + + @schemas.classproperty + def EDU_RESOURCES(cls): + return cls("edu.resources") + + @schemas.classproperty + def EDU_RESOURCES_READONLY(cls): + return cls("edu.resources.readonly") + + @schemas.classproperty + def EDU_CLASSES(cls): + return cls("edu.classes") + + @schemas.classproperty + def EDU_CLASSES_READONLY(cls): + return cls("edu.classes.readonly") + + @schemas.classproperty + def EDU_ASSIGNMENTS(cls): + return cls("edu.assignments") + + @schemas.classproperty + def EDU_ASSIGNMENTS_READONLY(cls): + return cls("edu.assignments.readonly") + + @schemas.classproperty + def EDU_ADMIN(cls): + return cls("edu.admin") + + @schemas.classproperty + def EDU_ADMIN_LTI(cls): + return cls("edu.admin.lti") + + @schemas.classproperty + def EDU_ADMIN_LTI_READONLY(cls): + return cls("edu.admin.lti.readonly") + + @schemas.classproperty + def EDU_ADMIN_USERS(cls): + return cls("edu.admin.users") + + @schemas.classproperty + def EDU_ADMIN_USERS_READONLY(cls): + return cls("edu.admin.users.readonly") + + @schemas.classproperty + def TASKS_READONLY(cls): + return cls("tasks.readonly") diff --git a/flat_api/model/assignment.py b/flat_api/model/assignment.py new file mode 100644 index 0000000..d1b9c1c --- /dev/null +++ b/flat_api/model/assignment.py @@ -0,0 +1,441 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Assignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment details + """ + + + class MetaOapg: + required = { + "attachments", + "capabilities", + "id", + "title", + "type", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "attachments": attachments, + "description": description, + "cover": cover, + "coverFile": coverFile, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + } + + attachments: MetaOapg.properties.attachments + capabilities: MetaOapg.properties.capabilities + id: MetaOapg.properties.id + title: MetaOapg.properties.title + type: 'AssignmentType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'AssignmentType', + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Assignment': + return super().__new__( + cls, + *_args, + attachments=attachments, + capabilities=capabilities, + id=id, + title=title, + type=type, + description=description, + cover=cover, + coverFile=coverFile, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment.pyi b/flat_api/model/assignment.pyi new file mode 100644 index 0000000..2abadd5 --- /dev/null +++ b/flat_api/model/assignment.pyi @@ -0,0 +1,434 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Assignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment details + """ + + + class MetaOapg: + required = { + "attachments", + "capabilities", + "id", + "title", + "type", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "attachments": attachments, + "description": description, + "cover": cover, + "coverFile": coverFile, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + } + + attachments: MetaOapg.properties.attachments + capabilities: MetaOapg.properties.capabilities + id: MetaOapg.properties.id + title: MetaOapg.properties.title + type: 'AssignmentType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'AssignmentType', + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Assignment': + return super().__new__( + cls, + *_args, + attachments=attachments, + capabilities=capabilities, + id=id, + title=title, + type=type, + description=description, + cover=cover, + coverFile=coverFile, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment_copy.py b/flat_api/model/assignment_copy.py new file mode 100644 index 0000000..cf383d0 --- /dev/null +++ b/flat_api/model/assignment_copy.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentCopy( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + classroom = schemas.StrSchema + assignment = schemas.StrSchema + scheduledDate = schemas.DateTimeSchema + libraryParent = schemas.StrSchema + __annotations__ = { + "classroom": classroom, + "assignment": assignment, + "scheduledDate": scheduledDate, + "libraryParent": libraryParent, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["libraryParent"]) -> MetaOapg.properties.libraryParent: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["libraryParent"]) -> typing.Union[MetaOapg.properties.libraryParent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, + assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, + libraryParent: typing.Union[MetaOapg.properties.libraryParent, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentCopy': + return super().__new__( + cls, + *_args, + classroom=classroom, + assignment=assignment, + scheduledDate=scheduledDate, + libraryParent=libraryParent, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_copy.pyi b/flat_api/model/assignment_copy.pyi new file mode 100644 index 0000000..cf383d0 --- /dev/null +++ b/flat_api/model/assignment_copy.pyi @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentCopy( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + classroom = schemas.StrSchema + assignment = schemas.StrSchema + scheduledDate = schemas.DateTimeSchema + libraryParent = schemas.StrSchema + __annotations__ = { + "classroom": classroom, + "assignment": assignment, + "scheduledDate": scheduledDate, + "libraryParent": libraryParent, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["libraryParent"]) -> MetaOapg.properties.libraryParent: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["libraryParent"]) -> typing.Union[MetaOapg.properties.libraryParent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, + assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, + libraryParent: typing.Union[MetaOapg.properties.libraryParent, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentCopy': + return super().__new__( + cls, + *_args, + classroom=classroom, + assignment=assignment, + scheduledDate=scheduledDate, + libraryParent=libraryParent, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_copy_response.py b/flat_api/model/assignment_copy_response.py new file mode 100644 index 0000000..1656f6f --- /dev/null +++ b/flat_api/model/assignment_copy_response.py @@ -0,0 +1,436 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentCopyResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + resource = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "resource": resource, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + resource: typing.Union[MetaOapg.properties.resource, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentCopyResponse': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + resource=resource, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment_copy_response.pyi b/flat_api/model/assignment_copy_response.pyi new file mode 100644 index 0000000..f4db516 --- /dev/null +++ b/flat_api/model/assignment_copy_response.pyi @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentCopyResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + resource = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "resource": resource, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + resource: typing.Union[MetaOapg.properties.resource, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentCopyResponse': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + resource=resource, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment_submission.py b/flat_api/model/assignment_submission.py new file mode 100644 index 0000000..a3afffd --- /dev/null +++ b/flat_api/model/assignment_submission.py @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Submission + """ + + + class MetaOapg: + required = { + "creator", + "attachments", + "assignment", + "classroom", + "id", + "state", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def state() -> typing.Type['AssignmentSubmissionState']: + return AssignmentSubmissionState + classroom = schemas.StrSchema + assignment = schemas.StrSchema + creator = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + creationDate = schemas.StrSchema + submissionDate = schemas.StrSchema + returnDate = schemas.StrSchema + returnCreator = schemas.StrSchema + + + class grade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class draftGrade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'draftGrade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + maxPoints = schemas.NumberSchema + + + class exercisesIds( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'exercisesIds': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + @staticmethod + def googleClassroom() -> typing.Type['GoogleClassroomSubmission']: + return GoogleClassroomSubmission + + @staticmethod + def microsoftGraph() -> typing.Type['MicrosoftGraphSubmission']: + return MicrosoftGraphSubmission + __annotations__ = { + "id": id, + "state": state, + "classroom": classroom, + "assignment": assignment, + "creator": creator, + "attachments": attachments, + "creationDate": creationDate, + "submissionDate": submissionDate, + "returnDate": returnDate, + "returnCreator": returnCreator, + "grade": grade, + "draftGrade": draftGrade, + "maxPoints": maxPoints, + "exercisesIds": exercisesIds, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + } + + creator: MetaOapg.properties.creator + attachments: MetaOapg.properties.attachments + assignment: MetaOapg.properties.assignment + classroom: MetaOapg.properties.classroom + id: MetaOapg.properties.id + state: 'AssignmentSubmissionState' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submissionDate"]) -> MetaOapg.properties.submissionDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["returnDate"]) -> MetaOapg.properties.returnDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["returnCreator"]) -> MetaOapg.properties.returnCreator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomSubmission': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphSubmission': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submissionDate"]) -> typing.Union[MetaOapg.properties.submissionDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["returnDate"]) -> typing.Union[MetaOapg.properties.returnDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["returnCreator"]) -> typing.Union[MetaOapg.properties.returnCreator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomSubmission', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphSubmission', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + creator: typing.Union[MetaOapg.properties.creator, str, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], + assignment: typing.Union[MetaOapg.properties.assignment, str, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + state: 'AssignmentSubmissionState', + creationDate: typing.Union[MetaOapg.properties.creationDate, str, schemas.Unset] = schemas.unset, + submissionDate: typing.Union[MetaOapg.properties.submissionDate, str, schemas.Unset] = schemas.unset, + returnDate: typing.Union[MetaOapg.properties.returnDate, str, schemas.Unset] = schemas.unset, + returnCreator: typing.Union[MetaOapg.properties.returnCreator, str, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union['GoogleClassroomSubmission', schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union['MicrosoftGraphSubmission', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmission': + return super().__new__( + cls, + *_args, + creator=creator, + attachments=attachments, + assignment=assignment, + classroom=classroom, + id=id, + state=state, + creationDate=creationDate, + submissionDate=submissionDate, + returnDate=returnDate, + returnCreator=returnCreator, + grade=grade, + draftGrade=draftGrade, + maxPoints=maxPoints, + exercisesIds=exercisesIds, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission_state import AssignmentSubmissionState +from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission diff --git a/flat_api/model/assignment_submission.pyi b/flat_api/model/assignment_submission.pyi new file mode 100644 index 0000000..a3afffd --- /dev/null +++ b/flat_api/model/assignment_submission.pyi @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Submission + """ + + + class MetaOapg: + required = { + "creator", + "attachments", + "assignment", + "classroom", + "id", + "state", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def state() -> typing.Type['AssignmentSubmissionState']: + return AssignmentSubmissionState + classroom = schemas.StrSchema + assignment = schemas.StrSchema + creator = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + creationDate = schemas.StrSchema + submissionDate = schemas.StrSchema + returnDate = schemas.StrSchema + returnCreator = schemas.StrSchema + + + class grade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class draftGrade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'draftGrade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + maxPoints = schemas.NumberSchema + + + class exercisesIds( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'exercisesIds': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + @staticmethod + def googleClassroom() -> typing.Type['GoogleClassroomSubmission']: + return GoogleClassroomSubmission + + @staticmethod + def microsoftGraph() -> typing.Type['MicrosoftGraphSubmission']: + return MicrosoftGraphSubmission + __annotations__ = { + "id": id, + "state": state, + "classroom": classroom, + "assignment": assignment, + "creator": creator, + "attachments": attachments, + "creationDate": creationDate, + "submissionDate": submissionDate, + "returnDate": returnDate, + "returnCreator": returnCreator, + "grade": grade, + "draftGrade": draftGrade, + "maxPoints": maxPoints, + "exercisesIds": exercisesIds, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + } + + creator: MetaOapg.properties.creator + attachments: MetaOapg.properties.attachments + assignment: MetaOapg.properties.assignment + classroom: MetaOapg.properties.classroom + id: MetaOapg.properties.id + state: 'AssignmentSubmissionState' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submissionDate"]) -> MetaOapg.properties.submissionDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["returnDate"]) -> MetaOapg.properties.returnDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["returnCreator"]) -> MetaOapg.properties.returnCreator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomSubmission': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphSubmission': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submissionDate"]) -> typing.Union[MetaOapg.properties.submissionDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["returnDate"]) -> typing.Union[MetaOapg.properties.returnDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["returnCreator"]) -> typing.Union[MetaOapg.properties.returnCreator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomSubmission', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphSubmission', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + creator: typing.Union[MetaOapg.properties.creator, str, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], + assignment: typing.Union[MetaOapg.properties.assignment, str, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + state: 'AssignmentSubmissionState', + creationDate: typing.Union[MetaOapg.properties.creationDate, str, schemas.Unset] = schemas.unset, + submissionDate: typing.Union[MetaOapg.properties.submissionDate, str, schemas.Unset] = schemas.unset, + returnDate: typing.Union[MetaOapg.properties.returnDate, str, schemas.Unset] = schemas.unset, + returnCreator: typing.Union[MetaOapg.properties.returnCreator, str, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union['GoogleClassroomSubmission', schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union['MicrosoftGraphSubmission', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmission': + return super().__new__( + cls, + *_args, + creator=creator, + attachments=attachments, + assignment=assignment, + classroom=classroom, + id=id, + state=state, + creationDate=creationDate, + submissionDate=submissionDate, + returnDate=returnDate, + returnCreator=returnCreator, + grade=grade, + draftGrade=draftGrade, + maxPoints=maxPoints, + exercisesIds=exercisesIds, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission_state import AssignmentSubmissionState +from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission diff --git a/flat_api/model/assignment_submission_comment.py b/flat_api/model/assignment_submission_comment.py new file mode 100644 index 0000000..2c28b25 --- /dev/null +++ b/flat_api/model/assignment_submission_comment.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionComment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Feedback comment added to an assignment submission + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + user = schemas.StrSchema + submission = schemas.StrSchema + date = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + comment = schemas.StrSchema + unread = schemas.BoolSchema + __annotations__ = { + "id": id, + "user": user, + "submission": submission, + "date": date, + "modificationDate": modificationDate, + "comment": comment, + "unread": unread, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submission"]) -> MetaOapg.properties.submission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submission"]) -> typing.Union[MetaOapg.properties.submission, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + submission: typing.Union[MetaOapg.properties.submission, str, schemas.Unset] = schemas.unset, + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + unread: typing.Union[MetaOapg.properties.unread, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionComment': + return super().__new__( + cls, + *_args, + id=id, + user=user, + submission=submission, + date=date, + modificationDate=modificationDate, + comment=comment, + unread=unread, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_submission_comment.pyi b/flat_api/model/assignment_submission_comment.pyi new file mode 100644 index 0000000..2c28b25 --- /dev/null +++ b/flat_api/model/assignment_submission_comment.pyi @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionComment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Feedback comment added to an assignment submission + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + user = schemas.StrSchema + submission = schemas.StrSchema + date = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + comment = schemas.StrSchema + unread = schemas.BoolSchema + __annotations__ = { + "id": id, + "user": user, + "submission": submission, + "date": date, + "modificationDate": modificationDate, + "comment": comment, + "unread": unread, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submission"]) -> MetaOapg.properties.submission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submission"]) -> typing.Union[MetaOapg.properties.submission, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + submission: typing.Union[MetaOapg.properties.submission, str, schemas.Unset] = schemas.unset, + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + unread: typing.Union[MetaOapg.properties.unread, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionComment': + return super().__new__( + cls, + *_args, + id=id, + user=user, + submission=submission, + date=date, + modificationDate=modificationDate, + comment=comment, + unread=unread, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_submission_comment_creation.py b/flat_api/model/assignment_submission_comment_creation.py new file mode 100644 index 0000000..d45f708 --- /dev/null +++ b/flat_api/model/assignment_submission_comment_creation.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionCommentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a assignment submission comment + """ + + + class MetaOapg: + required = { + "comment", + } + + class properties: + comment = schemas.StrSchema + __annotations__ = { + "comment": comment, + } + + comment: MetaOapg.properties.comment + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + comment: typing.Union[MetaOapg.properties.comment, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionCommentCreation': + return super().__new__( + cls, + *_args, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_submission_comment_creation.pyi b/flat_api/model/assignment_submission_comment_creation.pyi new file mode 100644 index 0000000..d45f708 --- /dev/null +++ b/flat_api/model/assignment_submission_comment_creation.pyi @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionCommentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a assignment submission comment + """ + + + class MetaOapg: + required = { + "comment", + } + + class properties: + comment = schemas.StrSchema + __annotations__ = { + "comment": comment, + } + + comment: MetaOapg.properties.comment + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + comment: typing.Union[MetaOapg.properties.comment, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionCommentCreation': + return super().__new__( + cls, + *_args, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/assignment_submission_history.py b/flat_api/model/assignment_submission_history.py new file mode 100644 index 0000000..fa2b7ec --- /dev/null +++ b/flat_api/model/assignment_submission_history.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionHistory( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + History item of the submission + """ + + + class MetaOapg: + + class properties: + date = schemas.DateTimeSchema + + + class users( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'users': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class source( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "lti": "LTI", + "googleClassroom": "GOOGLE_CLASSROOM", + "microsoftGraph": "MICROSOFT_GRAPH", + } + + @schemas.classproperty + def LTI(cls): + return cls("lti") + + @schemas.classproperty + def GOOGLE_CLASSROOM(cls): + return cls("googleClassroom") + + @schemas.classproperty + def MICROSOFT_GRAPH(cls): + return cls("microsoftGraph") + + @staticmethod + def state() -> typing.Type['AssignmentSubmissionHistoryState']: + return AssignmentSubmissionHistoryState + draftGrade = schemas.NumberSchema + grade = schemas.NumberSchema + maxPoints = schemas.NumberSchema + comment = schemas.StrSchema + dueDate = schemas.DateTimeSchema + + + class attachment( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + score = schemas.StrSchema + revision = schemas.StrSchema + title = schemas.StrSchema + __annotations__ = { + "score": score, + "revision": revision, + "title": title, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'attachment': + return super().__new__( + cls, + *_args, + score=score, + revision=revision, + title=title, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "date": date, + "users": users, + "source": source, + "state": state, + "draftGrade": draftGrade, + "grade": grade, + "maxPoints": maxPoints, + "comment": comment, + "dueDate": dueDate, + "attachment": attachment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["users"]) -> MetaOapg.properties.users: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionHistoryState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachment"]) -> MetaOapg.properties.attachment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["users"]) -> typing.Union[MetaOapg.properties.users, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union[MetaOapg.properties.source, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['AssignmentSubmissionHistoryState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachment"]) -> typing.Union[MetaOapg.properties.attachment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + users: typing.Union[MetaOapg.properties.users, list, tuple, schemas.Unset] = schemas.unset, + source: typing.Union[MetaOapg.properties.source, str, schemas.Unset] = schemas.unset, + state: typing.Union['AssignmentSubmissionHistoryState', schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, + attachment: typing.Union[MetaOapg.properties.attachment, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionHistory': + return super().__new__( + cls, + *_args, + date=date, + users=users, + source=source, + state=state, + draftGrade=draftGrade, + grade=grade, + maxPoints=maxPoints, + comment=comment, + dueDate=dueDate, + attachment=attachment, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState diff --git a/flat_api/model/assignment_submission_history.pyi b/flat_api/model/assignment_submission_history.pyi new file mode 100644 index 0000000..39c0ff3 --- /dev/null +++ b/flat_api/model/assignment_submission_history.pyi @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionHistory( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + History item of the submission + """ + + + class MetaOapg: + + class properties: + date = schemas.DateTimeSchema + + + class users( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'users': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class source( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def LTI(cls): + return cls("lti") + + @schemas.classproperty + def GOOGLE_CLASSROOM(cls): + return cls("googleClassroom") + + @schemas.classproperty + def MICROSOFT_GRAPH(cls): + return cls("microsoftGraph") + + @staticmethod + def state() -> typing.Type['AssignmentSubmissionHistoryState']: + return AssignmentSubmissionHistoryState + draftGrade = schemas.NumberSchema + grade = schemas.NumberSchema + maxPoints = schemas.NumberSchema + comment = schemas.StrSchema + dueDate = schemas.DateTimeSchema + + + class attachment( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + score = schemas.StrSchema + revision = schemas.StrSchema + title = schemas.StrSchema + __annotations__ = { + "score": score, + "revision": revision, + "title": title, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'attachment': + return super().__new__( + cls, + *_args, + score=score, + revision=revision, + title=title, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "date": date, + "users": users, + "source": source, + "state": state, + "draftGrade": draftGrade, + "grade": grade, + "maxPoints": maxPoints, + "comment": comment, + "dueDate": dueDate, + "attachment": attachment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["users"]) -> MetaOapg.properties.users: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionHistoryState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachment"]) -> MetaOapg.properties.attachment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["users"]) -> typing.Union[MetaOapg.properties.users, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union[MetaOapg.properties.source, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['AssignmentSubmissionHistoryState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachment"]) -> typing.Union[MetaOapg.properties.attachment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + users: typing.Union[MetaOapg.properties.users, list, tuple, schemas.Unset] = schemas.unset, + source: typing.Union[MetaOapg.properties.source, str, schemas.Unset] = schemas.unset, + state: typing.Union['AssignmentSubmissionHistoryState', schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, + attachment: typing.Union[MetaOapg.properties.attachment, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionHistory': + return super().__new__( + cls, + *_args, + date=date, + users=users, + source=source, + state=state, + draftGrade=draftGrade, + grade=grade, + maxPoints=maxPoints, + comment=comment, + dueDate=dueDate, + attachment=attachment, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState diff --git a/flat_api/model/assignment_submission_history_state.py b/flat_api/model/assignment_submission_history_state.py new file mode 100644 index 0000000..5f528dc --- /dev/null +++ b/flat_api/model/assignment_submission_history_state.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionHistoryState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the submission history + """ + + + class MetaOapg: + enum_value_to_name = { + "created": "CREATED", + "turnedIn": "TURNED_IN", + "returned": "RETURNED", + "reset": "RESET", + } + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def TURNED_IN(cls): + return cls("turnedIn") + + @schemas.classproperty + def RETURNED(cls): + return cls("returned") + + @schemas.classproperty + def RESET(cls): + return cls("reset") diff --git a/flat_api/model/assignment_submission_history_state.pyi b/flat_api/model/assignment_submission_history_state.pyi new file mode 100644 index 0000000..8ba3a84 --- /dev/null +++ b/flat_api/model/assignment_submission_history_state.pyi @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionHistoryState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the submission history + """ + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def TURNED_IN(cls): + return cls("turnedIn") + + @schemas.classproperty + def RETURNED(cls): + return cls("returned") + + @schemas.classproperty + def RESET(cls): + return cls("reset") diff --git a/flat_api/model/assignment_submission_state.py b/flat_api/model/assignment_submission_state.py new file mode 100644 index 0000000..5226d31 --- /dev/null +++ b/flat_api/model/assignment_submission_state.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the submission + """ + + + class MetaOapg: + enum_value_to_name = { + "created": "CREATED", + "turnedIn": "TURNED_IN", + "returned": "RETURNED", + } + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def TURNED_IN(cls): + return cls("turnedIn") + + @schemas.classproperty + def RETURNED(cls): + return cls("returned") diff --git a/flat_api/model/assignment_submission_state.pyi b/flat_api/model/assignment_submission_state.pyi new file mode 100644 index 0000000..9b3d2de --- /dev/null +++ b/flat_api/model/assignment_submission_state.pyi @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the submission + """ + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def TURNED_IN(cls): + return cls("turnedIn") + + @schemas.classproperty + def RETURNED(cls): + return cls("returned") diff --git a/flat_api/model/assignment_submission_update.py b/flat_api/model/assignment_submission_update.py new file mode 100644 index 0000000..4c6ca72 --- /dev/null +++ b/flat_api/model/assignment_submission_update.py @@ -0,0 +1,296 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Submission creation + """ + + + class MetaOapg: + + class properties: + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + submit = schemas.BoolSchema + + + class draftGrade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'draftGrade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class grade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class exercisesIds( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'exercisesIds': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + _return = schemas.BoolSchema + + + class comments( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + unread = schemas.NumberSchema + __annotations__ = { + "total": total, + "unread": unread, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + unread: typing.Union[MetaOapg.properties.unread, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'comments': + return super().__new__( + cls, + *_args, + total=total, + unread=unread, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "attachments": attachments, + "submit": submit, + "draftGrade": draftGrade, + "grade": grade, + "exercisesIds": exercisesIds, + "return": _return, + "comments": comments, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submit"]) -> MetaOapg.properties.submit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comments"]) -> MetaOapg.properties.comments: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submit"]) -> typing.Union[MetaOapg.properties.submit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union[MetaOapg.properties.comments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + submit: typing.Union[MetaOapg.properties.submit, bool, schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, + comments: typing.Union[MetaOapg.properties.comments, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionUpdate': + return super().__new__( + cls, + *_args, + attachments=attachments, + submit=submit, + draftGrade=draftGrade, + grade=grade, + exercisesIds=exercisesIds, + comments=comments, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/assignment_submission_update.pyi b/flat_api/model/assignment_submission_update.pyi new file mode 100644 index 0000000..32f956a --- /dev/null +++ b/flat_api/model/assignment_submission_update.pyi @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentSubmissionUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Submission creation + """ + + + class MetaOapg: + + class properties: + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + submit = schemas.BoolSchema + + + class draftGrade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'draftGrade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class grade( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grade': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class exercisesIds( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'exercisesIds': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + _return = schemas.BoolSchema + + + class comments( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + unread = schemas.NumberSchema + __annotations__ = { + "total": total, + "unread": unread, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + unread: typing.Union[MetaOapg.properties.unread, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'comments': + return super().__new__( + cls, + *_args, + total=total, + unread=unread, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "attachments": attachments, + "submit": submit, + "draftGrade": draftGrade, + "grade": grade, + "exercisesIds": exercisesIds, + "return": _return, + "comments": comments, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submit"]) -> MetaOapg.properties.submit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comments"]) -> MetaOapg.properties.comments: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submit"]) -> typing.Union[MetaOapg.properties.submit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union[MetaOapg.properties.comments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + submit: typing.Union[MetaOapg.properties.submit, bool, schemas.Unset] = schemas.unset, + draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, + comments: typing.Union[MetaOapg.properties.comments, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentSubmissionUpdate': + return super().__new__( + cls, + *_args, + attachments=attachments, + submit=submit, + draftGrade=draftGrade, + grade=grade, + exercisesIds=exercisesIds, + comments=comments, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/assignment_type.py b/flat_api/model/assignment_type.py new file mode 100644 index 0000000..c938797 --- /dev/null +++ b/flat_api/model/assignment_type.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of the assignment + """ + + + class MetaOapg: + enum_value_to_name = { + "none": "NONE", + "newScore": "NEW_SCORE", + "scoreTemplate": "SCORE_TEMPLATE", + "sharedWriting": "SHARED_WRITING", + "worksheet": "WORKSHEET", + "performance": "PERFORMANCE", + } + + @schemas.classproperty + def NONE(cls): + return cls("none") + + @schemas.classproperty + def NEW_SCORE(cls): + return cls("newScore") + + @schemas.classproperty + def SCORE_TEMPLATE(cls): + return cls("scoreTemplate") + + @schemas.classproperty + def SHARED_WRITING(cls): + return cls("sharedWriting") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") diff --git a/flat_api/model/assignment_type.pyi b/flat_api/model/assignment_type.pyi new file mode 100644 index 0000000..9897fde --- /dev/null +++ b/flat_api/model/assignment_type.pyi @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of the assignment + """ + + @schemas.classproperty + def NONE(cls): + return cls("none") + + @schemas.classproperty + def NEW_SCORE(cls): + return cls("newScore") + + @schemas.classproperty + def SCORE_TEMPLATE(cls): + return cls("scoreTemplate") + + @schemas.classproperty + def SHARED_WRITING(cls): + return cls("sharedWriting") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") diff --git a/flat_api/model/assignment_update.py b/flat_api/model/assignment_update.py new file mode 100644 index 0000000..1ba2d48 --- /dev/null +++ b/flat_api/model/assignment_update.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Resource Editing + """ + + + class MetaOapg: + + class properties: + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 1000 + min_length = 1 + description = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + + + class nbPlaybackAuthorized( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'nbPlaybackAuthorized': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class toolset( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'toolset': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class cover( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'cover': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class maxPoints( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'maxPoints': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + __annotations__ = { + "type": type, + "title": title, + "description": description, + "attachments": attachments, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "toolset": toolset, + "coverFile": coverFile, + "cover": cover, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentUpdate': + return super().__new__( + cls, + *_args, + type=type, + title=title, + description=description, + attachments=attachments, + nbPlaybackAuthorized=nbPlaybackAuthorized, + toolset=toolset, + coverFile=coverFile, + cover=cover, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/assignment_update.pyi b/flat_api/model/assignment_update.pyi new file mode 100644 index 0000000..c8c2dab --- /dev/null +++ b/flat_api/model/assignment_update.pyi @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class AssignmentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Assignment Resource Editing + """ + + + class MetaOapg: + + class properties: + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class title( + schemas.StrSchema + ): + pass + description = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + + + class nbPlaybackAuthorized( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'nbPlaybackAuthorized': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class toolset( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'toolset': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class cover( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'cover': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class maxPoints( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'maxPoints': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + __annotations__ = { + "type": type, + "title": title, + "description": description, + "attachments": attachments, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "toolset": toolset, + "coverFile": coverFile, + "cover": cover, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'AssignmentUpdate': + return super().__new__( + cls, + *_args, + type=type, + title=title, + description=description, + attachments=attachments, + nbPlaybackAuthorized=nbPlaybackAuthorized, + toolset=toolset, + coverFile=coverFile, + cover=cover, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/class_assignment.py b/flat_api/model/class_assignment.py new file mode 100644 index 0000000..4f29d17 --- /dev/null +++ b/flat_api/model/class_assignment.py @@ -0,0 +1,844 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAssignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + creator = schemas.StrSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "draft": "DRAFT", + "active": "ACTIVE", + "archived": "ARCHIVED", + } + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") + classroom = schemas.StrSchema + creationDate = schemas.DateTimeSchema + scheduledDate = schemas.DateTimeSchema + dueDate = schemas.DateTimeSchema + + + class assigneeMode( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "everyone": "EVERYONE", + "selected": "SELECTED", + } + + @schemas.classproperty + def EVERYONE(cls): + return cls("everyone") + + @schemas.classproperty + def SELECTED(cls): + return cls("selected") + + + class assignedStudents( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'assignedStudents': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class submissions( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'submissions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + @staticmethod + def googleClassroom() -> typing.Type['GoogleClassroomCoursework']: + return GoogleClassroomCoursework + + @staticmethod + def microsoftGraph() -> typing.Type['MicrosoftGraphAssignment']: + return MicrosoftGraphAssignment + + + class mfc( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'mfc': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class canvas( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canvas': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class lti( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + __annotations__ = { + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'lti': + return super().__new__( + cls, + *_args, + id=id, + _configuration=_configuration, + **kwargs, + ) + issue = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "creator": creator, + "state": state, + "classroom": classroom, + "creationDate": creationDate, + "scheduledDate": scheduledDate, + "dueDate": dueDate, + "assigneeMode": assigneeMode, + "assignedStudents": assignedStudents, + "submissions": submissions, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + "mfc": mfc, + "canvas": canvas, + "lti": lti, + "issue": issue, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submissions"]) -> MetaOapg.properties.submissions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomCoursework': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphAssignment': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issue"]) -> MetaOapg.properties.issue: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submissions"]) -> typing.Union[MetaOapg.properties.submissions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomCoursework', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphAssignment', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issue"]) -> typing.Union[MetaOapg.properties.issue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, + assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, + assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, + submissions: typing.Union[MetaOapg.properties.submissions, list, tuple, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union['GoogleClassroomCoursework', schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union['MicrosoftGraphAssignment', schemas.Unset] = schemas.unset, + mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + issue: typing.Union[MetaOapg.properties.issue, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAssignment': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + creator=creator, + state=state, + classroom=classroom, + creationDate=creationDate, + scheduledDate=scheduledDate, + dueDate=dueDate, + assigneeMode=assigneeMode, + assignedStudents=assignedStudents, + submissions=submissions, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + mfc=mfc, + canvas=canvas, + lti=lti, + issue=issue, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment diff --git a/flat_api/model/class_assignment.pyi b/flat_api/model/class_assignment.pyi new file mode 100644 index 0000000..f4c0c7f --- /dev/null +++ b/flat_api/model/class_assignment.pyi @@ -0,0 +1,822 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAssignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + creator = schemas.StrSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") + classroom = schemas.StrSchema + creationDate = schemas.DateTimeSchema + scheduledDate = schemas.DateTimeSchema + dueDate = schemas.DateTimeSchema + + + class assigneeMode( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def EVERYONE(cls): + return cls("everyone") + + @schemas.classproperty + def SELECTED(cls): + return cls("selected") + + + class assignedStudents( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'assignedStudents': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class submissions( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'submissions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + @staticmethod + def googleClassroom() -> typing.Type['GoogleClassroomCoursework']: + return GoogleClassroomCoursework + + @staticmethod + def microsoftGraph() -> typing.Type['MicrosoftGraphAssignment']: + return MicrosoftGraphAssignment + + + class mfc( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'mfc': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class canvas( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canvas': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class lti( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + __annotations__ = { + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'lti': + return super().__new__( + cls, + *_args, + id=id, + _configuration=_configuration, + **kwargs, + ) + issue = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "creator": creator, + "state": state, + "classroom": classroom, + "creationDate": creationDate, + "scheduledDate": scheduledDate, + "dueDate": dueDate, + "assigneeMode": assigneeMode, + "assignedStudents": assignedStudents, + "submissions": submissions, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + "mfc": mfc, + "canvas": canvas, + "lti": lti, + "issue": issue, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["submissions"]) -> MetaOapg.properties.submissions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomCoursework': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphAssignment': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issue"]) -> MetaOapg.properties.issue: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["submissions"]) -> typing.Union[MetaOapg.properties.submissions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomCoursework', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphAssignment', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issue"]) -> typing.Union[MetaOapg.properties.issue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, + assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, + assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, + submissions: typing.Union[MetaOapg.properties.submissions, list, tuple, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union['GoogleClassroomCoursework', schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union['MicrosoftGraphAssignment', schemas.Unset] = schemas.unset, + mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + issue: typing.Union[MetaOapg.properties.issue, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAssignment': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + creator=creator, + state=state, + classroom=classroom, + creationDate=creationDate, + scheduledDate=scheduledDate, + dueDate=dueDate, + assigneeMode=assigneeMode, + assignedStudents=assignedStudents, + submissions=submissions, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + mfc=mfc, + canvas=canvas, + lti=lti, + issue=issue, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment diff --git a/flat_api/model/class_assignment_update.py b/flat_api/model/class_assignment_update.py new file mode 100644 index 0000000..48ca1c3 --- /dev/null +++ b/flat_api/model/class_assignment_update.py @@ -0,0 +1,659 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAssignmentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 1000 + min_length = 1 + description = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + + + class nbPlaybackAuthorized( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'nbPlaybackAuthorized': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class toolset( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'toolset': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class cover( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'cover': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class maxPoints( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'maxPoints': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "draft": "DRAFT", + "active": "ACTIVE", + } + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + + class dueDate( + schemas.DateTimeBase, + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + class MetaOapg: + format = 'date-time' + + + def __new__( + cls, + *_args: typing.Union[None, str, datetime, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'dueDate': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class scheduledDate( + schemas.DateTimeBase, + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + class MetaOapg: + format = 'date-time' + + + def __new__( + cls, + *_args: typing.Union[None, str, datetime, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scheduledDate': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class googleClassroom( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class topicId( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'topicId': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "topicId": topicId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleClassroom': + return super().__new__( + cls, + *_args, + topicId=topicId, + _configuration=_configuration, + **kwargs, + ) + + + class microsoftGraph( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class categories( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'categories': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "categories": categories, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + categories: typing.Union[MetaOapg.properties.categories, list, tuple, None, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'microsoftGraph': + return super().__new__( + cls, + *_args, + categories=categories, + _configuration=_configuration, + **kwargs, + ) + + + class assigneeMode( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "everyone": "EVERYONE", + "selected": "SELECTED", + } + + @schemas.classproperty + def EVERYONE(cls): + return cls("everyone") + + @schemas.classproperty + def SELECTED(cls): + return cls("selected") + + + class assignedStudents( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'assignedStudents': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "type": type, + "title": title, + "description": description, + "attachments": attachments, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "toolset": toolset, + "coverFile": coverFile, + "cover": cover, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "state": state, + "dueDate": dueDate, + "scheduledDate": scheduledDate, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + "assigneeMode": assigneeMode, + "assignedStudents": assignedStudents, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, None, str, datetime, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, None, str, datetime, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, + assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAssignmentUpdate': + return super().__new__( + cls, + *_args, + type=type, + title=title, + description=description, + attachments=attachments, + nbPlaybackAuthorized=nbPlaybackAuthorized, + toolset=toolset, + coverFile=coverFile, + cover=cover, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + state=state, + dueDate=dueDate, + scheduledDate=scheduledDate, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + assigneeMode=assigneeMode, + assignedStudents=assignedStudents, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/class_assignment_update.pyi b/flat_api/model/class_assignment_update.pyi new file mode 100644 index 0000000..8adace4 --- /dev/null +++ b/flat_api/model/class_assignment_update.pyi @@ -0,0 +1,632 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAssignmentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class title( + schemas.StrSchema + ): + pass + description = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAttachmentCreation']: + return ClassAttachmentCreation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAttachmentCreation': + return super().__getitem__(i) + + + class nbPlaybackAuthorized( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'nbPlaybackAuthorized': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class toolset( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'toolset': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class cover( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'cover': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class maxPoints( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'maxPoints': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + + class dueDate( + schemas.DateTimeBase, + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + class MetaOapg: + format = 'date-time' + + + def __new__( + cls, + *_args: typing.Union[None, str, datetime, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'dueDate': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class scheduledDate( + schemas.DateTimeBase, + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + class MetaOapg: + format = 'date-time' + + + def __new__( + cls, + *_args: typing.Union[None, str, datetime, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scheduledDate': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class googleClassroom( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class topicId( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'topicId': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "topicId": topicId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleClassroom': + return super().__new__( + cls, + *_args, + topicId=topicId, + _configuration=_configuration, + **kwargs, + ) + + + class microsoftGraph( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class categories( + schemas.ListBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneTupleMixin + ): + + + class MetaOapg: + items = schemas.StrSchema + + + def __new__( + cls, + *_args: typing.Union[list, tuple, None, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'categories': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "categories": categories, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + categories: typing.Union[MetaOapg.properties.categories, list, tuple, None, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'microsoftGraph': + return super().__new__( + cls, + *_args, + categories=categories, + _configuration=_configuration, + **kwargs, + ) + + + class assigneeMode( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def EVERYONE(cls): + return cls("everyone") + + @schemas.classproperty + def SELECTED(cls): + return cls("selected") + + + class assignedStudents( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'assignedStudents': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "type": type, + "title": title, + "description": description, + "attachments": attachments, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + "toolset": toolset, + "coverFile": coverFile, + "cover": cover, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "state": state, + "dueDate": dueDate, + "scheduledDate": scheduledDate, + "googleClassroom": googleClassroom, + "microsoftGraph": microsoftGraph, + "assigneeMode": assigneeMode, + "assignedStudents": assignedStudents, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + dueDate: typing.Union[MetaOapg.properties.dueDate, None, str, datetime, schemas.Unset] = schemas.unset, + scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, None, str, datetime, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, + assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAssignmentUpdate': + return super().__new__( + cls, + *_args, + type=type, + title=title, + description=description, + attachments=attachments, + nbPlaybackAuthorized=nbPlaybackAuthorized, + toolset=toolset, + coverFile=coverFile, + cover=cover, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + state=state, + dueDate=dueDate, + scheduledDate=scheduledDate, + googleClassroom=googleClassroom, + microsoftGraph=microsoftGraph, + assigneeMode=assigneeMode, + assignedStudents=assignedStudents, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/class_attachment_creation.py b/flat_api/model/class_attachment_creation.py new file mode 100644 index 0000000..2653656 --- /dev/null +++ b/flat_api/model/class_attachment_creation.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAttachmentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attachment creation for an assignment or stream post. +This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + + """ + + + class MetaOapg: + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "rich": "RICH", + "photo": "PHOTO", + "video": "VIDEO", + "link": "LINK", + "flat": "FLAT", + "googleDrive": "GOOGLE_DRIVE", + "worksheet": "WORKSHEET", + "performance": "PERFORMANCE", + } + + @schemas.classproperty + def RICH(cls): + return cls("rich") + + @schemas.classproperty + def PHOTO(cls): + return cls("photo") + + @schemas.classproperty + def VIDEO(cls): + return cls("video") + + @schemas.classproperty + def LINK(cls): + return cls("link") + + @schemas.classproperty + def FLAT(cls): + return cls("flat") + + @schemas.classproperty + def GOOGLE_DRIVE(cls): + return cls("googleDrive") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") + score = schemas.StrSchema + worksheet = schemas.StrSchema + + @staticmethod + def sharingMode() -> typing.Type['MediaScoreSharingMode']: + return MediaScoreSharingMode + lockScoreTemplate = schemas.BoolSchema + url = schemas.StrSchema + googleDriveFileId = schemas.StrSchema + __annotations__ = { + "type": type, + "score": score, + "worksheet": worksheet, + "sharingMode": sharingMode, + "lockScoreTemplate": lockScoreTemplate, + "url": url, + "googleDriveFileId": googleDriveFileId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, + sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, + lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAttachmentCreation': + return super().__new__( + cls, + *_args, + type=type, + score=score, + worksheet=worksheet, + sharingMode=sharingMode, + lockScoreTemplate=lockScoreTemplate, + url=url, + googleDriveFileId=googleDriveFileId, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/class_attachment_creation.pyi b/flat_api/model/class_attachment_creation.pyi new file mode 100644 index 0000000..7ad4957 --- /dev/null +++ b/flat_api/model/class_attachment_creation.pyi @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassAttachmentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attachment creation for an assignment or stream post. +This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + + """ + + + class MetaOapg: + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def RICH(cls): + return cls("rich") + + @schemas.classproperty + def PHOTO(cls): + return cls("photo") + + @schemas.classproperty + def VIDEO(cls): + return cls("video") + + @schemas.classproperty + def LINK(cls): + return cls("link") + + @schemas.classproperty + def FLAT(cls): + return cls("flat") + + @schemas.classproperty + def GOOGLE_DRIVE(cls): + return cls("googleDrive") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") + score = schemas.StrSchema + worksheet = schemas.StrSchema + + @staticmethod + def sharingMode() -> typing.Type['MediaScoreSharingMode']: + return MediaScoreSharingMode + lockScoreTemplate = schemas.BoolSchema + url = schemas.StrSchema + googleDriveFileId = schemas.StrSchema + __annotations__ = { + "type": type, + "score": score, + "worksheet": worksheet, + "sharingMode": sharingMode, + "lockScoreTemplate": lockScoreTemplate, + "url": url, + "googleDriveFileId": googleDriveFileId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, + sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, + lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassAttachmentCreation': + return super().__new__( + cls, + *_args, + type=type, + score=score, + worksheet=worksheet, + sharingMode=sharingMode, + lockScoreTemplate=lockScoreTemplate, + url=url, + googleDriveFileId=googleDriveFileId, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/class_creation.py b/flat_api/model/class_creation.py new file mode 100644 index 0000000..304b846 --- /dev/null +++ b/flat_api/model/class_creation.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a classroom + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 255 + + + class section( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 255 + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "name": name, + "section": section, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassCreation': + return super().__new__( + cls, + *_args, + name=name, + section=section, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/class_creation.pyi b/flat_api/model/class_creation.pyi new file mode 100644 index 0000000..4eab4f7 --- /dev/null +++ b/flat_api/model/class_creation.pyi @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a classroom + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + pass + + + class section( + schemas.StrSchema + ): + pass + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "name": name, + "section": section, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassCreation': + return super().__new__( + cls, + *_args, + name=name, + section=section, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/class_details.py b/flat_api/model/class_details.py new file mode 100644 index 0000000..148ce57 --- /dev/null +++ b/flat_api/model/class_details.py @@ -0,0 +1,1038 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def state() -> typing.Type['ClassState']: + return ClassState + name = schemas.StrSchema + section = schemas.StrSchema + description = schemas.StrSchema + organization = schemas.StrSchema + owner = schemas.StrSchema + creationDate = schemas.DateTimeSchema + enrollmentCode = schemas.StrSchema + theme = schemas.StrSchema + assignmentsCount = schemas.NumberSchema + + @staticmethod + def studentsGroup() -> typing.Type['GroupDetails']: + return GroupDetails + + @staticmethod + def teachersGroup() -> typing.Type['GroupDetails']: + return GroupDetails + + + class issues( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class sync( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + email = schemas.StrSchema + + + class reason( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "otherOrgnanization": "OTHER_ORGNANIZATION", + "personalSubscription": "PERSONAL_SUBSCRIPTION", + } + + @schemas.classproperty + def OTHER_ORGNANIZATION(cls): + return cls("otherOrgnanization") + + @schemas.classproperty + def PERSONAL_SUBSCRIPTION(cls): + return cls("personalSubscription") + __annotations__ = { + "id": id, + "email": email, + "reason": reason, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': + return super().__new__( + cls, + *_args, + id=id, + email=email, + reason=reason, + _configuration=_configuration, + **kwargs, + ) + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'sync': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "sync": sync, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sync"]) -> MetaOapg.properties.sync: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sync"]) -> typing.Union[MetaOapg.properties.sync, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + sync: typing.Union[MetaOapg.properties.sync, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'issues': + return super().__new__( + cls, + *_args, + sync=sync, + _configuration=_configuration, + **kwargs, + ) + + + class googleClassroom( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleClassroom': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class googleDrive( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + teacherFolderId = schemas.StrSchema + teacherFolderAlternateLink = schemas.StrSchema + __annotations__ = { + "teacherFolderId": teacherFolderId, + "teacherFolderAlternateLink": teacherFolderAlternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teacherFolderId"]) -> MetaOapg.properties.teacherFolderId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> MetaOapg.properties.teacherFolderAlternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderId"]) -> typing.Union[MetaOapg.properties.teacherFolderId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> typing.Union[MetaOapg.properties.teacherFolderAlternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + teacherFolderId: typing.Union[MetaOapg.properties.teacherFolderId, str, schemas.Unset] = schemas.unset, + teacherFolderAlternateLink: typing.Union[MetaOapg.properties.teacherFolderAlternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleDrive': + return super().__new__( + cls, + *_args, + teacherFolderId=teacherFolderId, + teacherFolderAlternateLink=teacherFolderAlternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class microsoftGraph( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + __annotations__ = { + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'microsoftGraph': + return super().__new__( + cls, + *_args, + id=id, + _configuration=_configuration, + **kwargs, + ) + + + class lti( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + contextId = schemas.StrSchema + contextTitle = schemas.StrSchema + contextLabel = schemas.StrSchema + __annotations__ = { + "contextId": contextId, + "contextTitle": contextTitle, + "contextLabel": contextLabel, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextId"]) -> MetaOapg.properties.contextId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextTitle"]) -> MetaOapg.properties.contextTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextLabel"]) -> MetaOapg.properties.contextLabel: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextId"]) -> typing.Union[MetaOapg.properties.contextId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextTitle"]) -> typing.Union[MetaOapg.properties.contextTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextLabel"]) -> typing.Union[MetaOapg.properties.contextLabel, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + contextId: typing.Union[MetaOapg.properties.contextId, str, schemas.Unset] = schemas.unset, + contextTitle: typing.Union[MetaOapg.properties.contextTitle, str, schemas.Unset] = schemas.unset, + contextLabel: typing.Union[MetaOapg.properties.contextLabel, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'lti': + return super().__new__( + cls, + *_args, + contextId=contextId, + contextTitle=contextTitle, + contextLabel=contextLabel, + _configuration=_configuration, + **kwargs, + ) + + + class canvas( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + domain = schemas.StrSchema + __annotations__ = { + "id": id, + "domain": domain, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["domain"]) -> MetaOapg.properties.domain: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["domain"]) -> typing.Union[MetaOapg.properties.domain, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + domain: typing.Union[MetaOapg.properties.domain, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canvas': + return super().__new__( + cls, + *_args, + id=id, + domain=domain, + _configuration=_configuration, + **kwargs, + ) + + + class mfc( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'mfc': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class clever( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + + + class subject( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "english/language arts": "ENGLISH_LANGUAGE_ARTS", + "math": "MATH", + "science": "SCIENCE", + "social studies": "SOCIAL_STUDIES", + "language": "LANGUAGE", + "homeroom/advisory": "HOMEROOM_ADVISORY", + "interventions/online learning": "INTERVENTIONS_ONLINE_LEARNING", + "technology and engineering": "TECHNOLOGY_AND_ENGINEERING", + "PE and health": "PE_AND_HEALTH", + "arts and music": "ARTS_AND_MUSIC", + "other": "OTHER", + } + + @schemas.classproperty + def ENGLISH_LANGUAGE_ARTS(cls): + return cls("english/language arts") + + @schemas.classproperty + def MATH(cls): + return cls("math") + + @schemas.classproperty + def SCIENCE(cls): + return cls("science") + + @schemas.classproperty + def SOCIAL_STUDIES(cls): + return cls("social studies") + + @schemas.classproperty + def LANGUAGE(cls): + return cls("language") + + @schemas.classproperty + def HOMEROOM_ADVISORY(cls): + return cls("homeroom/advisory") + + @schemas.classproperty + def INTERVENTIONS_ONLINE_LEARNING(cls): + return cls("interventions/online learning") + + @schemas.classproperty + def TECHNOLOGY_AND_ENGINEERING(cls): + return cls("technology and engineering") + + @schemas.classproperty + def PE_AND_HEALTH(cls): + return cls("PE and health") + + @schemas.classproperty + def ARTS_AND_MUSIC(cls): + return cls("arts and music") + + @schemas.classproperty + def OTHER(cls): + return cls("other") + termName = schemas.StrSchema + termStartDate = schemas.DateTimeSchema + termEndDate = schemas.DateTimeSchema + __annotations__ = { + "id": id, + "creationDate": creationDate, + "modificationDate": modificationDate, + "subject": subject, + "termName": termName, + "termStartDate": termStartDate, + "termEndDate": termEndDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subject"]) -> MetaOapg.properties.subject: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termName"]) -> MetaOapg.properties.termName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termStartDate"]) -> MetaOapg.properties.termStartDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termEndDate"]) -> MetaOapg.properties.termEndDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subject"]) -> typing.Union[MetaOapg.properties.subject, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termName"]) -> typing.Union[MetaOapg.properties.termName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termStartDate"]) -> typing.Union[MetaOapg.properties.termStartDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termEndDate"]) -> typing.Union[MetaOapg.properties.termEndDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + subject: typing.Union[MetaOapg.properties.subject, str, schemas.Unset] = schemas.unset, + termName: typing.Union[MetaOapg.properties.termName, str, schemas.Unset] = schemas.unset, + termStartDate: typing.Union[MetaOapg.properties.termStartDate, str, datetime, schemas.Unset] = schemas.unset, + termEndDate: typing.Union[MetaOapg.properties.termEndDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'clever': + return super().__new__( + cls, + *_args, + id=id, + creationDate=creationDate, + modificationDate=modificationDate, + subject=subject, + termName=termName, + termStartDate=termStartDate, + termEndDate=termEndDate, + _configuration=_configuration, + **kwargs, + ) + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "state": state, + "name": name, + "section": section, + "description": description, + "organization": organization, + "owner": owner, + "creationDate": creationDate, + "enrollmentCode": enrollmentCode, + "theme": theme, + "assignmentsCount": assignmentsCount, + "studentsGroup": studentsGroup, + "teachersGroup": teachersGroup, + "issues": issues, + "googleClassroom": googleClassroom, + "googleDrive": googleDrive, + "microsoftGraph": microsoftGraph, + "lti": lti, + "canvas": canvas, + "mfc": mfc, + "clever": clever, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ClassState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["owner"]) -> MetaOapg.properties.owner: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["enrollmentCode"]) -> MetaOapg.properties.enrollmentCode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["theme"]) -> MetaOapg.properties.theme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignmentsCount"]) -> MetaOapg.properties.assignmentsCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["studentsGroup"]) -> 'GroupDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teachersGroup"]) -> 'GroupDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issues"]) -> MetaOapg.properties.issues: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clever"]) -> MetaOapg.properties.clever: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ClassState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["owner"]) -> typing.Union[MetaOapg.properties.owner, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["enrollmentCode"]) -> typing.Union[MetaOapg.properties.enrollmentCode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["theme"]) -> typing.Union[MetaOapg.properties.theme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignmentsCount"]) -> typing.Union[MetaOapg.properties.assignmentsCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["studentsGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teachersGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issues"]) -> typing.Union[MetaOapg.properties.issues, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clever"]) -> typing.Union[MetaOapg.properties.clever, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union['ClassState', schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + owner: typing.Union[MetaOapg.properties.owner, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + enrollmentCode: typing.Union[MetaOapg.properties.enrollmentCode, str, schemas.Unset] = schemas.unset, + theme: typing.Union[MetaOapg.properties.theme, str, schemas.Unset] = schemas.unset, + assignmentsCount: typing.Union[MetaOapg.properties.assignmentsCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + studentsGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, + teachersGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, + issues: typing.Union[MetaOapg.properties.issues, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + googleDrive: typing.Union[MetaOapg.properties.googleDrive, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + clever: typing.Union[MetaOapg.properties.clever, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassDetails': + return super().__new__( + cls, + *_args, + id=id, + state=state, + name=name, + section=section, + description=description, + organization=organization, + owner=owner, + creationDate=creationDate, + enrollmentCode=enrollmentCode, + theme=theme, + assignmentsCount=assignmentsCount, + studentsGroup=studentsGroup, + teachersGroup=teachersGroup, + issues=issues, + googleClassroom=googleClassroom, + googleDrive=googleDrive, + microsoftGraph=microsoftGraph, + lti=lti, + canvas=canvas, + mfc=mfc, + clever=clever, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.class_state import ClassState +from flat_api.model.edu_skills_focused import EduSkillsFocused +from flat_api.model.group_details import GroupDetails diff --git a/flat_api/model/class_details.pyi b/flat_api/model/class_details.pyi new file mode 100644 index 0000000..226b58f --- /dev/null +++ b/flat_api/model/class_details.pyi @@ -0,0 +1,1015 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def state() -> typing.Type['ClassState']: + return ClassState + name = schemas.StrSchema + section = schemas.StrSchema + description = schemas.StrSchema + organization = schemas.StrSchema + owner = schemas.StrSchema + creationDate = schemas.DateTimeSchema + enrollmentCode = schemas.StrSchema + theme = schemas.StrSchema + assignmentsCount = schemas.NumberSchema + + @staticmethod + def studentsGroup() -> typing.Type['GroupDetails']: + return GroupDetails + + @staticmethod + def teachersGroup() -> typing.Type['GroupDetails']: + return GroupDetails + + + class issues( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + + + class sync( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + email = schemas.StrSchema + + + class reason( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def OTHER_ORGNANIZATION(cls): + return cls("otherOrgnanization") + + @schemas.classproperty + def PERSONAL_SUBSCRIPTION(cls): + return cls("personalSubscription") + __annotations__ = { + "id": id, + "email": email, + "reason": reason, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': + return super().__new__( + cls, + *_args, + id=id, + email=email, + reason=reason, + _configuration=_configuration, + **kwargs, + ) + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'sync': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "sync": sync, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sync"]) -> MetaOapg.properties.sync: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sync"]) -> typing.Union[MetaOapg.properties.sync, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + sync: typing.Union[MetaOapg.properties.sync, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'issues': + return super().__new__( + cls, + *_args, + sync=sync, + _configuration=_configuration, + **kwargs, + ) + + + class googleClassroom( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleClassroom': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class googleDrive( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + teacherFolderId = schemas.StrSchema + teacherFolderAlternateLink = schemas.StrSchema + __annotations__ = { + "teacherFolderId": teacherFolderId, + "teacherFolderAlternateLink": teacherFolderAlternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teacherFolderId"]) -> MetaOapg.properties.teacherFolderId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> MetaOapg.properties.teacherFolderAlternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderId"]) -> typing.Union[MetaOapg.properties.teacherFolderId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> typing.Union[MetaOapg.properties.teacherFolderAlternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + teacherFolderId: typing.Union[MetaOapg.properties.teacherFolderId, str, schemas.Unset] = schemas.unset, + teacherFolderAlternateLink: typing.Union[MetaOapg.properties.teacherFolderAlternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'googleDrive': + return super().__new__( + cls, + *_args, + teacherFolderId=teacherFolderId, + teacherFolderAlternateLink=teacherFolderAlternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class microsoftGraph( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + __annotations__ = { + "id": id, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'microsoftGraph': + return super().__new__( + cls, + *_args, + id=id, + _configuration=_configuration, + **kwargs, + ) + + + class lti( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + contextId = schemas.StrSchema + contextTitle = schemas.StrSchema + contextLabel = schemas.StrSchema + __annotations__ = { + "contextId": contextId, + "contextTitle": contextTitle, + "contextLabel": contextLabel, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextId"]) -> MetaOapg.properties.contextId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextTitle"]) -> MetaOapg.properties.contextTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["contextLabel"]) -> MetaOapg.properties.contextLabel: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextId"]) -> typing.Union[MetaOapg.properties.contextId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextTitle"]) -> typing.Union[MetaOapg.properties.contextTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["contextLabel"]) -> typing.Union[MetaOapg.properties.contextLabel, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + contextId: typing.Union[MetaOapg.properties.contextId, str, schemas.Unset] = schemas.unset, + contextTitle: typing.Union[MetaOapg.properties.contextTitle, str, schemas.Unset] = schemas.unset, + contextLabel: typing.Union[MetaOapg.properties.contextLabel, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'lti': + return super().__new__( + cls, + *_args, + contextId=contextId, + contextTitle=contextTitle, + contextLabel=contextLabel, + _configuration=_configuration, + **kwargs, + ) + + + class canvas( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + domain = schemas.StrSchema + __annotations__ = { + "id": id, + "domain": domain, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["domain"]) -> MetaOapg.properties.domain: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["domain"]) -> typing.Union[MetaOapg.properties.domain, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + domain: typing.Union[MetaOapg.properties.domain, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canvas': + return super().__new__( + cls, + *_args, + id=id, + domain=domain, + _configuration=_configuration, + **kwargs, + ) + + + class mfc( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'mfc': + return super().__new__( + cls, + *_args, + id=id, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) + + + class clever( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + + + class subject( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def ENGLISH_LANGUAGE_ARTS(cls): + return cls("english/language arts") + + @schemas.classproperty + def MATH(cls): + return cls("math") + + @schemas.classproperty + def SCIENCE(cls): + return cls("science") + + @schemas.classproperty + def SOCIAL_STUDIES(cls): + return cls("social studies") + + @schemas.classproperty + def LANGUAGE(cls): + return cls("language") + + @schemas.classproperty + def HOMEROOM_ADVISORY(cls): + return cls("homeroom/advisory") + + @schemas.classproperty + def INTERVENTIONS_ONLINE_LEARNING(cls): + return cls("interventions/online learning") + + @schemas.classproperty + def TECHNOLOGY_AND_ENGINEERING(cls): + return cls("technology and engineering") + + @schemas.classproperty + def PE_AND_HEALTH(cls): + return cls("PE and health") + + @schemas.classproperty + def ARTS_AND_MUSIC(cls): + return cls("arts and music") + + @schemas.classproperty + def OTHER(cls): + return cls("other") + termName = schemas.StrSchema + termStartDate = schemas.DateTimeSchema + termEndDate = schemas.DateTimeSchema + __annotations__ = { + "id": id, + "creationDate": creationDate, + "modificationDate": modificationDate, + "subject": subject, + "termName": termName, + "termStartDate": termStartDate, + "termEndDate": termEndDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subject"]) -> MetaOapg.properties.subject: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termName"]) -> MetaOapg.properties.termName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termStartDate"]) -> MetaOapg.properties.termStartDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["termEndDate"]) -> MetaOapg.properties.termEndDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subject"]) -> typing.Union[MetaOapg.properties.subject, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termName"]) -> typing.Union[MetaOapg.properties.termName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termStartDate"]) -> typing.Union[MetaOapg.properties.termStartDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["termEndDate"]) -> typing.Union[MetaOapg.properties.termEndDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + subject: typing.Union[MetaOapg.properties.subject, str, schemas.Unset] = schemas.unset, + termName: typing.Union[MetaOapg.properties.termName, str, schemas.Unset] = schemas.unset, + termStartDate: typing.Union[MetaOapg.properties.termStartDate, str, datetime, schemas.Unset] = schemas.unset, + termEndDate: typing.Union[MetaOapg.properties.termEndDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'clever': + return super().__new__( + cls, + *_args, + id=id, + creationDate=creationDate, + modificationDate=modificationDate, + subject=subject, + termName=termName, + termStartDate=termStartDate, + termEndDate=termEndDate, + _configuration=_configuration, + **kwargs, + ) + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "state": state, + "name": name, + "section": section, + "description": description, + "organization": organization, + "owner": owner, + "creationDate": creationDate, + "enrollmentCode": enrollmentCode, + "theme": theme, + "assignmentsCount": assignmentsCount, + "studentsGroup": studentsGroup, + "teachersGroup": teachersGroup, + "issues": issues, + "googleClassroom": googleClassroom, + "googleDrive": googleDrive, + "microsoftGraph": microsoftGraph, + "lti": lti, + "canvas": canvas, + "mfc": mfc, + "clever": clever, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ClassState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["owner"]) -> MetaOapg.properties.owner: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["enrollmentCode"]) -> MetaOapg.properties.enrollmentCode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["theme"]) -> MetaOapg.properties.theme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignmentsCount"]) -> MetaOapg.properties.assignmentsCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["studentsGroup"]) -> 'GroupDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["teachersGroup"]) -> 'GroupDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["issues"]) -> MetaOapg.properties.issues: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clever"]) -> MetaOapg.properties.clever: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ClassState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["owner"]) -> typing.Union[MetaOapg.properties.owner, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["enrollmentCode"]) -> typing.Union[MetaOapg.properties.enrollmentCode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["theme"]) -> typing.Union[MetaOapg.properties.theme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignmentsCount"]) -> typing.Union[MetaOapg.properties.assignmentsCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["studentsGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["teachersGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["issues"]) -> typing.Union[MetaOapg.properties.issues, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clever"]) -> typing.Union[MetaOapg.properties.clever, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union['ClassState', schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + owner: typing.Union[MetaOapg.properties.owner, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + enrollmentCode: typing.Union[MetaOapg.properties.enrollmentCode, str, schemas.Unset] = schemas.unset, + theme: typing.Union[MetaOapg.properties.theme, str, schemas.Unset] = schemas.unset, + assignmentsCount: typing.Union[MetaOapg.properties.assignmentsCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + studentsGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, + teachersGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, + issues: typing.Union[MetaOapg.properties.issues, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + googleDrive: typing.Union[MetaOapg.properties.googleDrive, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + clever: typing.Union[MetaOapg.properties.clever, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassDetails': + return super().__new__( + cls, + *_args, + id=id, + state=state, + name=name, + section=section, + description=description, + organization=organization, + owner=owner, + creationDate=creationDate, + enrollmentCode=enrollmentCode, + theme=theme, + assignmentsCount=assignmentsCount, + studentsGroup=studentsGroup, + teachersGroup=teachersGroup, + issues=issues, + googleClassroom=googleClassroom, + googleDrive=googleDrive, + microsoftGraph=microsoftGraph, + lti=lti, + canvas=canvas, + mfc=mfc, + clever=clever, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.class_state import ClassState +from flat_api.model.edu_skills_focused import EduSkillsFocused +from flat_api.model.group_details import GroupDetails diff --git a/flat_api/model/class_grade_level.py b/flat_api/model/class_grade_level.py new file mode 100644 index 0000000..6154b11 --- /dev/null +++ b/flat_api/model/class_grade_level.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassGradeLevel( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Class grade level + """ + + + class MetaOapg: + enum_value_to_name = { + "elementary": "ELEMENTARY", + "middle": "MIDDLE", + "high": "HIGH", + "university": "UNIVERSITY", + "other": "OTHER", + } + + @schemas.classproperty + def ELEMENTARY(cls): + return cls("elementary") + + @schemas.classproperty + def MIDDLE(cls): + return cls("middle") + + @schemas.classproperty + def HIGH(cls): + return cls("high") + + @schemas.classproperty + def UNIVERSITY(cls): + return cls("university") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/class_grade_level.pyi b/flat_api/model/class_grade_level.pyi new file mode 100644 index 0000000..5875daa --- /dev/null +++ b/flat_api/model/class_grade_level.pyi @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassGradeLevel( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Class grade level + """ + + @schemas.classproperty + def ELEMENTARY(cls): + return cls("elementary") + + @schemas.classproperty + def MIDDLE(cls): + return cls("middle") + + @schemas.classproperty + def HIGH(cls): + return cls("high") + + @schemas.classproperty + def UNIVERSITY(cls): + return cls("university") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/class_roles.py b/flat_api/model/class_roles.py new file mode 100644 index 0000000..f7b6feb --- /dev/null +++ b/flat_api/model/class_roles.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassRoles( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User's Class Role (for Edu users only) + """ + + + class MetaOapg: + enum_value_to_name = { + "teacher": "TEACHER", + "student": "STUDENT", + } + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def STUDENT(cls): + return cls("student") diff --git a/test/test_assignment_canvas.py b/flat_api/model/class_roles.pyi similarity index 69% rename from test/test_assignment_canvas.py rename to flat_api/model/class_roles.pyi index dbb0754..019d6c9 100644 --- a/test/test_assignment_canvas.py +++ b/flat_api/model/class_roles.pyi @@ -5,36 +5,41 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.assignment_canvas import AssignmentCanvas # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentCanvas(unittest.TestCase): - """AssignmentCanvas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentCanvas(self): - """Test AssignmentCanvas""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_canvas.AssignmentCanvas() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassRoles( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User's Class Role (for Edu users only) + """ + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def STUDENT(cls): + return cls("student") diff --git a/flat_api/model/class_state.py b/flat_api/model/class_state.py new file mode 100644 index 0000000..783fe59 --- /dev/null +++ b/flat_api/model/class_state.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The state of a classroom + """ + + + class MetaOapg: + enum_value_to_name = { + "active": "ACTIVE", + "inactive": "INACTIVE", + "archived": "ARCHIVED", + } + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def INACTIVE(cls): + return cls("inactive") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") diff --git a/flat_api/model/class_state.pyi b/flat_api/model/class_state.pyi new file mode 100644 index 0000000..b740fb0 --- /dev/null +++ b/flat_api/model/class_state.pyi @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The state of a classroom + """ + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def INACTIVE(cls): + return cls("inactive") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") diff --git a/flat_api/model/class_update.py b/flat_api/model/class_update.py new file mode 100644 index 0000000..d971f77 --- /dev/null +++ b/flat_api/model/class_update.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of a classroom + """ + + + class MetaOapg: + + class properties: + + + class name( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 255 + + + class section( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 255 + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + inclusive_minimum = 0 + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "name": name, + "section": section, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassUpdate': + return super().__new__( + cls, + *_args, + name=name, + section=section, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/class_update.pyi b/flat_api/model/class_update.pyi new file mode 100644 index 0000000..e7989f4 --- /dev/null +++ b/flat_api/model/class_update.pyi @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ClassUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of a classroom + """ + + + class MetaOapg: + + class properties: + + + class name( + schemas.StrSchema + ): + pass + + + class section( + schemas.StrSchema + ): + pass + + @staticmethod + def level() -> typing.Type['ClassGradeLevel']: + return ClassGradeLevel + + @staticmethod + def skillsFocused() -> typing.Type['EduSkillsFocused']: + return EduSkillsFocused + + + class size( + schemas.NumberBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneDecimalMixin + ): + + + class MetaOapg: + + + def __new__( + cls, + *_args: typing.Union[None, decimal.Decimal, int, float, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'size': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "name": name, + "section": section, + "level": level, + "skillsFocused": skillsFocused, + "size": size, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, + level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, + skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, + size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ClassUpdate': + return super().__new__( + cls, + *_args, + name=name, + section=section, + level=level, + skillsFocused=skillsFocused, + size=size, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/collection.py b/flat_api/model/collection.py new file mode 100644 index 0000000..094f139 --- /dev/null +++ b/flat_api/model/collection.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Collection( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Collection of scores + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + title = schemas.StrSchema + htmlUrl = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['CollectionType']: + return CollectionType + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + sharingKey = schemas.StrSchema + + @staticmethod + def app() -> typing.Type['CollectionApp']: + return CollectionApp + creationDate = schemas.DateTimeSchema + + @staticmethod + def user() -> typing.Type['UserPublicSummary']: + return UserPublicSummary + + @staticmethod + def rights() -> typing.Type['ResourceRights']: + return ResourceRights + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + canEdit = schemas.BoolSchema + canShare = schemas.BoolSchema + canDelete = schemas.BoolSchema + canAddScores = schemas.BoolSchema + canDeleteScores = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canShare": canShare, + "canDelete": canDelete, + "canAddScores": canAddScores, + "canDeleteScores": canDeleteScores, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canShare"]) -> MetaOapg.properties.canShare: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canDelete"]) -> MetaOapg.properties.canDelete: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddScores"]) -> MetaOapg.properties.canAddScores: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canDeleteScores"]) -> MetaOapg.properties.canDeleteScores: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canShare"]) -> typing.Union[MetaOapg.properties.canShare, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canDelete"]) -> typing.Union[MetaOapg.properties.canDelete, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddScores"]) -> typing.Union[MetaOapg.properties.canAddScores, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canDeleteScores"]) -> typing.Union[MetaOapg.properties.canDeleteScores, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, + canShare: typing.Union[MetaOapg.properties.canShare, bool, schemas.Unset] = schemas.unset, + canDelete: typing.Union[MetaOapg.properties.canDelete, bool, schemas.Unset] = schemas.unset, + canAddScores: typing.Union[MetaOapg.properties.canAddScores, bool, schemas.Unset] = schemas.unset, + canDeleteScores: typing.Union[MetaOapg.properties.canDeleteScores, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canEdit=canEdit, + canShare=canShare, + canDelete=canDelete, + canAddScores=canAddScores, + canDeleteScores=canDeleteScores, + _configuration=_configuration, + **kwargs, + ) + + + class collections( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collections': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "title": title, + "htmlUrl": htmlUrl, + "type": type, + "privacy": privacy, + "sharingKey": sharingKey, + "app": app, + "creationDate": creationDate, + "user": user, + "rights": rights, + "collaborators": collaborators, + "capabilities": capabilities, + "collections": collections, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'CollectionType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'CollectionApp': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['CollectionType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['CollectionApp', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + type: typing.Union['CollectionType', schemas.Unset] = schemas.unset, + privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + app: typing.Union['CollectionApp', schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, + rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Collection': + return super().__new__( + cls, + *_args, + id=id, + title=title, + htmlUrl=htmlUrl, + type=type, + privacy=privacy, + sharingKey=sharingKey, + app=app, + creationDate=creationDate, + user=user, + rights=rights, + collaborators=collaborators, + capabilities=capabilities, + collections=collections, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_app import CollectionApp +from flat_api.model.collection_privacy import CollectionPrivacy +from flat_api.model.collection_type import CollectionType +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/collection.pyi b/flat_api/model/collection.pyi new file mode 100644 index 0000000..094f139 --- /dev/null +++ b/flat_api/model/collection.pyi @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Collection( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Collection of scores + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + title = schemas.StrSchema + htmlUrl = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['CollectionType']: + return CollectionType + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + sharingKey = schemas.StrSchema + + @staticmethod + def app() -> typing.Type['CollectionApp']: + return CollectionApp + creationDate = schemas.DateTimeSchema + + @staticmethod + def user() -> typing.Type['UserPublicSummary']: + return UserPublicSummary + + @staticmethod + def rights() -> typing.Type['ResourceRights']: + return ResourceRights + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + canEdit = schemas.BoolSchema + canShare = schemas.BoolSchema + canDelete = schemas.BoolSchema + canAddScores = schemas.BoolSchema + canDeleteScores = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canShare": canShare, + "canDelete": canDelete, + "canAddScores": canAddScores, + "canDeleteScores": canDeleteScores, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canShare"]) -> MetaOapg.properties.canShare: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canDelete"]) -> MetaOapg.properties.canDelete: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddScores"]) -> MetaOapg.properties.canAddScores: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canDeleteScores"]) -> MetaOapg.properties.canDeleteScores: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canShare"]) -> typing.Union[MetaOapg.properties.canShare, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canDelete"]) -> typing.Union[MetaOapg.properties.canDelete, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddScores"]) -> typing.Union[MetaOapg.properties.canAddScores, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canDeleteScores"]) -> typing.Union[MetaOapg.properties.canDeleteScores, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, + canShare: typing.Union[MetaOapg.properties.canShare, bool, schemas.Unset] = schemas.unset, + canDelete: typing.Union[MetaOapg.properties.canDelete, bool, schemas.Unset] = schemas.unset, + canAddScores: typing.Union[MetaOapg.properties.canAddScores, bool, schemas.Unset] = schemas.unset, + canDeleteScores: typing.Union[MetaOapg.properties.canDeleteScores, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canEdit=canEdit, + canShare=canShare, + canDelete=canDelete, + canAddScores=canAddScores, + canDeleteScores=canDeleteScores, + _configuration=_configuration, + **kwargs, + ) + + + class collections( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collections': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "title": title, + "htmlUrl": htmlUrl, + "type": type, + "privacy": privacy, + "sharingKey": sharingKey, + "app": app, + "creationDate": creationDate, + "user": user, + "rights": rights, + "collaborators": collaborators, + "capabilities": capabilities, + "collections": collections, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'CollectionType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'CollectionApp': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['CollectionType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['CollectionApp', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + type: typing.Union['CollectionType', schemas.Unset] = schemas.unset, + privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + app: typing.Union['CollectionApp', schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, + rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Collection': + return super().__new__( + cls, + *_args, + id=id, + title=title, + htmlUrl=htmlUrl, + type=type, + privacy=privacy, + sharingKey=sharingKey, + app=app, + creationDate=creationDate, + user=user, + rights=rights, + collaborators=collaborators, + capabilities=capabilities, + collections=collections, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_app import CollectionApp +from flat_api.model.collection_privacy import CollectionPrivacy +from flat_api.model.collection_type import CollectionType +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/collection_app.py b/flat_api/model/collection_app.py new file mode 100644 index 0000000..36fd150 --- /dev/null +++ b/flat_api/model/collection_app.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionApp( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + For App collections, the details of the app that created the collection + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + logo = schemas.StrSchema + __annotations__ = { + "id": id, + "name": name, + "logo": logo, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["logo"]) -> MetaOapg.properties.logo: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["logo"]) -> typing.Union[MetaOapg.properties.logo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + logo: typing.Union[MetaOapg.properties.logo, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionApp': + return super().__new__( + cls, + *_args, + id=id, + name=name, + logo=logo, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/collection_app.pyi b/flat_api/model/collection_app.pyi new file mode 100644 index 0000000..36fd150 --- /dev/null +++ b/flat_api/model/collection_app.pyi @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionApp( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + For App collections, the details of the app that created the collection + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + logo = schemas.StrSchema + __annotations__ = { + "id": id, + "name": name, + "logo": logo, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["logo"]) -> MetaOapg.properties.logo: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["logo"]) -> typing.Union[MetaOapg.properties.logo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + logo: typing.Union[MetaOapg.properties.logo, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionApp': + return super().__new__( + cls, + *_args, + id=id, + name=name, + logo=logo, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/collection_creation.py b/flat_api/model/collection_creation.py new file mode 100644 index 0000000..60bff78 --- /dev/null +++ b/flat_api/model/collection_creation.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "privacy", + "title", + } + + class properties: + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 300 + min_length = 1 + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + __annotations__ = { + "title": title, + "privacy": privacy, + } + + privacy: 'CollectionPrivacy' + title: MetaOapg.properties.title + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + privacy: 'CollectionPrivacy', + title: typing.Union[MetaOapg.properties.title, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionCreation': + return super().__new__( + cls, + *_args, + privacy=privacy, + title=title, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_creation.pyi b/flat_api/model/collection_creation.pyi new file mode 100644 index 0000000..d03dc54 --- /dev/null +++ b/flat_api/model/collection_creation.pyi @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "privacy", + "title", + } + + class properties: + + + class title( + schemas.StrSchema + ): + pass + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + __annotations__ = { + "title": title, + "privacy": privacy, + } + + privacy: 'CollectionPrivacy' + title: MetaOapg.properties.title + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + privacy: 'CollectionPrivacy', + title: typing.Union[MetaOapg.properties.title, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionCreation': + return super().__new__( + cls, + *_args, + privacy=privacy, + title=title, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_modification.py b/flat_api/model/collection_modification.py new file mode 100644 index 0000000..4440213 --- /dev/null +++ b/flat_api/model/collection_modification.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionModification( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Edit the collection metadata + """ + + + class MetaOapg: + + class properties: + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 300 + min_length = 1 + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + __annotations__ = { + "title": title, + "privacy": privacy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionModification': + return super().__new__( + cls, + *_args, + title=title, + privacy=privacy, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_modification.pyi b/flat_api/model/collection_modification.pyi new file mode 100644 index 0000000..7984412 --- /dev/null +++ b/flat_api/model/collection_modification.pyi @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionModification( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Edit the collection metadata + """ + + + class MetaOapg: + + class properties: + + + class title( + schemas.StrSchema + ): + pass + + @staticmethod + def privacy() -> typing.Type['CollectionPrivacy']: + return CollectionPrivacy + __annotations__ = { + "title": title, + "privacy": privacy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CollectionModification': + return super().__new__( + cls, + *_args, + title=title, + privacy=privacy, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_privacy.py b/flat_api/model/collection_privacy.py new file mode 100644 index 0000000..421d9a4 --- /dev/null +++ b/flat_api/model/collection_privacy.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionPrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The collection main privacy mode. +- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. + + """ + + + class MetaOapg: + enum_value_to_name = { + "private": "PRIVATE", + } + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") diff --git a/test/test_assignment_creation_google_classroom.py b/flat_api/model/collection_privacy.pyi similarity index 68% rename from test/test_assignment_creation_google_classroom.py rename to flat_api/model/collection_privacy.pyi index ac5fa2c..8878061 100644 --- a/test/test_assignment_creation_google_classroom.py +++ b/flat_api/model/collection_privacy.pyi @@ -5,36 +5,39 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 -from __future__ import absolute_import +import frozendict # noqa: F401 -import unittest +from flat_api import schemas # noqa: F401 -import flat_api -from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom # noqa: E501 -from flat_api.rest import ApiException +class CollectionPrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech -class TestAssignmentCreationGoogleClassroom(unittest.TestCase): - """AssignmentCreationGoogleClassroom unit test stubs""" + Do not edit the class manually. - def setUp(self): - pass + The collection main privacy mode. +- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. - def tearDown(self): - pass - - def testAssignmentCreationGoogleClassroom(self): - """Test AssignmentCreationGoogleClassroom""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_creation_google_classroom.AssignmentCreationGoogleClassroom() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() + """ + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") diff --git a/flat_api/model/collection_type.py b/flat_api/model/collection_type.py new file mode 100644 index 0000000..55ef4ca --- /dev/null +++ b/flat_api/model/collection_type.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of the collection. +The type will influence the capabilitied available on the collections and how this collection is/can be populated. + + """ + + + class MetaOapg: + enum_value_to_name = { + "root": "ROOT", + "regular": "REGULAR", + "sharedWithMe": "SHARED_WITH_ME", + "sharedWithGroup": "SHARED_WITH_GROUP", + "app": "APP", + "trash": "TRASH", + } + + @schemas.classproperty + def ROOT(cls): + return cls("root") + + @schemas.classproperty + def REGULAR(cls): + return cls("regular") + + @schemas.classproperty + def SHARED_WITH_ME(cls): + return cls("sharedWithMe") + + @schemas.classproperty + def SHARED_WITH_GROUP(cls): + return cls("sharedWithGroup") + + @schemas.classproperty + def APP(cls): + return cls("app") + + @schemas.classproperty + def TRASH(cls): + return cls("trash") diff --git a/flat_api/model/collection_type.pyi b/flat_api/model/collection_type.pyi new file mode 100644 index 0000000..74c85d0 --- /dev/null +++ b/flat_api/model/collection_type.pyi @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class CollectionType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of the collection. +The type will influence the capabilitied available on the collections and how this collection is/can be populated. + + """ + + @schemas.classproperty + def ROOT(cls): + return cls("root") + + @schemas.classproperty + def REGULAR(cls): + return cls("regular") + + @schemas.classproperty + def SHARED_WITH_ME(cls): + return cls("sharedWithMe") + + @schemas.classproperty + def SHARED_WITH_GROUP(cls): + return cls("sharedWithGroup") + + @schemas.classproperty + def APP(cls): + return cls("app") + + @schemas.classproperty + def TRASH(cls): + return cls("trash") diff --git a/flat_api/model/edu_library.py b/flat_api/model/edu_library.py new file mode 100644 index 0000000..fcc48b2 --- /dev/null +++ b/flat_api/model/edu_library.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduLibrary( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Flat for Education Library + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "myResources": "MY_RESOURCES", + "flatEduSamples": "FLAT_EDU_SAMPLES", + } + + @schemas.classproperty + def MY_RESOURCES(cls): + return cls("myResources") + + @schemas.classproperty + def FLAT_EDU_SAMPLES(cls): + return cls("flatEduSamples") + + + class visibility( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "private": "PRIVATE", + "organization": "ORGANIZATION", + "public": "PUBLIC", + } + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def ORGANIZATION(cls): + return cls("organization") + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") + __annotations__ = { + "id": id, + "name": name, + "type": type, + "visibility": visibility, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["visibility"]) -> MetaOapg.properties.visibility: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["visibility"]) -> typing.Union[MetaOapg.properties.visibility, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + visibility: typing.Union[MetaOapg.properties.visibility, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduLibrary': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + visibility=visibility, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_library.pyi b/flat_api/model/edu_library.pyi new file mode 100644 index 0000000..913871a --- /dev/null +++ b/flat_api/model/edu_library.pyi @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduLibrary( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Flat for Education Library + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def MY_RESOURCES(cls): + return cls("myResources") + + @schemas.classproperty + def FLAT_EDU_SAMPLES(cls): + return cls("flatEduSamples") + + + class visibility( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def ORGANIZATION(cls): + return cls("organization") + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") + __annotations__ = { + "id": id, + "name": name, + "type": type, + "visibility": visibility, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["visibility"]) -> MetaOapg.properties.visibility: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["visibility"]) -> typing.Union[MetaOapg.properties.visibility, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + visibility: typing.Union[MetaOapg.properties.visibility, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduLibrary': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + visibility=visibility, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource.py b/flat_api/model/edu_resource.py new file mode 100644 index 0000000..e043302 --- /dev/null +++ b/flat_api/model/edu_resource.py @@ -0,0 +1,687 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResource( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Flat for Education resource contained in a resources library + """ + + + class MetaOapg: + required = { + "capabilities", + "id", + "title", + "type", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['EduResourceType']: + return EduResourceType + title = schemas.StrSchema + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + canEdit = schemas.BoolSchema + canAddResources = schemas.BoolSchema + canAddFolders = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canAddResources": canAddResources, + "canAddFolders": canAddFolders, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddResources"]) -> MetaOapg.properties.canAddResources: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddFolders"]) -> MetaOapg.properties.canAddFolders: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddResources"]) -> typing.Union[MetaOapg.properties.canAddResources, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddFolders"]) -> typing.Union[MetaOapg.properties.canAddFolders, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, + canAddResources: typing.Union[MetaOapg.properties.canAddResources, bool, schemas.Unset] = schemas.unset, + canAddFolders: typing.Union[MetaOapg.properties.canAddFolders, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canEdit=canEdit, + canAddResources=canAddResources, + canAddFolders=canAddFolders, + _configuration=_configuration, + **kwargs, + ) + creator = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['EduResourcePrivacy']: + return EduResourcePrivacy + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + parent = schemas.StrSchema + creationDate = schemas.DateTimeSchema + updateDate = schemas.DateTimeSchema + + + class resource( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "auto": "AUTO", + "manual": "MANUAL", + } + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'resource': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "id": id, + "type": type, + "title": title, + "capabilities": capabilities, + "creator": creator, + "privacy": privacy, + "tags": tags, + "parent": parent, + "creationDate": creationDate, + "updateDate": updateDate, + "resource": resource, + } + + capabilities: MetaOapg.properties.capabilities + id: MetaOapg.properties.id + title: MetaOapg.properties.title + type: 'EduResourceType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'EduResourcePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['EduResourcePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'EduResourceType', + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['EduResourcePrivacy', schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + updateDate: typing.Union[MetaOapg.properties.updateDate, str, datetime, schemas.Unset] = schemas.unset, + resource: typing.Union[MetaOapg.properties.resource, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResource': + return super().__new__( + cls, + *_args, + capabilities=capabilities, + id=id, + title=title, + type=type, + creator=creator, + privacy=privacy, + tags=tags, + parent=parent, + creationDate=creationDate, + updateDate=updateDate, + resource=resource, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api.model.edu_resource_type import EduResourceType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/edu_resource.pyi b/flat_api/model/edu_resource.pyi new file mode 100644 index 0000000..b93fd9e --- /dev/null +++ b/flat_api/model/edu_resource.pyi @@ -0,0 +1,680 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResource( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Flat for Education resource contained in a resources library + """ + + + class MetaOapg: + required = { + "capabilities", + "id", + "title", + "type", + } + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['EduResourceType']: + return EduResourceType + title = schemas.StrSchema + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + canEdit = schemas.BoolSchema + canAddResources = schemas.BoolSchema + canAddFolders = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canAddResources": canAddResources, + "canAddFolders": canAddFolders, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddResources"]) -> MetaOapg.properties.canAddResources: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canAddFolders"]) -> MetaOapg.properties.canAddFolders: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddResources"]) -> typing.Union[MetaOapg.properties.canAddResources, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canAddFolders"]) -> typing.Union[MetaOapg.properties.canAddFolders, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, + canAddResources: typing.Union[MetaOapg.properties.canAddResources, bool, schemas.Unset] = schemas.unset, + canAddFolders: typing.Union[MetaOapg.properties.canAddFolders, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canEdit=canEdit, + canAddResources=canAddResources, + canAddFolders=canAddFolders, + _configuration=_configuration, + **kwargs, + ) + creator = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['EduResourcePrivacy']: + return EduResourcePrivacy + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + parent = schemas.StrSchema + creationDate = schemas.DateTimeSchema + updateDate = schemas.DateTimeSchema + + + class resource( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['AssignmentType']: + return AssignmentType + + + class capabilities( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "canArchive", + "canPublishInClass", + "canUnarchive", + "canEdit", + } + + class properties: + canEdit = schemas.BoolSchema + canPublishInClass = schemas.BoolSchema + + + class canPublishInClassError( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'canPublishInClassError': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) + canArchive = schemas.BoolSchema + canUnarchive = schemas.BoolSchema + __annotations__ = { + "canEdit": canEdit, + "canPublishInClass": canPublishInClass, + "canPublishInClassError": canPublishInClassError, + "canArchive": canArchive, + "canUnarchive": canUnarchive, + } + + canArchive: MetaOapg.properties.canArchive + canPublishInClass: MetaOapg.properties.canPublishInClass + canUnarchive: MetaOapg.properties.canUnarchive + canEdit: MetaOapg.properties.canEdit + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], + canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], + canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], + canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], + canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'capabilities': + return super().__new__( + cls, + *_args, + canArchive=canArchive, + canPublishInClass=canPublishInClass, + canUnarchive=canUnarchive, + canEdit=canEdit, + canPublishInClassError=canPublishInClassError, + _configuration=_configuration, + **kwargs, + ) + title = schemas.StrSchema + description = schemas.StrSchema + cover = schemas.StrSchema + coverFile = schemas.StrSchema + + + class attachments( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['MediaAttachment']: + return MediaAttachment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'attachments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'MediaAttachment': + return super().__getitem__(i) + useDedicatedAttachments = schemas.BoolSchema + maxPoints = schemas.NumberSchema + + + class releaseGrades( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AUTO(cls): + return cls("auto") + + @schemas.classproperty + def MANUAL(cls): + return cls("manual") + shuffleExercises = schemas.BoolSchema + toolset = schemas.StrSchema + nbPlaybackAuthorized = schemas.NumberSchema + __annotations__ = { + "id": id, + "type": type, + "capabilities": capabilities, + "title": title, + "description": description, + "cover": cover, + "coverFile": coverFile, + "attachments": attachments, + "useDedicatedAttachments": useDedicatedAttachments, + "maxPoints": maxPoints, + "releaseGrades": releaseGrades, + "shuffleExercises": shuffleExercises, + "toolset": toolset, + "nbPlaybackAuthorized": nbPlaybackAuthorized, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, + coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, + attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, + useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, + maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, + shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, + toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, + nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'resource': + return super().__new__( + cls, + *_args, + id=id, + type=type, + capabilities=capabilities, + title=title, + description=description, + cover=cover, + coverFile=coverFile, + attachments=attachments, + useDedicatedAttachments=useDedicatedAttachments, + maxPoints=maxPoints, + releaseGrades=releaseGrades, + shuffleExercises=shuffleExercises, + toolset=toolset, + nbPlaybackAuthorized=nbPlaybackAuthorized, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "id": id, + "type": type, + "title": title, + "capabilities": capabilities, + "creator": creator, + "privacy": privacy, + "tags": tags, + "parent": parent, + "creationDate": creationDate, + "updateDate": updateDate, + "resource": resource, + } + + capabilities: MetaOapg.properties.capabilities + id: MetaOapg.properties.id + title: MetaOapg.properties.title + type: 'EduResourceType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'EduResourcePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['EduResourcePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'EduResourceType', + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['EduResourcePrivacy', schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + updateDate: typing.Union[MetaOapg.properties.updateDate, str, datetime, schemas.Unset] = schemas.unset, + resource: typing.Union[MetaOapg.properties.resource, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResource': + return super().__new__( + cls, + *_args, + capabilities=capabilities, + id=id, + title=title, + type=type, + creator=creator, + privacy=privacy, + tags=tags, + parent=parent, + creationDate=creationDate, + updateDate=updateDate, + resource=resource, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api.model.edu_resource_type import EduResourceType +from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/edu_resource_copy.py b/flat_api/model/edu_resource_copy.py new file mode 100644 index 0000000..231d1ca --- /dev/null +++ b/flat_api/model/edu_resource_copy.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceCopy( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Copy an education resource + """ + + + class MetaOapg: + required = { + "destination", + } + + class properties: + destination = schemas.StrSchema + __annotations__ = { + "destination": destination, + } + + destination: MetaOapg.properties.destination + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceCopy': + return super().__new__( + cls, + *_args, + destination=destination, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_copy.pyi b/flat_api/model/edu_resource_copy.pyi new file mode 100644 index 0000000..231d1ca --- /dev/null +++ b/flat_api/model/edu_resource_copy.pyi @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceCopy( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Copy an education resource + """ + + + class MetaOapg: + required = { + "destination", + } + + class properties: + destination = schemas.StrSchema + __annotations__ = { + "destination": destination, + } + + destination: MetaOapg.properties.destination + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceCopy': + return super().__new__( + cls, + *_args, + destination=destination, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_creation.py b/flat_api/model/edu_resource_creation.py new file mode 100644 index 0000000..f898cf4 --- /dev/null +++ b/flat_api/model/edu_resource_creation.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of an education resource + """ + + + class MetaOapg: + required = { + "title", + "type", + } + + class properties: + + @staticmethod + def type() -> typing.Type['EduResourceType']: + return EduResourceType + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 1000 + min_length = 1 + parent = schemas.StrSchema + __annotations__ = { + "type": type, + "title": title, + "parent": parent, + } + + title: MetaOapg.properties.title + type: 'EduResourceType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'EduResourceType', + parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceCreation': + return super().__new__( + cls, + *_args, + title=title, + type=type, + parent=parent, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.edu_resource_type import EduResourceType diff --git a/flat_api/model/edu_resource_creation.pyi b/flat_api/model/edu_resource_creation.pyi new file mode 100644 index 0000000..56e6fcb --- /dev/null +++ b/flat_api/model/edu_resource_creation.pyi @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of an education resource + """ + + + class MetaOapg: + required = { + "title", + "type", + } + + class properties: + + @staticmethod + def type() -> typing.Type['EduResourceType']: + return EduResourceType + + + class title( + schemas.StrSchema + ): + pass + parent = schemas.StrSchema + __annotations__ = { + "type": type, + "title": title, + "parent": parent, + } + + title: MetaOapg.properties.title + type: 'EduResourceType' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, ], + type: 'EduResourceType', + parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceCreation': + return super().__new__( + cls, + *_args, + title=title, + type=type, + parent=parent, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.edu_resource_type import EduResourceType diff --git a/flat_api/model/edu_resource_move.py b/flat_api/model/edu_resource_move.py new file mode 100644 index 0000000..669e3e4 --- /dev/null +++ b/flat_api/model/edu_resource_move.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceMove( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Move an education resource + """ + + + class MetaOapg: + required = { + "destination", + } + + class properties: + destination = schemas.StrSchema + __annotations__ = { + "destination": destination, + } + + destination: MetaOapg.properties.destination + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceMove': + return super().__new__( + cls, + *_args, + destination=destination, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_move.pyi b/flat_api/model/edu_resource_move.pyi new file mode 100644 index 0000000..669e3e4 --- /dev/null +++ b/flat_api/model/edu_resource_move.pyi @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceMove( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Move an education resource + """ + + + class MetaOapg: + required = { + "destination", + } + + class properties: + destination = schemas.StrSchema + __annotations__ = { + "destination": destination, + } + + destination: MetaOapg.properties.destination + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceMove': + return super().__new__( + cls, + *_args, + destination=destination, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_privacy.py b/flat_api/model/edu_resource_privacy.py new file mode 100644 index 0000000..f4c3285 --- /dev/null +++ b/flat_api/model/edu_resource_privacy.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourcePrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The Education resource privacy mode. + + """ + + + class MetaOapg: + enum_value_to_name = { + "private": "PRIVATE", + "public": "PUBLIC", + } + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") diff --git a/flat_api/model/edu_resource_privacy.pyi b/flat_api/model/edu_resource_privacy.pyi new file mode 100644 index 0000000..48fe888 --- /dev/null +++ b/flat_api/model/edu_resource_privacy.pyi @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourcePrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The Education resource privacy mode. + + """ + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") diff --git a/flat_api/model/edu_resource_type.py b/flat_api/model/edu_resource_type.py new file mode 100644 index 0000000..8af45de --- /dev/null +++ b/flat_api/model/edu_resource_type.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of an education resource + """ + + + class MetaOapg: + enum_value_to_name = { + "assignment": "ASSIGNMENT", + "folder": "FOLDER", + } + + @schemas.classproperty + def ASSIGNMENT(cls): + return cls("assignment") + + @schemas.classproperty + def FOLDER(cls): + return cls("folder") diff --git a/flat_api/model/edu_resource_type.pyi b/flat_api/model/edu_resource_type.pyi new file mode 100644 index 0000000..b988bea --- /dev/null +++ b/flat_api/model/edu_resource_type.pyi @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Type of an education resource + """ + + @schemas.classproperty + def ASSIGNMENT(cls): + return cls("assignment") + + @schemas.classproperty + def FOLDER(cls): + return cls("folder") diff --git a/flat_api/model/edu_resource_update.py b/flat_api/model/edu_resource_update.py new file mode 100644 index 0000000..9ef3acf --- /dev/null +++ b/flat_api/model/edu_resource_update.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of an education resource + """ + + + class MetaOapg: + + class properties: + + + class title( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 1000 + min_length = 1 + __annotations__ = { + "title": title, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceUpdate': + return super().__new__( + cls, + *_args, + title=title, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_update.pyi b/flat_api/model/edu_resource_update.pyi new file mode 100644 index 0000000..df5f20e --- /dev/null +++ b/flat_api/model/edu_resource_update.pyi @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of an education resource + """ + + + class MetaOapg: + + class properties: + + + class title( + schemas.StrSchema + ): + pass + __annotations__ = { + "title": title, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceUpdate': + return super().__new__( + cls, + *_args, + title=title, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_use_in_class.py b/flat_api/model/edu_resource_use_in_class.py new file mode 100644 index 0000000..018a92b --- /dev/null +++ b/flat_api/model/edu_resource_use_in_class.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceUseInClass( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Use an education resource in class + """ + + + class MetaOapg: + required = { + "classroom", + } + + class properties: + classroom = schemas.StrSchema + assignment = schemas.StrSchema + __annotations__ = { + "classroom": classroom, + "assignment": assignment, + } + + classroom: MetaOapg.properties.classroom + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, ], + assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceUseInClass': + return super().__new__( + cls, + *_args, + classroom=classroom, + assignment=assignment, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_resource_use_in_class.pyi b/flat_api/model/edu_resource_use_in_class.pyi new file mode 100644 index 0000000..018a92b --- /dev/null +++ b/flat_api/model/edu_resource_use_in_class.pyi @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduResourceUseInClass( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Use an education resource in class + """ + + + class MetaOapg: + required = { + "classroom", + } + + class properties: + classroom = schemas.StrSchema + assignment = schemas.StrSchema + __annotations__ = { + "classroom": classroom, + "assignment": assignment, + } + + classroom: MetaOapg.properties.classroom + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + classroom: typing.Union[MetaOapg.properties.classroom, str, ], + assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EduResourceUseInClass': + return super().__new__( + cls, + *_args, + classroom=classroom, + assignment=assignment, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/edu_skills_focused.py b/flat_api/model/edu_skills_focused.py new file mode 100644 index 0000000..6e0702c --- /dev/null +++ b/flat_api/model/edu_skills_focused.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduSkillsFocused( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Specific skills that will be focused in classroom + """ + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "notation": "NOTATION", + "sight-reading": "SIGHTREADING", + "performance-instrumental": "PERFORMANCEINSTRUMENTAL", + "ear-training": "EARTRAINING", + "music-theory": "MUSICTHEORY", + "composition": "COMPOSITION", + "jazz-ensemble": "JAZZENSEMBLE", + "music-technology": "MUSICTECHNOLOGY", + "other": "OTHER", + } + + @schemas.classproperty + def NOTATION(cls): + return cls("notation") + + @schemas.classproperty + def SIGHTREADING(cls): + return cls("sight-reading") + + @schemas.classproperty + def PERFORMANCEINSTRUMENTAL(cls): + return cls("performance-instrumental") + + @schemas.classproperty + def EARTRAINING(cls): + return cls("ear-training") + + @schemas.classproperty + def MUSICTHEORY(cls): + return cls("music-theory") + + @schemas.classproperty + def COMPOSITION(cls): + return cls("composition") + + @schemas.classproperty + def JAZZENSEMBLE(cls): + return cls("jazz-ensemble") + + @schemas.classproperty + def MUSICTECHNOLOGY(cls): + return cls("music-technology") + + @schemas.classproperty + def OTHER(cls): + return cls("other") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'EduSkillsFocused': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) diff --git a/flat_api/model/edu_skills_focused.pyi b/flat_api/model/edu_skills_focused.pyi new file mode 100644 index 0000000..6cebe24 --- /dev/null +++ b/flat_api/model/edu_skills_focused.pyi @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class EduSkillsFocused( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Specific skills that will be focused in classroom + """ + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def NOTATION(cls): + return cls("notation") + + @schemas.classproperty + def SIGHTREADING(cls): + return cls("sight-reading") + + @schemas.classproperty + def PERFORMANCEINSTRUMENTAL(cls): + return cls("performance-instrumental") + + @schemas.classproperty + def EARTRAINING(cls): + return cls("ear-training") + + @schemas.classproperty + def MUSICTHEORY(cls): + return cls("music-theory") + + @schemas.classproperty + def COMPOSITION(cls): + return cls("composition") + + @schemas.classproperty + def JAZZENSEMBLE(cls): + return cls("jazz-ensemble") + + @schemas.classproperty + def MUSICTECHNOLOGY(cls): + return cls("music-technology") + + @schemas.classproperty + def OTHER(cls): + return cls("other") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'EduSkillsFocused': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) diff --git a/flat_api/model/flat_error_response.py b/flat_api/model/flat_error_response.py new file mode 100644 index 0000000..6b657a7 --- /dev/null +++ b/flat_api/model/flat_error_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class FlatErrorResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An API Error response + """ + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + id = schemas.StrSchema + param = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + "id": id, + "param": param, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> typing.Union[MetaOapg.properties.param, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + param: typing.Union[MetaOapg.properties.param, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'FlatErrorResponse': + return super().__new__( + cls, + *_args, + code=code, + message=message, + id=id, + param=param, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/flat_error_response.pyi b/flat_api/model/flat_error_response.pyi new file mode 100644 index 0000000..6b657a7 --- /dev/null +++ b/flat_api/model/flat_error_response.pyi @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class FlatErrorResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An API Error response + """ + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.StrSchema + message = schemas.StrSchema + id = schemas.StrSchema + param = schemas.StrSchema + __annotations__ = { + "code": code, + "message": message, + "id": id, + "param": param, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.message + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> typing.Union[MetaOapg.properties.param, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, str, ], + message: typing.Union[MetaOapg.properties.message, str, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + param: typing.Union[MetaOapg.properties.param, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'FlatErrorResponse': + return super().__new__( + cls, + *_args, + code=code, + message=message, + id=id, + param=param, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/flat_locales.py b/flat_api/model/flat_locales.py new file mode 100644 index 0000000..9038632 --- /dev/null +++ b/flat_api/model/flat_locales.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class FlatLocales( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The user language + """ + + + class MetaOapg: + enum_value_to_name = { + "en": "EN", + "en-GB": "ENGB", + "es": "ES", + "fr": "FR", + "de": "DE", + "it": "IT", + "ja": "JA", + "ja-HIRA": "JAHIRA", + "ko": "KO", + "nl": "NL", + "pl": "PL", + "pt": "PT", + "pt-BR": "PTBR", + "ro": "RO", + "ru": "RU", + "sv": "SV", + "tr": "TR", + "zh-Hans": "ZHHANS", + } + + @schemas.classproperty + def EN(cls): + return cls("en") + + @schemas.classproperty + def ENGB(cls): + return cls("en-GB") + + @schemas.classproperty + def ES(cls): + return cls("es") + + @schemas.classproperty + def FR(cls): + return cls("fr") + + @schemas.classproperty + def DE(cls): + return cls("de") + + @schemas.classproperty + def IT(cls): + return cls("it") + + @schemas.classproperty + def JA(cls): + return cls("ja") + + @schemas.classproperty + def JAHIRA(cls): + return cls("ja-HIRA") + + @schemas.classproperty + def KO(cls): + return cls("ko") + + @schemas.classproperty + def NL(cls): + return cls("nl") + + @schemas.classproperty + def PL(cls): + return cls("pl") + + @schemas.classproperty + def PT(cls): + return cls("pt") + + @schemas.classproperty + def PTBR(cls): + return cls("pt-BR") + + @schemas.classproperty + def RO(cls): + return cls("ro") + + @schemas.classproperty + def RU(cls): + return cls("ru") + + @schemas.classproperty + def SV(cls): + return cls("sv") + + @schemas.classproperty + def TR(cls): + return cls("tr") + + @schemas.classproperty + def ZHHANS(cls): + return cls("zh-Hans") diff --git a/flat_api/model/flat_locales.pyi b/flat_api/model/flat_locales.pyi new file mode 100644 index 0000000..6105be9 --- /dev/null +++ b/flat_api/model/flat_locales.pyi @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class FlatLocales( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The user language + """ + + @schemas.classproperty + def EN(cls): + return cls("en") + + @schemas.classproperty + def ENGB(cls): + return cls("en-GB") + + @schemas.classproperty + def ES(cls): + return cls("es") + + @schemas.classproperty + def FR(cls): + return cls("fr") + + @schemas.classproperty + def DE(cls): + return cls("de") + + @schemas.classproperty + def IT(cls): + return cls("it") + + @schemas.classproperty + def JA(cls): + return cls("ja") + + @schemas.classproperty + def JAHIRA(cls): + return cls("ja-HIRA") + + @schemas.classproperty + def KO(cls): + return cls("ko") + + @schemas.classproperty + def NL(cls): + return cls("nl") + + @schemas.classproperty + def PL(cls): + return cls("pl") + + @schemas.classproperty + def PT(cls): + return cls("pt") + + @schemas.classproperty + def PTBR(cls): + return cls("pt-BR") + + @schemas.classproperty + def RO(cls): + return cls("ro") + + @schemas.classproperty + def RU(cls): + return cls("ru") + + @schemas.classproperty + def SV(cls): + return cls("sv") + + @schemas.classproperty + def TR(cls): + return cls("tr") + + @schemas.classproperty + def ZHHANS(cls): + return cls("zh-Hans") diff --git a/flat_api/model/google_classroom_coursework.py b/flat_api/model/google_classroom_coursework.py new file mode 100644 index 0000000..55c6dea --- /dev/null +++ b/flat_api/model/google_classroom_coursework.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GoogleClassroomCoursework( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A coursework on Google Classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + + + class topicId( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'topicId': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + "topicId": topicId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GoogleClassroomCoursework': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + topicId=topicId, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/google_classroom_coursework.pyi b/flat_api/model/google_classroom_coursework.pyi new file mode 100644 index 0000000..55c6dea --- /dev/null +++ b/flat_api/model/google_classroom_coursework.pyi @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GoogleClassroomCoursework( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A coursework on Google Classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + + + class topicId( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'topicId': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + "topicId": topicId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GoogleClassroomCoursework': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + topicId=topicId, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/google_classroom_submission.py b/flat_api/model/google_classroom_submission.py new file mode 100644 index 0000000..74c8d5b --- /dev/null +++ b/flat_api/model/google_classroom_submission.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GoogleClassroomSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A coursework submission on Google Classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GoogleClassroomSubmission': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/google_classroom_submission.pyi b/flat_api/model/google_classroom_submission.pyi new file mode 100644 index 0000000..74c8d5b --- /dev/null +++ b/flat_api/model/google_classroom_submission.pyi @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GoogleClassroomSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A coursework submission on Google Classroom + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GoogleClassroomSubmission': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/group.py b/flat_api/model/group.py new file mode 100644 index 0000000..087881e --- /dev/null +++ b/flat_api/model/group.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Group( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A group of users + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "generic": "GENERIC", + "classTeachers": "CLASS_TEACHERS", + "classStudents": "CLASS_STUDENTS", + } + + @schemas.classproperty + def GENERIC(cls): + return cls("generic") + + @schemas.classproperty + def CLASS_TEACHERS(cls): + return cls("classTeachers") + + @schemas.classproperty + def CLASS_STUDENTS(cls): + return cls("classStudents") + usersCount = schemas.NumberSchema + readOnly = schemas.BoolSchema + organization = schemas.StrSchema + creationDate = schemas.DateTimeSchema + __annotations__ = { + "id": id, + "name": name, + "type": type, + "usersCount": usersCount, + "readOnly": readOnly, + "organization": organization, + "creationDate": creationDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Group': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + usersCount=usersCount, + readOnly=readOnly, + organization=organization, + creationDate=creationDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/group.pyi b/flat_api/model/group.pyi new file mode 100644 index 0000000..b545230 --- /dev/null +++ b/flat_api/model/group.pyi @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Group( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A group of users + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def GENERIC(cls): + return cls("generic") + + @schemas.classproperty + def CLASS_TEACHERS(cls): + return cls("classTeachers") + + @schemas.classproperty + def CLASS_STUDENTS(cls): + return cls("classStudents") + usersCount = schemas.NumberSchema + readOnly = schemas.BoolSchema + organization = schemas.StrSchema + creationDate = schemas.DateTimeSchema + __annotations__ = { + "id": id, + "name": name, + "type": type, + "usersCount": usersCount, + "readOnly": readOnly, + "organization": organization, + "creationDate": creationDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Group': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + usersCount=usersCount, + readOnly=readOnly, + organization=organization, + creationDate=creationDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/group_details.py b/flat_api/model/group_details.py new file mode 100644 index 0000000..caa9f69 --- /dev/null +++ b/flat_api/model/group_details.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GroupDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The details of a group + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['GroupType']: + return GroupType + organization = schemas.StrSchema + creationDate = schemas.DateTimeSchema + usersCount = schemas.NumberSchema + readOnly = schemas.BoolSchema + __annotations__ = { + "id": id, + "name": name, + "type": type, + "organization": organization, + "creationDate": creationDate, + "usersCount": usersCount, + "readOnly": readOnly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'GroupType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['GroupType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union['GroupType', schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GroupDetails': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + organization=organization, + creationDate=creationDate, + usersCount=usersCount, + readOnly=readOnly, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.group_type import GroupType diff --git a/flat_api/model/group_details.pyi b/flat_api/model/group_details.pyi new file mode 100644 index 0000000..caa9f69 --- /dev/null +++ b/flat_api/model/group_details.pyi @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GroupDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The details of a group + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def type() -> typing.Type['GroupType']: + return GroupType + organization = schemas.StrSchema + creationDate = schemas.DateTimeSchema + usersCount = schemas.NumberSchema + readOnly = schemas.BoolSchema + __annotations__ = { + "id": id, + "name": name, + "type": type, + "organization": organization, + "creationDate": creationDate, + "usersCount": usersCount, + "readOnly": readOnly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'GroupType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['GroupType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + type: typing.Union['GroupType', schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GroupDetails': + return super().__new__( + cls, + *_args, + id=id, + name=name, + type=type, + organization=organization, + creationDate=creationDate, + usersCount=usersCount, + readOnly=readOnly, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.group_type import GroupType diff --git a/flat_api/model/group_type.py b/flat_api/model/group_type.py new file mode 100644 index 0000000..b621968 --- /dev/null +++ b/flat_api/model/group_type.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GroupType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of the group + """ + + + class MetaOapg: + enum_value_to_name = { + "generic": "GENERIC", + "classTeachers": "CLASS_TEACHERS", + "classStudents": "CLASS_STUDENTS", + } + + @schemas.classproperty + def GENERIC(cls): + return cls("generic") + + @schemas.classproperty + def CLASS_TEACHERS(cls): + return cls("classTeachers") + + @schemas.classproperty + def CLASS_STUDENTS(cls): + return cls("classStudents") diff --git a/flat_api/model/group_type.pyi b/flat_api/model/group_type.pyi new file mode 100644 index 0000000..bb46468 --- /dev/null +++ b/flat_api/model/group_type.pyi @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class GroupType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of the group + """ + + @schemas.classproperty + def GENERIC(cls): + return cls("generic") + + @schemas.classproperty + def CLASS_TEACHERS(cls): + return cls("classTeachers") + + @schemas.classproperty + def CLASS_STUDENTS(cls): + return cls("classStudents") diff --git a/flat_api/model/license_mode.py b/flat_api/model/license_mode.py new file mode 100644 index 0000000..22fec82 --- /dev/null +++ b/flat_api/model/license_mode.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LicenseMode( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Mode of the license + """ + + + class MetaOapg: + enum_value_to_name = { + "credit": "CREDIT", + "site": "SITE", + } + + @schemas.classproperty + def CREDIT(cls): + return cls("credit") + + @schemas.classproperty + def SITE(cls): + return cls("site") diff --git a/test/test_assignment_creation.py b/flat_api/model/license_mode.pyi similarity index 70% rename from test/test_assignment_creation.py rename to flat_api/model/license_mode.pyi index e0cbb6a..9f722ea 100644 --- a/test/test_assignment_creation.py +++ b/flat_api/model/license_mode.pyi @@ -5,36 +5,41 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.assignment_creation import AssignmentCreation # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentCreation(unittest.TestCase): - """AssignmentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentCreation(self): - """Test AssignmentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_creation.AssignmentCreation() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LicenseMode( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Mode of the license + """ + + @schemas.classproperty + def CREDIT(cls): + return cls("credit") + + @schemas.classproperty + def SITE(cls): + return cls("site") diff --git a/flat_api/model/license_sources.py b/flat_api/model/license_sources.py new file mode 100644 index 0000000..e2dd691 --- /dev/null +++ b/flat_api/model/license_sources.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LicenseSources( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Source of the license + """ + + + class MetaOapg: + enum_value_to_name = { + "order": "ORDER", + "trial": "TRIAL", + "voucher": "VOUCHER", + "distributor": "DISTRIBUTOR", + "subscription": "SUBSCRIPTION", + "appStore": "APP_STORE", + "playStore": "PLAY_STORE", + "musicfirst": "MUSICFIRST", + } + + @schemas.classproperty + def ORDER(cls): + return cls("order") + + @schemas.classproperty + def TRIAL(cls): + return cls("trial") + + @schemas.classproperty + def VOUCHER(cls): + return cls("voucher") + + @schemas.classproperty + def DISTRIBUTOR(cls): + return cls("distributor") + + @schemas.classproperty + def SUBSCRIPTION(cls): + return cls("subscription") + + @schemas.classproperty + def APP_STORE(cls): + return cls("appStore") + + @schemas.classproperty + def PLAY_STORE(cls): + return cls("playStore") + + @schemas.classproperty + def MUSICFIRST(cls): + return cls("musicfirst") diff --git a/flat_api/model/license_sources.pyi b/flat_api/model/license_sources.pyi new file mode 100644 index 0000000..d246080 --- /dev/null +++ b/flat_api/model/license_sources.pyi @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LicenseSources( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Source of the license + """ + + @schemas.classproperty + def ORDER(cls): + return cls("order") + + @schemas.classproperty + def TRIAL(cls): + return cls("trial") + + @schemas.classproperty + def VOUCHER(cls): + return cls("voucher") + + @schemas.classproperty + def DISTRIBUTOR(cls): + return cls("distributor") + + @schemas.classproperty + def SUBSCRIPTION(cls): + return cls("subscription") + + @schemas.classproperty + def APP_STORE(cls): + return cls("appStore") + + @schemas.classproperty + def PLAY_STORE(cls): + return cls("playStore") + + @schemas.classproperty + def MUSICFIRST(cls): + return cls("musicfirst") diff --git a/flat_api/model/lms_name.py b/flat_api/model/lms_name.py new file mode 100644 index 0000000..ec71519 --- /dev/null +++ b/flat_api/model/lms_name.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LmsName( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + LMS name + """ + + + class MetaOapg: + enum_value_to_name = { + "canvas": "CANVAS", + "moodle": "MOODLE", + "schoology": "SCHOOLOGY", + "blackboard": "BLACKBOARD", + "desire2learn": "DESIRE2LEARN", + "sakai": "SAKAI", + "schoolbox": "SCHOOLBOX", + "other": "OTHER", + } + + @schemas.classproperty + def CANVAS(cls): + return cls("canvas") + + @schemas.classproperty + def MOODLE(cls): + return cls("moodle") + + @schemas.classproperty + def SCHOOLOGY(cls): + return cls("schoology") + + @schemas.classproperty + def BLACKBOARD(cls): + return cls("blackboard") + + @schemas.classproperty + def DESIRE2LEARN(cls): + return cls("desire2learn") + + @schemas.classproperty + def SAKAI(cls): + return cls("sakai") + + @schemas.classproperty + def SCHOOLBOX(cls): + return cls("schoolbox") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/lms_name.pyi b/flat_api/model/lms_name.pyi new file mode 100644 index 0000000..f458b85 --- /dev/null +++ b/flat_api/model/lms_name.pyi @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LmsName( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + LMS name + """ + + @schemas.classproperty + def CANVAS(cls): + return cls("canvas") + + @schemas.classproperty + def MOODLE(cls): + return cls("moodle") + + @schemas.classproperty + def SCHOOLOGY(cls): + return cls("schoology") + + @schemas.classproperty + def BLACKBOARD(cls): + return cls("blackboard") + + @schemas.classproperty + def DESIRE2LEARN(cls): + return cls("desire2learn") + + @schemas.classproperty + def SAKAI(cls): + return cls("sakai") + + @schemas.classproperty + def SCHOOLBOX(cls): + return cls("schoolbox") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/lti_credentials.py b/flat_api/model/lti_credentials.py new file mode 100644 index 0000000..ae898ba --- /dev/null +++ b/flat_api/model/lti_credentials.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LtiCredentials( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A couple of LTI 1.x OAuth credentials + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def lms() -> typing.Type['LmsName']: + return LmsName + organization = schemas.StrSchema + creator = schemas.StrSchema + creationDate = schemas.DateTimeSchema + lastUsage = schemas.DateTimeSchema + consumerKey = schemas.StrSchema + consumerSecret = schemas.StrSchema + __annotations__ = { + "id": id, + "name": name, + "lms": lms, + "organization": organization, + "creator": creator, + "creationDate": creationDate, + "lastUsage": lastUsage, + "consumerKey": consumerKey, + "consumerSecret": consumerSecret, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastUsage"]) -> MetaOapg.properties.lastUsage: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["consumerKey"]) -> MetaOapg.properties.consumerKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["consumerSecret"]) -> MetaOapg.properties.consumerSecret: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> typing.Union['LmsName', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastUsage"]) -> typing.Union[MetaOapg.properties.lastUsage, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["consumerKey"]) -> typing.Union[MetaOapg.properties.consumerKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["consumerSecret"]) -> typing.Union[MetaOapg.properties.consumerSecret, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + lms: typing.Union['LmsName', schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + lastUsage: typing.Union[MetaOapg.properties.lastUsage, str, datetime, schemas.Unset] = schemas.unset, + consumerKey: typing.Union[MetaOapg.properties.consumerKey, str, schemas.Unset] = schemas.unset, + consumerSecret: typing.Union[MetaOapg.properties.consumerSecret, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'LtiCredentials': + return super().__new__( + cls, + *_args, + id=id, + name=name, + lms=lms, + organization=organization, + creator=creator, + creationDate=creationDate, + lastUsage=lastUsage, + consumerKey=consumerKey, + consumerSecret=consumerSecret, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/lti_credentials.pyi b/flat_api/model/lti_credentials.pyi new file mode 100644 index 0000000..ae898ba --- /dev/null +++ b/flat_api/model/lti_credentials.pyi @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LtiCredentials( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A couple of LTI 1.x OAuth credentials + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def lms() -> typing.Type['LmsName']: + return LmsName + organization = schemas.StrSchema + creator = schemas.StrSchema + creationDate = schemas.DateTimeSchema + lastUsage = schemas.DateTimeSchema + consumerKey = schemas.StrSchema + consumerSecret = schemas.StrSchema + __annotations__ = { + "id": id, + "name": name, + "lms": lms, + "organization": organization, + "creator": creator, + "creationDate": creationDate, + "lastUsage": lastUsage, + "consumerKey": consumerKey, + "consumerSecret": consumerSecret, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastUsage"]) -> MetaOapg.properties.lastUsage: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["consumerKey"]) -> MetaOapg.properties.consumerKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["consumerSecret"]) -> MetaOapg.properties.consumerSecret: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> typing.Union['LmsName', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastUsage"]) -> typing.Union[MetaOapg.properties.lastUsage, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["consumerKey"]) -> typing.Union[MetaOapg.properties.consumerKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["consumerSecret"]) -> typing.Union[MetaOapg.properties.consumerSecret, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + lms: typing.Union['LmsName', schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + lastUsage: typing.Union[MetaOapg.properties.lastUsage, str, datetime, schemas.Unset] = schemas.unset, + consumerKey: typing.Union[MetaOapg.properties.consumerKey, str, schemas.Unset] = schemas.unset, + consumerSecret: typing.Union[MetaOapg.properties.consumerSecret, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'LtiCredentials': + return super().__new__( + cls, + *_args, + id=id, + name=name, + lms=lms, + organization=organization, + creator=creator, + creationDate=creationDate, + lastUsage=lastUsage, + consumerKey=consumerKey, + consumerSecret=consumerSecret, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/lti_credentials_creation.py b/flat_api/model/lti_credentials_creation.py new file mode 100644 index 0000000..abbc3fd --- /dev/null +++ b/flat_api/model/lti_credentials_creation.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LtiCredentialsCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a couple of LTI 1.x OAuth credentials + """ + + + class MetaOapg: + required = { + "lms", + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 300 + + @staticmethod + def lms() -> typing.Type['LmsName']: + return LmsName + __annotations__ = { + "name": name, + "lms": lms, + } + + lms: 'LmsName' + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + lms: 'LmsName', + name: typing.Union[MetaOapg.properties.name, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'LtiCredentialsCreation': + return super().__new__( + cls, + *_args, + lms=lms, + name=name, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/lti_credentials_creation.pyi b/flat_api/model/lti_credentials_creation.pyi new file mode 100644 index 0000000..fca5dcd --- /dev/null +++ b/flat_api/model/lti_credentials_creation.pyi @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class LtiCredentialsCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a couple of LTI 1.x OAuth credentials + """ + + + class MetaOapg: + required = { + "lms", + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + pass + + @staticmethod + def lms() -> typing.Type['LmsName']: + return LmsName + __annotations__ = { + "name": name, + "lms": lms, + } + + lms: 'LmsName' + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + lms: 'LmsName', + name: typing.Union[MetaOapg.properties.name, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'LtiCredentialsCreation': + return super().__new__( + cls, + *_args, + lms=lms, + name=name, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/media_attachment.py b/flat_api/model/media_attachment.py new file mode 100644 index 0000000..f5525ae --- /dev/null +++ b/flat_api/model/media_attachment.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MediaAttachment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Media attachment. The API will automatically resolve the details, oEmbed, +and media available if possible and return them in this object + + """ + + + class MetaOapg: + required = { + "type", + } + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "rich": "RICH", + "photo": "PHOTO", + "video": "VIDEO", + "link": "LINK", + "flat": "FLAT", + "googleDrive": "GOOGLE_DRIVE", + "worksheet": "WORKSHEET", + "performance": "PERFORMANCE", + } + + @schemas.classproperty + def RICH(cls): + return cls("rich") + + @schemas.classproperty + def PHOTO(cls): + return cls("photo") + + @schemas.classproperty + def VIDEO(cls): + return cls("video") + + @schemas.classproperty + def LINK(cls): + return cls("link") + + @schemas.classproperty + def FLAT(cls): + return cls("flat") + + @schemas.classproperty + def GOOGLE_DRIVE(cls): + return cls("googleDrive") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") + score = schemas.StrSchema + revision = schemas.StrSchema + worksheet = schemas.StrSchema + dedicated = schemas.BoolSchema + track = schemas.StrSchema + + @staticmethod + def sharingMode() -> typing.Type['MediaScoreSharingMode']: + return MediaScoreSharingMode + lockScoreTemplate = schemas.BoolSchema + title = schemas.StrSchema + description = schemas.StrSchema + html = schemas.StrSchema + htmlWidth = schemas.StrSchema + htmlHeight = schemas.StrSchema + url = schemas.StrSchema + thumbnailUrl = schemas.StrSchema + thumbnailWidth = schemas.IntSchema + thumbnailHeight = schemas.IntSchema + authorName = schemas.StrSchema + authorUrl = schemas.StrSchema + iconUrl = schemas.StrSchema + mimeType = schemas.StrSchema + googleDriveFileId = schemas.StrSchema + __annotations__ = { + "type": type, + "score": score, + "revision": revision, + "worksheet": worksheet, + "dedicated": dedicated, + "track": track, + "sharingMode": sharingMode, + "lockScoreTemplate": lockScoreTemplate, + "title": title, + "description": description, + "html": html, + "htmlWidth": htmlWidth, + "htmlHeight": htmlHeight, + "url": url, + "thumbnailUrl": thumbnailUrl, + "thumbnailWidth": thumbnailWidth, + "thumbnailHeight": thumbnailHeight, + "authorName": authorName, + "authorUrl": authorUrl, + "iconUrl": iconUrl, + "mimeType": mimeType, + "googleDriveFileId": googleDriveFileId, + } + + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dedicated"]) -> MetaOapg.properties.dedicated: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["track"]) -> MetaOapg.properties.track: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["html"]) -> MetaOapg.properties.html: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlWidth"]) -> MetaOapg.properties.htmlWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlHeight"]) -> MetaOapg.properties.htmlHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailUrl"]) -> MetaOapg.properties.thumbnailUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailWidth"]) -> MetaOapg.properties.thumbnailWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailHeight"]) -> MetaOapg.properties.thumbnailHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["authorName"]) -> MetaOapg.properties.authorName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["authorUrl"]) -> MetaOapg.properties.authorUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["iconUrl"]) -> MetaOapg.properties.iconUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mimeType"]) -> MetaOapg.properties.mimeType: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dedicated"]) -> typing.Union[MetaOapg.properties.dedicated, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["track"]) -> typing.Union[MetaOapg.properties.track, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["html"]) -> typing.Union[MetaOapg.properties.html, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlWidth"]) -> typing.Union[MetaOapg.properties.htmlWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlHeight"]) -> typing.Union[MetaOapg.properties.htmlHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailUrl"]) -> typing.Union[MetaOapg.properties.thumbnailUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailWidth"]) -> typing.Union[MetaOapg.properties.thumbnailWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailHeight"]) -> typing.Union[MetaOapg.properties.thumbnailHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["authorName"]) -> typing.Union[MetaOapg.properties.authorName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["authorUrl"]) -> typing.Union[MetaOapg.properties.authorUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["iconUrl"]) -> typing.Union[MetaOapg.properties.iconUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mimeType"]) -> typing.Union[MetaOapg.properties.mimeType, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union[MetaOapg.properties.type, str, ], + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, + dedicated: typing.Union[MetaOapg.properties.dedicated, bool, schemas.Unset] = schemas.unset, + track: typing.Union[MetaOapg.properties.track, str, schemas.Unset] = schemas.unset, + sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, + lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + html: typing.Union[MetaOapg.properties.html, str, schemas.Unset] = schemas.unset, + htmlWidth: typing.Union[MetaOapg.properties.htmlWidth, str, schemas.Unset] = schemas.unset, + htmlHeight: typing.Union[MetaOapg.properties.htmlHeight, str, schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + thumbnailUrl: typing.Union[MetaOapg.properties.thumbnailUrl, str, schemas.Unset] = schemas.unset, + thumbnailWidth: typing.Union[MetaOapg.properties.thumbnailWidth, decimal.Decimal, int, schemas.Unset] = schemas.unset, + thumbnailHeight: typing.Union[MetaOapg.properties.thumbnailHeight, decimal.Decimal, int, schemas.Unset] = schemas.unset, + authorName: typing.Union[MetaOapg.properties.authorName, str, schemas.Unset] = schemas.unset, + authorUrl: typing.Union[MetaOapg.properties.authorUrl, str, schemas.Unset] = schemas.unset, + iconUrl: typing.Union[MetaOapg.properties.iconUrl, str, schemas.Unset] = schemas.unset, + mimeType: typing.Union[MetaOapg.properties.mimeType, str, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MediaAttachment': + return super().__new__( + cls, + *_args, + type=type, + score=score, + revision=revision, + worksheet=worksheet, + dedicated=dedicated, + track=track, + sharingMode=sharingMode, + lockScoreTemplate=lockScoreTemplate, + title=title, + description=description, + html=html, + htmlWidth=htmlWidth, + htmlHeight=htmlHeight, + url=url, + thumbnailUrl=thumbnailUrl, + thumbnailWidth=thumbnailWidth, + thumbnailHeight=thumbnailHeight, + authorName=authorName, + authorUrl=authorUrl, + iconUrl=iconUrl, + mimeType=mimeType, + googleDriveFileId=googleDriveFileId, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/media_attachment.pyi b/flat_api/model/media_attachment.pyi new file mode 100644 index 0000000..ff2e566 --- /dev/null +++ b/flat_api/model/media_attachment.pyi @@ -0,0 +1,340 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MediaAttachment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Media attachment. The API will automatically resolve the details, oEmbed, +and media available if possible and return them in this object + + """ + + + class MetaOapg: + required = { + "type", + } + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def RICH(cls): + return cls("rich") + + @schemas.classproperty + def PHOTO(cls): + return cls("photo") + + @schemas.classproperty + def VIDEO(cls): + return cls("video") + + @schemas.classproperty + def LINK(cls): + return cls("link") + + @schemas.classproperty + def FLAT(cls): + return cls("flat") + + @schemas.classproperty + def GOOGLE_DRIVE(cls): + return cls("googleDrive") + + @schemas.classproperty + def WORKSHEET(cls): + return cls("worksheet") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") + score = schemas.StrSchema + revision = schemas.StrSchema + worksheet = schemas.StrSchema + dedicated = schemas.BoolSchema + track = schemas.StrSchema + + @staticmethod + def sharingMode() -> typing.Type['MediaScoreSharingMode']: + return MediaScoreSharingMode + lockScoreTemplate = schemas.BoolSchema + title = schemas.StrSchema + description = schemas.StrSchema + html = schemas.StrSchema + htmlWidth = schemas.StrSchema + htmlHeight = schemas.StrSchema + url = schemas.StrSchema + thumbnailUrl = schemas.StrSchema + thumbnailWidth = schemas.IntSchema + thumbnailHeight = schemas.IntSchema + authorName = schemas.StrSchema + authorUrl = schemas.StrSchema + iconUrl = schemas.StrSchema + mimeType = schemas.StrSchema + googleDriveFileId = schemas.StrSchema + __annotations__ = { + "type": type, + "score": score, + "revision": revision, + "worksheet": worksheet, + "dedicated": dedicated, + "track": track, + "sharingMode": sharingMode, + "lockScoreTemplate": lockScoreTemplate, + "title": title, + "description": description, + "html": html, + "htmlWidth": htmlWidth, + "htmlHeight": htmlHeight, + "url": url, + "thumbnailUrl": thumbnailUrl, + "thumbnailWidth": thumbnailWidth, + "thumbnailHeight": thumbnailHeight, + "authorName": authorName, + "authorUrl": authorUrl, + "iconUrl": iconUrl, + "mimeType": mimeType, + "googleDriveFileId": googleDriveFileId, + } + + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dedicated"]) -> MetaOapg.properties.dedicated: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["track"]) -> MetaOapg.properties.track: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["html"]) -> MetaOapg.properties.html: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlWidth"]) -> MetaOapg.properties.htmlWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlHeight"]) -> MetaOapg.properties.htmlHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailUrl"]) -> MetaOapg.properties.thumbnailUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailWidth"]) -> MetaOapg.properties.thumbnailWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thumbnailHeight"]) -> MetaOapg.properties.thumbnailHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["authorName"]) -> MetaOapg.properties.authorName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["authorUrl"]) -> MetaOapg.properties.authorUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["iconUrl"]) -> MetaOapg.properties.iconUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mimeType"]) -> MetaOapg.properties.mimeType: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dedicated"]) -> typing.Union[MetaOapg.properties.dedicated, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["track"]) -> typing.Union[MetaOapg.properties.track, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["html"]) -> typing.Union[MetaOapg.properties.html, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlWidth"]) -> typing.Union[MetaOapg.properties.htmlWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlHeight"]) -> typing.Union[MetaOapg.properties.htmlHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailUrl"]) -> typing.Union[MetaOapg.properties.thumbnailUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailWidth"]) -> typing.Union[MetaOapg.properties.thumbnailWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thumbnailHeight"]) -> typing.Union[MetaOapg.properties.thumbnailHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["authorName"]) -> typing.Union[MetaOapg.properties.authorName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["authorUrl"]) -> typing.Union[MetaOapg.properties.authorUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["iconUrl"]) -> typing.Union[MetaOapg.properties.iconUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mimeType"]) -> typing.Union[MetaOapg.properties.mimeType, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + type: typing.Union[MetaOapg.properties.type, str, ], + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, + dedicated: typing.Union[MetaOapg.properties.dedicated, bool, schemas.Unset] = schemas.unset, + track: typing.Union[MetaOapg.properties.track, str, schemas.Unset] = schemas.unset, + sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, + lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + html: typing.Union[MetaOapg.properties.html, str, schemas.Unset] = schemas.unset, + htmlWidth: typing.Union[MetaOapg.properties.htmlWidth, str, schemas.Unset] = schemas.unset, + htmlHeight: typing.Union[MetaOapg.properties.htmlHeight, str, schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + thumbnailUrl: typing.Union[MetaOapg.properties.thumbnailUrl, str, schemas.Unset] = schemas.unset, + thumbnailWidth: typing.Union[MetaOapg.properties.thumbnailWidth, decimal.Decimal, int, schemas.Unset] = schemas.unset, + thumbnailHeight: typing.Union[MetaOapg.properties.thumbnailHeight, decimal.Decimal, int, schemas.Unset] = schemas.unset, + authorName: typing.Union[MetaOapg.properties.authorName, str, schemas.Unset] = schemas.unset, + authorUrl: typing.Union[MetaOapg.properties.authorUrl, str, schemas.Unset] = schemas.unset, + iconUrl: typing.Union[MetaOapg.properties.iconUrl, str, schemas.Unset] = schemas.unset, + mimeType: typing.Union[MetaOapg.properties.mimeType, str, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MediaAttachment': + return super().__new__( + cls, + *_args, + type=type, + score=score, + revision=revision, + worksheet=worksheet, + dedicated=dedicated, + track=track, + sharingMode=sharingMode, + lockScoreTemplate=lockScoreTemplate, + title=title, + description=description, + html=html, + htmlWidth=htmlWidth, + htmlHeight=htmlHeight, + url=url, + thumbnailUrl=thumbnailUrl, + thumbnailWidth=thumbnailWidth, + thumbnailHeight=thumbnailHeight, + authorName=authorName, + authorUrl=authorUrl, + iconUrl=iconUrl, + mimeType=mimeType, + googleDriveFileId=googleDriveFileId, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/media_score_sharing_mode.py b/flat_api/model/media_score_sharing_mode.py new file mode 100644 index 0000000..16ff813 --- /dev/null +++ b/flat_api/model/media_score_sharing_mode.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MediaScoreSharingMode( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The sharing mode of the score for classes post and assignments + """ + + + class MetaOapg: + enum_value_to_name = { + "read": "READ", + "write": "WRITE", + "copy": "COPY", + "performance": "PERFORMANCE", + } + + @schemas.classproperty + def READ(cls): + return cls("read") + + @schemas.classproperty + def WRITE(cls): + return cls("write") + + @schemas.classproperty + def COPY(cls): + return cls("copy") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") diff --git a/flat_api/model/media_score_sharing_mode.pyi b/flat_api/model/media_score_sharing_mode.pyi new file mode 100644 index 0000000..38db927 --- /dev/null +++ b/flat_api/model/media_score_sharing_mode.pyi @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MediaScoreSharingMode( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The sharing mode of the score for classes post and assignments + """ + + @schemas.classproperty + def READ(cls): + return cls("read") + + @schemas.classproperty + def WRITE(cls): + return cls("write") + + @schemas.classproperty + def COPY(cls): + return cls("copy") + + @schemas.classproperty + def PERFORMANCE(cls): + return cls("performance") diff --git a/flat_api/model/microsoft_graph_assignment.py b/flat_api/model/microsoft_graph_assignment.py new file mode 100644 index 0000000..4080306 --- /dev/null +++ b/flat_api/model/microsoft_graph_assignment.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MicrosoftGraphAssignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Microsoft Teams asignment + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + + + class categories( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'categories': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + "categories": categories, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + categories: typing.Union[MetaOapg.properties.categories, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MicrosoftGraphAssignment': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + categories=categories, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/microsoft_graph_assignment.pyi b/flat_api/model/microsoft_graph_assignment.pyi new file mode 100644 index 0000000..4080306 --- /dev/null +++ b/flat_api/model/microsoft_graph_assignment.pyi @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MicrosoftGraphAssignment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Microsoft Teams asignment + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + + + class categories( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'categories': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + "categories": categories, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + categories: typing.Union[MetaOapg.properties.categories, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MicrosoftGraphAssignment': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + categories=categories, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/microsoft_graph_submission.py b/flat_api/model/microsoft_graph_submission.py new file mode 100644 index 0000000..4864dcb --- /dev/null +++ b/flat_api/model/microsoft_graph_submission.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MicrosoftGraphSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Microsoft Teams submission + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MicrosoftGraphSubmission': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/microsoft_graph_submission.pyi b/flat_api/model/microsoft_graph_submission.pyi new file mode 100644 index 0000000..4864dcb --- /dev/null +++ b/flat_api/model/microsoft_graph_submission.pyi @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class MicrosoftGraphSubmission( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A Microsoft Teams submission + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + state = schemas.StrSchema + alternateLink = schemas.StrSchema + __annotations__ = { + "id": id, + "state": state, + "alternateLink": alternateLink, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MicrosoftGraphSubmission': + return super().__new__( + cls, + *_args, + id=id, + state=state, + alternateLink=alternateLink, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/organization_invitation.py b/flat_api/model/organization_invitation.py new file mode 100644 index 0000000..c425cd3 --- /dev/null +++ b/flat_api/model/organization_invitation.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationInvitation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Details of an invitation to join an organization + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + customCode = schemas.StrSchema + email = schemas.StrSchema + invitedBy = schemas.StrSchema + usedBy = schemas.StrSchema + __annotations__ = { + "id": id, + "organization": organization, + "organizationRole": organizationRole, + "customCode": customCode, + "email": email, + "invitedBy": invitedBy, + "usedBy": usedBy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["customCode"]) -> MetaOapg.properties.customCode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["invitedBy"]) -> MetaOapg.properties.invitedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usedBy"]) -> MetaOapg.properties.usedBy: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["customCode"]) -> typing.Union[MetaOapg.properties.customCode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["invitedBy"]) -> typing.Union[MetaOapg.properties.invitedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usedBy"]) -> typing.Union[MetaOapg.properties.usedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + customCode: typing.Union[MetaOapg.properties.customCode, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + invitedBy: typing.Union[MetaOapg.properties.invitedBy, str, schemas.Unset] = schemas.unset, + usedBy: typing.Union[MetaOapg.properties.usedBy, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationInvitation': + return super().__new__( + cls, + *_args, + id=id, + organization=organization, + organizationRole=organizationRole, + customCode=customCode, + email=email, + invitedBy=invitedBy, + usedBy=usedBy, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_invitation.pyi b/flat_api/model/organization_invitation.pyi new file mode 100644 index 0000000..c425cd3 --- /dev/null +++ b/flat_api/model/organization_invitation.pyi @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationInvitation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Details of an invitation to join an organization + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + customCode = schemas.StrSchema + email = schemas.StrSchema + invitedBy = schemas.StrSchema + usedBy = schemas.StrSchema + __annotations__ = { + "id": id, + "organization": organization, + "organizationRole": organizationRole, + "customCode": customCode, + "email": email, + "invitedBy": invitedBy, + "usedBy": usedBy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["customCode"]) -> MetaOapg.properties.customCode: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["invitedBy"]) -> MetaOapg.properties.invitedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["usedBy"]) -> MetaOapg.properties.usedBy: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["customCode"]) -> typing.Union[MetaOapg.properties.customCode, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["invitedBy"]) -> typing.Union[MetaOapg.properties.invitedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["usedBy"]) -> typing.Union[MetaOapg.properties.usedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + customCode: typing.Union[MetaOapg.properties.customCode, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + invitedBy: typing.Union[MetaOapg.properties.invitedBy, str, schemas.Unset] = schemas.unset, + usedBy: typing.Union[MetaOapg.properties.usedBy, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationInvitation': + return super().__new__( + cls, + *_args, + id=id, + organization=organization, + organizationRole=organizationRole, + customCode=customCode, + email=email, + invitedBy=invitedBy, + usedBy=usedBy, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_invitation_creation.py b/flat_api/model/organization_invitation_creation.py new file mode 100644 index 0000000..c7f1d0d --- /dev/null +++ b/flat_api/model/organization_invitation_creation.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationInvitationCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The parameters to create an organization invitation + """ + + + class MetaOapg: + + class properties: + email = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + __annotations__ = { + "email": email, + "organizationRole": organizationRole, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationInvitationCreation': + return super().__new__( + cls, + *_args, + email=email, + organizationRole=organizationRole, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_invitation_creation.pyi b/flat_api/model/organization_invitation_creation.pyi new file mode 100644 index 0000000..c7f1d0d --- /dev/null +++ b/flat_api/model/organization_invitation_creation.pyi @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationInvitationCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The parameters to create an organization invitation + """ + + + class MetaOapg: + + class properties: + email = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + __annotations__ = { + "email": email, + "organizationRole": organizationRole, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationInvitationCreation': + return super().__new__( + cls, + *_args, + email=email, + organizationRole=organizationRole, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_roles.py b/flat_api/model/organization_roles.py new file mode 100644 index 0000000..7894dcf --- /dev/null +++ b/flat_api/model/organization_roles.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationRoles( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User's Organization Role (for Edu users only) + """ + + + class MetaOapg: + enum_value_to_name = { + "admin": "ADMIN", + "billing": "BILLING", + "teacher": "TEACHER", + "user": "USER", + } + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + @schemas.classproperty + def BILLING(cls): + return cls("billing") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def USER(cls): + return cls("user") diff --git a/flat_api/model/organization_roles.pyi b/flat_api/model/organization_roles.pyi new file mode 100644 index 0000000..592b3d3 --- /dev/null +++ b/flat_api/model/organization_roles.pyi @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationRoles( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User's Organization Role (for Edu users only) + """ + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + @schemas.classproperty + def BILLING(cls): + return cls("billing") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def USER(cls): + return cls("user") diff --git a/flat_api/model/organization_user_access_token_creation.py b/flat_api/model/organization_user_access_token_creation.py new file mode 100644 index 0000000..066b648 --- /dev/null +++ b/flat_api/model/organization_user_access_token_creation.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationUserAccessTokenCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a delegated API access token for an organization user + """ + + + class MetaOapg: + required = { + "scopes", + } + + class properties: + + + class scopes( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AppScopes']: + return AppScopes + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scopes': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AppScopes': + return super().__getitem__(i) + __annotations__ = { + "scopes": scopes, + } + + scopes: MetaOapg.properties.scopes + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationUserAccessTokenCreation': + return super().__new__( + cls, + *_args, + scopes=scopes, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/organization_user_access_token_creation.pyi b/flat_api/model/organization_user_access_token_creation.pyi new file mode 100644 index 0000000..066b648 --- /dev/null +++ b/flat_api/model/organization_user_access_token_creation.pyi @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class OrganizationUserAccessTokenCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a delegated API access token for an organization user + """ + + + class MetaOapg: + required = { + "scopes", + } + + class properties: + + + class scopes( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AppScopes']: + return AppScopes + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'scopes': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AppScopes': + return super().__getitem__(i) + __annotations__ = { + "scopes": scopes, + } + + scopes: MetaOapg.properties.scopes + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OrganizationUserAccessTokenCreation': + return super().__new__( + cls, + *_args, + scopes=scopes, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/resource_collaborator.py b/flat_api/model/resource_collaborator.py new file mode 100644 index 0000000..0b8e1e7 --- /dev/null +++ b/flat_api/model/resource_collaborator.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceCollaborator( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + isCollaborator = schemas.BoolSchema + id = schemas.StrSchema + score = schemas.StrSchema + collection = schemas.StrSchema + + @staticmethod + def user() -> typing.Type['UserPublic']: + return UserPublic + + @staticmethod + def group() -> typing.Type['Group']: + return Group + userEmail = schemas.StrSchema + invited = schemas.BoolSchema + __annotations__ = { + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + "isCollaborator": isCollaborator, + "id": id, + "score": score, + "collection": collection, + "user": user, + "group": group, + "userEmail": userEmail, + "invited": invited, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublic': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> 'Group': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["invited"]) -> MetaOapg.properties.invited: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublic', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union['Group', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["invited"]) -> typing.Union[MetaOapg.properties.invited, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, + user: typing.Union['UserPublic', schemas.Unset] = schemas.unset, + group: typing.Union['Group', schemas.Unset] = schemas.unset, + userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, + invited: typing.Union[MetaOapg.properties.invited, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceCollaborator': + return super().__new__( + cls, + *_args, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + isCollaborator=isCollaborator, + id=id, + score=score, + collection=collection, + user=user, + group=group, + userEmail=userEmail, + invited=invited, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.group import Group +from flat_api.model.user_public import UserPublic diff --git a/flat_api/model/resource_collaborator.pyi b/flat_api/model/resource_collaborator.pyi new file mode 100644 index 0000000..0b8e1e7 --- /dev/null +++ b/flat_api/model/resource_collaborator.pyi @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceCollaborator( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + isCollaborator = schemas.BoolSchema + id = schemas.StrSchema + score = schemas.StrSchema + collection = schemas.StrSchema + + @staticmethod + def user() -> typing.Type['UserPublic']: + return UserPublic + + @staticmethod + def group() -> typing.Type['Group']: + return Group + userEmail = schemas.StrSchema + invited = schemas.BoolSchema + __annotations__ = { + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + "isCollaborator": isCollaborator, + "id": id, + "score": score, + "collection": collection, + "user": user, + "group": group, + "userEmail": userEmail, + "invited": invited, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublic': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> 'Group': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["invited"]) -> MetaOapg.properties.invited: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublic', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union['Group', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["invited"]) -> typing.Union[MetaOapg.properties.invited, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, + user: typing.Union['UserPublic', schemas.Unset] = schemas.unset, + group: typing.Union['Group', schemas.Unset] = schemas.unset, + userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, + invited: typing.Union[MetaOapg.properties.invited, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceCollaborator': + return super().__new__( + cls, + *_args, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + isCollaborator=isCollaborator, + id=id, + score=score, + collection=collection, + user=user, + group=group, + userEmail=userEmail, + invited=invited, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.group import Group +from flat_api.model.user_public import UserPublic diff --git a/flat_api/model/resource_collaborator_creation.py b/flat_api/model/resource_collaborator_creation.py new file mode 100644 index 0000000..054b8cd --- /dev/null +++ b/flat_api/model/resource_collaborator_creation.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceCollaboratorCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Add a collaborator to a resource. + """ + + + class MetaOapg: + + class properties: + user = schemas.StrSchema + group = schemas.StrSchema + userEmail = schemas.StrSchema + userToken = schemas.StrSchema + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + __annotations__ = { + "user": user, + "group": group, + "userEmail": userEmail, + "userToken": userToken, + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userToken"]) -> MetaOapg.properties.userToken: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union[MetaOapg.properties.group, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userToken"]) -> typing.Union[MetaOapg.properties.userToken, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + group: typing.Union[MetaOapg.properties.group, str, schemas.Unset] = schemas.unset, + userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, + userToken: typing.Union[MetaOapg.properties.userToken, str, schemas.Unset] = schemas.unset, + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceCollaboratorCreation': + return super().__new__( + cls, + *_args, + user=user, + group=group, + userEmail=userEmail, + userToken=userToken, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/resource_collaborator_creation.pyi b/flat_api/model/resource_collaborator_creation.pyi new file mode 100644 index 0000000..054b8cd --- /dev/null +++ b/flat_api/model/resource_collaborator_creation.pyi @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceCollaboratorCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Add a collaborator to a resource. + """ + + + class MetaOapg: + + class properties: + user = schemas.StrSchema + group = schemas.StrSchema + userEmail = schemas.StrSchema + userToken = schemas.StrSchema + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + __annotations__ = { + "user": user, + "group": group, + "userEmail": userEmail, + "userToken": userToken, + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["userToken"]) -> MetaOapg.properties.userToken: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union[MetaOapg.properties.group, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["userToken"]) -> typing.Union[MetaOapg.properties.userToken, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + group: typing.Union[MetaOapg.properties.group, str, schemas.Unset] = schemas.unset, + userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, + userToken: typing.Union[MetaOapg.properties.userToken, str, schemas.Unset] = schemas.unset, + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceCollaboratorCreation': + return super().__new__( + cls, + *_args, + user=user, + group=group, + userEmail=userEmail, + userToken=userToken, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/resource_rights.py b/flat_api/model/resource_rights.py new file mode 100644 index 0000000..ca535c5 --- /dev/null +++ b/flat_api/model/resource_rights.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceRights( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The rights of the current user on a score or collection + """ + + + class MetaOapg: + + class properties: + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + isCollaborator = schemas.BoolSchema + __annotations__ = { + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + "isCollaborator": isCollaborator, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceRights': + return super().__new__( + cls, + *_args, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + isCollaborator=isCollaborator, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/resource_rights.pyi b/flat_api/model/resource_rights.pyi new file mode 100644 index 0000000..ca535c5 --- /dev/null +++ b/flat_api/model/resource_rights.pyi @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ResourceRights( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The rights of the current user on a score or collection + """ + + + class MetaOapg: + + class properties: + aclRead = schemas.BoolSchema + aclWrite = schemas.BoolSchema + aclAdmin = schemas.BoolSchema + isCollaborator = schemas.BoolSchema + __annotations__ = { + "aclRead": aclRead, + "aclWrite": aclWrite, + "aclAdmin": aclAdmin, + "isCollaborator": isCollaborator, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, + aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, + aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, + isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ResourceRights': + return super().__new__( + cls, + *_args, + aclRead=aclRead, + aclWrite=aclWrite, + aclAdmin=aclAdmin, + isCollaborator=isCollaborator, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_comment.py b/flat_api/model/score_comment.py new file mode 100644 index 0000000..b9e9568 --- /dev/null +++ b/flat_api/model/score_comment.py @@ -0,0 +1,357 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreComment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Comment added on a sheet music + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "document": "DOCUMENT", + "inline": "INLINE", + } + + @schemas.classproperty + def DOCUMENT(cls): + return cls("document") + + @schemas.classproperty + def INLINE(cls): + return cls("inline") + user = schemas.StrSchema + score = schemas.StrSchema + revision = schemas.StrSchema + replyTo = schemas.StrSchema + date = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + comment = schemas.StrSchema + rawComment = schemas.StrSchema + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + + + class mentions( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'mentions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + resolved = schemas.BoolSchema + resolvedBy = schemas.StrSchema + + + class moderation( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + hidden = schemas.BoolSchema + + + class reason( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "spam": "SPAM", + "inappropriate": "INAPPROPRIATE", + } + + @schemas.classproperty + def SPAM(cls): + return cls("spam") + + @schemas.classproperty + def INAPPROPRIATE(cls): + return cls("inappropriate") + __annotations__ = { + "hidden": hidden, + "reason": reason, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hidden"]) -> MetaOapg.properties.hidden: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hidden"]) -> typing.Union[MetaOapg.properties.hidden, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + hidden: typing.Union[MetaOapg.properties.hidden, bool, schemas.Unset] = schemas.unset, + reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'moderation': + return super().__new__( + cls, + *_args, + hidden=hidden, + reason=reason, + _configuration=_configuration, + **kwargs, + ) + spam = schemas.BoolSchema + __annotations__ = { + "id": id, + "type": type, + "user": user, + "score": score, + "revision": revision, + "replyTo": replyTo, + "date": date, + "modificationDate": modificationDate, + "comment": comment, + "rawComment": rawComment, + "context": context, + "mentions": mentions, + "resolved": resolved, + "resolvedBy": resolvedBy, + "moderation": moderation, + "spam": spam, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resolved"]) -> MetaOapg.properties.resolved: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resolvedBy"]) -> MetaOapg.properties.resolvedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["moderation"]) -> MetaOapg.properties.moderation: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["spam"]) -> MetaOapg.properties.spam: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resolved"]) -> typing.Union[MetaOapg.properties.resolved, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resolvedBy"]) -> typing.Union[MetaOapg.properties.resolvedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["moderation"]) -> typing.Union[MetaOapg.properties.moderation, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["spam"]) -> typing.Union[MetaOapg.properties.spam, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, + resolved: typing.Union[MetaOapg.properties.resolved, bool, schemas.Unset] = schemas.unset, + resolvedBy: typing.Union[MetaOapg.properties.resolvedBy, str, schemas.Unset] = schemas.unset, + moderation: typing.Union[MetaOapg.properties.moderation, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + spam: typing.Union[MetaOapg.properties.spam, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreComment': + return super().__new__( + cls, + *_args, + id=id, + type=type, + user=user, + score=score, + revision=revision, + replyTo=replyTo, + date=date, + modificationDate=modificationDate, + comment=comment, + rawComment=rawComment, + context=context, + mentions=mentions, + resolved=resolved, + resolvedBy=resolvedBy, + moderation=moderation, + spam=spam, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment.pyi b/flat_api/model/score_comment.pyi new file mode 100644 index 0000000..9bb31ff --- /dev/null +++ b/flat_api/model/score_comment.pyi @@ -0,0 +1,343 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreComment( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Comment added on a sheet music + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def DOCUMENT(cls): + return cls("document") + + @schemas.classproperty + def INLINE(cls): + return cls("inline") + user = schemas.StrSchema + score = schemas.StrSchema + revision = schemas.StrSchema + replyTo = schemas.StrSchema + date = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + comment = schemas.StrSchema + rawComment = schemas.StrSchema + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + + + class mentions( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'mentions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + resolved = schemas.BoolSchema + resolvedBy = schemas.StrSchema + + + class moderation( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + hidden = schemas.BoolSchema + + + class reason( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def SPAM(cls): + return cls("spam") + + @schemas.classproperty + def INAPPROPRIATE(cls): + return cls("inappropriate") + __annotations__ = { + "hidden": hidden, + "reason": reason, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hidden"]) -> MetaOapg.properties.hidden: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hidden"]) -> typing.Union[MetaOapg.properties.hidden, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + hidden: typing.Union[MetaOapg.properties.hidden, bool, schemas.Unset] = schemas.unset, + reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'moderation': + return super().__new__( + cls, + *_args, + hidden=hidden, + reason=reason, + _configuration=_configuration, + **kwargs, + ) + spam = schemas.BoolSchema + __annotations__ = { + "id": id, + "type": type, + "user": user, + "score": score, + "revision": revision, + "replyTo": replyTo, + "date": date, + "modificationDate": modificationDate, + "comment": comment, + "rawComment": rawComment, + "context": context, + "mentions": mentions, + "resolved": resolved, + "resolvedBy": resolvedBy, + "moderation": moderation, + "spam": spam, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resolved"]) -> MetaOapg.properties.resolved: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["resolvedBy"]) -> MetaOapg.properties.resolvedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["moderation"]) -> MetaOapg.properties.moderation: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["spam"]) -> MetaOapg.properties.spam: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resolved"]) -> typing.Union[MetaOapg.properties.resolved, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["resolvedBy"]) -> typing.Union[MetaOapg.properties.resolvedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["moderation"]) -> typing.Union[MetaOapg.properties.moderation, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["spam"]) -> typing.Union[MetaOapg.properties.spam, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, + date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, + resolved: typing.Union[MetaOapg.properties.resolved, bool, schemas.Unset] = schemas.unset, + resolvedBy: typing.Union[MetaOapg.properties.resolvedBy, str, schemas.Unset] = schemas.unset, + moderation: typing.Union[MetaOapg.properties.moderation, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + spam: typing.Union[MetaOapg.properties.spam, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreComment': + return super().__new__( + cls, + *_args, + id=id, + type=type, + user=user, + score=score, + revision=revision, + replyTo=replyTo, + date=date, + modificationDate=modificationDate, + comment=comment, + rawComment=rawComment, + context=context, + mentions=mentions, + resolved=resolved, + resolvedBy=resolvedBy, + moderation=moderation, + spam=spam, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_context.py b/flat_api/model/score_comment_context.py new file mode 100644 index 0000000..5d2e4af --- /dev/null +++ b/flat_api/model/score_comment_context.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentContext( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + + """ + + + class MetaOapg: + required = { + "measureUuids", + "partUuid", + "stopDpq", + "startTimePos", + "startDpq", + "stopTimePos", + } + + class properties: + partUuid = schemas.StrSchema + + + class measureUuids( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'measureUuids': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + startTimePos = schemas.NumberSchema + stopTimePos = schemas.NumberSchema + startDpq = schemas.NumberSchema + stopDpq = schemas.NumberSchema + staffIdx = schemas.NumberSchema + staffUuid = schemas.StrSchema + __annotations__ = { + "partUuid": partUuid, + "measureUuids": measureUuids, + "startTimePos": startTimePos, + "stopTimePos": stopTimePos, + "startDpq": startDpq, + "stopDpq": stopDpq, + "staffIdx": staffIdx, + "staffUuid": staffUuid, + } + + measureUuids: MetaOapg.properties.measureUuids + partUuid: MetaOapg.properties.partUuid + stopDpq: MetaOapg.properties.stopDpq + startTimePos: MetaOapg.properties.startTimePos + startDpq: MetaOapg.properties.startDpq + stopTimePos: MetaOapg.properties.stopTimePos + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["staffIdx"]) -> MetaOapg.properties.staffIdx: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["staffUuid"]) -> MetaOapg.properties.staffUuid: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["staffIdx"]) -> typing.Union[MetaOapg.properties.staffIdx, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["staffUuid"]) -> typing.Union[MetaOapg.properties.staffUuid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + measureUuids: typing.Union[MetaOapg.properties.measureUuids, list, tuple, ], + partUuid: typing.Union[MetaOapg.properties.partUuid, str, ], + stopDpq: typing.Union[MetaOapg.properties.stopDpq, decimal.Decimal, int, float, ], + startTimePos: typing.Union[MetaOapg.properties.startTimePos, decimal.Decimal, int, float, ], + startDpq: typing.Union[MetaOapg.properties.startDpq, decimal.Decimal, int, float, ], + stopTimePos: typing.Union[MetaOapg.properties.stopTimePos, decimal.Decimal, int, float, ], + staffIdx: typing.Union[MetaOapg.properties.staffIdx, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + staffUuid: typing.Union[MetaOapg.properties.staffUuid, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentContext': + return super().__new__( + cls, + *_args, + measureUuids=measureUuids, + partUuid=partUuid, + stopDpq=stopDpq, + startTimePos=startTimePos, + startDpq=startDpq, + stopTimePos=stopTimePos, + staffIdx=staffIdx, + staffUuid=staffUuid, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_comment_context.pyi b/flat_api/model/score_comment_context.pyi new file mode 100644 index 0000000..5d2e4af --- /dev/null +++ b/flat_api/model/score_comment_context.pyi @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentContext( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + + """ + + + class MetaOapg: + required = { + "measureUuids", + "partUuid", + "stopDpq", + "startTimePos", + "startDpq", + "stopTimePos", + } + + class properties: + partUuid = schemas.StrSchema + + + class measureUuids( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'measureUuids': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + startTimePos = schemas.NumberSchema + stopTimePos = schemas.NumberSchema + startDpq = schemas.NumberSchema + stopDpq = schemas.NumberSchema + staffIdx = schemas.NumberSchema + staffUuid = schemas.StrSchema + __annotations__ = { + "partUuid": partUuid, + "measureUuids": measureUuids, + "startTimePos": startTimePos, + "stopTimePos": stopTimePos, + "startDpq": startDpq, + "stopDpq": stopDpq, + "staffIdx": staffIdx, + "staffUuid": staffUuid, + } + + measureUuids: MetaOapg.properties.measureUuids + partUuid: MetaOapg.properties.partUuid + stopDpq: MetaOapg.properties.stopDpq + startTimePos: MetaOapg.properties.startTimePos + startDpq: MetaOapg.properties.startDpq + stopTimePos: MetaOapg.properties.stopTimePos + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["staffIdx"]) -> MetaOapg.properties.staffIdx: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["staffUuid"]) -> MetaOapg.properties.staffUuid: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["staffIdx"]) -> typing.Union[MetaOapg.properties.staffIdx, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["staffUuid"]) -> typing.Union[MetaOapg.properties.staffUuid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + measureUuids: typing.Union[MetaOapg.properties.measureUuids, list, tuple, ], + partUuid: typing.Union[MetaOapg.properties.partUuid, str, ], + stopDpq: typing.Union[MetaOapg.properties.stopDpq, decimal.Decimal, int, float, ], + startTimePos: typing.Union[MetaOapg.properties.startTimePos, decimal.Decimal, int, float, ], + startDpq: typing.Union[MetaOapg.properties.startDpq, decimal.Decimal, int, float, ], + stopTimePos: typing.Union[MetaOapg.properties.stopTimePos, decimal.Decimal, int, float, ], + staffIdx: typing.Union[MetaOapg.properties.staffIdx, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + staffUuid: typing.Union[MetaOapg.properties.staffUuid, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentContext': + return super().__new__( + cls, + *_args, + measureUuids=measureUuids, + partUuid=partUuid, + stopDpq=stopDpq, + startTimePos=startTimePos, + startDpq=startDpq, + stopTimePos=stopTimePos, + staffIdx=staffIdx, + staffUuid=staffUuid, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_comment_creation.py b/flat_api/model/score_comment_creation.py new file mode 100644 index 0000000..058fb28 --- /dev/null +++ b/flat_api/model/score_comment_creation.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a comment + """ + + + class MetaOapg: + required = { + "comment", + } + + class properties: + comment = schemas.StrSchema + revision = schemas.StrSchema + rawComment = schemas.StrSchema + + + class mentions( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'mentions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + replyTo = schemas.StrSchema + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + __annotations__ = { + "comment": comment, + "revision": revision, + "rawComment": rawComment, + "mentions": mentions, + "replyTo": replyTo, + "context": context, + } + + comment: MetaOapg.properties.comment + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + comment: typing.Union[MetaOapg.properties.comment, str, ], + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, + replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentCreation': + return super().__new__( + cls, + *_args, + comment=comment, + revision=revision, + rawComment=rawComment, + mentions=mentions, + replyTo=replyTo, + context=context, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_creation.pyi b/flat_api/model/score_comment_creation.pyi new file mode 100644 index 0000000..058fb28 --- /dev/null +++ b/flat_api/model/score_comment_creation.pyi @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a comment + """ + + + class MetaOapg: + required = { + "comment", + } + + class properties: + comment = schemas.StrSchema + revision = schemas.StrSchema + rawComment = schemas.StrSchema + + + class mentions( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'mentions': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + replyTo = schemas.StrSchema + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + __annotations__ = { + "comment": comment, + "revision": revision, + "rawComment": rawComment, + "mentions": mentions, + "replyTo": replyTo, + "context": context, + } + + comment: MetaOapg.properties.comment + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + comment: typing.Union[MetaOapg.properties.comment, str, ], + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, + replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentCreation': + return super().__new__( + cls, + *_args, + comment=comment, + revision=revision, + rawComment=rawComment, + mentions=mentions, + replyTo=replyTo, + context=context, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_update.py b/flat_api/model/score_comment_update.py new file mode 100644 index 0000000..ddcd780 --- /dev/null +++ b/flat_api/model/score_comment_update.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of a comment + """ + + + class MetaOapg: + + class properties: + revision = schemas.StrSchema + + + class comment( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 10000 + min_length = 1 + + + class rawComment( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 10000 + min_length = 1 + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + __annotations__ = { + "revision": revision, + "comment": comment, + "rawComment": rawComment, + "context": context, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentUpdate': + return super().__new__( + cls, + *_args, + revision=revision, + comment=comment, + rawComment=rawComment, + context=context, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_update.pyi b/flat_api/model/score_comment_update.pyi new file mode 100644 index 0000000..fb71e09 --- /dev/null +++ b/flat_api/model/score_comment_update.pyi @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update of a comment + """ + + + class MetaOapg: + + class properties: + revision = schemas.StrSchema + + + class comment( + schemas.StrSchema + ): + pass + + + class rawComment( + schemas.StrSchema + ): + pass + + @staticmethod + def context() -> typing.Type['ScoreCommentContext']: + return ScoreCommentContext + __annotations__ = { + "revision": revision, + "comment": comment, + "rawComment": rawComment, + "context": context, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, + context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentUpdate': + return super().__new__( + cls, + *_args, + revision=revision, + comment=comment, + rawComment=rawComment, + context=context, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comments_counts.py b/flat_api/model/score_comments_counts.py new file mode 100644 index 0000000..f61b037 --- /dev/null +++ b/flat_api/model/score_comments_counts.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentsCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, unique, weekly and monthly number of +comments added on the documents (this doesn't include inline comments). + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + unique = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "unique": unique, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unique"]) -> MetaOapg.properties.unique: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unique"]) -> typing.Union[MetaOapg.properties.unique, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + unique: typing.Union[MetaOapg.properties.unique, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentsCounts': + return super().__new__( + cls, + *_args, + total=total, + unique=unique, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_comments_counts.pyi b/flat_api/model/score_comments_counts.pyi new file mode 100644 index 0000000..f61b037 --- /dev/null +++ b/flat_api/model/score_comments_counts.pyi @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCommentsCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, unique, weekly and monthly number of +comments added on the documents (this doesn't include inline comments). + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + unique = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "unique": unique, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["unique"]) -> MetaOapg.properties.unique: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["unique"]) -> typing.Union[MetaOapg.properties.unique, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + unique: typing.Union[MetaOapg.properties.unique, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCommentsCounts': + return super().__new__( + cls, + *_args, + total=total, + unique=unique, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_creation.py b/flat_api/model/score_creation.py new file mode 100644 index 0000000..e04a33f --- /dev/null +++ b/flat_api/model/score_creation.py @@ -0,0 +1,608 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + collection = schemas.StrSchema + googleDriveFolder = schemas.StrSchema + + + class builderData( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "scoreData", + } + + class properties: + + + class scoreData( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "instruments", + } + + class properties: + useTabStaff = schemas.BoolSchema + useChordGrid = schemas.BoolSchema + fifths = schemas.NumberSchema + nbBeats = schemas.NumberSchema + beatType = schemas.NumberSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "instrument", + "group", + } + + class properties: + group = schemas.StrSchema + instrument = schemas.StrSchema + longName = schemas.StrSchema + shortName = schemas.StrSchema + hasQuarterTone = schemas.BoolSchema + __annotations__ = { + "group": group, + "instrument": instrument, + "longName": longName, + "shortName": shortName, + "hasQuarterTone": hasQuarterTone, + } + + instrument: MetaOapg.properties.instrument + group: MetaOapg.properties.group + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["longName"]) -> MetaOapg.properties.longName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shortName"]) -> MetaOapg.properties.shortName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hasQuarterTone"]) -> MetaOapg.properties.hasQuarterTone: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["longName"]) -> typing.Union[MetaOapg.properties.longName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shortName"]) -> typing.Union[MetaOapg.properties.shortName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hasQuarterTone"]) -> typing.Union[MetaOapg.properties.hasQuarterTone, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + instrument: typing.Union[MetaOapg.properties.instrument, str, ], + group: typing.Union[MetaOapg.properties.group, str, ], + longName: typing.Union[MetaOapg.properties.longName, str, schemas.Unset] = schemas.unset, + shortName: typing.Union[MetaOapg.properties.shortName, str, schemas.Unset] = schemas.unset, + hasQuarterTone: typing.Union[MetaOapg.properties.hasQuarterTone, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': + return super().__new__( + cls, + *_args, + instrument=instrument, + group=group, + longName=longName, + shortName=shortName, + hasQuarterTone=hasQuarterTone, + _configuration=_configuration, + **kwargs, + ) + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "useTabStaff": useTabStaff, + "useChordGrid": useChordGrid, + "fifths": fifths, + "nbBeats": nbBeats, + "beatType": beatType, + "instruments": instruments, + } + + instruments: MetaOapg.properties.instruments + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useTabStaff"]) -> MetaOapg.properties.useTabStaff: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useChordGrid"]) -> MetaOapg.properties.useChordGrid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["fifths"]) -> MetaOapg.properties.fifths: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbBeats"]) -> MetaOapg.properties.nbBeats: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["beatType"]) -> MetaOapg.properties.beatType: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useTabStaff"]) -> typing.Union[MetaOapg.properties.useTabStaff, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useChordGrid"]) -> typing.Union[MetaOapg.properties.useChordGrid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["fifths"]) -> typing.Union[MetaOapg.properties.fifths, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbBeats"]) -> typing.Union[MetaOapg.properties.nbBeats, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["beatType"]) -> typing.Union[MetaOapg.properties.beatType, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, ], + useTabStaff: typing.Union[MetaOapg.properties.useTabStaff, bool, schemas.Unset] = schemas.unset, + useChordGrid: typing.Union[MetaOapg.properties.useChordGrid, bool, schemas.Unset] = schemas.unset, + fifths: typing.Union[MetaOapg.properties.fifths, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + nbBeats: typing.Union[MetaOapg.properties.nbBeats, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + beatType: typing.Union[MetaOapg.properties.beatType, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'scoreData': + return super().__new__( + cls, + *_args, + instruments=instruments, + useTabStaff=useTabStaff, + useChordGrid=useChordGrid, + fifths=fifths, + nbBeats=nbBeats, + beatType=beatType, + _configuration=_configuration, + **kwargs, + ) + + + class layoutData( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + notesSpacingCoeff = schemas.NumberSchema + + + class lengthUnit( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "cm": "CM", + "inch": "INCH", + } + + @schemas.classproperty + def CM(cls): + return cls("cm") + + @schemas.classproperty + def INCH(cls): + return cls("inch") + pageHeight = schemas.NumberSchema + pageWidth = schemas.NumberSchema + pageMarginTop = schemas.NumberSchema + pageMarginBottom = schemas.NumberSchema + pageMarginLeft = schemas.NumberSchema + pageMarginRight = schemas.NumberSchema + __annotations__ = { + "notesSpacingCoeff": notesSpacingCoeff, + "lengthUnit": lengthUnit, + "pageHeight": pageHeight, + "pageWidth": pageWidth, + "pageMarginTop": pageMarginTop, + "pageMarginBottom": pageMarginBottom, + "pageMarginLeft": pageMarginLeft, + "pageMarginRight": pageMarginRight, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> MetaOapg.properties.notesSpacingCoeff: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lengthUnit"]) -> MetaOapg.properties.lengthUnit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageHeight"]) -> MetaOapg.properties.pageHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageWidth"]) -> MetaOapg.properties.pageWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginTop"]) -> MetaOapg.properties.pageMarginTop: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginBottom"]) -> MetaOapg.properties.pageMarginBottom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginLeft"]) -> MetaOapg.properties.pageMarginLeft: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginRight"]) -> MetaOapg.properties.pageMarginRight: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> typing.Union[MetaOapg.properties.notesSpacingCoeff, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lengthUnit"]) -> typing.Union[MetaOapg.properties.lengthUnit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageHeight"]) -> typing.Union[MetaOapg.properties.pageHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageWidth"]) -> typing.Union[MetaOapg.properties.pageWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginTop"]) -> typing.Union[MetaOapg.properties.pageMarginTop, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginBottom"]) -> typing.Union[MetaOapg.properties.pageMarginBottom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginLeft"]) -> typing.Union[MetaOapg.properties.pageMarginLeft, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginRight"]) -> typing.Union[MetaOapg.properties.pageMarginRight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + notesSpacingCoeff: typing.Union[MetaOapg.properties.notesSpacingCoeff, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + lengthUnit: typing.Union[MetaOapg.properties.lengthUnit, str, schemas.Unset] = schemas.unset, + pageHeight: typing.Union[MetaOapg.properties.pageHeight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageWidth: typing.Union[MetaOapg.properties.pageWidth, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginTop: typing.Union[MetaOapg.properties.pageMarginTop, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginBottom: typing.Union[MetaOapg.properties.pageMarginBottom, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginLeft: typing.Union[MetaOapg.properties.pageMarginLeft, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginRight: typing.Union[MetaOapg.properties.pageMarginRight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'layoutData': + return super().__new__( + cls, + *_args, + notesSpacingCoeff=notesSpacingCoeff, + lengthUnit=lengthUnit, + pageHeight=pageHeight, + pageWidth=pageWidth, + pageMarginTop=pageMarginTop, + pageMarginBottom=pageMarginBottom, + pageMarginLeft=pageMarginLeft, + pageMarginRight=pageMarginRight, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "scoreData": scoreData, + "layoutData": layoutData, + } + + scoreData: MetaOapg.properties.scoreData + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["layoutData"]) -> MetaOapg.properties.layoutData: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["layoutData"]) -> typing.Union[MetaOapg.properties.layoutData, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + scoreData: typing.Union[MetaOapg.properties.scoreData, dict, frozendict.frozendict, ], + layoutData: typing.Union[MetaOapg.properties.layoutData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'builderData': + return super().__new__( + cls, + *_args, + scoreData=scoreData, + layoutData=layoutData, + _configuration=_configuration, + **kwargs, + ) + filename = schemas.StrSchema + data = schemas.StrSchema + + + class dataEncoding( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "base64": "BASE64", + } + + @schemas.classproperty + def BASE64(cls): + return cls("base64") + + @staticmethod + def source() -> typing.Type['ScoreSource']: + return ScoreSource + __annotations__ = { + "title": title, + "privacy": privacy, + "collection": collection, + "googleDriveFolder": googleDriveFolder, + "builderData": builderData, + "filename": filename, + "data": data, + "dataEncoding": dataEncoding, + "source": source, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFolder"]) -> MetaOapg.properties.googleDriveFolder: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["builderData"]) -> MetaOapg.properties.builderData: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["filename"]) -> MetaOapg.properties.filename: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'ScoreSource': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFolder"]) -> typing.Union[MetaOapg.properties.googleDriveFolder, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["builderData"]) -> typing.Union[MetaOapg.properties.builderData, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["filename"]) -> typing.Union[MetaOapg.properties.filename, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['ScoreSource', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, + googleDriveFolder: typing.Union[MetaOapg.properties.googleDriveFolder, str, schemas.Unset] = schemas.unset, + builderData: typing.Union[MetaOapg.properties.builderData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + filename: typing.Union[MetaOapg.properties.filename, str, schemas.Unset] = schemas.unset, + data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, + dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, + source: typing.Union['ScoreSource', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCreation': + return super().__new__( + cls, + *_args, + title=title, + privacy=privacy, + collection=collection, + googleDriveFolder=googleDriveFolder, + builderData=builderData, + filename=filename, + data=data, + dataEncoding=dataEncoding, + source=source, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_source import ScoreSource diff --git a/flat_api/model/score_creation.pyi b/flat_api/model/score_creation.pyi new file mode 100644 index 0000000..cab25f0 --- /dev/null +++ b/flat_api/model/score_creation.pyi @@ -0,0 +1,595 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + collection = schemas.StrSchema + googleDriveFolder = schemas.StrSchema + + + class builderData( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "scoreData", + } + + class properties: + + + class scoreData( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "instruments", + } + + class properties: + useTabStaff = schemas.BoolSchema + useChordGrid = schemas.BoolSchema + fifths = schemas.NumberSchema + nbBeats = schemas.NumberSchema + beatType = schemas.NumberSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.DictSchema + ): + + + class MetaOapg: + required = { + "instrument", + "group", + } + + class properties: + group = schemas.StrSchema + instrument = schemas.StrSchema + longName = schemas.StrSchema + shortName = schemas.StrSchema + hasQuarterTone = schemas.BoolSchema + __annotations__ = { + "group": group, + "instrument": instrument, + "longName": longName, + "shortName": shortName, + "hasQuarterTone": hasQuarterTone, + } + + instrument: MetaOapg.properties.instrument + group: MetaOapg.properties.group + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["longName"]) -> MetaOapg.properties.longName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["shortName"]) -> MetaOapg.properties.shortName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hasQuarterTone"]) -> MetaOapg.properties.hasQuarterTone: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["longName"]) -> typing.Union[MetaOapg.properties.longName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["shortName"]) -> typing.Union[MetaOapg.properties.shortName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hasQuarterTone"]) -> typing.Union[MetaOapg.properties.hasQuarterTone, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + instrument: typing.Union[MetaOapg.properties.instrument, str, ], + group: typing.Union[MetaOapg.properties.group, str, ], + longName: typing.Union[MetaOapg.properties.longName, str, schemas.Unset] = schemas.unset, + shortName: typing.Union[MetaOapg.properties.shortName, str, schemas.Unset] = schemas.unset, + hasQuarterTone: typing.Union[MetaOapg.properties.hasQuarterTone, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': + return super().__new__( + cls, + *_args, + instrument=instrument, + group=group, + longName=longName, + shortName=shortName, + hasQuarterTone=hasQuarterTone, + _configuration=_configuration, + **kwargs, + ) + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "useTabStaff": useTabStaff, + "useChordGrid": useChordGrid, + "fifths": fifths, + "nbBeats": nbBeats, + "beatType": beatType, + "instruments": instruments, + } + + instruments: MetaOapg.properties.instruments + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useTabStaff"]) -> MetaOapg.properties.useTabStaff: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["useChordGrid"]) -> MetaOapg.properties.useChordGrid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["fifths"]) -> MetaOapg.properties.fifths: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["nbBeats"]) -> MetaOapg.properties.nbBeats: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["beatType"]) -> MetaOapg.properties.beatType: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useTabStaff"]) -> typing.Union[MetaOapg.properties.useTabStaff, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["useChordGrid"]) -> typing.Union[MetaOapg.properties.useChordGrid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["fifths"]) -> typing.Union[MetaOapg.properties.fifths, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["nbBeats"]) -> typing.Union[MetaOapg.properties.nbBeats, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["beatType"]) -> typing.Union[MetaOapg.properties.beatType, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, ], + useTabStaff: typing.Union[MetaOapg.properties.useTabStaff, bool, schemas.Unset] = schemas.unset, + useChordGrid: typing.Union[MetaOapg.properties.useChordGrid, bool, schemas.Unset] = schemas.unset, + fifths: typing.Union[MetaOapg.properties.fifths, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + nbBeats: typing.Union[MetaOapg.properties.nbBeats, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + beatType: typing.Union[MetaOapg.properties.beatType, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'scoreData': + return super().__new__( + cls, + *_args, + instruments=instruments, + useTabStaff=useTabStaff, + useChordGrid=useChordGrid, + fifths=fifths, + nbBeats=nbBeats, + beatType=beatType, + _configuration=_configuration, + **kwargs, + ) + + + class layoutData( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + notesSpacingCoeff = schemas.NumberSchema + + + class lengthUnit( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def CM(cls): + return cls("cm") + + @schemas.classproperty + def INCH(cls): + return cls("inch") + pageHeight = schemas.NumberSchema + pageWidth = schemas.NumberSchema + pageMarginTop = schemas.NumberSchema + pageMarginBottom = schemas.NumberSchema + pageMarginLeft = schemas.NumberSchema + pageMarginRight = schemas.NumberSchema + __annotations__ = { + "notesSpacingCoeff": notesSpacingCoeff, + "lengthUnit": lengthUnit, + "pageHeight": pageHeight, + "pageWidth": pageWidth, + "pageMarginTop": pageMarginTop, + "pageMarginBottom": pageMarginBottom, + "pageMarginLeft": pageMarginLeft, + "pageMarginRight": pageMarginRight, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> MetaOapg.properties.notesSpacingCoeff: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lengthUnit"]) -> MetaOapg.properties.lengthUnit: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageHeight"]) -> MetaOapg.properties.pageHeight: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageWidth"]) -> MetaOapg.properties.pageWidth: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginTop"]) -> MetaOapg.properties.pageMarginTop: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginBottom"]) -> MetaOapg.properties.pageMarginBottom: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginLeft"]) -> MetaOapg.properties.pageMarginLeft: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pageMarginRight"]) -> MetaOapg.properties.pageMarginRight: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> typing.Union[MetaOapg.properties.notesSpacingCoeff, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lengthUnit"]) -> typing.Union[MetaOapg.properties.lengthUnit, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageHeight"]) -> typing.Union[MetaOapg.properties.pageHeight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageWidth"]) -> typing.Union[MetaOapg.properties.pageWidth, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginTop"]) -> typing.Union[MetaOapg.properties.pageMarginTop, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginBottom"]) -> typing.Union[MetaOapg.properties.pageMarginBottom, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginLeft"]) -> typing.Union[MetaOapg.properties.pageMarginLeft, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pageMarginRight"]) -> typing.Union[MetaOapg.properties.pageMarginRight, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + notesSpacingCoeff: typing.Union[MetaOapg.properties.notesSpacingCoeff, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + lengthUnit: typing.Union[MetaOapg.properties.lengthUnit, str, schemas.Unset] = schemas.unset, + pageHeight: typing.Union[MetaOapg.properties.pageHeight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageWidth: typing.Union[MetaOapg.properties.pageWidth, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginTop: typing.Union[MetaOapg.properties.pageMarginTop, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginBottom: typing.Union[MetaOapg.properties.pageMarginBottom, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginLeft: typing.Union[MetaOapg.properties.pageMarginLeft, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + pageMarginRight: typing.Union[MetaOapg.properties.pageMarginRight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'layoutData': + return super().__new__( + cls, + *_args, + notesSpacingCoeff=notesSpacingCoeff, + lengthUnit=lengthUnit, + pageHeight=pageHeight, + pageWidth=pageWidth, + pageMarginTop=pageMarginTop, + pageMarginBottom=pageMarginBottom, + pageMarginLeft=pageMarginLeft, + pageMarginRight=pageMarginRight, + _configuration=_configuration, + **kwargs, + ) + __annotations__ = { + "scoreData": scoreData, + "layoutData": layoutData, + } + + scoreData: MetaOapg.properties.scoreData + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["layoutData"]) -> MetaOapg.properties.layoutData: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["layoutData"]) -> typing.Union[MetaOapg.properties.layoutData, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + scoreData: typing.Union[MetaOapg.properties.scoreData, dict, frozendict.frozendict, ], + layoutData: typing.Union[MetaOapg.properties.layoutData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'builderData': + return super().__new__( + cls, + *_args, + scoreData=scoreData, + layoutData=layoutData, + _configuration=_configuration, + **kwargs, + ) + filename = schemas.StrSchema + data = schemas.StrSchema + + + class dataEncoding( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def BASE64(cls): + return cls("base64") + + @staticmethod + def source() -> typing.Type['ScoreSource']: + return ScoreSource + __annotations__ = { + "title": title, + "privacy": privacy, + "collection": collection, + "googleDriveFolder": googleDriveFolder, + "builderData": builderData, + "filename": filename, + "data": data, + "dataEncoding": dataEncoding, + "source": source, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFolder"]) -> MetaOapg.properties.googleDriveFolder: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["builderData"]) -> MetaOapg.properties.builderData: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["filename"]) -> MetaOapg.properties.filename: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'ScoreSource': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFolder"]) -> typing.Union[MetaOapg.properties.googleDriveFolder, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["builderData"]) -> typing.Union[MetaOapg.properties.builderData, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["filename"]) -> typing.Union[MetaOapg.properties.filename, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['ScoreSource', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, + googleDriveFolder: typing.Union[MetaOapg.properties.googleDriveFolder, str, schemas.Unset] = schemas.unset, + builderData: typing.Union[MetaOapg.properties.builderData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + filename: typing.Union[MetaOapg.properties.filename, str, schemas.Unset] = schemas.unset, + data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, + dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, + source: typing.Union['ScoreSource', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreCreation': + return super().__new__( + cls, + *_args, + title=title, + privacy=privacy, + collection=collection, + googleDriveFolder=googleDriveFolder, + builderData=builderData, + filename=filename, + data=data, + dataEncoding=dataEncoding, + source=source, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_source import ScoreSource diff --git a/flat_api/model/score_creation_type.py b/flat_api/model/score_creation_type.py new file mode 100644 index 0000000..9a8888c --- /dev/null +++ b/flat_api/model/score_creation_type.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCreationType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of creation (an orginal, an arrangement) + """ + + + class MetaOapg: + enum_value_to_name = { + "original": "ORIGINAL", + "arrangement": "ARRANGEMENT", + "other": "OTHER", + } + + @schemas.classproperty + def ORIGINAL(cls): + return cls("original") + + @schemas.classproperty + def ARRANGEMENT(cls): + return cls("arrangement") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/score_creation_type.pyi b/flat_api/model/score_creation_type.pyi new file mode 100644 index 0000000..bbecf32 --- /dev/null +++ b/flat_api/model/score_creation_type.pyi @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreCreationType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of creation (an orginal, an arrangement) + """ + + @schemas.classproperty + def ORIGINAL(cls): + return cls("original") + + @schemas.classproperty + def ARRANGEMENT(cls): + return cls("arrangement") + + @schemas.classproperty + def OTHER(cls): + return cls("other") diff --git a/flat_api/model/score_details.py b/flat_api/model/score_details.py new file mode 100644 index 0000000..af8e60a --- /dev/null +++ b/flat_api/model/score_details.py @@ -0,0 +1,560 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + sharingKey = schemas.StrSchema + title = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + + @staticmethod + def user() -> typing.Type['UserPublicSummary']: + return UserPublicSummary + htmlUrl = schemas.StrSchema + subtitle = schemas.StrSchema + lyricist = schemas.StrSchema + arranger = schemas.StrSchema + composer = schemas.StrSchema + description = schemas.StrSchema + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.StrSchema + ): + + + class MetaOapg: + regex=[{ + 'pattern': r'^[a-zA-Z0-9]{1,30}$', # noqa: E501 + }] + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def creationType() -> typing.Type['ScoreCreationType']: + return ScoreCreationType + + @staticmethod + def license() -> typing.Type['ScoreLicense']: + return ScoreLicense + licenseText = schemas.StrSchema + durationTime = schemas.NumberSchema + numberMeasures = schemas.IntSchema + mainTempoQpm = schemas.NumberSchema + + @staticmethod + def rights() -> typing.Type['ResourceRights']: + return ResourceRights + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + publicationDate = schemas.DateTimeSchema + organization = schemas.StrSchema + parentScore = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class samples( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'samples': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + googleDriveFileId = schemas.StrSchema + + @staticmethod + def likes() -> typing.Type['ScoreLikesCounts']: + return ScoreLikesCounts + + @staticmethod + def comments() -> typing.Type['ScoreCommentsCounts']: + return ScoreCommentsCounts + + @staticmethod + def views() -> typing.Type['ScoreViewsCounts']: + return ScoreViewsCounts + + @staticmethod + def plays() -> typing.Type['ScorePlaysCounts']: + return ScorePlaysCounts + + + class collections( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collections': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "sharingKey": sharingKey, + "title": title, + "privacy": privacy, + "user": user, + "htmlUrl": htmlUrl, + "subtitle": subtitle, + "lyricist": lyricist, + "arranger": arranger, + "composer": composer, + "description": description, + "tags": tags, + "creationType": creationType, + "license": license, + "licenseText": licenseText, + "durationTime": durationTime, + "numberMeasures": numberMeasures, + "mainTempoQpm": mainTempoQpm, + "rights": rights, + "collaborators": collaborators, + "creationDate": creationDate, + "modificationDate": modificationDate, + "publicationDate": publicationDate, + "organization": organization, + "parentScore": parentScore, + "instruments": instruments, + "samples": samples, + "googleDriveFileId": googleDriveFileId, + "likes": likes, + "comments": comments, + "views": views, + "plays": plays, + "collections": collections, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["durationTime"]) -> MetaOapg.properties.durationTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["numberMeasures"]) -> MetaOapg.properties.numberMeasures: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mainTempoQpm"]) -> MetaOapg.properties.mainTempoQpm: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["publicationDate"]) -> MetaOapg.properties.publicationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parentScore"]) -> MetaOapg.properties.parentScore: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["samples"]) -> MetaOapg.properties.samples: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likes"]) -> 'ScoreLikesCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comments"]) -> 'ScoreCommentsCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["views"]) -> 'ScoreViewsCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["plays"]) -> 'ScorePlaysCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["durationTime"]) -> typing.Union[MetaOapg.properties.durationTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["numberMeasures"]) -> typing.Union[MetaOapg.properties.numberMeasures, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mainTempoQpm"]) -> typing.Union[MetaOapg.properties.mainTempoQpm, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["publicationDate"]) -> typing.Union[MetaOapg.properties.publicationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parentScore"]) -> typing.Union[MetaOapg.properties.parentScore, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["samples"]) -> typing.Union[MetaOapg.properties.samples, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likes"]) -> typing.Union['ScoreLikesCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union['ScoreCommentsCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["views"]) -> typing.Union['ScoreViewsCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["plays"]) -> typing.Union['ScorePlaysCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, + lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, + arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, + composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, + license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, + licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, + durationTime: typing.Union[MetaOapg.properties.durationTime, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + numberMeasures: typing.Union[MetaOapg.properties.numberMeasures, decimal.Decimal, int, schemas.Unset] = schemas.unset, + mainTempoQpm: typing.Union[MetaOapg.properties.mainTempoQpm, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + publicationDate: typing.Union[MetaOapg.properties.publicationDate, str, datetime, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + parentScore: typing.Union[MetaOapg.properties.parentScore, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + samples: typing.Union[MetaOapg.properties.samples, list, tuple, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + likes: typing.Union['ScoreLikesCounts', schemas.Unset] = schemas.unset, + comments: typing.Union['ScoreCommentsCounts', schemas.Unset] = schemas.unset, + views: typing.Union['ScoreViewsCounts', schemas.Unset] = schemas.unset, + plays: typing.Union['ScorePlaysCounts', schemas.Unset] = schemas.unset, + collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreDetails': + return super().__new__( + cls, + *_args, + id=id, + sharingKey=sharingKey, + title=title, + privacy=privacy, + user=user, + htmlUrl=htmlUrl, + subtitle=subtitle, + lyricist=lyricist, + arranger=arranger, + composer=composer, + description=description, + tags=tags, + creationType=creationType, + license=license, + licenseText=licenseText, + durationTime=durationTime, + numberMeasures=numberMeasures, + mainTempoQpm=mainTempoQpm, + rights=rights, + collaborators=collaborators, + creationDate=creationDate, + modificationDate=modificationDate, + publicationDate=publicationDate, + organization=organization, + parentScore=parentScore, + instruments=instruments, + samples=samples, + googleDriveFileId=googleDriveFileId, + likes=likes, + comments=comments, + views=views, + plays=plays, + collections=collections, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.score_comments_counts import ScoreCommentsCounts +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_likes_counts import ScoreLikesCounts +from flat_api.model.score_plays_counts import ScorePlaysCounts +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_views_counts import ScoreViewsCounts +from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/score_details.pyi b/flat_api/model/score_details.pyi new file mode 100644 index 0000000..b8daa87 --- /dev/null +++ b/flat_api/model/score_details.pyi @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + sharingKey = schemas.StrSchema + title = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + + @staticmethod + def user() -> typing.Type['UserPublicSummary']: + return UserPublicSummary + htmlUrl = schemas.StrSchema + subtitle = schemas.StrSchema + lyricist = schemas.StrSchema + arranger = schemas.StrSchema + composer = schemas.StrSchema + description = schemas.StrSchema + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + + class items( + schemas.StrSchema + ): + pass + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def creationType() -> typing.Type['ScoreCreationType']: + return ScoreCreationType + + @staticmethod + def license() -> typing.Type['ScoreLicense']: + return ScoreLicense + licenseText = schemas.StrSchema + durationTime = schemas.NumberSchema + numberMeasures = schemas.IntSchema + mainTempoQpm = schemas.NumberSchema + + @staticmethod + def rights() -> typing.Type['ResourceRights']: + return ResourceRights + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + publicationDate = schemas.DateTimeSchema + organization = schemas.StrSchema + parentScore = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class samples( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'samples': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + googleDriveFileId = schemas.StrSchema + + @staticmethod + def likes() -> typing.Type['ScoreLikesCounts']: + return ScoreLikesCounts + + @staticmethod + def comments() -> typing.Type['ScoreCommentsCounts']: + return ScoreCommentsCounts + + @staticmethod + def views() -> typing.Type['ScoreViewsCounts']: + return ScoreViewsCounts + + @staticmethod + def plays() -> typing.Type['ScorePlaysCounts']: + return ScorePlaysCounts + + + class collections( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collections': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "sharingKey": sharingKey, + "title": title, + "privacy": privacy, + "user": user, + "htmlUrl": htmlUrl, + "subtitle": subtitle, + "lyricist": lyricist, + "arranger": arranger, + "composer": composer, + "description": description, + "tags": tags, + "creationType": creationType, + "license": license, + "licenseText": licenseText, + "durationTime": durationTime, + "numberMeasures": numberMeasures, + "mainTempoQpm": mainTempoQpm, + "rights": rights, + "collaborators": collaborators, + "creationDate": creationDate, + "modificationDate": modificationDate, + "publicationDate": publicationDate, + "organization": organization, + "parentScore": parentScore, + "instruments": instruments, + "samples": samples, + "googleDriveFileId": googleDriveFileId, + "likes": likes, + "comments": comments, + "views": views, + "plays": plays, + "collections": collections, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["durationTime"]) -> MetaOapg.properties.durationTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["numberMeasures"]) -> MetaOapg.properties.numberMeasures: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mainTempoQpm"]) -> MetaOapg.properties.mainTempoQpm: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["publicationDate"]) -> MetaOapg.properties.publicationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parentScore"]) -> MetaOapg.properties.parentScore: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["samples"]) -> MetaOapg.properties.samples: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likes"]) -> 'ScoreLikesCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comments"]) -> 'ScoreCommentsCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["views"]) -> 'ScoreViewsCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["plays"]) -> 'ScorePlaysCounts': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["durationTime"]) -> typing.Union[MetaOapg.properties.durationTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["numberMeasures"]) -> typing.Union[MetaOapg.properties.numberMeasures, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mainTempoQpm"]) -> typing.Union[MetaOapg.properties.mainTempoQpm, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["publicationDate"]) -> typing.Union[MetaOapg.properties.publicationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parentScore"]) -> typing.Union[MetaOapg.properties.parentScore, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["samples"]) -> typing.Union[MetaOapg.properties.samples, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likes"]) -> typing.Union['ScoreLikesCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union['ScoreCommentsCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["views"]) -> typing.Union['ScoreViewsCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["plays"]) -> typing.Union['ScorePlaysCounts', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, + lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, + arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, + composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, + license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, + licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, + durationTime: typing.Union[MetaOapg.properties.durationTime, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + numberMeasures: typing.Union[MetaOapg.properties.numberMeasures, decimal.Decimal, int, schemas.Unset] = schemas.unset, + mainTempoQpm: typing.Union[MetaOapg.properties.mainTempoQpm, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + publicationDate: typing.Union[MetaOapg.properties.publicationDate, str, datetime, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + parentScore: typing.Union[MetaOapg.properties.parentScore, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + samples: typing.Union[MetaOapg.properties.samples, list, tuple, schemas.Unset] = schemas.unset, + googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, + likes: typing.Union['ScoreLikesCounts', schemas.Unset] = schemas.unset, + comments: typing.Union['ScoreCommentsCounts', schemas.Unset] = schemas.unset, + views: typing.Union['ScoreViewsCounts', schemas.Unset] = schemas.unset, + plays: typing.Union['ScorePlaysCounts', schemas.Unset] = schemas.unset, + collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreDetails': + return super().__new__( + cls, + *_args, + id=id, + sharingKey=sharingKey, + title=title, + privacy=privacy, + user=user, + htmlUrl=htmlUrl, + subtitle=subtitle, + lyricist=lyricist, + arranger=arranger, + composer=composer, + description=description, + tags=tags, + creationType=creationType, + license=license, + licenseText=licenseText, + durationTime=durationTime, + numberMeasures=numberMeasures, + mainTempoQpm=mainTempoQpm, + rights=rights, + collaborators=collaborators, + creationDate=creationDate, + modificationDate=modificationDate, + publicationDate=publicationDate, + organization=organization, + parentScore=parentScore, + instruments=instruments, + samples=samples, + googleDriveFileId=googleDriveFileId, + likes=likes, + comments=comments, + views=views, + plays=plays, + collections=collections, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.score_comments_counts import ScoreCommentsCounts +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_likes_counts import ScoreLikesCounts +from flat_api.model.score_plays_counts import ScorePlaysCounts +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_views_counts import ScoreViewsCounts +from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/score_fork.py b/flat_api/model/score_fork.py new file mode 100644 index 0000000..c237dcd --- /dev/null +++ b/flat_api/model/score_fork.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreFork( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Options to fork the score + """ + + + class MetaOapg: + + class properties: + + + class collection( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collection': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + keepOriginalTitle = schemas.BoolSchema + __annotations__ = { + "collection": collection, + "keepOriginalTitle": keepOriginalTitle, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> MetaOapg.properties.keepOriginalTitle: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> typing.Union[MetaOapg.properties.keepOriginalTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + collection: typing.Union[MetaOapg.properties.collection, None, str, schemas.Unset] = schemas.unset, + keepOriginalTitle: typing.Union[MetaOapg.properties.keepOriginalTitle, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreFork': + return super().__new__( + cls, + *_args, + collection=collection, + keepOriginalTitle=keepOriginalTitle, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_fork.pyi b/flat_api/model/score_fork.pyi new file mode 100644 index 0000000..c237dcd --- /dev/null +++ b/flat_api/model/score_fork.pyi @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreFork( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Options to fork the score + """ + + + class MetaOapg: + + class properties: + + + class collection( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collection': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + keepOriginalTitle = schemas.BoolSchema + __annotations__ = { + "collection": collection, + "keepOriginalTitle": keepOriginalTitle, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> MetaOapg.properties.keepOriginalTitle: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> typing.Union[MetaOapg.properties.keepOriginalTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + collection: typing.Union[MetaOapg.properties.collection, None, str, schemas.Unset] = schemas.unset, + keepOriginalTitle: typing.Union[MetaOapg.properties.keepOriginalTitle, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreFork': + return super().__new__( + cls, + *_args, + collection=collection, + keepOriginalTitle=keepOriginalTitle, + _configuration=_configuration, + **kwargs, + ) diff --git a/test/test_group_api.py b/flat_api/model/score_license.py similarity index 52% rename from test/test_group_api.py rename to flat_api/model/score_license.py index 53cca48..697d33e 100644 --- a/test/test_group_api.py +++ b/flat_api/model/score_license.py @@ -5,51 +5,79 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.group_api import GroupApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestGroupApi(unittest.TestCase): - """GroupApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.group_api.GroupApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_group_details(self): - """Test case for get_group_details - - Get group information # noqa: E501 - """ - pass - - def test_get_group_scores(self): - """Test case for get_group_scores - - List group's scores # noqa: E501 - """ - pass - - def test_list_group_users(self): - """Test case for list_group_users - - List group's users # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreLicense( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + + """ + + + class MetaOapg: + enum_value_to_name = { + "copyright": "COPYRIGHT", + "cc0": "CC0", + "cc-by": "CCBY", + "cc-by-sa": "CCBYSA", + "cc-by-nd": "CCBYND", + "cc-by-nc": "CCBYNC", + "cc-by-nc-sa": "CCBYNCSA", + "cc-by-nc-nd": "CCBYNCND", + } + + @schemas.classproperty + def COPYRIGHT(cls): + return cls("copyright") + + @schemas.classproperty + def CC0(cls): + return cls("cc0") + + @schemas.classproperty + def CCBY(cls): + return cls("cc-by") + + @schemas.classproperty + def CCBYSA(cls): + return cls("cc-by-sa") + + @schemas.classproperty + def CCBYND(cls): + return cls("cc-by-nd") + + @schemas.classproperty + def CCBYNC(cls): + return cls("cc-by-nc") + + @schemas.classproperty + def CCBYNCSA(cls): + return cls("cc-by-nc-sa") + + @schemas.classproperty + def CCBYNCND(cls): + return cls("cc-by-nc-nd") diff --git a/flat_api/model/score_license.pyi b/flat_api/model/score_license.pyi new file mode 100644 index 0000000..3df3a5f --- /dev/null +++ b/flat_api/model/score_license.pyi @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreLicense( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + + """ + + @schemas.classproperty + def COPYRIGHT(cls): + return cls("copyright") + + @schemas.classproperty + def CC0(cls): + return cls("cc0") + + @schemas.classproperty + def CCBY(cls): + return cls("cc-by") + + @schemas.classproperty + def CCBYSA(cls): + return cls("cc-by-sa") + + @schemas.classproperty + def CCBYND(cls): + return cls("cc-by-nd") + + @schemas.classproperty + def CCBYNC(cls): + return cls("cc-by-nc") + + @schemas.classproperty + def CCBYNCSA(cls): + return cls("cc-by-nc-sa") + + @schemas.classproperty + def CCBYNCND(cls): + return cls("cc-by-nc-nd") diff --git a/flat_api/model/score_likes_counts.py b/flat_api/model/score_likes_counts.py new file mode 100644 index 0000000..23cceae --- /dev/null +++ b/flat_api/model/score_likes_counts.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreLikesCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the weekly, monthly and total of number of likes +for a score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreLikesCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_likes_counts.pyi b/flat_api/model/score_likes_counts.pyi new file mode 100644 index 0000000..23cceae --- /dev/null +++ b/flat_api/model/score_likes_counts.pyi @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreLikesCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the weekly, monthly and total of number of likes +for a score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreLikesCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_modification.py b/flat_api/model/score_modification.py new file mode 100644 index 0000000..8ca5710 --- /dev/null +++ b/flat_api/model/score_modification.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreModification( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Edit the score metadata + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + subtitle = schemas.StrSchema + composer = schemas.StrSchema + lyricist = schemas.StrSchema + arranger = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + + + class sharingKey( + schemas.StrSchema + ): + + + class MetaOapg: + regex=[{ + 'pattern': r'^[a-f0-9]{128}$', # noqa: E501 + }] + + + class description( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 2000 + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def creationType() -> typing.Type['ScoreCreationType']: + return ScoreCreationType + + @staticmethod + def license() -> typing.Type['ScoreLicense']: + return ScoreLicense + licenseText = schemas.StrSchema + __annotations__ = { + "title": title, + "subtitle": subtitle, + "composer": composer, + "lyricist": lyricist, + "arranger": arranger, + "privacy": privacy, + "sharingKey": sharingKey, + "description": description, + "tags": tags, + "creationType": creationType, + "license": license, + "licenseText": licenseText, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, + composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, + lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, + arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, + license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, + licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreModification': + return super().__new__( + cls, + *_args, + title=title, + subtitle=subtitle, + composer=composer, + lyricist=lyricist, + arranger=arranger, + privacy=privacy, + sharingKey=sharingKey, + description=description, + tags=tags, + creationType=creationType, + license=license, + licenseText=licenseText, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_privacy import ScorePrivacy diff --git a/flat_api/model/score_modification.pyi b/flat_api/model/score_modification.pyi new file mode 100644 index 0000000..35bd490 --- /dev/null +++ b/flat_api/model/score_modification.pyi @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreModification( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Edit the score metadata + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + subtitle = schemas.StrSchema + composer = schemas.StrSchema + lyricist = schemas.StrSchema + arranger = schemas.StrSchema + + @staticmethod + def privacy() -> typing.Type['ScorePrivacy']: + return ScorePrivacy + + + class sharingKey( + schemas.StrSchema + ): + pass + + + class description( + schemas.StrSchema + ): + pass + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def creationType() -> typing.Type['ScoreCreationType']: + return ScoreCreationType + + @staticmethod + def license() -> typing.Type['ScoreLicense']: + return ScoreLicense + licenseText = schemas.StrSchema + __annotations__ = { + "title": title, + "subtitle": subtitle, + "composer": composer, + "lyricist": lyricist, + "arranger": arranger, + "privacy": privacy, + "sharingKey": sharingKey, + "description": description, + "tags": tags, + "creationType": creationType, + "license": license, + "licenseText": licenseText, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, + composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, + lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, + arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, + privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, + sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, + license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, + licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreModification': + return super().__new__( + cls, + *_args, + title=title, + subtitle=subtitle, + composer=composer, + lyricist=lyricist, + arranger=arranger, + privacy=privacy, + sharingKey=sharingKey, + description=description, + tags=tags, + creationType=creationType, + license=license, + licenseText=licenseText, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_privacy import ScorePrivacy diff --git a/flat_api/model/score_plays_counts.py b/flat_api/model/score_plays_counts.py new file mode 100644 index 0000000..937a41b --- /dev/null +++ b/flat_api/model/score_plays_counts.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScorePlaysCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, weekly, and monthly number of plays of +the score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScorePlaysCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_plays_counts.pyi b/flat_api/model/score_plays_counts.pyi new file mode 100644 index 0000000..937a41b --- /dev/null +++ b/flat_api/model/score_plays_counts.pyi @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScorePlaysCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, weekly, and monthly number of plays of +the score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScorePlaysCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_privacy.py b/flat_api/model/score_privacy.py new file mode 100644 index 0000000..8ba59a9 --- /dev/null +++ b/flat_api/model/score_privacy.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScorePrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The score main privacy mode. + +- `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. +- `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. +- `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. +- `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. + +The score can also be individually shared to a set of users or groups using the different collaborators API methods. + +When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. + +When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + + """ + + + class MetaOapg: + enum_value_to_name = { + "public": "PUBLIC", + "private": "PRIVATE", + "organizationPublic": "ORGANIZATION_PUBLIC", + "privateLink": "PRIVATE_LINK", + } + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def ORGANIZATION_PUBLIC(cls): + return cls("organizationPublic") + + @schemas.classproperty + def PRIVATE_LINK(cls): + return cls("privateLink") diff --git a/flat_api/model/score_privacy.pyi b/flat_api/model/score_privacy.pyi new file mode 100644 index 0000000..f54a180 --- /dev/null +++ b/flat_api/model/score_privacy.pyi @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScorePrivacy( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The score main privacy mode. + +- `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. +- `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. +- `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. +- `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. + +The score can also be individually shared to a set of users or groups using the different collaborators API methods. + +When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. + +When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + + """ + + @schemas.classproperty + def PUBLIC(cls): + return cls("public") + + @schemas.classproperty + def PRIVATE(cls): + return cls("private") + + @schemas.classproperty + def ORGANIZATION_PUBLIC(cls): + return cls("organizationPublic") + + @schemas.classproperty + def PRIVATE_LINK(cls): + return cls("privateLink") diff --git a/flat_api/model/score_revision.py b/flat_api/model/score_revision.py new file mode 100644 index 0000000..f00e940 --- /dev/null +++ b/flat_api/model/score_revision.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevision( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A score revision metadata + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + user = schemas.StrSchema + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + creationDate = schemas.DateTimeSchema + event = schemas.StrSchema + description = schemas.StrSchema + autosave = schemas.BoolSchema + + @staticmethod + def statistics() -> typing.Type['ScoreRevisionStatistics']: + return ScoreRevisionStatistics + __annotations__ = { + "id": id, + "user": user, + "collaborators": collaborators, + "creationDate": creationDate, + "event": event, + "description": description, + "autosave": autosave, + "statistics": statistics, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["event"]) -> MetaOapg.properties.event: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["statistics"]) -> 'ScoreRevisionStatistics': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["event"]) -> typing.Union[MetaOapg.properties.event, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["statistics"]) -> typing.Union['ScoreRevisionStatistics', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + event: typing.Union[MetaOapg.properties.event, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, + statistics: typing.Union['ScoreRevisionStatistics', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevision': + return super().__new__( + cls, + *_args, + id=id, + user=user, + collaborators=collaborators, + creationDate=creationDate, + event=event, + description=description, + autosave=autosave, + statistics=statistics, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_revision_statistics import ScoreRevisionStatistics diff --git a/flat_api/model/score_revision.pyi b/flat_api/model/score_revision.pyi new file mode 100644 index 0000000..f00e940 --- /dev/null +++ b/flat_api/model/score_revision.pyi @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevision( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A score revision metadata + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + user = schemas.StrSchema + + + class collaborators( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'collaborators': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + creationDate = schemas.DateTimeSchema + event = schemas.StrSchema + description = schemas.StrSchema + autosave = schemas.BoolSchema + + @staticmethod + def statistics() -> typing.Type['ScoreRevisionStatistics']: + return ScoreRevisionStatistics + __annotations__ = { + "id": id, + "user": user, + "collaborators": collaborators, + "creationDate": creationDate, + "event": event, + "description": description, + "autosave": autosave, + "statistics": statistics, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["event"]) -> MetaOapg.properties.event: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["statistics"]) -> 'ScoreRevisionStatistics': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["event"]) -> typing.Union[MetaOapg.properties.event, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["statistics"]) -> typing.Union['ScoreRevisionStatistics', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, + collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + event: typing.Union[MetaOapg.properties.event, str, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, + statistics: typing.Union['ScoreRevisionStatistics', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevision': + return super().__new__( + cls, + *_args, + id=id, + user=user, + collaborators=collaborators, + creationDate=creationDate, + event=event, + description=description, + autosave=autosave, + statistics=statistics, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_revision_statistics import ScoreRevisionStatistics diff --git a/flat_api/model/score_revision_creation.py b/flat_api/model/score_revision_creation.py new file mode 100644 index 0000000..9a12cec --- /dev/null +++ b/flat_api/model/score_revision_creation.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevisionCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A new created revision + """ + + + class MetaOapg: + required = { + "data", + } + + class properties: + data = schemas.StrSchema + + + class dataEncoding( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "base64": "BASE64", + } + + @schemas.classproperty + def BASE64(cls): + return cls("base64") + autosave = schemas.BoolSchema + description = schemas.StrSchema + __annotations__ = { + "data": data, + "dataEncoding": dataEncoding, + "autosave": autosave, + "description": description, + } + + data: MetaOapg.properties.data + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + data: typing.Union[MetaOapg.properties.data, str, ], + dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, + autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevisionCreation': + return super().__new__( + cls, + *_args, + data=data, + dataEncoding=dataEncoding, + autosave=autosave, + description=description, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_revision_creation.pyi b/flat_api/model/score_revision_creation.pyi new file mode 100644 index 0000000..d58d283 --- /dev/null +++ b/flat_api/model/score_revision_creation.pyi @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevisionCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A new created revision + """ + + + class MetaOapg: + required = { + "data", + } + + class properties: + data = schemas.StrSchema + + + class dataEncoding( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def BASE64(cls): + return cls("base64") + autosave = schemas.BoolSchema + description = schemas.StrSchema + __annotations__ = { + "data": data, + "dataEncoding": dataEncoding, + "autosave": autosave, + "description": description, + } + + data: MetaOapg.properties.data + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + data: typing.Union[MetaOapg.properties.data, str, ], + dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, + autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, + description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevisionCreation': + return super().__new__( + cls, + *_args, + data=data, + dataEncoding=dataEncoding, + autosave=autosave, + description=description, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_revision_statistics.py b/flat_api/model/score_revision_statistics.py new file mode 100644 index 0000000..a2fd3a9 --- /dev/null +++ b/flat_api/model/score_revision_statistics.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevisionStatistics( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The statistics related to the score revision (additions and deletions) + + """ + + + class MetaOapg: + + class properties: + additions = schemas.NumberSchema + deletions = schemas.NumberSchema + startDate = schemas.DateTimeSchema + endDate = schemas.DateTimeSchema + __annotations__ = { + "additions": additions, + "deletions": deletions, + "startDate": startDate, + "endDate": endDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["additions"]) -> MetaOapg.properties.additions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deletions"]) -> MetaOapg.properties.deletions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startDate"]) -> MetaOapg.properties.startDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["endDate"]) -> MetaOapg.properties.endDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["additions"]) -> typing.Union[MetaOapg.properties.additions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deletions"]) -> typing.Union[MetaOapg.properties.deletions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startDate"]) -> typing.Union[MetaOapg.properties.startDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["endDate"]) -> typing.Union[MetaOapg.properties.endDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + additions: typing.Union[MetaOapg.properties.additions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + deletions: typing.Union[MetaOapg.properties.deletions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + startDate: typing.Union[MetaOapg.properties.startDate, str, datetime, schemas.Unset] = schemas.unset, + endDate: typing.Union[MetaOapg.properties.endDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevisionStatistics': + return super().__new__( + cls, + *_args, + additions=additions, + deletions=deletions, + startDate=startDate, + endDate=endDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_revision_statistics.pyi b/flat_api/model/score_revision_statistics.pyi new file mode 100644 index 0000000..a2fd3a9 --- /dev/null +++ b/flat_api/model/score_revision_statistics.pyi @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreRevisionStatistics( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The statistics related to the score revision (additions and deletions) + + """ + + + class MetaOapg: + + class properties: + additions = schemas.NumberSchema + deletions = schemas.NumberSchema + startDate = schemas.DateTimeSchema + endDate = schemas.DateTimeSchema + __annotations__ = { + "additions": additions, + "deletions": deletions, + "startDate": startDate, + "endDate": endDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["additions"]) -> MetaOapg.properties.additions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deletions"]) -> MetaOapg.properties.deletions: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["startDate"]) -> MetaOapg.properties.startDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["endDate"]) -> MetaOapg.properties.endDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["additions"]) -> typing.Union[MetaOapg.properties.additions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deletions"]) -> typing.Union[MetaOapg.properties.deletions, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["startDate"]) -> typing.Union[MetaOapg.properties.startDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["endDate"]) -> typing.Union[MetaOapg.properties.endDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + additions: typing.Union[MetaOapg.properties.additions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + deletions: typing.Union[MetaOapg.properties.deletions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + startDate: typing.Union[MetaOapg.properties.startDate, str, datetime, schemas.Unset] = schemas.unset, + endDate: typing.Union[MetaOapg.properties.endDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreRevisionStatistics': + return super().__new__( + cls, + *_args, + additions=additions, + deletions=deletions, + startDate=startDate, + endDate=endDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_source.py b/flat_api/model/score_source.py new file mode 100644 index 0000000..ef8e8da --- /dev/null +++ b/flat_api/model/score_source.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreSource( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + googleDrive = schemas.StrSchema + __annotations__ = { + "googleDrive": googleDrive, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + googleDrive: typing.Union[MetaOapg.properties.googleDrive, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreSource': + return super().__new__( + cls, + *_args, + googleDrive=googleDrive, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_source.pyi b/flat_api/model/score_source.pyi new file mode 100644 index 0000000..ef8e8da --- /dev/null +++ b/flat_api/model/score_source.pyi @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreSource( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + googleDrive = schemas.StrSchema + __annotations__ = { + "googleDrive": googleDrive, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + googleDrive: typing.Union[MetaOapg.properties.googleDrive, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreSource': + return super().__new__( + cls, + *_args, + googleDrive=googleDrive, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_track.py b/flat_api/model/score_track.py new file mode 100644 index 0000000..26e44e8 --- /dev/null +++ b/flat_api/model/score_track.py @@ -0,0 +1,226 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrack( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An audio track for a score + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + title = schemas.StrSchema + score = schemas.StrSchema + creator = schemas.StrSchema + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + + @staticmethod + def type() -> typing.Type['ScoreTrackType']: + return ScoreTrackType + url = schemas.StrSchema + mediaId = schemas.StrSchema + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "id": id, + "title": title, + "score": score, + "creator": creator, + "creationDate": creationDate, + "modificationDate": modificationDate, + "default": default, + "state": state, + "type": type, + "url": url, + "mediaId": mediaId, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'ScoreTrackType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mediaId"]) -> MetaOapg.properties.mediaId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['ScoreTrackType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mediaId"]) -> typing.Union[MetaOapg.properties.mediaId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + type: typing.Union['ScoreTrackType', schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + mediaId: typing.Union[MetaOapg.properties.mediaId, str, schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrack': + return super().__new__( + cls, + *_args, + id=id, + title=title, + score=score, + creator=creator, + creationDate=creationDate, + modificationDate=modificationDate, + default=default, + state=state, + type=type, + url=url, + mediaId=mediaId, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +from flat_api.model.score_track_type import ScoreTrackType diff --git a/flat_api/model/score_track.pyi b/flat_api/model/score_track.pyi new file mode 100644 index 0000000..26e44e8 --- /dev/null +++ b/flat_api/model/score_track.pyi @@ -0,0 +1,226 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrack( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An audio track for a score + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + title = schemas.StrSchema + score = schemas.StrSchema + creator = schemas.StrSchema + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + + @staticmethod + def type() -> typing.Type['ScoreTrackType']: + return ScoreTrackType + url = schemas.StrSchema + mediaId = schemas.StrSchema + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "id": id, + "title": title, + "score": score, + "creator": creator, + "creationDate": creationDate, + "modificationDate": modificationDate, + "default": default, + "state": state, + "type": type, + "url": url, + "mediaId": mediaId, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'ScoreTrackType': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mediaId"]) -> MetaOapg.properties.mediaId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['ScoreTrackType', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mediaId"]) -> typing.Union[MetaOapg.properties.mediaId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + type: typing.Union['ScoreTrackType', schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + mediaId: typing.Union[MetaOapg.properties.mediaId, str, schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrack': + return super().__new__( + cls, + *_args, + id=id, + title=title, + score=score, + creator=creator, + creationDate=creationDate, + modificationDate=modificationDate, + default=default, + state=state, + type=type, + url=url, + mediaId=mediaId, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +from flat_api.model.score_track_type import ScoreTrackType diff --git a/flat_api/model/score_track_creation.py b/flat_api/model/score_track_creation.py new file mode 100644 index 0000000..c90e517 --- /dev/null +++ b/flat_api/model/score_track_creation.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a new track. This one must contain the URL of the track or the corresponding file + + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + url = schemas.StrSchema + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "title": title, + "default": default, + "state": state, + "url": url, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackCreation': + return super().__new__( + cls, + *_args, + title=title, + default=default, + state=state, + url=url, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_track_creation.pyi b/flat_api/model/score_track_creation.pyi new file mode 100644 index 0000000..c90e517 --- /dev/null +++ b/flat_api/model/score_track_creation.pyi @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Creation of a new track. This one must contain the URL of the track or the corresponding file + + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + url = schemas.StrSchema + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "title": title, + "default": default, + "state": state, + "url": url, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackCreation': + return super().__new__( + cls, + *_args, + title=title, + default=default, + state=state, + url=url, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_track_point.py b/flat_api/model/score_track_point.py new file mode 100644 index 0000000..a6e999e --- /dev/null +++ b/flat_api/model/score_track_point.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackPoint( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A track synchronization point + """ + + + class MetaOapg: + required = { + "time", + "type", + } + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "measure": "MEASURE", + "end": "END", + } + + @schemas.classproperty + def MEASURE(cls): + return cls("measure") + + @schemas.classproperty + def END(cls): + return cls("end") + time = schemas.NumberSchema + measureUuid = schemas.UUIDSchema + __annotations__ = { + "type": type, + "time": time, + "measureUuid": measureUuid, + } + + time: MetaOapg.properties.time + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["measureUuid"]) -> MetaOapg.properties.measureUuid: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["measureUuid"]) -> typing.Union[MetaOapg.properties.measureUuid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + time: typing.Union[MetaOapg.properties.time, decimal.Decimal, int, float, ], + type: typing.Union[MetaOapg.properties.type, str, ], + measureUuid: typing.Union[MetaOapg.properties.measureUuid, str, uuid.UUID, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackPoint': + return super().__new__( + cls, + *_args, + time=time, + type=type, + measureUuid=measureUuid, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_track_point.pyi b/flat_api/model/score_track_point.pyi new file mode 100644 index 0000000..aeb8163 --- /dev/null +++ b/flat_api/model/score_track_point.pyi @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackPoint( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A track synchronization point + """ + + + class MetaOapg: + required = { + "time", + "type", + } + + class properties: + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def MEASURE(cls): + return cls("measure") + + @schemas.classproperty + def END(cls): + return cls("end") + time = schemas.NumberSchema + measureUuid = schemas.UUIDSchema + __annotations__ = { + "type": type, + "time": time, + "measureUuid": measureUuid, + } + + time: MetaOapg.properties.time + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["measureUuid"]) -> MetaOapg.properties.measureUuid: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["measureUuid"]) -> typing.Union[MetaOapg.properties.measureUuid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + time: typing.Union[MetaOapg.properties.time, decimal.Decimal, int, float, ], + type: typing.Union[MetaOapg.properties.type, str, ], + measureUuid: typing.Union[MetaOapg.properties.measureUuid, str, uuid.UUID, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackPoint': + return super().__new__( + cls, + *_args, + time=time, + type=type, + measureUuid=measureUuid, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_track_state.py b/flat_api/model/score_track_state.py new file mode 100644 index 0000000..dce4c25 --- /dev/null +++ b/flat_api/model/score_track_state.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the track + """ + + + class MetaOapg: + enum_value_to_name = { + "draft": "DRAFT", + "completed": "COMPLETED", + "deleted": "DELETED", + } + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def COMPLETED(cls): + return cls("completed") + + @schemas.classproperty + def DELETED(cls): + return cls("deleted") diff --git a/flat_api/model/score_track_state.pyi b/flat_api/model/score_track_state.pyi new file mode 100644 index 0000000..6fcccf6 --- /dev/null +++ b/flat_api/model/score_track_state.pyi @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackState( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + State of the track + """ + + @schemas.classproperty + def DRAFT(cls): + return cls("draft") + + @schemas.classproperty + def COMPLETED(cls): + return cls("completed") + + @schemas.classproperty + def DELETED(cls): + return cls("deleted") diff --git a/flat_api/model/score_track_type.py b/flat_api/model/score_track_type.py new file mode 100644 index 0000000..9764800 --- /dev/null +++ b/flat_api/model/score_track_type.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of an audio track + """ + + + class MetaOapg: + enum_value_to_name = { + "audio": "AUDIO", + "soundcloud": "SOUNDCLOUD", + "youtube": "YOUTUBE", + "vimeo": "VIMEO", + } + + @schemas.classproperty + def AUDIO(cls): + return cls("audio") + + @schemas.classproperty + def SOUNDCLOUD(cls): + return cls("soundcloud") + + @schemas.classproperty + def YOUTUBE(cls): + return cls("youtube") + + @schemas.classproperty + def VIMEO(cls): + return cls("vimeo") diff --git a/flat_api/model/score_track_type.pyi b/flat_api/model/score_track_type.pyi new file mode 100644 index 0000000..c0b6a4d --- /dev/null +++ b/flat_api/model/score_track_type.pyi @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackType( + schemas.EnumBase, + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + The type of an audio track + """ + + @schemas.classproperty + def AUDIO(cls): + return cls("audio") + + @schemas.classproperty + def SOUNDCLOUD(cls): + return cls("soundcloud") + + @schemas.classproperty + def YOUTUBE(cls): + return cls("youtube") + + @schemas.classproperty + def VIMEO(cls): + return cls("vimeo") diff --git a/flat_api/model/score_track_update.py b/flat_api/model/score_track_update.py new file mode 100644 index 0000000..f65cccd --- /dev/null +++ b/flat_api/model/score_track_update.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update an existing track. + + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "title": title, + "default": default, + "state": state, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackUpdate': + return super().__new__( + cls, + *_args, + title=title, + default=default, + state=state, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_track_update.pyi b/flat_api/model/score_track_update.pyi new file mode 100644 index 0000000..f65cccd --- /dev/null +++ b/flat_api/model/score_track_update.pyi @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreTrackUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Update an existing track. + + """ + + + class MetaOapg: + + class properties: + title = schemas.StrSchema + default = schemas.BoolSchema + + @staticmethod + def state() -> typing.Type['ScoreTrackState']: + return ScoreTrackState + + + class synchronizationPoints( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrackPoint']: + return ScoreTrackPoint + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'synchronizationPoints': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrackPoint': + return super().__getitem__(i) + __annotations__ = { + "title": title, + "default": default, + "state": state, + "synchronizationPoints": synchronizationPoints, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, + default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, + state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, + synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreTrackUpdate': + return super().__new__( + cls, + *_args, + title=title, + default=default, + state=state, + synchronizationPoints=synchronizationPoints, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_views_counts.py b/flat_api/model/score_views_counts.py new file mode 100644 index 0000000..6d1b175 --- /dev/null +++ b/flat_api/model/score_views_counts.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreViewsCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, weekly, and monthly number of views of +the score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreViewsCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/score_views_counts.pyi b/flat_api/model/score_views_counts.pyi new file mode 100644 index 0000000..6d1b175 --- /dev/null +++ b/flat_api/model/score_views_counts.pyi @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class ScoreViewsCounts( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A computed version of the total, weekly, and monthly number of views of +the score + + """ + + + class MetaOapg: + + class properties: + total = schemas.NumberSchema + weekly = schemas.NumberSchema + monthly = schemas.NumberSchema + __annotations__ = { + "total": total, + "weekly": weekly, + "monthly": monthly, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ScoreViewsCounts': + return super().__new__( + cls, + *_args, + total=total, + weekly=weekly, + monthly=monthly, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/task.py b/flat_api/model/task.py new file mode 100644 index 0000000..409af65 --- /dev/null +++ b/flat_api/model/task.py @@ -0,0 +1,356 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Task( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An asynchronous task + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + type = schemas.StrSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "created": "CREATED", + "doing": "DOING", + "done": "DONE", + "canceled": "CANCELED", + "error": "ERROR", + } + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def DOING(cls): + return cls("doing") + + @schemas.classproperty + def DONE(cls): + return cls("done") + + @schemas.classproperty + def CANCELED(cls): + return cls("canceled") + + @schemas.classproperty + def ERROR(cls): + return cls("error") + format = schemas.StrSchema + score = schemas.StrSchema + + + class progress( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + percent = schemas.NumberSchema + text = schemas.StrSchema + __annotations__ = { + "percent": percent, + "text": text, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["percent"]) -> MetaOapg.properties.percent: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["percent"]) -> typing.Union[MetaOapg.properties.percent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> typing.Union[MetaOapg.properties.text, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + percent: typing.Union[MetaOapg.properties.percent, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + text: typing.Union[MetaOapg.properties.text, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'progress': + return super().__new__( + cls, + *_args, + percent=percent, + text=text, + _configuration=_configuration, + **kwargs, + ) + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + doneDate = schemas.DateTimeSchema + + + class result( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + url = schemas.StrSchema + error = schemas.StrSchema + __annotations__ = { + "url": url, + "error": error, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["error"]) -> MetaOapg.properties.error: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["error"]) -> typing.Union[MetaOapg.properties.error, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + error: typing.Union[MetaOapg.properties.error, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'result': + return super().__new__( + cls, + *_args, + url=url, + error=error, + _configuration=_configuration, + **kwargs, + ) + + + class errorHistory( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'errorHistory': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "type": type, + "state": state, + "format": format, + "score": score, + "progress": progress, + "creationDate": creationDate, + "modificationDate": modificationDate, + "doneDate": doneDate, + "result": result, + "errorHistory": errorHistory, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["progress"]) -> MetaOapg.properties.progress: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["doneDate"]) -> MetaOapg.properties.doneDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["errorHistory"]) -> MetaOapg.properties.errorHistory: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["progress"]) -> typing.Union[MetaOapg.properties.progress, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["doneDate"]) -> typing.Union[MetaOapg.properties.doneDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["errorHistory"]) -> typing.Union[MetaOapg.properties.errorHistory, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + progress: typing.Union[MetaOapg.properties.progress, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + doneDate: typing.Union[MetaOapg.properties.doneDate, str, datetime, schemas.Unset] = schemas.unset, + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + errorHistory: typing.Union[MetaOapg.properties.errorHistory, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Task': + return super().__new__( + cls, + *_args, + id=id, + type=type, + state=state, + format=format, + score=score, + progress=progress, + creationDate=creationDate, + modificationDate=modificationDate, + doneDate=doneDate, + result=result, + errorHistory=errorHistory, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/task.pyi b/flat_api/model/task.pyi new file mode 100644 index 0000000..7559c54 --- /dev/null +++ b/flat_api/model/task.pyi @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class Task( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + An asynchronous task + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + type = schemas.StrSchema + + + class state( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def CREATED(cls): + return cls("created") + + @schemas.classproperty + def DOING(cls): + return cls("doing") + + @schemas.classproperty + def DONE(cls): + return cls("done") + + @schemas.classproperty + def CANCELED(cls): + return cls("canceled") + + @schemas.classproperty + def ERROR(cls): + return cls("error") + format = schemas.StrSchema + score = schemas.StrSchema + + + class progress( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + percent = schemas.NumberSchema + text = schemas.StrSchema + __annotations__ = { + "percent": percent, + "text": text, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["percent"]) -> MetaOapg.properties.percent: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["percent"]) -> typing.Union[MetaOapg.properties.percent, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> typing.Union[MetaOapg.properties.text, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + percent: typing.Union[MetaOapg.properties.percent, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + text: typing.Union[MetaOapg.properties.text, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'progress': + return super().__new__( + cls, + *_args, + percent=percent, + text=text, + _configuration=_configuration, + **kwargs, + ) + creationDate = schemas.DateTimeSchema + modificationDate = schemas.DateTimeSchema + doneDate = schemas.DateTimeSchema + + + class result( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + url = schemas.StrSchema + error = schemas.StrSchema + __annotations__ = { + "url": url, + "error": error, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["error"]) -> MetaOapg.properties.error: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["error"]) -> typing.Union[MetaOapg.properties.error, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + error: typing.Union[MetaOapg.properties.error, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'result': + return super().__new__( + cls, + *_args, + url=url, + error=error, + _configuration=_configuration, + **kwargs, + ) + + + class errorHistory( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'errorHistory': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "type": type, + "state": state, + "format": format, + "score": score, + "progress": progress, + "creationDate": creationDate, + "modificationDate": modificationDate, + "doneDate": doneDate, + "result": result, + "errorHistory": errorHistory, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["progress"]) -> MetaOapg.properties.progress: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["doneDate"]) -> MetaOapg.properties.doneDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["errorHistory"]) -> MetaOapg.properties.errorHistory: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["progress"]) -> typing.Union[MetaOapg.properties.progress, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["doneDate"]) -> typing.Union[MetaOapg.properties.doneDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["errorHistory"]) -> typing.Union[MetaOapg.properties.errorHistory, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, + progress: typing.Union[MetaOapg.properties.progress, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, + modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, + doneDate: typing.Union[MetaOapg.properties.doneDate, str, datetime, schemas.Unset] = schemas.unset, + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + errorHistory: typing.Union[MetaOapg.properties.errorHistory, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Task': + return super().__new__( + cls, + *_args, + id=id, + type=type, + state=state, + format=format, + score=score, + progress=progress, + creationDate=creationDate, + modificationDate=modificationDate, + doneDate=doneDate, + result=result, + errorHistory=errorHistory, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/task_export_options.py b/flat_api/model/task_export_options.py new file mode 100644 index 0000000..d039de9 --- /dev/null +++ b/flat_api/model/task_export_options.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class TaskExportOptions( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Options for the requested export + + """ + + + class MetaOapg: + + class properties: + + + class parts( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'parts': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "parts": parts, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parts"]) -> MetaOapg.properties.parts: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parts"]) -> typing.Union[MetaOapg.properties.parts, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + parts: typing.Union[MetaOapg.properties.parts, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TaskExportOptions': + return super().__new__( + cls, + *_args, + parts=parts, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/task_export_options.pyi b/flat_api/model/task_export_options.pyi new file mode 100644 index 0000000..d039de9 --- /dev/null +++ b/flat_api/model/task_export_options.pyi @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class TaskExportOptions( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Options for the requested export + + """ + + + class MetaOapg: + + class properties: + + + class parts( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'parts': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "parts": parts, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["parts"]) -> MetaOapg.properties.parts: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["parts"]) -> typing.Union[MetaOapg.properties.parts, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + parts: typing.Union[MetaOapg.properties.parts, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TaskExportOptions': + return super().__new__( + cls, + *_args, + parts=parts, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_admin_update.py b/flat_api/model/user_admin_update.py new file mode 100644 index 0000000..f7dc1e4 --- /dev/null +++ b/flat_api/model/user_admin_update.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserAdminUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User update as an organization admin + """ + + + class MetaOapg: + + class properties: + + + class password( + schemas.StrSchema + ): + + + class MetaOapg: + format = 'password' + max_length = 1000 + min_length = 6 + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + + class username( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 30 + min_length = 1 + regex=[{ + 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 + }] + + + class firstname( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 60 + + + class lastname( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 60 + email = schemas.StrSchema + __annotations__ = { + "password": password, + "organizationRole": organizationRole, + "username": username, + "firstname": firstname, + "lastname": lastname, + "email": email, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserAdminUpdate': + return super().__new__( + cls, + *_args, + password=password, + organizationRole=organizationRole, + username=username, + firstname=firstname, + lastname=lastname, + email=email, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_admin_update.pyi b/flat_api/model/user_admin_update.pyi new file mode 100644 index 0000000..90df67d --- /dev/null +++ b/flat_api/model/user_admin_update.pyi @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserAdminUpdate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User update as an organization admin + """ + + + class MetaOapg: + + class properties: + + + class password( + schemas.StrSchema + ): + pass + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + + class username( + schemas.StrSchema + ): + pass + + + class firstname( + schemas.StrSchema + ): + pass + + + class lastname( + schemas.StrSchema + ): + pass + email = schemas.StrSchema + __annotations__ = { + "password": password, + "organizationRole": organizationRole, + "username": username, + "firstname": firstname, + "lastname": lastname, + "email": email, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserAdminUpdate': + return super().__new__( + cls, + *_args, + password=password, + organizationRole=organizationRole, + username=username, + firstname=firstname, + lastname=lastname, + email=email, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_azure_details.py b/flat_api/model/user_azure_details.py new file mode 100644 index 0000000..e909057 --- /dev/null +++ b/flat_api/model/user_azure_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserAzureDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + oid = schemas.StrSchema + hd = schemas.StrSchema + preferredUsername = schemas.StrSchema + __annotations__ = { + "oid": oid, + "hd": hd, + "preferredUsername": preferredUsername, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["oid"]) -> MetaOapg.properties.oid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hd"]) -> MetaOapg.properties.hd: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["preferredUsername"]) -> MetaOapg.properties.preferredUsername: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["oid"]) -> typing.Union[MetaOapg.properties.oid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hd"]) -> typing.Union[MetaOapg.properties.hd, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["preferredUsername"]) -> typing.Union[MetaOapg.properties.preferredUsername, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + oid: typing.Union[MetaOapg.properties.oid, str, schemas.Unset] = schemas.unset, + hd: typing.Union[MetaOapg.properties.hd, str, schemas.Unset] = schemas.unset, + preferredUsername: typing.Union[MetaOapg.properties.preferredUsername, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserAzureDetails': + return super().__new__( + cls, + *_args, + oid=oid, + hd=hd, + preferredUsername=preferredUsername, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_azure_details.pyi b/flat_api/model/user_azure_details.pyi new file mode 100644 index 0000000..e909057 --- /dev/null +++ b/flat_api/model/user_azure_details.pyi @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserAzureDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + oid = schemas.StrSchema + hd = schemas.StrSchema + preferredUsername = schemas.StrSchema + __annotations__ = { + "oid": oid, + "hd": hd, + "preferredUsername": preferredUsername, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["oid"]) -> MetaOapg.properties.oid: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["hd"]) -> MetaOapg.properties.hd: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["preferredUsername"]) -> MetaOapg.properties.preferredUsername: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["oid"]) -> typing.Union[MetaOapg.properties.oid, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["hd"]) -> typing.Union[MetaOapg.properties.hd, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["preferredUsername"]) -> typing.Union[MetaOapg.properties.preferredUsername, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + oid: typing.Union[MetaOapg.properties.oid, str, schemas.Unset] = schemas.unset, + hd: typing.Union[MetaOapg.properties.hd, str, schemas.Unset] = schemas.unset, + preferredUsername: typing.Union[MetaOapg.properties.preferredUsername, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserAzureDetails': + return super().__new__( + cls, + *_args, + oid=oid, + hd=hd, + preferredUsername=preferredUsername, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_community_profile_links.py b/flat_api/model/user_community_profile_links.py new file mode 100644 index 0000000..fefac3d --- /dev/null +++ b/flat_api/model/user_community_profile_links.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserCommunityProfileLinks( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Social networks links + """ + + + class MetaOapg: + + class properties: + + + class spotifyUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'spotifyUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class youtubeUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'youtubeUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class soundcloudUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'soundcloudUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class tiktokUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tiktokUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class instagramUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instagramUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class websiteUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'websiteUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "spotifyUrl": spotifyUrl, + "youtubeUrl": youtubeUrl, + "soundcloudUrl": soundcloudUrl, + "tiktokUrl": tiktokUrl, + "instagramUrl": instagramUrl, + "websiteUrl": websiteUrl, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["spotifyUrl"]) -> MetaOapg.properties.spotifyUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["youtubeUrl"]) -> MetaOapg.properties.youtubeUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["soundcloudUrl"]) -> MetaOapg.properties.soundcloudUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tiktokUrl"]) -> MetaOapg.properties.tiktokUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instagramUrl"]) -> MetaOapg.properties.instagramUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["websiteUrl"]) -> MetaOapg.properties.websiteUrl: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["spotifyUrl"]) -> typing.Union[MetaOapg.properties.spotifyUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["youtubeUrl"]) -> typing.Union[MetaOapg.properties.youtubeUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["soundcloudUrl"]) -> typing.Union[MetaOapg.properties.soundcloudUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tiktokUrl"]) -> typing.Union[MetaOapg.properties.tiktokUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instagramUrl"]) -> typing.Union[MetaOapg.properties.instagramUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["websiteUrl"]) -> typing.Union[MetaOapg.properties.websiteUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + spotifyUrl: typing.Union[MetaOapg.properties.spotifyUrl, None, str, schemas.Unset] = schemas.unset, + youtubeUrl: typing.Union[MetaOapg.properties.youtubeUrl, None, str, schemas.Unset] = schemas.unset, + soundcloudUrl: typing.Union[MetaOapg.properties.soundcloudUrl, None, str, schemas.Unset] = schemas.unset, + tiktokUrl: typing.Union[MetaOapg.properties.tiktokUrl, None, str, schemas.Unset] = schemas.unset, + instagramUrl: typing.Union[MetaOapg.properties.instagramUrl, None, str, schemas.Unset] = schemas.unset, + websiteUrl: typing.Union[MetaOapg.properties.websiteUrl, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserCommunityProfileLinks': + return super().__new__( + cls, + *_args, + spotifyUrl=spotifyUrl, + youtubeUrl=youtubeUrl, + soundcloudUrl=soundcloudUrl, + tiktokUrl=tiktokUrl, + instagramUrl=instagramUrl, + websiteUrl=websiteUrl, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_community_profile_links.pyi b/flat_api/model/user_community_profile_links.pyi new file mode 100644 index 0000000..fefac3d --- /dev/null +++ b/flat_api/model/user_community_profile_links.pyi @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserCommunityProfileLinks( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Social networks links + """ + + + class MetaOapg: + + class properties: + + + class spotifyUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'spotifyUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class youtubeUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'youtubeUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class soundcloudUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'soundcloudUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class tiktokUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tiktokUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class instagramUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instagramUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class websiteUrl( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'websiteUrl': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "spotifyUrl": spotifyUrl, + "youtubeUrl": youtubeUrl, + "soundcloudUrl": soundcloudUrl, + "tiktokUrl": tiktokUrl, + "instagramUrl": instagramUrl, + "websiteUrl": websiteUrl, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["spotifyUrl"]) -> MetaOapg.properties.spotifyUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["youtubeUrl"]) -> MetaOapg.properties.youtubeUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["soundcloudUrl"]) -> MetaOapg.properties.soundcloudUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tiktokUrl"]) -> MetaOapg.properties.tiktokUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instagramUrl"]) -> MetaOapg.properties.instagramUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["websiteUrl"]) -> MetaOapg.properties.websiteUrl: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["spotifyUrl"]) -> typing.Union[MetaOapg.properties.spotifyUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["youtubeUrl"]) -> typing.Union[MetaOapg.properties.youtubeUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["soundcloudUrl"]) -> typing.Union[MetaOapg.properties.soundcloudUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tiktokUrl"]) -> typing.Union[MetaOapg.properties.tiktokUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instagramUrl"]) -> typing.Union[MetaOapg.properties.instagramUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["websiteUrl"]) -> typing.Union[MetaOapg.properties.websiteUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + spotifyUrl: typing.Union[MetaOapg.properties.spotifyUrl, None, str, schemas.Unset] = schemas.unset, + youtubeUrl: typing.Union[MetaOapg.properties.youtubeUrl, None, str, schemas.Unset] = schemas.unset, + soundcloudUrl: typing.Union[MetaOapg.properties.soundcloudUrl, None, str, schemas.Unset] = schemas.unset, + tiktokUrl: typing.Union[MetaOapg.properties.tiktokUrl, None, str, schemas.Unset] = schemas.unset, + instagramUrl: typing.Union[MetaOapg.properties.instagramUrl, None, str, schemas.Unset] = schemas.unset, + websiteUrl: typing.Union[MetaOapg.properties.websiteUrl, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserCommunityProfileLinks': + return super().__new__( + cls, + *_args, + spotifyUrl=spotifyUrl, + youtubeUrl=youtubeUrl, + soundcloudUrl=soundcloudUrl, + tiktokUrl=tiktokUrl, + instagramUrl=instagramUrl, + websiteUrl=websiteUrl, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_creation.py b/flat_api/model/user_creation.py new file mode 100644 index 0000000..562bfb9 --- /dev/null +++ b/flat_api/model/user_creation.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User creation + """ + + + class MetaOapg: + required = { + "password", + "username", + } + + class properties: + + + class username( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 30 + min_length = 1 + regex=[{ + 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 + }] + + + class password( + schemas.StrSchema + ): + + + class MetaOapg: + format = 'password' + max_length = 1000 + min_length = 6 + + + class firstname( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 60 + + + class lastname( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 60 + email = schemas.StrSchema + + @staticmethod + def locale() -> typing.Type['FlatLocales']: + return FlatLocales + + + class role( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "teacher": "TEACHER", + "admin": "ADMIN", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + __annotations__ = { + "username": username, + "password": password, + "firstname": firstname, + "lastname": lastname, + "email": email, + "locale": locale, + "role": role, + } + + password: MetaOapg.properties.password + username: MetaOapg.properties.username + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["role"]) -> MetaOapg.properties.role: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["role"]) -> typing.Union[MetaOapg.properties.role, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, ], + username: typing.Union[MetaOapg.properties.username, str, ], + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, + role: typing.Union[MetaOapg.properties.role, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserCreation': + return super().__new__( + cls, + *_args, + password=password, + username=username, + firstname=firstname, + lastname=lastname, + email=email, + locale=locale, + role=role, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.flat_locales import FlatLocales diff --git a/flat_api/model/user_creation.pyi b/flat_api/model/user_creation.pyi new file mode 100644 index 0000000..a443df8 --- /dev/null +++ b/flat_api/model/user_creation.pyi @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + User creation + """ + + + class MetaOapg: + required = { + "password", + "username", + } + + class properties: + + + class username( + schemas.StrSchema + ): + pass + + + class password( + schemas.StrSchema + ): + pass + + + class firstname( + schemas.StrSchema + ): + pass + + + class lastname( + schemas.StrSchema + ): + pass + email = schemas.StrSchema + + @staticmethod + def locale() -> typing.Type['FlatLocales']: + return FlatLocales + + + class role( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + __annotations__ = { + "username": username, + "password": password, + "firstname": firstname, + "lastname": lastname, + "email": email, + "locale": locale, + "role": role, + } + + password: MetaOapg.properties.password + username: MetaOapg.properties.username + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["role"]) -> MetaOapg.properties.role: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["role"]) -> typing.Union[MetaOapg.properties.role, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, ], + username: typing.Union[MetaOapg.properties.username, str, ], + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, + role: typing.Union[MetaOapg.properties.role, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserCreation': + return super().__new__( + cls, + *_args, + password=password, + username=username, + firstname=firstname, + lastname=lastname, + email=email, + locale=locale, + role=role, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.flat_locales import FlatLocales diff --git a/flat_api/model/user_details.py b/flat_api/model/user_details.py new file mode 100644 index 0000000..edda2e6 --- /dev/null +++ b/flat_api/model/user_details.py @@ -0,0 +1,523 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "guest": "GUEST", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + bio = schemas.StrSchema + registrationDate = schemas.DateTimeSchema + likedScoresCount = schemas.IntSchema + followersCount = schemas.IntSchema + followingCount = schemas.IntSchema + ownedPublicScoresCount = schemas.IntSchema + coverPicture = schemas.StrSchema + profileTheme = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def links() -> typing.Type['UserCommunityProfileLinks']: + return UserCommunityProfileLinks + + @staticmethod + def azureDetails() -> typing.Type['UserAzureDetails']: + return UserAzureDetails + privateProfile = schemas.BoolSchema + + @staticmethod + def locale() -> typing.Type['FlatLocales']: + return FlatLocales + + + class groups( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'groups': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class pictureFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'pictureFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverPictureFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverPictureFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "bio": bio, + "registrationDate": registrationDate, + "likedScoresCount": likedScoresCount, + "followersCount": followersCount, + "followingCount": followingCount, + "ownedPublicScoresCount": ownedPublicScoresCount, + "coverPicture": coverPicture, + "profileTheme": profileTheme, + "instruments": instruments, + "links": links, + "azureDetails": azureDetails, + "privateProfile": privateProfile, + "locale": locale, + "groups": groups, + "pictureFile": pictureFile, + "coverPictureFile": coverPictureFile, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["azureDetails"]) -> 'UserAzureDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privateProfile"]) -> MetaOapg.properties.privateProfile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pictureFile"]) -> MetaOapg.properties.pictureFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPictureFile"]) -> MetaOapg.properties.coverPictureFile: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["azureDetails"]) -> typing.Union['UserAzureDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privateProfile"]) -> typing.Union[MetaOapg.properties.privateProfile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pictureFile"]) -> typing.Union[MetaOapg.properties.pictureFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPictureFile"]) -> typing.Union[MetaOapg.properties.coverPictureFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, + registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, + likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, + profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, + azureDetails: typing.Union['UserAzureDetails', schemas.Unset] = schemas.unset, + privateProfile: typing.Union[MetaOapg.properties.privateProfile, bool, schemas.Unset] = schemas.unset, + locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, + groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, + pictureFile: typing.Union[MetaOapg.properties.pictureFile, None, str, schemas.Unset] = schemas.unset, + coverPictureFile: typing.Union[MetaOapg.properties.coverPictureFile, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserDetails': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + bio=bio, + registrationDate=registrationDate, + likedScoresCount=likedScoresCount, + followersCount=followersCount, + followingCount=followingCount, + ownedPublicScoresCount=ownedPublicScoresCount, + coverPicture=coverPicture, + profileTheme=profileTheme, + instruments=instruments, + links=links, + azureDetails=azureDetails, + privateProfile=privateProfile, + locale=locale, + groups=groups, + pictureFile=pictureFile, + coverPictureFile=coverPictureFile, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.flat_locales import FlatLocales +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_azure_details import UserAzureDetails +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_details.pyi b/flat_api/model/user_details.pyi new file mode 100644 index 0000000..2fb3c39 --- /dev/null +++ b/flat_api/model/user_details.pyi @@ -0,0 +1,516 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserDetails( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + bio = schemas.StrSchema + registrationDate = schemas.DateTimeSchema + likedScoresCount = schemas.IntSchema + followersCount = schemas.IntSchema + followingCount = schemas.IntSchema + ownedPublicScoresCount = schemas.IntSchema + coverPicture = schemas.StrSchema + profileTheme = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def links() -> typing.Type['UserCommunityProfileLinks']: + return UserCommunityProfileLinks + + @staticmethod + def azureDetails() -> typing.Type['UserAzureDetails']: + return UserAzureDetails + privateProfile = schemas.BoolSchema + + @staticmethod + def locale() -> typing.Type['FlatLocales']: + return FlatLocales + + + class groups( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'groups': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class pictureFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'pictureFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class coverPictureFile( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'coverPictureFile': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "bio": bio, + "registrationDate": registrationDate, + "likedScoresCount": likedScoresCount, + "followersCount": followersCount, + "followingCount": followingCount, + "ownedPublicScoresCount": ownedPublicScoresCount, + "coverPicture": coverPicture, + "profileTheme": profileTheme, + "instruments": instruments, + "links": links, + "azureDetails": azureDetails, + "privateProfile": privateProfile, + "locale": locale, + "groups": groups, + "pictureFile": pictureFile, + "coverPictureFile": coverPictureFile, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["azureDetails"]) -> 'UserAzureDetails': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["privateProfile"]) -> MetaOapg.properties.privateProfile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["pictureFile"]) -> MetaOapg.properties.pictureFile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPictureFile"]) -> MetaOapg.properties.coverPictureFile: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["azureDetails"]) -> typing.Union['UserAzureDetails', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["privateProfile"]) -> typing.Union[MetaOapg.properties.privateProfile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["pictureFile"]) -> typing.Union[MetaOapg.properties.pictureFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPictureFile"]) -> typing.Union[MetaOapg.properties.coverPictureFile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, + registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, + likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, + profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, + azureDetails: typing.Union['UserAzureDetails', schemas.Unset] = schemas.unset, + privateProfile: typing.Union[MetaOapg.properties.privateProfile, bool, schemas.Unset] = schemas.unset, + locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, + groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, + pictureFile: typing.Union[MetaOapg.properties.pictureFile, None, str, schemas.Unset] = schemas.unset, + coverPictureFile: typing.Union[MetaOapg.properties.coverPictureFile, None, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserDetails': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + bio=bio, + registrationDate=registrationDate, + likedScoresCount=likedScoresCount, + followersCount=followersCount, + followingCount=followingCount, + ownedPublicScoresCount=ownedPublicScoresCount, + coverPicture=coverPicture, + profileTheme=profileTheme, + instruments=instruments, + links=links, + azureDetails=azureDetails, + privateProfile=privateProfile, + locale=locale, + groups=groups, + pictureFile=pictureFile, + coverPictureFile=coverPictureFile, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.flat_locales import FlatLocales +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_azure_details import UserAzureDetails +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_details_admin.py b/flat_api/model/user_details_admin.py new file mode 100644 index 0000000..7474fb5 --- /dev/null +++ b/flat_api/model/user_details_admin.py @@ -0,0 +1,428 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserDetailsAdmin( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "guest": "GUEST", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + email = schemas.StrSchema + lastActivityDate = schemas.DateTimeSchema + + + class license( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + expirationDate = schemas.DateTimeSchema + + @staticmethod + def source() -> typing.Type['LicenseSources']: + return LicenseSources + + @staticmethod + def mode() -> typing.Type['LicenseMode']: + return LicenseMode + active = schemas.BoolSchema + __annotations__ = { + "id": id, + "expirationDate": expirationDate, + "source": source, + "mode": mode, + "active": active, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'LicenseSources': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mode"]) -> 'LicenseMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['LicenseSources', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mode"]) -> typing.Union['LicenseMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["active"]) -> typing.Union[MetaOapg.properties.active, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + source: typing.Union['LicenseSources', schemas.Unset] = schemas.unset, + mode: typing.Union['LicenseMode', schemas.Unset] = schemas.unset, + active: typing.Union[MetaOapg.properties.active, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'license': + return super().__new__( + cls, + *_args, + id=id, + expirationDate=expirationDate, + source=source, + mode=mode, + active=active, + _configuration=_configuration, + **kwargs, + ) + + + class groups( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'groups': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "email": email, + "lastActivityDate": lastActivityDate, + "license": license, + "groups": groups, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastActivityDate"]) -> MetaOapg.properties.lastActivityDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> MetaOapg.properties.license: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastActivityDate"]) -> typing.Union[MetaOapg.properties.lastActivityDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union[MetaOapg.properties.license, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + lastActivityDate: typing.Union[MetaOapg.properties.lastActivityDate, str, datetime, schemas.Unset] = schemas.unset, + license: typing.Union[MetaOapg.properties.license, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserDetailsAdmin': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + email=email, + lastActivityDate=lastActivityDate, + license=license, + groups=groups, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.license_mode import LicenseMode +from flat_api.model.license_sources import LicenseSources +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_details_admin.pyi b/flat_api/model/user_details_admin.pyi new file mode 100644 index 0000000..0c3c445 --- /dev/null +++ b/flat_api/model/user_details_admin.pyi @@ -0,0 +1,421 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserDetailsAdmin( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + email = schemas.StrSchema + lastActivityDate = schemas.DateTimeSchema + + + class license( + schemas.DictSchema + ): + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + expirationDate = schemas.DateTimeSchema + + @staticmethod + def source() -> typing.Type['LicenseSources']: + return LicenseSources + + @staticmethod + def mode() -> typing.Type['LicenseMode']: + return LicenseMode + active = schemas.BoolSchema + __annotations__ = { + "id": id, + "expirationDate": expirationDate, + "source": source, + "mode": mode, + "active": active, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'LicenseSources': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["mode"]) -> 'LicenseMode': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['LicenseSources', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["mode"]) -> typing.Union['LicenseMode', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["active"]) -> typing.Union[MetaOapg.properties.active, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + source: typing.Union['LicenseSources', schemas.Unset] = schemas.unset, + mode: typing.Union['LicenseMode', schemas.Unset] = schemas.unset, + active: typing.Union[MetaOapg.properties.active, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'license': + return super().__new__( + cls, + *_args, + id=id, + expirationDate=expirationDate, + source=source, + mode=mode, + active=active, + _configuration=_configuration, + **kwargs, + ) + + + class groups( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'groups': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "email": email, + "lastActivityDate": lastActivityDate, + "license": license, + "groups": groups, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastActivityDate"]) -> MetaOapg.properties.lastActivityDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["license"]) -> MetaOapg.properties.license: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastActivityDate"]) -> typing.Union[MetaOapg.properties.lastActivityDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union[MetaOapg.properties.license, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, + lastActivityDate: typing.Union[MetaOapg.properties.lastActivityDate, str, datetime, schemas.Unset] = schemas.unset, + license: typing.Union[MetaOapg.properties.license, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserDetailsAdmin': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + email=email, + lastActivityDate=lastActivityDate, + license=license, + groups=groups, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.license_mode import LicenseMode +from flat_api.model.license_sources import LicenseSources +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_public.py b/flat_api/model/user_public.py new file mode 100644 index 0000000..fd9910b --- /dev/null +++ b/flat_api/model/user_public.py @@ -0,0 +1,395 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserPublic( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "guest": "GUEST", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + bio = schemas.StrSchema + registrationDate = schemas.DateTimeSchema + likedScoresCount = schemas.IntSchema + followersCount = schemas.IntSchema + followingCount = schemas.IntSchema + ownedPublicScoresCount = schemas.IntSchema + coverPicture = schemas.StrSchema + profileTheme = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def links() -> typing.Type['UserCommunityProfileLinks']: + return UserCommunityProfileLinks + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "bio": bio, + "registrationDate": registrationDate, + "likedScoresCount": likedScoresCount, + "followersCount": followersCount, + "followingCount": followingCount, + "ownedPublicScoresCount": ownedPublicScoresCount, + "coverPicture": coverPicture, + "profileTheme": profileTheme, + "instruments": instruments, + "links": links, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, + registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, + likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, + profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserPublic': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + bio=bio, + registrationDate=registrationDate, + likedScoresCount=likedScoresCount, + followersCount=followersCount, + followingCount=followingCount, + ownedPublicScoresCount=ownedPublicScoresCount, + coverPicture=coverPicture, + profileTheme=profileTheme, + instruments=instruments, + links=links, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_public.pyi b/flat_api/model/user_public.pyi new file mode 100644 index 0000000..1cf8e47 --- /dev/null +++ b/flat_api/model/user_public.pyi @@ -0,0 +1,388 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserPublic( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + bio = schemas.StrSchema + registrationDate = schemas.DateTimeSchema + likedScoresCount = schemas.IntSchema + followersCount = schemas.IntSchema + followingCount = schemas.IntSchema + ownedPublicScoresCount = schemas.IntSchema + coverPicture = schemas.StrSchema + profileTheme = schemas.StrSchema + + + class instruments( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'instruments': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def links() -> typing.Type['UserCommunityProfileLinks']: + return UserCommunityProfileLinks + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + "bio": bio, + "registrationDate": registrationDate, + "likedScoresCount": likedScoresCount, + "followersCount": followersCount, + "followingCount": followingCount, + "ownedPublicScoresCount": ownedPublicScoresCount, + "coverPicture": coverPicture, + "profileTheme": profileTheme, + "instruments": instruments, + "links": links, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, + registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, + likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, + profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, + instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, + links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserPublic': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + bio=bio, + registrationDate=registrationDate, + likedScoresCount=likedScoresCount, + followersCount=followersCount, + followingCount=followingCount, + ownedPublicScoresCount=ownedPublicScoresCount, + coverPicture=coverPicture, + profileTheme=profileTheme, + instruments=instruments, + links=links, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_public_summary.py b/flat_api/model/user_public_summary.py new file mode 100644 index 0000000..b1e9a5f --- /dev/null +++ b/flat_api/model/user_public_summary.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserPublicSummary( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "guest": "GUEST", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserPublicSummary': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_public_summary.pyi b/flat_api/model/user_public_summary.pyi new file mode 100644 index 0000000..1dd6f60 --- /dev/null +++ b/flat_api/model/user_public_summary.pyi @@ -0,0 +1,262 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserPublicSummary( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + id = schemas.StrSchema + + + class type( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def GUEST(cls): + return cls("guest") + username = schemas.StrSchema + printableName = schemas.StrSchema + firstname = schemas.StrSchema + lastname = schemas.StrSchema + name = schemas.StrSchema + + + class picture( + schemas.StrBase, + schemas.NoneBase, + schemas.Schema, + schemas.NoneStrMixin + ): + + + def __new__( + cls, + *_args: typing.Union[None, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'picture': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + + class badges( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'badges': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + organization = schemas.StrSchema + + @staticmethod + def organizationRole() -> typing.Type['OrganizationRoles']: + return OrganizationRoles + + @staticmethod + def classRole() -> typing.Type['ClassRoles']: + return ClassRoles + htmlUrl = schemas.StrSchema + __annotations__ = { + "id": id, + "type": type, + "username": username, + "printableName": printableName, + "firstname": firstname, + "lastname": lastname, + "name": name, + "picture": picture, + "badges": badges, + "organization": organization, + "organizationRole": organizationRole, + "classRole": classRole, + "htmlUrl": htmlUrl, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, + username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, + printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, + firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, + lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, + badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, + organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, + organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, + classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, + htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserPublicSummary': + return super().__new__( + cls, + *_args, + id=id, + type=type, + username=username, + printableName=printableName, + firstname=firstname, + lastname=lastname, + name=name, + picture=picture, + badges=badges, + organization=organization, + organizationRole=organizationRole, + classRole=classRole, + htmlUrl=htmlUrl, + _configuration=_configuration, + **kwargs, + ) + +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_signin_link.py b/flat_api/model/user_signin_link.py new file mode 100644 index 0000000..f274ad8 --- /dev/null +++ b/flat_api/model/user_signin_link.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserSigninLink( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + url = schemas.StrSchema + expirationDate = schemas.DateTimeSchema + __annotations__ = { + "url": url, + "expirationDate": expirationDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserSigninLink': + return super().__new__( + cls, + *_args, + url=url, + expirationDate=expirationDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_signin_link.pyi b/flat_api/model/user_signin_link.pyi new file mode 100644 index 0000000..f274ad8 --- /dev/null +++ b/flat_api/model/user_signin_link.pyi @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserSigninLink( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + url = schemas.StrSchema + expirationDate = schemas.DateTimeSchema + __annotations__ = { + "url": url, + "expirationDate": expirationDate, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, + expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserSigninLink': + return super().__new__( + cls, + *_args, + url=url, + expirationDate=expirationDate, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_signin_link_creation.py b/flat_api/model/user_signin_link_creation.py new file mode 100644 index 0000000..b63a798 --- /dev/null +++ b/flat_api/model/user_signin_link_creation.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserSigninLinkCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + destinationPath = schemas.StrSchema + __annotations__ = { + "destinationPath": destinationPath, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destinationPath"]) -> MetaOapg.properties.destinationPath: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destinationPath"]) -> typing.Union[MetaOapg.properties.destinationPath, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destinationPath: typing.Union[MetaOapg.properties.destinationPath, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserSigninLinkCreation': + return super().__new__( + cls, + *_args, + destinationPath=destinationPath, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/model/user_signin_link_creation.pyi b/flat_api/model/user_signin_link_creation.pyi new file mode 100644 index 0000000..b63a798 --- /dev/null +++ b/flat_api/model/user_signin_link_creation.pyi @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + + +class UserSigninLinkCreation( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + destinationPath = schemas.StrSchema + __annotations__ = { + "destinationPath": destinationPath, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["destinationPath"]) -> MetaOapg.properties.destinationPath: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["destinationPath"]) -> typing.Union[MetaOapg.properties.destinationPath, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + destinationPath: typing.Union[MetaOapg.properties.destinationPath, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UserSigninLinkCreation': + return super().__new__( + cls, + *_args, + destinationPath=destinationPath, + _configuration=_configuration, + **kwargs, + ) diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 1624c0e..924516b 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -1,123 +1,112 @@ # coding: utf-8 # flake8: noqa -""" - Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from flat_api.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import models into model package -from flat_api.models.api_access_token import ApiAccessToken -from flat_api.models.app_scopes import AppScopes -from flat_api.models.assignment import Assignment -from flat_api.models.assignment_canvas import AssignmentCanvas -from flat_api.models.assignment_copy import AssignmentCopy -from flat_api.models.assignment_creation import AssignmentCreation -from flat_api.models.assignment_creation_google_classroom import AssignmentCreationGoogleClassroom -from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph -from flat_api.models.assignment_lti import AssignmentLti -from flat_api.models.assignment_mfc import AssignmentMfc -from flat_api.models.assignment_submission import AssignmentSubmission -from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment -from flat_api.models.assignment_submission_state import AssignmentSubmissionState -from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments -from flat_api.models.assignment_type import AssignmentType -from flat_api.models.class_attachment_creation import ClassAttachmentCreation -from flat_api.models.class_creation import ClassCreation -from flat_api.models.class_details import ClassDetails -from flat_api.models.class_details_canvas import ClassDetailsCanvas -from flat_api.models.class_details_clever import ClassDetailsClever -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive -from flat_api.models.class_details_issues import ClassDetailsIssues -from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync -from flat_api.models.class_details_lti import ClassDetailsLti -from flat_api.models.class_details_mfc import ClassDetailsMfc -from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph -from flat_api.models.class_roles import ClassRoles -from flat_api.models.class_state import ClassState -from flat_api.models.class_update import ClassUpdate -from flat_api.models.collection import Collection -from flat_api.models.collection_app import CollectionApp -from flat_api.models.collection_capabilities import CollectionCapabilities -from flat_api.models.collection_creation import CollectionCreation -from flat_api.models.collection_modification import CollectionModification -from flat_api.models.collection_privacy import CollectionPrivacy -from flat_api.models.collection_type import CollectionType -from flat_api.models.flat_error_response import FlatErrorResponse -from flat_api.models.flat_locales import FlatLocales -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission -from flat_api.models.group import Group -from flat_api.models.group_details import GroupDetails -from flat_api.models.group_type import GroupType -from flat_api.models.license_mode import LicenseMode -from flat_api.models.license_sources import LicenseSources -from flat_api.models.lms_name import LmsName -from flat_api.models.lti_credentials import LtiCredentials -from flat_api.models.lti_credentials_creation import LtiCredentialsCreation -from flat_api.models.media_attachment import MediaAttachment -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment -from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission -from flat_api.models.organization_invitation import OrganizationInvitation -from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.models.organization_roles import OrganizationRoles -from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink -from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation -from flat_api.models.resource_collaborator import ResourceCollaborator -from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.models.resource_rights import ResourceRights -from flat_api.models.score_comment import ScoreComment -from flat_api.models.score_comment_context import ScoreCommentContext -from flat_api.models.score_comment_creation import ScoreCommentCreation -from flat_api.models.score_comment_moderation import ScoreCommentModeration -from flat_api.models.score_comment_update import ScoreCommentUpdate -from flat_api.models.score_comments_counts import ScoreCommentsCounts -from flat_api.models.score_creation import ScoreCreation -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments -from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_details import ScoreDetails -from flat_api.models.score_fork import ScoreFork -from flat_api.models.score_license import ScoreLicense -from flat_api.models.score_likes_counts import ScoreLikesCounts -from flat_api.models.score_modification import ScoreModification -from flat_api.models.score_plays_counts import ScorePlaysCounts -from flat_api.models.score_privacy import ScorePrivacy -from flat_api.models.score_revision import ScoreRevision -from flat_api.models.score_revision_creation import ScoreRevisionCreation -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics -from flat_api.models.score_source import ScoreSource -from flat_api.models.score_track import ScoreTrack -from flat_api.models.score_track_creation import ScoreTrackCreation -from flat_api.models.score_track_point import ScoreTrackPoint -from flat_api.models.score_track_state import ScoreTrackState -from flat_api.models.score_track_type import ScoreTrackType -from flat_api.models.score_track_update import ScoreTrackUpdate -from flat_api.models.score_views_counts import ScoreViewsCounts -from flat_api.models.task import Task -from flat_api.models.task_export_options import TaskExportOptions -from flat_api.models.task_progress import TaskProgress -from flat_api.models.user_admin_update import UserAdminUpdate -from flat_api.models.user_creation import UserCreation -from flat_api.models.user_details import UserDetails -from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense -from flat_api.models.user_public import UserPublic -from flat_api.models.user_public_summary import UserPublicSummary +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.app_scopes import AppScopes +from flat_api.model.assignment import Assignment +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState +from flat_api.model.assignment_submission_state import AssignmentSubmissionState +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from flat_api.model.class_attachment_creation import ClassAttachmentCreation +from flat_api.model.class_creation import ClassCreation +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.class_roles import ClassRoles +from flat_api.model.class_state import ClassState +from flat_api.model.class_update import ClassUpdate +from flat_api.model.collection import Collection +from flat_api.model.collection_app import CollectionApp +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection_modification import CollectionModification +from flat_api.model.collection_privacy import CollectionPrivacy +from flat_api.model.collection_type import CollectionType +from flat_api.model.edu_library import EduLibrary +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api.model.edu_resource_type import EduResourceType +from flat_api.model.edu_resource_update import EduResourceUpdate +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.edu_skills_focused import EduSkillsFocused +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.flat_locales import FlatLocales +from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +from flat_api.model.group import Group +from flat_api.model.group_details import GroupDetails +from flat_api.model.group_type import GroupType +from flat_api.model.license_mode import LicenseMode +from flat_api.model.license_sources import LicenseSources +from flat_api.model.lms_name import LmsName +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api.model.organization_invitation import OrganizationInvitation +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.score_comment import ScoreComment +from flat_api.model.score_comment_context import ScoreCommentContext +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment_update import ScoreCommentUpdate +from flat_api.model.score_comments_counts import ScoreCommentsCounts +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_details import ScoreDetails +from flat_api.model.score_fork import ScoreFork +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_likes_counts import ScoreLikesCounts +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_plays_counts import ScorePlaysCounts +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_revision_statistics import ScoreRevisionStatistics +from flat_api.model.score_source import ScoreSource +from flat_api.model.score_track import ScoreTrack +from flat_api.model.score_track_creation import ScoreTrackCreation +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +from flat_api.model.score_track_type import ScoreTrackType +from flat_api.model.score_track_update import ScoreTrackUpdate +from flat_api.model.score_views_counts import ScoreViewsCounts +from flat_api.model.task import Task +from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.user_admin_update import UserAdminUpdate +from flat_api.model.user_azure_details import UserAzureDetails +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details import UserDetails +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.user_public import UserPublic +from flat_api.model.user_public_summary import UserPublicSummary +from flat_api.model.user_signin_link import UserSigninLink +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py deleted file mode 100644 index 0f4a8ce..0000000 --- a/flat_api/models/api_access_token.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ApiAccessToken(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'token': 'str', - 'issued_date': 'datetime', - 'expiration_date': 'datetime', - 'scopes': 'list[AppScopes]' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'token': 'token', - 'issued_date': 'issuedDate', - 'expiration_date': 'expirationDate', - 'scopes': 'scopes' - } - - def __init__(self, id=None, name=None, token=None, issued_date=None, expiration_date=None, scopes=None, local_vars_configuration=None): # noqa: E501 - """ApiAccessToken - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._token = None - self._issued_date = None - self._expiration_date = None - self._scopes = None - self.discriminator = None - - if id is not None: - self.id = id - if name is not None: - self.name = name - if token is not None: - self.token = token - if issued_date is not None: - self.issued_date = issued_date - if expiration_date is not None: - self.expiration_date = expiration_date - if scopes is not None: - self.scopes = scopes - - @property - def id(self): - """Gets the id of this ApiAccessToken. # noqa: E501 - - Unique identifier of this private token # noqa: E501 - - :return: The id of this ApiAccessToken. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ApiAccessToken. - - Unique identifier of this private token # noqa: E501 - - :param id: The id of this ApiAccessToken. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this ApiAccessToken. # noqa: E501 - - Name of the personal access token # noqa: E501 - - :return: The name of this ApiAccessToken. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ApiAccessToken. - - Name of the personal access token # noqa: E501 - - :param name: The name of this ApiAccessToken. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def token(self): - """Gets the token of this ApiAccessToken. # noqa: E501 - - The token. This token will only be returned once, then only the first 4 characters will be returned. # noqa: E501 - - :return: The token of this ApiAccessToken. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this ApiAccessToken. - - The token. This token will only be returned once, then only the first 4 characters will be returned. # noqa: E501 - - :param token: The token of this ApiAccessToken. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def issued_date(self): - """Gets the issued_date of this ApiAccessToken. # noqa: E501 - - The date then this token was issued # noqa: E501 - - :return: The issued_date of this ApiAccessToken. # noqa: E501 - :rtype: datetime - """ - return self._issued_date - - @issued_date.setter - def issued_date(self, issued_date): - """Sets the issued_date of this ApiAccessToken. - - The date then this token was issued # noqa: E501 - - :param issued_date: The issued_date of this ApiAccessToken. # noqa: E501 - :type: datetime - """ - - self._issued_date = issued_date - - @property - def expiration_date(self): - """Gets the expiration_date of this ApiAccessToken. # noqa: E501 - - The date then this token will expire # noqa: E501 - - :return: The expiration_date of this ApiAccessToken. # noqa: E501 - :rtype: datetime - """ - return self._expiration_date - - @expiration_date.setter - def expiration_date(self, expiration_date): - """Sets the expiration_date of this ApiAccessToken. - - The date then this token will expire # noqa: E501 - - :param expiration_date: The expiration_date of this ApiAccessToken. # noqa: E501 - :type: datetime - """ - - self._expiration_date = expiration_date - - @property - def scopes(self): - """Gets the scopes of this ApiAccessToken. # noqa: E501 - - The list of scopes associated to the token # noqa: E501 - - :return: The scopes of this ApiAccessToken. # noqa: E501 - :rtype: list[AppScopes] - """ - return self._scopes - - @scopes.setter - def scopes(self, scopes): - """Sets the scopes of this ApiAccessToken. - - The list of scopes associated to the token # noqa: E501 - - :param scopes: The scopes of this ApiAccessToken. # noqa: E501 - :type: list[AppScopes] - """ - - self._scopes = scopes - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiAccessToken): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiAccessToken): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py deleted file mode 100644 index 235bd81..0000000 --- a/flat_api/models/app_scopes.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AppScopes(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ACCOUNT_PUBLIC_PROFILE = "account.public_profile" - ACCOUNT_EMAIL = "account.email" - ACCOUNT_EDUCATION_PROFILE = "account.education_profile" - SCORES_READONLY = "scores.readonly" - SCORES_SOCIAL = "scores.social" - SCORES = "scores" - COLLECTIONS_READONLY = "collections.readonly" - COLLECTIONS_ADD_SCORES = "collections.add_scores" - COLLECTIONS = "collections" - EDU_CLASSES = "edu.classes" - EDU_CLASSES_READONLY = "edu.classes.readonly" - EDU_ASSIGNMENTS = "edu.assignments" - EDU_ASSIGNMENTS_READONLY = "edu.assignments.readonly" - EDU_ADMIN = "edu.admin" - EDU_ADMIN_LTI = "edu.admin.lti" - EDU_ADMIN_LTI_READONLY = "edu.admin.lti.readonly" - EDU_ADMIN_USERS = "edu.admin.users" - EDU_ADMIN_USERS_READONLY = "edu.admin.users.readonly" - TASKS_READONLY = "tasks.readonly" - - allowable_values = [ACCOUNT_PUBLIC_PROFILE, ACCOUNT_EMAIL, ACCOUNT_EDUCATION_PROFILE, SCORES_READONLY, SCORES_SOCIAL, SCORES, COLLECTIONS_READONLY, COLLECTIONS_ADD_SCORES, COLLECTIONS, EDU_CLASSES, EDU_CLASSES_READONLY, EDU_ASSIGNMENTS, EDU_ASSIGNMENTS_READONLY, EDU_ADMIN, EDU_ADMIN_LTI, EDU_ADMIN_LTI_READONLY, EDU_ADMIN_USERS, EDU_ADMIN_USERS_READONLY, TASKS_READONLY] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """AppScopes - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AppScopes): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AppScopes): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py deleted file mode 100644 index 9d35ba3..0000000 --- a/flat_api/models/assignment.py +++ /dev/null @@ -1,617 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class Assignment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'type': 'AssignmentType', - 'title': 'str', - 'classroom': 'str', - 'description': 'str', - 'cover': 'str', - 'cover_file': 'str', - 'attachments': 'list[MediaAttachment]', - 'submissions': 'list[AssignmentSubmission]', - 'creator': 'str', - 'creation_date': 'datetime', - 'scheduled_date': 'datetime', - 'due_date': 'datetime', - 'max_points': 'float', - 'google_classroom': 'GoogleClassroomCoursework', - 'microsoft_graph': 'MicrosoftGraphAssignment', - 'mfc': 'AssignmentMfc', - 'canvas': 'AssignmentCanvas', - 'lti': 'AssignmentLti' - } - - attribute_map = { - 'state': 'state', - 'type': 'type', - 'title': 'title', - 'classroom': 'classroom', - 'description': 'description', - 'cover': 'cover', - 'cover_file': 'coverFile', - 'attachments': 'attachments', - 'submissions': 'submissions', - 'creator': 'creator', - 'creation_date': 'creationDate', - 'scheduled_date': 'scheduledDate', - 'due_date': 'dueDate', - 'max_points': 'maxPoints', - 'google_classroom': 'googleClassroom', - 'microsoft_graph': 'microsoftGraph', - 'mfc': 'mfc', - 'canvas': 'canvas', - 'lti': 'lti' - } - - def __init__(self, state=None, type=None, title=None, classroom=None, description=None, cover=None, cover_file=None, attachments=None, submissions=None, creator=None, creation_date=None, scheduled_date=None, due_date=None, max_points=None, google_classroom=None, microsoft_graph=None, mfc=None, canvas=None, lti=None, local_vars_configuration=None): # noqa: E501 - """Assignment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._state = None - self._type = None - self._title = None - self._classroom = None - self._description = None - self._cover = None - self._cover_file = None - self._attachments = None - self._submissions = None - self._creator = None - self._creation_date = None - self._scheduled_date = None - self._due_date = None - self._max_points = None - self._google_classroom = None - self._microsoft_graph = None - self._mfc = None - self._canvas = None - self._lti = None - self.discriminator = None - - if state is not None: - self.state = state - if type is not None: - self.type = type - if title is not None: - self.title = title - if classroom is not None: - self.classroom = classroom - if description is not None: - self.description = description - if cover is not None: - self.cover = cover - if cover_file is not None: - self.cover_file = cover_file - if attachments is not None: - self.attachments = attachments - if submissions is not None: - self.submissions = submissions - if creator is not None: - self.creator = creator - if creation_date is not None: - self.creation_date = creation_date - if scheduled_date is not None: - self.scheduled_date = scheduled_date - if due_date is not None: - self.due_date = due_date - if max_points is not None: - self.max_points = max_points - if google_classroom is not None: - self.google_classroom = google_classroom - if microsoft_graph is not None: - self.microsoft_graph = microsoft_graph - if mfc is not None: - self.mfc = mfc - if canvas is not None: - self.canvas = canvas - if lti is not None: - self.lti = lti - - @property - def state(self): - """Gets the state of this Assignment. # noqa: E501 - - State of the assignment # noqa: E501 - - :return: The state of this Assignment. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Assignment. - - State of the assignment # noqa: E501 - - :param state: The state of this Assignment. # noqa: E501 - :type: str - """ - allowed_values = ["draft", "active", "archived"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def type(self): - """Gets the type of this Assignment. # noqa: E501 - - - :return: The type of this Assignment. # noqa: E501 - :rtype: AssignmentType - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Assignment. - - - :param type: The type of this Assignment. # noqa: E501 - :type: AssignmentType - """ - - self._type = type - - @property - def title(self): - """Gets the title of this Assignment. # noqa: E501 - - Title of the assignment # noqa: E501 - - :return: The title of this Assignment. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this Assignment. - - Title of the assignment # noqa: E501 - - :param title: The title of this Assignment. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def classroom(self): - """Gets the classroom of this Assignment. # noqa: E501 - - The unique identifier of the class where this assignment was posted # noqa: E501 - - :return: The classroom of this Assignment. # noqa: E501 - :rtype: str - """ - return self._classroom - - @classroom.setter - def classroom(self, classroom): - """Sets the classroom of this Assignment. - - The unique identifier of the class where this assignment was posted # noqa: E501 - - :param classroom: The classroom of this Assignment. # noqa: E501 - :type: str - """ - - self._classroom = classroom - - @property - def description(self): - """Gets the description of this Assignment. # noqa: E501 - - Description and content of the assignment # noqa: E501 - - :return: The description of this Assignment. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Assignment. - - Description and content of the assignment # noqa: E501 - - :param description: The description of this Assignment. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def cover(self): - """Gets the cover of this Assignment. # noqa: E501 - - The URL of the cover to display # noqa: E501 - - :return: The cover of this Assignment. # noqa: E501 - :rtype: str - """ - return self._cover - - @cover.setter - def cover(self, cover): - """Sets the cover of this Assignment. - - The URL of the cover to display # noqa: E501 - - :param cover: The cover of this Assignment. # noqa: E501 - :type: str - """ - - self._cover = cover - - @property - def cover_file(self): - """Gets the cover_file of this Assignment. # noqa: E501 - - The id of the cover to display # noqa: E501 - - :return: The cover_file of this Assignment. # noqa: E501 - :rtype: str - """ - return self._cover_file - - @cover_file.setter - def cover_file(self, cover_file): - """Sets the cover_file of this Assignment. - - The id of the cover to display # noqa: E501 - - :param cover_file: The cover_file of this Assignment. # noqa: E501 - :type: str - """ - - self._cover_file = cover_file - - @property - def attachments(self): - """Gets the attachments of this Assignment. # noqa: E501 - - - :return: The attachments of this Assignment. # noqa: E501 - :rtype: list[MediaAttachment] - """ - return self._attachments - - @attachments.setter - def attachments(self, attachments): - """Sets the attachments of this Assignment. - - - :param attachments: The attachments of this Assignment. # noqa: E501 - :type: list[MediaAttachment] - """ - - self._attachments = attachments - - @property - def submissions(self): - """Gets the submissions of this Assignment. # noqa: E501 - - - :return: The submissions of this Assignment. # noqa: E501 - :rtype: list[AssignmentSubmission] - """ - return self._submissions - - @submissions.setter - def submissions(self, submissions): - """Sets the submissions of this Assignment. - - - :param submissions: The submissions of this Assignment. # noqa: E501 - :type: list[AssignmentSubmission] - """ - - self._submissions = submissions - - @property - def creator(self): - """Gets the creator of this Assignment. # noqa: E501 - - The User unique identifier of the creator of this assignment # noqa: E501 - - :return: The creator of this Assignment. # noqa: E501 - :rtype: str - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Assignment. - - The User unique identifier of the creator of this assignment # noqa: E501 - - :param creator: The creator of this Assignment. # noqa: E501 - :type: str - """ - - self._creator = creator - - @property - def creation_date(self): - """Gets the creation_date of this Assignment. # noqa: E501 - - The creation date of this assignment # noqa: E501 - - :return: The creation_date of this Assignment. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this Assignment. - - The creation date of this assignment # noqa: E501 - - :param creation_date: The creation_date of this Assignment. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def scheduled_date(self): - """Gets the scheduled_date of this Assignment. # noqa: E501 - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. # noqa: E501 - - :return: The scheduled_date of this Assignment. # noqa: E501 - :rtype: datetime - """ - return self._scheduled_date - - @scheduled_date.setter - def scheduled_date(self, scheduled_date): - """Sets the scheduled_date of this Assignment. - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. # noqa: E501 - - :param scheduled_date: The scheduled_date of this Assignment. # noqa: E501 - :type: datetime - """ - - self._scheduled_date = scheduled_date - - @property - def due_date(self): - """Gets the due_date of this Assignment. # noqa: E501 - - The due date of this assignment, late submissions will be marked as paste due. # noqa: E501 - - :return: The due_date of this Assignment. # noqa: E501 - :rtype: datetime - """ - return self._due_date - - @due_date.setter - def due_date(self, due_date): - """Sets the due_date of this Assignment. - - The due date of this assignment, late submissions will be marked as paste due. # noqa: E501 - - :param due_date: The due_date of this Assignment. # noqa: E501 - :type: datetime - """ - - self._due_date = due_date - - @property - def max_points(self): - """Gets the max_points of this Assignment. # noqa: E501 - - If set, the grading will be enabled for the assignement # noqa: E501 - - :return: The max_points of this Assignment. # noqa: E501 - :rtype: float - """ - return self._max_points - - @max_points.setter - def max_points(self, max_points): - """Sets the max_points of this Assignment. - - If set, the grading will be enabled for the assignement # noqa: E501 - - :param max_points: The max_points of this Assignment. # noqa: E501 - :type: float - """ - - self._max_points = max_points - - @property - def google_classroom(self): - """Gets the google_classroom of this Assignment. # noqa: E501 - - - :return: The google_classroom of this Assignment. # noqa: E501 - :rtype: GoogleClassroomCoursework - """ - return self._google_classroom - - @google_classroom.setter - def google_classroom(self, google_classroom): - """Sets the google_classroom of this Assignment. - - - :param google_classroom: The google_classroom of this Assignment. # noqa: E501 - :type: GoogleClassroomCoursework - """ - - self._google_classroom = google_classroom - - @property - def microsoft_graph(self): - """Gets the microsoft_graph of this Assignment. # noqa: E501 - - - :return: The microsoft_graph of this Assignment. # noqa: E501 - :rtype: MicrosoftGraphAssignment - """ - return self._microsoft_graph - - @microsoft_graph.setter - def microsoft_graph(self, microsoft_graph): - """Sets the microsoft_graph of this Assignment. - - - :param microsoft_graph: The microsoft_graph of this Assignment. # noqa: E501 - :type: MicrosoftGraphAssignment - """ - - self._microsoft_graph = microsoft_graph - - @property - def mfc(self): - """Gets the mfc of this Assignment. # noqa: E501 - - - :return: The mfc of this Assignment. # noqa: E501 - :rtype: AssignmentMfc - """ - return self._mfc - - @mfc.setter - def mfc(self, mfc): - """Sets the mfc of this Assignment. - - - :param mfc: The mfc of this Assignment. # noqa: E501 - :type: AssignmentMfc - """ - - self._mfc = mfc - - @property - def canvas(self): - """Gets the canvas of this Assignment. # noqa: E501 - - - :return: The canvas of this Assignment. # noqa: E501 - :rtype: AssignmentCanvas - """ - return self._canvas - - @canvas.setter - def canvas(self, canvas): - """Sets the canvas of this Assignment. - - - :param canvas: The canvas of this Assignment. # noqa: E501 - :type: AssignmentCanvas - """ - - self._canvas = canvas - - @property - def lti(self): - """Gets the lti of this Assignment. # noqa: E501 - - - :return: The lti of this Assignment. # noqa: E501 - :rtype: AssignmentLti - """ - return self._lti - - @lti.setter - def lti(self, lti): - """Sets the lti of this Assignment. - - - :param lti: The lti of this Assignment. # noqa: E501 - :type: AssignmentLti - """ - - self._lti = lti - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Assignment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Assignment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_canvas.py b/flat_api/models/assignment_canvas.py deleted file mode 100644 index 51367da..0000000 --- a/flat_api/models/assignment_canvas.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentCanvas(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """AssignmentCanvas - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this AssignmentCanvas. # noqa: E501 - - Unique identifier of the course on Canvas assignment # noqa: E501 - - :return: The id of this AssignmentCanvas. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssignmentCanvas. - - Unique identifier of the course on Canvas assignment # noqa: E501 - - :param id: The id of this AssignmentCanvas. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def alternate_link(self): - """Gets the alternate_link of this AssignmentCanvas. # noqa: E501 - - Link to Canvas assignment # noqa: E501 - - :return: The alternate_link of this AssignmentCanvas. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this AssignmentCanvas. - - Link to Canvas assignment # noqa: E501 - - :param alternate_link: The alternate_link of this AssignmentCanvas. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentCanvas): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentCanvas): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py deleted file mode 100644 index 9b9af5b..0000000 --- a/flat_api/models/assignment_copy.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentCopy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'classroom': 'str', - 'assignment': 'str', - 'scheduled_date': 'datetime' - } - - attribute_map = { - 'classroom': 'classroom', - 'assignment': 'assignment', - 'scheduled_date': 'scheduledDate' - } - - def __init__(self, classroom=None, assignment=None, scheduled_date=None, local_vars_configuration=None): # noqa: E501 - """AssignmentCopy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._classroom = None - self._assignment = None - self._scheduled_date = None - self.discriminator = None - - if classroom is not None: - self.classroom = classroom - if assignment is not None: - self.assignment = assignment - if scheduled_date is not None: - self.scheduled_date = scheduled_date - - @property - def classroom(self): - """Gets the classroom of this AssignmentCopy. # noqa: E501 - - The destination classroom where the assignment will be copied # noqa: E501 - - :return: The classroom of this AssignmentCopy. # noqa: E501 - :rtype: str - """ - return self._classroom - - @classroom.setter - def classroom(self, classroom): - """Sets the classroom of this AssignmentCopy. - - The destination classroom where the assignment will be copied # noqa: E501 - - :param classroom: The classroom of this AssignmentCopy. # noqa: E501 - :type: str - """ - - self._classroom = classroom - - @property - def assignment(self): - """Gets the assignment of this AssignmentCopy. # noqa: E501 - - An optional destination assignment where the original assignement will be copied. Must be a draft. # noqa: E501 - - :return: The assignment of this AssignmentCopy. # noqa: E501 - :rtype: str - """ - return self._assignment - - @assignment.setter - def assignment(self, assignment): - """Sets the assignment of this AssignmentCopy. - - An optional destination assignment where the original assignement will be copied. Must be a draft. # noqa: E501 - - :param assignment: The assignment of this AssignmentCopy. # noqa: E501 - :type: str - """ - - self._assignment = assignment - - @property - def scheduled_date(self): - """Gets the scheduled_date of this AssignmentCopy. # noqa: E501 - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. # noqa: E501 - - :return: The scheduled_date of this AssignmentCopy. # noqa: E501 - :rtype: datetime - """ - return self._scheduled_date - - @scheduled_date.setter - def scheduled_date(self, scheduled_date): - """Sets the scheduled_date of this AssignmentCopy. - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. # noqa: E501 - - :param scheduled_date: The scheduled_date of this AssignmentCopy. # noqa: E501 - :type: datetime - """ - - self._scheduled_date = scheduled_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentCopy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentCopy): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation.py b/flat_api/models/assignment_creation.py deleted file mode 100644 index 4b360ad..0000000 --- a/flat_api/models/assignment_creation.py +++ /dev/null @@ -1,574 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'AssignmentType', - 'state': 'str', - 'title': 'str', - 'description': 'str', - 'attachments': 'list[ClassAttachmentCreation]', - 'due_date': 'datetime', - 'scheduled_date': 'datetime', - 'nb_playback_authorized': 'float', - 'toolset': 'str', - 'cover_file': 'str', - 'cover': 'str', - 'max_points': 'float', - 'google_classroom': 'AssignmentCreationGoogleClassroom', - 'microsoft_graph': 'AssignmentCreationMicrosoftGraph', - 'assignee_mode': 'str', - 'assigned_students': 'list[str]', - 'shuffle_exercises': 'bool' - } - - attribute_map = { - 'type': 'type', - 'state': 'state', - 'title': 'title', - 'description': 'description', - 'attachments': 'attachments', - 'due_date': 'dueDate', - 'scheduled_date': 'scheduledDate', - 'nb_playback_authorized': 'nbPlaybackAuthorized', - 'toolset': 'toolset', - 'cover_file': 'coverFile', - 'cover': 'cover', - 'max_points': 'maxPoints', - 'google_classroom': 'googleClassroom', - 'microsoft_graph': 'microsoftGraph', - 'assignee_mode': 'assigneeMode', - 'assigned_students': 'assignedStudents', - 'shuffle_exercises': 'shuffleExercises' - } - - def __init__(self, type=None, state=None, title=None, description=None, attachments=None, due_date=None, scheduled_date=None, nb_playback_authorized=None, toolset=None, cover_file=None, cover=None, max_points=None, google_classroom=None, microsoft_graph=None, assignee_mode=None, assigned_students=None, shuffle_exercises=None, local_vars_configuration=None): # noqa: E501 - """AssignmentCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._state = None - self._title = None - self._description = None - self._attachments = None - self._due_date = None - self._scheduled_date = None - self._nb_playback_authorized = None - self._toolset = None - self._cover_file = None - self._cover = None - self._max_points = None - self._google_classroom = None - self._microsoft_graph = None - self._assignee_mode = None - self._assigned_students = None - self._shuffle_exercises = None - self.discriminator = None - - if type is not None: - self.type = type - if state is not None: - self.state = state - if title is not None: - self.title = title - if description is not None: - self.description = description - if attachments is not None: - self.attachments = attachments - self.due_date = due_date - self.scheduled_date = scheduled_date - self.nb_playback_authorized = nb_playback_authorized - self.toolset = toolset - self.cover_file = cover_file - self.cover = cover - self.max_points = max_points - if google_classroom is not None: - self.google_classroom = google_classroom - if microsoft_graph is not None: - self.microsoft_graph = microsoft_graph - if assignee_mode is not None: - self.assignee_mode = assignee_mode - if assigned_students is not None: - self.assigned_students = assigned_students - if shuffle_exercises is not None: - self.shuffle_exercises = shuffle_exercises - - @property - def type(self): - """Gets the type of this AssignmentCreation. # noqa: E501 - - - :return: The type of this AssignmentCreation. # noqa: E501 - :rtype: AssignmentType - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this AssignmentCreation. - - - :param type: The type of this AssignmentCreation. # noqa: E501 - :type: AssignmentType - """ - - self._type = type - - @property - def state(self): - """Gets the state of this AssignmentCreation. # noqa: E501 - - State of the assignment # noqa: E501 - - :return: The state of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this AssignmentCreation. - - State of the assignment # noqa: E501 - - :param state: The state of this AssignmentCreation. # noqa: E501 - :type: str - """ - allowed_values = ["draft", "active"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def title(self): - """Gets the title of this AssignmentCreation. # noqa: E501 - - Title of the assignment # noqa: E501 - - :return: The title of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this AssignmentCreation. - - Title of the assignment # noqa: E501 - - :param title: The title of this AssignmentCreation. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def description(self): - """Gets the description of this AssignmentCreation. # noqa: E501 - - Description and content of the assignment # noqa: E501 - - :return: The description of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AssignmentCreation. - - Description and content of the assignment # noqa: E501 - - :param description: The description of this AssignmentCreation. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def attachments(self): - """Gets the attachments of this AssignmentCreation. # noqa: E501 - - - :return: The attachments of this AssignmentCreation. # noqa: E501 - :rtype: list[ClassAttachmentCreation] - """ - return self._attachments - - @attachments.setter - def attachments(self, attachments): - """Sets the attachments of this AssignmentCreation. - - - :param attachments: The attachments of this AssignmentCreation. # noqa: E501 - :type: list[ClassAttachmentCreation] - """ - - self._attachments = attachments - - @property - def due_date(self): - """Gets the due_date of this AssignmentCreation. # noqa: E501 - - The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. # noqa: E501 - - :return: The due_date of this AssignmentCreation. # noqa: E501 - :rtype: datetime - """ - return self._due_date - - @due_date.setter - def due_date(self, due_date): - """Sets the due_date of this AssignmentCreation. - - The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. # noqa: E501 - - :param due_date: The due_date of this AssignmentCreation. # noqa: E501 - :type: datetime - """ - - self._due_date = due_date - - @property - def scheduled_date(self): - """Gets the scheduled_date of this AssignmentCreation. # noqa: E501 - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. # noqa: E501 - - :return: The scheduled_date of this AssignmentCreation. # noqa: E501 - :rtype: datetime - """ - return self._scheduled_date - - @scheduled_date.setter - def scheduled_date(self, scheduled_date): - """Sets the scheduled_date of this AssignmentCreation. - - The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. # noqa: E501 - - :param scheduled_date: The scheduled_date of this AssignmentCreation. # noqa: E501 - :type: datetime - """ - - self._scheduled_date = scheduled_date - - @property - def nb_playback_authorized(self): - """Gets the nb_playback_authorized of this AssignmentCreation. # noqa: E501 - - The number of playback authorized on the scores of the assignment. # noqa: E501 - - :return: The nb_playback_authorized of this AssignmentCreation. # noqa: E501 - :rtype: float - """ - return self._nb_playback_authorized - - @nb_playback_authorized.setter - def nb_playback_authorized(self, nb_playback_authorized): - """Sets the nb_playback_authorized of this AssignmentCreation. - - The number of playback authorized on the scores of the assignment. # noqa: E501 - - :param nb_playback_authorized: The nb_playback_authorized of this AssignmentCreation. # noqa: E501 - :type: float - """ - - self._nb_playback_authorized = nb_playback_authorized - - @property - def toolset(self): - """Gets the toolset of this AssignmentCreation. # noqa: E501 - - The id of the associated toolset # noqa: E501 - - :return: The toolset of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._toolset - - @toolset.setter - def toolset(self, toolset): - """Sets the toolset of this AssignmentCreation. - - The id of the associated toolset # noqa: E501 - - :param toolset: The toolset of this AssignmentCreation. # noqa: E501 - :type: str - """ - - self._toolset = toolset - - @property - def cover_file(self): - """Gets the cover_file of this AssignmentCreation. # noqa: E501 - - The id of the cover to display # noqa: E501 - - :return: The cover_file of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._cover_file - - @cover_file.setter - def cover_file(self, cover_file): - """Sets the cover_file of this AssignmentCreation. - - The id of the cover to display # noqa: E501 - - :param cover_file: The cover_file of this AssignmentCreation. # noqa: E501 - :type: str - """ - - self._cover_file = cover_file - - @property - def cover(self): - """Gets the cover of this AssignmentCreation. # noqa: E501 - - The URL of the cover to display # noqa: E501 - - :return: The cover of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._cover - - @cover.setter - def cover(self, cover): - """Sets the cover of this AssignmentCreation. - - The URL of the cover to display # noqa: E501 - - :param cover: The cover of this AssignmentCreation. # noqa: E501 - :type: str - """ - - self._cover = cover - - @property - def max_points(self): - """Gets the max_points of this AssignmentCreation. # noqa: E501 - - If set, the grading will be enabled for the assignement with this value as the maximum of points # noqa: E501 - - :return: The max_points of this AssignmentCreation. # noqa: E501 - :rtype: float - """ - return self._max_points - - @max_points.setter - def max_points(self, max_points): - """Sets the max_points of this AssignmentCreation. - - If set, the grading will be enabled for the assignement with this value as the maximum of points # noqa: E501 - - :param max_points: The max_points of this AssignmentCreation. # noqa: E501 - :type: float - """ - if (self.local_vars_configuration.client_side_validation and - max_points is not None and max_points > 100): # noqa: E501 - raise ValueError("Invalid value for `max_points`, must be a value less than or equal to `100`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - max_points is not None and max_points < 0): # noqa: E501 - raise ValueError("Invalid value for `max_points`, must be a value greater than or equal to `0`") # noqa: E501 - - self._max_points = max_points - - @property - def google_classroom(self): - """Gets the google_classroom of this AssignmentCreation. # noqa: E501 - - - :return: The google_classroom of this AssignmentCreation. # noqa: E501 - :rtype: AssignmentCreationGoogleClassroom - """ - return self._google_classroom - - @google_classroom.setter - def google_classroom(self, google_classroom): - """Sets the google_classroom of this AssignmentCreation. - - - :param google_classroom: The google_classroom of this AssignmentCreation. # noqa: E501 - :type: AssignmentCreationGoogleClassroom - """ - - self._google_classroom = google_classroom - - @property - def microsoft_graph(self): - """Gets the microsoft_graph of this AssignmentCreation. # noqa: E501 - - - :return: The microsoft_graph of this AssignmentCreation. # noqa: E501 - :rtype: AssignmentCreationMicrosoftGraph - """ - return self._microsoft_graph - - @microsoft_graph.setter - def microsoft_graph(self, microsoft_graph): - """Sets the microsoft_graph of this AssignmentCreation. - - - :param microsoft_graph: The microsoft_graph of this AssignmentCreation. # noqa: E501 - :type: AssignmentCreationMicrosoftGraph - """ - - self._microsoft_graph = microsoft_graph - - @property - def assignee_mode(self): - """Gets the assignee_mode of this AssignmentCreation. # noqa: E501 - - Possible modes of assigning assignments # noqa: E501 - - :return: The assignee_mode of this AssignmentCreation. # noqa: E501 - :rtype: str - """ - return self._assignee_mode - - @assignee_mode.setter - def assignee_mode(self, assignee_mode): - """Sets the assignee_mode of this AssignmentCreation. - - Possible modes of assigning assignments # noqa: E501 - - :param assignee_mode: The assignee_mode of this AssignmentCreation. # noqa: E501 - :type: str - """ - allowed_values = ["everyone", "selected"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and assignee_mode not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `assignee_mode` ({0}), must be one of {1}" # noqa: E501 - .format(assignee_mode, allowed_values) - ) - - self._assignee_mode = assignee_mode - - @property - def assigned_students(self): - """Gets the assigned_students of this AssignmentCreation. # noqa: E501 - - Identifiers for the students that have access to the assignment # noqa: E501 - - :return: The assigned_students of this AssignmentCreation. # noqa: E501 - :rtype: list[str] - """ - return self._assigned_students - - @assigned_students.setter - def assigned_students(self, assigned_students): - """Sets the assigned_students of this AssignmentCreation. - - Identifiers for the students that have access to the assignment # noqa: E501 - - :param assigned_students: The assigned_students of this AssignmentCreation. # noqa: E501 - :type: list[str] - """ - - self._assigned_students = assigned_students - - @property - def shuffle_exercises(self): - """Gets the shuffle_exercises of this AssignmentCreation. # noqa: E501 - - Mixing exercises for each students # noqa: E501 - - :return: The shuffle_exercises of this AssignmentCreation. # noqa: E501 - :rtype: bool - """ - return self._shuffle_exercises - - @shuffle_exercises.setter - def shuffle_exercises(self, shuffle_exercises): - """Sets the shuffle_exercises of this AssignmentCreation. - - Mixing exercises for each students # noqa: E501 - - :param shuffle_exercises: The shuffle_exercises of this AssignmentCreation. # noqa: E501 - :type: bool - """ - - self._shuffle_exercises = shuffle_exercises - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation_google_classroom.py b/flat_api/models/assignment_creation_google_classroom.py deleted file mode 100644 index 8365b39..0000000 --- a/flat_api/models/assignment_creation_google_classroom.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentCreationGoogleClassroom(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'topic_id': 'str' - } - - attribute_map = { - 'topic_id': 'topicId' - } - - def __init__(self, topic_id=None, local_vars_configuration=None): # noqa: E501 - """AssignmentCreationGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._topic_id = None - self.discriminator = None - - self.topic_id = topic_id - - @property - def topic_id(self): - """Gets the topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 - - Identifier of the topic where the assignment is created # noqa: E501 - - :return: The topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 - :rtype: str - """ - return self._topic_id - - @topic_id.setter - def topic_id(self, topic_id): - """Sets the topic_id of this AssignmentCreationGoogleClassroom. - - Identifier of the topic where the assignment is created # noqa: E501 - - :param topic_id: The topic_id of this AssignmentCreationGoogleClassroom. # noqa: E501 - :type: str - """ - - self._topic_id = topic_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentCreationGoogleClassroom): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentCreationGoogleClassroom): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_creation_microsoft_graph.py b/flat_api/models/assignment_creation_microsoft_graph.py deleted file mode 100644 index bb274e7..0000000 --- a/flat_api/models/assignment_creation_microsoft_graph.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentCreationMicrosoftGraph(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'categories': 'list[str]' - } - - attribute_map = { - 'categories': 'categories' - } - - def __init__(self, categories=None, local_vars_configuration=None): # noqa: E501 - """AssignmentCreationMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._categories = None - self.discriminator = None - - self.categories = categories - - @property - def categories(self): - """Gets the categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 - - List of categories this assignment belongs to # noqa: E501 - - :return: The categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories): - """Sets the categories of this AssignmentCreationMicrosoftGraph. - - List of categories this assignment belongs to # noqa: E501 - - :param categories: The categories of this AssignmentCreationMicrosoftGraph. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentCreationMicrosoftGraph): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentCreationMicrosoftGraph): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_lti.py b/flat_api/models/assignment_lti.py deleted file mode 100644 index 1cd59e8..0000000 --- a/flat_api/models/assignment_lti.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentLti(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """AssignmentLti - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this AssignmentLti. # noqa: E501 - - Resource ID in the LMS # noqa: E501 - - :return: The id of this AssignmentLti. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssignmentLti. - - Resource ID in the LMS # noqa: E501 - - :param id: The id of this AssignmentLti. # noqa: E501 - :type: str - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentLti): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentLti): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_mfc.py b/flat_api/models/assignment_mfc.py deleted file mode 100644 index 9ac0948..0000000 --- a/flat_api/models/assignment_mfc.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentMfc(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """AssignmentMfc - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this AssignmentMfc. # noqa: E501 - - Unique identifier of the course on MusicFirst Task # noqa: E501 - - :return: The id of this AssignmentMfc. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssignmentMfc. - - Unique identifier of the course on MusicFirst Task # noqa: E501 - - :param id: The id of this AssignmentMfc. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def alternate_link(self): - """Gets the alternate_link of this AssignmentMfc. # noqa: E501 - - Link to MusicFirst Classroom task # noqa: E501 - - :return: The alternate_link of this AssignmentMfc. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this AssignmentMfc. - - Link to MusicFirst Classroom task # noqa: E501 - - :param alternate_link: The alternate_link of this AssignmentMfc. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentMfc): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentMfc): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py deleted file mode 100644 index 752b626..0000000 --- a/flat_api/models/assignment_submission.py +++ /dev/null @@ -1,532 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'AssignmentSubmissionState', - 'classroom': 'str', - 'assignment': 'str', - 'creator': 'str', - 'creation_date': 'str', - 'attachments': 'list[MediaAttachment]', - 'submission_date': 'str', - 'return_date': 'str', - 'return_creator': 'str', - 'grade': 'float', - 'draft_grade': 'float', - 'max_points': 'float', - 'exercises_ids': 'list[str]', - 'google_classroom': 'GoogleClassroomSubmission', - 'microsoft_graph': 'MicrosoftGraphSubmission' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'classroom': 'classroom', - 'assignment': 'assignment', - 'creator': 'creator', - 'creation_date': 'creationDate', - 'attachments': 'attachments', - 'submission_date': 'submissionDate', - 'return_date': 'returnDate', - 'return_creator': 'returnCreator', - 'grade': 'grade', - 'draft_grade': 'draftGrade', - 'max_points': 'maxPoints', - 'exercises_ids': 'exercisesIds', - 'google_classroom': 'googleClassroom', - 'microsoft_graph': 'microsoftGraph' - } - - def __init__(self, id=None, state=None, classroom=None, assignment=None, creator=None, creation_date=None, attachments=None, submission_date=None, return_date=None, return_creator=None, grade=None, draft_grade=None, max_points=None, exercises_ids=None, google_classroom=None, microsoft_graph=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._classroom = None - self._assignment = None - self._creator = None - self._creation_date = None - self._attachments = None - self._submission_date = None - self._return_date = None - self._return_creator = None - self._grade = None - self._draft_grade = None - self._max_points = None - self._exercises_ids = None - self._google_classroom = None - self._microsoft_graph = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if classroom is not None: - self.classroom = classroom - if assignment is not None: - self.assignment = assignment - if creator is not None: - self.creator = creator - if creation_date is not None: - self.creation_date = creation_date - if attachments is not None: - self.attachments = attachments - if submission_date is not None: - self.submission_date = submission_date - if return_date is not None: - self.return_date = return_date - if return_creator is not None: - self.return_creator = return_creator - self.grade = grade - self.draft_grade = draft_grade - if max_points is not None: - self.max_points = max_points - self.exercises_ids = exercises_ids - if google_classroom is not None: - self.google_classroom = google_classroom - if microsoft_graph is not None: - self.microsoft_graph = microsoft_graph - - @property - def id(self): - """Gets the id of this AssignmentSubmission. # noqa: E501 - - Unique identifier of the submission # noqa: E501 - - :return: The id of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssignmentSubmission. - - Unique identifier of the submission # noqa: E501 - - :param id: The id of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this AssignmentSubmission. # noqa: E501 - - - :return: The state of this AssignmentSubmission. # noqa: E501 - :rtype: AssignmentSubmissionState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this AssignmentSubmission. - - - :param state: The state of this AssignmentSubmission. # noqa: E501 - :type: AssignmentSubmissionState - """ - - self._state = state - - @property - def classroom(self): - """Gets the classroom of this AssignmentSubmission. # noqa: E501 - - Unique identifier of the classroom where the assignment was posted # noqa: E501 - - :return: The classroom of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._classroom - - @classroom.setter - def classroom(self, classroom): - """Sets the classroom of this AssignmentSubmission. - - Unique identifier of the classroom where the assignment was posted # noqa: E501 - - :param classroom: The classroom of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._classroom = classroom - - @property - def assignment(self): - """Gets the assignment of this AssignmentSubmission. # noqa: E501 - - Unique identifier of the assignment # noqa: E501 - - :return: The assignment of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._assignment - - @assignment.setter - def assignment(self, assignment): - """Sets the assignment of this AssignmentSubmission. - - Unique identifier of the assignment # noqa: E501 - - :param assignment: The assignment of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._assignment = assignment - - @property - def creator(self): - """Gets the creator of this AssignmentSubmission. # noqa: E501 - - The User identifier of the student who created the submission # noqa: E501 - - :return: The creator of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this AssignmentSubmission. - - The User identifier of the student who created the submission # noqa: E501 - - :param creator: The creator of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._creator = creator - - @property - def creation_date(self): - """Gets the creation_date of this AssignmentSubmission. # noqa: E501 - - The date when the submission was created # noqa: E501 - - :return: The creation_date of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this AssignmentSubmission. - - The date when the submission was created # noqa: E501 - - :param creation_date: The creation_date of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._creation_date = creation_date - - @property - def attachments(self): - """Gets the attachments of this AssignmentSubmission. # noqa: E501 - - - :return: The attachments of this AssignmentSubmission. # noqa: E501 - :rtype: list[MediaAttachment] - """ - return self._attachments - - @attachments.setter - def attachments(self, attachments): - """Sets the attachments of this AssignmentSubmission. - - - :param attachments: The attachments of this AssignmentSubmission. # noqa: E501 - :type: list[MediaAttachment] - """ - - self._attachments = attachments - - @property - def submission_date(self): - """Gets the submission_date of this AssignmentSubmission. # noqa: E501 - - The date when the student submitted his work # noqa: E501 - - :return: The submission_date of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._submission_date - - @submission_date.setter - def submission_date(self, submission_date): - """Sets the submission_date of this AssignmentSubmission. - - The date when the student submitted his work # noqa: E501 - - :param submission_date: The submission_date of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._submission_date = submission_date - - @property - def return_date(self): - """Gets the return_date of this AssignmentSubmission. # noqa: E501 - - The date when the teacher returned the work # noqa: E501 - - :return: The return_date of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._return_date - - @return_date.setter - def return_date(self, return_date): - """Sets the return_date of this AssignmentSubmission. - - The date when the teacher returned the work # noqa: E501 - - :param return_date: The return_date of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._return_date = return_date - - @property - def return_creator(self): - """Gets the return_creator of this AssignmentSubmission. # noqa: E501 - - The User unique identifier of the teacher who returned the submission # noqa: E501 - - :return: The return_creator of this AssignmentSubmission. # noqa: E501 - :rtype: str - """ - return self._return_creator - - @return_creator.setter - def return_creator(self, return_creator): - """Sets the return_creator of this AssignmentSubmission. - - The User unique identifier of the teacher who returned the submission # noqa: E501 - - :param return_creator: The return_creator of this AssignmentSubmission. # noqa: E501 - :type: str - """ - - self._return_creator = return_creator - - @property - def grade(self): - """Gets the grade of this AssignmentSubmission. # noqa: E501 - - Optional grade. If unset, no grade was set. # noqa: E501 - - :return: The grade of this AssignmentSubmission. # noqa: E501 - :rtype: float - """ - return self._grade - - @grade.setter - def grade(self, grade): - """Sets the grade of this AssignmentSubmission. - - Optional grade. If unset, no grade was set. # noqa: E501 - - :param grade: The grade of this AssignmentSubmission. # noqa: E501 - :type: float - """ - - self._grade = grade - - @property - def draft_grade(self): - """Gets the draft_grade of this AssignmentSubmission. # noqa: E501 - - Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 - - :return: The draft_grade of this AssignmentSubmission. # noqa: E501 - :rtype: float - """ - return self._draft_grade - - @draft_grade.setter - def draft_grade(self, draft_grade): - """Sets the draft_grade of this AssignmentSubmission. - - Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 - - :param draft_grade: The draft_grade of this AssignmentSubmission. # noqa: E501 - :type: float - """ - - self._draft_grade = draft_grade - - @property - def max_points(self): - """Gets the max_points of this AssignmentSubmission. # noqa: E501 - - Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. # noqa: E501 - - :return: The max_points of this AssignmentSubmission. # noqa: E501 - :rtype: float - """ - return self._max_points - - @max_points.setter - def max_points(self, max_points): - """Sets the max_points of this AssignmentSubmission. - - Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. # noqa: E501 - - :param max_points: The max_points of this AssignmentSubmission. # noqa: E501 - :type: float - """ - - self._max_points = max_points - - @property - def exercises_ids(self): - """Gets the exercises_ids of this AssignmentSubmission. # noqa: E501 - - The ids of exercises when they need to be in a specific order # noqa: E501 - - :return: The exercises_ids of this AssignmentSubmission. # noqa: E501 - :rtype: list[str] - """ - return self._exercises_ids - - @exercises_ids.setter - def exercises_ids(self, exercises_ids): - """Sets the exercises_ids of this AssignmentSubmission. - - The ids of exercises when they need to be in a specific order # noqa: E501 - - :param exercises_ids: The exercises_ids of this AssignmentSubmission. # noqa: E501 - :type: list[str] - """ - - self._exercises_ids = exercises_ids - - @property - def google_classroom(self): - """Gets the google_classroom of this AssignmentSubmission. # noqa: E501 - - - :return: The google_classroom of this AssignmentSubmission. # noqa: E501 - :rtype: GoogleClassroomSubmission - """ - return self._google_classroom - - @google_classroom.setter - def google_classroom(self, google_classroom): - """Sets the google_classroom of this AssignmentSubmission. - - - :param google_classroom: The google_classroom of this AssignmentSubmission. # noqa: E501 - :type: GoogleClassroomSubmission - """ - - self._google_classroom = google_classroom - - @property - def microsoft_graph(self): - """Gets the microsoft_graph of this AssignmentSubmission. # noqa: E501 - - - :return: The microsoft_graph of this AssignmentSubmission. # noqa: E501 - :rtype: MicrosoftGraphSubmission - """ - return self._microsoft_graph - - @microsoft_graph.setter - def microsoft_graph(self, microsoft_graph): - """Sets the microsoft_graph of this AssignmentSubmission. - - - :param microsoft_graph: The microsoft_graph of this AssignmentSubmission. # noqa: E501 - :type: MicrosoftGraphSubmission - """ - - self._microsoft_graph = microsoft_graph - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmission): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py deleted file mode 100644 index 5c0466d..0000000 --- a/flat_api/models/assignment_submission_comment.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionComment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'user': 'str', - 'submission': 'str', - 'date': 'datetime', - 'modification_date': 'datetime', - 'comment': 'str', - 'unread': 'bool' - } - - attribute_map = { - 'id': 'id', - 'user': 'user', - 'submission': 'submission', - 'date': 'date', - 'modification_date': 'modificationDate', - 'comment': 'comment', - 'unread': 'unread' - } - - def __init__(self, id=None, user=None, submission=None, date=None, modification_date=None, comment=None, unread=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionComment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user = None - self._submission = None - self._date = None - self._modification_date = None - self._comment = None - self._unread = None - self.discriminator = None - - if id is not None: - self.id = id - if user is not None: - self.user = user - if submission is not None: - self.submission = submission - if date is not None: - self.date = date - if modification_date is not None: - self.modification_date = modification_date - if comment is not None: - self.comment = comment - if unread is not None: - self.unread = unread - - @property - def id(self): - """Gets the id of this AssignmentSubmissionComment. # noqa: E501 - - The comment unique identifier # noqa: E501 - - :return: The id of this AssignmentSubmissionComment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssignmentSubmissionComment. - - The comment unique identifier # noqa: E501 - - :param id: The id of this AssignmentSubmissionComment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user(self): - """Gets the user of this AssignmentSubmissionComment. # noqa: E501 - - The author unique identifier # noqa: E501 - - :return: The user of this AssignmentSubmissionComment. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this AssignmentSubmissionComment. - - The author unique identifier # noqa: E501 - - :param user: The user of this AssignmentSubmissionComment. # noqa: E501 - :type: str - """ - - self._user = user - - @property - def submission(self): - """Gets the submission of this AssignmentSubmissionComment. # noqa: E501 - - The submission unique identifier # noqa: E501 - - :return: The submission of this AssignmentSubmissionComment. # noqa: E501 - :rtype: str - """ - return self._submission - - @submission.setter - def submission(self, submission): - """Sets the submission of this AssignmentSubmissionComment. - - The submission unique identifier # noqa: E501 - - :param submission: The submission of this AssignmentSubmissionComment. # noqa: E501 - :type: str - """ - - self._submission = submission - - @property - def date(self): - """Gets the date of this AssignmentSubmissionComment. # noqa: E501 - - The date when the comment was posted # noqa: E501 - - :return: The date of this AssignmentSubmissionComment. # noqa: E501 - :rtype: datetime - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this AssignmentSubmissionComment. - - The date when the comment was posted # noqa: E501 - - :param date: The date of this AssignmentSubmissionComment. # noqa: E501 - :type: datetime - """ - - self._date = date - - @property - def modification_date(self): - """Gets the modification_date of this AssignmentSubmissionComment. # noqa: E501 - - The date of the last comment modification # noqa: E501 - - :return: The modification_date of this AssignmentSubmissionComment. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this AssignmentSubmissionComment. - - The date of the last comment modification # noqa: E501 - - :param modification_date: The modification_date of this AssignmentSubmissionComment. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def comment(self): - """Gets the comment of this AssignmentSubmissionComment. # noqa: E501 - - The comment text # noqa: E501 - - :return: The comment of this AssignmentSubmissionComment. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this AssignmentSubmissionComment. - - The comment text # noqa: E501 - - :param comment: The comment of this AssignmentSubmissionComment. # noqa: E501 - :type: str - """ - - self._comment = comment - - @property - def unread(self): - """Gets the unread of this AssignmentSubmissionComment. # noqa: E501 - - True if the comment is unread by the current user # noqa: E501 - - :return: The unread of this AssignmentSubmissionComment. # noqa: E501 - :rtype: bool - """ - return self._unread - - @unread.setter - def unread(self, unread): - """Sets the unread of this AssignmentSubmissionComment. - - True if the comment is unread by the current user # noqa: E501 - - :param unread: The unread of this AssignmentSubmissionComment. # noqa: E501 - :type: bool - """ - - self._unread = unread - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionComment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionComment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py deleted file mode 100644 index 2b28f8a..0000000 --- a/flat_api/models/assignment_submission_comment_creation.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionCommentCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'comment': 'str' - } - - attribute_map = { - 'comment': 'comment' - } - - def __init__(self, comment=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionCommentCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._comment = None - self.discriminator = None - - self.comment = comment - - @property - def comment(self): - """Gets the comment of this AssignmentSubmissionCommentCreation. # noqa: E501 - - The comment text # noqa: E501 - - :return: The comment of this AssignmentSubmissionCommentCreation. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this AssignmentSubmissionCommentCreation. - - The comment text # noqa: E501 - - :param comment: The comment of this AssignmentSubmissionCommentCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and comment is None: # noqa: E501 - raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501 - - self._comment = comment - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionCommentCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionCommentCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py deleted file mode 100644 index 82d4835..0000000 --- a/flat_api/models/assignment_submission_history.py +++ /dev/null @@ -1,287 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'date': 'datetime', - 'users': 'list[str]', - 'state': 'AssignmentSubmissionState', - 'draft_grade': 'float', - 'grade': 'float', - 'max_points': 'float', - 'attachment': 'AssignmentSubmissionHistoryAttachment' - } - - attribute_map = { - 'date': 'date', - 'users': 'users', - 'state': 'state', - 'draft_grade': 'draftGrade', - 'grade': 'grade', - 'max_points': 'maxPoints', - 'attachment': 'attachment' - } - - def __init__(self, date=None, users=None, state=None, draft_grade=None, grade=None, max_points=None, attachment=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._date = None - self._users = None - self._state = None - self._draft_grade = None - self._grade = None - self._max_points = None - self._attachment = None - self.discriminator = None - - if date is not None: - self.date = date - if users is not None: - self.users = users - if state is not None: - self.state = state - if draft_grade is not None: - self.draft_grade = draft_grade - if grade is not None: - self.grade = grade - if max_points is not None: - self.max_points = max_points - if attachment is not None: - self.attachment = attachment - - @property - def date(self): - """Gets the date of this AssignmentSubmissionHistory. # noqa: E501 - - The date when the submission was changed # noqa: E501 - - :return: The date of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: datetime - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this AssignmentSubmissionHistory. - - The date when the submission was changed # noqa: E501 - - :param date: The date of this AssignmentSubmissionHistory. # noqa: E501 - :type: datetime - """ - - self._date = date - - @property - def users(self): - """Gets the users of this AssignmentSubmissionHistory. # noqa: E501 - - The user(s) unique identifier(s) who made the change # noqa: E501 - - :return: The users of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: list[str] - """ - return self._users - - @users.setter - def users(self, users): - """Sets the users of this AssignmentSubmissionHistory. - - The user(s) unique identifier(s) who made the change # noqa: E501 - - :param users: The users of this AssignmentSubmissionHistory. # noqa: E501 - :type: list[str] - """ - - self._users = users - - @property - def state(self): - """Gets the state of this AssignmentSubmissionHistory. # noqa: E501 - - - :return: The state of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: AssignmentSubmissionState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this AssignmentSubmissionHistory. - - - :param state: The state of this AssignmentSubmissionHistory. # noqa: E501 - :type: AssignmentSubmissionState - """ - - self._state = state - - @property - def draft_grade(self): - """Gets the draft_grade of this AssignmentSubmissionHistory. # noqa: E501 - - The numerator of the grade at this time in the submission grade history # noqa: E501 - - :return: The draft_grade of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: float - """ - return self._draft_grade - - @draft_grade.setter - def draft_grade(self, draft_grade): - """Sets the draft_grade of this AssignmentSubmissionHistory. - - The numerator of the grade at this time in the submission grade history # noqa: E501 - - :param draft_grade: The draft_grade of this AssignmentSubmissionHistory. # noqa: E501 - :type: float - """ - - self._draft_grade = draft_grade - - @property - def grade(self): - """Gets the grade of this AssignmentSubmissionHistory. # noqa: E501 - - The numerator of the grade at this time in the submission grade history # noqa: E501 - - :return: The grade of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: float - """ - return self._grade - - @grade.setter - def grade(self, grade): - """Sets the grade of this AssignmentSubmissionHistory. - - The numerator of the grade at this time in the submission grade history # noqa: E501 - - :param grade: The grade of this AssignmentSubmissionHistory. # noqa: E501 - :type: float - """ - - self._grade = grade - - @property - def max_points(self): - """Gets the max_points of this AssignmentSubmissionHistory. # noqa: E501 - - The denominator of the grade at this time in the submission grade history # noqa: E501 - - :return: The max_points of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: float - """ - return self._max_points - - @max_points.setter - def max_points(self, max_points): - """Sets the max_points of this AssignmentSubmissionHistory. - - The denominator of the grade at this time in the submission grade history # noqa: E501 - - :param max_points: The max_points of this AssignmentSubmissionHistory. # noqa: E501 - :type: float - """ - - self._max_points = max_points - - @property - def attachment(self): - """Gets the attachment of this AssignmentSubmissionHistory. # noqa: E501 - - - :return: The attachment of this AssignmentSubmissionHistory. # noqa: E501 - :rtype: AssignmentSubmissionHistoryAttachment - """ - return self._attachment - - @attachment.setter - def attachment(self, attachment): - """Sets the attachment of this AssignmentSubmissionHistory. - - - :param attachment: The attachment of this AssignmentSubmissionHistory. # noqa: E501 - :type: AssignmentSubmissionHistoryAttachment - """ - - self._attachment = attachment - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py deleted file mode 100644 index 35fcc99..0000000 --- a/flat_api/models/assignment_submission_history_attachment.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionHistoryAttachment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'score': 'str', - 'revision': 'str' - } - - attribute_map = { - 'score': 'score', - 'revision': 'revision' - } - - def __init__(self, score=None, revision=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._score = None - self._revision = None - self.discriminator = None - - if score is not None: - self.score = score - if revision is not None: - self.revision = revision - - @property - def score(self): - """Gets the score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - - The score identifier that changed # noqa: E501 - - :return: The score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this AssignmentSubmissionHistoryAttachment. - - The score identifier that changed # noqa: E501 - - :param score: The score of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def revision(self): - """Gets the revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - - The revision identifier that changed # noqa: E501 - - :return: The revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this AssignmentSubmissionHistoryAttachment. - - The revision identifier that changed # noqa: E501 - - :param revision: The revision of this AssignmentSubmissionHistoryAttachment. # noqa: E501 - :type: str - """ - - self._revision = revision - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionHistoryAttachment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionHistoryAttachment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_state.py b/flat_api/models/assignment_submission_state.py deleted file mode 100644 index 5d79220..0000000 --- a/flat_api/models/assignment_submission_state.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - CREATED = "created" - TURNEDIN = "turnedIn" - RETURNED = "returned" - - allowable_values = [CREATED, TURNEDIN, RETURNED] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionState): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py deleted file mode 100644 index 3189038..0000000 --- a/flat_api/models/assignment_submission_update.py +++ /dev/null @@ -1,296 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'attachments': 'list[ClassAttachmentCreation]', - 'submit': 'bool', - 'draft_grade': 'float', - 'grade': 'float', - 'exercises_ids': 'list[str]', - '_return': 'bool', - 'comments': 'AssignmentSubmissionUpdateComments' - } - - attribute_map = { - 'attachments': 'attachments', - 'submit': 'submit', - 'draft_grade': 'draftGrade', - 'grade': 'grade', - 'exercises_ids': 'exercisesIds', - '_return': 'return', - 'comments': 'comments' - } - - def __init__(self, attachments=None, submit=None, draft_grade=None, grade=None, exercises_ids=None, _return=None, comments=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._attachments = None - self._submit = None - self._draft_grade = None - self._grade = None - self._exercises_ids = None - self.__return = None - self._comments = None - self.discriminator = None - - if attachments is not None: - self.attachments = attachments - if submit is not None: - self.submit = submit - self.draft_grade = draft_grade - self.grade = grade - self.exercises_ids = exercises_ids - if _return is not None: - self._return = _return - if comments is not None: - self.comments = comments - - @property - def attachments(self): - """Gets the attachments of this AssignmentSubmissionUpdate. # noqa: E501 - - - :return: The attachments of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: list[ClassAttachmentCreation] - """ - return self._attachments - - @attachments.setter - def attachments(self, attachments): - """Sets the attachments of this AssignmentSubmissionUpdate. - - - :param attachments: The attachments of this AssignmentSubmissionUpdate. # noqa: E501 - :type: list[ClassAttachmentCreation] - """ - - self._attachments = attachments - - @property - def submit(self): - """Gets the submit of this AssignmentSubmissionUpdate. # noqa: E501 - - If `true`, the submission will be marked as done # noqa: E501 - - :return: The submit of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: bool - """ - return self._submit - - @submit.setter - def submit(self, submit): - """Sets the submit of this AssignmentSubmissionUpdate. - - If `true`, the submission will be marked as done # noqa: E501 - - :param submit: The submit of this AssignmentSubmissionUpdate. # noqa: E501 - :type: bool - """ - - self._submit = submit - - @property - def draft_grade(self): - """Gets the draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 - - Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 - - :return: The draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: float - """ - return self._draft_grade - - @draft_grade.setter - def draft_grade(self, draft_grade): - """Sets the draft_grade of this AssignmentSubmissionUpdate. - - Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission # noqa: E501 - - :param draft_grade: The draft_grade of this AssignmentSubmissionUpdate. # noqa: E501 - :type: float - """ - if (self.local_vars_configuration.client_side_validation and - draft_grade is not None and draft_grade > 100): # noqa: E501 - raise ValueError("Invalid value for `draft_grade`, must be a value less than or equal to `100`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - draft_grade is not None and draft_grade < 0): # noqa: E501 - raise ValueError("Invalid value for `draft_grade`, must be a value greater than or equal to `0`") # noqa: E501 - - self._draft_grade = draft_grade - - @property - def grade(self): - """Gets the grade of this AssignmentSubmissionUpdate. # noqa: E501 - - Optional grade. If unset, no grade was set. # noqa: E501 - - :return: The grade of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: float - """ - return self._grade - - @grade.setter - def grade(self, grade): - """Sets the grade of this AssignmentSubmissionUpdate. - - Optional grade. If unset, no grade was set. # noqa: E501 - - :param grade: The grade of this AssignmentSubmissionUpdate. # noqa: E501 - :type: float - """ - if (self.local_vars_configuration.client_side_validation and - grade is not None and grade > 100): # noqa: E501 - raise ValueError("Invalid value for `grade`, must be a value less than or equal to `100`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - grade is not None and grade < 0): # noqa: E501 - raise ValueError("Invalid value for `grade`, must be a value greater than or equal to `0`") # noqa: E501 - - self._grade = grade - - @property - def exercises_ids(self): - """Gets the exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 - - The ids of exercises when they need to be in a specific order # noqa: E501 - - :return: The exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: list[str] - """ - return self._exercises_ids - - @exercises_ids.setter - def exercises_ids(self, exercises_ids): - """Sets the exercises_ids of this AssignmentSubmissionUpdate. - - The ids of exercises when they need to be in a specific order # noqa: E501 - - :param exercises_ids: The exercises_ids of this AssignmentSubmissionUpdate. # noqa: E501 - :type: list[str] - """ - - self._exercises_ids = exercises_ids - - @property - def _return(self): - """Gets the _return of this AssignmentSubmissionUpdate. # noqa: E501 - - If `true`, the submission will be marked as done # noqa: E501 - - :return: The _return of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: bool - """ - return self.__return - - @_return.setter - def _return(self, _return): - """Sets the _return of this AssignmentSubmissionUpdate. - - If `true`, the submission will be marked as done # noqa: E501 - - :param _return: The _return of this AssignmentSubmissionUpdate. # noqa: E501 - :type: bool - """ - - self.__return = _return - - @property - def comments(self): - """Gets the comments of this AssignmentSubmissionUpdate. # noqa: E501 - - - :return: The comments of this AssignmentSubmissionUpdate. # noqa: E501 - :rtype: AssignmentSubmissionUpdateComments - """ - return self._comments - - @comments.setter - def comments(self, comments): - """Sets the comments of this AssignmentSubmissionUpdate. - - - :param comments: The comments of this AssignmentSubmissionUpdate. # noqa: E501 - :type: AssignmentSubmissionUpdateComments - """ - - self._comments = comments - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_submission_update_comments.py b/flat_api/models/assignment_submission_update_comments.py deleted file mode 100644 index 1759b00..0000000 --- a/flat_api/models/assignment_submission_update_comments.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentSubmissionUpdateComments(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'unread': 'float' - } - - attribute_map = { - 'total': 'total', - 'unread': 'unread' - } - - def __init__(self, total=None, unread=None, local_vars_configuration=None): # noqa: E501 - """AssignmentSubmissionUpdateComments - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._unread = None - self.discriminator = None - - if total is not None: - self.total = total - if unread is not None: - self.unread = unread - - @property - def total(self): - """Gets the total of this AssignmentSubmissionUpdateComments. # noqa: E501 - - The total number of comments added to the submission # noqa: E501 - - :return: The total of this AssignmentSubmissionUpdateComments. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this AssignmentSubmissionUpdateComments. - - The total number of comments added to the submission # noqa: E501 - - :param total: The total of this AssignmentSubmissionUpdateComments. # noqa: E501 - :type: float - """ - - self._total = total - - @property - def unread(self): - """Gets the unread of this AssignmentSubmissionUpdateComments. # noqa: E501 - - The number of unread comments for the current user # noqa: E501 - - :return: The unread of this AssignmentSubmissionUpdateComments. # noqa: E501 - :rtype: float - """ - return self._unread - - @unread.setter - def unread(self, unread): - """Sets the unread of this AssignmentSubmissionUpdateComments. - - The number of unread comments for the current user # noqa: E501 - - :param unread: The unread of this AssignmentSubmissionUpdateComments. # noqa: E501 - :type: float - """ - - self._unread = unread - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentSubmissionUpdateComments): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentSubmissionUpdateComments): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/assignment_type.py b/flat_api/models/assignment_type.py deleted file mode 100644 index 653a02c..0000000 --- a/flat_api/models/assignment_type.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class AssignmentType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - NONE = "none" - NEWSCORE = "newScore" - SCORETEMPLATE = "scoreTemplate" - SHAREDWRITING = "sharedWriting" - WORKSHEET = "worksheet" - PERFORMANCE = "performance" - - allowable_values = [NONE, NEWSCORE, SCORETEMPLATE, SHAREDWRITING, WORKSHEET, PERFORMANCE] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """AssignmentType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssignmentType): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssignmentType): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py deleted file mode 100644 index 031d382..0000000 --- a/flat_api/models/class_attachment_creation.py +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassAttachmentCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'score': 'str', - 'worksheet': 'str', - 'sharing_mode': 'MediaScoreSharingMode', - 'lock_score_template': 'bool', - 'url': 'str', - 'google_drive_file_id': 'str' - } - - attribute_map = { - 'type': 'type', - 'score': 'score', - 'worksheet': 'worksheet', - 'sharing_mode': 'sharingMode', - 'lock_score_template': 'lockScoreTemplate', - 'url': 'url', - 'google_drive_file_id': 'googleDriveFileId' - } - - def __init__(self, type=None, score=None, worksheet=None, sharing_mode=None, lock_score_template=None, url=None, google_drive_file_id=None, local_vars_configuration=None): # noqa: E501 - """ClassAttachmentCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._score = None - self._worksheet = None - self._sharing_mode = None - self._lock_score_template = None - self._url = None - self._google_drive_file_id = None - self.discriminator = None - - if type is not None: - self.type = type - if score is not None: - self.score = score - if worksheet is not None: - self.worksheet = worksheet - if sharing_mode is not None: - self.sharing_mode = sharing_mode - if lock_score_template is not None: - self.lock_score_template = lock_score_template - if url is not None: - self.url = url - if google_drive_file_id is not None: - self.google_drive_file_id = google_drive_file_id - - @property - def type(self): - """Gets the type of this ClassAttachmentCreation. # noqa: E501 - - The type of the attachment posted # noqa: E501 - - :return: The type of this ClassAttachmentCreation. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ClassAttachmentCreation. - - The type of the attachment posted # noqa: E501 - - :param type: The type of this ClassAttachmentCreation. # noqa: E501 - :type: str - """ - allowed_values = ["flat", "link", "googleDrive", "worksheet"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def score(self): - """Gets the score of this ClassAttachmentCreation. # noqa: E501 - - A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. # noqa: E501 - - :return: The score of this ClassAttachmentCreation. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this ClassAttachmentCreation. - - A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. # noqa: E501 - - :param score: The score of this ClassAttachmentCreation. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def worksheet(self): - """Gets the worksheet of this ClassAttachmentCreation. # noqa: E501 - - An unique worksheet identifier # noqa: E501 - - :return: The worksheet of this ClassAttachmentCreation. # noqa: E501 - :rtype: str - """ - return self._worksheet - - @worksheet.setter - def worksheet(self, worksheet): - """Sets the worksheet of this ClassAttachmentCreation. - - An unique worksheet identifier # noqa: E501 - - :param worksheet: The worksheet of this ClassAttachmentCreation. # noqa: E501 - :type: str - """ - - self._worksheet = worksheet - - @property - def sharing_mode(self): - """Gets the sharing_mode of this ClassAttachmentCreation. # noqa: E501 - - - :return: The sharing_mode of this ClassAttachmentCreation. # noqa: E501 - :rtype: MediaScoreSharingMode - """ - return self._sharing_mode - - @sharing_mode.setter - def sharing_mode(self, sharing_mode): - """Sets the sharing_mode of this ClassAttachmentCreation. - - - :param sharing_mode: The sharing_mode of this ClassAttachmentCreation. # noqa: E501 - :type: MediaScoreSharingMode - """ - - self._sharing_mode = sharing_mode - - @property - def lock_score_template(self): - """Gets the lock_score_template of this ClassAttachmentCreation. # noqa: E501 - - To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 - - :return: The lock_score_template of this ClassAttachmentCreation. # noqa: E501 - :rtype: bool - """ - return self._lock_score_template - - @lock_score_template.setter - def lock_score_template(self, lock_score_template): - """Sets the lock_score_template of this ClassAttachmentCreation. - - To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 - - :param lock_score_template: The lock_score_template of this ClassAttachmentCreation. # noqa: E501 - :type: bool - """ - - self._lock_score_template = lock_score_template - - @property - def url(self): - """Gets the url of this ClassAttachmentCreation. # noqa: E501 - - The URL of the attachment. # noqa: E501 - - :return: The url of this ClassAttachmentCreation. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this ClassAttachmentCreation. - - The URL of the attachment. # noqa: E501 - - :param url: The url of this ClassAttachmentCreation. # noqa: E501 - :type: str - """ - - self._url = url - - @property - def google_drive_file_id(self): - """Gets the google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 - - The ID of the Google Drive File # noqa: E501 - - :return: The google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 - :rtype: str - """ - return self._google_drive_file_id - - @google_drive_file_id.setter - def google_drive_file_id(self, google_drive_file_id): - """Sets the google_drive_file_id of this ClassAttachmentCreation. - - The ID of the Google Drive File # noqa: E501 - - :param google_drive_file_id: The google_drive_file_id of this ClassAttachmentCreation. # noqa: E501 - :type: str - """ - - self._google_drive_file_id = google_drive_file_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassAttachmentCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassAttachmentCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py deleted file mode 100644 index 005f836..0000000 --- a/flat_api/models/class_creation.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'section': 'str' - } - - attribute_map = { - 'name': 'name', - 'section': 'section' - } - - def __init__(self, name=None, section=None, local_vars_configuration=None): # noqa: E501 - """ClassCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._section = None - self.discriminator = None - - self.name = name - if section is not None: - self.section = section - - @property - def name(self): - """Gets the name of this ClassCreation. # noqa: E501 - - The name of the new class # noqa: E501 - - :return: The name of this ClassCreation. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ClassCreation. - - The name of the new class # noqa: E501 - - :param name: The name of this ClassCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - name is not None and len(name) > 255): - raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 - - self._name = name - - @property - def section(self): - """Gets the section of this ClassCreation. # noqa: E501 - - The section of the new class # noqa: E501 - - :return: The section of this ClassCreation. # noqa: E501 - :rtype: str - """ - return self._section - - @section.setter - def section(self, section): - """Sets the section of this ClassCreation. - - The section of the new class # noqa: E501 - - :param section: The section of this ClassCreation. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - section is not None and len(section) > 255): - raise ValueError("Invalid value for `section`, length must be less than or equal to `255`") # noqa: E501 - - self._section = section - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py deleted file mode 100644 index 8a58cf4..0000000 --- a/flat_api/models/class_details.py +++ /dev/null @@ -1,661 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'ClassState', - 'name': 'str', - 'section': 'str', - 'description': 'str', - 'organization': 'str', - 'owner': 'str', - 'creation_date': 'datetime', - 'enrollment_code': 'str', - 'theme': 'str', - 'assignments_count': 'float', - 'students_group': 'GroupDetails', - 'teachers_group': 'GroupDetails', - 'issues': 'ClassDetailsIssues', - 'google_classroom': 'ClassDetailsGoogleClassroom', - 'google_drive': 'ClassDetailsGoogleDrive', - 'microsoft_graph': 'ClassDetailsMicrosoftGraph', - 'lti': 'ClassDetailsLti', - 'canvas': 'ClassDetailsCanvas', - 'mfc': 'ClassDetailsMfc', - 'clever': 'ClassDetailsClever' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'name': 'name', - 'section': 'section', - 'description': 'description', - 'organization': 'organization', - 'owner': 'owner', - 'creation_date': 'creationDate', - 'enrollment_code': 'enrollmentCode', - 'theme': 'theme', - 'assignments_count': 'assignmentsCount', - 'students_group': 'studentsGroup', - 'teachers_group': 'teachersGroup', - 'issues': 'issues', - 'google_classroom': 'googleClassroom', - 'google_drive': 'googleDrive', - 'microsoft_graph': 'microsoftGraph', - 'lti': 'lti', - 'canvas': 'canvas', - 'mfc': 'mfc', - 'clever': 'clever' - } - - def __init__(self, id=None, state=None, name=None, section=None, description=None, organization=None, owner=None, creation_date=None, enrollment_code=None, theme=None, assignments_count=None, students_group=None, teachers_group=None, issues=None, google_classroom=None, google_drive=None, microsoft_graph=None, lti=None, canvas=None, mfc=None, clever=None, local_vars_configuration=None): # noqa: E501 - """ClassDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._name = None - self._section = None - self._description = None - self._organization = None - self._owner = None - self._creation_date = None - self._enrollment_code = None - self._theme = None - self._assignments_count = None - self._students_group = None - self._teachers_group = None - self._issues = None - self._google_classroom = None - self._google_drive = None - self._microsoft_graph = None - self._lti = None - self._canvas = None - self._mfc = None - self._clever = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if name is not None: - self.name = name - if section is not None: - self.section = section - if description is not None: - self.description = description - if organization is not None: - self.organization = organization - if owner is not None: - self.owner = owner - if creation_date is not None: - self.creation_date = creation_date - if enrollment_code is not None: - self.enrollment_code = enrollment_code - if theme is not None: - self.theme = theme - if assignments_count is not None: - self.assignments_count = assignments_count - if students_group is not None: - self.students_group = students_group - if teachers_group is not None: - self.teachers_group = teachers_group - if issues is not None: - self.issues = issues - if google_classroom is not None: - self.google_classroom = google_classroom - if google_drive is not None: - self.google_drive = google_drive - if microsoft_graph is not None: - self.microsoft_graph = microsoft_graph - if lti is not None: - self.lti = lti - if canvas is not None: - self.canvas = canvas - if mfc is not None: - self.mfc = mfc - if clever is not None: - self.clever = clever - - @property - def id(self): - """Gets the id of this ClassDetails. # noqa: E501 - - The unique identifier of the class # noqa: E501 - - :return: The id of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetails. - - The unique identifier of the class # noqa: E501 - - :param id: The id of this ClassDetails. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this ClassDetails. # noqa: E501 - - - :return: The state of this ClassDetails. # noqa: E501 - :rtype: ClassState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ClassDetails. - - - :param state: The state of this ClassDetails. # noqa: E501 - :type: ClassState - """ - - self._state = state - - @property - def name(self): - """Gets the name of this ClassDetails. # noqa: E501 - - The name of the class # noqa: E501 - - :return: The name of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ClassDetails. - - The name of the class # noqa: E501 - - :param name: The name of this ClassDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def section(self): - """Gets the section of this ClassDetails. # noqa: E501 - - The section of the class # noqa: E501 - - :return: The section of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._section - - @section.setter - def section(self, section): - """Sets the section of this ClassDetails. - - The section of the class # noqa: E501 - - :param section: The section of this ClassDetails. # noqa: E501 - :type: str - """ - - self._section = section - - @property - def description(self): - """Gets the description of this ClassDetails. # noqa: E501 - - An optionnal description for this class # noqa: E501 - - :return: The description of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ClassDetails. - - An optionnal description for this class # noqa: E501 - - :param description: The description of this ClassDetails. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def organization(self): - """Gets the organization of this ClassDetails. # noqa: E501 - - The unique identifier of the Organization owning this class # noqa: E501 - - :return: The organization of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this ClassDetails. - - The unique identifier of the Organization owning this class # noqa: E501 - - :param organization: The organization of this ClassDetails. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def owner(self): - """Gets the owner of this ClassDetails. # noqa: E501 - - The unique identifier of the User owning this class # noqa: E501 - - :return: The owner of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this ClassDetails. - - The unique identifier of the User owning this class # noqa: E501 - - :param owner: The owner of this ClassDetails. # noqa: E501 - :type: str - """ - - self._owner = owner - - @property - def creation_date(self): - """Gets the creation_date of this ClassDetails. # noqa: E501 - - The date when the class was create # noqa: E501 - - :return: The creation_date of this ClassDetails. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ClassDetails. - - The date when the class was create # noqa: E501 - - :param creation_date: The creation_date of this ClassDetails. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def enrollment_code(self): - """Gets the enrollment_code of this ClassDetails. # noqa: E501 - - [Teachers only] The enrollment code that can be used by the students to join the class # noqa: E501 - - :return: The enrollment_code of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._enrollment_code - - @enrollment_code.setter - def enrollment_code(self, enrollment_code): - """Sets the enrollment_code of this ClassDetails. - - [Teachers only] The enrollment code that can be used by the students to join the class # noqa: E501 - - :param enrollment_code: The enrollment_code of this ClassDetails. # noqa: E501 - :type: str - """ - - self._enrollment_code = enrollment_code - - @property - def theme(self): - """Gets the theme of this ClassDetails. # noqa: E501 - - The theme identifier using in Flat User Interface # noqa: E501 - - :return: The theme of this ClassDetails. # noqa: E501 - :rtype: str - """ - return self._theme - - @theme.setter - def theme(self, theme): - """Sets the theme of this ClassDetails. - - The theme identifier using in Flat User Interface # noqa: E501 - - :param theme: The theme of this ClassDetails. # noqa: E501 - :type: str - """ - - self._theme = theme - - @property - def assignments_count(self): - """Gets the assignments_count of this ClassDetails. # noqa: E501 - - The number of assignments created in the class # noqa: E501 - - :return: The assignments_count of this ClassDetails. # noqa: E501 - :rtype: float - """ - return self._assignments_count - - @assignments_count.setter - def assignments_count(self, assignments_count): - """Sets the assignments_count of this ClassDetails. - - The number of assignments created in the class # noqa: E501 - - :param assignments_count: The assignments_count of this ClassDetails. # noqa: E501 - :type: float - """ - - self._assignments_count = assignments_count - - @property - def students_group(self): - """Gets the students_group of this ClassDetails. # noqa: E501 - - - :return: The students_group of this ClassDetails. # noqa: E501 - :rtype: GroupDetails - """ - return self._students_group - - @students_group.setter - def students_group(self, students_group): - """Sets the students_group of this ClassDetails. - - - :param students_group: The students_group of this ClassDetails. # noqa: E501 - :type: GroupDetails - """ - - self._students_group = students_group - - @property - def teachers_group(self): - """Gets the teachers_group of this ClassDetails. # noqa: E501 - - - :return: The teachers_group of this ClassDetails. # noqa: E501 - :rtype: GroupDetails - """ - return self._teachers_group - - @teachers_group.setter - def teachers_group(self, teachers_group): - """Sets the teachers_group of this ClassDetails. - - - :param teachers_group: The teachers_group of this ClassDetails. # noqa: E501 - :type: GroupDetails - """ - - self._teachers_group = teachers_group - - @property - def issues(self): - """Gets the issues of this ClassDetails. # noqa: E501 - - - :return: The issues of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsIssues - """ - return self._issues - - @issues.setter - def issues(self, issues): - """Sets the issues of this ClassDetails. - - - :param issues: The issues of this ClassDetails. # noqa: E501 - :type: ClassDetailsIssues - """ - - self._issues = issues - - @property - def google_classroom(self): - """Gets the google_classroom of this ClassDetails. # noqa: E501 - - - :return: The google_classroom of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsGoogleClassroom - """ - return self._google_classroom - - @google_classroom.setter - def google_classroom(self, google_classroom): - """Sets the google_classroom of this ClassDetails. - - - :param google_classroom: The google_classroom of this ClassDetails. # noqa: E501 - :type: ClassDetailsGoogleClassroom - """ - - self._google_classroom = google_classroom - - @property - def google_drive(self): - """Gets the google_drive of this ClassDetails. # noqa: E501 - - - :return: The google_drive of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsGoogleDrive - """ - return self._google_drive - - @google_drive.setter - def google_drive(self, google_drive): - """Sets the google_drive of this ClassDetails. - - - :param google_drive: The google_drive of this ClassDetails. # noqa: E501 - :type: ClassDetailsGoogleDrive - """ - - self._google_drive = google_drive - - @property - def microsoft_graph(self): - """Gets the microsoft_graph of this ClassDetails. # noqa: E501 - - - :return: The microsoft_graph of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsMicrosoftGraph - """ - return self._microsoft_graph - - @microsoft_graph.setter - def microsoft_graph(self, microsoft_graph): - """Sets the microsoft_graph of this ClassDetails. - - - :param microsoft_graph: The microsoft_graph of this ClassDetails. # noqa: E501 - :type: ClassDetailsMicrosoftGraph - """ - - self._microsoft_graph = microsoft_graph - - @property - def lti(self): - """Gets the lti of this ClassDetails. # noqa: E501 - - - :return: The lti of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsLti - """ - return self._lti - - @lti.setter - def lti(self, lti): - """Sets the lti of this ClassDetails. - - - :param lti: The lti of this ClassDetails. # noqa: E501 - :type: ClassDetailsLti - """ - - self._lti = lti - - @property - def canvas(self): - """Gets the canvas of this ClassDetails. # noqa: E501 - - - :return: The canvas of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsCanvas - """ - return self._canvas - - @canvas.setter - def canvas(self, canvas): - """Sets the canvas of this ClassDetails. - - - :param canvas: The canvas of this ClassDetails. # noqa: E501 - :type: ClassDetailsCanvas - """ - - self._canvas = canvas - - @property - def mfc(self): - """Gets the mfc of this ClassDetails. # noqa: E501 - - - :return: The mfc of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsMfc - """ - return self._mfc - - @mfc.setter - def mfc(self, mfc): - """Sets the mfc of this ClassDetails. - - - :param mfc: The mfc of this ClassDetails. # noqa: E501 - :type: ClassDetailsMfc - """ - - self._mfc = mfc - - @property - def clever(self): - """Gets the clever of this ClassDetails. # noqa: E501 - - - :return: The clever of this ClassDetails. # noqa: E501 - :rtype: ClassDetailsClever - """ - return self._clever - - @clever.setter - def clever(self, clever): - """Sets the clever of this ClassDetails. - - - :param clever: The clever of this ClassDetails. # noqa: E501 - :type: ClassDetailsClever - """ - - self._clever = clever - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetails): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetails): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py deleted file mode 100644 index 155a569..0000000 --- a/flat_api/models/class_details_canvas.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsCanvas(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'domain': 'str' - } - - attribute_map = { - 'id': 'id', - 'domain': 'domain' - } - - def __init__(self, id=None, domain=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsCanvas - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._domain = None - self.discriminator = None - - if id is not None: - self.id = id - if domain is not None: - self.domain = domain - - @property - def id(self): - """Gets the id of this ClassDetailsCanvas. # noqa: E501 - - Unique identifier of the course on Canvas # noqa: E501 - - :return: The id of this ClassDetailsCanvas. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsCanvas. - - Unique identifier of the course on Canvas # noqa: E501 - - :param id: The id of this ClassDetailsCanvas. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def domain(self): - """Gets the domain of this ClassDetailsCanvas. # noqa: E501 - - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - - :return: The domain of this ClassDetailsCanvas. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this ClassDetailsCanvas. - - Canvas instance domain (e.g. \"canvas.instructure.com\") # noqa: E501 - - :param domain: The domain of this ClassDetailsCanvas. # noqa: E501 - :type: str - """ - - self._domain = domain - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsCanvas): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsCanvas): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py deleted file mode 100644 index 21fd7c0..0000000 --- a/flat_api/models/class_details_clever.py +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsClever(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'creation_date': 'datetime', - 'modification_date': 'datetime', - 'subject': 'str', - 'term_name': 'str', - 'term_start_date': 'datetime', - 'term_end_date': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'creation_date': 'creationDate', - 'modification_date': 'modificationDate', - 'subject': 'subject', - 'term_name': 'termName', - 'term_start_date': 'termStartDate', - 'term_end_date': 'termEndDate' - } - - def __init__(self, id=None, creation_date=None, modification_date=None, subject=None, term_name=None, term_start_date=None, term_end_date=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsClever - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._creation_date = None - self._modification_date = None - self._subject = None - self._term_name = None - self._term_start_date = None - self._term_end_date = None - self.discriminator = None - - if id is not None: - self.id = id - if creation_date is not None: - self.creation_date = creation_date - if modification_date is not None: - self.modification_date = modification_date - if subject is not None: - self.subject = subject - if term_name is not None: - self.term_name = term_name - if term_start_date is not None: - self.term_start_date = term_start_date - if term_end_date is not None: - self.term_end_date = term_end_date - - @property - def id(self): - """Gets the id of this ClassDetailsClever. # noqa: E501 - - Clever section unique identifier # noqa: E501 - - :return: The id of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsClever. - - Clever section unique identifier # noqa: E501 - - :param id: The id of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def creation_date(self): - """Gets the creation_date of this ClassDetailsClever. # noqa: E501 - - The creation date of the section on clever # noqa: E501 - - :return: The creation_date of this ClassDetailsClever. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ClassDetailsClever. - - The creation date of the section on clever # noqa: E501 - - :param creation_date: The creation_date of this ClassDetailsClever. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def modification_date(self): - """Gets the modification_date of this ClassDetailsClever. # noqa: E501 - - The last modification date of the section on clever # noqa: E501 - - :return: The modification_date of this ClassDetailsClever. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ClassDetailsClever. - - The last modification date of the section on clever # noqa: E501 - - :param modification_date: The modification_date of this ClassDetailsClever. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def subject(self): - """Gets the subject of this ClassDetailsClever. # noqa: E501 - - Normalized subject of the course # noqa: E501 - - :return: The subject of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._subject - - @subject.setter - def subject(self, subject): - """Sets the subject of this ClassDetailsClever. - - Normalized subject of the course # noqa: E501 - - :param subject: The subject of this ClassDetailsClever. # noqa: E501 - :type: str - """ - allowed_values = ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and subject not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `subject` ({0}), must be one of {1}" # noqa: E501 - .format(subject, allowed_values) - ) - - self._subject = subject - - @property - def term_name(self): - """Gets the term_name of this ClassDetailsClever. # noqa: E501 - - Name of the term when this course happens # noqa: E501 - - :return: The term_name of this ClassDetailsClever. # noqa: E501 - :rtype: str - """ - return self._term_name - - @term_name.setter - def term_name(self, term_name): - """Sets the term_name of this ClassDetailsClever. - - Name of the term when this course happens # noqa: E501 - - :param term_name: The term_name of this ClassDetailsClever. # noqa: E501 - :type: str - """ - - self._term_name = term_name - - @property - def term_start_date(self): - """Gets the term_start_date of this ClassDetailsClever. # noqa: E501 - - Beginning date of the term # noqa: E501 - - :return: The term_start_date of this ClassDetailsClever. # noqa: E501 - :rtype: datetime - """ - return self._term_start_date - - @term_start_date.setter - def term_start_date(self, term_start_date): - """Sets the term_start_date of this ClassDetailsClever. - - Beginning date of the term # noqa: E501 - - :param term_start_date: The term_start_date of this ClassDetailsClever. # noqa: E501 - :type: datetime - """ - - self._term_start_date = term_start_date - - @property - def term_end_date(self): - """Gets the term_end_date of this ClassDetailsClever. # noqa: E501 - - End date of the term # noqa: E501 - - :return: The term_end_date of this ClassDetailsClever. # noqa: E501 - :rtype: datetime - """ - return self._term_end_date - - @term_end_date.setter - def term_end_date(self, term_end_date): - """Sets the term_end_date of this ClassDetailsClever. - - End date of the term # noqa: E501 - - :param term_end_date: The term_end_date of this ClassDetailsClever. # noqa: E501 - :type: datetime - """ - - self._term_end_date = term_end_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsClever): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsClever): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py deleted file mode 100644 index 5a9927a..0000000 --- a/flat_api/models/class_details_google_classroom.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsGoogleClassroom(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsGoogleClassroom - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this ClassDetailsGoogleClassroom. # noqa: E501 - - The course identifier on Google Classroom # noqa: E501 - - :return: The id of this ClassDetailsGoogleClassroom. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsGoogleClassroom. - - The course identifier on Google Classroom # noqa: E501 - - :param id: The id of this ClassDetailsGoogleClassroom. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def alternate_link(self): - """Gets the alternate_link of this ClassDetailsGoogleClassroom. # noqa: E501 - - Absolute link to this course in the Classroom web UI # noqa: E501 - - :return: The alternate_link of this ClassDetailsGoogleClassroom. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this ClassDetailsGoogleClassroom. - - Absolute link to this course in the Classroom web UI # noqa: E501 - - :param alternate_link: The alternate_link of this ClassDetailsGoogleClassroom. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsGoogleClassroom): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsGoogleClassroom): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py deleted file mode 100644 index 2b0e81d..0000000 --- a/flat_api/models/class_details_google_drive.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsGoogleDrive(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'teacher_folder_id': 'str', - 'teacher_folder_alternate_link': 'str' - } - - attribute_map = { - 'teacher_folder_id': 'teacherFolderId', - 'teacher_folder_alternate_link': 'teacherFolderAlternateLink' - } - - def __init__(self, teacher_folder_id=None, teacher_folder_alternate_link=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsGoogleDrive - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._teacher_folder_id = None - self._teacher_folder_alternate_link = None - self.discriminator = None - - if teacher_folder_id is not None: - self.teacher_folder_id = teacher_folder_id - if teacher_folder_alternate_link is not None: - self.teacher_folder_alternate_link = teacher_folder_alternate_link - - @property - def teacher_folder_id(self): - """Gets the teacher_folder_id of this ClassDetailsGoogleDrive. # noqa: E501 - - [Teachers only] The Drive directory identifier of the teachers' folder # noqa: E501 - - :return: The teacher_folder_id of this ClassDetailsGoogleDrive. # noqa: E501 - :rtype: str - """ - return self._teacher_folder_id - - @teacher_folder_id.setter - def teacher_folder_id(self, teacher_folder_id): - """Sets the teacher_folder_id of this ClassDetailsGoogleDrive. - - [Teachers only] The Drive directory identifier of the teachers' folder # noqa: E501 - - :param teacher_folder_id: The teacher_folder_id of this ClassDetailsGoogleDrive. # noqa: E501 - :type: str - """ - - self._teacher_folder_id = teacher_folder_id - - @property - def teacher_folder_alternate_link(self): - """Gets the teacher_folder_alternate_link of this ClassDetailsGoogleDrive. # noqa: E501 - - [Teachers only] The Drive URL of the teachers' folder # noqa: E501 - - :return: The teacher_folder_alternate_link of this ClassDetailsGoogleDrive. # noqa: E501 - :rtype: str - """ - return self._teacher_folder_alternate_link - - @teacher_folder_alternate_link.setter - def teacher_folder_alternate_link(self, teacher_folder_alternate_link): - """Sets the teacher_folder_alternate_link of this ClassDetailsGoogleDrive. - - [Teachers only] The Drive URL of the teachers' folder # noqa: E501 - - :param teacher_folder_alternate_link: The teacher_folder_alternate_link of this ClassDetailsGoogleDrive. # noqa: E501 - :type: str - """ - - self._teacher_folder_alternate_link = teacher_folder_alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsGoogleDrive): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsGoogleDrive): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py deleted file mode 100644 index e1adfd6..0000000 --- a/flat_api/models/class_details_issues.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsIssues(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'sync': 'list[ClassDetailsIssuesSync]' - } - - attribute_map = { - 'sync': 'sync' - } - - def __init__(self, sync=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsIssues - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._sync = None - self.discriminator = None - - if sync is not None: - self.sync = sync - - @property - def sync(self): - """Gets the sync of this ClassDetailsIssues. # noqa: E501 - - Synchronization issues for the class # noqa: E501 - - :return: The sync of this ClassDetailsIssues. # noqa: E501 - :rtype: list[ClassDetailsIssuesSync] - """ - return self._sync - - @sync.setter - def sync(self, sync): - """Sets the sync of this ClassDetailsIssues. - - Synchronization issues for the class # noqa: E501 - - :param sync: The sync of this ClassDetailsIssues. # noqa: E501 - :type: list[ClassDetailsIssuesSync] - """ - - self._sync = sync - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsIssues): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsIssues): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_issues_sync.py b/flat_api/models/class_details_issues_sync.py deleted file mode 100644 index 0cb4837..0000000 --- a/flat_api/models/class_details_issues_sync.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsIssuesSync(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'email': 'str', - 'reason': 'str' - } - - attribute_map = { - 'id': 'id', - 'email': 'email', - 'reason': 'reason' - } - - def __init__(self, id=None, email=None, reason=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsIssuesSync - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._email = None - self._reason = None - self.discriminator = None - - if id is not None: - self.id = id - if email is not None: - self.email = email - if reason is not None: - self.reason = reason - - @property - def id(self): - """Gets the id of this ClassDetailsIssuesSync. # noqa: E501 - - The account user identifier # noqa: E501 - - :return: The id of this ClassDetailsIssuesSync. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsIssuesSync. - - The account user identifier # noqa: E501 - - :param id: The id of this ClassDetailsIssuesSync. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def email(self): - """Gets the email of this ClassDetailsIssuesSync. # noqa: E501 - - The email address of the user concerned by this sync issue # noqa: E501 - - :return: The email of this ClassDetailsIssuesSync. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this ClassDetailsIssuesSync. - - The email address of the user concerned by this sync issue # noqa: E501 - - :param email: The email of this ClassDetailsIssuesSync. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def reason(self): - """Gets the reason of this ClassDetailsIssuesSync. # noqa: E501 - - The reason why the account cannot be synced # noqa: E501 - - :return: The reason of this ClassDetailsIssuesSync. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this ClassDetailsIssuesSync. - - The reason why the account cannot be synced # noqa: E501 - - :param reason: The reason of this ClassDetailsIssuesSync. # noqa: E501 - :type: str - """ - allowed_values = ["otherOrgnanization", "personalSubscription"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and reason not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 - .format(reason, allowed_values) - ) - - self._reason = reason - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsIssuesSync): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsIssuesSync): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py deleted file mode 100644 index 37f401f..0000000 --- a/flat_api/models/class_details_lti.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsLti(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'context_id': 'str', - 'context_title': 'str', - 'context_label': 'str' - } - - attribute_map = { - 'context_id': 'contextId', - 'context_title': 'contextTitle', - 'context_label': 'contextLabel' - } - - def __init__(self, context_id=None, context_title=None, context_label=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsLti - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._context_id = None - self._context_title = None - self._context_label = None - self.discriminator = None - - if context_id is not None: - self.context_id = context_id - if context_title is not None: - self.context_title = context_title - if context_label is not None: - self.context_label = context_label - - @property - def context_id(self): - """Gets the context_id of this ClassDetailsLti. # noqa: E501 - - Unique context identifier provided # noqa: E501 - - :return: The context_id of this ClassDetailsLti. # noqa: E501 - :rtype: str - """ - return self._context_id - - @context_id.setter - def context_id(self, context_id): - """Sets the context_id of this ClassDetailsLti. - - Unique context identifier provided # noqa: E501 - - :param context_id: The context_id of this ClassDetailsLti. # noqa: E501 - :type: str - """ - - self._context_id = context_id - - @property - def context_title(self): - """Gets the context_title of this ClassDetailsLti. # noqa: E501 - - Context title # noqa: E501 - - :return: The context_title of this ClassDetailsLti. # noqa: E501 - :rtype: str - """ - return self._context_title - - @context_title.setter - def context_title(self, context_title): - """Sets the context_title of this ClassDetailsLti. - - Context title # noqa: E501 - - :param context_title: The context_title of this ClassDetailsLti. # noqa: E501 - :type: str - """ - - self._context_title = context_title - - @property - def context_label(self): - """Gets the context_label of this ClassDetailsLti. # noqa: E501 - - Context label # noqa: E501 - - :return: The context_label of this ClassDetailsLti. # noqa: E501 - :rtype: str - """ - return self._context_label - - @context_label.setter - def context_label(self, context_label): - """Sets the context_label of this ClassDetailsLti. - - Context label # noqa: E501 - - :param context_label: The context_label of this ClassDetailsLti. # noqa: E501 - :type: str - """ - - self._context_label = context_label - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsLti): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsLti): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py deleted file mode 100644 index 5de9552..0000000 --- a/flat_api/models/class_details_mfc.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsMfc(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsMfc - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this ClassDetailsMfc. # noqa: E501 - - Unique identifier of the course on MusicFirst Classroom # noqa: E501 - - :return: The id of this ClassDetailsMfc. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsMfc. - - Unique identifier of the course on MusicFirst Classroom # noqa: E501 - - :param id: The id of this ClassDetailsMfc. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def alternate_link(self): - """Gets the alternate_link of this ClassDetailsMfc. # noqa: E501 - - Link to MusicFirst Classroom class # noqa: E501 - - :return: The alternate_link of this ClassDetailsMfc. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this ClassDetailsMfc. - - Link to MusicFirst Classroom class # noqa: E501 - - :param alternate_link: The alternate_link of this ClassDetailsMfc. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsMfc): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsMfc): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py deleted file mode 100644 index 487d542..0000000 --- a/flat_api/models/class_details_microsoft_graph.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassDetailsMicrosoftGraph(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """ClassDetailsMicrosoftGraph - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this ClassDetailsMicrosoftGraph. # noqa: E501 - - The course identifier on Microsoft Graph # noqa: E501 - - :return: The id of this ClassDetailsMicrosoftGraph. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ClassDetailsMicrosoftGraph. - - The course identifier on Microsoft Graph # noqa: E501 - - :param id: The id of this ClassDetailsMicrosoftGraph. # noqa: E501 - :type: str - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassDetailsMicrosoftGraph): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassDetailsMicrosoftGraph): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py deleted file mode 100644 index 3a6e50f..0000000 --- a/flat_api/models/class_roles.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassRoles(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - TEACHER = "teacher" - STUDENT = "student" - - allowable_values = [TEACHER, STUDENT] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ClassRoles - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassRoles): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassRoles): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py deleted file mode 100644 index 973ecf6..0000000 --- a/flat_api/models/class_state.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ACTIVE = "active" - INACTIVE = "inactive" - ARCHIVED = "archived" - - allowable_values = [ACTIVE, INACTIVE, ARCHIVED] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ClassState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassState): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py deleted file mode 100644 index 6402642..0000000 --- a/flat_api/models/class_update.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ClassUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'section': 'str' - } - - attribute_map = { - 'name': 'name', - 'section': 'section' - } - - def __init__(self, name=None, section=None, local_vars_configuration=None): # noqa: E501 - """ClassUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._section = None - self.discriminator = None - - if name is not None: - self.name = name - if section is not None: - self.section = section - - @property - def name(self): - """Gets the name of this ClassUpdate. # noqa: E501 - - The name of the class # noqa: E501 - - :return: The name of this ClassUpdate. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ClassUpdate. - - The name of the class # noqa: E501 - - :param name: The name of this ClassUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - name is not None and len(name) > 255): - raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501 - - self._name = name - - @property - def section(self): - """Gets the section of this ClassUpdate. # noqa: E501 - - The section of the class # noqa: E501 - - :return: The section of this ClassUpdate. # noqa: E501 - :rtype: str - """ - return self._section - - @section.setter - def section(self, section): - """Sets the section of this ClassUpdate. - - The section of the class # noqa: E501 - - :param section: The section of this ClassUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - section is not None and len(section) > 255): - raise ValueError("Invalid value for `section`, length must be less than or equal to `255`") # noqa: E501 - - self._section = section - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClassUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ClassUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py deleted file mode 100644 index dbba8d9..0000000 --- a/flat_api/models/collection.py +++ /dev/null @@ -1,447 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class Collection(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'title': 'str', - 'html_url': 'str', - 'type': 'CollectionType', - 'privacy': 'CollectionPrivacy', - 'sharing_key': 'str', - 'app': 'CollectionApp', - 'creation_date': 'datetime', - 'user': 'UserPublicSummary', - 'rights': 'ResourceRights', - 'collaborators': 'list[ResourceCollaborator]', - 'capabilities': 'CollectionCapabilities', - 'collections': 'list[str]' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'html_url': 'htmlUrl', - 'type': 'type', - 'privacy': 'privacy', - 'sharing_key': 'sharingKey', - 'app': 'app', - 'creation_date': 'creationDate', - 'user': 'user', - 'rights': 'rights', - 'collaborators': 'collaborators', - 'capabilities': 'capabilities', - 'collections': 'collections' - } - - def __init__(self, id=None, title=None, html_url=None, type=None, privacy=None, sharing_key=None, app=None, creation_date=None, user=None, rights=None, collaborators=None, capabilities=None, collections=None, local_vars_configuration=None): # noqa: E501 - """Collection - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._title = None - self._html_url = None - self._type = None - self._privacy = None - self._sharing_key = None - self._app = None - self._creation_date = None - self._user = None - self._rights = None - self._collaborators = None - self._capabilities = None - self._collections = None - self.discriminator = None - - if id is not None: - self.id = id - if title is not None: - self.title = title - if html_url is not None: - self.html_url = html_url - if type is not None: - self.type = type - if privacy is not None: - self.privacy = privacy - if sharing_key is not None: - self.sharing_key = sharing_key - if app is not None: - self.app = app - if creation_date is not None: - self.creation_date = creation_date - if user is not None: - self.user = user - if rights is not None: - self.rights = rights - if collaborators is not None: - self.collaborators = collaborators - if capabilities is not None: - self.capabilities = capabilities - if collections is not None: - self.collections = collections - - @property - def id(self): - """Gets the id of this Collection. # noqa: E501 - - Unique identifier of the collection # noqa: E501 - - :return: The id of this Collection. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Collection. - - Unique identifier of the collection # noqa: E501 - - :param id: The id of this Collection. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def title(self): - """Gets the title of this Collection. # noqa: E501 - - The title of the collection # noqa: E501 - - :return: The title of this Collection. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this Collection. - - The title of the collection # noqa: E501 - - :param title: The title of this Collection. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def html_url(self): - """Gets the html_url of this Collection. # noqa: E501 - - The url where the collection can be viewed in a web browser # noqa: E501 - - :return: The html_url of this Collection. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this Collection. - - The url where the collection can be viewed in a web browser # noqa: E501 - - :param html_url: The html_url of this Collection. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def type(self): - """Gets the type of this Collection. # noqa: E501 - - - :return: The type of this Collection. # noqa: E501 - :rtype: CollectionType - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Collection. - - - :param type: The type of this Collection. # noqa: E501 - :type: CollectionType - """ - - self._type = type - - @property - def privacy(self): - """Gets the privacy of this Collection. # noqa: E501 - - - :return: The privacy of this Collection. # noqa: E501 - :rtype: CollectionPrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this Collection. - - - :param privacy: The privacy of this Collection. # noqa: E501 - :type: CollectionPrivacy - """ - - self._privacy = privacy - - @property - def sharing_key(self): - """Gets the sharing_key of this Collection. # noqa: E501 - - The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :return: The sharing_key of this Collection. # noqa: E501 - :rtype: str - """ - return self._sharing_key - - @sharing_key.setter - def sharing_key(self, sharing_key): - """Sets the sharing_key of this Collection. - - The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :param sharing_key: The sharing_key of this Collection. # noqa: E501 - :type: str - """ - - self._sharing_key = sharing_key - - @property - def app(self): - """Gets the app of this Collection. # noqa: E501 - - - :return: The app of this Collection. # noqa: E501 - :rtype: CollectionApp - """ - return self._app - - @app.setter - def app(self, app): - """Sets the app of this Collection. - - - :param app: The app of this Collection. # noqa: E501 - :type: CollectionApp - """ - - self._app = app - - @property - def creation_date(self): - """Gets the creation_date of this Collection. # noqa: E501 - - The date when the collection was created # noqa: E501 - - :return: The creation_date of this Collection. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this Collection. - - The date when the collection was created # noqa: E501 - - :param creation_date: The creation_date of this Collection. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def user(self): - """Gets the user of this Collection. # noqa: E501 - - - :return: The user of this Collection. # noqa: E501 - :rtype: UserPublicSummary - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this Collection. - - - :param user: The user of this Collection. # noqa: E501 - :type: UserPublicSummary - """ - - self._user = user - - @property - def rights(self): - """Gets the rights of this Collection. # noqa: E501 - - - :return: The rights of this Collection. # noqa: E501 - :rtype: ResourceRights - """ - return self._rights - - @rights.setter - def rights(self, rights): - """Sets the rights of this Collection. - - - :param rights: The rights of this Collection. # noqa: E501 - :type: ResourceRights - """ - - self._rights = rights - - @property - def collaborators(self): - """Gets the collaborators of this Collection. # noqa: E501 - - The list of the collaborators of the collection # noqa: E501 - - :return: The collaborators of this Collection. # noqa: E501 - :rtype: list[ResourceCollaborator] - """ - return self._collaborators - - @collaborators.setter - def collaborators(self, collaborators): - """Sets the collaborators of this Collection. - - The list of the collaborators of the collection # noqa: E501 - - :param collaborators: The collaborators of this Collection. # noqa: E501 - :type: list[ResourceCollaborator] - """ - - self._collaborators = collaborators - - @property - def capabilities(self): - """Gets the capabilities of this Collection. # noqa: E501 - - - :return: The capabilities of this Collection. # noqa: E501 - :rtype: CollectionCapabilities - """ - return self._capabilities - - @capabilities.setter - def capabilities(self, capabilities): - """Sets the capabilities of this Collection. - - - :param capabilities: The capabilities of this Collection. # noqa: E501 - :type: CollectionCapabilities - """ - - self._capabilities = capabilities - - @property - def collections(self): - """Gets the collections of this Collection. # noqa: E501 - - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 - - :return: The collections of this Collection. # noqa: E501 - :rtype: list[str] - """ - return self._collections - - @collections.setter - def collections(self, collections): - """Sets the collections of this Collection. - - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 - - :param collections: The collections of this Collection. # noqa: E501 - :type: list[str] - """ - - self._collections = collections - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Collection): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Collection): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py deleted file mode 100644 index 95e415b..0000000 --- a/flat_api/models/collection_app.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionApp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'logo': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'logo': 'logo' - } - - def __init__(self, id=None, name=None, logo=None, local_vars_configuration=None): # noqa: E501 - """CollectionApp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._logo = None - self.discriminator = None - - if id is not None: - self.id = id - if name is not None: - self.name = name - if logo is not None: - self.logo = logo - - @property - def id(self): - """Gets the id of this CollectionApp. # noqa: E501 - - The app unique identifier # noqa: E501 - - :return: The id of this CollectionApp. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CollectionApp. - - The app unique identifier # noqa: E501 - - :param id: The id of this CollectionApp. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this CollectionApp. # noqa: E501 - - The name of the app # noqa: E501 - - :return: The name of this CollectionApp. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CollectionApp. - - The name of the app # noqa: E501 - - :param name: The name of this CollectionApp. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def logo(self): - """Gets the logo of this CollectionApp. # noqa: E501 - - The app logo url # noqa: E501 - - :return: The logo of this CollectionApp. # noqa: E501 - :rtype: str - """ - return self._logo - - @logo.setter - def logo(self, logo): - """Sets the logo of this CollectionApp. - - The app logo url # noqa: E501 - - :param logo: The logo of this CollectionApp. # noqa: E501 - :type: str - """ - - self._logo = logo - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionApp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionApp): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py deleted file mode 100644 index f630261..0000000 --- a/flat_api/models/collection_capabilities.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionCapabilities(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'can_edit': 'bool', - 'can_share': 'bool', - 'can_delete': 'bool', - 'can_add_scores': 'bool', - 'can_delete_scores': 'bool' - } - - attribute_map = { - 'can_edit': 'canEdit', - 'can_share': 'canShare', - 'can_delete': 'canDelete', - 'can_add_scores': 'canAddScores', - 'can_delete_scores': 'canDeleteScores' - } - - def __init__(self, can_edit=None, can_share=None, can_delete=None, can_add_scores=None, can_delete_scores=None, local_vars_configuration=None): # noqa: E501 - """CollectionCapabilities - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._can_edit = None - self._can_share = None - self._can_delete = None - self._can_add_scores = None - self._can_delete_scores = None - self.discriminator = None - - if can_edit is not None: - self.can_edit = can_edit - if can_share is not None: - self.can_share = can_share - if can_delete is not None: - self.can_delete = can_delete - if can_add_scores is not None: - self.can_add_scores = can_add_scores - if can_delete_scores is not None: - self.can_delete_scores = can_delete_scores - - @property - def can_edit(self): - """Gets the can_edit of this CollectionCapabilities. # noqa: E501 - - Whether the current user can modify the metadata for the collection # noqa: E501 - - :return: The can_edit of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_edit - - @can_edit.setter - def can_edit(self, can_edit): - """Sets the can_edit of this CollectionCapabilities. - - Whether the current user can modify the metadata for the collection # noqa: E501 - - :param can_edit: The can_edit of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_edit = can_edit - - @property - def can_share(self): - """Gets the can_share of this CollectionCapabilities. # noqa: E501 - - Whether the current user can modify the sharing settings for the collection # noqa: E501 - - :return: The can_share of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_share - - @can_share.setter - def can_share(self, can_share): - """Sets the can_share of this CollectionCapabilities. - - Whether the current user can modify the sharing settings for the collection # noqa: E501 - - :param can_share: The can_share of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_share = can_share - - @property - def can_delete(self): - """Gets the can_delete of this CollectionCapabilities. # noqa: E501 - - Whether the current user can delete the collection # noqa: E501 - - :return: The can_delete of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_delete - - @can_delete.setter - def can_delete(self, can_delete): - """Sets the can_delete of this CollectionCapabilities. - - Whether the current user can delete the collection # noqa: E501 - - :param can_delete: The can_delete of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_delete = can_delete - - @property - def can_add_scores(self): - """Gets the can_add_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :return: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_add_scores - - @can_add_scores.setter - def can_add_scores(self, can_add_scores): - """Sets the can_add_scores of this CollectionCapabilities. - - Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. # noqa: E501 - - :param can_add_scores: The can_add_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_add_scores = can_add_scores - - @property - def can_delete_scores(self): - """Gets the can_delete_scores of this CollectionCapabilities. # noqa: E501 - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :return: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :rtype: bool - """ - return self._can_delete_scores - - @can_delete_scores.setter - def can_delete_scores(self, can_delete_scores): - """Sets the can_delete_scores of this CollectionCapabilities. - - Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. # noqa: E501 - - :param can_delete_scores: The can_delete_scores of this CollectionCapabilities. # noqa: E501 - :type: bool - """ - - self._can_delete_scores = can_delete_scores - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionCapabilities): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionCapabilities): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py deleted file mode 100644 index 7553f46..0000000 --- a/flat_api/models/collection_creation.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'title': 'str', - 'privacy': 'CollectionPrivacy' - } - - attribute_map = { - 'title': 'title', - 'privacy': 'privacy' - } - - def __init__(self, title=None, privacy=None, local_vars_configuration=None): # noqa: E501 - """CollectionCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._title = None - self._privacy = None - self.discriminator = None - - self.title = title - self.privacy = privacy - - @property - def title(self): - """Gets the title of this CollectionCreation. # noqa: E501 - - The title of the collection # noqa: E501 - - :return: The title of this CollectionCreation. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this CollectionCreation. - - The title of the collection # noqa: E501 - - :param title: The title of this CollectionCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - title is not None and len(title) > 300): - raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - title is not None and len(title) < 1): - raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 - - self._title = title - - @property - def privacy(self): - """Gets the privacy of this CollectionCreation. # noqa: E501 - - - :return: The privacy of this CollectionCreation. # noqa: E501 - :rtype: CollectionPrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this CollectionCreation. - - - :param privacy: The privacy of this CollectionCreation. # noqa: E501 - :type: CollectionPrivacy - """ - if self.local_vars_configuration.client_side_validation and privacy is None: # noqa: E501 - raise ValueError("Invalid value for `privacy`, must not be `None`") # noqa: E501 - - self._privacy = privacy - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py deleted file mode 100644 index 01c244f..0000000 --- a/flat_api/models/collection_modification.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionModification(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'title': 'str', - 'privacy': 'CollectionPrivacy' - } - - attribute_map = { - 'title': 'title', - 'privacy': 'privacy' - } - - def __init__(self, title=None, privacy=None, local_vars_configuration=None): # noqa: E501 - """CollectionModification - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._title = None - self._privacy = None - self.discriminator = None - - if title is not None: - self.title = title - if privacy is not None: - self.privacy = privacy - - @property - def title(self): - """Gets the title of this CollectionModification. # noqa: E501 - - The title of the collection # noqa: E501 - - :return: The title of this CollectionModification. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this CollectionModification. - - The title of the collection # noqa: E501 - - :param title: The title of this CollectionModification. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - title is not None and len(title) > 300): - raise ValueError("Invalid value for `title`, length must be less than or equal to `300`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - title is not None and len(title) < 1): - raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`") # noqa: E501 - - self._title = title - - @property - def privacy(self): - """Gets the privacy of this CollectionModification. # noqa: E501 - - - :return: The privacy of this CollectionModification. # noqa: E501 - :rtype: CollectionPrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this CollectionModification. - - - :param privacy: The privacy of this CollectionModification. # noqa: E501 - :type: CollectionPrivacy - """ - - self._privacy = privacy - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionModification): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionModification): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py deleted file mode 100644 index d0fed8a..0000000 --- a/flat_api/models/collection_privacy.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionPrivacy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - PRIVATE = "private" - - allowable_values = [PRIVATE] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """CollectionPrivacy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionPrivacy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionPrivacy): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py deleted file mode 100644 index 06623db..0000000 --- a/flat_api/models/collection_type.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class CollectionType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ROOT = "root" - REGULAR = "regular" - SHAREDWITHME = "sharedWithMe" - SHAREDWITHGROUP = "sharedWithGroup" - APP = "app" - TRASH = "trash" - - allowable_values = [ROOT, REGULAR, SHAREDWITHME, SHAREDWITHGROUP, APP, TRASH] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """CollectionType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CollectionType): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CollectionType): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py deleted file mode 100644 index f8b748c..0000000 --- a/flat_api/models/flat_error_response.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class FlatErrorResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'code': 'str', - 'message': 'str', - 'id': 'str', - 'param': 'str' - } - - attribute_map = { - 'code': 'code', - 'message': 'message', - 'id': 'id', - 'param': 'param' - } - - def __init__(self, code=None, message=None, id=None, param=None, local_vars_configuration=None): # noqa: E501 - """FlatErrorResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._code = None - self._message = None - self._id = None - self._param = None - self.discriminator = None - - if code is not None: - self.code = code - if message is not None: - self.message = message - if id is not None: - self.id = id - if param is not None: - self.param = param - - @property - def code(self): - """Gets the code of this FlatErrorResponse. # noqa: E501 - - A corresponding code for this error # noqa: E501 - - :return: The code of this FlatErrorResponse. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this FlatErrorResponse. - - A corresponding code for this error # noqa: E501 - - :param code: The code of this FlatErrorResponse. # noqa: E501 - :type: str - """ - - self._code = code - - @property - def message(self): - """Gets the message of this FlatErrorResponse. # noqa: E501 - - A printable message for this message # noqa: E501 - - :return: The message of this FlatErrorResponse. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this FlatErrorResponse. - - A printable message for this message # noqa: E501 - - :param message: The message of this FlatErrorResponse. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def id(self): - """Gets the id of this FlatErrorResponse. # noqa: E501 - - An unique error identifier generated for the request # noqa: E501 - - :return: The id of this FlatErrorResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this FlatErrorResponse. - - An unique error identifier generated for the request # noqa: E501 - - :param id: The id of this FlatErrorResponse. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def param(self): - """Gets the param of this FlatErrorResponse. # noqa: E501 - - The related parameter that caused the error # noqa: E501 - - :return: The param of this FlatErrorResponse. # noqa: E501 - :rtype: str - """ - return self._param - - @param.setter - def param(self, param): - """Sets the param of this FlatErrorResponse. - - The related parameter that caused the error # noqa: E501 - - :param param: The param of this FlatErrorResponse. # noqa: E501 - :type: str - """ - - self._param = param - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FlatErrorResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlatErrorResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py deleted file mode 100644 index 1c68851..0000000 --- a/flat_api/models/flat_locales.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class FlatLocales(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - EN = "en" - EN_GB = "en-GB" - ES = "es" - FR = "fr" - DE = "de" - IT = "it" - JA = "ja" - JA_HIRA = "ja-HIRA" - KO = "ko" - NL = "nl" - PL = "pl" - PT = "pt" - PT_BR = "pt-BR" - RO = "ro" - RU = "ru" - SV = "sv" - TR = "tr" - ZH_HANS = "zh-Hans" - - allowable_values = [EN, EN_GB, ES, FR, DE, IT, JA, JA_HIRA, KO, NL, PL, PT, PT_BR, RO, RU, SV, TR, ZH_HANS] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """FlatLocales - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FlatLocales): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FlatLocales): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py deleted file mode 100644 index 1977887..0000000 --- a/flat_api/models/google_classroom_coursework.py +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class GoogleClassroomCoursework(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'str', - 'alternate_link': 'str', - 'topic_id': 'str' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'alternate_link': 'alternateLink', - 'topic_id': 'topicId' - } - - def __init__(self, id=None, state=None, alternate_link=None, topic_id=None, local_vars_configuration=None): # noqa: E501 - """GoogleClassroomCoursework - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._alternate_link = None - self._topic_id = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if alternate_link is not None: - self.alternate_link = alternate_link - self.topic_id = topic_id - - @property - def id(self): - """Gets the id of this GoogleClassroomCoursework. # noqa: E501 - - Identifier of the coursework assigned by Classroom # noqa: E501 - - :return: The id of this GoogleClassroomCoursework. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this GoogleClassroomCoursework. - - Identifier of the coursework assigned by Classroom # noqa: E501 - - :param id: The id of this GoogleClassroomCoursework. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this GoogleClassroomCoursework. # noqa: E501 - - State of the coursework # noqa: E501 - - :return: The state of this GoogleClassroomCoursework. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this GoogleClassroomCoursework. - - State of the coursework # noqa: E501 - - :param state: The state of this GoogleClassroomCoursework. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def alternate_link(self): - """Gets the alternate_link of this GoogleClassroomCoursework. # noqa: E501 - - Absolute link to this coursework in the Classroom web UI # noqa: E501 - - :return: The alternate_link of this GoogleClassroomCoursework. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this GoogleClassroomCoursework. - - Absolute link to this coursework in the Classroom web UI # noqa: E501 - - :param alternate_link: The alternate_link of this GoogleClassroomCoursework. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - @property - def topic_id(self): - """Gets the topic_id of this GoogleClassroomCoursework. # noqa: E501 - - Identifier of the topic where the assignment is created # noqa: E501 - - :return: The topic_id of this GoogleClassroomCoursework. # noqa: E501 - :rtype: str - """ - return self._topic_id - - @topic_id.setter - def topic_id(self, topic_id): - """Sets the topic_id of this GoogleClassroomCoursework. - - Identifier of the topic where the assignment is created # noqa: E501 - - :param topic_id: The topic_id of this GoogleClassroomCoursework. # noqa: E501 - :type: str - """ - - self._topic_id = topic_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GoogleClassroomCoursework): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GoogleClassroomCoursework): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py deleted file mode 100644 index f8a5a69..0000000 --- a/flat_api/models/google_classroom_submission.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class GoogleClassroomSubmission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, state=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """GoogleClassroomSubmission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this GoogleClassroomSubmission. # noqa: E501 - - Identifier of the coursework submission assigned by Classroom # noqa: E501 - - :return: The id of this GoogleClassroomSubmission. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this GoogleClassroomSubmission. - - Identifier of the coursework submission assigned by Classroom # noqa: E501 - - :param id: The id of this GoogleClassroomSubmission. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this GoogleClassroomSubmission. # noqa: E501 - - State of the submission on Google Classroom # noqa: E501 - - :return: The state of this GoogleClassroomSubmission. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this GoogleClassroomSubmission. - - State of the submission on Google Classroom # noqa: E501 - - :param state: The state of this GoogleClassroomSubmission. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def alternate_link(self): - """Gets the alternate_link of this GoogleClassroomSubmission. # noqa: E501 - - Absolute link to this coursework in the Classroom web UI # noqa: E501 - - :return: The alternate_link of this GoogleClassroomSubmission. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this GoogleClassroomSubmission. - - Absolute link to this coursework in the Classroom web UI # noqa: E501 - - :param alternate_link: The alternate_link of this GoogleClassroomSubmission. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GoogleClassroomSubmission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GoogleClassroomSubmission): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group.py b/flat_api/models/group.py deleted file mode 100644 index b047e79..0000000 --- a/flat_api/models/group.py +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class Group(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'type': 'str', - 'users_count': 'float', - 'read_only': 'bool', - 'organization': 'str', - 'creation_date': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'type': 'type', - 'users_count': 'usersCount', - 'read_only': 'readOnly', - 'organization': 'organization', - 'creation_date': 'creationDate' - } - - def __init__(self, id=None, name=None, type=None, users_count=None, read_only=None, organization=None, creation_date=None, local_vars_configuration=None): # noqa: E501 - """Group - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._type = None - self._users_count = None - self._read_only = None - self._organization = None - self._creation_date = None - self.discriminator = None - - if id is not None: - self.id = id - if name is not None: - self.name = name - if type is not None: - self.type = type - if users_count is not None: - self.users_count = users_count - if read_only is not None: - self.read_only = read_only - if organization is not None: - self.organization = organization - if creation_date is not None: - self.creation_date = creation_date - - @property - def id(self): - """Gets the id of this Group. # noqa: E501 - - The unique identifier of the group # noqa: E501 - - :return: The id of this Group. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Group. - - The unique identifier of the group # noqa: E501 - - :param id: The id of this Group. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this Group. # noqa: E501 - - The display name of the group # noqa: E501 - - :return: The name of this Group. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Group. - - The display name of the group # noqa: E501 - - :param name: The name of this Group. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def type(self): - """Gets the type of this Group. # noqa: E501 - - The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class # noqa: E501 - - :return: The type of this Group. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Group. - - The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class # noqa: E501 - - :param type: The type of this Group. # noqa: E501 - :type: str - """ - allowed_values = ["generic", "classTeachers", "classStudents"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def users_count(self): - """Gets the users_count of this Group. # noqa: E501 - - The number of users in this group # noqa: E501 - - :return: The users_count of this Group. # noqa: E501 - :rtype: float - """ - return self._users_count - - @users_count.setter - def users_count(self, users_count): - """Sets the users_count of this Group. - - The number of users in this group # noqa: E501 - - :param users_count: The users_count of this Group. # noqa: E501 - :type: float - """ - - self._users_count = users_count - - @property - def read_only(self): - """Gets the read_only of this Group. # noqa: E501 - - `True` if the group is set in read-only # noqa: E501 - - :return: The read_only of this Group. # noqa: E501 - :rtype: bool - """ - return self._read_only - - @read_only.setter - def read_only(self, read_only): - """Sets the read_only of this Group. - - `True` if the group is set in read-only # noqa: E501 - - :param read_only: The read_only of this Group. # noqa: E501 - :type: bool - """ - - self._read_only = read_only - - @property - def organization(self): - """Gets the organization of this Group. # noqa: E501 - - If the group is related to an organization, this field will contain the unique identifier of the organization # noqa: E501 - - :return: The organization of this Group. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this Group. - - If the group is related to an organization, this field will contain the unique identifier of the organization # noqa: E501 - - :param organization: The organization of this Group. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def creation_date(self): - """Gets the creation_date of this Group. # noqa: E501 - - The creation date of the group # noqa: E501 - - :return: The creation_date of this Group. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this Group. - - The creation date of the group # noqa: E501 - - :param creation_date: The creation_date of this Group. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Group): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Group): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py deleted file mode 100644 index c0059c8..0000000 --- a/flat_api/models/group_details.py +++ /dev/null @@ -1,289 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class GroupDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'type': 'GroupType', - 'organization': 'str', - 'creation_date': 'datetime', - 'users_count': 'float', - 'read_only': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'type': 'type', - 'organization': 'organization', - 'creation_date': 'creationDate', - 'users_count': 'usersCount', - 'read_only': 'readOnly' - } - - def __init__(self, id=None, name=None, type=None, organization=None, creation_date=None, users_count=None, read_only=None, local_vars_configuration=None): # noqa: E501 - """GroupDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._type = None - self._organization = None - self._creation_date = None - self._users_count = None - self._read_only = None - self.discriminator = None - - if id is not None: - self.id = id - if name is not None: - self.name = name - if type is not None: - self.type = type - if organization is not None: - self.organization = organization - if creation_date is not None: - self.creation_date = creation_date - if users_count is not None: - self.users_count = users_count - if read_only is not None: - self.read_only = read_only - - @property - def id(self): - """Gets the id of this GroupDetails. # noqa: E501 - - The unique identifier of the group # noqa: E501 - - :return: The id of this GroupDetails. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this GroupDetails. - - The unique identifier of the group # noqa: E501 - - :param id: The id of this GroupDetails. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this GroupDetails. # noqa: E501 - - The displayable name of the group # noqa: E501 - - :return: The name of this GroupDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this GroupDetails. - - The displayable name of the group # noqa: E501 - - :param name: The name of this GroupDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def type(self): - """Gets the type of this GroupDetails. # noqa: E501 - - - :return: The type of this GroupDetails. # noqa: E501 - :rtype: GroupType - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this GroupDetails. - - - :param type: The type of this GroupDetails. # noqa: E501 - :type: GroupType - """ - - self._type = type - - @property - def organization(self): - """Gets the organization of this GroupDetails. # noqa: E501 - - The unique identifier of the Organization owning the group # noqa: E501 - - :return: The organization of this GroupDetails. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this GroupDetails. - - The unique identifier of the Organization owning the group # noqa: E501 - - :param organization: The organization of this GroupDetails. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def creation_date(self): - """Gets the creation_date of this GroupDetails. # noqa: E501 - - The date when the group was create # noqa: E501 - - :return: The creation_date of this GroupDetails. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this GroupDetails. - - The date when the group was create # noqa: E501 - - :param creation_date: The creation_date of this GroupDetails. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def users_count(self): - """Gets the users_count of this GroupDetails. # noqa: E501 - - The number of students in this group # noqa: E501 - - :return: The users_count of this GroupDetails. # noqa: E501 - :rtype: float - """ - return self._users_count - - @users_count.setter - def users_count(self, users_count): - """Sets the users_count of this GroupDetails. - - The number of students in this group # noqa: E501 - - :param users_count: The users_count of this GroupDetails. # noqa: E501 - :type: float - """ - - self._users_count = users_count - - @property - def read_only(self): - """Gets the read_only of this GroupDetails. # noqa: E501 - - `true` if the properties and members of this group are in in read-only # noqa: E501 - - :return: The read_only of this GroupDetails. # noqa: E501 - :rtype: bool - """ - return self._read_only - - @read_only.setter - def read_only(self, read_only): - """Sets the read_only of this GroupDetails. - - `true` if the properties and members of this group are in in read-only # noqa: E501 - - :param read_only: The read_only of this GroupDetails. # noqa: E501 - :type: bool - """ - - self._read_only = read_only - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GroupDetails): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GroupDetails): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py deleted file mode 100644 index ce51edd..0000000 --- a/flat_api/models/group_type.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class GroupType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - GENERIC = "generic" - CLASSTEACHERS = "classTeachers" - CLASSSTUDENTS = "classStudents" - - allowable_values = [GENERIC, CLASSTEACHERS, CLASSSTUDENTS] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """GroupType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GroupType): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GroupType): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py deleted file mode 100644 index 845178d..0000000 --- a/flat_api/models/license_mode.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class LicenseMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - CREDIT = "credit" - SITE = "site" - - allowable_values = [CREDIT, SITE] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """LicenseMode - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LicenseMode): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LicenseMode): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py deleted file mode 100644 index ef3f908..0000000 --- a/flat_api/models/license_sources.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class LicenseSources(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ORDER = "order" - TRIAL = "trial" - VOUCHER = "voucher" - DISTRIBUTOR = "distributor" - SUBSCRIPTION = "subscription" - APPSTORE = "appStore" - - allowable_values = [ORDER, TRIAL, VOUCHER, DISTRIBUTOR, SUBSCRIPTION, APPSTORE] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """LicenseSources - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LicenseSources): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LicenseSources): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py deleted file mode 100644 index 301f631..0000000 --- a/flat_api/models/lms_name.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class LmsName(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - CANVAS = "canvas" - MOODLE = "moodle" - SCHOOLOGY = "schoology" - BLACKBOARD = "blackboard" - DESIRE2LEARN = "desire2learn" - SAKAI = "sakai" - SCHOOLBOX = "schoolbox" - OTHER = "other" - - allowable_values = [CANVAS, MOODLE, SCHOOLOGY, BLACKBOARD, DESIRE2LEARN, SAKAI, SCHOOLBOX, OTHER] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """LmsName - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LmsName): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LmsName): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py deleted file mode 100644 index e087a4f..0000000 --- a/flat_api/models/lti_credentials.py +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class LtiCredentials(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'lms': 'LmsName', - 'organization': 'str', - 'creator': 'str', - 'creation_date': 'datetime', - 'last_usage': 'datetime', - 'consumer_key': 'str', - 'consumer_secret': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'lms': 'lms', - 'organization': 'organization', - 'creator': 'creator', - 'creation_date': 'creationDate', - 'last_usage': 'lastUsage', - 'consumer_key': 'consumerKey', - 'consumer_secret': 'consumerSecret' - } - - def __init__(self, id=None, name=None, lms=None, organization=None, creator=None, creation_date=None, last_usage=None, consumer_key=None, consumer_secret=None, local_vars_configuration=None): # noqa: E501 - """LtiCredentials - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._lms = None - self._organization = None - self._creator = None - self._creation_date = None - self._last_usage = None - self._consumer_key = None - self._consumer_secret = None - self.discriminator = None - - if id is not None: - self.id = id - if name is not None: - self.name = name - if lms is not None: - self.lms = lms - if organization is not None: - self.organization = organization - if creator is not None: - self.creator = creator - if creation_date is not None: - self.creation_date = creation_date - if last_usage is not None: - self.last_usage = last_usage - if consumer_key is not None: - self.consumer_key = consumer_key - if consumer_secret is not None: - self.consumer_secret = consumer_secret - - @property - def id(self): - """Gets the id of this LtiCredentials. # noqa: E501 - - The unique identifier of this couple of credentials # noqa: E501 - - :return: The id of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this LtiCredentials. - - The unique identifier of this couple of credentials # noqa: E501 - - :param id: The id of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this LtiCredentials. # noqa: E501 - - Name of the couple of credentials # noqa: E501 - - :return: The name of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this LtiCredentials. - - Name of the couple of credentials # noqa: E501 - - :param name: The name of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def lms(self): - """Gets the lms of this LtiCredentials. # noqa: E501 - - - :return: The lms of this LtiCredentials. # noqa: E501 - :rtype: LmsName - """ - return self._lms - - @lms.setter - def lms(self, lms): - """Sets the lms of this LtiCredentials. - - - :param lms: The lms of this LtiCredentials. # noqa: E501 - :type: LmsName - """ - - self._lms = lms - - @property - def organization(self): - """Gets the organization of this LtiCredentials. # noqa: E501 - - The unique identifier of the Organization associated to these credentials # noqa: E501 - - :return: The organization of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this LtiCredentials. - - The unique identifier of the Organization associated to these credentials # noqa: E501 - - :param organization: The organization of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def creator(self): - """Gets the creator of this LtiCredentials. # noqa: E501 - - Unique identifier of the user who created these credentials # noqa: E501 - - :return: The creator of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this LtiCredentials. - - Unique identifier of the user who created these credentials # noqa: E501 - - :param creator: The creator of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._creator = creator - - @property - def creation_date(self): - """Gets the creation_date of this LtiCredentials. # noqa: E501 - - The creation date of thse credentials # noqa: E501 - - :return: The creation_date of this LtiCredentials. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this LtiCredentials. - - The creation date of thse credentials # noqa: E501 - - :param creation_date: The creation_date of this LtiCredentials. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def last_usage(self): - """Gets the last_usage of this LtiCredentials. # noqa: E501 - - The last time these credentials were used # noqa: E501 - - :return: The last_usage of this LtiCredentials. # noqa: E501 - :rtype: datetime - """ - return self._last_usage - - @last_usage.setter - def last_usage(self, last_usage): - """Sets the last_usage of this LtiCredentials. - - The last time these credentials were used # noqa: E501 - - :param last_usage: The last_usage of this LtiCredentials. # noqa: E501 - :type: datetime - """ - - self._last_usage = last_usage - - @property - def consumer_key(self): - """Gets the consumer_key of this LtiCredentials. # noqa: E501 - - OAuth 1 Consumer Key # noqa: E501 - - :return: The consumer_key of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._consumer_key - - @consumer_key.setter - def consumer_key(self, consumer_key): - """Sets the consumer_key of this LtiCredentials. - - OAuth 1 Consumer Key # noqa: E501 - - :param consumer_key: The consumer_key of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._consumer_key = consumer_key - - @property - def consumer_secret(self): - """Gets the consumer_secret of this LtiCredentials. # noqa: E501 - - OAuth 1 Consumer Secret # noqa: E501 - - :return: The consumer_secret of this LtiCredentials. # noqa: E501 - :rtype: str - """ - return self._consumer_secret - - @consumer_secret.setter - def consumer_secret(self, consumer_secret): - """Sets the consumer_secret of this LtiCredentials. - - OAuth 1 Consumer Secret # noqa: E501 - - :param consumer_secret: The consumer_secret of this LtiCredentials. # noqa: E501 - :type: str - """ - - self._consumer_secret = consumer_secret - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LtiCredentials): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LtiCredentials): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py deleted file mode 100644 index 7509ef2..0000000 --- a/flat_api/models/lti_credentials_creation.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class LtiCredentialsCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'lms': 'LmsName' - } - - attribute_map = { - 'name': 'name', - 'lms': 'lms' - } - - def __init__(self, name=None, lms=None, local_vars_configuration=None): # noqa: E501 - """LtiCredentialsCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._lms = None - self.discriminator = None - - self.name = name - self.lms = lms - - @property - def name(self): - """Gets the name of this LtiCredentialsCreation. # noqa: E501 - - Name of the couple of credentials # noqa: E501 - - :return: The name of this LtiCredentialsCreation. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this LtiCredentialsCreation. - - Name of the couple of credentials # noqa: E501 - - :param name: The name of this LtiCredentialsCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - name is not None and len(name) > 300): - raise ValueError("Invalid value for `name`, length must be less than or equal to `300`") # noqa: E501 - - self._name = name - - @property - def lms(self): - """Gets the lms of this LtiCredentialsCreation. # noqa: E501 - - - :return: The lms of this LtiCredentialsCreation. # noqa: E501 - :rtype: LmsName - """ - return self._lms - - @lms.setter - def lms(self, lms): - """Sets the lms of this LtiCredentialsCreation. - - - :param lms: The lms of this LtiCredentialsCreation. # noqa: E501 - :type: LmsName - """ - if self.local_vars_configuration.client_side_validation and lms is None: # noqa: E501 - raise ValueError("Invalid value for `lms`, must not be `None`") # noqa: E501 - - self._lms = lms - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LtiCredentialsCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, LtiCredentialsCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py deleted file mode 100644 index 660258e..0000000 --- a/flat_api/models/media_attachment.py +++ /dev/null @@ -1,687 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class MediaAttachment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'score': 'str', - 'revision': 'str', - 'worksheet': 'str', - 'track': 'str', - 'sharing_mode': 'MediaScoreSharingMode', - 'lock_score_template': 'bool', - 'title': 'str', - 'description': 'str', - 'html': 'str', - 'html_width': 'str', - 'html_height': 'str', - 'url': 'str', - 'thumbnail_url': 'str', - 'thumbnail_width': 'int', - 'thumbnail_height': 'int', - 'author_name': 'str', - 'author_url': 'str', - 'icon_url': 'str', - 'mime_type': 'str', - 'google_drive_file_id': 'str' - } - - attribute_map = { - 'type': 'type', - 'score': 'score', - 'revision': 'revision', - 'worksheet': 'worksheet', - 'track': 'track', - 'sharing_mode': 'sharingMode', - 'lock_score_template': 'lockScoreTemplate', - 'title': 'title', - 'description': 'description', - 'html': 'html', - 'html_width': 'htmlWidth', - 'html_height': 'htmlHeight', - 'url': 'url', - 'thumbnail_url': 'thumbnailUrl', - 'thumbnail_width': 'thumbnailWidth', - 'thumbnail_height': 'thumbnailHeight', - 'author_name': 'authorName', - 'author_url': 'authorUrl', - 'icon_url': 'iconUrl', - 'mime_type': 'mimeType', - 'google_drive_file_id': 'googleDriveFileId' - } - - def __init__(self, type=None, score=None, revision=None, worksheet=None, track=None, sharing_mode=None, lock_score_template=None, title=None, description=None, html=None, html_width=None, html_height=None, url=None, thumbnail_url=None, thumbnail_width=None, thumbnail_height=None, author_name=None, author_url=None, icon_url=None, mime_type=None, google_drive_file_id=None, local_vars_configuration=None): # noqa: E501 - """MediaAttachment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._score = None - self._revision = None - self._worksheet = None - self._track = None - self._sharing_mode = None - self._lock_score_template = None - self._title = None - self._description = None - self._html = None - self._html_width = None - self._html_height = None - self._url = None - self._thumbnail_url = None - self._thumbnail_width = None - self._thumbnail_height = None - self._author_name = None - self._author_url = None - self._icon_url = None - self._mime_type = None - self._google_drive_file_id = None - self.discriminator = None - - if type is not None: - self.type = type - if score is not None: - self.score = score - if revision is not None: - self.revision = revision - if worksheet is not None: - self.worksheet = worksheet - if track is not None: - self.track = track - if sharing_mode is not None: - self.sharing_mode = sharing_mode - if lock_score_template is not None: - self.lock_score_template = lock_score_template - if title is not None: - self.title = title - if description is not None: - self.description = description - if html is not None: - self.html = html - if html_width is not None: - self.html_width = html_width - if html_height is not None: - self.html_height = html_height - if url is not None: - self.url = url - if thumbnail_url is not None: - self.thumbnail_url = thumbnail_url - if thumbnail_width is not None: - self.thumbnail_width = thumbnail_width - if thumbnail_height is not None: - self.thumbnail_height = thumbnail_height - if author_name is not None: - self.author_name = author_name - if author_url is not None: - self.author_url = author_url - if icon_url is not None: - self.icon_url = icon_url - if mime_type is not None: - self.mime_type = mime_type - if google_drive_file_id is not None: - self.google_drive_file_id = google_drive_file_id - - @property - def type(self): - """Gets the type of this MediaAttachment. # noqa: E501 - - 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. # noqa: E501 - - :return: The type of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this MediaAttachment. - - 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. # noqa: E501 - - :param type: The type of this MediaAttachment. # noqa: E501 - :type: str - """ - allowed_values = ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def score(self): - """Gets the score of this MediaAttachment. # noqa: E501 - - An unique Flat score identifier # noqa: E501 - - :return: The score of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this MediaAttachment. - - An unique Flat score identifier # noqa: E501 - - :param score: The score of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def revision(self): - """Gets the revision of this MediaAttachment. # noqa: E501 - - An unique revision identifier of a score # noqa: E501 - - :return: The revision of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this MediaAttachment. - - An unique revision identifier of a score # noqa: E501 - - :param revision: The revision of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._revision = revision - - @property - def worksheet(self): - """Gets the worksheet of this MediaAttachment. # noqa: E501 - - An unique worksheet identifier # noqa: E501 - - :return: The worksheet of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._worksheet - - @worksheet.setter - def worksheet(self, worksheet): - """Sets the worksheet of this MediaAttachment. - - An unique worksheet identifier # noqa: E501 - - :param worksheet: The worksheet of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._worksheet = worksheet - - @property - def track(self): - """Gets the track of this MediaAttachment. # noqa: E501 - - A unique track identifier # noqa: E501 - - :return: The track of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._track - - @track.setter - def track(self, track): - """Sets the track of this MediaAttachment. - - A unique track identifier # noqa: E501 - - :param track: The track of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._track = track - - @property - def sharing_mode(self): - """Gets the sharing_mode of this MediaAttachment. # noqa: E501 - - - :return: The sharing_mode of this MediaAttachment. # noqa: E501 - :rtype: MediaScoreSharingMode - """ - return self._sharing_mode - - @sharing_mode.setter - def sharing_mode(self, sharing_mode): - """Sets the sharing_mode of this MediaAttachment. - - - :param sharing_mode: The sharing_mode of this MediaAttachment. # noqa: E501 - :type: MediaScoreSharingMode - """ - - self._sharing_mode = sharing_mode - - @property - def lock_score_template(self): - """Gets the lock_score_template of this MediaAttachment. # noqa: E501 - - To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 - - :return: The lock_score_template of this MediaAttachment. # noqa: E501 - :rtype: bool - """ - return self._lock_score_template - - @lock_score_template.setter - def lock_score_template(self, lock_score_template): - """Sets the lock_score_template of this MediaAttachment. - - To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. # noqa: E501 - - :param lock_score_template: The lock_score_template of this MediaAttachment. # noqa: E501 - :type: bool - """ - - self._lock_score_template = lock_score_template - - @property - def title(self): - """Gets the title of this MediaAttachment. # noqa: E501 - - The resolved title of the attachment # noqa: E501 - - :return: The title of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this MediaAttachment. - - The resolved title of the attachment # noqa: E501 - - :param title: The title of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def description(self): - """Gets the description of this MediaAttachment. # noqa: E501 - - The resolved description of the attachment # noqa: E501 - - :return: The description of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this MediaAttachment. - - The resolved description of the attachment # noqa: E501 - - :param description: The description of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def html(self): - """Gets the html of this MediaAttachment. # noqa: E501 - - If the attachment type is `rich` or `video`, the HTML code of the media to display # noqa: E501 - - :return: The html of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._html - - @html.setter - def html(self, html): - """Sets the html of this MediaAttachment. - - If the attachment type is `rich` or `video`, the HTML code of the media to display # noqa: E501 - - :param html: The html of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._html = html - - @property - def html_width(self): - """Gets the html_width of this MediaAttachment. # noqa: E501 - - If the `html` is available, the width of the widget # noqa: E501 - - :return: The html_width of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._html_width - - @html_width.setter - def html_width(self, html_width): - """Sets the html_width of this MediaAttachment. - - If the `html` is available, the width of the widget # noqa: E501 - - :param html_width: The html_width of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._html_width = html_width - - @property - def html_height(self): - """Gets the html_height of this MediaAttachment. # noqa: E501 - - If the `html` is available, the height of the widget # noqa: E501 - - :return: The html_height of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._html_height - - @html_height.setter - def html_height(self, html_height): - """Sets the html_height of this MediaAttachment. - - If the `html` is available, the height of the widget # noqa: E501 - - :param html_height: The html_height of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._html_height = html_height - - @property - def url(self): - """Gets the url of this MediaAttachment. # noqa: E501 - - The url of the attachment # noqa: E501 - - :return: The url of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this MediaAttachment. - - The url of the attachment # noqa: E501 - - :param url: The url of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._url = url - - @property - def thumbnail_url(self): - """Gets the thumbnail_url of this MediaAttachment. # noqa: E501 - - If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment # noqa: E501 - - :return: The thumbnail_url of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._thumbnail_url - - @thumbnail_url.setter - def thumbnail_url(self, thumbnail_url): - """Sets the thumbnail_url of this MediaAttachment. - - If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment # noqa: E501 - - :param thumbnail_url: The thumbnail_url of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._thumbnail_url = thumbnail_url - - @property - def thumbnail_width(self): - """Gets the thumbnail_width of this MediaAttachment. # noqa: E501 - - If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 - - :return: The thumbnail_width of this MediaAttachment. # noqa: E501 - :rtype: int - """ - return self._thumbnail_width - - @thumbnail_width.setter - def thumbnail_width(self, thumbnail_width): - """Sets the thumbnail_width of this MediaAttachment. - - If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 - - :param thumbnail_width: The thumbnail_width of this MediaAttachment. # noqa: E501 - :type: int - """ - - self._thumbnail_width = thumbnail_width - - @property - def thumbnail_height(self): - """Gets the thumbnail_height of this MediaAttachment. # noqa: E501 - - If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 - - :return: The thumbnail_height of this MediaAttachment. # noqa: E501 - :rtype: int - """ - return self._thumbnail_height - - @thumbnail_height.setter - def thumbnail_height(self, thumbnail_height): - """Sets the thumbnail_height of this MediaAttachment. - - If the `thumbnailUrl` is available, the width of the thumbnail # noqa: E501 - - :param thumbnail_height: The thumbnail_height of this MediaAttachment. # noqa: E501 - :type: int - """ - - self._thumbnail_height = thumbnail_height - - @property - def author_name(self): - """Gets the author_name of this MediaAttachment. # noqa: E501 - - The resolved author name of the attachment # noqa: E501 - - :return: The author_name of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._author_name - - @author_name.setter - def author_name(self, author_name): - """Sets the author_name of this MediaAttachment. - - The resolved author name of the attachment # noqa: E501 - - :param author_name: The author_name of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._author_name = author_name - - @property - def author_url(self): - """Gets the author_url of this MediaAttachment. # noqa: E501 - - The resolved author url of the attachment # noqa: E501 - - :return: The author_url of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._author_url - - @author_url.setter - def author_url(self, author_url): - """Sets the author_url of this MediaAttachment. - - The resolved author url of the attachment # noqa: E501 - - :param author_url: The author_url of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._author_url = author_url - - @property - def icon_url(self): - """Gets the icon_url of this MediaAttachment. # noqa: E501 - - The URL of the icon # noqa: E501 - - :return: The icon_url of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._icon_url - - @icon_url.setter - def icon_url(self, icon_url): - """Sets the icon_url of this MediaAttachment. - - The URL of the icon # noqa: E501 - - :param icon_url: The icon_url of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._icon_url = icon_url - - @property - def mime_type(self): - """Gets the mime_type of this MediaAttachment. # noqa: E501 - - The mine type of the file # noqa: E501 - - :return: The mime_type of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._mime_type - - @mime_type.setter - def mime_type(self, mime_type): - """Sets the mime_type of this MediaAttachment. - - The mine type of the file # noqa: E501 - - :param mime_type: The mime_type of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._mime_type = mime_type - - @property - def google_drive_file_id(self): - """Gets the google_drive_file_id of this MediaAttachment. # noqa: E501 - - The ID of the Google Drive File # noqa: E501 - - :return: The google_drive_file_id of this MediaAttachment. # noqa: E501 - :rtype: str - """ - return self._google_drive_file_id - - @google_drive_file_id.setter - def google_drive_file_id(self, google_drive_file_id): - """Sets the google_drive_file_id of this MediaAttachment. - - The ID of the Google Drive File # noqa: E501 - - :param google_drive_file_id: The google_drive_file_id of this MediaAttachment. # noqa: E501 - :type: str - """ - - self._google_drive_file_id = google_drive_file_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MediaAttachment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MediaAttachment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py deleted file mode 100644 index 0ee9289..0000000 --- a/flat_api/models/media_score_sharing_mode.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class MediaScoreSharingMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - READ = "read" - WRITE = "write" - COPY = "copy" - PERFORMANCE = "performance" - - allowable_values = [READ, WRITE, COPY, PERFORMANCE] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """MediaScoreSharingMode - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MediaScoreSharingMode): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MediaScoreSharingMode): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py deleted file mode 100644 index 4bfd9e5..0000000 --- a/flat_api/models/microsoft_graph_assignment.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class MicrosoftGraphAssignment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'str', - 'alternate_link': 'str', - 'categories': 'list[str]' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'alternate_link': 'alternateLink', - 'categories': 'categories' - } - - def __init__(self, id=None, state=None, alternate_link=None, categories=None, local_vars_configuration=None): # noqa: E501 - """MicrosoftGraphAssignment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._alternate_link = None - self._categories = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if alternate_link is not None: - self.alternate_link = alternate_link - if categories is not None: - self.categories = categories - - @property - def id(self): - """Gets the id of this MicrosoftGraphAssignment. # noqa: E501 - - Identifier of the assignement assigned by Microsoft Teams # noqa: E501 - - :return: The id of this MicrosoftGraphAssignment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this MicrosoftGraphAssignment. - - Identifier of the assignement assigned by Microsoft Teams # noqa: E501 - - :param id: The id of this MicrosoftGraphAssignment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this MicrosoftGraphAssignment. # noqa: E501 - - State of the assignment # noqa: E501 - - :return: The state of this MicrosoftGraphAssignment. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this MicrosoftGraphAssignment. - - State of the assignment # noqa: E501 - - :param state: The state of this MicrosoftGraphAssignment. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def alternate_link(self): - """Gets the alternate_link of this MicrosoftGraphAssignment. # noqa: E501 - - Absolute link to this assignement in the Microsoft Teams web UI # noqa: E501 - - :return: The alternate_link of this MicrosoftGraphAssignment. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this MicrosoftGraphAssignment. - - Absolute link to this assignement in the Microsoft Teams web UI # noqa: E501 - - :param alternate_link: The alternate_link of this MicrosoftGraphAssignment. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - @property - def categories(self): - """Gets the categories of this MicrosoftGraphAssignment. # noqa: E501 - - List of categories where this assignment is published under # noqa: E501 - - :return: The categories of this MicrosoftGraphAssignment. # noqa: E501 - :rtype: list[str] - """ - return self._categories - - @categories.setter - def categories(self, categories): - """Sets the categories of this MicrosoftGraphAssignment. - - List of categories where this assignment is published under # noqa: E501 - - :param categories: The categories of this MicrosoftGraphAssignment. # noqa: E501 - :type: list[str] - """ - - self._categories = categories - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MicrosoftGraphAssignment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MicrosoftGraphAssignment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py deleted file mode 100644 index 67b0770..0000000 --- a/flat_api/models/microsoft_graph_submission.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class MicrosoftGraphSubmission(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'str', - 'alternate_link': 'str' - } - - attribute_map = { - 'id': 'id', - 'state': 'state', - 'alternate_link': 'alternateLink' - } - - def __init__(self, id=None, state=None, alternate_link=None, local_vars_configuration=None): # noqa: E501 - """MicrosoftGraphSubmission - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self._alternate_link = None - self.discriminator = None - - if id is not None: - self.id = id - if state is not None: - self.state = state - if alternate_link is not None: - self.alternate_link = alternate_link - - @property - def id(self): - """Gets the id of this MicrosoftGraphSubmission. # noqa: E501 - - Identifier of the submission assigned by Microsoft Teams # noqa: E501 - - :return: The id of this MicrosoftGraphSubmission. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this MicrosoftGraphSubmission. - - Identifier of the submission assigned by Microsoft Teams # noqa: E501 - - :param id: The id of this MicrosoftGraphSubmission. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def state(self): - """Gets the state of this MicrosoftGraphSubmission. # noqa: E501 - - State of the submission # noqa: E501 - - :return: The state of this MicrosoftGraphSubmission. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this MicrosoftGraphSubmission. - - State of the submission # noqa: E501 - - :param state: The state of this MicrosoftGraphSubmission. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def alternate_link(self): - """Gets the alternate_link of this MicrosoftGraphSubmission. # noqa: E501 - - Absolute link to this submission in the Microsoft Teams web UI # noqa: E501 - - :return: The alternate_link of this MicrosoftGraphSubmission. # noqa: E501 - :rtype: str - """ - return self._alternate_link - - @alternate_link.setter - def alternate_link(self, alternate_link): - """Sets the alternate_link of this MicrosoftGraphSubmission. - - Absolute link to this submission in the Microsoft Teams web UI # noqa: E501 - - :param alternate_link: The alternate_link of this MicrosoftGraphSubmission. # noqa: E501 - :type: str - """ - - self._alternate_link = alternate_link - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MicrosoftGraphSubmission): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MicrosoftGraphSubmission): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py deleted file mode 100644 index 6c46dab..0000000 --- a/flat_api/models/organization_invitation.py +++ /dev/null @@ -1,289 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationInvitation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'organization': 'str', - 'organization_role': 'OrganizationRoles', - 'custom_code': 'str', - 'email': 'str', - 'invited_by': 'str', - 'used_by': 'str' - } - - attribute_map = { - 'id': 'id', - 'organization': 'organization', - 'organization_role': 'organizationRole', - 'custom_code': 'customCode', - 'email': 'email', - 'invited_by': 'invitedBy', - 'used_by': 'usedBy' - } - - def __init__(self, id=None, organization=None, organization_role=None, custom_code=None, email=None, invited_by=None, used_by=None, local_vars_configuration=None): # noqa: E501 - """OrganizationInvitation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._organization = None - self._organization_role = None - self._custom_code = None - self._email = None - self._invited_by = None - self._used_by = None - self.discriminator = None - - if id is not None: - self.id = id - if organization is not None: - self.organization = organization - if organization_role is not None: - self.organization_role = organization_role - if custom_code is not None: - self.custom_code = custom_code - if email is not None: - self.email = email - if invited_by is not None: - self.invited_by = invited_by - if used_by is not None: - self.used_by = used_by - - @property - def id(self): - """Gets the id of this OrganizationInvitation. # noqa: E501 - - The invitation unique identifier # noqa: E501 - - :return: The id of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OrganizationInvitation. - - The invitation unique identifier # noqa: E501 - - :param id: The id of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def organization(self): - """Gets the organization of this OrganizationInvitation. # noqa: E501 - - The unique identifier of the Organization owning this class # noqa: E501 - - :return: The organization of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this OrganizationInvitation. - - The unique identifier of the Organization owning this class # noqa: E501 - - :param organization: The organization of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def organization_role(self): - """Gets the organization_role of this OrganizationInvitation. # noqa: E501 - - - :return: The organization_role of this OrganizationInvitation. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this OrganizationInvitation. - - - :param organization_role: The organization_role of this OrganizationInvitation. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def custom_code(self): - """Gets the custom_code of this OrganizationInvitation. # noqa: E501 - - Enrollment code to use when joining this organization # noqa: E501 - - :return: The custom_code of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._custom_code - - @custom_code.setter - def custom_code(self, custom_code): - """Sets the custom_code of this OrganizationInvitation. - - Enrollment code to use when joining this organization # noqa: E501 - - :param custom_code: The custom_code of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._custom_code = custom_code - - @property - def email(self): - """Gets the email of this OrganizationInvitation. # noqa: E501 - - The email address this invitation was sent to # noqa: E501 - - :return: The email of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationInvitation. - - The email address this invitation was sent to # noqa: E501 - - :param email: The email of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def invited_by(self): - """Gets the invited_by of this OrganizationInvitation. # noqa: E501 - - The unique identifier of the User who created this invitation # noqa: E501 - - :return: The invited_by of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._invited_by - - @invited_by.setter - def invited_by(self, invited_by): - """Sets the invited_by of this OrganizationInvitation. - - The unique identifier of the User who created this invitation # noqa: E501 - - :param invited_by: The invited_by of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._invited_by = invited_by - - @property - def used_by(self): - """Gets the used_by of this OrganizationInvitation. # noqa: E501 - - The unique identifier of the User who used this invitation # noqa: E501 - - :return: The used_by of this OrganizationInvitation. # noqa: E501 - :rtype: str - """ - return self._used_by - - @used_by.setter - def used_by(self, used_by): - """Sets the used_by of this OrganizationInvitation. - - The unique identifier of the User who used this invitation # noqa: E501 - - :param used_by: The used_by of this OrganizationInvitation. # noqa: E501 - :type: str - """ - - self._used_by = used_by - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationInvitation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationInvitation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py deleted file mode 100644 index 15e553b..0000000 --- a/flat_api/models/organization_invitation_creation.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationInvitationCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'email': 'str', - 'organization_role': 'OrganizationRoles' - } - - attribute_map = { - 'email': 'email', - 'organization_role': 'organizationRole' - } - - def __init__(self, email=None, organization_role=None, local_vars_configuration=None): # noqa: E501 - """OrganizationInvitationCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._email = None - self._organization_role = None - self.discriminator = None - - if email is not None: - self.email = email - if organization_role is not None: - self.organization_role = organization_role - - @property - def email(self): - """Gets the email of this OrganizationInvitationCreation. # noqa: E501 - - The email address you want to send the invitation to # noqa: E501 - - :return: The email of this OrganizationInvitationCreation. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationInvitationCreation. - - The email address you want to send the invitation to # noqa: E501 - - :param email: The email of this OrganizationInvitationCreation. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def organization_role(self): - """Gets the organization_role of this OrganizationInvitationCreation. # noqa: E501 - - - :return: The organization_role of this OrganizationInvitationCreation. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this OrganizationInvitationCreation. - - - :param organization_role: The organization_role of this OrganizationInvitationCreation. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationInvitationCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationInvitationCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py deleted file mode 100644 index 00ac1c2..0000000 --- a/flat_api/models/organization_roles.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationRoles(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ADMIN = "admin" - BILLING = "billing" - TEACHER = "teacher" - USER = "user" - - allowable_values = [ADMIN, BILLING, TEACHER, USER] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """OrganizationRoles - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationRoles): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationRoles): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py deleted file mode 100644 index 3806e81..0000000 --- a/flat_api/models/organization_user_access_token_creation.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationUserAccessTokenCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'scopes': 'list[AppScopes]' - } - - attribute_map = { - 'scopes': 'scopes' - } - - def __init__(self, scopes=None, local_vars_configuration=None): # noqa: E501 - """OrganizationUserAccessTokenCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._scopes = None - self.discriminator = None - - self.scopes = scopes - - @property - def scopes(self): - """Gets the scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 - - List of requested scopes for this credential # noqa: E501 - - :return: The scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 - :rtype: list[AppScopes] - """ - return self._scopes - - @scopes.setter - def scopes(self, scopes): - """Sets the scopes of this OrganizationUserAccessTokenCreation. - - List of requested scopes for this credential # noqa: E501 - - :param scopes: The scopes of this OrganizationUserAccessTokenCreation. # noqa: E501 - :type: list[AppScopes] - """ - if self.local_vars_configuration.client_side_validation and scopes is None: # noqa: E501 - raise ValueError("Invalid value for `scopes`, must not be `None`") # noqa: E501 - - self._scopes = scopes - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationUserAccessTokenCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationUserAccessTokenCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_signin_link.py b/flat_api/models/organization_user_signin_link.py deleted file mode 100644 index 3896db0..0000000 --- a/flat_api/models/organization_user_signin_link.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationUserSigninLink(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'url': 'str', - 'expiration_date': 'datetime' - } - - attribute_map = { - 'url': 'url', - 'expiration_date': 'expirationDate' - } - - def __init__(self, url=None, expiration_date=None, local_vars_configuration=None): # noqa: E501 - """OrganizationUserSigninLink - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._url = None - self._expiration_date = None - self.discriminator = None - - if url is not None: - self.url = url - if expiration_date is not None: - self.expiration_date = expiration_date - - @property - def url(self): - """Gets the url of this OrganizationUserSigninLink. # noqa: E501 - - URL to use to sign in to this account # noqa: E501 - - :return: The url of this OrganizationUserSigninLink. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this OrganizationUserSigninLink. - - URL to use to sign in to this account # noqa: E501 - - :param url: The url of this OrganizationUserSigninLink. # noqa: E501 - :type: str - """ - - self._url = url - - @property - def expiration_date(self): - """Gets the expiration_date of this OrganizationUserSigninLink. # noqa: E501 - - Date when the link expires # noqa: E501 - - :return: The expiration_date of this OrganizationUserSigninLink. # noqa: E501 - :rtype: datetime - """ - return self._expiration_date - - @expiration_date.setter - def expiration_date(self, expiration_date): - """Sets the expiration_date of this OrganizationUserSigninLink. - - Date when the link expires # noqa: E501 - - :param expiration_date: The expiration_date of this OrganizationUserSigninLink. # noqa: E501 - :type: datetime - """ - - self._expiration_date = expiration_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationUserSigninLink): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationUserSigninLink): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/organization_user_signin_link_creation.py b/flat_api/models/organization_user_signin_link_creation.py deleted file mode 100644 index 25b953c..0000000 --- a/flat_api/models/organization_user_signin_link_creation.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class OrganizationUserSigninLinkCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'destination_path': 'str' - } - - attribute_map = { - 'destination_path': 'destinationPath' - } - - def __init__(self, destination_path='/', local_vars_configuration=None): # noqa: E501 - """OrganizationUserSigninLinkCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._destination_path = None - self.discriminator = None - - if destination_path is not None: - self.destination_path = destination_path - - @property - def destination_path(self): - """Gets the destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 - - Path to redirect to after signin # noqa: E501 - - :return: The destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 - :rtype: str - """ - return self._destination_path - - @destination_path.setter - def destination_path(self, destination_path): - """Sets the destination_path of this OrganizationUserSigninLinkCreation. - - Path to redirect to after signin # noqa: E501 - - :param destination_path: The destination_path of this OrganizationUserSigninLinkCreation. # noqa: E501 - :type: str - """ - - self._destination_path = destination_path - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationUserSigninLinkCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OrganizationUserSigninLinkCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py deleted file mode 100644 index f1d2136..0000000 --- a/flat_api/models/resource_collaborator.py +++ /dev/null @@ -1,399 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ResourceCollaborator(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'acl_admin': 'bool', - 'is_collaborator': 'bool', - 'group': 'Group', - 'acl_write': 'bool', - 'invited': 'bool', - 'user_email': 'str', - 'collection': 'str', - 'score': 'str', - 'user': 'UserPublic', - 'id': 'str', - 'acl_read': 'bool' - } - - attribute_map = { - 'acl_admin': 'aclAdmin', - 'is_collaborator': 'isCollaborator', - 'group': 'group', - 'acl_write': 'aclWrite', - 'invited': 'invited', - 'user_email': 'userEmail', - 'collection': 'collection', - 'score': 'score', - 'user': 'user', - 'id': 'id', - 'acl_read': 'aclRead' - } - - def __init__(self, acl_admin=False, is_collaborator=False, group=None, acl_write=False, invited=None, user_email=None, collection=None, score=None, user=None, id=None, acl_read=False, local_vars_configuration=None): # noqa: E501 - """ResourceCollaborator - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._acl_admin = None - self._is_collaborator = None - self._group = None - self._acl_write = None - self._invited = None - self._user_email = None - self._collection = None - self._score = None - self._user = None - self._id = None - self._acl_read = None - self.discriminator = None - - if acl_admin is not None: - self.acl_admin = acl_admin - if is_collaborator is not None: - self.is_collaborator = is_collaborator - if group is not None: - self.group = group - if acl_write is not None: - self.acl_write = acl_write - if invited is not None: - self.invited = invited - if user_email is not None: - self.user_email = user_email - if collection is not None: - self.collection = collection - if score is not None: - self.score = score - if user is not None: - self.user = user - if id is not None: - self.id = id - if acl_read is not None: - self.acl_read = acl_read - - @property - def acl_admin(self): - """Gets the acl_admin of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_admin of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_admin - - @acl_admin.setter - def acl_admin(self, acl_admin): - """Sets the acl_admin of this ResourceCollaborator. - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_admin: The acl_admin of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_admin = acl_admin - - @property - def is_collaborator(self): - """Gets the is_collaborator of this ResourceCollaborator. # noqa: E501 - - `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 - - :return: The is_collaborator of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._is_collaborator - - @is_collaborator.setter - def is_collaborator(self, is_collaborator): - """Sets the is_collaborator of this ResourceCollaborator. - - `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 - - :param is_collaborator: The is_collaborator of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._is_collaborator = is_collaborator - - @property - def group(self): - """Gets the group of this ResourceCollaborator. # noqa: E501 - - - :return: The group of this ResourceCollaborator. # noqa: E501 - :rtype: Group - """ - return self._group - - @group.setter - def group(self, group): - """Sets the group of this ResourceCollaborator. - - - :param group: The group of this ResourceCollaborator. # noqa: E501 - :type: Group - """ - - self._group = group - - @property - def acl_write(self): - """Gets the acl_write of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_write of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_write - - @acl_write.setter - def acl_write(self, acl_write): - """Sets the acl_write of this ResourceCollaborator. - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_write: The acl_write of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_write = acl_write - - @property - def invited(self): - """Gets the invited of this ResourceCollaborator. # noqa: E501 - - If this property is `true`, this is still a pending invitation # noqa: E501 - - :return: The invited of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._invited - - @invited.setter - def invited(self, invited): - """Sets the invited of this ResourceCollaborator. - - If this property is `true`, this is still a pending invitation # noqa: E501 - - :param invited: The invited of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._invited = invited - - @property - def user_email(self): - """Gets the user_email of this ResourceCollaborator. # noqa: E501 - - If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 - - :return: The user_email of this ResourceCollaborator. # noqa: E501 - :rtype: str - """ - return self._user_email - - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this ResourceCollaborator. - - If the collaborator is not a user of Flat yet, this field will contain his email. # noqa: E501 - - :param user_email: The user_email of this ResourceCollaborator. # noqa: E501 - :type: str - """ - - self._user_email = user_email - - @property - def collection(self): - """Gets the collection of this ResourceCollaborator. # noqa: E501 - - If this object is a permission of a collection, this property will contain the unique identifier of the collection # noqa: E501 - - :return: The collection of this ResourceCollaborator. # noqa: E501 - :rtype: str - """ - return self._collection - - @collection.setter - def collection(self, collection): - """Sets the collection of this ResourceCollaborator. - - If this object is a permission of a collection, this property will contain the unique identifier of the collection # noqa: E501 - - :param collection: The collection of this ResourceCollaborator. # noqa: E501 - :type: str - """ - - self._collection = collection - - @property - def score(self): - """Gets the score of this ResourceCollaborator. # noqa: E501 - - If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 - - :return: The score of this ResourceCollaborator. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this ResourceCollaborator. - - If this object is a permission of a score, this property will contain the unique identifier of the score # noqa: E501 - - :param score: The score of this ResourceCollaborator. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def user(self): - """Gets the user of this ResourceCollaborator. # noqa: E501 - - - :return: The user of this ResourceCollaborator. # noqa: E501 - :rtype: UserPublic - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ResourceCollaborator. - - - :param user: The user of this ResourceCollaborator. # noqa: E501 - :type: UserPublic - """ - - self._user = user - - @property - def id(self): - """Gets the id of this ResourceCollaborator. # noqa: E501 - - The unique identifier of the permission # noqa: E501 - - :return: The id of this ResourceCollaborator. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ResourceCollaborator. - - The unique identifier of the permission # noqa: E501 - - :param id: The id of this ResourceCollaborator. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def acl_read(self): - """Gets the acl_read of this ResourceCollaborator. # noqa: E501 - - `True` if the current user can read the current document # noqa: E501 - - :return: The acl_read of this ResourceCollaborator. # noqa: E501 - :rtype: bool - """ - return self._acl_read - - @acl_read.setter - def acl_read(self, acl_read): - """Sets the acl_read of this ResourceCollaborator. - - `True` if the current user can read the current document # noqa: E501 - - :param acl_read: The acl_read of this ResourceCollaborator. # noqa: E501 - :type: bool - """ - - self._acl_read = acl_read - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResourceCollaborator): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResourceCollaborator): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py deleted file mode 100644 index a2ddb10..0000000 --- a/flat_api/models/resource_collaborator_creation.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ResourceCollaboratorCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user': 'str', - 'group': 'str', - 'user_email': 'str', - 'user_token': 'str', - 'acl_read': 'bool', - 'acl_write': 'bool', - 'acl_admin': 'bool' - } - - attribute_map = { - 'user': 'user', - 'group': 'group', - 'user_email': 'userEmail', - 'user_token': 'userToken', - 'acl_read': 'aclRead', - 'acl_write': 'aclWrite', - 'acl_admin': 'aclAdmin' - } - - def __init__(self, user=None, group=None, user_email=None, user_token=None, acl_read=True, acl_write=False, acl_admin=False, local_vars_configuration=None): # noqa: E501 - """ResourceCollaboratorCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._user = None - self._group = None - self._user_email = None - self._user_token = None - self._acl_read = None - self._acl_write = None - self._acl_admin = None - self.discriminator = None - - if user is not None: - self.user = user - if group is not None: - self.group = group - if user_email is not None: - self.user_email = user_email - if user_token is not None: - self.user_token = user_token - if acl_read is not None: - self.acl_read = acl_read - if acl_write is not None: - self.acl_write = acl_write - if acl_admin is not None: - self.acl_admin = acl_admin - - @property - def user(self): - """Gets the user of this ResourceCollaboratorCreation. # noqa: E501 - - The unique identifier of a Flat user # noqa: E501 - - :return: The user of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ResourceCollaboratorCreation. - - The unique identifier of a Flat user # noqa: E501 - - :param user: The user of this ResourceCollaboratorCreation. # noqa: E501 - :type: str - """ - - self._user = user - - @property - def group(self): - """Gets the group of this ResourceCollaboratorCreation. # noqa: E501 - - The unique identifier of a Flat group # noqa: E501 - - :return: The group of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: str - """ - return self._group - - @group.setter - def group(self, group): - """Sets the group of this ResourceCollaboratorCreation. - - The unique identifier of a Flat group # noqa: E501 - - :param group: The group of this ResourceCollaboratorCreation. # noqa: E501 - :type: str - """ - - self._group = group - - @property - def user_email(self): - """Gets the user_email of this ResourceCollaboratorCreation. # noqa: E501 - - Fill this field to invite an individual user by email. # noqa: E501 - - :return: The user_email of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: str - """ - return self._user_email - - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this ResourceCollaboratorCreation. - - Fill this field to invite an individual user by email. # noqa: E501 - - :param user_email: The user_email of this ResourceCollaboratorCreation. # noqa: E501 - :type: str - """ - - self._user_email = user_email - - @property - def user_token(self): - """Gets the user_token of this ResourceCollaboratorCreation. # noqa: E501 - - Token received in an invitation to join the score. # noqa: E501 - - :return: The user_token of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: str - """ - return self._user_token - - @user_token.setter - def user_token(self, user_token): - """Sets the user_token of this ResourceCollaboratorCreation. - - Token received in an invitation to join the score. # noqa: E501 - - :param user_token: The user_token of this ResourceCollaboratorCreation. # noqa: E501 - :type: str - """ - - self._user_token = user_token - - @property - def acl_read(self): - """Gets the acl_read of this ResourceCollaboratorCreation. # noqa: E501 - - `True` if the related user can read the score. (probably true if the user has a permission on the document). # noqa: E501 - - :return: The acl_read of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: bool - """ - return self._acl_read - - @acl_read.setter - def acl_read(self, acl_read): - """Sets the acl_read of this ResourceCollaboratorCreation. - - `True` if the related user can read the score. (probably true if the user has a permission on the document). # noqa: E501 - - :param acl_read: The acl_read of this ResourceCollaboratorCreation. # noqa: E501 - :type: bool - """ - - self._acl_read = acl_read - - @property - def acl_write(self): - """Gets the acl_write of this ResourceCollaboratorCreation. # noqa: E501 - - `True` if the related user can modify the score. # noqa: E501 - - :return: The acl_write of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: bool - """ - return self._acl_write - - @acl_write.setter - def acl_write(self, acl_write): - """Sets the acl_write of this ResourceCollaboratorCreation. - - `True` if the related user can modify the score. # noqa: E501 - - :param acl_write: The acl_write of this ResourceCollaboratorCreation. # noqa: E501 - :type: bool - """ - - self._acl_write = acl_write - - @property - def acl_admin(self): - """Gets the acl_admin of this ResourceCollaboratorCreation. # noqa: E501 - - `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document # noqa: E501 - - :return: The acl_admin of this ResourceCollaboratorCreation. # noqa: E501 - :rtype: bool - """ - return self._acl_admin - - @acl_admin.setter - def acl_admin(self, acl_admin): - """Sets the acl_admin of this ResourceCollaboratorCreation. - - `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document # noqa: E501 - - :param acl_admin: The acl_admin of this ResourceCollaboratorCreation. # noqa: E501 - :type: bool - """ - - self._acl_admin = acl_admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResourceCollaboratorCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResourceCollaboratorCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py deleted file mode 100644 index c028194..0000000 --- a/flat_api/models/resource_rights.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ResourceRights(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'acl_read': 'bool', - 'acl_write': 'bool', - 'acl_admin': 'bool', - 'is_collaborator': 'bool' - } - - attribute_map = { - 'acl_read': 'aclRead', - 'acl_write': 'aclWrite', - 'acl_admin': 'aclAdmin', - 'is_collaborator': 'isCollaborator' - } - - def __init__(self, acl_read=False, acl_write=False, acl_admin=False, is_collaborator=False, local_vars_configuration=None): # noqa: E501 - """ResourceRights - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._acl_read = None - self._acl_write = None - self._acl_admin = None - self._is_collaborator = None - self.discriminator = None - - if acl_read is not None: - self.acl_read = acl_read - if acl_write is not None: - self.acl_write = acl_write - if acl_admin is not None: - self.acl_admin = acl_admin - if is_collaborator is not None: - self.is_collaborator = is_collaborator - - @property - def acl_read(self): - """Gets the acl_read of this ResourceRights. # noqa: E501 - - `True` if the current user can read the current document # noqa: E501 - - :return: The acl_read of this ResourceRights. # noqa: E501 - :rtype: bool - """ - return self._acl_read - - @acl_read.setter - def acl_read(self, acl_read): - """Sets the acl_read of this ResourceRights. - - `True` if the current user can read the current document # noqa: E501 - - :param acl_read: The acl_read of this ResourceRights. # noqa: E501 - :type: bool - """ - - self._acl_read = acl_read - - @property - def acl_write(self): - """Gets the acl_write of this ResourceRights. # noqa: E501 - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_write of this ResourceRights. # noqa: E501 - :rtype: bool - """ - return self._acl_write - - @acl_write.setter - def acl_write(self, acl_write): - """Sets the acl_write of this ResourceRights. - - `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_write: The acl_write of this ResourceRights. # noqa: E501 - :type: bool - """ - - self._acl_write = acl_write - - @property - def acl_admin(self): - """Gets the acl_admin of this ResourceRights. # noqa: E501 - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :return: The acl_admin of this ResourceRights. # noqa: E501 - :rtype: bool - """ - return self._acl_admin - - @acl_admin.setter - def acl_admin(self, acl_admin): - """Sets the acl_admin of this ResourceRights. - - `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. # noqa: E501 - - :param acl_admin: The acl_admin of this ResourceRights. # noqa: E501 - :type: bool - """ - - self._acl_admin = acl_admin - - @property - def is_collaborator(self): - """Gets the is_collaborator of this ResourceRights. # noqa: E501 - - `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 - - :return: The is_collaborator of this ResourceRights. # noqa: E501 - :rtype: bool - """ - return self._is_collaborator - - @is_collaborator.setter - def is_collaborator(self, is_collaborator): - """Sets the is_collaborator of this ResourceRights. - - `True` if the current user is a collaborator of the current document (direct or via group). # noqa: E501 - - :param is_collaborator: The is_collaborator of this ResourceRights. # noqa: E501 - :type: bool - """ - - self._is_collaborator = is_collaborator - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResourceRights): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResourceRights): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py deleted file mode 100644 index 631cd6f..0000000 --- a/flat_api/models/score_comment.py +++ /dev/null @@ -1,545 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreComment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'type': 'str', - 'user': 'str', - 'score': 'str', - 'revision': 'str', - 'reply_to': 'str', - 'date': 'datetime', - 'modification_date': 'datetime', - 'comment': 'str', - 'raw_comment': 'str', - 'context': 'ScoreCommentContext', - 'mentions': 'list[str]', - 'resolved': 'bool', - 'resolved_by': 'str', - 'moderation': 'ScoreCommentModeration', - 'spam': 'bool' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'user': 'user', - 'score': 'score', - 'revision': 'revision', - 'reply_to': 'replyTo', - 'date': 'date', - 'modification_date': 'modificationDate', - 'comment': 'comment', - 'raw_comment': 'rawComment', - 'context': 'context', - 'mentions': 'mentions', - 'resolved': 'resolved', - 'resolved_by': 'resolvedBy', - 'moderation': 'moderation', - 'spam': 'spam' - } - - def __init__(self, id=None, type=None, user=None, score=None, revision=None, reply_to=None, date=None, modification_date=None, comment=None, raw_comment=None, context=None, mentions=None, resolved=None, resolved_by=None, moderation=None, spam=None, local_vars_configuration=None): # noqa: E501 - """ScoreComment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._type = None - self._user = None - self._score = None - self._revision = None - self._reply_to = None - self._date = None - self._modification_date = None - self._comment = None - self._raw_comment = None - self._context = None - self._mentions = None - self._resolved = None - self._resolved_by = None - self._moderation = None - self._spam = None - self.discriminator = None - - if id is not None: - self.id = id - if type is not None: - self.type = type - if user is not None: - self.user = user - if score is not None: - self.score = score - if revision is not None: - self.revision = revision - if reply_to is not None: - self.reply_to = reply_to - if date is not None: - self.date = date - if modification_date is not None: - self.modification_date = modification_date - if comment is not None: - self.comment = comment - if raw_comment is not None: - self.raw_comment = raw_comment - if context is not None: - self.context = context - if mentions is not None: - self.mentions = mentions - if resolved is not None: - self.resolved = resolved - if resolved_by is not None: - self.resolved_by = resolved_by - if moderation is not None: - self.moderation = moderation - if spam is not None: - self.spam = spam - - @property - def id(self): - """Gets the id of this ScoreComment. # noqa: E501 - - The comment unique identifier # noqa: E501 - - :return: The id of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreComment. - - The comment unique identifier # noqa: E501 - - :param id: The id of this ScoreComment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def type(self): - """Gets the type of this ScoreComment. # noqa: E501 - - The type of the comment # noqa: E501 - - :return: The type of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ScoreComment. - - The type of the comment # noqa: E501 - - :param type: The type of this ScoreComment. # noqa: E501 - :type: str - """ - allowed_values = ["document", "inline"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def user(self): - """Gets the user of this ScoreComment. # noqa: E501 - - The author unique identifier # noqa: E501 - - :return: The user of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ScoreComment. - - The author unique identifier # noqa: E501 - - :param user: The user of this ScoreComment. # noqa: E501 - :type: str - """ - - self._user = user - - @property - def score(self): - """Gets the score of this ScoreComment. # noqa: E501 - - The unique identifier of the score where the comment was posted # noqa: E501 - - :return: The score of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this ScoreComment. - - The unique identifier of the score where the comment was posted # noqa: E501 - - :param score: The score of this ScoreComment. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def revision(self): - """Gets the revision of this ScoreComment. # noqa: E501 - - The unique identifier of revision the comment was posted # noqa: E501 - - :return: The revision of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this ScoreComment. - - The unique identifier of revision the comment was posted # noqa: E501 - - :param revision: The revision of this ScoreComment. # noqa: E501 - :type: str - """ - - self._revision = revision - - @property - def reply_to(self): - """Gets the reply_to of this ScoreComment. # noqa: E501 - - When the comment is a reply to another comment, the unique identifier of the parent comment # noqa: E501 - - :return: The reply_to of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._reply_to - - @reply_to.setter - def reply_to(self, reply_to): - """Sets the reply_to of this ScoreComment. - - When the comment is a reply to another comment, the unique identifier of the parent comment # noqa: E501 - - :param reply_to: The reply_to of this ScoreComment. # noqa: E501 - :type: str - """ - - self._reply_to = reply_to - - @property - def date(self): - """Gets the date of this ScoreComment. # noqa: E501 - - The date when the comment was posted # noqa: E501 - - :return: The date of this ScoreComment. # noqa: E501 - :rtype: datetime - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this ScoreComment. - - The date when the comment was posted # noqa: E501 - - :param date: The date of this ScoreComment. # noqa: E501 - :type: datetime - """ - - self._date = date - - @property - def modification_date(self): - """Gets the modification_date of this ScoreComment. # noqa: E501 - - The date of the last comment modification # noqa: E501 - - :return: The modification_date of this ScoreComment. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ScoreComment. - - The date of the last comment modification # noqa: E501 - - :param modification_date: The modification_date of this ScoreComment. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def comment(self): - """Gets the comment of this ScoreComment. # noqa: E501 - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :return: The comment of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this ScoreComment. - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :param comment: The comment of this ScoreComment. # noqa: E501 - :type: str - """ - - self._comment = comment - - @property - def raw_comment(self): - """Gets the raw_comment of this ScoreComment. # noqa: E501 - - A raw version of the comment, that can be displayed without parsing the mentions. # noqa: E501 - - :return: The raw_comment of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._raw_comment - - @raw_comment.setter - def raw_comment(self, raw_comment): - """Sets the raw_comment of this ScoreComment. - - A raw version of the comment, that can be displayed without parsing the mentions. # noqa: E501 - - :param raw_comment: The raw_comment of this ScoreComment. # noqa: E501 - :type: str - """ - - self._raw_comment = raw_comment - - @property - def context(self): - """Gets the context of this ScoreComment. # noqa: E501 - - - :return: The context of this ScoreComment. # noqa: E501 - :rtype: ScoreCommentContext - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this ScoreComment. - - - :param context: The context of this ScoreComment. # noqa: E501 - :type: ScoreCommentContext - """ - - self._context = context - - @property - def mentions(self): - """Gets the mentions of this ScoreComment. # noqa: E501 - - The list of user identifier mentioned on the score # noqa: E501 - - :return: The mentions of this ScoreComment. # noqa: E501 - :rtype: list[str] - """ - return self._mentions - - @mentions.setter - def mentions(self, mentions): - """Sets the mentions of this ScoreComment. - - The list of user identifier mentioned on the score # noqa: E501 - - :param mentions: The mentions of this ScoreComment. # noqa: E501 - :type: list[str] - """ - - self._mentions = mentions - - @property - def resolved(self): - """Gets the resolved of this ScoreComment. # noqa: E501 - - For inline comments, the comment can be marked as resolved and will be hidden in the future responses # noqa: E501 - - :return: The resolved of this ScoreComment. # noqa: E501 - :rtype: bool - """ - return self._resolved - - @resolved.setter - def resolved(self, resolved): - """Sets the resolved of this ScoreComment. - - For inline comments, the comment can be marked as resolved and will be hidden in the future responses # noqa: E501 - - :param resolved: The resolved of this ScoreComment. # noqa: E501 - :type: bool - """ - - self._resolved = resolved - - @property - def resolved_by(self): - """Gets the resolved_by of this ScoreComment. # noqa: E501 - - If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved # noqa: E501 - - :return: The resolved_by of this ScoreComment. # noqa: E501 - :rtype: str - """ - return self._resolved_by - - @resolved_by.setter - def resolved_by(self, resolved_by): - """Sets the resolved_by of this ScoreComment. - - If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved # noqa: E501 - - :param resolved_by: The resolved_by of this ScoreComment. # noqa: E501 - :type: str - """ - - self._resolved_by = resolved_by - - @property - def moderation(self): - """Gets the moderation of this ScoreComment. # noqa: E501 - - - :return: The moderation of this ScoreComment. # noqa: E501 - :rtype: ScoreCommentModeration - """ - return self._moderation - - @moderation.setter - def moderation(self, moderation): - """Sets the moderation of this ScoreComment. - - - :param moderation: The moderation of this ScoreComment. # noqa: E501 - :type: ScoreCommentModeration - """ - - self._moderation = moderation - - @property - def spam(self): - """Gets the spam of this ScoreComment. # noqa: E501 - - `true if the message has been detected as spam and hidden from other users # noqa: E501 - - :return: The spam of this ScoreComment. # noqa: E501 - :rtype: bool - """ - return self._spam - - @spam.setter - def spam(self, spam): - """Sets the spam of this ScoreComment. - - `true if the message has been detected as spam and hidden from other users # noqa: E501 - - :param spam: The spam of this ScoreComment. # noqa: E501 - :type: bool - """ - - self._spam = spam - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreComment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreComment): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py deleted file mode 100644 index 23874ec..0000000 --- a/flat_api/models/score_comment_context.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCommentContext(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'part_uuid': 'str', - 'staff_idx': 'float', - 'staff_uuid': 'str', - 'measure_uuids': 'list[str]', - 'start_time_pos': 'float', - 'stop_time_pos': 'float', - 'start_dpq': 'float', - 'stop_dpq': 'float' - } - - attribute_map = { - 'part_uuid': 'partUuid', - 'staff_idx': 'staffIdx', - 'staff_uuid': 'staffUuid', - 'measure_uuids': 'measureUuids', - 'start_time_pos': 'startTimePos', - 'stop_time_pos': 'stopTimePos', - 'start_dpq': 'startDpq', - 'stop_dpq': 'stopDpq' - } - - def __init__(self, part_uuid=None, staff_idx=None, staff_uuid=None, measure_uuids=None, start_time_pos=None, stop_time_pos=None, start_dpq=None, stop_dpq=None, local_vars_configuration=None): # noqa: E501 - """ScoreCommentContext - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._part_uuid = None - self._staff_idx = None - self._staff_uuid = None - self._measure_uuids = None - self._start_time_pos = None - self._stop_time_pos = None - self._start_dpq = None - self._stop_dpq = None - self.discriminator = None - - self.part_uuid = part_uuid - if staff_idx is not None: - self.staff_idx = staff_idx - if staff_uuid is not None: - self.staff_uuid = staff_uuid - self.measure_uuids = measure_uuids - self.start_time_pos = start_time_pos - self.stop_time_pos = stop_time_pos - self.start_dpq = start_dpq - self.stop_dpq = stop_dpq - - @property - def part_uuid(self): - """Gets the part_uuid of this ScoreCommentContext. # noqa: E501 - - The unique identifier (UUID) of the score part # noqa: E501 - - :return: The part_uuid of this ScoreCommentContext. # noqa: E501 - :rtype: str - """ - return self._part_uuid - - @part_uuid.setter - def part_uuid(self, part_uuid): - """Sets the part_uuid of this ScoreCommentContext. - - The unique identifier (UUID) of the score part # noqa: E501 - - :param part_uuid: The part_uuid of this ScoreCommentContext. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and part_uuid is None: # noqa: E501 - raise ValueError("Invalid value for `part_uuid`, must not be `None`") # noqa: E501 - - self._part_uuid = part_uuid - - @property - def staff_idx(self): - """Gets the staff_idx of this ScoreCommentContext. # noqa: E501 - - (Deprecated, use `staffUuid`) The identififer of the staff # noqa: E501 - - :return: The staff_idx of this ScoreCommentContext. # noqa: E501 - :rtype: float - """ - return self._staff_idx - - @staff_idx.setter - def staff_idx(self, staff_idx): - """Sets the staff_idx of this ScoreCommentContext. - - (Deprecated, use `staffUuid`) The identififer of the staff # noqa: E501 - - :param staff_idx: The staff_idx of this ScoreCommentContext. # noqa: E501 - :type: float - """ - - self._staff_idx = staff_idx - - @property - def staff_uuid(self): - """Gets the staff_uuid of this ScoreCommentContext. # noqa: E501 - - The unique identififer (UUID) of the staff # noqa: E501 - - :return: The staff_uuid of this ScoreCommentContext. # noqa: E501 - :rtype: str - """ - return self._staff_uuid - - @staff_uuid.setter - def staff_uuid(self, staff_uuid): - """Sets the staff_uuid of this ScoreCommentContext. - - The unique identififer (UUID) of the staff # noqa: E501 - - :param staff_uuid: The staff_uuid of this ScoreCommentContext. # noqa: E501 - :type: str - """ - - self._staff_uuid = staff_uuid - - @property - def measure_uuids(self): - """Gets the measure_uuids of this ScoreCommentContext. # noqa: E501 - - The list of measure UUIds # noqa: E501 - - :return: The measure_uuids of this ScoreCommentContext. # noqa: E501 - :rtype: list[str] - """ - return self._measure_uuids - - @measure_uuids.setter - def measure_uuids(self, measure_uuids): - """Sets the measure_uuids of this ScoreCommentContext. - - The list of measure UUIds # noqa: E501 - - :param measure_uuids: The measure_uuids of this ScoreCommentContext. # noqa: E501 - :type: list[str] - """ - if self.local_vars_configuration.client_side_validation and measure_uuids is None: # noqa: E501 - raise ValueError("Invalid value for `measure_uuids`, must not be `None`") # noqa: E501 - - self._measure_uuids = measure_uuids - - @property - def start_time_pos(self): - """Gets the start_time_pos of this ScoreCommentContext. # noqa: E501 - - - :return: The start_time_pos of this ScoreCommentContext. # noqa: E501 - :rtype: float - """ - return self._start_time_pos - - @start_time_pos.setter - def start_time_pos(self, start_time_pos): - """Sets the start_time_pos of this ScoreCommentContext. - - - :param start_time_pos: The start_time_pos of this ScoreCommentContext. # noqa: E501 - :type: float - """ - if self.local_vars_configuration.client_side_validation and start_time_pos is None: # noqa: E501 - raise ValueError("Invalid value for `start_time_pos`, must not be `None`") # noqa: E501 - - self._start_time_pos = start_time_pos - - @property - def stop_time_pos(self): - """Gets the stop_time_pos of this ScoreCommentContext. # noqa: E501 - - - :return: The stop_time_pos of this ScoreCommentContext. # noqa: E501 - :rtype: float - """ - return self._stop_time_pos - - @stop_time_pos.setter - def stop_time_pos(self, stop_time_pos): - """Sets the stop_time_pos of this ScoreCommentContext. - - - :param stop_time_pos: The stop_time_pos of this ScoreCommentContext. # noqa: E501 - :type: float - """ - if self.local_vars_configuration.client_side_validation and stop_time_pos is None: # noqa: E501 - raise ValueError("Invalid value for `stop_time_pos`, must not be `None`") # noqa: E501 - - self._stop_time_pos = stop_time_pos - - @property - def start_dpq(self): - """Gets the start_dpq of this ScoreCommentContext. # noqa: E501 - - - :return: The start_dpq of this ScoreCommentContext. # noqa: E501 - :rtype: float - """ - return self._start_dpq - - @start_dpq.setter - def start_dpq(self, start_dpq): - """Sets the start_dpq of this ScoreCommentContext. - - - :param start_dpq: The start_dpq of this ScoreCommentContext. # noqa: E501 - :type: float - """ - if self.local_vars_configuration.client_side_validation and start_dpq is None: # noqa: E501 - raise ValueError("Invalid value for `start_dpq`, must not be `None`") # noqa: E501 - - self._start_dpq = start_dpq - - @property - def stop_dpq(self): - """Gets the stop_dpq of this ScoreCommentContext. # noqa: E501 - - - :return: The stop_dpq of this ScoreCommentContext. # noqa: E501 - :rtype: float - """ - return self._stop_dpq - - @stop_dpq.setter - def stop_dpq(self, stop_dpq): - """Sets the stop_dpq of this ScoreCommentContext. - - - :param stop_dpq: The stop_dpq of this ScoreCommentContext. # noqa: E501 - :type: float - """ - if self.local_vars_configuration.client_side_validation and stop_dpq is None: # noqa: E501 - raise ValueError("Invalid value for `stop_dpq`, must not be `None`") # noqa: E501 - - self._stop_dpq = stop_dpq - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCommentContext): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCommentContext): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py deleted file mode 100644 index cd91bf9..0000000 --- a/flat_api/models/score_comment_creation.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCommentCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'revision': 'str', - 'comment': 'str', - 'raw_comment': 'str', - 'mentions': 'list[str]', - 'reply_to': 'str', - 'context': 'ScoreCommentContext' - } - - attribute_map = { - 'revision': 'revision', - 'comment': 'comment', - 'raw_comment': 'rawComment', - 'mentions': 'mentions', - 'reply_to': 'replyTo', - 'context': 'context' - } - - def __init__(self, revision=None, comment=None, raw_comment=None, mentions=None, reply_to=None, context=None, local_vars_configuration=None): # noqa: E501 - """ScoreCommentCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._revision = None - self._comment = None - self._raw_comment = None - self._mentions = None - self._reply_to = None - self._context = None - self.discriminator = None - - if revision is not None: - self.revision = revision - self.comment = comment - if raw_comment is not None: - self.raw_comment = raw_comment - if mentions is not None: - self.mentions = mentions - if reply_to is not None: - self.reply_to = reply_to - if context is not None: - self.context = context - - @property - def revision(self): - """Gets the revision of this ScoreCommentCreation. # noqa: E501 - - The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. # noqa: E501 - - :return: The revision of this ScoreCommentCreation. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this ScoreCommentCreation. - - The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. # noqa: E501 - - :param revision: The revision of this ScoreCommentCreation. # noqa: E501 - :type: str - """ - - self._revision = revision - - @property - def comment(self): - """Gets the comment of this ScoreCommentCreation. # noqa: E501 - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :return: The comment of this ScoreCommentCreation. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this ScoreCommentCreation. - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :param comment: The comment of this ScoreCommentCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and comment is None: # noqa: E501 - raise ValueError("Invalid value for `comment`, must not be `None`") # noqa: E501 - - self._comment = comment - - @property - def raw_comment(self): - """Gets the raw_comment of this ScoreCommentCreation. # noqa: E501 - - A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. # noqa: E501 - - :return: The raw_comment of this ScoreCommentCreation. # noqa: E501 - :rtype: str - """ - return self._raw_comment - - @raw_comment.setter - def raw_comment(self, raw_comment): - """Sets the raw_comment of this ScoreCommentCreation. - - A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. # noqa: E501 - - :param raw_comment: The raw_comment of this ScoreCommentCreation. # noqa: E501 - :type: str - """ - - self._raw_comment = raw_comment - - @property - def mentions(self): - """Gets the mentions of this ScoreCommentCreation. # noqa: E501 - - The list of user identifiers mentioned in this comment # noqa: E501 - - :return: The mentions of this ScoreCommentCreation. # noqa: E501 - :rtype: list[str] - """ - return self._mentions - - @mentions.setter - def mentions(self, mentions): - """Sets the mentions of this ScoreCommentCreation. - - The list of user identifiers mentioned in this comment # noqa: E501 - - :param mentions: The mentions of this ScoreCommentCreation. # noqa: E501 - :type: list[str] - """ - - self._mentions = mentions - - @property - def reply_to(self): - """Gets the reply_to of this ScoreCommentCreation. # noqa: E501 - - When the comment is a reply to another comment, the unique identifier of the parent comment # noqa: E501 - - :return: The reply_to of this ScoreCommentCreation. # noqa: E501 - :rtype: str - """ - return self._reply_to - - @reply_to.setter - def reply_to(self, reply_to): - """Sets the reply_to of this ScoreCommentCreation. - - When the comment is a reply to another comment, the unique identifier of the parent comment # noqa: E501 - - :param reply_to: The reply_to of this ScoreCommentCreation. # noqa: E501 - :type: str - """ - - self._reply_to = reply_to - - @property - def context(self): - """Gets the context of this ScoreCommentCreation. # noqa: E501 - - - :return: The context of this ScoreCommentCreation. # noqa: E501 - :rtype: ScoreCommentContext - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this ScoreCommentCreation. - - - :param context: The context of this ScoreCommentCreation. # noqa: E501 - :type: ScoreCommentContext - """ - - self._context = context - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCommentCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCommentCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py deleted file mode 100644 index bfc1e50..0000000 --- a/flat_api/models/score_comment_moderation.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCommentModeration(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hidden': 'bool', - 'reason': 'str' - } - - attribute_map = { - 'hidden': 'hidden', - 'reason': 'reason' - } - - def __init__(self, hidden=None, reason=None, local_vars_configuration=None): # noqa: E501 - """ScoreCommentModeration - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._hidden = None - self._reason = None - self.discriminator = None - - if hidden is not None: - self.hidden = hidden - if reason is not None: - self.reason = reason - - @property - def hidden(self): - """Gets the hidden of this ScoreCommentModeration. # noqa: E501 - - If true, this comment will be hidden from other users # noqa: E501 - - :return: The hidden of this ScoreCommentModeration. # noqa: E501 - :rtype: bool - """ - return self._hidden - - @hidden.setter - def hidden(self, hidden): - """Sets the hidden of this ScoreCommentModeration. - - If true, this comment will be hidden from other users # noqa: E501 - - :param hidden: The hidden of this ScoreCommentModeration. # noqa: E501 - :type: bool - """ - - self._hidden = hidden - - @property - def reason(self): - """Gets the reason of this ScoreCommentModeration. # noqa: E501 - - If the comment is hidden, the reason why this one has been moderated # noqa: E501 - - :return: The reason of this ScoreCommentModeration. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this ScoreCommentModeration. - - If the comment is hidden, the reason why this one has been moderated # noqa: E501 - - :param reason: The reason of this ScoreCommentModeration. # noqa: E501 - :type: str - """ - allowed_values = ["spam", "inappropriate"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and reason not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `reason` ({0}), must be one of {1}" # noqa: E501 - .format(reason, allowed_values) - ) - - self._reason = reason - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCommentModeration): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCommentModeration): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py deleted file mode 100644 index 9b5fafc..0000000 --- a/flat_api/models/score_comment_update.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCommentUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'revision': 'str', - 'comment': 'str', - 'raw_comment': 'str', - 'context': 'ScoreCommentContext' - } - - attribute_map = { - 'revision': 'revision', - 'comment': 'comment', - 'raw_comment': 'rawComment', - 'context': 'context' - } - - def __init__(self, revision=None, comment=None, raw_comment=None, context=None, local_vars_configuration=None): # noqa: E501 - """ScoreCommentUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._revision = None - self._comment = None - self._raw_comment = None - self._context = None - self.discriminator = None - - if revision is not None: - self.revision = revision - if comment is not None: - self.comment = comment - if raw_comment is not None: - self.raw_comment = raw_comment - if context is not None: - self.context = context - - @property - def revision(self): - """Gets the revision of this ScoreCommentUpdate. # noqa: E501 - - The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. # noqa: E501 - - :return: The revision of this ScoreCommentUpdate. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this ScoreCommentUpdate. - - The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. # noqa: E501 - - :param revision: The revision of this ScoreCommentUpdate. # noqa: E501 - :type: str - """ - - self._revision = revision - - @property - def comment(self): - """Gets the comment of this ScoreCommentUpdate. # noqa: E501 - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :return: The comment of this ScoreCommentUpdate. # noqa: E501 - :rtype: str - """ - return self._comment - - @comment.setter - def comment(self, comment): - """Sets the comment of this ScoreCommentUpdate. - - The comment text that can includes mentions using the following format: `@[id:username]`. # noqa: E501 - - :param comment: The comment of this ScoreCommentUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - comment is not None and len(comment) > 10000): - raise ValueError("Invalid value for `comment`, length must be less than or equal to `10000`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - comment is not None and len(comment) < 1): - raise ValueError("Invalid value for `comment`, length must be greater than or equal to `1`") # noqa: E501 - - self._comment = comment - - @property - def raw_comment(self): - """Gets the raw_comment of this ScoreCommentUpdate. # noqa: E501 - - A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. # noqa: E501 - - :return: The raw_comment of this ScoreCommentUpdate. # noqa: E501 - :rtype: str - """ - return self._raw_comment - - @raw_comment.setter - def raw_comment(self, raw_comment): - """Sets the raw_comment of this ScoreCommentUpdate. - - A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. # noqa: E501 - - :param raw_comment: The raw_comment of this ScoreCommentUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - raw_comment is not None and len(raw_comment) > 10000): - raise ValueError("Invalid value for `raw_comment`, length must be less than or equal to `10000`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - raw_comment is not None and len(raw_comment) < 1): - raise ValueError("Invalid value for `raw_comment`, length must be greater than or equal to `1`") # noqa: E501 - - self._raw_comment = raw_comment - - @property - def context(self): - """Gets the context of this ScoreCommentUpdate. # noqa: E501 - - - :return: The context of this ScoreCommentUpdate. # noqa: E501 - :rtype: ScoreCommentContext - """ - return self._context - - @context.setter - def context(self, context): - """Sets the context of this ScoreCommentUpdate. - - - :param context: The context of this ScoreCommentUpdate. # noqa: E501 - :type: ScoreCommentContext - """ - - self._context = context - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCommentUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCommentUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py deleted file mode 100644 index fb1a4a4..0000000 --- a/flat_api/models/score_comments_counts.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCommentsCounts(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'unique': 'float', - 'weekly': 'float', - 'monthly': 'float' - } - - attribute_map = { - 'total': 'total', - 'unique': 'unique', - 'weekly': 'weekly', - 'monthly': 'monthly' - } - - def __init__(self, total=None, unique=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 - """ScoreCommentsCounts - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._unique = None - self._weekly = None - self._monthly = None - self.discriminator = None - - if total is not None: - self.total = total - if unique is not None: - self.unique = unique - if weekly is not None: - self.weekly = weekly - if monthly is not None: - self.monthly = monthly - - @property - def total(self): - """Gets the total of this ScoreCommentsCounts. # noqa: E501 - - The total number of comments added to the score # noqa: E501 - - :return: The total of this ScoreCommentsCounts. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this ScoreCommentsCounts. - - The total number of comments added to the score # noqa: E501 - - :param total: The total of this ScoreCommentsCounts. # noqa: E501 - :type: float - """ - - self._total = total - - @property - def unique(self): - """Gets the unique of this ScoreCommentsCounts. # noqa: E501 - - The unique (1/user) number of comments added to the score # noqa: E501 - - :return: The unique of this ScoreCommentsCounts. # noqa: E501 - :rtype: float - """ - return self._unique - - @unique.setter - def unique(self, unique): - """Sets the unique of this ScoreCommentsCounts. - - The unique (1/user) number of comments added to the score # noqa: E501 - - :param unique: The unique of this ScoreCommentsCounts. # noqa: E501 - :type: float - """ - - self._unique = unique - - @property - def weekly(self): - """Gets the weekly of this ScoreCommentsCounts. # noqa: E501 - - The weekly unique number of comments added to the score # noqa: E501 - - :return: The weekly of this ScoreCommentsCounts. # noqa: E501 - :rtype: float - """ - return self._weekly - - @weekly.setter - def weekly(self, weekly): - """Sets the weekly of this ScoreCommentsCounts. - - The weekly unique number of comments added to the score # noqa: E501 - - :param weekly: The weekly of this ScoreCommentsCounts. # noqa: E501 - :type: float - """ - - self._weekly = weekly - - @property - def monthly(self): - """Gets the monthly of this ScoreCommentsCounts. # noqa: E501 - - The monthly unique number of comments added to the score # noqa: E501 - - :return: The monthly of this ScoreCommentsCounts. # noqa: E501 - :rtype: float - """ - return self._monthly - - @monthly.setter - def monthly(self, monthly): - """Sets the monthly of this ScoreCommentsCounts. - - The monthly unique number of comments added to the score # noqa: E501 - - :param monthly: The monthly of this ScoreCommentsCounts. # noqa: E501 - :type: float - """ - - self._monthly = monthly - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCommentsCounts): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCommentsCounts): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py deleted file mode 100644 index d01b3ce..0000000 --- a/flat_api/models/score_creation.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'data_encoding': 'str', - 'title': 'str', - 'privacy': 'ScorePrivacy', - 'builder_data': 'ScoreCreationBuilderData', - 'filename': 'str', - 'source': 'ScoreSource', - 'collection': 'str', - 'data': 'str', - 'google_drive_folder': 'str' - } - - attribute_map = { - 'data_encoding': 'dataEncoding', - 'title': 'title', - 'privacy': 'privacy', - 'builder_data': 'builderData', - 'filename': 'filename', - 'source': 'source', - 'collection': 'collection', - 'data': 'data', - 'google_drive_folder': 'googleDriveFolder' - } - - def __init__(self, data_encoding=None, title=None, privacy=None, builder_data=None, filename=None, source=None, collection=None, data=None, google_drive_folder=None, local_vars_configuration=None): # noqa: E501 - """ScoreCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._data_encoding = None - self._title = None - self._privacy = None - self._builder_data = None - self._filename = None - self._source = None - self._collection = None - self._data = None - self._google_drive_folder = None - self.discriminator = None - - if data_encoding is not None: - self.data_encoding = data_encoding - if title is not None: - self.title = title - if privacy is not None: - self.privacy = privacy - if builder_data is not None: - self.builder_data = builder_data - if filename is not None: - self.filename = filename - if source is not None: - self.source = source - if collection is not None: - self.collection = collection - if data is not None: - self.data = data - if google_drive_folder is not None: - self.google_drive_folder = google_drive_folder - - @property - def data_encoding(self): - """Gets the data_encoding of this ScoreCreation. # noqa: E501 - - The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - - :return: The data_encoding of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._data_encoding - - @data_encoding.setter - def data_encoding(self, data_encoding): - """Sets the data_encoding of this ScoreCreation. - - The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - - :param data_encoding: The data_encoding of this ScoreCreation. # noqa: E501 - :type: str - """ - allowed_values = ["base64"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and data_encoding not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 - .format(data_encoding, allowed_values) - ) - - self._data_encoding = data_encoding - - @property - def title(self): - """Gets the title of this ScoreCreation. # noqa: E501 - - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 - - :return: The title of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreCreation. - - The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") # noqa: E501 - - :param title: The title of this ScoreCreation. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def privacy(self): - """Gets the privacy of this ScoreCreation. # noqa: E501 - - - :return: The privacy of this ScoreCreation. # noqa: E501 - :rtype: ScorePrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this ScoreCreation. - - - :param privacy: The privacy of this ScoreCreation. # noqa: E501 - :type: ScorePrivacy - """ - - self._privacy = privacy - - @property - def builder_data(self): - """Gets the builder_data of this ScoreCreation. # noqa: E501 - - - :return: The builder_data of this ScoreCreation. # noqa: E501 - :rtype: ScoreCreationBuilderData - """ - return self._builder_data - - @builder_data.setter - def builder_data(self, builder_data): - """Sets the builder_data of this ScoreCreation. - - - :param builder_data: The builder_data of this ScoreCreation. # noqa: E501 - :type: ScoreCreationBuilderData - """ - - self._builder_data = builder_data - - @property - def filename(self): - """Gets the filename of this ScoreCreation. # noqa: E501 - - If this is an imported file, its filename # noqa: E501 - - :return: The filename of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._filename - - @filename.setter - def filename(self, filename): - """Sets the filename of this ScoreCreation. - - If this is an imported file, its filename # noqa: E501 - - :param filename: The filename of this ScoreCreation. # noqa: E501 - :type: str - """ - - self._filename = filename - - @property - def source(self): - """Gets the source of this ScoreCreation. # noqa: E501 - - - :return: The source of this ScoreCreation. # noqa: E501 - :rtype: ScoreSource - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this ScoreCreation. - - - :param source: The source of this ScoreCreation. # noqa: E501 - :type: ScoreSource - """ - - self._source = source - - @property - def collection(self): - """Gets the collection of this ScoreCreation. # noqa: E501 - - Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. # noqa: E501 - - :return: The collection of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._collection - - @collection.setter - def collection(self, collection): - """Sets the collection of this ScoreCreation. - - Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. # noqa: E501 - - :param collection: The collection of this ScoreCreation. # noqa: E501 - :type: str - """ - - self._collection = collection - - @property - def data(self): - """Gets the data of this ScoreCreation. # noqa: E501 - - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - - :return: The data of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this ScoreCreation. - - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - - :param data: The data of this ScoreCreation. # noqa: E501 - :type: str - """ - - self._data = data - - @property - def google_drive_folder(self): - """Gets the google_drive_folder of this ScoreCreation. # noqa: E501 - - If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. # noqa: E501 - - :return: The google_drive_folder of this ScoreCreation. # noqa: E501 - :rtype: str - """ - return self._google_drive_folder - - @google_drive_folder.setter - def google_drive_folder(self, google_drive_folder): - """Sets the google_drive_folder of this ScoreCreation. - - If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. # noqa: E501 - - :param google_drive_folder: The google_drive_folder of this ScoreCreation. # noqa: E501 - :type: str - """ - - self._google_drive_folder = google_drive_folder - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py deleted file mode 100644 index fb02b7c..0000000 --- a/flat_api/models/score_creation_builder_data.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreationBuilderData(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'score_data': 'ScoreCreationBuilderDataScoreData', - 'layout_data': 'ScoreCreationBuilderDataLayoutData' - } - - attribute_map = { - 'score_data': 'scoreData', - 'layout_data': 'layoutData' - } - - def __init__(self, score_data=None, layout_data=None, local_vars_configuration=None): # noqa: E501 - """ScoreCreationBuilderData - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._score_data = None - self._layout_data = None - self.discriminator = None - - self.score_data = score_data - if layout_data is not None: - self.layout_data = layout_data - - @property - def score_data(self): - """Gets the score_data of this ScoreCreationBuilderData. # noqa: E501 - - - :return: The score_data of this ScoreCreationBuilderData. # noqa: E501 - :rtype: ScoreCreationBuilderDataScoreData - """ - return self._score_data - - @score_data.setter - def score_data(self, score_data): - """Sets the score_data of this ScoreCreationBuilderData. - - - :param score_data: The score_data of this ScoreCreationBuilderData. # noqa: E501 - :type: ScoreCreationBuilderDataScoreData - """ - if self.local_vars_configuration.client_side_validation and score_data is None: # noqa: E501 - raise ValueError("Invalid value for `score_data`, must not be `None`") # noqa: E501 - - self._score_data = score_data - - @property - def layout_data(self): - """Gets the layout_data of this ScoreCreationBuilderData. # noqa: E501 - - - :return: The layout_data of this ScoreCreationBuilderData. # noqa: E501 - :rtype: ScoreCreationBuilderDataLayoutData - """ - return self._layout_data - - @layout_data.setter - def layout_data(self, layout_data): - """Sets the layout_data of this ScoreCreationBuilderData. - - - :param layout_data: The layout_data of this ScoreCreationBuilderData. # noqa: E501 - :type: ScoreCreationBuilderDataLayoutData - """ - - self._layout_data = layout_data - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreationBuilderData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreationBuilderData): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_layout_data.py deleted file mode 100644 index 82d3b4d..0000000 --- a/flat_api/models/score_creation_builder_data_layout_data.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreationBuilderDataLayoutData(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'notes_spacing_coeff': 'float', - 'length_unit': 'str', - 'page_height': 'float', - 'page_width': 'float', - 'page_margin_top': 'float', - 'page_margin_bottom': 'float', - 'page_margin_left': 'float', - 'page_margin_right': 'float' - } - - attribute_map = { - 'notes_spacing_coeff': 'notesSpacingCoeff', - 'length_unit': 'lengthUnit', - 'page_height': 'pageHeight', - 'page_width': 'pageWidth', - 'page_margin_top': 'pageMarginTop', - 'page_margin_bottom': 'pageMarginBottom', - 'page_margin_left': 'pageMarginLeft', - 'page_margin_right': 'pageMarginRight' - } - - def __init__(self, notes_spacing_coeff=None, length_unit='cm', page_height=None, page_width=None, page_margin_top=None, page_margin_bottom=None, page_margin_left=None, page_margin_right=None, local_vars_configuration=None): # noqa: E501 - """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._notes_spacing_coeff = None - self._length_unit = None - self._page_height = None - self._page_width = None - self._page_margin_top = None - self._page_margin_bottom = None - self._page_margin_left = None - self._page_margin_right = None - self.discriminator = None - - if notes_spacing_coeff is not None: - self.notes_spacing_coeff = notes_spacing_coeff - if length_unit is not None: - self.length_unit = length_unit - if page_height is not None: - self.page_height = page_height - if page_width is not None: - self.page_width = page_width - if page_margin_top is not None: - self.page_margin_top = page_margin_top - if page_margin_bottom is not None: - self.page_margin_bottom = page_margin_bottom - if page_margin_left is not None: - self.page_margin_left = page_margin_left - if page_margin_right is not None: - self.page_margin_right = page_margin_right - - @property - def notes_spacing_coeff(self): - """Gets the notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - A float value >= 1 that controls the spacing between notes. # noqa: E501 - - :return: The notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._notes_spacing_coeff - - @notes_spacing_coeff.setter - def notes_spacing_coeff(self, notes_spacing_coeff): - """Sets the notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. - - A float value >= 1 that controls the spacing between notes. # noqa: E501 - - :param notes_spacing_coeff: The notes_spacing_coeff of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._notes_spacing_coeff = notes_spacing_coeff - - @property - def length_unit(self): - """Gets the length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The unit to use for layout customizations # noqa: E501 - - :return: The length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: str - """ - return self._length_unit - - @length_unit.setter - def length_unit(self, length_unit): - """Sets the length_unit of this ScoreCreationBuilderDataLayoutData. - - The unit to use for layout customizations # noqa: E501 - - :param length_unit: The length_unit of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: str - """ - allowed_values = ["cm", "inch"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and length_unit not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `length_unit` ({0}), must be one of {1}" # noqa: E501 - .format(length_unit, allowed_values) - ) - - self._length_unit = length_unit - - @property - def page_height(self): - """Gets the page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The height of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_height - - @page_height.setter - def page_height(self, page_height): - """Sets the page_height of this ScoreCreationBuilderDataLayoutData. - - The height of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_height: The page_height of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_height = page_height - - @property - def page_width(self): - """Gets the page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The width of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_width - - @page_width.setter - def page_width(self, page_width): - """Sets the page_width of this ScoreCreationBuilderDataLayoutData. - - The width of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_width: The page_width of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_width = page_width - - @property - def page_margin_top(self): - """Gets the page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The top margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_margin_top - - @page_margin_top.setter - def page_margin_top(self, page_margin_top): - """Sets the page_margin_top of this ScoreCreationBuilderDataLayoutData. - - The top margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_margin_top: The page_margin_top of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_margin_top = page_margin_top - - @property - def page_margin_bottom(self): - """Gets the page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The bottom margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_margin_bottom - - @page_margin_bottom.setter - def page_margin_bottom(self, page_margin_bottom): - """Sets the page_margin_bottom of this ScoreCreationBuilderDataLayoutData. - - The bottom margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_margin_bottom: The page_margin_bottom of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_margin_bottom = page_margin_bottom - - @property - def page_margin_left(self): - """Gets the page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The left margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_margin_left - - @page_margin_left.setter - def page_margin_left(self, page_margin_left): - """Sets the page_margin_left of this ScoreCreationBuilderDataLayoutData. - - The left margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_margin_left: The page_margin_left of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_margin_left = page_margin_left - - @property - def page_margin_right(self): - """Gets the page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - - The right margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :return: The page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :rtype: float - """ - return self._page_margin_right - - @page_margin_right.setter - def page_margin_right(self, page_margin_right): - """Sets the page_margin_right of this ScoreCreationBuilderDataLayoutData. - - The right margin of the page in chosen unit (`lengthUnit`). # noqa: E501 - - :param page_margin_right: The page_margin_right of this ScoreCreationBuilderDataLayoutData. # noqa: E501 - :type: float - """ - - self._page_margin_right = page_margin_right - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreationBuilderDataLayoutData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreationBuilderDataLayoutData): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_score_data.py deleted file mode 100644 index fd9bebb..0000000 --- a/flat_api/models/score_creation_builder_data_score_data.py +++ /dev/null @@ -1,264 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreationBuilderDataScoreData(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'use_tab_staff': 'bool', - 'use_chord_grid': 'bool', - 'fifths': 'float', - 'nb_beats': 'float', - 'beat_type': 'float', - 'instruments': 'list[ScoreCreationBuilderDataScoreDataInstruments]' - } - - attribute_map = { - 'use_tab_staff': 'useTabStaff', - 'use_chord_grid': 'useChordGrid', - 'fifths': 'fifths', - 'nb_beats': 'nbBeats', - 'beat_type': 'beatType', - 'instruments': 'instruments' - } - - def __init__(self, use_tab_staff=None, use_chord_grid=None, fifths=None, nb_beats=None, beat_type=None, instruments=None, local_vars_configuration=None): # noqa: E501 - """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._use_tab_staff = None - self._use_chord_grid = None - self._fifths = None - self._nb_beats = None - self._beat_type = None - self._instruments = None - self.discriminator = None - - if use_tab_staff is not None: - self.use_tab_staff = use_tab_staff - if use_chord_grid is not None: - self.use_chord_grid = use_chord_grid - if fifths is not None: - self.fifths = fifths - if nb_beats is not None: - self.nb_beats = nb_beats - if beat_type is not None: - self.beat_type = beat_type - self.instruments = instruments - - @property - def use_tab_staff(self): - """Gets the use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - true if the TAB staff is displayed with fretted instruments # noqa: E501 - - :return: The use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: bool - """ - return self._use_tab_staff - - @use_tab_staff.setter - def use_tab_staff(self, use_tab_staff): - """Sets the use_tab_staff of this ScoreCreationBuilderDataScoreData. - - true if the TAB staff is displayed with fretted instruments # noqa: E501 - - :param use_tab_staff: The use_tab_staff of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: bool - """ - - self._use_tab_staff = use_tab_staff - - @property - def use_chord_grid(self): - """Gets the use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - true if the chord grid must be displayed with fretted instruments # noqa: E501 - - :return: The use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: bool - """ - return self._use_chord_grid - - @use_chord_grid.setter - def use_chord_grid(self, use_chord_grid): - """Sets the use_chord_grid of this ScoreCreationBuilderDataScoreData. - - true if the chord grid must be displayed with fretted instruments # noqa: E501 - - :param use_chord_grid: The use_chord_grid of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: bool - """ - - self._use_chord_grid = use_chord_grid - - @property - def fifths(self): - """Gets the fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. # noqa: E501 - - :return: The fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: float - """ - return self._fifths - - @fifths.setter - def fifths(self, fifths): - """Sets the fifths of this ScoreCreationBuilderDataScoreData. - - The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. # noqa: E501 - - :param fifths: The fifths of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: float - """ - - self._fifths = fifths - - @property - def nb_beats(self): - """Gets the nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - The number of beats in the measure # noqa: E501 - - :return: The nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: float - """ - return self._nb_beats - - @nb_beats.setter - def nb_beats(self, nb_beats): - """Sets the nb_beats of this ScoreCreationBuilderDataScoreData. - - The number of beats in the measure # noqa: E501 - - :param nb_beats: The nb_beats of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: float - """ - - self._nb_beats = nb_beats - - @property - def beat_type(self): - """Gets the beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - The duration of a beat in the measure # noqa: E501 - - :return: The beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: float - """ - return self._beat_type - - @beat_type.setter - def beat_type(self, beat_type): - """Sets the beat_type of this ScoreCreationBuilderDataScoreData. - - The duration of a beat in the measure # noqa: E501 - - :param beat_type: The beat_type of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: float - """ - - self._beat_type = beat_type - - @property - def instruments(self): - """Gets the instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 - - The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. # noqa: E501 - - :return: The instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :rtype: list[ScoreCreationBuilderDataScoreDataInstruments] - """ - return self._instruments - - @instruments.setter - def instruments(self, instruments): - """Sets the instruments of this ScoreCreationBuilderDataScoreData. - - The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. # noqa: E501 - - :param instruments: The instruments of this ScoreCreationBuilderDataScoreData. # noqa: E501 - :type: list[ScoreCreationBuilderDataScoreDataInstruments] - """ - if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 - raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 - - self._instruments = instruments - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreationBuilderDataScoreData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreationBuilderDataScoreData): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_builder_data_score_data_instruments.py b/flat_api/models/score_creation_builder_data_score_data_instruments.py deleted file mode 100644 index a105a6a..0000000 --- a/flat_api/models/score_creation_builder_data_score_data_instruments.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreationBuilderDataScoreDataInstruments(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'group': 'str', - 'instrument': 'str', - 'long_name': 'str', - 'short_name': 'str' - } - - attribute_map = { - 'group': 'group', - 'instrument': 'instrument', - 'long_name': 'longName', - 'short_name': 'shortName' - } - - def __init__(self, group=None, instrument=None, long_name=None, short_name=None, local_vars_configuration=None): # noqa: E501 - """ScoreCreationBuilderDataScoreDataInstruments - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._group = None - self._instrument = None - self._long_name = None - self._short_name = None - self.discriminator = None - - self.group = group - self.instrument = instrument - if long_name is not None: - self.long_name = long_name - if short_name is not None: - self.short_name = short_name - - @property - def group(self): - """Gets the group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - - The of the instrument group (e.g. `keyboards`, `brass`) # noqa: E501 - - :return: The group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :rtype: str - """ - return self._group - - @group.setter - def group(self, group): - """Sets the group of this ScoreCreationBuilderDataScoreDataInstruments. - - The of the instrument group (e.g. `keyboards`, `brass`) # noqa: E501 - - :param group: The group of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and group is None: # noqa: E501 - raise ValueError("Invalid value for `group`, must not be `None`") # noqa: E501 - - self._group = group - - @property - def instrument(self): - """Gets the instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - - The identifier of the instrument (e.g. `piano`, `trumpet`) # noqa: E501 - - :return: The instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :rtype: str - """ - return self._instrument - - @instrument.setter - def instrument(self, instrument): - """Sets the instrument of this ScoreCreationBuilderDataScoreDataInstruments. - - The identifier of the instrument (e.g. `piano`, `trumpet`) # noqa: E501 - - :param instrument: The instrument of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and instrument is None: # noqa: E501 - raise ValueError("Invalid value for `instrument`, must not be `None`") # noqa: E501 - - self._instrument = instrument - - @property - def long_name(self): - """Gets the long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - - The full name of the instrument # noqa: E501 - - :return: The long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :rtype: str - """ - return self._long_name - - @long_name.setter - def long_name(self, long_name): - """Sets the long_name of this ScoreCreationBuilderDataScoreDataInstruments. - - The full name of the instrument # noqa: E501 - - :param long_name: The long_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :type: str - """ - - self._long_name = long_name - - @property - def short_name(self): - """Gets the short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - - The abbreviation of the name of the instrument # noqa: E501 - - :return: The short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :rtype: str - """ - return self._short_name - - @short_name.setter - def short_name(self, short_name): - """Sets the short_name of this ScoreCreationBuilderDataScoreDataInstruments. - - The abbreviation of the name of the instrument # noqa: E501 - - :param short_name: The short_name of this ScoreCreationBuilderDataScoreDataInstruments. # noqa: E501 - :type: str - """ - - self._short_name = short_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreationBuilderDataScoreDataInstruments): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreationBuilderDataScoreDataInstruments): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py deleted file mode 100644 index 04a1652..0000000 --- a/flat_api/models/score_creation_type.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreCreationType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ORIGINAL = "original" - ARRANGEMENT = "arrangement" - OTHER = "other" - - allowable_values = [ORIGINAL, ARRANGEMENT, OTHER] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ScoreCreationType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreCreationType): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreCreationType): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py deleted file mode 100644 index 72341b4..0000000 --- a/flat_api/models/score_details.py +++ /dev/null @@ -1,1001 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'subtitle': 'str', - 'instruments': 'list[str]', - 'lyricist': 'str', - 'publication_date': 'datetime', - 'composer': 'str', - 'license_text': 'str', - 'modification_date': 'datetime', - 'id': 'str', - 'plays': 'ScorePlaysCounts', - 'title': 'str', - 'creation_type': 'ScoreCreationType', - 'comments': 'ScoreCommentsCounts', - 'collections': 'list[str]', - 'samples': 'list[str]', - 'number_measures': 'int', - 'google_drive_file_id': 'str', - 'description': 'str', - 'views': 'ScoreViewsCounts', - 'html_url': 'str', - 'duration_time': 'float', - 'user': 'UserPublicSummary', - 'main_tempo_qpm': 'float', - 'creation_date': 'datetime', - 'parent_score': 'str', - 'tags': 'list[str]', - 'collaborators': 'list[ResourceCollaborator]', - 'sharing_key': 'str', - 'license': 'ScoreLicense', - 'rights': 'ResourceRights', - 'privacy': 'ScorePrivacy', - 'arranger': 'str', - 'organization': 'str', - 'likes': 'ScoreLikesCounts' - } - - attribute_map = { - 'subtitle': 'subtitle', - 'instruments': 'instruments', - 'lyricist': 'lyricist', - 'publication_date': 'publicationDate', - 'composer': 'composer', - 'license_text': 'licenseText', - 'modification_date': 'modificationDate', - 'id': 'id', - 'plays': 'plays', - 'title': 'title', - 'creation_type': 'creationType', - 'comments': 'comments', - 'collections': 'collections', - 'samples': 'samples', - 'number_measures': 'numberMeasures', - 'google_drive_file_id': 'googleDriveFileId', - 'description': 'description', - 'views': 'views', - 'html_url': 'htmlUrl', - 'duration_time': 'durationTime', - 'user': 'user', - 'main_tempo_qpm': 'mainTempoQpm', - 'creation_date': 'creationDate', - 'parent_score': 'parentScore', - 'tags': 'tags', - 'collaborators': 'collaborators', - 'sharing_key': 'sharingKey', - 'license': 'license', - 'rights': 'rights', - 'privacy': 'privacy', - 'arranger': 'arranger', - 'organization': 'organization', - 'likes': 'likes' - } - - def __init__(self, subtitle=None, instruments=None, lyricist=None, publication_date=None, composer=None, license_text=None, modification_date=None, id=None, plays=None, title=None, creation_type=None, comments=None, collections=None, samples=None, number_measures=None, google_drive_file_id=None, description=None, views=None, html_url=None, duration_time=None, user=None, main_tempo_qpm=None, creation_date=None, parent_score=None, tags=None, collaborators=None, sharing_key=None, license=None, rights=None, privacy=None, arranger=None, organization=None, likes=None, local_vars_configuration=None): # noqa: E501 - """ScoreDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._subtitle = None - self._instruments = None - self._lyricist = None - self._publication_date = None - self._composer = None - self._license_text = None - self._modification_date = None - self._id = None - self._plays = None - self._title = None - self._creation_type = None - self._comments = None - self._collections = None - self._samples = None - self._number_measures = None - self._google_drive_file_id = None - self._description = None - self._views = None - self._html_url = None - self._duration_time = None - self._user = None - self._main_tempo_qpm = None - self._creation_date = None - self._parent_score = None - self._tags = None - self._collaborators = None - self._sharing_key = None - self._license = None - self._rights = None - self._privacy = None - self._arranger = None - self._organization = None - self._likes = None - self.discriminator = None - - if subtitle is not None: - self.subtitle = subtitle - if instruments is not None: - self.instruments = instruments - if lyricist is not None: - self.lyricist = lyricist - if publication_date is not None: - self.publication_date = publication_date - if composer is not None: - self.composer = composer - if license_text is not None: - self.license_text = license_text - if modification_date is not None: - self.modification_date = modification_date - if id is not None: - self.id = id - if plays is not None: - self.plays = plays - if title is not None: - self.title = title - if creation_type is not None: - self.creation_type = creation_type - if comments is not None: - self.comments = comments - if collections is not None: - self.collections = collections - if samples is not None: - self.samples = samples - if number_measures is not None: - self.number_measures = number_measures - if google_drive_file_id is not None: - self.google_drive_file_id = google_drive_file_id - if description is not None: - self.description = description - if views is not None: - self.views = views - if html_url is not None: - self.html_url = html_url - if duration_time is not None: - self.duration_time = duration_time - if user is not None: - self.user = user - if main_tempo_qpm is not None: - self.main_tempo_qpm = main_tempo_qpm - if creation_date is not None: - self.creation_date = creation_date - if parent_score is not None: - self.parent_score = parent_score - if tags is not None: - self.tags = tags - if collaborators is not None: - self.collaborators = collaborators - if sharing_key is not None: - self.sharing_key = sharing_key - if license is not None: - self.license = license - if rights is not None: - self.rights = rights - if privacy is not None: - self.privacy = privacy - if arranger is not None: - self.arranger = arranger - if organization is not None: - self.organization = organization - if likes is not None: - self.likes = likes - - @property - def subtitle(self): - """Gets the subtitle of this ScoreDetails. # noqa: E501 - - Subtitle of the score # noqa: E501 - - :return: The subtitle of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._subtitle - - @subtitle.setter - def subtitle(self, subtitle): - """Sets the subtitle of this ScoreDetails. - - Subtitle of the score # noqa: E501 - - :param subtitle: The subtitle of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._subtitle = subtitle - - @property - def instruments(self): - """Gets the instruments of this ScoreDetails. # noqa: E501 - - An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :return: The instruments of this ScoreDetails. # noqa: E501 - :rtype: list[str] - """ - return self._instruments - - @instruments.setter - def instruments(self, instruments): - """Sets the instruments of this ScoreDetails. - - An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :param instruments: The instruments of this ScoreDetails. # noqa: E501 - :type: list[str] - """ - - self._instruments = instruments - - @property - def lyricist(self): - """Gets the lyricist of this ScoreDetails. # noqa: E501 - - Lyricist of the score # noqa: E501 - - :return: The lyricist of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._lyricist - - @lyricist.setter - def lyricist(self, lyricist): - """Sets the lyricist of this ScoreDetails. - - Lyricist of the score # noqa: E501 - - :param lyricist: The lyricist of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._lyricist = lyricist - - @property - def publication_date(self): - """Gets the publication_date of this ScoreDetails. # noqa: E501 - - The date when the score was published on Flat # noqa: E501 - - :return: The publication_date of this ScoreDetails. # noqa: E501 - :rtype: datetime - """ - return self._publication_date - - @publication_date.setter - def publication_date(self, publication_date): - """Sets the publication_date of this ScoreDetails. - - The date when the score was published on Flat # noqa: E501 - - :param publication_date: The publication_date of this ScoreDetails. # noqa: E501 - :type: datetime - """ - - self._publication_date = publication_date - - @property - def composer(self): - """Gets the composer of this ScoreDetails. # noqa: E501 - - Composer of the score # noqa: E501 - - :return: The composer of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._composer - - @composer.setter - def composer(self, composer): - """Sets the composer of this ScoreDetails. - - Composer of the score # noqa: E501 - - :param composer: The composer of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._composer = composer - - @property - def license_text(self): - """Gets the license_text of this ScoreDetails. # noqa: E501 - - Additional license text written on the exported/printed score # noqa: E501 - - :return: The license_text of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._license_text - - @license_text.setter - def license_text(self, license_text): - """Sets the license_text of this ScoreDetails. - - Additional license text written on the exported/printed score # noqa: E501 - - :param license_text: The license_text of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._license_text = license_text - - @property - def modification_date(self): - """Gets the modification_date of this ScoreDetails. # noqa: E501 - - The date of the last revision of the score # noqa: E501 - - :return: The modification_date of this ScoreDetails. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ScoreDetails. - - The date of the last revision of the score # noqa: E501 - - :param modification_date: The modification_date of this ScoreDetails. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def id(self): - """Gets the id of this ScoreDetails. # noqa: E501 - - The unique identifier of the score # noqa: E501 - - :return: The id of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreDetails. - - The unique identifier of the score # noqa: E501 - - :param id: The id of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def plays(self): - """Gets the plays of this ScoreDetails. # noqa: E501 - - - :return: The plays of this ScoreDetails. # noqa: E501 - :rtype: ScorePlaysCounts - """ - return self._plays - - @plays.setter - def plays(self, plays): - """Sets the plays of this ScoreDetails. - - - :param plays: The plays of this ScoreDetails. # noqa: E501 - :type: ScorePlaysCounts - """ - - self._plays = plays - - @property - def title(self): - """Gets the title of this ScoreDetails. # noqa: E501 - - The title of the score # noqa: E501 - - :return: The title of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreDetails. - - The title of the score # noqa: E501 - - :param title: The title of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def creation_type(self): - """Gets the creation_type of this ScoreDetails. # noqa: E501 - - - :return: The creation_type of this ScoreDetails. # noqa: E501 - :rtype: ScoreCreationType - """ - return self._creation_type - - @creation_type.setter - def creation_type(self, creation_type): - """Sets the creation_type of this ScoreDetails. - - - :param creation_type: The creation_type of this ScoreDetails. # noqa: E501 - :type: ScoreCreationType - """ - - self._creation_type = creation_type - - @property - def comments(self): - """Gets the comments of this ScoreDetails. # noqa: E501 - - - :return: The comments of this ScoreDetails. # noqa: E501 - :rtype: ScoreCommentsCounts - """ - return self._comments - - @comments.setter - def comments(self, comments): - """Sets the comments of this ScoreDetails. - - - :param comments: The comments of this ScoreDetails. # noqa: E501 - :type: ScoreCommentsCounts - """ - - self._comments = comments - - @property - def collections(self): - """Gets the collections of this ScoreDetails. # noqa: E501 - - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 - - :return: The collections of this ScoreDetails. # noqa: E501 - :rtype: list[str] - """ - return self._collections - - @collections.setter - def collections(self, collections): - """Sets the collections of this ScoreDetails. - - The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. # noqa: E501 - - :param collections: The collections of this ScoreDetails. # noqa: E501 - :type: list[str] - """ - - self._collections = collections - - @property - def samples(self): - """Gets the samples of this ScoreDetails. # noqa: E501 - - An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. # noqa: E501 - - :return: The samples of this ScoreDetails. # noqa: E501 - :rtype: list[str] - """ - return self._samples - - @samples.setter - def samples(self, samples): - """Sets the samples of this ScoreDetails. - - An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. # noqa: E501 - - :param samples: The samples of this ScoreDetails. # noqa: E501 - :type: list[str] - """ - - self._samples = samples - - @property - def number_measures(self): - """Gets the number_measures of this ScoreDetails. # noqa: E501 - - The number of measures in the score # noqa: E501 - - :return: The number_measures of this ScoreDetails. # noqa: E501 - :rtype: int - """ - return self._number_measures - - @number_measures.setter - def number_measures(self, number_measures): - """Sets the number_measures of this ScoreDetails. - - The number of measures in the score # noqa: E501 - - :param number_measures: The number_measures of this ScoreDetails. # noqa: E501 - :type: int - """ - - self._number_measures = number_measures - - @property - def google_drive_file_id(self): - """Gets the google_drive_file_id of this ScoreDetails. # noqa: E501 - - If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 - - :return: The google_drive_file_id of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._google_drive_file_id - - @google_drive_file_id.setter - def google_drive_file_id(self, google_drive_file_id): - """Sets the google_drive_file_id of this ScoreDetails. - - If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` # noqa: E501 - - :param google_drive_file_id: The google_drive_file_id of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._google_drive_file_id = google_drive_file_id - - @property - def description(self): - """Gets the description of this ScoreDetails. # noqa: E501 - - Description of the creation # noqa: E501 - - :return: The description of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ScoreDetails. - - Description of the creation # noqa: E501 - - :param description: The description of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def views(self): - """Gets the views of this ScoreDetails. # noqa: E501 - - - :return: The views of this ScoreDetails. # noqa: E501 - :rtype: ScoreViewsCounts - """ - return self._views - - @views.setter - def views(self, views): - """Sets the views of this ScoreDetails. - - - :param views: The views of this ScoreDetails. # noqa: E501 - :type: ScoreViewsCounts - """ - - self._views = views - - @property - def html_url(self): - """Gets the html_url of this ScoreDetails. # noqa: E501 - - The url where the score can be viewed in a web browser # noqa: E501 - - :return: The html_url of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this ScoreDetails. - - The url where the score can be viewed in a web browser # noqa: E501 - - :param html_url: The html_url of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def duration_time(self): - """Gets the duration_time of this ScoreDetails. # noqa: E501 - - In seconds, an approximative duration of the score # noqa: E501 - - :return: The duration_time of this ScoreDetails. # noqa: E501 - :rtype: float - """ - return self._duration_time - - @duration_time.setter - def duration_time(self, duration_time): - """Sets the duration_time of this ScoreDetails. - - In seconds, an approximative duration of the score # noqa: E501 - - :param duration_time: The duration_time of this ScoreDetails. # noqa: E501 - :type: float - """ - - self._duration_time = duration_time - - @property - def user(self): - """Gets the user of this ScoreDetails. # noqa: E501 - - - :return: The user of this ScoreDetails. # noqa: E501 - :rtype: UserPublicSummary - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ScoreDetails. - - - :param user: The user of this ScoreDetails. # noqa: E501 - :type: UserPublicSummary - """ - - self._user = user - - @property - def main_tempo_qpm(self): - """Gets the main_tempo_qpm of this ScoreDetails. # noqa: E501 - - The main tempo of the score (in QPM) # noqa: E501 - - :return: The main_tempo_qpm of this ScoreDetails. # noqa: E501 - :rtype: float - """ - return self._main_tempo_qpm - - @main_tempo_qpm.setter - def main_tempo_qpm(self, main_tempo_qpm): - """Sets the main_tempo_qpm of this ScoreDetails. - - The main tempo of the score (in QPM) # noqa: E501 - - :param main_tempo_qpm: The main_tempo_qpm of this ScoreDetails. # noqa: E501 - :type: float - """ - - self._main_tempo_qpm = main_tempo_qpm - - @property - def creation_date(self): - """Gets the creation_date of this ScoreDetails. # noqa: E501 - - The date when the score was created # noqa: E501 - - :return: The creation_date of this ScoreDetails. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ScoreDetails. - - The date when the score was created # noqa: E501 - - :param creation_date: The creation_date of this ScoreDetails. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def parent_score(self): - """Gets the parent_score of this ScoreDetails. # noqa: E501 - - If the score has been forked, the unique identifier of the parent score. # noqa: E501 - - :return: The parent_score of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._parent_score - - @parent_score.setter - def parent_score(self, parent_score): - """Sets the parent_score of this ScoreDetails. - - If the score has been forked, the unique identifier of the parent score. # noqa: E501 - - :param parent_score: The parent_score of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._parent_score = parent_score - - @property - def tags(self): - """Gets the tags of this ScoreDetails. # noqa: E501 - - Tags describing the score # noqa: E501 - - :return: The tags of this ScoreDetails. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags): - """Sets the tags of this ScoreDetails. - - Tags describing the score # noqa: E501 - - :param tags: The tags of this ScoreDetails. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def collaborators(self): - """Gets the collaborators of this ScoreDetails. # noqa: E501 - - The list of the collaborators of the score # noqa: E501 - - :return: The collaborators of this ScoreDetails. # noqa: E501 - :rtype: list[ResourceCollaborator] - """ - return self._collaborators - - @collaborators.setter - def collaborators(self, collaborators): - """Sets the collaborators of this ScoreDetails. - - The list of the collaborators of the score # noqa: E501 - - :param collaborators: The collaborators of this ScoreDetails. # noqa: E501 - :type: list[ResourceCollaborator] - """ - - self._collaborators = collaborators - - @property - def sharing_key(self): - """Gets the sharing_key of this ScoreDetails. # noqa: E501 - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :return: The sharing_key of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._sharing_key - - @sharing_key.setter - def sharing_key(self, sharing_key): - """Sets the sharing_key of this ScoreDetails. - - The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) # noqa: E501 - - :param sharing_key: The sharing_key of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._sharing_key = sharing_key - - @property - def license(self): - """Gets the license of this ScoreDetails. # noqa: E501 - - - :return: The license of this ScoreDetails. # noqa: E501 - :rtype: ScoreLicense - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this ScoreDetails. - - - :param license: The license of this ScoreDetails. # noqa: E501 - :type: ScoreLicense - """ - - self._license = license - - @property - def rights(self): - """Gets the rights of this ScoreDetails. # noqa: E501 - - - :return: The rights of this ScoreDetails. # noqa: E501 - :rtype: ResourceRights - """ - return self._rights - - @rights.setter - def rights(self, rights): - """Sets the rights of this ScoreDetails. - - - :param rights: The rights of this ScoreDetails. # noqa: E501 - :type: ResourceRights - """ - - self._rights = rights - - @property - def privacy(self): - """Gets the privacy of this ScoreDetails. # noqa: E501 - - - :return: The privacy of this ScoreDetails. # noqa: E501 - :rtype: ScorePrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this ScoreDetails. - - - :param privacy: The privacy of this ScoreDetails. # noqa: E501 - :type: ScorePrivacy - """ - - self._privacy = privacy - - @property - def arranger(self): - """Gets the arranger of this ScoreDetails. # noqa: E501 - - Arranger of the score # noqa: E501 - - :return: The arranger of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._arranger - - @arranger.setter - def arranger(self, arranger): - """Sets the arranger of this ScoreDetails. - - Arranger of the score # noqa: E501 - - :param arranger: The arranger of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._arranger = arranger - - @property - def organization(self): - """Gets the organization of this ScoreDetails. # noqa: E501 - - If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 - - :return: The organization of this ScoreDetails. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this ScoreDetails. - - If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. # noqa: E501 - - :param organization: The organization of this ScoreDetails. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def likes(self): - """Gets the likes of this ScoreDetails. # noqa: E501 - - - :return: The likes of this ScoreDetails. # noqa: E501 - :rtype: ScoreLikesCounts - """ - return self._likes - - @likes.setter - def likes(self, likes): - """Sets the likes of this ScoreDetails. - - - :param likes: The likes of this ScoreDetails. # noqa: E501 - :type: ScoreLikesCounts - """ - - self._likes = likes - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreDetails): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreDetails): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py deleted file mode 100644 index c49a358..0000000 --- a/flat_api/models/score_fork.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreFork(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'collection': 'str' - } - - attribute_map = { - 'collection': 'collection' - } - - def __init__(self, collection='root', local_vars_configuration=None): # noqa: E501 - """ScoreFork - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._collection = None - self.discriminator = None - - if collection is not None: - self.collection = collection - - @property - def collection(self): - """Gets the collection of this ScoreFork. # noqa: E501 - - Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. # noqa: E501 - - :return: The collection of this ScoreFork. # noqa: E501 - :rtype: str - """ - return self._collection - - @collection.setter - def collection(self, collection): - """Sets the collection of this ScoreFork. - - Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. # noqa: E501 - - :param collection: The collection of this ScoreFork. # noqa: E501 - :type: str - """ - - self._collection = collection - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreFork): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreFork): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py deleted file mode 100644 index c241b9d..0000000 --- a/flat_api/models/score_license.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreLicense(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - COPYRIGHT = "copyright" - CC0 = "cc0" - CC_BY = "cc-by" - CC_BY_SA = "cc-by-sa" - CC_BY_ND = "cc-by-nd" - CC_BY_NC = "cc-by-nc" - CC_BY_NC_SA = "cc-by-nc-sa" - CC_BY_NC_ND = "cc-by-nc-nd" - - allowable_values = [COPYRIGHT, CC0, CC_BY, CC_BY_SA, CC_BY_ND, CC_BY_NC, CC_BY_NC_SA, CC_BY_NC_ND] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ScoreLicense - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreLicense): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreLicense): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py deleted file mode 100644 index a6326d5..0000000 --- a/flat_api/models/score_likes_counts.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreLikesCounts(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'weekly': 'float', - 'monthly': 'float' - } - - attribute_map = { - 'total': 'total', - 'weekly': 'weekly', - 'monthly': 'monthly' - } - - def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 - """ScoreLikesCounts - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._weekly = None - self._monthly = None - self.discriminator = None - - if total is not None: - self.total = total - if weekly is not None: - self.weekly = weekly - if monthly is not None: - self.monthly = monthly - - @property - def total(self): - """Gets the total of this ScoreLikesCounts. # noqa: E501 - - The total number of likes of the score # noqa: E501 - - :return: The total of this ScoreLikesCounts. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this ScoreLikesCounts. - - The total number of likes of the score # noqa: E501 - - :param total: The total of this ScoreLikesCounts. # noqa: E501 - :type: float - """ - - self._total = total - - @property - def weekly(self): - """Gets the weekly of this ScoreLikesCounts. # noqa: E501 - - The number of new likes during the last week # noqa: E501 - - :return: The weekly of this ScoreLikesCounts. # noqa: E501 - :rtype: float - """ - return self._weekly - - @weekly.setter - def weekly(self, weekly): - """Sets the weekly of this ScoreLikesCounts. - - The number of new likes during the last week # noqa: E501 - - :param weekly: The weekly of this ScoreLikesCounts. # noqa: E501 - :type: float - """ - - self._weekly = weekly - - @property - def monthly(self): - """Gets the monthly of this ScoreLikesCounts. # noqa: E501 - - The number of new likes during the last month # noqa: E501 - - :return: The monthly of this ScoreLikesCounts. # noqa: E501 - :rtype: float - """ - return self._monthly - - @monthly.setter - def monthly(self, monthly): - """Sets the monthly of this ScoreLikesCounts. - - The number of new likes during the last month # noqa: E501 - - :param monthly: The monthly of this ScoreLikesCounts. # noqa: E501 - :type: float - """ - - self._monthly = monthly - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreLikesCounts): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreLikesCounts): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py deleted file mode 100644 index cb29f8e..0000000 --- a/flat_api/models/score_modification.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreModification(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'title': 'str', - 'subtitle': 'str', - 'composer': 'str', - 'lyricist': 'str', - 'arranger': 'str', - 'privacy': 'ScorePrivacy', - 'sharing_key': 'str', - 'description': 'str', - 'tags': 'list[str]', - 'creation_type': 'ScoreCreationType', - 'license': 'ScoreLicense', - 'license_text': 'str' - } - - attribute_map = { - 'title': 'title', - 'subtitle': 'subtitle', - 'composer': 'composer', - 'lyricist': 'lyricist', - 'arranger': 'arranger', - 'privacy': 'privacy', - 'sharing_key': 'sharingKey', - 'description': 'description', - 'tags': 'tags', - 'creation_type': 'creationType', - 'license': 'license', - 'license_text': 'licenseText' - } - - def __init__(self, title=None, subtitle=None, composer=None, lyricist=None, arranger=None, privacy=None, sharing_key=None, description=None, tags=None, creation_type=None, license=None, license_text=None, local_vars_configuration=None): # noqa: E501 - """ScoreModification - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._title = None - self._subtitle = None - self._composer = None - self._lyricist = None - self._arranger = None - self._privacy = None - self._sharing_key = None - self._description = None - self._tags = None - self._creation_type = None - self._license = None - self._license_text = None - self.discriminator = None - - if title is not None: - self.title = title - if subtitle is not None: - self.subtitle = subtitle - if composer is not None: - self.composer = composer - if lyricist is not None: - self.lyricist = lyricist - if arranger is not None: - self.arranger = arranger - if privacy is not None: - self.privacy = privacy - if sharing_key is not None: - self.sharing_key = sharing_key - if description is not None: - self.description = description - if tags is not None: - self.tags = tags - if creation_type is not None: - self.creation_type = creation_type - if license is not None: - self.license = license - if license_text is not None: - self.license_text = license_text - - @property - def title(self): - """Gets the title of this ScoreModification. # noqa: E501 - - The title of the score # noqa: E501 - - :return: The title of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreModification. - - The title of the score # noqa: E501 - - :param title: The title of this ScoreModification. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def subtitle(self): - """Gets the subtitle of this ScoreModification. # noqa: E501 - - The subtitle of the score # noqa: E501 - - :return: The subtitle of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._subtitle - - @subtitle.setter - def subtitle(self, subtitle): - """Sets the subtitle of this ScoreModification. - - The subtitle of the score # noqa: E501 - - :param subtitle: The subtitle of this ScoreModification. # noqa: E501 - :type: str - """ - - self._subtitle = subtitle - - @property - def composer(self): - """Gets the composer of this ScoreModification. # noqa: E501 - - The composer of the score # noqa: E501 - - :return: The composer of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._composer - - @composer.setter - def composer(self, composer): - """Sets the composer of this ScoreModification. - - The composer of the score # noqa: E501 - - :param composer: The composer of this ScoreModification. # noqa: E501 - :type: str - """ - - self._composer = composer - - @property - def lyricist(self): - """Gets the lyricist of this ScoreModification. # noqa: E501 - - The lyricist of the score # noqa: E501 - - :return: The lyricist of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._lyricist - - @lyricist.setter - def lyricist(self, lyricist): - """Sets the lyricist of this ScoreModification. - - The lyricist of the score # noqa: E501 - - :param lyricist: The lyricist of this ScoreModification. # noqa: E501 - :type: str - """ - - self._lyricist = lyricist - - @property - def arranger(self): - """Gets the arranger of this ScoreModification. # noqa: E501 - - The arranger of the score # noqa: E501 - - :return: The arranger of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._arranger - - @arranger.setter - def arranger(self, arranger): - """Sets the arranger of this ScoreModification. - - The arranger of the score # noqa: E501 - - :param arranger: The arranger of this ScoreModification. # noqa: E501 - :type: str - """ - - self._arranger = arranger - - @property - def privacy(self): - """Gets the privacy of this ScoreModification. # noqa: E501 - - - :return: The privacy of this ScoreModification. # noqa: E501 - :rtype: ScorePrivacy - """ - return self._privacy - - @privacy.setter - def privacy(self, privacy): - """Sets the privacy of this ScoreModification. - - - :param privacy: The privacy of this ScoreModification. # noqa: E501 - :type: ScorePrivacy - """ - - self._privacy = privacy - - @property - def sharing_key(self): - """Gets the sharing_key of this ScoreModification. # noqa: E501 - - When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. # noqa: E501 - - :return: The sharing_key of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._sharing_key - - @sharing_key.setter - def sharing_key(self, sharing_key): - """Sets the sharing_key of this ScoreModification. - - When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. # noqa: E501 - - :param sharing_key: The sharing_key of this ScoreModification. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - sharing_key is not None and not re.search(r'^[a-f0-9]{128}$', sharing_key)): # noqa: E501 - raise ValueError(r"Invalid value for `sharing_key`, must be a follow pattern or equal to `/^[a-f0-9]{128}$/`") # noqa: E501 - - self._sharing_key = sharing_key - - @property - def description(self): - """Gets the description of this ScoreModification. # noqa: E501 - - Description of the creation # noqa: E501 - - :return: The description of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ScoreModification. - - Description of the creation # noqa: E501 - - :param description: The description of this ScoreModification. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - description is not None and len(description) > 2000): - raise ValueError("Invalid value for `description`, length must be less than or equal to `2000`") # noqa: E501 - - self._description = description - - @property - def tags(self): - """Gets the tags of this ScoreModification. # noqa: E501 - - Tags describing the score # noqa: E501 - - :return: The tags of this ScoreModification. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags): - """Sets the tags of this ScoreModification. - - Tags describing the score # noqa: E501 - - :param tags: The tags of this ScoreModification. # noqa: E501 - :type: list[str] - """ - - self._tags = tags - - @property - def creation_type(self): - """Gets the creation_type of this ScoreModification. # noqa: E501 - - - :return: The creation_type of this ScoreModification. # noqa: E501 - :rtype: ScoreCreationType - """ - return self._creation_type - - @creation_type.setter - def creation_type(self, creation_type): - """Sets the creation_type of this ScoreModification. - - - :param creation_type: The creation_type of this ScoreModification. # noqa: E501 - :type: ScoreCreationType - """ - - self._creation_type = creation_type - - @property - def license(self): - """Gets the license of this ScoreModification. # noqa: E501 - - - :return: The license of this ScoreModification. # noqa: E501 - :rtype: ScoreLicense - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this ScoreModification. - - - :param license: The license of this ScoreModification. # noqa: E501 - :type: ScoreLicense - """ - - self._license = license - - @property - def license_text(self): - """Gets the license_text of this ScoreModification. # noqa: E501 - - The rights info written on the score # noqa: E501 - - :return: The license_text of this ScoreModification. # noqa: E501 - :rtype: str - """ - return self._license_text - - @license_text.setter - def license_text(self, license_text): - """Sets the license_text of this ScoreModification. - - The rights info written on the score # noqa: E501 - - :param license_text: The license_text of this ScoreModification. # noqa: E501 - :type: str - """ - - self._license_text = license_text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreModification): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreModification): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py deleted file mode 100644 index 19d3de3..0000000 --- a/flat_api/models/score_plays_counts.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScorePlaysCounts(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'weekly': 'float', - 'monthly': 'float' - } - - attribute_map = { - 'total': 'total', - 'weekly': 'weekly', - 'monthly': 'monthly' - } - - def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 - """ScorePlaysCounts - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._weekly = None - self._monthly = None - self.discriminator = None - - if total is not None: - self.total = total - if weekly is not None: - self.weekly = weekly - if monthly is not None: - self.monthly = monthly - - @property - def total(self): - """Gets the total of this ScorePlaysCounts. # noqa: E501 - - The total number of plays of the score # noqa: E501 - - :return: The total of this ScorePlaysCounts. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this ScorePlaysCounts. - - The total number of plays of the score # noqa: E501 - - :param total: The total of this ScorePlaysCounts. # noqa: E501 - :type: float - """ - - self._total = total - - @property - def weekly(self): - """Gets the weekly of this ScorePlaysCounts. # noqa: E501 - - The weekly number of plays of the score # noqa: E501 - - :return: The weekly of this ScorePlaysCounts. # noqa: E501 - :rtype: float - """ - return self._weekly - - @weekly.setter - def weekly(self, weekly): - """Sets the weekly of this ScorePlaysCounts. - - The weekly number of plays of the score # noqa: E501 - - :param weekly: The weekly of this ScorePlaysCounts. # noqa: E501 - :type: float - """ - - self._weekly = weekly - - @property - def monthly(self): - """Gets the monthly of this ScorePlaysCounts. # noqa: E501 - - The monthly number of plays of the score # noqa: E501 - - :return: The monthly of this ScorePlaysCounts. # noqa: E501 - :rtype: float - """ - return self._monthly - - @monthly.setter - def monthly(self, monthly): - """Sets the monthly of this ScorePlaysCounts. - - The monthly number of plays of the score # noqa: E501 - - :param monthly: The monthly of this ScorePlaysCounts. # noqa: E501 - :type: float - """ - - self._monthly = monthly - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScorePlaysCounts): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScorePlaysCounts): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py deleted file mode 100644 index 82dd903..0000000 --- a/flat_api/models/score_privacy.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScorePrivacy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - PUBLIC = "public" - PRIVATE = "private" - ORGANIZATIONPUBLIC = "organizationPublic" - PRIVATELINK = "privateLink" - - allowable_values = [PUBLIC, PRIVATE, ORGANIZATIONPUBLIC, PRIVATELINK] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ScorePrivacy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScorePrivacy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScorePrivacy): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py deleted file mode 100644 index 3bae357..0000000 --- a/flat_api/models/score_revision.py +++ /dev/null @@ -1,315 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreRevision(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'user': 'str', - 'collaborators': 'list[str]', - 'creation_date': 'datetime', - 'event': 'str', - 'description': 'str', - 'autosave': 'bool', - 'statistics': 'ScoreRevisionStatistics' - } - - attribute_map = { - 'id': 'id', - 'user': 'user', - 'collaborators': 'collaborators', - 'creation_date': 'creationDate', - 'event': 'event', - 'description': 'description', - 'autosave': 'autosave', - 'statistics': 'statistics' - } - - def __init__(self, id=None, user=None, collaborators=None, creation_date=None, event=None, description=None, autosave=None, statistics=None, local_vars_configuration=None): # noqa: E501 - """ScoreRevision - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._user = None - self._collaborators = None - self._creation_date = None - self._event = None - self._description = None - self._autosave = None - self._statistics = None - self.discriminator = None - - if id is not None: - self.id = id - if user is not None: - self.user = user - if collaborators is not None: - self.collaborators = collaborators - if creation_date is not None: - self.creation_date = creation_date - if event is not None: - self.event = event - if description is not None: - self.description = description - if autosave is not None: - self.autosave = autosave - if statistics is not None: - self.statistics = statistics - - @property - def id(self): - """Gets the id of this ScoreRevision. # noqa: E501 - - The unique identifier of the revision. # noqa: E501 - - :return: The id of this ScoreRevision. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreRevision. - - The unique identifier of the revision. # noqa: E501 - - :param id: The id of this ScoreRevision. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user(self): - """Gets the user of this ScoreRevision. # noqa: E501 - - The user identifier who created the revision # noqa: E501 - - :return: The user of this ScoreRevision. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this ScoreRevision. - - The user identifier who created the revision # noqa: E501 - - :param user: The user of this ScoreRevision. # noqa: E501 - :type: str - """ - - self._user = user - - @property - def collaborators(self): - """Gets the collaborators of this ScoreRevision. # noqa: E501 - - - :return: The collaborators of this ScoreRevision. # noqa: E501 - :rtype: list[str] - """ - return self._collaborators - - @collaborators.setter - def collaborators(self, collaborators): - """Sets the collaborators of this ScoreRevision. - - - :param collaborators: The collaborators of this ScoreRevision. # noqa: E501 - :type: list[str] - """ - - self._collaborators = collaborators - - @property - def creation_date(self): - """Gets the creation_date of this ScoreRevision. # noqa: E501 - - The date when this revision was created # noqa: E501 - - :return: The creation_date of this ScoreRevision. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ScoreRevision. - - The date when this revision was created # noqa: E501 - - :param creation_date: The creation_date of this ScoreRevision. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def event(self): - """Gets the event of this ScoreRevision. # noqa: E501 - - The last event (action id) of the revision # noqa: E501 - - :return: The event of this ScoreRevision. # noqa: E501 - :rtype: str - """ - return self._event - - @event.setter - def event(self, event): - """Sets the event of this ScoreRevision. - - The last event (action id) of the revision # noqa: E501 - - :param event: The event of this ScoreRevision. # noqa: E501 - :type: str - """ - - self._event = event - - @property - def description(self): - """Gets the description of this ScoreRevision. # noqa: E501 - - A description associated to the revision # noqa: E501 - - :return: The description of this ScoreRevision. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ScoreRevision. - - A description associated to the revision # noqa: E501 - - :param description: The description of this ScoreRevision. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def autosave(self): - """Gets the autosave of this ScoreRevision. # noqa: E501 - - True if this revision was automatically generated by Flat and not on purpose by the user. # noqa: E501 - - :return: The autosave of this ScoreRevision. # noqa: E501 - :rtype: bool - """ - return self._autosave - - @autosave.setter - def autosave(self, autosave): - """Sets the autosave of this ScoreRevision. - - True if this revision was automatically generated by Flat and not on purpose by the user. # noqa: E501 - - :param autosave: The autosave of this ScoreRevision. # noqa: E501 - :type: bool - """ - - self._autosave = autosave - - @property - def statistics(self): - """Gets the statistics of this ScoreRevision. # noqa: E501 - - - :return: The statistics of this ScoreRevision. # noqa: E501 - :rtype: ScoreRevisionStatistics - """ - return self._statistics - - @statistics.setter - def statistics(self, statistics): - """Sets the statistics of this ScoreRevision. - - - :param statistics: The statistics of this ScoreRevision. # noqa: E501 - :type: ScoreRevisionStatistics - """ - - self._statistics = statistics - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreRevision): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreRevision): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py deleted file mode 100644 index c99489c..0000000 --- a/flat_api/models/score_revision_creation.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreRevisionCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'data': 'str', - 'data_encoding': 'str', - 'autosave': 'bool', - 'description': 'str' - } - - attribute_map = { - 'data': 'data', - 'data_encoding': 'dataEncoding', - 'autosave': 'autosave', - 'description': 'description' - } - - def __init__(self, data=None, data_encoding=None, autosave=None, description=None, local_vars_configuration=None): # noqa: E501 - """ScoreRevisionCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._data = None - self._data_encoding = None - self._autosave = None - self._description = None - self.discriminator = None - - self.data = data - if data_encoding is not None: - self.data_encoding = data_encoding - if autosave is not None: - self.autosave = autosave - if description is not None: - self.description = description - - @property - def data(self): - """Gets the data of this ScoreRevisionCreation. # noqa: E501 - - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - - :return: The data of this ScoreRevisionCreation. # noqa: E501 - :rtype: str - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this ScoreRevisionCreation. - - The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. # noqa: E501 - - :param data: The data of this ScoreRevisionCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 - raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - - self._data = data - - @property - def data_encoding(self): - """Gets the data_encoding of this ScoreRevisionCreation. # noqa: E501 - - The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - - :return: The data_encoding of this ScoreRevisionCreation. # noqa: E501 - :rtype: str - """ - return self._data_encoding - - @data_encoding.setter - def data_encoding(self, data_encoding): - """Sets the data_encoding of this ScoreRevisionCreation. - - The optional encoding of the score data. This property must match the encoding used for the `data` property. # noqa: E501 - - :param data_encoding: The data_encoding of this ScoreRevisionCreation. # noqa: E501 - :type: str - """ - allowed_values = ["base64"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and data_encoding not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `data_encoding` ({0}), must be one of {1}" # noqa: E501 - .format(data_encoding, allowed_values) - ) - - self._data_encoding = data_encoding - - @property - def autosave(self): - """Gets the autosave of this ScoreRevisionCreation. # noqa: E501 - - Must be set to `true` if the revision was created automatically. # noqa: E501 - - :return: The autosave of this ScoreRevisionCreation. # noqa: E501 - :rtype: bool - """ - return self._autosave - - @autosave.setter - def autosave(self, autosave): - """Sets the autosave of this ScoreRevisionCreation. - - Must be set to `true` if the revision was created automatically. # noqa: E501 - - :param autosave: The autosave of this ScoreRevisionCreation. # noqa: E501 - :type: bool - """ - - self._autosave = autosave - - @property - def description(self): - """Gets the description of this ScoreRevisionCreation. # noqa: E501 - - A description associated to the revision # noqa: E501 - - :return: The description of this ScoreRevisionCreation. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ScoreRevisionCreation. - - A description associated to the revision # noqa: E501 - - :param description: The description of this ScoreRevisionCreation. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreRevisionCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreRevisionCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py deleted file mode 100644 index 9825728..0000000 --- a/flat_api/models/score_revision_statistics.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreRevisionStatistics(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'additions': 'float', - 'deletions': 'float' - } - - attribute_map = { - 'additions': 'additions', - 'deletions': 'deletions' - } - - def __init__(self, additions=None, deletions=None, local_vars_configuration=None): # noqa: E501 - """ScoreRevisionStatistics - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._additions = None - self._deletions = None - self.discriminator = None - - if additions is not None: - self.additions = additions - if deletions is not None: - self.deletions = deletions - - @property - def additions(self): - """Gets the additions of this ScoreRevisionStatistics. # noqa: E501 - - The number of additions operations in the last revision # noqa: E501 - - :return: The additions of this ScoreRevisionStatistics. # noqa: E501 - :rtype: float - """ - return self._additions - - @additions.setter - def additions(self, additions): - """Sets the additions of this ScoreRevisionStatistics. - - The number of additions operations in the last revision # noqa: E501 - - :param additions: The additions of this ScoreRevisionStatistics. # noqa: E501 - :type: float - """ - - self._additions = additions - - @property - def deletions(self): - """Gets the deletions of this ScoreRevisionStatistics. # noqa: E501 - - The number of deletions operations in the last revision # noqa: E501 - - :return: The deletions of this ScoreRevisionStatistics. # noqa: E501 - :rtype: float - """ - return self._deletions - - @deletions.setter - def deletions(self, deletions): - """Sets the deletions of this ScoreRevisionStatistics. - - The number of deletions operations in the last revision # noqa: E501 - - :param deletions: The deletions of this ScoreRevisionStatistics. # noqa: E501 - :type: float - """ - - self._deletions = deletions - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreRevisionStatistics): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreRevisionStatistics): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py deleted file mode 100644 index 2b4c152..0000000 --- a/flat_api/models/score_source.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreSource(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'google_drive': 'str' - } - - attribute_map = { - 'google_drive': 'googleDrive' - } - - def __init__(self, google_drive=None, local_vars_configuration=None): # noqa: E501 - """ScoreSource - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._google_drive = None - self.discriminator = None - - if google_drive is not None: - self.google_drive = google_drive - - @property - def google_drive(self): - """Gets the google_drive of this ScoreSource. # noqa: E501 - - If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. # noqa: E501 - - :return: The google_drive of this ScoreSource. # noqa: E501 - :rtype: str - """ - return self._google_drive - - @google_drive.setter - def google_drive(self, google_drive): - """Sets the google_drive of this ScoreSource. - - If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. # noqa: E501 - - :param google_drive: The google_drive of this ScoreSource. # noqa: E501 - :type: str - """ - - self._google_drive = google_drive - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreSource): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreSource): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py deleted file mode 100644 index ca6f0d4..0000000 --- a/flat_api/models/score_track.py +++ /dev/null @@ -1,425 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrack(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'title': 'str', - 'score': 'str', - 'creator': 'str', - 'creation_date': 'datetime', - 'modification_date': 'datetime', - 'default': 'bool', - 'state': 'ScoreTrackState', - 'type': 'ScoreTrackType', - 'url': 'str', - 'media_id': 'str', - 'synchronization_points': 'list[ScoreTrackPoint]' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'score': 'score', - 'creator': 'creator', - 'creation_date': 'creationDate', - 'modification_date': 'modificationDate', - 'default': 'default', - 'state': 'state', - 'type': 'type', - 'url': 'url', - 'media_id': 'mediaId', - 'synchronization_points': 'synchronizationPoints' - } - - def __init__(self, id=None, title=None, score=None, creator=None, creation_date=None, modification_date=None, default=None, state=None, type=None, url=None, media_id=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 - """ScoreTrack - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._title = None - self._score = None - self._creator = None - self._creation_date = None - self._modification_date = None - self._default = None - self._state = None - self._type = None - self._url = None - self._media_id = None - self._synchronization_points = None - self.discriminator = None - - if id is not None: - self.id = id - if title is not None: - self.title = title - if score is not None: - self.score = score - if creator is not None: - self.creator = creator - if creation_date is not None: - self.creation_date = creation_date - if modification_date is not None: - self.modification_date = modification_date - if default is not None: - self.default = default - if state is not None: - self.state = state - if type is not None: - self.type = type - if url is not None: - self.url = url - if media_id is not None: - self.media_id = media_id - if synchronization_points is not None: - self.synchronization_points = synchronization_points - - @property - def id(self): - """Gets the id of this ScoreTrack. # noqa: E501 - - The unique identifier of the score track # noqa: E501 - - :return: The id of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ScoreTrack. - - The unique identifier of the score track # noqa: E501 - - :param id: The id of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def title(self): - """Gets the title of this ScoreTrack. # noqa: E501 - - Title of the track # noqa: E501 - - :return: The title of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreTrack. - - Title of the track # noqa: E501 - - :param title: The title of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def score(self): - """Gets the score of this ScoreTrack. # noqa: E501 - - The unique identifier of the score # noqa: E501 - - :return: The score of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._score - - @score.setter - def score(self, score): - """Sets the score of this ScoreTrack. - - The unique identifier of the score # noqa: E501 - - :param score: The score of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._score = score - - @property - def creator(self): - """Gets the creator of this ScoreTrack. # noqa: E501 - - The unique identifier of the track creator # noqa: E501 - - :return: The creator of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this ScoreTrack. - - The unique identifier of the track creator # noqa: E501 - - :param creator: The creator of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._creator = creator - - @property - def creation_date(self): - """Gets the creation_date of this ScoreTrack. # noqa: E501 - - The creation date of the track # noqa: E501 - - :return: The creation_date of this ScoreTrack. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this ScoreTrack. - - The creation date of the track # noqa: E501 - - :param creation_date: The creation_date of this ScoreTrack. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def modification_date(self): - """Gets the modification_date of this ScoreTrack. # noqa: E501 - - The modification date of the track # noqa: E501 - - :return: The modification_date of this ScoreTrack. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this ScoreTrack. - - The modification date of the track # noqa: E501 - - :param modification_date: The modification_date of this ScoreTrack. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def default(self): - """Gets the default of this ScoreTrack. # noqa: E501 - - True if the track should be used as default audio source # noqa: E501 - - :return: The default of this ScoreTrack. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this ScoreTrack. - - True if the track should be used as default audio source # noqa: E501 - - :param default: The default of this ScoreTrack. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def state(self): - """Gets the state of this ScoreTrack. # noqa: E501 - - - :return: The state of this ScoreTrack. # noqa: E501 - :rtype: ScoreTrackState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ScoreTrack. - - - :param state: The state of this ScoreTrack. # noqa: E501 - :type: ScoreTrackState - """ - - self._state = state - - @property - def type(self): - """Gets the type of this ScoreTrack. # noqa: E501 - - - :return: The type of this ScoreTrack. # noqa: E501 - :rtype: ScoreTrackType - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ScoreTrack. - - - :param type: The type of this ScoreTrack. # noqa: E501 - :type: ScoreTrackType - """ - - self._type = type - - @property - def url(self): - """Gets the url of this ScoreTrack. # noqa: E501 - - The URL of the track # noqa: E501 - - :return: The url of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this ScoreTrack. - - The URL of the track # noqa: E501 - - :param url: The url of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._url = url - - @property - def media_id(self): - """Gets the media_id of this ScoreTrack. # noqa: E501 - - The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` # noqa: E501 - - :return: The media_id of this ScoreTrack. # noqa: E501 - :rtype: str - """ - return self._media_id - - @media_id.setter - def media_id(self, media_id): - """Sets the media_id of this ScoreTrack. - - The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` # noqa: E501 - - :param media_id: The media_id of this ScoreTrack. # noqa: E501 - :type: str - """ - - self._media_id = media_id - - @property - def synchronization_points(self): - """Gets the synchronization_points of this ScoreTrack. # noqa: E501 - - - :return: The synchronization_points of this ScoreTrack. # noqa: E501 - :rtype: list[ScoreTrackPoint] - """ - return self._synchronization_points - - @synchronization_points.setter - def synchronization_points(self, synchronization_points): - """Sets the synchronization_points of this ScoreTrack. - - - :param synchronization_points: The synchronization_points of this ScoreTrack. # noqa: E501 - :type: list[ScoreTrackPoint] - """ - - self._synchronization_points = synchronization_points - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrack): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrack): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py deleted file mode 100644 index ac91572..0000000 --- a/flat_api/models/score_track_creation.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrackCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'title': 'str', - 'default': 'bool', - 'state': 'ScoreTrackState', - 'url': 'str', - 'synchronization_points': 'list[ScoreTrackPoint]' - } - - attribute_map = { - 'title': 'title', - 'default': 'default', - 'state': 'state', - 'url': 'url', - 'synchronization_points': 'synchronizationPoints' - } - - def __init__(self, title=None, default=None, state=None, url=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 - """ScoreTrackCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._title = None - self._default = None - self._state = None - self._url = None - self._synchronization_points = None - self.discriminator = None - - if title is not None: - self.title = title - if default is not None: - self.default = default - if state is not None: - self.state = state - if url is not None: - self.url = url - if synchronization_points is not None: - self.synchronization_points = synchronization_points - - @property - def title(self): - """Gets the title of this ScoreTrackCreation. # noqa: E501 - - Title of the track # noqa: E501 - - :return: The title of this ScoreTrackCreation. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreTrackCreation. - - Title of the track # noqa: E501 - - :param title: The title of this ScoreTrackCreation. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def default(self): - """Gets the default of this ScoreTrackCreation. # noqa: E501 - - True if the track should be used as default audio source # noqa: E501 - - :return: The default of this ScoreTrackCreation. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this ScoreTrackCreation. - - True if the track should be used as default audio source # noqa: E501 - - :param default: The default of this ScoreTrackCreation. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def state(self): - """Gets the state of this ScoreTrackCreation. # noqa: E501 - - - :return: The state of this ScoreTrackCreation. # noqa: E501 - :rtype: ScoreTrackState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ScoreTrackCreation. - - - :param state: The state of this ScoreTrackCreation. # noqa: E501 - :type: ScoreTrackState - """ - - self._state = state - - @property - def url(self): - """Gets the url of this ScoreTrackCreation. # noqa: E501 - - The URL of the track # noqa: E501 - - :return: The url of this ScoreTrackCreation. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this ScoreTrackCreation. - - The URL of the track # noqa: E501 - - :param url: The url of this ScoreTrackCreation. # noqa: E501 - :type: str - """ - - self._url = url - - @property - def synchronization_points(self): - """Gets the synchronization_points of this ScoreTrackCreation. # noqa: E501 - - - :return: The synchronization_points of this ScoreTrackCreation. # noqa: E501 - :rtype: list[ScoreTrackPoint] - """ - return self._synchronization_points - - @synchronization_points.setter - def synchronization_points(self, synchronization_points): - """Sets the synchronization_points of this ScoreTrackCreation. - - - :param synchronization_points: The synchronization_points of this ScoreTrackCreation. # noqa: E501 - :type: list[ScoreTrackPoint] - """ - - self._synchronization_points = synchronization_points - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrackCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrackCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py deleted file mode 100644 index 66a0d51..0000000 --- a/flat_api/models/score_track_point.py +++ /dev/null @@ -1,187 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrackPoint(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'measure_uuid': 'str', - 'time': 'float' - } - - attribute_map = { - 'type': 'type', - 'measure_uuid': 'measureUuid', - 'time': 'time' - } - - def __init__(self, type=None, measure_uuid=None, time=None, local_vars_configuration=None): # noqa: E501 - """ScoreTrackPoint - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._measure_uuid = None - self._time = None - self.discriminator = None - - self.type = type - if measure_uuid is not None: - self.measure_uuid = measure_uuid - self.time = time - - @property - def type(self): - """Gets the type of this ScoreTrackPoint. # noqa: E501 - - The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` # noqa: E501 - - :return: The type of this ScoreTrackPoint. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ScoreTrackPoint. - - The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` # noqa: E501 - - :param type: The type of this ScoreTrackPoint. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["measure", "end"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def measure_uuid(self): - """Gets the measure_uuid of this ScoreTrackPoint. # noqa: E501 - - The measure unique identifier # noqa: E501 - - :return: The measure_uuid of this ScoreTrackPoint. # noqa: E501 - :rtype: str - """ - return self._measure_uuid - - @measure_uuid.setter - def measure_uuid(self, measure_uuid): - """Sets the measure_uuid of this ScoreTrackPoint. - - The measure unique identifier # noqa: E501 - - :param measure_uuid: The measure_uuid of this ScoreTrackPoint. # noqa: E501 - :type: str - """ - - self._measure_uuid = measure_uuid - - @property - def time(self): - """Gets the time of this ScoreTrackPoint. # noqa: E501 - - The corresponding time in seconds # noqa: E501 - - :return: The time of this ScoreTrackPoint. # noqa: E501 - :rtype: float - """ - return self._time - - @time.setter - def time(self, time): - """Sets the time of this ScoreTrackPoint. - - The corresponding time in seconds # noqa: E501 - - :param time: The time of this ScoreTrackPoint. # noqa: E501 - :type: float - """ - if self.local_vars_configuration.client_side_validation and time is None: # noqa: E501 - raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 - - self._time = time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrackPoint): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrackPoint): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py deleted file mode 100644 index 5faede1..0000000 --- a/flat_api/models/score_track_state.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrackState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - DRAFT = "draft" - COMPLETED = "completed" - DELETED = "deleted" - - allowable_values = [DRAFT, COMPLETED, DELETED] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ScoreTrackState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrackState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrackState): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py deleted file mode 100644 index d8d62a1..0000000 --- a/flat_api/models/score_track_type.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrackType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - AUDIO = "audio" - SOUNDCLOUD = "soundcloud" - YOUTUBE = "youtube" - VIMEO = "vimeo" - - allowable_values = [AUDIO, SOUNDCLOUD, YOUTUBE, VIMEO] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """ScoreTrackType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrackType): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrackType): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py deleted file mode 100644 index 9601007..0000000 --- a/flat_api/models/score_track_update.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreTrackUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'title': 'str', - 'default': 'bool', - 'state': 'ScoreTrackState', - 'synchronization_points': 'list[ScoreTrackPoint]' - } - - attribute_map = { - 'title': 'title', - 'default': 'default', - 'state': 'state', - 'synchronization_points': 'synchronizationPoints' - } - - def __init__(self, title=None, default=None, state=None, synchronization_points=None, local_vars_configuration=None): # noqa: E501 - """ScoreTrackUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._title = None - self._default = None - self._state = None - self._synchronization_points = None - self.discriminator = None - - if title is not None: - self.title = title - if default is not None: - self.default = default - if state is not None: - self.state = state - if synchronization_points is not None: - self.synchronization_points = synchronization_points - - @property - def title(self): - """Gets the title of this ScoreTrackUpdate. # noqa: E501 - - Title of the track # noqa: E501 - - :return: The title of this ScoreTrackUpdate. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ScoreTrackUpdate. - - Title of the track # noqa: E501 - - :param title: The title of this ScoreTrackUpdate. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def default(self): - """Gets the default of this ScoreTrackUpdate. # noqa: E501 - - True if the track should be used as default audio source # noqa: E501 - - :return: The default of this ScoreTrackUpdate. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this ScoreTrackUpdate. - - True if the track should be used as default audio source # noqa: E501 - - :param default: The default of this ScoreTrackUpdate. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def state(self): - """Gets the state of this ScoreTrackUpdate. # noqa: E501 - - - :return: The state of this ScoreTrackUpdate. # noqa: E501 - :rtype: ScoreTrackState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ScoreTrackUpdate. - - - :param state: The state of this ScoreTrackUpdate. # noqa: E501 - :type: ScoreTrackState - """ - - self._state = state - - @property - def synchronization_points(self): - """Gets the synchronization_points of this ScoreTrackUpdate. # noqa: E501 - - - :return: The synchronization_points of this ScoreTrackUpdate. # noqa: E501 - :rtype: list[ScoreTrackPoint] - """ - return self._synchronization_points - - @synchronization_points.setter - def synchronization_points(self, synchronization_points): - """Sets the synchronization_points of this ScoreTrackUpdate. - - - :param synchronization_points: The synchronization_points of this ScoreTrackUpdate. # noqa: E501 - :type: list[ScoreTrackPoint] - """ - - self._synchronization_points = synchronization_points - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreTrackUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreTrackUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py deleted file mode 100644 index 81397f7..0000000 --- a/flat_api/models/score_views_counts.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class ScoreViewsCounts(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'weekly': 'float', - 'monthly': 'float' - } - - attribute_map = { - 'total': 'total', - 'weekly': 'weekly', - 'monthly': 'monthly' - } - - def __init__(self, total=None, weekly=None, monthly=None, local_vars_configuration=None): # noqa: E501 - """ScoreViewsCounts - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._weekly = None - self._monthly = None - self.discriminator = None - - if total is not None: - self.total = total - if weekly is not None: - self.weekly = weekly - if monthly is not None: - self.monthly = monthly - - @property - def total(self): - """Gets the total of this ScoreViewsCounts. # noqa: E501 - - The total number of views of the score # noqa: E501 - - :return: The total of this ScoreViewsCounts. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this ScoreViewsCounts. - - The total number of views of the score # noqa: E501 - - :param total: The total of this ScoreViewsCounts. # noqa: E501 - :type: float - """ - - self._total = total - - @property - def weekly(self): - """Gets the weekly of this ScoreViewsCounts. # noqa: E501 - - The weekly number of views of the score # noqa: E501 - - :return: The weekly of this ScoreViewsCounts. # noqa: E501 - :rtype: float - """ - return self._weekly - - @weekly.setter - def weekly(self, weekly): - """Sets the weekly of this ScoreViewsCounts. - - The weekly number of views of the score # noqa: E501 - - :param weekly: The weekly of this ScoreViewsCounts. # noqa: E501 - :type: float - """ - - self._weekly = weekly - - @property - def monthly(self): - """Gets the monthly of this ScoreViewsCounts. # noqa: E501 - - The monthly number of views of the score # noqa: E501 - - :return: The monthly of this ScoreViewsCounts. # noqa: E501 - :rtype: float - """ - return self._monthly - - @monthly.setter - def monthly(self, monthly): - """Sets the monthly of this ScoreViewsCounts. - - The monthly number of views of the score # noqa: E501 - - :param monthly: The monthly of this ScoreViewsCounts. # noqa: E501 - :type: float - """ - - self._monthly = monthly - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ScoreViewsCounts): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ScoreViewsCounts): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task.py b/flat_api/models/task.py deleted file mode 100644 index 0eda386..0000000 --- a/flat_api/models/task.py +++ /dev/null @@ -1,301 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class Task(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'type': 'str', - 'state': 'str', - 'progress': 'TaskProgress', - 'creation_date': 'datetime', - 'modification_date': 'datetime', - 'done_date': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'state': 'state', - 'progress': 'progress', - 'creation_date': 'creationDate', - 'modification_date': 'modificationDate', - 'done_date': 'doneDate' - } - - def __init__(self, id=None, type=None, state=None, progress=None, creation_date=None, modification_date=None, done_date=None, local_vars_configuration=None): # noqa: E501 - """Task - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._type = None - self._state = None - self._progress = None - self._creation_date = None - self._modification_date = None - self._done_date = None - self.discriminator = None - - if id is not None: - self.id = id - if type is not None: - self.type = type - if state is not None: - self.state = state - if progress is not None: - self.progress = progress - if creation_date is not None: - self.creation_date = creation_date - if modification_date is not None: - self.modification_date = modification_date - if done_date is not None: - self.done_date = done_date - - @property - def id(self): - """Gets the id of this Task. # noqa: E501 - - Unique identifier of the task # noqa: E501 - - :return: The id of this Task. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Task. - - Unique identifier of the task # noqa: E501 - - :param id: The id of this Task. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def type(self): - """Gets the type of this Task. # noqa: E501 - - Type of the task # noqa: E501 - - :return: The type of this Task. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Task. - - Type of the task # noqa: E501 - - :param type: The type of this Task. # noqa: E501 - :type: str - """ - allowed_values = ["audio-export", "audio-low-prio"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def state(self): - """Gets the state of this Task. # noqa: E501 - - State of the Task # noqa: E501 - - :return: The state of this Task. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Task. - - State of the Task # noqa: E501 - - :param state: The state of this Task. # noqa: E501 - :type: str - """ - allowed_values = ["created", "doing", "done", "canceled", "error"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def progress(self): - """Gets the progress of this Task. # noqa: E501 - - - :return: The progress of this Task. # noqa: E501 - :rtype: TaskProgress - """ - return self._progress - - @progress.setter - def progress(self, progress): - """Sets the progress of this Task. - - - :param progress: The progress of this Task. # noqa: E501 - :type: TaskProgress - """ - - self._progress = progress - - @property - def creation_date(self): - """Gets the creation_date of this Task. # noqa: E501 - - The creation date of the task # noqa: E501 - - :return: The creation_date of this Task. # noqa: E501 - :rtype: datetime - """ - return self._creation_date - - @creation_date.setter - def creation_date(self, creation_date): - """Sets the creation_date of this Task. - - The creation date of the task # noqa: E501 - - :param creation_date: The creation_date of this Task. # noqa: E501 - :type: datetime - """ - - self._creation_date = creation_date - - @property - def modification_date(self): - """Gets the modification_date of this Task. # noqa: E501 - - The last modification date of the task # noqa: E501 - - :return: The modification_date of this Task. # noqa: E501 - :rtype: datetime - """ - return self._modification_date - - @modification_date.setter - def modification_date(self, modification_date): - """Sets the modification_date of this Task. - - The last modification date of the task # noqa: E501 - - :param modification_date: The modification_date of this Task. # noqa: E501 - :type: datetime - """ - - self._modification_date = modification_date - - @property - def done_date(self): - """Gets the done_date of this Task. # noqa: E501 - - The date when the task has been completed # noqa: E501 - - :return: The done_date of this Task. # noqa: E501 - :rtype: datetime - """ - return self._done_date - - @done_date.setter - def done_date(self, done_date): - """Sets the done_date of this Task. - - The date when the task has been completed # noqa: E501 - - :param done_date: The done_date of this Task. # noqa: E501 - :type: datetime - """ - - self._done_date = done_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Task): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Task): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py deleted file mode 100644 index 64176ce..0000000 --- a/flat_api/models/task_export_options.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class TaskExportOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'parts': 'list[str]' - } - - attribute_map = { - 'parts': 'parts' - } - - def __init__(self, parts=None, local_vars_configuration=None): # noqa: E501 - """TaskExportOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._parts = None - self.discriminator = None - - if parts is not None: - self.parts = parts - - @property - def parts(self): - """Gets the parts of this TaskExportOptions. # noqa: E501 - - A list of parts to specifically export # noqa: E501 - - :return: The parts of this TaskExportOptions. # noqa: E501 - :rtype: list[str] - """ - return self._parts - - @parts.setter - def parts(self, parts): - """Sets the parts of this TaskExportOptions. - - A list of parts to specifically export # noqa: E501 - - :param parts: The parts of this TaskExportOptions. # noqa: E501 - :type: list[str] - """ - - self._parts = parts - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TaskExportOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TaskExportOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py deleted file mode 100644 index dc613f3..0000000 --- a/flat_api/models/task_progress.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class TaskProgress(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'percent': 'float', - 'text': 'str' - } - - attribute_map = { - 'percent': 'percent', - 'text': 'text' - } - - def __init__(self, percent=None, text=None, local_vars_configuration=None): # noqa: E501 - """TaskProgress - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._percent = None - self._text = None - self.discriminator = None - - if percent is not None: - self.percent = percent - if text is not None: - self.text = text - - @property - def percent(self): - """Gets the percent of this TaskProgress. # noqa: E501 - - Percent of the task progression # noqa: E501 - - :return: The percent of this TaskProgress. # noqa: E501 - :rtype: float - """ - return self._percent - - @percent.setter - def percent(self, percent): - """Sets the percent of this TaskProgress. - - Percent of the task progression # noqa: E501 - - :param percent: The percent of this TaskProgress. # noqa: E501 - :type: float - """ - - self._percent = percent - - @property - def text(self): - """Gets the text of this TaskProgress. # noqa: E501 - - Text details of the task progress # noqa: E501 - - :return: The text of this TaskProgress. # noqa: E501 - :rtype: str - """ - return self._text - - @text.setter - def text(self, text): - """Sets the text of this TaskProgress. - - Text details of the task progress # noqa: E501 - - :param text: The text of this TaskProgress. # noqa: E501 - :type: str - """ - - self._text = text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TaskProgress): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TaskProgress): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py deleted file mode 100644 index d6e8440..0000000 --- a/flat_api/models/user_admin_update.py +++ /dev/null @@ -1,282 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserAdminUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'password': 'str', - 'organization_role': 'OrganizationRoles', - 'username': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'email': 'str' - } - - attribute_map = { - 'password': 'password', - 'organization_role': 'organizationRole', - 'username': 'username', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'email': 'email' - } - - def __init__(self, password=None, organization_role=None, username=None, firstname=None, lastname=None, email=None, local_vars_configuration=None): # noqa: E501 - """UserAdminUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._password = None - self._organization_role = None - self._username = None - self._firstname = None - self._lastname = None - self._email = None - self.discriminator = None - - if password is not None: - self.password = password - if organization_role is not None: - self.organization_role = organization_role - if username is not None: - self.username = username - if firstname is not None: - self.firstname = firstname - if lastname is not None: - self.lastname = lastname - if email is not None: - self.email = email - - @property - def password(self): - """Gets the password of this UserAdminUpdate. # noqa: E501 - - Password of the account # noqa: E501 - - :return: The password of this UserAdminUpdate. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserAdminUpdate. - - Password of the account # noqa: E501 - - :param password: The password of this UserAdminUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - password is not None and len(password) > 1000): - raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - password is not None and len(password) < 6): - raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 - - self._password = password - - @property - def organization_role(self): - """Gets the organization_role of this UserAdminUpdate. # noqa: E501 - - - :return: The organization_role of this UserAdminUpdate. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this UserAdminUpdate. - - - :param organization_role: The organization_role of this UserAdminUpdate. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def username(self): - """Gets the username of this UserAdminUpdate. # noqa: E501 - - Username of the account # noqa: E501 - - :return: The username of this UserAdminUpdate. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserAdminUpdate. - - Username of the account # noqa: E501 - - :param username: The username of this UserAdminUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - username is not None and len(username) > 30): - raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - username is not None and len(username) < 1): - raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - username is not None and not re.search(r'^[A-Za-z0-9\-_.]+$', username)): # noqa: E501 - raise ValueError(r"Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\-_.]+$/`") # noqa: E501 - - self._username = username - - @property - def firstname(self): - """Gets the firstname of this UserAdminUpdate. # noqa: E501 - - First name of the user # noqa: E501 - - :return: The firstname of this UserAdminUpdate. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserAdminUpdate. - - First name of the user # noqa: E501 - - :param firstname: The firstname of this UserAdminUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - firstname is not None and len(firstname) > 60): - raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserAdminUpdate. # noqa: E501 - - Last name of the user # noqa: E501 - - :return: The lastname of this UserAdminUpdate. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserAdminUpdate. - - Last name of the user # noqa: E501 - - :param lastname: The lastname of this UserAdminUpdate. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - lastname is not None and len(lastname) > 60): - raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 - - self._lastname = lastname - - @property - def email(self): - """Gets the email of this UserAdminUpdate. # noqa: E501 - - Email of the account # noqa: E501 - - :return: The email of this UserAdminUpdate. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserAdminUpdate. - - Email of the account # noqa: E501 - - :param email: The email of this UserAdminUpdate. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserAdminUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserAdminUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py deleted file mode 100644 index 31845c5..0000000 --- a/flat_api/models/user_creation.py +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserCreation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'email': 'str', - 'password': 'str', - 'locale': 'FlatLocales', - 'role': 'str' - } - - attribute_map = { - 'username': 'username', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'email': 'email', - 'password': 'password', - 'locale': 'locale', - 'role': 'role' - } - - def __init__(self, username=None, firstname=None, lastname=None, email=None, password=None, locale=None, role='user', local_vars_configuration=None): # noqa: E501 - """UserCreation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._firstname = None - self._lastname = None - self._email = None - self._password = None - self._locale = None - self._role = None - self.discriminator = None - - self.username = username - if firstname is not None: - self.firstname = firstname - if lastname is not None: - self.lastname = lastname - if email is not None: - self.email = email - self.password = password - if locale is not None: - self.locale = locale - if role is not None: - self.role = role - - @property - def username(self): - """Gets the username of this UserCreation. # noqa: E501 - - Username of the new account # noqa: E501 - - :return: The username of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserCreation. - - Username of the new account # noqa: E501 - - :param username: The username of this UserCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and username is None: # noqa: E501 - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - username is not None and len(username) > 30): - raise ValueError("Invalid value for `username`, length must be less than or equal to `30`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - username is not None and len(username) < 1): - raise ValueError("Invalid value for `username`, length must be greater than or equal to `1`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - username is not None and not re.search(r'^[A-Za-z0-9\-_.]+$', username)): # noqa: E501 - raise ValueError(r"Invalid value for `username`, must be a follow pattern or equal to `/^[A-Za-z0-9\-_.]+$/`") # noqa: E501 - - self._username = username - - @property - def firstname(self): - """Gets the firstname of this UserCreation. # noqa: E501 - - First name of the user # noqa: E501 - - :return: The firstname of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserCreation. - - First name of the user # noqa: E501 - - :param firstname: The firstname of this UserCreation. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - firstname is not None and len(firstname) > 60): - raise ValueError("Invalid value for `firstname`, length must be less than or equal to `60`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserCreation. # noqa: E501 - - Last name of the user # noqa: E501 - - :return: The lastname of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserCreation. - - Last name of the user # noqa: E501 - - :param lastname: The lastname of this UserCreation. # noqa: E501 - :type: str - """ - if (self.local_vars_configuration.client_side_validation and - lastname is not None and len(lastname) > 60): - raise ValueError("Invalid value for `lastname`, length must be less than or equal to `60`") # noqa: E501 - - self._lastname = lastname - - @property - def email(self): - """Gets the email of this UserCreation. # noqa: E501 - - Email of the new account # noqa: E501 - - :return: The email of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserCreation. - - Email of the new account # noqa: E501 - - :param email: The email of this UserCreation. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this UserCreation. # noqa: E501 - - Password of the new account # noqa: E501 - - :return: The password of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserCreation. - - Password of the new account # noqa: E501 - - :param password: The password of this UserCreation. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - password is not None and len(password) > 1000): - raise ValueError("Invalid value for `password`, length must be less than or equal to `1000`") # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - password is not None and len(password) < 6): - raise ValueError("Invalid value for `password`, length must be greater than or equal to `6`") # noqa: E501 - - self._password = password - - @property - def locale(self): - """Gets the locale of this UserCreation. # noqa: E501 - - - :return: The locale of this UserCreation. # noqa: E501 - :rtype: FlatLocales - """ - return self._locale - - @locale.setter - def locale(self, locale): - """Sets the locale of this UserCreation. - - - :param locale: The locale of this UserCreation. # noqa: E501 - :type: FlatLocales - """ - - self._locale = locale - - @property - def role(self): - """Gets the role of this UserCreation. # noqa: E501 - - Role of the new account # noqa: E501 - - :return: The role of this UserCreation. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this UserCreation. - - Role of the new account # noqa: E501 - - :param role: The role of this UserCreation. # noqa: E501 - :type: str - """ - allowed_values = ["user", "teacher", "admin"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserCreation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserCreation): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py deleted file mode 100644 index b30f7b1..0000000 --- a/flat_api/models/user_details.py +++ /dev/null @@ -1,848 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'class_role': 'ClassRoles', - 'private_profile': 'bool', - 'followers_count': 'int', - 'firstname': 'str', - 'is_power_user': 'bool', - 'locale': 'FlatLocales', - 'instruments': 'list[str]', - 'html_url': 'str', - 'liked_scores_count': 'int', - 'printable_name': 'str', - 'bio': 'str', - 'picture_file': 'str', - 'id': 'str', - 'cover_picture_file': 'str', - 'picture': 'str', - 'name': 'str', - 'is_flat_team': 'bool', - 'organization_role': 'OrganizationRoles', - 'profile_theme': 'str', - 'cover_picture': 'str', - 'owned_public_scores_count': 'int', - 'lastname': 'str', - 'following_count': 'int', - 'organization': 'str', - 'type': 'str', - 'registration_date': 'datetime' - } - - attribute_map = { - 'username': 'username', - 'class_role': 'classRole', - 'private_profile': 'privateProfile', - 'followers_count': 'followersCount', - 'firstname': 'firstname', - 'is_power_user': 'isPowerUser', - 'locale': 'locale', - 'instruments': 'instruments', - 'html_url': 'htmlUrl', - 'liked_scores_count': 'likedScoresCount', - 'printable_name': 'printableName', - 'bio': 'bio', - 'picture_file': 'pictureFile', - 'id': 'id', - 'cover_picture_file': 'coverPictureFile', - 'picture': 'picture', - 'name': 'name', - 'is_flat_team': 'isFlatTeam', - 'organization_role': 'organizationRole', - 'profile_theme': 'profileTheme', - 'cover_picture': 'coverPicture', - 'owned_public_scores_count': 'ownedPublicScoresCount', - 'lastname': 'lastname', - 'following_count': 'followingCount', - 'organization': 'organization', - 'type': 'type', - 'registration_date': 'registrationDate' - } - - def __init__(self, username=None, class_role=None, private_profile=None, followers_count=None, firstname=None, is_power_user=None, locale=None, instruments=None, html_url=None, liked_scores_count=None, printable_name=None, bio=None, picture_file=None, id=None, cover_picture_file=None, picture=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, lastname=None, following_count=None, organization=None, type=None, registration_date=None, local_vars_configuration=None): # noqa: E501 - """UserDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._class_role = None - self._private_profile = None - self._followers_count = None - self._firstname = None - self._is_power_user = None - self._locale = None - self._instruments = None - self._html_url = None - self._liked_scores_count = None - self._printable_name = None - self._bio = None - self._picture_file = None - self._id = None - self._cover_picture_file = None - self._picture = None - self._name = None - self._is_flat_team = None - self._organization_role = None - self._profile_theme = None - self._cover_picture = None - self._owned_public_scores_count = None - self._lastname = None - self._following_count = None - self._organization = None - self._type = None - self._registration_date = None - self.discriminator = None - - if username is not None: - self.username = username - if class_role is not None: - self.class_role = class_role - if private_profile is not None: - self.private_profile = private_profile - if followers_count is not None: - self.followers_count = followers_count - if firstname is not None: - self.firstname = firstname - if is_power_user is not None: - self.is_power_user = is_power_user - if locale is not None: - self.locale = locale - if instruments is not None: - self.instruments = instruments - if html_url is not None: - self.html_url = html_url - if liked_scores_count is not None: - self.liked_scores_count = liked_scores_count - if printable_name is not None: - self.printable_name = printable_name - if bio is not None: - self.bio = bio - self.picture_file = picture_file - if id is not None: - self.id = id - self.cover_picture_file = cover_picture_file - self.picture = picture - if name is not None: - self.name = name - if is_flat_team is not None: - self.is_flat_team = is_flat_team - if organization_role is not None: - self.organization_role = organization_role - if profile_theme is not None: - self.profile_theme = profile_theme - if cover_picture is not None: - self.cover_picture = cover_picture - if owned_public_scores_count is not None: - self.owned_public_scores_count = owned_public_scores_count - if lastname is not None: - self.lastname = lastname - if following_count is not None: - self.following_count = following_count - if organization is not None: - self.organization = organization - if type is not None: - self.type = type - if registration_date is not None: - self.registration_date = registration_date - - @property - def username(self): - """Gets the username of this UserDetails. # noqa: E501 - - The user name (unique for the organization) # noqa: E501 - - :return: The username of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserDetails. - - The user name (unique for the organization) # noqa: E501 - - :param username: The username of this UserDetails. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def class_role(self): - """Gets the class_role of this UserDetails. # noqa: E501 - - - :return: The class_role of this UserDetails. # noqa: E501 - :rtype: ClassRoles - """ - return self._class_role - - @class_role.setter - def class_role(self, class_role): - """Sets the class_role of this UserDetails. - - - :param class_role: The class_role of this UserDetails. # noqa: E501 - :type: ClassRoles - """ - - self._class_role = class_role - - @property - def private_profile(self): - """Gets the private_profile of this UserDetails. # noqa: E501 - - Tell either this user profile is private or not (individual accounts only) # noqa: E501 - - :return: The private_profile of this UserDetails. # noqa: E501 - :rtype: bool - """ - return self._private_profile - - @private_profile.setter - def private_profile(self, private_profile): - """Sets the private_profile of this UserDetails. - - Tell either this user profile is private or not (individual accounts only) # noqa: E501 - - :param private_profile: The private_profile of this UserDetails. # noqa: E501 - :type: bool - """ - - self._private_profile = private_profile - - @property - def followers_count(self): - """Gets the followers_count of this UserDetails. # noqa: E501 - - Number of followers the user have # noqa: E501 - - :return: The followers_count of this UserDetails. # noqa: E501 - :rtype: int - """ - return self._followers_count - - @followers_count.setter - def followers_count(self, followers_count): - """Sets the followers_count of this UserDetails. - - Number of followers the user have # noqa: E501 - - :param followers_count: The followers_count of this UserDetails. # noqa: E501 - :type: int - """ - - self._followers_count = followers_count - - @property - def firstname(self): - """Gets the firstname of this UserDetails. # noqa: E501 - - Firstname of the user (for education users) # noqa: E501 - - :return: The firstname of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserDetails. - - Firstname of the user (for education users) # noqa: E501 - - :param firstname: The firstname of this UserDetails. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def is_power_user(self): - """Gets the is_power_user of this UserDetails. # noqa: E501 - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :return: The is_power_user of this UserDetails. # noqa: E501 - :rtype: bool - """ - return self._is_power_user - - @is_power_user.setter - def is_power_user(self, is_power_user): - """Sets the is_power_user of this UserDetails. - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :param is_power_user: The is_power_user of this UserDetails. # noqa: E501 - :type: bool - """ - - self._is_power_user = is_power_user - - @property - def locale(self): - """Gets the locale of this UserDetails. # noqa: E501 - - - :return: The locale of this UserDetails. # noqa: E501 - :rtype: FlatLocales - """ - return self._locale - - @locale.setter - def locale(self, locale): - """Sets the locale of this UserDetails. - - - :param locale: The locale of this UserDetails. # noqa: E501 - :type: FlatLocales - """ - - self._locale = locale - - @property - def instruments(self): - """Gets the instruments of this UserDetails. # noqa: E501 - - An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :return: The instruments of this UserDetails. # noqa: E501 - :rtype: list[str] - """ - return self._instruments - - @instruments.setter - def instruments(self, instruments): - """Sets the instruments of this UserDetails. - - An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :param instruments: The instruments of this UserDetails. # noqa: E501 - :type: list[str] - """ - - self._instruments = instruments - - @property - def html_url(self): - """Gets the html_url of this UserDetails. # noqa: E501 - - Link to user profile (for Indiv. users only) # noqa: E501 - - :return: The html_url of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this UserDetails. - - Link to user profile (for Indiv. users only) # noqa: E501 - - :param html_url: The html_url of this UserDetails. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def liked_scores_count(self): - """Gets the liked_scores_count of this UserDetails. # noqa: E501 - - Number of the scores liked by the user # noqa: E501 - - :return: The liked_scores_count of this UserDetails. # noqa: E501 - :rtype: int - """ - return self._liked_scores_count - - @liked_scores_count.setter - def liked_scores_count(self, liked_scores_count): - """Sets the liked_scores_count of this UserDetails. - - Number of the scores liked by the user # noqa: E501 - - :param liked_scores_count: The liked_scores_count of this UserDetails. # noqa: E501 - :type: int - """ - - self._liked_scores_count = liked_scores_count - - @property - def printable_name(self): - """Gets the printable_name of this UserDetails. # noqa: E501 - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :return: The printable_name of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._printable_name - - @printable_name.setter - def printable_name(self, printable_name): - """Sets the printable_name of this UserDetails. - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :param printable_name: The printable_name of this UserDetails. # noqa: E501 - :type: str - """ - - self._printable_name = printable_name - - @property - def bio(self): - """Gets the bio of this UserDetails. # noqa: E501 - - User's biography # noqa: E501 - - :return: The bio of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._bio - - @bio.setter - def bio(self, bio): - """Sets the bio of this UserDetails. - - User's biography # noqa: E501 - - :param bio: The bio of this UserDetails. # noqa: E501 - :type: str - """ - - self._bio = bio - - @property - def picture_file(self): - """Gets the picture_file of this UserDetails. # noqa: E501 - - The ID of the user profile picture # noqa: E501 - - :return: The picture_file of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._picture_file - - @picture_file.setter - def picture_file(self, picture_file): - """Sets the picture_file of this UserDetails. - - The ID of the user profile picture # noqa: E501 - - :param picture_file: The picture_file of this UserDetails. # noqa: E501 - :type: str - """ - - self._picture_file = picture_file - - @property - def id(self): - """Gets the id of this UserDetails. # noqa: E501 - - Identifier of the user # noqa: E501 - - :return: The id of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserDetails. - - Identifier of the user # noqa: E501 - - :param id: The id of this UserDetails. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def cover_picture_file(self): - """Gets the cover_picture_file of this UserDetails. # noqa: E501 - - The ID of the user profile cover picture # noqa: E501 - - :return: The cover_picture_file of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._cover_picture_file - - @cover_picture_file.setter - def cover_picture_file(self, cover_picture_file): - """Sets the cover_picture_file of this UserDetails. - - The ID of the user profile cover picture # noqa: E501 - - :param cover_picture_file: The cover_picture_file of this UserDetails. # noqa: E501 - :type: str - """ - - self._cover_picture_file = cover_picture_file - - @property - def picture(self): - """Gets the picture of this UserDetails. # noqa: E501 - - The URL of the picture to display # noqa: E501 - - :return: The picture of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._picture - - @picture.setter - def picture(self, picture): - """Sets the picture of this UserDetails. - - The URL of the picture to display # noqa: E501 - - :param picture: The picture of this UserDetails. # noqa: E501 - :type: str - """ - - self._picture = picture - - @property - def name(self): - """Gets the name of this UserDetails. # noqa: E501 - - A displayable name for the user (for consumer users) # noqa: E501 - - :return: The name of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDetails. - - A displayable name for the user (for consumer users) # noqa: E501 - - :param name: The name of this UserDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def is_flat_team(self): - """Gets the is_flat_team of this UserDetails. # noqa: E501 - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :return: The is_flat_team of this UserDetails. # noqa: E501 - :rtype: bool - """ - return self._is_flat_team - - @is_flat_team.setter - def is_flat_team(self, is_flat_team): - """Sets the is_flat_team of this UserDetails. - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :param is_flat_team: The is_flat_team of this UserDetails. # noqa: E501 - :type: bool - """ - - self._is_flat_team = is_flat_team - - @property - def organization_role(self): - """Gets the organization_role of this UserDetails. # noqa: E501 - - - :return: The organization_role of this UserDetails. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this UserDetails. - - - :param organization_role: The organization_role of this UserDetails. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def profile_theme(self): - """Gets the profile_theme of this UserDetails. # noqa: E501 - - Theme (background) for the profile # noqa: E501 - - :return: The profile_theme of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._profile_theme - - @profile_theme.setter - def profile_theme(self, profile_theme): - """Sets the profile_theme of this UserDetails. - - Theme (background) for the profile # noqa: E501 - - :param profile_theme: The profile_theme of this UserDetails. # noqa: E501 - :type: str - """ - - self._profile_theme = profile_theme - - @property - def cover_picture(self): - """Gets the cover_picture of this UserDetails. # noqa: E501 - - Cover picture (backgroud) for the profile # noqa: E501 - - :return: The cover_picture of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._cover_picture - - @cover_picture.setter - def cover_picture(self, cover_picture): - """Sets the cover_picture of this UserDetails. - - Cover picture (backgroud) for the profile # noqa: E501 - - :param cover_picture: The cover_picture of this UserDetails. # noqa: E501 - :type: str - """ - - self._cover_picture = cover_picture - - @property - def owned_public_scores_count(self): - """Gets the owned_public_scores_count of this UserDetails. # noqa: E501 - - Number of public scores the user have # noqa: E501 - - :return: The owned_public_scores_count of this UserDetails. # noqa: E501 - :rtype: int - """ - return self._owned_public_scores_count - - @owned_public_scores_count.setter - def owned_public_scores_count(self, owned_public_scores_count): - """Sets the owned_public_scores_count of this UserDetails. - - Number of public scores the user have # noqa: E501 - - :param owned_public_scores_count: The owned_public_scores_count of this UserDetails. # noqa: E501 - :type: int - """ - - self._owned_public_scores_count = owned_public_scores_count - - @property - def lastname(self): - """Gets the lastname of this UserDetails. # noqa: E501 - - Lastname of the user (for education users) # noqa: E501 - - :return: The lastname of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserDetails. - - Lastname of the user (for education users) # noqa: E501 - - :param lastname: The lastname of this UserDetails. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def following_count(self): - """Gets the following_count of this UserDetails. # noqa: E501 - - Number of people the user follow # noqa: E501 - - :return: The following_count of this UserDetails. # noqa: E501 - :rtype: int - """ - return self._following_count - - @following_count.setter - def following_count(self, following_count): - """Sets the following_count of this UserDetails. - - Number of people the user follow # noqa: E501 - - :param following_count: The following_count of this UserDetails. # noqa: E501 - :type: int - """ - - self._following_count = following_count - - @property - def organization(self): - """Gets the organization of this UserDetails. # noqa: E501 - - Organization ID (for Edu users only) # noqa: E501 - - :return: The organization of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this UserDetails. - - Organization ID (for Edu users only) # noqa: E501 - - :param organization: The organization of this UserDetails. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def type(self): - """Gets the type of this UserDetails. # noqa: E501 - - The type of account # noqa: E501 - - :return: The type of this UserDetails. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UserDetails. - - The type of account # noqa: E501 - - :param type: The type of this UserDetails. # noqa: E501 - :type: str - """ - allowed_values = ["user", "guest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def registration_date(self): - """Gets the registration_date of this UserDetails. # noqa: E501 - - Date the user signed up # noqa: E501 - - :return: The registration_date of this UserDetails. # noqa: E501 - :rtype: datetime - """ - return self._registration_date - - @registration_date.setter - def registration_date(self, registration_date): - """Sets the registration_date of this UserDetails. - - Date the user signed up # noqa: E501 - - :param registration_date: The registration_date of this UserDetails. # noqa: E501 - :type: datetime - """ - - self._registration_date = registration_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserDetails): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserDetails): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py deleted file mode 100644 index 7c2f23f..0000000 --- a/flat_api/models/user_details_admin.py +++ /dev/null @@ -1,570 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserDetailsAdmin(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'picture': 'str', - 'license': 'UserDetailsAdminLicense', - 'name': 'str', - 'firstname': 'str', - 'is_power_user': 'bool', - 'is_flat_team': 'bool', - 'lastname': 'str', - 'last_activity_date': 'datetime', - 'html_url': 'str', - 'email': 'str', - 'printable_name': 'str', - 'organization_role': 'OrganizationRoles', - 'class_role': 'ClassRoles', - 'organization': 'str', - 'type': 'str', - 'id': 'str' - } - - attribute_map = { - 'username': 'username', - 'picture': 'picture', - 'license': 'license', - 'name': 'name', - 'firstname': 'firstname', - 'is_power_user': 'isPowerUser', - 'is_flat_team': 'isFlatTeam', - 'lastname': 'lastname', - 'last_activity_date': 'lastActivityDate', - 'html_url': 'htmlUrl', - 'email': 'email', - 'printable_name': 'printableName', - 'organization_role': 'organizationRole', - 'class_role': 'classRole', - 'organization': 'organization', - 'type': 'type', - 'id': 'id' - } - - def __init__(self, username=None, picture=None, license=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, last_activity_date=None, html_url=None, email=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None, local_vars_configuration=None): # noqa: E501 - """UserDetailsAdmin - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._picture = None - self._license = None - self._name = None - self._firstname = None - self._is_power_user = None - self._is_flat_team = None - self._lastname = None - self._last_activity_date = None - self._html_url = None - self._email = None - self._printable_name = None - self._organization_role = None - self._class_role = None - self._organization = None - self._type = None - self._id = None - self.discriminator = None - - if username is not None: - self.username = username - self.picture = picture - if license is not None: - self.license = license - if name is not None: - self.name = name - if firstname is not None: - self.firstname = firstname - if is_power_user is not None: - self.is_power_user = is_power_user - if is_flat_team is not None: - self.is_flat_team = is_flat_team - if lastname is not None: - self.lastname = lastname - if last_activity_date is not None: - self.last_activity_date = last_activity_date - if html_url is not None: - self.html_url = html_url - if email is not None: - self.email = email - if printable_name is not None: - self.printable_name = printable_name - if organization_role is not None: - self.organization_role = organization_role - if class_role is not None: - self.class_role = class_role - if organization is not None: - self.organization = organization - if type is not None: - self.type = type - if id is not None: - self.id = id - - @property - def username(self): - """Gets the username of this UserDetailsAdmin. # noqa: E501 - - The user name (unique for the organization) # noqa: E501 - - :return: The username of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserDetailsAdmin. - - The user name (unique for the organization) # noqa: E501 - - :param username: The username of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def picture(self): - """Gets the picture of this UserDetailsAdmin. # noqa: E501 - - The URL of the picture to display # noqa: E501 - - :return: The picture of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._picture - - @picture.setter - def picture(self, picture): - """Sets the picture of this UserDetailsAdmin. - - The URL of the picture to display # noqa: E501 - - :param picture: The picture of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._picture = picture - - @property - def license(self): - """Gets the license of this UserDetailsAdmin. # noqa: E501 - - - :return: The license of this UserDetailsAdmin. # noqa: E501 - :rtype: UserDetailsAdminLicense - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this UserDetailsAdmin. - - - :param license: The license of this UserDetailsAdmin. # noqa: E501 - :type: UserDetailsAdminLicense - """ - - self._license = license - - @property - def name(self): - """Gets the name of this UserDetailsAdmin. # noqa: E501 - - A displayable name for the user (for consumer users) # noqa: E501 - - :return: The name of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDetailsAdmin. - - A displayable name for the user (for consumer users) # noqa: E501 - - :param name: The name of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def firstname(self): - """Gets the firstname of this UserDetailsAdmin. # noqa: E501 - - Firstname of the user (for education users) # noqa: E501 - - :return: The firstname of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserDetailsAdmin. - - Firstname of the user (for education users) # noqa: E501 - - :param firstname: The firstname of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def is_power_user(self): - """Gets the is_power_user of this UserDetailsAdmin. # noqa: E501 - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :return: The is_power_user of this UserDetailsAdmin. # noqa: E501 - :rtype: bool - """ - return self._is_power_user - - @is_power_user.setter - def is_power_user(self, is_power_user): - """Sets the is_power_user of this UserDetailsAdmin. - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :param is_power_user: The is_power_user of this UserDetailsAdmin. # noqa: E501 - :type: bool - """ - - self._is_power_user = is_power_user - - @property - def is_flat_team(self): - """Gets the is_flat_team of this UserDetailsAdmin. # noqa: E501 - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :return: The is_flat_team of this UserDetailsAdmin. # noqa: E501 - :rtype: bool - """ - return self._is_flat_team - - @is_flat_team.setter - def is_flat_team(self, is_flat_team): - """Sets the is_flat_team of this UserDetailsAdmin. - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :param is_flat_team: The is_flat_team of this UserDetailsAdmin. # noqa: E501 - :type: bool - """ - - self._is_flat_team = is_flat_team - - @property - def lastname(self): - """Gets the lastname of this UserDetailsAdmin. # noqa: E501 - - Lastname of the user (for education users) # noqa: E501 - - :return: The lastname of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserDetailsAdmin. - - Lastname of the user (for education users) # noqa: E501 - - :param lastname: The lastname of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def last_activity_date(self): - """Gets the last_activity_date of this UserDetailsAdmin. # noqa: E501 - - Date of the last user activity # noqa: E501 - - :return: The last_activity_date of this UserDetailsAdmin. # noqa: E501 - :rtype: datetime - """ - return self._last_activity_date - - @last_activity_date.setter - def last_activity_date(self, last_activity_date): - """Sets the last_activity_date of this UserDetailsAdmin. - - Date of the last user activity # noqa: E501 - - :param last_activity_date: The last_activity_date of this UserDetailsAdmin. # noqa: E501 - :type: datetime - """ - - self._last_activity_date = last_activity_date - - @property - def html_url(self): - """Gets the html_url of this UserDetailsAdmin. # noqa: E501 - - Link to user profile (for Indiv. users only) # noqa: E501 - - :return: The html_url of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this UserDetailsAdmin. - - Link to user profile (for Indiv. users only) # noqa: E501 - - :param html_url: The html_url of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def email(self): - """Gets the email of this UserDetailsAdmin. # noqa: E501 - - Email of the user # noqa: E501 - - :return: The email of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserDetailsAdmin. - - Email of the user # noqa: E501 - - :param email: The email of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def printable_name(self): - """Gets the printable_name of this UserDetailsAdmin. # noqa: E501 - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :return: The printable_name of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._printable_name - - @printable_name.setter - def printable_name(self, printable_name): - """Sets the printable_name of this UserDetailsAdmin. - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :param printable_name: The printable_name of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._printable_name = printable_name - - @property - def organization_role(self): - """Gets the organization_role of this UserDetailsAdmin. # noqa: E501 - - - :return: The organization_role of this UserDetailsAdmin. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this UserDetailsAdmin. - - - :param organization_role: The organization_role of this UserDetailsAdmin. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def class_role(self): - """Gets the class_role of this UserDetailsAdmin. # noqa: E501 - - - :return: The class_role of this UserDetailsAdmin. # noqa: E501 - :rtype: ClassRoles - """ - return self._class_role - - @class_role.setter - def class_role(self, class_role): - """Sets the class_role of this UserDetailsAdmin. - - - :param class_role: The class_role of this UserDetailsAdmin. # noqa: E501 - :type: ClassRoles - """ - - self._class_role = class_role - - @property - def organization(self): - """Gets the organization of this UserDetailsAdmin. # noqa: E501 - - Organization ID (for Edu users only) # noqa: E501 - - :return: The organization of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this UserDetailsAdmin. - - Organization ID (for Edu users only) # noqa: E501 - - :param organization: The organization of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def type(self): - """Gets the type of this UserDetailsAdmin. # noqa: E501 - - The type of user account # noqa: E501 - - :return: The type of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UserDetailsAdmin. - - The type of user account # noqa: E501 - - :param type: The type of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - allowed_values = ["user", "guest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def id(self): - """Gets the id of this UserDetailsAdmin. # noqa: E501 - - The user unique identifier # noqa: E501 - - :return: The id of this UserDetailsAdmin. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserDetailsAdmin. - - The user unique identifier # noqa: E501 - - :param id: The id of this UserDetailsAdmin. # noqa: E501 - :type: str - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserDetailsAdmin): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserDetailsAdmin): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py deleted file mode 100644 index b694e25..0000000 --- a/flat_api/models/user_details_admin_license.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserDetailsAdminLicense(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'expiration_date': 'datetime', - 'source': 'LicenseSources', - 'mode': 'LicenseMode', - 'active': 'bool' - } - - attribute_map = { - 'id': 'id', - 'expiration_date': 'expirationDate', - 'source': 'source', - 'mode': 'mode', - 'active': 'active' - } - - def __init__(self, id=None, expiration_date=None, source=None, mode=None, active=None, local_vars_configuration=None): # noqa: E501 - """UserDetailsAdminLicense - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._expiration_date = None - self._source = None - self._mode = None - self._active = None - self.discriminator = None - - if id is not None: - self.id = id - if expiration_date is not None: - self.expiration_date = expiration_date - if source is not None: - self.source = source - if mode is not None: - self.mode = mode - if active is not None: - self.active = active - - @property - def id(self): - """Gets the id of this UserDetailsAdminLicense. # noqa: E501 - - ID of the current license # noqa: E501 - - :return: The id of this UserDetailsAdminLicense. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserDetailsAdminLicense. - - ID of the current license # noqa: E501 - - :param id: The id of this UserDetailsAdminLicense. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def expiration_date(self): - """Gets the expiration_date of this UserDetailsAdminLicense. # noqa: E501 - - Date when the license expires # noqa: E501 - - :return: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 - :rtype: datetime - """ - return self._expiration_date - - @expiration_date.setter - def expiration_date(self, expiration_date): - """Sets the expiration_date of this UserDetailsAdminLicense. - - Date when the license expires # noqa: E501 - - :param expiration_date: The expiration_date of this UserDetailsAdminLicense. # noqa: E501 - :type: datetime - """ - - self._expiration_date = expiration_date - - @property - def source(self): - """Gets the source of this UserDetailsAdminLicense. # noqa: E501 - - - :return: The source of this UserDetailsAdminLicense. # noqa: E501 - :rtype: LicenseSources - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this UserDetailsAdminLicense. - - - :param source: The source of this UserDetailsAdminLicense. # noqa: E501 - :type: LicenseSources - """ - - self._source = source - - @property - def mode(self): - """Gets the mode of this UserDetailsAdminLicense. # noqa: E501 - - - :return: The mode of this UserDetailsAdminLicense. # noqa: E501 - :rtype: LicenseMode - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this UserDetailsAdminLicense. - - - :param mode: The mode of this UserDetailsAdminLicense. # noqa: E501 - :type: LicenseMode - """ - - self._mode = mode - - @property - def active(self): - """Gets the active of this UserDetailsAdminLicense. # noqa: E501 - - ID of the current license # noqa: E501 - - :return: The active of this UserDetailsAdminLicense. # noqa: E501 - :rtype: bool - """ - return self._active - - @active.setter - def active(self, active): - """Sets the active of this UserDetailsAdminLicense. - - ID of the current license # noqa: E501 - - :param active: The active of this UserDetailsAdminLicense. # noqa: E501 - :type: bool - """ - - self._active = active - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserDetailsAdminLicense): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserDetailsAdminLicense): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py deleted file mode 100644 index 169f901..0000000 --- a/flat_api/models/user_public.py +++ /dev/null @@ -1,740 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserPublic(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'picture': 'str', - 'followers_count': 'int', - 'firstname': 'str', - 'is_power_user': 'bool', - 'lastname': 'str', - 'html_url': 'str', - 'following_count': 'int', - 'liked_scores_count': 'int', - 'printable_name': 'str', - 'bio': 'str', - 'id': 'str', - 'name': 'str', - 'is_flat_team': 'bool', - 'organization_role': 'OrganizationRoles', - 'profile_theme': 'str', - 'cover_picture': 'str', - 'owned_public_scores_count': 'int', - 'instruments': 'list[str]', - 'class_role': 'ClassRoles', - 'organization': 'str', - 'type': 'str', - 'registration_date': 'datetime' - } - - attribute_map = { - 'username': 'username', - 'picture': 'picture', - 'followers_count': 'followersCount', - 'firstname': 'firstname', - 'is_power_user': 'isPowerUser', - 'lastname': 'lastname', - 'html_url': 'htmlUrl', - 'following_count': 'followingCount', - 'liked_scores_count': 'likedScoresCount', - 'printable_name': 'printableName', - 'bio': 'bio', - 'id': 'id', - 'name': 'name', - 'is_flat_team': 'isFlatTeam', - 'organization_role': 'organizationRole', - 'profile_theme': 'profileTheme', - 'cover_picture': 'coverPicture', - 'owned_public_scores_count': 'ownedPublicScoresCount', - 'instruments': 'instruments', - 'class_role': 'classRole', - 'organization': 'organization', - 'type': 'type', - 'registration_date': 'registrationDate' - } - - def __init__(self, username=None, picture=None, followers_count=None, firstname=None, is_power_user=None, lastname=None, html_url=None, following_count=None, liked_scores_count=None, printable_name=None, bio=None, id=None, name=None, is_flat_team=None, organization_role=None, profile_theme=None, cover_picture=None, owned_public_scores_count=None, instruments=None, class_role=None, organization=None, type=None, registration_date=None, local_vars_configuration=None): # noqa: E501 - """UserPublic - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._picture = None - self._followers_count = None - self._firstname = None - self._is_power_user = None - self._lastname = None - self._html_url = None - self._following_count = None - self._liked_scores_count = None - self._printable_name = None - self._bio = None - self._id = None - self._name = None - self._is_flat_team = None - self._organization_role = None - self._profile_theme = None - self._cover_picture = None - self._owned_public_scores_count = None - self._instruments = None - self._class_role = None - self._organization = None - self._type = None - self._registration_date = None - self.discriminator = None - - if username is not None: - self.username = username - self.picture = picture - if followers_count is not None: - self.followers_count = followers_count - if firstname is not None: - self.firstname = firstname - if is_power_user is not None: - self.is_power_user = is_power_user - if lastname is not None: - self.lastname = lastname - if html_url is not None: - self.html_url = html_url - if following_count is not None: - self.following_count = following_count - if liked_scores_count is not None: - self.liked_scores_count = liked_scores_count - if printable_name is not None: - self.printable_name = printable_name - if bio is not None: - self.bio = bio - if id is not None: - self.id = id - if name is not None: - self.name = name - if is_flat_team is not None: - self.is_flat_team = is_flat_team - if organization_role is not None: - self.organization_role = organization_role - if profile_theme is not None: - self.profile_theme = profile_theme - if cover_picture is not None: - self.cover_picture = cover_picture - if owned_public_scores_count is not None: - self.owned_public_scores_count = owned_public_scores_count - if instruments is not None: - self.instruments = instruments - if class_role is not None: - self.class_role = class_role - if organization is not None: - self.organization = organization - if type is not None: - self.type = type - if registration_date is not None: - self.registration_date = registration_date - - @property - def username(self): - """Gets the username of this UserPublic. # noqa: E501 - - The user name (unique for the organization) # noqa: E501 - - :return: The username of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserPublic. - - The user name (unique for the organization) # noqa: E501 - - :param username: The username of this UserPublic. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def picture(self): - """Gets the picture of this UserPublic. # noqa: E501 - - The URL of the picture to display # noqa: E501 - - :return: The picture of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._picture - - @picture.setter - def picture(self, picture): - """Sets the picture of this UserPublic. - - The URL of the picture to display # noqa: E501 - - :param picture: The picture of this UserPublic. # noqa: E501 - :type: str - """ - - self._picture = picture - - @property - def followers_count(self): - """Gets the followers_count of this UserPublic. # noqa: E501 - - Number of followers the user have # noqa: E501 - - :return: The followers_count of this UserPublic. # noqa: E501 - :rtype: int - """ - return self._followers_count - - @followers_count.setter - def followers_count(self, followers_count): - """Sets the followers_count of this UserPublic. - - Number of followers the user have # noqa: E501 - - :param followers_count: The followers_count of this UserPublic. # noqa: E501 - :type: int - """ - - self._followers_count = followers_count - - @property - def firstname(self): - """Gets the firstname of this UserPublic. # noqa: E501 - - Firstname of the user (for education users) # noqa: E501 - - :return: The firstname of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserPublic. - - Firstname of the user (for education users) # noqa: E501 - - :param firstname: The firstname of this UserPublic. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def is_power_user(self): - """Gets the is_power_user of this UserPublic. # noqa: E501 - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :return: The is_power_user of this UserPublic. # noqa: E501 - :rtype: bool - """ - return self._is_power_user - - @is_power_user.setter - def is_power_user(self, is_power_user): - """Sets the is_power_user of this UserPublic. - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :param is_power_user: The is_power_user of this UserPublic. # noqa: E501 - :type: bool - """ - - self._is_power_user = is_power_user - - @property - def lastname(self): - """Gets the lastname of this UserPublic. # noqa: E501 - - Lastname of the user (for education users) # noqa: E501 - - :return: The lastname of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserPublic. - - Lastname of the user (for education users) # noqa: E501 - - :param lastname: The lastname of this UserPublic. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def html_url(self): - """Gets the html_url of this UserPublic. # noqa: E501 - - Link to user profile (for Indiv. users only) # noqa: E501 - - :return: The html_url of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this UserPublic. - - Link to user profile (for Indiv. users only) # noqa: E501 - - :param html_url: The html_url of this UserPublic. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def following_count(self): - """Gets the following_count of this UserPublic. # noqa: E501 - - Number of people the user follow # noqa: E501 - - :return: The following_count of this UserPublic. # noqa: E501 - :rtype: int - """ - return self._following_count - - @following_count.setter - def following_count(self, following_count): - """Sets the following_count of this UserPublic. - - Number of people the user follow # noqa: E501 - - :param following_count: The following_count of this UserPublic. # noqa: E501 - :type: int - """ - - self._following_count = following_count - - @property - def liked_scores_count(self): - """Gets the liked_scores_count of this UserPublic. # noqa: E501 - - Number of the scores liked by the user # noqa: E501 - - :return: The liked_scores_count of this UserPublic. # noqa: E501 - :rtype: int - """ - return self._liked_scores_count - - @liked_scores_count.setter - def liked_scores_count(self, liked_scores_count): - """Sets the liked_scores_count of this UserPublic. - - Number of the scores liked by the user # noqa: E501 - - :param liked_scores_count: The liked_scores_count of this UserPublic. # noqa: E501 - :type: int - """ - - self._liked_scores_count = liked_scores_count - - @property - def printable_name(self): - """Gets the printable_name of this UserPublic. # noqa: E501 - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :return: The printable_name of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._printable_name - - @printable_name.setter - def printable_name(self, printable_name): - """Sets the printable_name of this UserPublic. - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :param printable_name: The printable_name of this UserPublic. # noqa: E501 - :type: str - """ - - self._printable_name = printable_name - - @property - def bio(self): - """Gets the bio of this UserPublic. # noqa: E501 - - User's biography # noqa: E501 - - :return: The bio of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._bio - - @bio.setter - def bio(self, bio): - """Sets the bio of this UserPublic. - - User's biography # noqa: E501 - - :param bio: The bio of this UserPublic. # noqa: E501 - :type: str - """ - - self._bio = bio - - @property - def id(self): - """Gets the id of this UserPublic. # noqa: E501 - - The user unique identifier # noqa: E501 - - :return: The id of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserPublic. - - The user unique identifier # noqa: E501 - - :param id: The id of this UserPublic. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this UserPublic. # noqa: E501 - - A displayable name for the user (for consumer users) # noqa: E501 - - :return: The name of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserPublic. - - A displayable name for the user (for consumer users) # noqa: E501 - - :param name: The name of this UserPublic. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def is_flat_team(self): - """Gets the is_flat_team of this UserPublic. # noqa: E501 - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :return: The is_flat_team of this UserPublic. # noqa: E501 - :rtype: bool - """ - return self._is_flat_team - - @is_flat_team.setter - def is_flat_team(self, is_flat_team): - """Sets the is_flat_team of this UserPublic. - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :param is_flat_team: The is_flat_team of this UserPublic. # noqa: E501 - :type: bool - """ - - self._is_flat_team = is_flat_team - - @property - def organization_role(self): - """Gets the organization_role of this UserPublic. # noqa: E501 - - - :return: The organization_role of this UserPublic. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this UserPublic. - - - :param organization_role: The organization_role of this UserPublic. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def profile_theme(self): - """Gets the profile_theme of this UserPublic. # noqa: E501 - - Theme (background) for the profile # noqa: E501 - - :return: The profile_theme of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._profile_theme - - @profile_theme.setter - def profile_theme(self, profile_theme): - """Sets the profile_theme of this UserPublic. - - Theme (background) for the profile # noqa: E501 - - :param profile_theme: The profile_theme of this UserPublic. # noqa: E501 - :type: str - """ - - self._profile_theme = profile_theme - - @property - def cover_picture(self): - """Gets the cover_picture of this UserPublic. # noqa: E501 - - Cover picture (backgroud) for the profile # noqa: E501 - - :return: The cover_picture of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._cover_picture - - @cover_picture.setter - def cover_picture(self, cover_picture): - """Sets the cover_picture of this UserPublic. - - Cover picture (backgroud) for the profile # noqa: E501 - - :param cover_picture: The cover_picture of this UserPublic. # noqa: E501 - :type: str - """ - - self._cover_picture = cover_picture - - @property - def owned_public_scores_count(self): - """Gets the owned_public_scores_count of this UserPublic. # noqa: E501 - - Number of public scores the user have # noqa: E501 - - :return: The owned_public_scores_count of this UserPublic. # noqa: E501 - :rtype: int - """ - return self._owned_public_scores_count - - @owned_public_scores_count.setter - def owned_public_scores_count(self, owned_public_scores_count): - """Sets the owned_public_scores_count of this UserPublic. - - Number of public scores the user have # noqa: E501 - - :param owned_public_scores_count: The owned_public_scores_count of this UserPublic. # noqa: E501 - :type: int - """ - - self._owned_public_scores_count = owned_public_scores_count - - @property - def instruments(self): - """Gets the instruments of this UserPublic. # noqa: E501 - - An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :return: The instruments of this UserPublic. # noqa: E501 - :rtype: list[str] - """ - return self._instruments - - @instruments.setter - def instruments(self, instruments): - """Sets the instruments of this UserPublic. - - An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. # noqa: E501 - - :param instruments: The instruments of this UserPublic. # noqa: E501 - :type: list[str] - """ - - self._instruments = instruments - - @property - def class_role(self): - """Gets the class_role of this UserPublic. # noqa: E501 - - - :return: The class_role of this UserPublic. # noqa: E501 - :rtype: ClassRoles - """ - return self._class_role - - @class_role.setter - def class_role(self, class_role): - """Sets the class_role of this UserPublic. - - - :param class_role: The class_role of this UserPublic. # noqa: E501 - :type: ClassRoles - """ - - self._class_role = class_role - - @property - def organization(self): - """Gets the organization of this UserPublic. # noqa: E501 - - Organization ID (for Edu users only) # noqa: E501 - - :return: The organization of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this UserPublic. - - Organization ID (for Edu users only) # noqa: E501 - - :param organization: The organization of this UserPublic. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def type(self): - """Gets the type of this UserPublic. # noqa: E501 - - The type of user account # noqa: E501 - - :return: The type of this UserPublic. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UserPublic. - - The type of user account # noqa: E501 - - :param type: The type of this UserPublic. # noqa: E501 - :type: str - """ - allowed_values = ["user", "guest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def registration_date(self): - """Gets the registration_date of this UserPublic. # noqa: E501 - - Date the user signed up # noqa: E501 - - :return: The registration_date of this UserPublic. # noqa: E501 - :rtype: datetime - """ - return self._registration_date - - @registration_date.setter - def registration_date(self, registration_date): - """Sets the registration_date of this UserPublic. - - Date the user signed up # noqa: E501 - - :param registration_date: The registration_date of this UserPublic. # noqa: E501 - :type: datetime - """ - - self._registration_date = registration_date - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserPublic): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserPublic): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py deleted file mode 100644 index d60bfd7..0000000 --- a/flat_api/models/user_public_summary.py +++ /dev/null @@ -1,488 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from flat_api.configuration import Configuration - - -class UserPublicSummary(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'picture': 'str', - 'name': 'str', - 'firstname': 'str', - 'is_power_user': 'bool', - 'is_flat_team': 'bool', - 'lastname': 'str', - 'html_url': 'str', - 'printable_name': 'str', - 'organization_role': 'OrganizationRoles', - 'class_role': 'ClassRoles', - 'organization': 'str', - 'type': 'str', - 'id': 'str' - } - - attribute_map = { - 'username': 'username', - 'picture': 'picture', - 'name': 'name', - 'firstname': 'firstname', - 'is_power_user': 'isPowerUser', - 'is_flat_team': 'isFlatTeam', - 'lastname': 'lastname', - 'html_url': 'htmlUrl', - 'printable_name': 'printableName', - 'organization_role': 'organizationRole', - 'class_role': 'classRole', - 'organization': 'organization', - 'type': 'type', - 'id': 'id' - } - - def __init__(self, username=None, picture=None, name=None, firstname=None, is_power_user=None, is_flat_team=None, lastname=None, html_url=None, printable_name=None, organization_role=None, class_role=None, organization=None, type=None, id=None, local_vars_configuration=None): # noqa: E501 - """UserPublicSummary - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._picture = None - self._name = None - self._firstname = None - self._is_power_user = None - self._is_flat_team = None - self._lastname = None - self._html_url = None - self._printable_name = None - self._organization_role = None - self._class_role = None - self._organization = None - self._type = None - self._id = None - self.discriminator = None - - if username is not None: - self.username = username - self.picture = picture - if name is not None: - self.name = name - if firstname is not None: - self.firstname = firstname - if is_power_user is not None: - self.is_power_user = is_power_user - if is_flat_team is not None: - self.is_flat_team = is_flat_team - if lastname is not None: - self.lastname = lastname - if html_url is not None: - self.html_url = html_url - if printable_name is not None: - self.printable_name = printable_name - if organization_role is not None: - self.organization_role = organization_role - if class_role is not None: - self.class_role = class_role - if organization is not None: - self.organization = organization - if type is not None: - self.type = type - if id is not None: - self.id = id - - @property - def username(self): - """Gets the username of this UserPublicSummary. # noqa: E501 - - The user name (unique for the organization) # noqa: E501 - - :return: The username of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserPublicSummary. - - The user name (unique for the organization) # noqa: E501 - - :param username: The username of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def picture(self): - """Gets the picture of this UserPublicSummary. # noqa: E501 - - The URL of the picture to display # noqa: E501 - - :return: The picture of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._picture - - @picture.setter - def picture(self, picture): - """Sets the picture of this UserPublicSummary. - - The URL of the picture to display # noqa: E501 - - :param picture: The picture of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._picture = picture - - @property - def name(self): - """Gets the name of this UserPublicSummary. # noqa: E501 - - A displayable name for the user (for consumer users) # noqa: E501 - - :return: The name of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserPublicSummary. - - A displayable name for the user (for consumer users) # noqa: E501 - - :param name: The name of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def firstname(self): - """Gets the firstname of this UserPublicSummary. # noqa: E501 - - Firstname of the user (for education users) # noqa: E501 - - :return: The firstname of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserPublicSummary. - - Firstname of the user (for education users) # noqa: E501 - - :param firstname: The firstname of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def is_power_user(self): - """Gets the is_power_user of this UserPublicSummary. # noqa: E501 - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :return: The is_power_user of this UserPublicSummary. # noqa: E501 - :rtype: bool - """ - return self._is_power_user - - @is_power_user.setter - def is_power_user(self, is_power_user): - """Sets the is_power_user of this UserPublicSummary. - - User license status. 'true' if user is an individual Power user # noqa: E501 - - :param is_power_user: The is_power_user of this UserPublicSummary. # noqa: E501 - :type: bool - """ - - self._is_power_user = is_power_user - - @property - def is_flat_team(self): - """Gets the is_flat_team of this UserPublicSummary. # noqa: E501 - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :return: The is_flat_team of this UserPublicSummary. # noqa: E501 - :rtype: bool - """ - return self._is_flat_team - - @is_flat_team.setter - def is_flat_team(self, is_flat_team): - """Sets the is_flat_team of this UserPublicSummary. - - Will be 'true' if user is part of the Flat Team # noqa: E501 - - :param is_flat_team: The is_flat_team of this UserPublicSummary. # noqa: E501 - :type: bool - """ - - self._is_flat_team = is_flat_team - - @property - def lastname(self): - """Gets the lastname of this UserPublicSummary. # noqa: E501 - - Lastname of the user (for education users) # noqa: E501 - - :return: The lastname of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserPublicSummary. - - Lastname of the user (for education users) # noqa: E501 - - :param lastname: The lastname of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def html_url(self): - """Gets the html_url of this UserPublicSummary. # noqa: E501 - - Link to user profile (for Indiv. users only) # noqa: E501 - - :return: The html_url of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._html_url - - @html_url.setter - def html_url(self, html_url): - """Sets the html_url of this UserPublicSummary. - - Link to user profile (for Indiv. users only) # noqa: E501 - - :param html_url: The html_url of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._html_url = html_url - - @property - def printable_name(self): - """Gets the printable_name of this UserPublicSummary. # noqa: E501 - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :return: The printable_name of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._printable_name - - @printable_name.setter - def printable_name(self, printable_name): - """Sets the printable_name of this UserPublicSummary. - - The name that can be directly printed (name, firstname & lastname, or username) # noqa: E501 - - :param printable_name: The printable_name of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._printable_name = printable_name - - @property - def organization_role(self): - """Gets the organization_role of this UserPublicSummary. # noqa: E501 - - - :return: The organization_role of this UserPublicSummary. # noqa: E501 - :rtype: OrganizationRoles - """ - return self._organization_role - - @organization_role.setter - def organization_role(self, organization_role): - """Sets the organization_role of this UserPublicSummary. - - - :param organization_role: The organization_role of this UserPublicSummary. # noqa: E501 - :type: OrganizationRoles - """ - - self._organization_role = organization_role - - @property - def class_role(self): - """Gets the class_role of this UserPublicSummary. # noqa: E501 - - - :return: The class_role of this UserPublicSummary. # noqa: E501 - :rtype: ClassRoles - """ - return self._class_role - - @class_role.setter - def class_role(self, class_role): - """Sets the class_role of this UserPublicSummary. - - - :param class_role: The class_role of this UserPublicSummary. # noqa: E501 - :type: ClassRoles - """ - - self._class_role = class_role - - @property - def organization(self): - """Gets the organization of this UserPublicSummary. # noqa: E501 - - Organization ID (for Edu users only) # noqa: E501 - - :return: The organization of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._organization - - @organization.setter - def organization(self, organization): - """Sets the organization of this UserPublicSummary. - - Organization ID (for Edu users only) # noqa: E501 - - :param organization: The organization of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._organization = organization - - @property - def type(self): - """Gets the type of this UserPublicSummary. # noqa: E501 - - The type of user account # noqa: E501 - - :return: The type of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this UserPublicSummary. - - The type of user account # noqa: E501 - - :param type: The type of this UserPublicSummary. # noqa: E501 - :type: str - """ - allowed_values = ["user", "guest"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def id(self): - """Gets the id of this UserPublicSummary. # noqa: E501 - - The user unique identifier # noqa: E501 - - :return: The id of this UserPublicSummary. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserPublicSummary. - - The user unique identifier # noqa: E501 - - :param id: The id of this UserPublicSummary. # noqa: E501 - :type: str - """ - - self._id = id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserPublicSummary): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserPublicSummary): - return True - - return self.to_dict() != other.to_dict() diff --git a/flat_api/paths/__init__.py b/flat_api/paths/__init__.py new file mode 100644 index 0000000..0efe72e --- /dev/null +++ b/flat_api/paths/__init__.py @@ -0,0 +1,72 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.apis.path_to_api import path_to_api + +import enum + + +class PathValues(str, enum.Enum): + ME = "/me" + SCORES = "/scores" + SCORES_SCORE = "/scores/{score}" + SCORES_SCORE_UNTRASH = "/scores/{score}/untrash" + SCORES_SCORE_SUBMISSIONS = "/scores/{score}/submissions" + SCORES_SCORE_FORK = "/scores/{score}/fork" + SCORES_SCORE_COLLABORATORS = "/scores/{score}/collaborators" + SCORES_SCORE_COLLABORATORS_COLLABORATOR = "/scores/{score}/collaborators/{collaborator}" + SCORES_SCORE_TRACKS = "/scores/{score}/tracks" + SCORES_SCORE_TRACKS_TRACK = "/scores/{score}/tracks/{track}" + SCORES_SCORE_COMMENTS = "/scores/{score}/comments" + SCORES_SCORE_COMMENTS_COMMENT = "/scores/{score}/comments/{comment}" + SCORES_SCORE_COMMENTS_COMMENT_RESOLVED = "/scores/{score}/comments/{comment}/resolved" + SCORES_SCORE_REVISIONS = "/scores/{score}/revisions" + SCORES_SCORE_REVISIONS_REVISION = "/scores/{score}/revisions/{revision}" + SCORES_SCORE_REVISIONS_REVISION_FORMAT = "/scores/{score}/revisions/{revision}/{format}" + SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK = "/scores/{score}/revisions/{revision}/{format}/task" + COLLECTIONS = "/collections" + COLLECTIONS_COLLECTION = "/collections/{collection}" + COLLECTIONS_COLLECTION_UNTRASH = "/collections/{collection}/untrash" + COLLECTIONS_COLLECTION_SCORES = "/collections/{collection}/scores" + COLLECTIONS_COLLECTION_SCORES_SCORE = "/collections/{collection}/scores/{score}" + TASKS_TASK = "/tasks/{task}" + USERS_USER = "/users/{user}" + USERS_USER_LIKES = "/users/{user}/likes" + USERS_USER_SCORES = "/users/{user}/scores" + ORGANIZATIONS_USERS = "/organizations/users" + ORGANIZATIONS_USERS_COUNT = "/organizations/users/count" + ORGANIZATIONS_USERS_USER = "/organizations/users/{user}" + ORGANIZATIONS_USERS_USER_SIGNIN_LINK = "/organizations/users/{user}/signinLink" + ORGANIZATIONS_USERS_USER_ACCESS_TOKEN = "/organizations/users/{user}/accessToken" + ORGANIZATIONS_INVITATIONS = "/organizations/invitations" + ORGANIZATIONS_INVITATIONS_INVITATION = "/organizations/invitations/{invitation}" + ORGANIZATIONS_LTI_CREDENTIALS = "/organizations/lti/credentials" + ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS = "/organizations/lti/credentials/{credentials}" + CLASSES = "/classes" + CLASSES_CLASS = "/classes/{class}" + CLASSES_CLASS_ARCHIVE = "/classes/{class}/archive" + CLASSES_CLASS_ACTIVATE = "/classes/{class}/activate" + CLASSES_CLASS_USERS_USER = "/classes/{class}/users/{user}" + CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS = "/classes/{class}/students/{user}/submissions" + CLASSES_CLASS_ASSIGNMENTS = "/classes/{class}/assignments" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY = "/classes/{class}/assignments/{assignment}/copy" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE = "/classes/{class}/assignments/{assignment}/archive" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS = "/classes/{class}/assignments/{assignment}/submissions" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV = "/classes/{class}/assignments/{assignment}/submissions/csv" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL = "/classes/{class}/assignments/{assignment}/submissions/excel" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION = "/classes/{class}/assignments/{assignment}/submissions/{submission}" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY = "/classes/{class}/assignments/{assignment}/submissions/{submission}/history" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS = "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments" + CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT = "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}" + CLASSES_CLASS_TEST_STUDENT = "/classes/{class}/testStudent" + CLASSES_ENROLL_ENROLLMENT_CODE = "/classes/enroll/{enrollmentCode}" + GROUPS_GROUP = "/groups/{group}" + GROUPS_GROUP_USERS = "/groups/{group}/users" + GROUPS_GROUP_SCORES = "/groups/{group}/scores" + EDU_RESOURCES = "/eduResources" + EDU_RESOURCES_LIBRARIES = "/eduResources/libraries" + EDU_RESOURCES_RESOURCE = "/eduResources/{resource}" + EDU_RESOURCES_RESOURCE_MOVE = "/eduResources/{resource}/move" + EDU_RESOURCES_RESOURCE_COPY = "/eduResources/{resource}/copy" + EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS = "/eduResources/{resource}/copyToDemoClass" + EDU_RESOURCES_RESOURCE_USE_IN_CLASS = "/eduResources/{resource}/useInClass" + EDU_RESOURCES_RESOURCE_ASSIGNMENT = "/eduResources/{resource}/assignment" diff --git a/flat_api/paths/classes/__init__.py b/flat_api/paths/classes/__init__.py new file mode 100644 index 0000000..2c5f637 --- /dev/null +++ b/flat_api/paths/classes/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES \ No newline at end of file diff --git a/flat_api/paths/classes/get.py b/flat_api/paths/classes/get.py new file mode 100644 index 0000000..7b45f81 --- /dev/null +++ b/flat_api/paths/classes/get.py @@ -0,0 +1,378 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params + + +class StateSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "active": "ACTIVE", + "inactive": "INACTIVE", + "archived": "ARCHIVED", + } + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def INACTIVE(cls): + return cls("inactive") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'state': typing.Union[StateSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_state = api_client.QueryParameter( + name="state", + style=api_client.ParameterStyle.FORM, + schema=StateSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassDetails']: + return ClassDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassDetails'], typing.List['ClassDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_classes_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the classes available for the current user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_state, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListClasses(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_classes( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_classes_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_classes_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes/get.pyi b/flat_api/paths/classes/get.pyi new file mode 100644 index 0000000..00b9c33 --- /dev/null +++ b/flat_api/paths/classes/get.pyi @@ -0,0 +1,361 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params + + +class StateSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ACTIVE(cls): + return cls("active") + + @schemas.classproperty + def INACTIVE(cls): + return cls("inactive") + + @schemas.classproperty + def ARCHIVED(cls): + return cls("archived") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'state': typing.Union[StateSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_state = api_client.QueryParameter( + name="state", + style=api_client.ParameterStyle.FORM, + schema=StateSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassDetails']: + return ClassDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassDetails'], typing.List['ClassDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_classes_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_classes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the classes available for the current user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_state, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListClasses(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_classes( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_classes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_classes_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_classes_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes/post.py b/flat_api/paths/classes/post.py new file mode 100644 index 0000000..93664a2 --- /dev/null +++ b/flat_api/paths/classes/post.py @@ -0,0 +1,392 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_creation import ClassCreation +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = ClassCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes/post.pyi b/flat_api/paths/classes/post.pyi new file mode 100644 index 0000000..81b666c --- /dev/null +++ b/flat_api/paths/classes/post.pyi @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_creation import ClassCreation +from flat_api.model.flat_error_response import FlatErrorResponse + +# body param +SchemaForRequestBodyApplicationJson = ClassCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class/__init__.py b/flat_api/paths/classes_class/__init__.py new file mode 100644 index 0000000..6713e05 --- /dev/null +++ b/flat_api/paths/classes_class/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS \ No newline at end of file diff --git a/flat_api/paths/classes_class/get.py b/flat_api/paths/classes_class/get.py new file mode 100644 index 0000000..7b3075e --- /dev/null +++ b/flat_api/paths/classes_class/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get the details of a single class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class/get.pyi b/flat_api/paths/classes_class/get.pyi new file mode 100644 index 0000000..b4a776b --- /dev/null +++ b/flat_api/paths/classes_class/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get the details of a single class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class/put.py b/flat_api/paths/classes_class/put.py new file mode 100644 index 0000000..b7de864 --- /dev/null +++ b/flat_api/paths/classes_class/put.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_update import ClassUpdate + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ClassUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_class_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_class_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_class_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_class_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_class( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_class( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_class( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_class( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_class( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class/put.pyi b/flat_api/paths/classes_class/put.pyi new file mode 100644 index 0000000..c1ff6f8 --- /dev/null +++ b/flat_api/paths/classes_class/put.pyi @@ -0,0 +1,417 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_update import ClassUpdate + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ClassUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_class_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_class_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_class_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_class_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_class( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_class( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_class( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_class( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_class( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_activate/__init__.py b/flat_api/paths/classes_class_activate/__init__.py new file mode 100644 index 0000000..c3f5c7a --- /dev/null +++ b/flat_api/paths/classes_class_activate/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_activate import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ACTIVATE \ No newline at end of file diff --git a/flat_api/paths/classes_class_activate/post.py b/flat_api/paths/classes_class_activate/post.py new file mode 100644 index 0000000..f9355a6 --- /dev/null +++ b/flat_api/paths/classes_class_activate/post.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _activate_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Activate the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ActivateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def activate_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._activate_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._activate_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_activate/post.pyi b/flat_api/paths/classes_class_activate/post.pyi new file mode 100644 index 0000000..1214736 --- /dev/null +++ b/flat_api/paths/classes_class_activate/post.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _activate_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _activate_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Activate the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ActivateClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def activate_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def activate_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._activate_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._activate_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_archive/__init__.py b/flat_api/paths/classes_class_archive/__init__.py new file mode 100644 index 0000000..77c3b5e --- /dev/null +++ b/flat_api/paths/classes_class_archive/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_archive import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ARCHIVE \ No newline at end of file diff --git a/flat_api/paths/classes_class_archive/delete.py b/flat_api/paths/classes_class_archive/delete.py new file mode 100644 index 0000000..2417458 --- /dev/null +++ b/flat_api/paths/classes_class_archive/delete.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _unarchive_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Unarchive the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UnarchiveClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def unarchive_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_archive/delete.pyi b/flat_api/paths/classes_class_archive/delete.pyi new file mode 100644 index 0000000..a777fa7 --- /dev/null +++ b/flat_api/paths/classes_class_archive/delete.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _unarchive_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _unarchive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Unarchive the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UnarchiveClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def unarchive_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def unarchive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_archive/post.py b/flat_api/paths/classes_class_archive/post.py new file mode 100644 index 0000000..7845d28 --- /dev/null +++ b/flat_api/paths/classes_class_archive/post.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _archive_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Archive the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ArchiveClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def archive_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_archive/post.pyi b/flat_api/paths/classes_class_archive/post.pyi new file mode 100644 index 0000000..f1ff8b1 --- /dev/null +++ b/flat_api/paths/classes_class_archive/post.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _archive_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _archive_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Archive the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ArchiveClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def archive_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def archive_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments/__init__.py b/flat_api/paths/classes_class_assignments/__init__.py new file mode 100644 index 0000000..727701a --- /dev/null +++ b/flat_api/paths/classes_class_assignments/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments/get.py b/flat_api/paths/classes_class_assignments/get.py new file mode 100644 index 0000000..9da7549 --- /dev/null +++ b/flat_api/paths/classes_class_assignments/get.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAssignment']: + return ClassAssignment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAssignment'], typing.List['ClassAssignment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAssignment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_assignments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Assignments listing + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListAssignments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_assignments( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_assignments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_assignments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments/get.pyi b/flat_api/paths/classes_class_assignments/get.pyi new file mode 100644 index 0000000..48bf456 --- /dev/null +++ b/flat_api/paths/classes_class_assignments/get.pyi @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ClassAssignment']: + return ClassAssignment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ClassAssignment'], typing.List['ClassAssignment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ClassAssignment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_assignments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_assignments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Assignments listing + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListAssignments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_assignments( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_assignments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_assignments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_assignments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments/post.py b/flat_api/paths/classes_class_assignments/post.py new file mode 100644 index 0000000..a93ccb8 --- /dev/null +++ b/flat_api/paths/classes_class_assignments/post.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_assignment_update import ClassAssignmentUpdate + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ClassAssignmentUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_class_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_class_assignment_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Assignment creation + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateClassAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_class_assignment( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_class_assignment( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_class_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_class_assignment( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_class_assignment( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments/post.pyi b/flat_api/paths/classes_class_assignments/post.pyi new file mode 100644 index 0000000..b723d9a --- /dev/null +++ b/flat_api/paths/classes_class_assignments/post.pyi @@ -0,0 +1,417 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_assignment_update import ClassAssignmentUpdate + +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ClassAssignmentUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_class_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_class_assignment_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_class_assignment_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Assignment creation + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateClassAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_class_assignment( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_class_assignment( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_class_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_class_assignment( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_class_assignment( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_class_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py b/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py new file mode 100644 index 0000000..fcd5d36 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_archive import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/delete.py b/flat_api/paths/classes_class_assignments_assignment_archive/delete.py new file mode 100644 index 0000000..8c30345 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_archive/delete.py @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _unarchive_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Unarchive the assignment. + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UnarchiveAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def unarchive_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi new file mode 100644 index 0000000..44161ac --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _unarchive_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _unarchive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Unarchive the assignment. + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UnarchiveAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def unarchive_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def unarchive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._unarchive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/post.py b/flat_api/paths/classes_class_assignments_assignment_archive/post.py new file mode 100644 index 0000000..e853b62 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_archive/post.py @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _archive_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Archive the assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ArchiveAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def archive_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi b/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi new file mode 100644 index 0000000..b3d7172 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _archive_assignment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _archive_assignment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Archive the assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ArchiveAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def archive_assignment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def archive_assignment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._archive_assignment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py b/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py new file mode 100644 index 0000000..cb9bac9 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_copy import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/post.py b/flat_api/paths/classes_class_assignments_assignment_copy/post.py new file mode 100644 index 0000000..7747adc --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_copy/post.py @@ -0,0 +1,438 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_copy_response import AssignmentCopyResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentCopy + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentCopyResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi b/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi new file mode 100644 index 0000000..8263148 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_copy_response import AssignmentCopyResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentCopy + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentCopyResponse + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py new file mode 100644 index 0000000..dad510d --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions/get.py new file mode 100644 index 0000000..274c134 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions/get.py @@ -0,0 +1,362 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the students' submissions + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi new file mode 100644 index 0000000..50ce8de --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the students' submissions + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions/put.py new file mode 100644 index 0000000..74ef0d9 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions/put.py @@ -0,0 +1,438 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create or edit a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi new file mode 100644 index 0000000..4440cf6 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create or edit a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py new file mode 100644 index 0000000..98479ab --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_csv import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py new file mode 100644 index 0000000..c0795cb --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py @@ -0,0 +1,336 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyTextCsv = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyTextCsv, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'text/csv': api_client.MediaType( + schema=SchemaFor200ResponseBodyTextCsv), + }, +) +SchemaFor0ResponseBodyTextCsv = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyTextCsv, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'text/csv': api_client.MediaType( + schema=SchemaFor0ResponseBodyTextCsv), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'text/csv', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + CSV Grades exports + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ExportSubmissionsReviewsAsCsv(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def export_submissions_reviews_as_csv( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_csv_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_csv_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi new file mode 100644 index 0000000..eac3b44 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +SchemaFor200ResponseBodyTextCsv = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyTextCsv, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'text/csv': api_client.MediaType( + schema=SchemaFor200ResponseBodyTextCsv), + }, +) +SchemaFor0ResponseBodyTextCsv = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyTextCsv, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'text/csv': api_client.MediaType( + schema=SchemaFor0ResponseBodyTextCsv), + }, +) +_all_accept_content_types = ( + 'text/csv', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _export_submissions_reviews_as_csv_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + CSV Grades exports + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ExportSubmissionsReviewsAsCsv(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def export_submissions_reviews_as_csv( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def export_submissions_reviews_as_csv( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_csv_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_csv_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py new file mode 100644 index 0000000..e734f50 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_excel import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py new file mode 100644 index 0000000..893bc2b --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py @@ -0,0 +1,336 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), + }, +) +SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Excel Grades exports + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ExportSubmissionsReviewsAsExcel(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def export_submissions_reviews_as_excel( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_excel_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_excel_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi new file mode 100644 index 0000000..3a67d07 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), + }, +) +SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), + }, +) +_all_accept_content_types = ( + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _export_submissions_reviews_as_excel_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Excel Grades exports + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ExportSubmissionsReviewsAsExcel(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def export_submissions_reviews_as_excel( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def export_submissions_reviews_as_excel( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_excel_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._export_submissions_reviews_as_excel_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py new file mode 100644 index 0000000..2950a2d --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_submission import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py new file mode 100644 index 0000000..2495126 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_submission_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Reset a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_submission( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi new file mode 100644 index 0000000..c2c37bd --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_submission_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Reset a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_submission( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py new file mode 100644 index 0000000..df375fa --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a student submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi new file mode 100644 index 0000000..722fe40 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a student submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py new file mode 100644 index 0000000..8a78812 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py @@ -0,0 +1,447 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Edit a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi new file mode 100644 index 0000000..cb0d76c --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi @@ -0,0 +1,438 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_submission_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Edit a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditSubmission(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_submission( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_submission_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py new file mode 100644 index 0000000..059bb24 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py new file mode 100644 index 0000000..14e3b5b --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmissionComment']: + return AssignmentSubmissionComment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmissionComment'], typing.List['AssignmentSubmissionComment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmissionComment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_comments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the feedback comments of a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissionComments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission_comments( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_comments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_comments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi new file mode 100644 index 0000000..a665ff5 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi @@ -0,0 +1,400 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmissionComment']: + return AssignmentSubmissionComment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmissionComment'], typing.List['AssignmentSubmissionComment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmissionComment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_comments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_comments_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the feedback comments of a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissionComments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission_comments( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission_comments( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_comments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_comments_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py new file mode 100644 index 0000000..9a06ea0 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py @@ -0,0 +1,487 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation + + +request_body_assignment_submission_comment_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class PostSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi new file mode 100644 index 0000000..f3b0420 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi @@ -0,0 +1,476 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation + + +request_body_assignment_submission_comment_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class PostSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py new file mode 100644 index 0000000..ae4c8aa --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py new file mode 100644 index 0000000..ff92404 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_submission_comment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_submission_comment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_comment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_comment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi new file mode 100644 index 0000000..7cc867b --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_submission_comment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_submission_comment_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_submission_comment( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_submission_comment( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_comment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_submission_comment_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py new file mode 100644 index 0000000..48df497 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py @@ -0,0 +1,496 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation + + +request_body_assignment_submission_comment_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi new file mode 100644 index 0000000..1670a09 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi @@ -0,0 +1,485 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation + + +request_body_assignment_submission_comment_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_submission_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update a feedback comment to a submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateSubmissionComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_submission_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_submission_comment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py new file mode 100644 index 0000000..cb83063 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py new file mode 100644 index 0000000..8bc07e4 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmissionHistory']: + return AssignmentSubmissionHistory + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmissionHistory'], typing.List['AssignmentSubmissionHistory']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmissionHistory': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_history_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get the history of the submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissionHistory(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission_history( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_history_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_history_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi new file mode 100644 index 0000000..3603702 --- /dev/null +++ b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi @@ -0,0 +1,400 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +SubmissionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'submission': typing.Union[SubmissionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_assignment = api_client.PathParameter( + name="assignment", + style=api_client.ParameterStyle.SIMPLE, + schema=AssignmentSchema, + required=True, +) +request_path_submission = api_client.PathParameter( + name="submission", + style=api_client.ParameterStyle.SIMPLE, + schema=SubmissionSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmissionHistory']: + return AssignmentSubmissionHistory + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmissionHistory'], typing.List['AssignmentSubmissionHistory']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmissionHistory': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_submission_history_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_submission_history_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get the history of the submission + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_assignment, + request_path_submission, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetSubmissionHistory(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_submission_history( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_submission_history( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_history_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_submission_history_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_students_user_submissions/__init__.py b/flat_api/paths/classes_class_students_user_submissions/__init__.py new file mode 100644 index 0000000..4da5998 --- /dev/null +++ b/flat_api/paths/classes_class_students_user_submissions/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_students_user_submissions import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/classes_class_students_user_submissions/get.py b/flat_api/paths/classes_class_students_user_submissions/get.py new file mode 100644 index 0000000..c7902cd --- /dev/null +++ b/flat_api/paths/classes_class_students_user_submissions/get.py @@ -0,0 +1,362 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_class_student_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the submissions for a student + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListClassStudentSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_class_student_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_class_student_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_class_student_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_students_user_submissions/get.pyi b/flat_api/paths/classes_class_students_user_submissions/get.pyi new file mode 100644 index 0000000..5bb2553 --- /dev/null +++ b/flat_api/paths/classes_class_students_user_submissions/get.pyi @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_class_student_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_class_student_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the submissions for a student + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListClassStudentSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_class_student_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_class_student_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_class_student_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_class_student_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_test_student/__init__.py b/flat_api/paths/classes_class_test_student/__init__.py new file mode 100644 index 0000000..f15114e --- /dev/null +++ b/flat_api/paths/classes_class_test_student/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_test_student import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_TEST_STUDENT \ No newline at end of file diff --git a/flat_api/paths/classes_class_test_student/post.py b/flat_api/paths/classes_class_test_student/post.py new file mode 100644 index 0000000..83a5a90 --- /dev/null +++ b/flat_api/paths/classes_class_test_student/post.py @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +ResetSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'reset': typing.Union[ResetSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_reset = api_client.QueryParameter( + name="reset", + style=api_client.ParameterStyle.FORM, + schema=ResetSchema, + explode=True, +) +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_test_student_account_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a test student account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_reset, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateTestStudentAccount(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_test_student_account( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_test_student_account_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_test_student_account_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_test_student/post.pyi b/flat_api/paths/classes_class_test_student/post.pyi new file mode 100644 index 0000000..b5b7202 --- /dev/null +++ b/flat_api/paths/classes_class_test_student/post.pyi @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +ResetSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'reset': typing.Union[ResetSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_reset = api_client.QueryParameter( + name="reset", + style=api_client.ParameterStyle.FORM, + schema=ResetSchema, + explode=True, +) +# Path params +ModelClassSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = UserDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_test_student_account_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_test_student_account_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a test student account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_reset, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateTestStudentAccount(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_test_student_account( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_test_student_account( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_test_student_account_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_test_student_account_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_users_user/__init__.py b/flat_api/paths/classes_class_users_user/__init__.py new file mode 100644 index 0000000..1b5dc44 --- /dev/null +++ b/flat_api/paths/classes_class_users_user/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_class_users_user import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_CLASS_USERS_USER \ No newline at end of file diff --git a/flat_api/paths/classes_class_users_user/delete.py b/flat_api/paths/classes_class_users_user/delete.py new file mode 100644 index 0000000..6240555 --- /dev/null +++ b/flat_api/paths/classes_class_users_user/delete.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_class_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove a user from the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteClassUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_class_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_users_user/delete.pyi b/flat_api/paths/classes_class_users_user/delete.pyi new file mode 100644 index 0000000..1199501 --- /dev/null +++ b/flat_api/paths/classes_class_users_user/delete.pyi @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_class_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove a user from the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteClassUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_class_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_users_user/put.py b/flat_api/paths/classes_class_users_user/put.py new file mode 100644 index 0000000..cda334c --- /dev/null +++ b/flat_api/paths/classes_class_users_user/put.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_class_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a user to the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddClassUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_class_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_class_users_user/put.pyi b/flat_api/paths/classes_class_users_user/put.pyi new file mode 100644 index 0000000..390e171 --- /dev/null +++ b/flat_api/paths/classes_class_users_user/put.pyi @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ModelClassSchema = schemas.StrSchema +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'class': typing.Union[ModelClassSchema, str, ], + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path__class = api_client.PathParameter( + name="class", + style=api_client.ParameterStyle.SIMPLE, + schema=ModelClassSchema, + required=True, +) +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_class_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_class_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a user to the class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path__class, + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddClassUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_class_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_class_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_class_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_enroll_enrollment_code/__init__.py b/flat_api/paths/classes_enroll_enrollment_code/__init__.py new file mode 100644 index 0000000..fd5efa8 --- /dev/null +++ b/flat_api/paths/classes_enroll_enrollment_code/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.classes_enroll_enrollment_code import Api + +from flat_api.paths import PathValues + +path = PathValues.CLASSES_ENROLL_ENROLLMENT_CODE \ No newline at end of file diff --git a/flat_api/paths/classes_enroll_enrollment_code/post.py b/flat_api/paths/classes_enroll_enrollment_code/post.py new file mode 100644 index 0000000..7d29927 --- /dev/null +++ b/flat_api/paths/classes_enroll_enrollment_code/post.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +EnrollmentCodeSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'enrollmentCode': typing.Union[EnrollmentCodeSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_enrollment_code = api_client.PathParameter( + name="enrollmentCode", + style=api_client.ParameterStyle.SIMPLE, + schema=EnrollmentCodeSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _enroll_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Join a class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_enrollment_code, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EnrollClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def enroll_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._enroll_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._enroll_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/classes_enroll_enrollment_code/post.pyi b/flat_api/paths/classes_enroll_enrollment_code/post.pyi new file mode 100644 index 0000000..0108465 --- /dev/null +++ b/flat_api/paths/classes_enroll_enrollment_code/post.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +EnrollmentCodeSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'enrollmentCode': typing.Union[EnrollmentCodeSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_enrollment_code = api_client.PathParameter( + name="enrollmentCode", + style=api_client.ParameterStyle.SIMPLE, + schema=EnrollmentCodeSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _enroll_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _enroll_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Join a class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_enrollment_code, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EnrollClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def enroll_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def enroll_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._enroll_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._enroll_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections/__init__.py b/flat_api/paths/collections/__init__.py new file mode 100644 index 0000000..7ccadf0 --- /dev/null +++ b/flat_api/paths/collections/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.collections import Api + +from flat_api.paths import PathValues + +path = PathValues.COLLECTIONS \ No newline at end of file diff --git a/flat_api/paths/collections/get.py b/flat_api/paths/collections/get.py new file mode 100644 index 0000000..f9eedae --- /dev/null +++ b/flat_api/paths/collections/get.py @@ -0,0 +1,447 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +ParentSchema = schemas.StrSchema + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "creationDate": "CREATION_DATE", + "title": "TITLE", + } + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "asc": "ASC", + "desc": "DESC", + } + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 1 +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Collection']: + return Collection + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Collection'], typing.List['Collection']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Collection': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_collections_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the collections + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListCollections(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_collections( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collections_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collections_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections/get.pyi b/flat_api/paths/collections/get.pyi new file mode 100644 index 0000000..0945d1a --- /dev/null +++ b/flat_api/paths/collections/get.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +ParentSchema = schemas.StrSchema + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + pass +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Collection']: + return Collection + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Collection'], typing.List['Collection']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Collection': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_collections_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_collections_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the collections + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListCollections(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_collections( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_collections( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collections_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collections_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections/post.py b/flat_api/paths/collections/post.py new file mode 100644 index 0000000..3b613ed --- /dev/null +++ b/flat_api/paths/collections/post.py @@ -0,0 +1,392 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = CollectionCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_collection_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_collection_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections/post.pyi b/flat_api/paths/collections/post.pyi new file mode 100644 index 0000000..e56fc5d --- /dev/null +++ b/flat_api/paths/collections/post.pyi @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +# body param +SchemaForRequestBodyApplicationJson = CollectionCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_collection_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_collection( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_collection_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_collection_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/__init__.py b/flat_api/paths/collections_collection/__init__.py new file mode 100644 index 0000000..0985c1e --- /dev/null +++ b/flat_api/paths/collections_collection/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.collections_collection import Api + +from flat_api.paths import PathValues + +path = PathValues.COLLECTIONS_COLLECTION \ No newline at end of file diff --git a/flat_api/paths/collections_collection/delete.py b/flat_api/paths/collections_collection/delete.py new file mode 100644 index 0000000..853c4b3 --- /dev/null +++ b/flat_api/paths/collections_collection/delete.py @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/delete.pyi b/flat_api/paths/collections_collection/delete.pyi new file mode 100644 index 0000000..d92f221 --- /dev/null +++ b/flat_api/paths/collections_collection/delete.pyi @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/get.py b/flat_api/paths/collections_collection/get.py new file mode 100644 index 0000000..34395e7 --- /dev/null +++ b/flat_api/paths/collections_collection/get.py @@ -0,0 +1,422 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get collection details + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/get.pyi b/flat_api/paths/collections_collection/get.pyi new file mode 100644 index 0000000..979ccfa --- /dev/null +++ b/flat_api/paths/collections_collection/get.pyi @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get collection details + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/put.py b/flat_api/paths/collections_collection/put.py new file mode 100644 index 0000000..d696c30 --- /dev/null +++ b/flat_api/paths/collections_collection/put.py @@ -0,0 +1,466 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.collection_modification import CollectionModification + +from . import path + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = CollectionModification + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_collection_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_collection_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_collection_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_collection_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update a collection's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_collection( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_collection( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_collection( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_collection( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_collection_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_collection_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection/put.pyi b/flat_api/paths/collections_collection/put.pyi new file mode 100644 index 0000000..d1ff137 --- /dev/null +++ b/flat_api/paths/collections_collection/put.pyi @@ -0,0 +1,455 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.collection_modification import CollectionModification + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = CollectionModification + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = Collection + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_collection_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_collection_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_collection_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_collection_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update a collection's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_collection( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_collection( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_collection( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_collection( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_collection_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_collection_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores/__init__.py b/flat_api/paths/collections_collection_scores/__init__.py new file mode 100644 index 0000000..7f4d22f --- /dev/null +++ b/flat_api/paths/collections_collection_scores/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.collections_collection_scores import Api + +from flat_api.paths import PathValues + +path = PathValues.COLLECTIONS_COLLECTION_SCORES \ No newline at end of file diff --git a/flat_api/paths/collections_collection_scores/get.py b/flat_api/paths/collections_collection_scores/get.py new file mode 100644 index 0000000..d3e80c3 --- /dev/null +++ b/flat_api/paths/collections_collection_scores/get.py @@ -0,0 +1,506 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "creationDate": "CREATION_DATE", + "modificationDate": "MODIFICATION_DATE", + "title": "TITLE", + } + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def MODIFICATION_DATE(cls): + return cls("modificationDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "asc": "ASC", + "desc": "DESC", + } + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 1 +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_collection_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the scores contained in a collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListCollectionScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_collection_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collection_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collection_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores/get.pyi b/flat_api/paths/collections_collection_scores/get.pyi new file mode 100644 index 0000000..b6c13be --- /dev/null +++ b/flat_api/paths/collections_collection_scores/get.pyi @@ -0,0 +1,478 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def MODIFICATION_DATE(cls): + return cls("modificationDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + pass +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_collection_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_collection_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the scores contained in a collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListCollectionScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_collection_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_collection_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collection_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_collection_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores_score/__init__.py b/flat_api/paths/collections_collection_scores_score/__init__.py new file mode 100644 index 0000000..76a998e --- /dev/null +++ b/flat_api/paths/collections_collection_scores_score/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.collections_collection_scores_score import Api + +from flat_api.paths import PathValues + +path = PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE \ No newline at end of file diff --git a/flat_api/paths/collections_collection_scores_score/delete.py b/flat_api/paths/collections_collection_scores_score/delete.py new file mode 100644 index 0000000..fe93d3a --- /dev/null +++ b/flat_api/paths/collections_collection_scores_score/delete.py @@ -0,0 +1,423 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_from_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a score from the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreFromCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_from_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_from_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_from_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores_score/delete.pyi b/flat_api/paths/collections_collection_scores_score/delete.pyi new file mode 100644 index 0000000..5821f06 --- /dev/null +++ b/flat_api/paths/collections_collection_scores_score/delete.pyi @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_from_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_from_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a score from the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreFromCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_from_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_from_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_from_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_from_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores_score/put.py b/flat_api/paths/collections_collection_scores_score/put.py new file mode 100644 index 0000000..2d665e3 --- /dev/null +++ b/flat_api/paths/collections_collection_scores_score/put.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_to_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a score to the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreToCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_to_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_to_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_to_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_scores_score/put.pyi b/flat_api/paths/collections_collection_scores_score/put.pyi new file mode 100644 index 0000000..935c5f5 --- /dev/null +++ b/flat_api/paths/collections_collection_scores_score/put.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +CollectionSchema = schemas.StrSchema +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_to_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_to_collection_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a score to the collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreToCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_to_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_to_collection( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_to_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_to_collection_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_untrash/__init__.py b/flat_api/paths/collections_collection_untrash/__init__.py new file mode 100644 index 0000000..ac0efdf --- /dev/null +++ b/flat_api/paths/collections_collection_untrash/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.collections_collection_untrash import Api + +from flat_api.paths import PathValues + +path = PathValues.COLLECTIONS_COLLECTION_UNTRASH \ No newline at end of file diff --git a/flat_api/paths/collections_collection_untrash/post.py b/flat_api/paths/collections_collection_untrash/post.py new file mode 100644 index 0000000..e61d5c7 --- /dev/null +++ b/flat_api/paths/collections_collection_untrash/post.py @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _untrash_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Untrash a collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UntrashCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def untrash_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/collections_collection_untrash/post.pyi b/flat_api/paths/collections_collection_untrash/post.pyi new file mode 100644 index 0000000..1dd293a --- /dev/null +++ b/flat_api/paths/collections_collection_untrash/post.pyi @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +CollectionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'collection': typing.Union[CollectionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_collection = api_client.PathParameter( + name="collection", + style=api_client.ParameterStyle.SIMPLE, + schema=CollectionSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _untrash_collection_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _untrash_collection_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Untrash a collection + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_collection, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UntrashCollection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def untrash_collection( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def untrash_collection( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_collection_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources/__init__.py b/flat_api/paths/edu_resources/__init__.py new file mode 100644 index 0000000..c2a6b98 --- /dev/null +++ b/flat_api/paths/edu_resources/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES \ No newline at end of file diff --git a/flat_api/paths/edu_resources/get.py b/flat_api/paths/edu_resources/get.py new file mode 100644 index 0000000..ed50edb --- /dev/null +++ b/flat_api/paths/edu_resources/get.py @@ -0,0 +1,481 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +from . import path + +# Query params +ParentSchema = schemas.StrSchema + + +class TypeSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "assignment": "ASSIGNMENT", + "folder": "FOLDER", + } + + @schemas.classproperty + def ASSIGNMENT(cls): + return cls("assignment") + + @schemas.classproperty + def FOLDER(cls): + return cls("folder") + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "creationDate": "CREATION_DATE", + "updateDate": "UPDATE_DATE", + "title": "TITLE", + } + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def UPDATE_DATE(cls): + return cls("updateDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "asc": "ASC", + "desc": "DESC", + } + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_maximum = 100 + inclusive_minimum = 1 +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + 'type': typing.Union[TypeSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +request_query_type = api_client.QueryParameter( + name="type", + style=api_client.ParameterStyle.FORM, + schema=TypeSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['EduResource']: + return EduResource + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['EduResource'], typing.List['EduResource']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'EduResource': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_edu_resources_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List education resources in a library or folder + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + request_query_type, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListEduResources(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_edu_resources( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_resources_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_resources_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources/get.pyi b/flat_api/paths/edu_resources/get.pyi new file mode 100644 index 0000000..65917f2 --- /dev/null +++ b/flat_api/paths/edu_resources/get.pyi @@ -0,0 +1,446 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +# Query params +ParentSchema = schemas.StrSchema + + +class TypeSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASSIGNMENT(cls): + return cls("assignment") + + @schemas.classproperty + def FOLDER(cls): + return cls("folder") + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def CREATION_DATE(cls): + return cls("creationDate") + + @schemas.classproperty + def UPDATE_DATE(cls): + return cls("updateDate") + + @schemas.classproperty + def TITLE(cls): + return cls("title") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") + + +class LimitSchema( + schemas.IntSchema +): + pass +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + 'type': typing.Union[TypeSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +request_query_type = api_client.QueryParameter( + name="type", + style=api_client.ParameterStyle.FORM, + schema=TypeSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['EduResource']: + return EduResource + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['EduResource'], typing.List['EduResource']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'EduResource': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_edu_resources_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_edu_resources_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List education resources in a library or folder + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + request_query_type, + request_query_sort, + request_query_direction, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListEduResources(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_edu_resources( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_edu_resources( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_resources_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_resources_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources/post.py b/flat_api/paths/edu_resources/post.py new file mode 100644 index 0000000..b8492c9 --- /dev/null +++ b/flat_api/paths/edu_resources/post.py @@ -0,0 +1,372 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = EduResourceCreation + + +request_body_edu_resource_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_edu_resource_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_edu_resource_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources/post.pyi b/flat_api/paths/edu_resources/post.pyi new file mode 100644 index 0000000..9cbcb4d --- /dev/null +++ b/flat_api/paths/edu_resources/post.pyi @@ -0,0 +1,363 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +# body param +SchemaForRequestBodyApplicationJson = EduResourceCreation + + +request_body_edu_resource_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_edu_resource_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_edu_resource_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_libraries/__init__.py b/flat_api/paths/edu_resources_libraries/__init__.py new file mode 100644 index 0000000..535a29d --- /dev/null +++ b/flat_api/paths/edu_resources_libraries/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_libraries import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_LIBRARIES \ No newline at end of file diff --git a/flat_api/paths/edu_resources_libraries/get.py b/flat_api/paths/edu_resources_libraries/get.py new file mode 100644 index 0000000..ef6c640 --- /dev/null +++ b/flat_api/paths/edu_resources_libraries/get.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_library import EduLibrary +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['EduLibrary']: + return EduLibrary + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['EduLibrary'], typing.List['EduLibrary']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'EduLibrary': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_edu_libraries_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the education libraries + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListEduLibraries(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_edu_libraries( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_libraries_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_libraries_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_libraries/get.pyi b/flat_api/paths/edu_resources_libraries/get.pyi new file mode 100644 index 0000000..b7aa3e9 --- /dev/null +++ b/flat_api/paths/edu_resources_libraries/get.pyi @@ -0,0 +1,290 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_library import EduLibrary +from flat_api.model.flat_error_response import FlatErrorResponse + + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['EduLibrary']: + return EduLibrary + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['EduLibrary'], typing.List['EduLibrary']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'EduLibrary': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_edu_libraries_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_edu_libraries_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the education libraries + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListEduLibraries(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_edu_libraries( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_edu_libraries( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_libraries_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_edu_libraries_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/__init__.py b/flat_api/paths/edu_resources_resource/__init__.py new file mode 100644 index 0000000..0c97acc --- /dev/null +++ b/flat_api/paths/edu_resources_resource/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource/delete.py b/flat_api/paths/edu_resources_resource/delete.py new file mode 100644 index 0000000..53e7831 --- /dev/null +++ b/flat_api/paths/edu_resources_resource/delete.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_edu_resource_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_edu_resource( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/delete.pyi b/flat_api/paths/edu_resources_resource/delete.pyi new file mode 100644 index 0000000..faeb624 --- /dev/null +++ b/flat_api/paths/edu_resources_resource/delete.pyi @@ -0,0 +1,311 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_edu_resource_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_edu_resource( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/get.py b/flat_api/paths/edu_resources_resource/get.py new file mode 100644 index 0000000..3331736 --- /dev/null +++ b/flat_api/paths/edu_resources_resource/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_edu_resource_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_edu_resource( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/get.pyi b/flat_api/paths/edu_resources_resource/get.pyi new file mode 100644 index 0000000..63ce59f --- /dev/null +++ b/flat_api/paths/edu_resources_resource/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_edu_resource_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_edu_resource_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_edu_resource( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_edu_resource( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_edu_resource_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/put.py b/flat_api/paths/edu_resources_resource/put.py new file mode 100644 index 0000000..ddd4672 --- /dev/null +++ b/flat_api/paths/edu_resources_resource/put.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_update import EduResourceUpdate + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceUpdate + + +request_body_edu_resource_update = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an education resource metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_update.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource/put.pyi b/flat_api/paths/edu_resources_resource/put.pyi new file mode 100644 index 0000000..bdf97d2 --- /dev/null +++ b/flat_api/paths/edu_resources_resource/put.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_update import EduResourceUpdate + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceUpdate + + +request_body_edu_resource_update = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an education resource metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_update.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_assignment/__init__.py b/flat_api/paths/edu_resources_resource_assignment/__init__.py new file mode 100644 index 0000000..1bcda00 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_assignment/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource_assignment import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_assignment/put.py b/flat_api/paths/edu_resources_resource_assignment/put.py new file mode 100644 index 0000000..c72cad1 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_assignment/put.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentUpdate + + +request_body_assignment_update = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an education resource assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_update.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateEduResourceAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_assignment/put.pyi b/flat_api/paths/edu_resources_resource_assignment/put.pyi new file mode 100644 index 0000000..08f782f --- /dev/null +++ b/flat_api/paths/edu_resources_resource_assignment/put.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = AssignmentUpdate + + +request_body_assignment_update = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Assignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_edu_resource_assignment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an education resource assignment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_assignment_update.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateEduResourceAssignment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_edu_resource_assignment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_edu_resource_assignment_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_copy/__init__.py b/flat_api/paths/edu_resources_resource_copy/__init__.py new file mode 100644 index 0000000..6711136 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource_copy import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE_COPY \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_copy/post.py b/flat_api/paths/edu_resources_resource_copy/post.py new file mode 100644 index 0000000..65eed0d --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy/post.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceCopy + + +request_body_edu_resource_copy = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an education resource to a Resource Library + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_copy.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_copy/post.pyi b/flat_api/paths/edu_resources_resource_copy/post.pyi new file mode 100644 index 0000000..76f8bb5 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy/post.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceCopy + + +request_body_edu_resource_copy = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an education resource to a Resource Library + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_copy.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py b/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py new file mode 100644 index 0000000..698f292 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource_copy_to_demo_class import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py new file mode 100644 index 0000000..22e0bd6 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassAssignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an education assignment to a teacher demo class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyEduResourceToDemoClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_to_demo_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_to_demo_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi new file mode 100644 index 0000000..3173b58 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassAssignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _copy_edu_resource_to_demo_class_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Copy an education assignment to a teacher demo class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CopyEduResourceToDemoClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def copy_edu_resource_to_demo_class( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_to_demo_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._copy_edu_resource_to_demo_class_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_move/__init__.py b/flat_api/paths/edu_resources_resource_move/__init__.py new file mode 100644 index 0000000..8fa833a --- /dev/null +++ b/flat_api/paths/edu_resources_resource_move/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource_move import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE_MOVE \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_move/post.py b/flat_api/paths/edu_resources_resource_move/post.py new file mode 100644 index 0000000..bb0ead3 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_move/post.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceMove + + +request_body_edu_resource_move = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Move an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_move.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MoveEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._move_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._move_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_move/post.pyi b/flat_api/paths/edu_resources_resource_move/post.pyi new file mode 100644 index 0000000..6b0b2ff --- /dev/null +++ b/flat_api/paths/edu_resources_resource_move/post.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceMove + + +request_body_edu_resource_move = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = EduResource + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _move_edu_resource_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Move an education resource + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_move.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MoveEduResource(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def move_edu_resource( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._move_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._move_edu_resource_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_use_in_class/__init__.py b/flat_api/paths/edu_resources_resource_use_in_class/__init__.py new file mode 100644 index 0000000..0929dd3 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_use_in_class/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.edu_resources_resource_use_in_class import Api + +from flat_api.paths import PathValues + +path = PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_use_in_class/post.py b/flat_api/paths/edu_resources_resource_use_in_class/post.py new file mode 100644 index 0000000..8d9543b --- /dev/null +++ b/flat_api/paths/edu_resources_resource_use_in_class/post.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceUseInClass + + +request_body_edu_resource_use_in_class = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ClassAssignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Use an education resource in a class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_use_in_class.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UseEduResourceInClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._use_edu_resource_in_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._use_edu_resource_in_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/edu_resources_resource_use_in_class/post.pyi b/flat_api/paths/edu_resources_resource_use_in_class/post.pyi new file mode 100644 index 0000000..e940ed3 --- /dev/null +++ b/flat_api/paths/edu_resources_resource_use_in_class/post.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ResourceSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'resource': typing.Union[ResourceSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_resource = api_client.PathParameter( + name="resource", + style=api_client.ParameterStyle.SIMPLE, + schema=ResourceSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = EduResourceUseInClass + + +request_body_edu_resource_use_in_class = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ClassAssignment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _use_edu_resource_in_class_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Use an education resource in a class + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_resource, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_edu_resource_use_in_class.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UseEduResourceInClass(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def use_edu_resource_in_class( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._use_edu_resource_in_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._use_edu_resource_in_class_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group/__init__.py b/flat_api/paths/groups_group/__init__.py new file mode 100644 index 0000000..fdb0834 --- /dev/null +++ b/flat_api/paths/groups_group/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.groups_group import Api + +from flat_api.paths import PathValues + +path = PathValues.GROUPS_GROUP \ No newline at end of file diff --git a/flat_api/paths/groups_group/get.py b/flat_api/paths/groups_group/get.py new file mode 100644 index 0000000..5bec249 --- /dev/null +++ b/flat_api/paths/groups_group/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.group_details import GroupDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = GroupDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_group_details_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get group information + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetGroupDetails(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_group_details( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_details_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_details_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group/get.pyi b/flat_api/paths/groups_group/get.pyi new file mode 100644 index 0000000..1fd8474 --- /dev/null +++ b/flat_api/paths/groups_group/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.group_details import GroupDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = GroupDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_group_details_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_group_details_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get group information + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetGroupDetails(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_group_details( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_group_details( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_details_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_details_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group_scores/__init__.py b/flat_api/paths/groups_group_scores/__init__.py new file mode 100644 index 0000000..1004a37 --- /dev/null +++ b/flat_api/paths/groups_group_scores/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.groups_group_scores import Api + +from flat_api.paths import PathValues + +path = PathValues.GROUPS_GROUP_SCORES \ No newline at end of file diff --git a/flat_api/paths/groups_group_scores/get.py b/flat_api/paths/groups_group_scores/get.py new file mode 100644 index 0000000..de3b4b8 --- /dev/null +++ b/flat_api/paths/groups_group_scores/get.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +ParentSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_group_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List group's scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetGroupScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_group_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group_scores/get.pyi b/flat_api/paths/groups_group_scores/get.pyi new file mode 100644 index 0000000..05e2fc4 --- /dev/null +++ b/flat_api/paths/groups_group_scores/get.pyi @@ -0,0 +1,398 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +ParentSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_group_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_group_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List group's scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetGroupScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_group_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_group_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_group_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group_users/__init__.py b/flat_api/paths/groups_group_users/__init__.py new file mode 100644 index 0000000..0dbfa3e --- /dev/null +++ b/flat_api/paths/groups_group_users/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.groups_group_users import Api + +from flat_api.paths import PathValues + +path = PathValues.GROUPS_GROUP_USERS \ No newline at end of file diff --git a/flat_api/paths/groups_group_users/get.py b/flat_api/paths/groups_group_users/get.py new file mode 100644 index 0000000..c43ca2f --- /dev/null +++ b/flat_api/paths/groups_group_users/get.py @@ -0,0 +1,432 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params + + +class SourceSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "googleClassroom": "GOOGLE_CLASSROOM", + "microsoftGraph": "MICROSOFT_GRAPH", + "clever": "CLEVER", + } + + @schemas.classproperty + def GOOGLE_CLASSROOM(cls): + return cls("googleClassroom") + + @schemas.classproperty + def MICROSOFT_GRAPH(cls): + return cls("microsoftGraph") + + @schemas.classproperty + def CLEVER(cls): + return cls("clever") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'source': typing.Union[SourceSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_source = api_client.QueryParameter( + name="source", + style=api_client.ParameterStyle.FORM, + schema=SourceSchema, + explode=True, +) +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserPublic']: + return UserPublic + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserPublic'], typing.List['UserPublic']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserPublic': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_group_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List group's users + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_source, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListGroupUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_group_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_group_users_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_group_users_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/groups_group_users/get.pyi b/flat_api/paths/groups_group_users/get.pyi new file mode 100644 index 0000000..b274bf1 --- /dev/null +++ b/flat_api/paths/groups_group_users/get.pyi @@ -0,0 +1,415 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params + + +class SourceSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def GOOGLE_CLASSROOM(cls): + return cls("googleClassroom") + + @schemas.classproperty + def MICROSOFT_GRAPH(cls): + return cls("microsoftGraph") + + @schemas.classproperty + def CLEVER(cls): + return cls("clever") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'source': typing.Union[SourceSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_source = api_client.QueryParameter( + name="source", + style=api_client.ParameterStyle.FORM, + schema=SourceSchema, + explode=True, +) +# Path params +GroupSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'group': typing.Union[GroupSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_group = api_client.PathParameter( + name="group", + style=api_client.ParameterStyle.SIMPLE, + schema=GroupSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserPublic']: + return UserPublic + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserPublic'], typing.List['UserPublic']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserPublic': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_group_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_group_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List group's users + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_group, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_source, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListGroupUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_group_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_group_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_group_users_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_group_users_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/me/__init__.py b/flat_api/paths/me/__init__.py new file mode 100644 index 0000000..7fd558b --- /dev/null +++ b/flat_api/paths/me/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.me import Api + +from flat_api.paths import PathValues + +path = PathValues.ME \ No newline at end of file diff --git a/flat_api/paths/me/get.py b/flat_api/paths/me/get.py new file mode 100644 index 0000000..8986e4a --- /dev/null +++ b/flat_api/paths/me/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +OnlyIdSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'onlyId': typing.Union[OnlyIdSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_only_id = api_client.QueryParameter( + name="onlyId", + style=api_client.ParameterStyle.FORM, + schema=OnlyIdSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_authenticated_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get current user account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_only_id, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAuthenticatedUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_authenticated_user( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_authenticated_user_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_authenticated_user_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/me/get.pyi b/flat_api/paths/me/get.pyi new file mode 100644 index 0000000..962ac33 --- /dev/null +++ b/flat_api/paths/me/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +OnlyIdSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'onlyId': typing.Union[OnlyIdSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_only_id = api_client.QueryParameter( + name="onlyId", + style=api_client.ParameterStyle.FORM, + schema=OnlyIdSchema, + explode=True, +) +SchemaFor200ResponseBodyApplicationJson = UserDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_authenticated_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_authenticated_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get current user account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_only_id, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAuthenticatedUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_authenticated_user( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_authenticated_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_authenticated_user_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_authenticated_user_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations/__init__.py b/flat_api/paths/organizations_invitations/__init__.py new file mode 100644 index 0000000..6cf4b69 --- /dev/null +++ b/flat_api/paths/organizations_invitations/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_invitations import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_INVITATIONS \ No newline at end of file diff --git a/flat_api/paths/organizations_invitations/get.py b/flat_api/paths/organizations_invitations/get.py new file mode 100644 index 0000000..75858d2 --- /dev/null +++ b/flat_api/paths/organizations_invitations/get.py @@ -0,0 +1,414 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation import OrganizationInvitation + +from . import path + +# Query params + + +class RoleSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "teacher": "TEACHER", + "admin": "ADMIN", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + +class LimitSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_maximum = 1000 + inclusive_minimum = 1 +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'role': typing.Union[RoleSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OrganizationInvitation']: + return OrganizationInvitation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OrganizationInvitation'], typing.List['OrganizationInvitation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OrganizationInvitation': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_organization_invitations_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the organization invitations + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_role, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListOrganizationInvitations(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_organization_invitations( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_invitations_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_invitations_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations/get.pyi b/flat_api/paths/organizations_invitations/get.pyi new file mode 100644 index 0000000..a674a70 --- /dev/null +++ b/flat_api/paths/organizations_invitations/get.pyi @@ -0,0 +1,393 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation import OrganizationInvitation + +# Query params + + +class RoleSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + +class LimitSchema( + schemas.IntSchema +): + pass +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'role': typing.Union[RoleSchema, str, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OrganizationInvitation']: + return OrganizationInvitation + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OrganizationInvitation'], typing.List['OrganizationInvitation']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OrganizationInvitation': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_organization_invitations_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_organization_invitations_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the organization invitations + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_role, + request_query_limit, + request_query_next, + request_query_previous, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListOrganizationInvitations(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_organization_invitations( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_organization_invitations( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_invitations_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_invitations_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations/post.py b/flat_api/paths/organizations_invitations/post.py new file mode 100644 index 0000000..a8c082f --- /dev/null +++ b/flat_api/paths/organizations_invitations/post.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_invitation import OrganizationInvitation + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = OrganizationInvitationCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = OrganizationInvitation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_invitation_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_invitation_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new invitation to join the organization + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationInvitation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_invitation( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_invitation( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_invitation( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_invitation( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_invitation( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_invitation_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_invitation_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations/post.pyi b/flat_api/paths/organizations_invitations/post.pyi new file mode 100644 index 0000000..639cc79 --- /dev/null +++ b/flat_api/paths/organizations_invitations/post.pyi @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_invitation import OrganizationInvitation + +# body param +SchemaForRequestBodyApplicationJson = OrganizationInvitationCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = OrganizationInvitation + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_invitation_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_invitation_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_invitation_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new invitation to join the organization + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationInvitation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_invitation( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_invitation( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_invitation( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_invitation( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_invitation( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_invitation_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_invitation_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations_invitation/__init__.py b/flat_api/paths/organizations_invitations_invitation/__init__.py new file mode 100644 index 0000000..86df851 --- /dev/null +++ b/flat_api/paths/organizations_invitations_invitation/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_invitations_invitation import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_INVITATIONS_INVITATION \ No newline at end of file diff --git a/flat_api/paths/organizations_invitations_invitation/delete.py b/flat_api/paths/organizations_invitations_invitation/delete.py new file mode 100644 index 0000000..be4f5eb --- /dev/null +++ b/flat_api/paths/organizations_invitations_invitation/delete.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +InvitationSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'invitation': typing.Union[InvitationSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_invitation = api_client.PathParameter( + name="invitation", + style=api_client.ParameterStyle.SIMPLE, + schema=InvitationSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_organization_invitation_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an organization invitation + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_invitation, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveOrganizationInvitation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_organization_invitation( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_invitation_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_invitation_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_invitations_invitation/delete.pyi b/flat_api/paths/organizations_invitations_invitation/delete.pyi new file mode 100644 index 0000000..93dd11e --- /dev/null +++ b/flat_api/paths/organizations_invitations_invitation/delete.pyi @@ -0,0 +1,311 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +InvitationSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'invitation': typing.Union[InvitationSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_invitation = api_client.PathParameter( + name="invitation", + style=api_client.ParameterStyle.SIMPLE, + schema=InvitationSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_organization_invitation_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_organization_invitation_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an organization invitation + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_invitation, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveOrganizationInvitation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_organization_invitation( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_organization_invitation( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_invitation_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_invitation_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials/__init__.py b/flat_api/paths/organizations_lti_credentials/__init__.py new file mode 100644 index 0000000..839ca88 --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_lti_credentials import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_LTI_CREDENTIALS \ No newline at end of file diff --git a/flat_api/paths/organizations_lti_credentials/get.py b/flat_api/paths/organizations_lti_credentials/get.py new file mode 100644 index 0000000..e4c534a --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials/get.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['LtiCredentials']: + return LtiCredentials + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['LtiCredentials'], typing.List['LtiCredentials']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'LtiCredentials': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_lti_credentials_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_lti_credentials( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_lti_credentials_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_lti_credentials_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials/get.pyi b/flat_api/paths/organizations_lti_credentials/get.pyi new file mode 100644 index 0000000..52121e4 --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials/get.pyi @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse + + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['LtiCredentials']: + return LtiCredentials + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['LtiCredentials'], typing.List['LtiCredentials']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'LtiCredentials': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_lti_credentials_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_lti_credentials_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_lti_credentials( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_lti_credentials( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_lti_credentials_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_lti_credentials_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials/post.py b/flat_api/paths/organizations_lti_credentials/post.py new file mode 100644 index 0000000..84e44ff --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials/post.py @@ -0,0 +1,392 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = LtiCredentialsCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = LtiCredentials + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new couple of LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_lti_credentials_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_lti_credentials_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials/post.pyi b/flat_api/paths/organizations_lti_credentials/post.pyi new file mode 100644 index 0000000..240fae7 --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials/post.pyi @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation + +# body param +SchemaForRequestBodyApplicationJson = LtiCredentialsCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = LtiCredentials + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_lti_credentials_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new couple of LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_lti_credentials( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_lti_credentials_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_lti_credentials_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials_credentials/__init__.py b/flat_api/paths/organizations_lti_credentials_credentials/__init__.py new file mode 100644 index 0000000..7f2a7c2 --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials_credentials/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_lti_credentials_credentials import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS \ No newline at end of file diff --git a/flat_api/paths/organizations_lti_credentials_credentials/delete.py b/flat_api/paths/organizations_lti_credentials_credentials/delete.py new file mode 100644 index 0000000..a01febb --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials_credentials/delete.py @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +CredentialsSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'credentials': typing.Union[CredentialsSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_credentials = api_client.PathParameter( + name="credentials", + style=api_client.ParameterStyle.SIMPLE, + schema=CredentialsSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _revoke_lti_credentials_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Revoke LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_credentials, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RevokeLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def revoke_lti_credentials( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revoke_lti_credentials_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revoke_lti_credentials_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi b/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi new file mode 100644 index 0000000..643b673 --- /dev/null +++ b/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +CredentialsSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'credentials': typing.Union[CredentialsSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_credentials = api_client.PathParameter( + name="credentials", + style=api_client.ParameterStyle.SIMPLE, + schema=CredentialsSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _revoke_lti_credentials_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _revoke_lti_credentials_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Revoke LTI 1.x credentials + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_credentials, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RevokeLtiCredentials(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def revoke_lti_credentials( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def revoke_lti_credentials( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revoke_lti_credentials_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revoke_lti_credentials_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users/__init__.py b/flat_api/paths/organizations_users/__init__.py new file mode 100644 index 0000000..ce19f14 --- /dev/null +++ b/flat_api/paths/organizations_users/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_users import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_USERS \ No newline at end of file diff --git a/flat_api/paths/organizations_users/get.py b/flat_api/paths/organizations_users/get.py new file mode 100644 index 0000000..64c8a6e --- /dev/null +++ b/flat_api/paths/organizations_users/get.py @@ -0,0 +1,615 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params + + +class SortSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "firstname": "FIRSTNAME", + "lastname": "LASTNAME", + "lastActivityDate": "LAST_ACTIVITY_DATE", + "licenseExpirationDate": "LICENSE_EXPIRATION_DATE", + } + + @schemas.classproperty + def FIRSTNAME(cls): + return cls("firstname") + + @schemas.classproperty + def LASTNAME(cls): + return cls("lastname") + + @schemas.classproperty + def LAST_ACTIVITY_DATE(cls): + return cls("lastActivityDate") + + @schemas.classproperty + def LICENSE_EXPIRATION_DATE(cls): + return cls("licenseExpirationDate") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SortSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "asc": "ASC", + "desc": "DESC", + } + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema + + +class RoleSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "teacher": "TEACHER", + "admin": "ADMIN", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'RoleSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +QSchema = schemas.StrSchema + + +class GroupSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'GroupSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +NoActiveLicenseSchema = schemas.BoolSchema + + +class LicenseExpirationDateSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'LicenseExpirationDateSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +OnlyIdsSchema = schemas.BoolSchema + + +class LimitSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_maximum = 1000 + inclusive_minimum = 1 +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sort': typing.Union[SortSchema, list, tuple, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + 'role': typing.Union[RoleSchema, list, tuple, ], + 'q': typing.Union[QSchema, str, ], + 'group': typing.Union[GroupSchema, list, tuple, ], + 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], + 'licenseExpirationDate': typing.Union[LicenseExpirationDateSchema, list, tuple, ], + 'onlyIds': typing.Union[OnlyIdsSchema, bool, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_q = api_client.QueryParameter( + name="q", + style=api_client.ParameterStyle.FORM, + schema=QSchema, + explode=True, +) +request_query_group = api_client.QueryParameter( + name="group", + style=api_client.ParameterStyle.FORM, + schema=GroupSchema, + explode=True, +) +request_query_no_active_license = api_client.QueryParameter( + name="noActiveLicense", + style=api_client.ParameterStyle.FORM, + schema=NoActiveLicenseSchema, + explode=True, +) +request_query_license_expiration_date = api_client.QueryParameter( + name="licenseExpirationDate", + style=api_client.ParameterStyle.FORM, + schema=LicenseExpirationDateSchema, + explode=True, +) +request_query_only_ids = api_client.QueryParameter( + name="onlyIds", + style=api_client.ParameterStyle.FORM, + schema=OnlyIdsSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserDetailsAdmin']: + return UserDetailsAdmin + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserDetailsAdmin': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_organization_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the organization users + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_sort, + request_query_direction, + request_query_next, + request_query_previous, + request_query_role, + request_query_q, + request_query_group, + request_query_no_active_license, + request_query_license_expiration_date, + request_query_only_ids, + request_query_limit, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListOrganizationUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_organization_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users/get.pyi b/flat_api/paths/organizations_users/get.pyi new file mode 100644 index 0000000..580a751 --- /dev/null +++ b/flat_api/paths/organizations_users/get.pyi @@ -0,0 +1,578 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params + + +class SortSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def FIRSTNAME(cls): + return cls("firstname") + + @schemas.classproperty + def LASTNAME(cls): + return cls("lastname") + + @schemas.classproperty + def LAST_ACTIVITY_DATE(cls): + return cls("lastActivityDate") + + @schemas.classproperty + def LICENSE_EXPIRATION_DATE(cls): + return cls("licenseExpirationDate") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SortSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") +NextSchema = schemas.StrSchema +PreviousSchema = schemas.StrSchema + + +class RoleSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'RoleSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +QSchema = schemas.StrSchema + + +class GroupSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'GroupSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +NoActiveLicenseSchema = schemas.BoolSchema + + +class LicenseExpirationDateSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'LicenseExpirationDateSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +OnlyIdsSchema = schemas.BoolSchema + + +class LimitSchema( + schemas.IntSchema +): + pass +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sort': typing.Union[SortSchema, list, tuple, ], + 'direction': typing.Union[DirectionSchema, str, ], + 'next': typing.Union[NextSchema, str, ], + 'previous': typing.Union[PreviousSchema, str, ], + 'role': typing.Union[RoleSchema, list, tuple, ], + 'q': typing.Union[QSchema, str, ], + 'group': typing.Union[GroupSchema, list, tuple, ], + 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], + 'licenseExpirationDate': typing.Union[LicenseExpirationDateSchema, list, tuple, ], + 'onlyIds': typing.Union[OnlyIdsSchema, bool, ], + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +request_query_next = api_client.QueryParameter( + name="next", + style=api_client.ParameterStyle.FORM, + schema=NextSchema, + explode=True, +) +request_query_previous = api_client.QueryParameter( + name="previous", + style=api_client.ParameterStyle.FORM, + schema=PreviousSchema, + explode=True, +) +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_q = api_client.QueryParameter( + name="q", + style=api_client.ParameterStyle.FORM, + schema=QSchema, + explode=True, +) +request_query_group = api_client.QueryParameter( + name="group", + style=api_client.ParameterStyle.FORM, + schema=GroupSchema, + explode=True, +) +request_query_no_active_license = api_client.QueryParameter( + name="noActiveLicense", + style=api_client.ParameterStyle.FORM, + schema=NoActiveLicenseSchema, + explode=True, +) +request_query_license_expiration_date = api_client.QueryParameter( + name="licenseExpirationDate", + style=api_client.ParameterStyle.FORM, + schema=LicenseExpirationDateSchema, + explode=True, +) +request_query_only_ids = api_client.QueryParameter( + name="onlyIds", + style=api_client.ParameterStyle.FORM, + schema=OnlyIdsSchema, + explode=True, +) +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserDetailsAdmin']: + return UserDetailsAdmin + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserDetailsAdmin': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_organization_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_organization_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the organization users + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_sort, + request_query_direction, + request_query_next, + request_query_previous, + request_query_role, + request_query_q, + request_query_group, + request_query_no_active_license, + request_query_license_expiration_date, + request_query_only_ids, + request_query_limit, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListOrganizationUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_organization_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_organization_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_organization_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users/post.py b/flat_api/paths/organizations_users/post.py new file mode 100644 index 0000000..acc58ec --- /dev/null +++ b/flat_api/paths/organizations_users/post.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = UserCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new user account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users/post.pyi b/flat_api/paths/organizations_users/post.pyi new file mode 100644 index 0000000..d1593ec --- /dev/null +++ b/flat_api/paths/organizations_users/post.pyi @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +# body param +SchemaForRequestBodyApplicationJson = UserCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new user account + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_count/__init__.py b/flat_api/paths/organizations_users_count/__init__.py new file mode 100644 index 0000000..7440323 --- /dev/null +++ b/flat_api/paths/organizations_users_count/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_users_count import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_USERS_COUNT \ No newline at end of file diff --git a/flat_api/paths/organizations_users_count/get.py b/flat_api/paths/organizations_users_count/get.py new file mode 100644 index 0000000..6007e3c --- /dev/null +++ b/flat_api/paths/organizations_users_count/get.py @@ -0,0 +1,449 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params + + +class RoleSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "user": "USER", + "teacher": "TEACHER", + "admin": "ADMIN", + } + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'RoleSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +QSchema = schemas.StrSchema + + +class GroupSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'GroupSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +NoActiveLicenseSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'role': typing.Union[RoleSchema, list, tuple, ], + 'q': typing.Union[QSchema, str, ], + 'group': typing.Union[GroupSchema, list, tuple, ], + 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_q = api_client.QueryParameter( + name="q", + style=api_client.ParameterStyle.FORM, + schema=QSchema, + explode=True, +) +request_query_group = api_client.QueryParameter( + name="group", + style=api_client.ParameterStyle.FORM, + schema=GroupSchema, + explode=True, +) +request_query_no_active_license = api_client.QueryParameter( + name="noActiveLicense", + style=api_client.ParameterStyle.FORM, + schema=NoActiveLicenseSchema, + explode=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserDetailsAdmin']: + return UserDetailsAdmin + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserDetailsAdmin': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _count_orga_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Count the organization users using the provided filters + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_role, + request_query_q, + request_query_group, + request_query_no_active_license, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CountOrgaUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def count_orga_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._count_orga_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._count_orga_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_count/get.pyi b/flat_api/paths/organizations_users_count/get.pyi new file mode 100644 index 0000000..ef2ce04 --- /dev/null +++ b/flat_api/paths/organizations_users_count/get.pyi @@ -0,0 +1,432 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params + + +class RoleSchema( + schemas.ListSchema +): + + + class MetaOapg: + + + class items( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def USER(cls): + return cls("user") + + @schemas.classproperty + def TEACHER(cls): + return cls("teacher") + + @schemas.classproperty + def ADMIN(cls): + return cls("admin") + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'RoleSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +QSchema = schemas.StrSchema + + +class GroupSchema( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'GroupSchema': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) +NoActiveLicenseSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'role': typing.Union[RoleSchema, list, tuple, ], + 'q': typing.Union[QSchema, str, ], + 'group': typing.Union[GroupSchema, list, tuple, ], + 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_role = api_client.QueryParameter( + name="role", + style=api_client.ParameterStyle.FORM, + schema=RoleSchema, + explode=True, +) +request_query_q = api_client.QueryParameter( + name="q", + style=api_client.ParameterStyle.FORM, + schema=QSchema, + explode=True, +) +request_query_group = api_client.QueryParameter( + name="group", + style=api_client.ParameterStyle.FORM, + schema=GroupSchema, + explode=True, +) +request_query_no_active_license = api_client.QueryParameter( + name="noActiveLicense", + style=api_client.ParameterStyle.FORM, + schema=NoActiveLicenseSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['UserDetailsAdmin']: + return UserDetailsAdmin + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'UserDetailsAdmin': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _count_orga_users_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _count_orga_users_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Count the organization users using the provided filters + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_role, + request_query_q, + request_query_group, + request_query_no_active_license, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CountOrgaUsers(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def count_orga_users( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def count_orga_users( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._count_orga_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._count_orga_users_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user/__init__.py b/flat_api/paths/organizations_users_user/__init__.py new file mode 100644 index 0000000..5fc758f --- /dev/null +++ b/flat_api/paths/organizations_users_user/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_users_user import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_USERS_USER \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user/delete.py b/flat_api/paths/organizations_users_user/delete.py new file mode 100644 index 0000000..ba47e42 --- /dev/null +++ b/flat_api/paths/organizations_users_user/delete.py @@ -0,0 +1,374 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +ConvertToIndividualSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'convertToIndividual': typing.Union[ConvertToIndividualSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_convert_to_individual = api_client.QueryParameter( + name="convertToIndividual", + style=api_client.ParameterStyle.FORM, + schema=ConvertToIndividualSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_organization_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an account from Flat + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_convert_to_individual, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_organization_user( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_user_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_user_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user/delete.pyi b/flat_api/paths/organizations_users_user/delete.pyi new file mode 100644 index 0000000..7ef40b9 --- /dev/null +++ b/flat_api/paths/organizations_users_user/delete.pyi @@ -0,0 +1,365 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +ConvertToIndividualSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'convertToIndividual': typing.Union[ConvertToIndividualSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_convert_to_individual = api_client.QueryParameter( + name="convertToIndividual", + style=api_client.ParameterStyle.FORM, + schema=ConvertToIndividualSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_organization_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_organization_user_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an account from Flat + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_convert_to_individual, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_organization_user( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_organization_user( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_user_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_organization_user_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user/put.py b/flat_api/paths/organizations_users_user/put.py new file mode 100644 index 0000000..6c5b688 --- /dev/null +++ b/flat_api/paths/organizations_users_user/put.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_admin_update import UserAdminUpdate + +from . import path + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = UserAdminUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update account information + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_organization_user_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_organization_user_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user/put.pyi b/flat_api/paths/organizations_users_user/put.pyi new file mode 100644 index 0000000..3a26f85 --- /dev/null +++ b/flat_api/paths/organizations_users_user/put.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_admin_update import UserAdminUpdate + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = UserAdminUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_organization_user_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update account information + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateOrganizationUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_organization_user( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_organization_user_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_organization_user_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user_access_token/__init__.py b/flat_api/paths/organizations_users_user_access_token/__init__.py new file mode 100644 index 0000000..5ca6071 --- /dev/null +++ b/flat_api/paths/organizations_users_user_access_token/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_users_user_access_token import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user_access_token/post.py b/flat_api/paths/organizations_users_user_access_token/post.py new file mode 100644 index 0000000..498cc0e --- /dev/null +++ b/flat_api/paths/organizations_users_user_access_token/post.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OrganizationUserAccessTokenCreation + + +request_body_organization_user_access_token_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ApiAccessToken + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_access_token_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a delegated API access token for an organization user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_organization_user_access_token_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUserAccessToken(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user_access_token( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user_access_token( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user_access_token( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user_access_token( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user_access_token( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_access_token_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_access_token_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user_access_token/post.pyi b/flat_api/paths/organizations_users_user_access_token/post.pyi new file mode 100644 index 0000000..b84f3ed --- /dev/null +++ b/flat_api/paths/organizations_users_user_access_token/post.pyi @@ -0,0 +1,417 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OrganizationUserAccessTokenCreation + + +request_body_organization_user_access_token_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = ApiAccessToken + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_access_token_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_access_token_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a delegated API access token for an organization user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_organization_user_access_token_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUserAccessToken(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user_access_token( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user_access_token( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user_access_token( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user_access_token( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user_access_token( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_access_token_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_access_token_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user_signin_link/__init__.py b/flat_api/paths/organizations_users_user_signin_link/__init__.py new file mode 100644 index 0000000..2e40a4e --- /dev/null +++ b/flat_api/paths/organizations_users_user_signin_link/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.organizations_users_user_signin_link import Api + +from flat_api.paths import PathValues + +path = PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user_signin_link/post.py b/flat_api/paths/organizations_users_user_signin_link/post.py new file mode 100644 index 0000000..e60ea76 --- /dev/null +++ b/flat_api/paths/organizations_users_user_signin_link/post.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_signin_link import UserSigninLink + +from . import path + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = UserSigninLinkCreation + + +request_body_user_signin_link_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserSigninLink + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_signin_link_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a sign in link for an organization user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_user_signin_link_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUserSigninLink(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user_signin_link( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user_signin_link( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_signin_link_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_signin_link_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/organizations_users_user_signin_link/post.pyi b/flat_api/paths/organizations_users_user_signin_link/post.pyi new file mode 100644 index 0000000..6da6db5 --- /dev/null +++ b/flat_api/paths/organizations_users_user_signin_link/post.pyi @@ -0,0 +1,417 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_signin_link import UserSigninLink + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = UserSigninLinkCreation + + +request_body_user_signin_link_creation = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = UserSigninLink + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_organization_user_signin_link_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_organization_user_signin_link_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a sign in link for an organization user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_user_signin_link_creation.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateOrganizationUserSigninLink(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_organization_user_signin_link( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_organization_user_signin_link( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_organization_user_signin_link( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_signin_link_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_organization_user_signin_link_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores/__init__.py b/flat_api/paths/scores/__init__.py new file mode 100644 index 0000000..ff486ae --- /dev/null +++ b/flat_api/paths/scores/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES \ No newline at end of file diff --git a/flat_api/paths/scores/post.py b/flat_api/paths/scores/post.py new file mode 100644 index 0000000..b30b752 --- /dev/null +++ b/flat_api/paths/scores/post.py @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = ScoreCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '402': _response_for_402, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores/post.pyi b/flat_api/paths/scores/post.pyi new file mode 100644 index 0000000..71d41e6 --- /dev/null +++ b/flat_api/paths/scores/post.pyi @@ -0,0 +1,401 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# body param +SchemaForRequestBodyApplicationJson = ScoreCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/__init__.py b/flat_api/paths/scores_score/__init__.py new file mode 100644 index 0000000..081d458 --- /dev/null +++ b/flat_api/paths/scores_score/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE \ No newline at end of file diff --git a/flat_api/paths/scores_score/delete.py b/flat_api/paths/scores_score/delete.py new file mode 100644 index 0000000..c552441 --- /dev/null +++ b/flat_api/paths/scores_score/delete.py @@ -0,0 +1,414 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +NowSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'now': typing.Union[NowSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_now = api_client.QueryParameter( + name="now", + style=api_client.ParameterStyle.FORM, + schema=NowSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_now, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/delete.pyi b/flat_api/paths/scores_score/delete.pyi new file mode 100644 index 0000000..5ccd681 --- /dev/null +++ b/flat_api/paths/scores_score/delete.pyi @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +NowSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'now': typing.Union[NowSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_now = api_client.QueryParameter( + name="now", + style=api_client.ParameterStyle.FORM, + schema=NowSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_now, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/get.py b/flat_api/paths/scores_score/get.py new file mode 100644 index 0000000..60d82e5 --- /dev/null +++ b/flat_api/paths/scores_score/get.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/get.pyi b/flat_api/paths/scores_score/get.pyi new file mode 100644 index 0000000..64886b4 --- /dev/null +++ b/flat_api/paths/scores_score/get.pyi @@ -0,0 +1,430 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/put.py b/flat_api/paths/scores_score/put.py new file mode 100644 index 0000000..abe9b2d --- /dev/null +++ b/flat_api/paths/scores_score/put.py @@ -0,0 +1,486 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreModification + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_score_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_score_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_score_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_score_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Edit a score's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_score( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_score( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_score( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_score( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_score( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_score_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_score_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score/put.pyi b/flat_api/paths/scores_score/put.pyi new file mode 100644 index 0000000..a2ef7ac --- /dev/null +++ b/flat_api/paths/scores_score/put.pyi @@ -0,0 +1,474 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreModification + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _edit_score_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _edit_score_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _edit_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _edit_score_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _edit_score_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Edit a score's metadata + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class EditScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def edit_score( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def edit_score( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def edit_score( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def edit_score( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def edit_score( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_score_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._edit_score_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators/__init__.py b/flat_api/paths/scores_score_collaborators/__init__.py new file mode 100644 index 0000000..d08788d --- /dev/null +++ b/flat_api/paths/scores_score_collaborators/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_collaborators import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_COLLABORATORS \ No newline at end of file diff --git a/flat_api/paths/scores_score_collaborators/get.py b/flat_api/paths/scores_score_collaborators/get.py new file mode 100644 index 0000000..646ea67 --- /dev/null +++ b/flat_api/paths/scores_score_collaborators/get.py @@ -0,0 +1,467 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_collaborators_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the collaborators + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreCollaborators(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_collaborators( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborators_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborators_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators/get.pyi b/flat_api/paths/scores_score_collaborators/get.pyi new file mode 100644 index 0000000..67cbb3d --- /dev/null +++ b/flat_api/paths/scores_score_collaborators/get.pyi @@ -0,0 +1,455 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ResourceCollaborator']: + return ResourceCollaborator + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ResourceCollaborator': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_collaborators_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_collaborators_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the collaborators + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreCollaborators(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_collaborators( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_collaborators( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborators_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborators_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators/post.py b/flat_api/paths/scores_score_collaborators/post.py new file mode 100644 index 0000000..b85a106 --- /dev/null +++ b/flat_api/paths/scores_score_collaborators/post.py @@ -0,0 +1,489 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ResourceCollaboratorCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a new collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_collaborator_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_collaborator_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators/post.pyi b/flat_api/paths/scores_score_collaborators/post.pyi new file mode 100644 index 0000000..0a3721d --- /dev/null +++ b/flat_api/paths/scores_score_collaborators/post.pyi @@ -0,0 +1,477 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ResourceCollaboratorCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_collaborator_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a new collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_collaborator( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_collaborator_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_collaborator_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators_collaborator/__init__.py b/flat_api/paths/scores_score_collaborators_collaborator/__init__.py new file mode 100644 index 0000000..b0a54e1 --- /dev/null +++ b/flat_api/paths/scores_score_collaborators_collaborator/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_collaborators_collaborator import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR \ No newline at end of file diff --git a/flat_api/paths/scores_score_collaborators_collaborator/delete.py b/flat_api/paths/scores_score_collaborators_collaborator/delete.py new file mode 100644 index 0000000..ebe51d2 --- /dev/null +++ b/flat_api/paths/scores_score_collaborators_collaborator/delete.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +CollaboratorSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'collaborator': typing.Union[CollaboratorSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_collaborator = api_client.PathParameter( + name="collaborator", + style=api_client.ParameterStyle.SIMPLE, + schema=CollaboratorSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_score_collaborator_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_collaborator, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_score_collaborator( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_score_collaborator_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_score_collaborator_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi b/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi new file mode 100644 index 0000000..664d7a9 --- /dev/null +++ b/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +CollaboratorSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'collaborator': typing.Union[CollaboratorSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_collaborator = api_client.PathParameter( + name="collaborator", + style=api_client.ParameterStyle.SIMPLE, + schema=CollaboratorSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _remove_score_collaborator_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _remove_score_collaborator_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_collaborator, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RemoveScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def remove_score_collaborator( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def remove_score_collaborator( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_score_collaborator_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._remove_score_collaborator_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators_collaborator/get.py b/flat_api/paths/scores_score_collaborators_collaborator/get.py new file mode 100644 index 0000000..d7c78dc --- /dev/null +++ b/flat_api/paths/scores_score_collaborators_collaborator/get.py @@ -0,0 +1,451 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CollaboratorSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'collaborator': typing.Union[CollaboratorSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_collaborator = api_client.PathParameter( + name="collaborator", + style=api_client.ParameterStyle.SIMPLE, + schema=CollaboratorSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_collaborator_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_collaborator, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_collaborator( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborator_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborator_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_collaborators_collaborator/get.pyi b/flat_api/paths/scores_score_collaborators_collaborator/get.pyi new file mode 100644 index 0000000..c61872f --- /dev/null +++ b/flat_api/paths/scores_score_collaborators_collaborator/get.pyi @@ -0,0 +1,439 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CollaboratorSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'collaborator': typing.Union[CollaboratorSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_collaborator = api_client.PathParameter( + name="collaborator", + style=api_client.ParameterStyle.SIMPLE, + schema=CollaboratorSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_collaborator_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_collaborator_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a collaborator + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_collaborator, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreCollaborator(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_collaborator( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_collaborator( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborator_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_collaborator_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments/__init__.py b/flat_api/paths/scores_score_comments/__init__.py new file mode 100644 index 0000000..4cfd54f --- /dev/null +++ b/flat_api/paths/scores_score_comments/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_comments import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_COMMENTS \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments/get.py b/flat_api/paths/scores_score_comments/get.py new file mode 100644 index 0000000..b8340a6 --- /dev/null +++ b/flat_api/paths/scores_score_comments/get.py @@ -0,0 +1,549 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema + + +class TypeSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "document": "DOCUMENT", + "inline": "INLINE", + } + + @schemas.classproperty + def DOCUMENT(cls): + return cls("document") + + @schemas.classproperty + def INLINE(cls): + return cls("inline") + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "date": "DATE", + } + + @schemas.classproperty + def DATE(cls): + return cls("date") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "asc": "ASC", + "desc": "DESC", + } + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'type': typing.Union[TypeSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_type = api_client.QueryParameter( + name="type", + style=api_client.ParameterStyle.FORM, + schema=TypeSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreComment']: + return ScoreComment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreComment'], typing.List['ScoreComment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreComment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_comments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List comments + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_type, + request_query_sort, + request_query_direction, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreComments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_comments( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_comments_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_comments_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments/get.pyi b/flat_api/paths/scores_score_comments/get.pyi new file mode 100644 index 0000000..e8fd3a6 --- /dev/null +++ b/flat_api/paths/scores_score_comments/get.pyi @@ -0,0 +1,517 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema + + +class TypeSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def DOCUMENT(cls): + return cls("document") + + @schemas.classproperty + def INLINE(cls): + return cls("inline") + + +class SortSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def DATE(cls): + return cls("date") + + +class DirectionSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def ASC(cls): + return cls("asc") + + @schemas.classproperty + def DESC(cls): + return cls("desc") +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'type': typing.Union[TypeSchema, str, ], + 'sort': typing.Union[SortSchema, str, ], + 'direction': typing.Union[DirectionSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_type = api_client.QueryParameter( + name="type", + style=api_client.ParameterStyle.FORM, + schema=TypeSchema, + explode=True, +) +request_query_sort = api_client.QueryParameter( + name="sort", + style=api_client.ParameterStyle.FORM, + schema=SortSchema, + explode=True, +) +request_query_direction = api_client.QueryParameter( + name="direction", + style=api_client.ParameterStyle.FORM, + schema=DirectionSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreComment']: + return ScoreComment + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreComment'], typing.List['ScoreComment']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreComment': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_comments_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_comments_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List comments + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_type, + request_query_sort, + request_query_direction, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreComments(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_comments( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_comments( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_comments_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_comments_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments/post.py b/flat_api/paths/scores_score_comments/post.py new file mode 100644 index 0000000..2513d25 --- /dev/null +++ b/flat_api/paths/scores_score_comments/post.py @@ -0,0 +1,546 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreCommentCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Post a new comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class PostScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments/post.pyi b/flat_api/paths/scores_score_comments/post.pyi new file mode 100644 index 0000000..e0fa72f --- /dev/null +++ b/flat_api/paths/scores_score_comments/post.pyi @@ -0,0 +1,534 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreCommentCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _post_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Post a new comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class PostScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._post_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment/__init__.py b/flat_api/paths/scores_score_comments_comment/__init__.py new file mode 100644 index 0000000..b5fa623 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_comments_comment import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_COMMENTS_COMMENT \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments_comment/delete.py b/flat_api/paths/scores_score_comments_comment/delete.py new file mode 100644 index 0000000..3e66f11 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment/delete.py @@ -0,0 +1,423 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_comment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_comment( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_comment_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_comment_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment/delete.pyi b/flat_api/paths/scores_score_comments_comment/delete.pyi new file mode 100644 index 0000000..2d83e90 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment/delete.pyi @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_comment_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_comment_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Delete a comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_comment( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_comment( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_comment_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_comment_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment/put.py b/flat_api/paths/scores_score_comments_comment/put.py new file mode 100644 index 0000000..d0a96d1 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment/put.py @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_comment_update import ScoreCommentUpdate + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreCommentUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an existing comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment/put.pyi b/flat_api/paths/scores_score_comments_comment/put.pyi new file mode 100644 index 0000000..a796372 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment/put.pyi @@ -0,0 +1,543 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_comment_update import ScoreCommentUpdate + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreCommentUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreComment + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_score_comment_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an existing comment + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateScoreComment(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_score_comment( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_comment_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment_resolved/__init__.py b/flat_api/paths/scores_score_comments_comment_resolved/__init__.py new file mode 100644 index 0000000..16ddf75 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment_resolved/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_comments_comment_resolved import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments_comment_resolved/delete.py b/flat_api/paths/scores_score_comments_comment_resolved/delete.py new file mode 100644 index 0000000..dfce28c --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment_resolved/delete.py @@ -0,0 +1,423 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Mark the comment as unresolved + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MarkScoreCommentUnresolved(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def mark_score_comment_unresolved( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_unresolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_unresolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi b/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi new file mode 100644 index 0000000..6aeacad --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _mark_score_comment_unresolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Mark the comment as unresolved + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MarkScoreCommentUnresolved(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def mark_score_comment_unresolved( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mark_score_comment_unresolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_unresolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_unresolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment_resolved/put.py b/flat_api/paths/scores_score_comments_comment_resolved/put.py new file mode 100644 index 0000000..4f25635 --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment_resolved/put.py @@ -0,0 +1,423 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Mark the comment as resolved + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MarkScoreCommentResolved(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def mark_score_comment_resolved( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_resolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_resolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_comments_comment_resolved/put.pyi b/flat_api/paths/scores_score_comments_comment_resolved/put.pyi new file mode 100644 index 0000000..d1bc6ed --- /dev/null +++ b/flat_api/paths/scores_score_comments_comment_resolved/put.pyi @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +CommentSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'comment': typing.Union[CommentSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_comment = api_client.PathParameter( + name="comment", + style=api_client.ParameterStyle.SIMPLE, + schema=CommentSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _mark_score_comment_resolved_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Mark the comment as resolved + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_comment, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MarkScoreCommentResolved(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def mark_score_comment_resolved( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def mark_score_comment_resolved( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_resolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._mark_score_comment_resolved_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_fork/__init__.py b/flat_api/paths/scores_score_fork/__init__.py new file mode 100644 index 0000000..a950e4f --- /dev/null +++ b/flat_api/paths/scores_score_fork/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_fork import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_FORK \ No newline at end of file diff --git a/flat_api/paths/scores_score_fork/post.py b/flat_api/paths/scores_score_fork/post.py new file mode 100644 index 0000000..7fca558 --- /dev/null +++ b/flat_api/paths/scores_score_fork/post.py @@ -0,0 +1,546 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_fork import ScoreFork + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreFork + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Fork a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ForkScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._fork_score_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._fork_score_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_fork/post.pyi b/flat_api/paths/scores_score_fork/post.pyi new file mode 100644 index 0000000..39dcdf3 --- /dev/null +++ b/flat_api/paths/scores_score_fork/post.pyi @@ -0,0 +1,534 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_fork import ScoreFork + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreFork + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreDetails + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _fork_score_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Fork a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ForkScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def fork_score( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._fork_score_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._fork_score_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions/__init__.py b/flat_api/paths/scores_score_revisions/__init__.py new file mode 100644 index 0000000..d0ff480 --- /dev/null +++ b/flat_api/paths/scores_score_revisions/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_revisions import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_REVISIONS \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions/get.py b/flat_api/paths/scores_score_revisions/get.py new file mode 100644 index 0000000..49c89a8 --- /dev/null +++ b/flat_api/paths/scores_score_revisions/get.py @@ -0,0 +1,467 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreRevision']: + return ScoreRevision + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreRevision'], typing.List['ScoreRevision']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreRevision': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the revisions + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevisions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revisions( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revisions_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revisions_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions/get.pyi b/flat_api/paths/scores_score_revisions/get.pyi new file mode 100644 index 0000000..48d8f80 --- /dev/null +++ b/flat_api/paths/scores_score_revisions/get.pyi @@ -0,0 +1,455 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreRevision']: + return ScoreRevision + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreRevision'], typing.List['ScoreRevision']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreRevision': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revisions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revisions_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the revisions + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevisions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revisions( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revisions( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revisions_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revisions_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions/post.py b/flat_api/paths/scores_score_revisions/post.py new file mode 100644 index 0000000..145b784 --- /dev/null +++ b/flat_api/paths/scores_score_revisions/post.py @@ -0,0 +1,489 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreRevisionCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreRevision + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new revision + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateScoreRevision(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_revision_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_revision_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions/post.pyi b/flat_api/paths/scores_score_revisions/post.pyi new file mode 100644 index 0000000..66c77ea --- /dev/null +++ b/flat_api/paths/scores_score_revisions/post.pyi @@ -0,0 +1,477 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreRevisionCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreRevision + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_score_revision_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new revision + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateScoreRevision(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_score_revision( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_revision_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_score_revision_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision/__init__.py b/flat_api/paths/scores_score_revisions_revision/__init__.py new file mode 100644 index 0000000..283c7fe --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_revisions_revision import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_REVISIONS_REVISION \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision/get.py b/flat_api/paths/scores_score_revisions_revision/get.py new file mode 100644 index 0000000..85150a0 --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision/get.py @@ -0,0 +1,451 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreRevision + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revision_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score revision + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevision(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revision( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision/get.pyi b/flat_api/paths/scores_score_revisions_revision/get.pyi new file mode 100644 index 0000000..1f362c7 --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision/get.pyi @@ -0,0 +1,439 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreRevision + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revision_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revision_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score revision + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevision(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revision( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revision( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision_format/__init__.py b/flat_api/paths/scores_score_revisions_revision_format/__init__.py new file mode 100644 index 0000000..3cd4d0f --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_revisions_revision_format import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision_format/get.py b/flat_api/paths/scores_score_revisions_revision_format/get.py new file mode 100644 index 0000000..cc2398b --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format/get.py @@ -0,0 +1,566 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +PartsSchema = schemas.StrSchema +DefaultTrackSchema = schemas.BoolSchema +UrlSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'parts': typing.Union[PartsSchema, str, ], + 'defaultTrack': typing.Union[DefaultTrackSchema, bool, ], + 'url': typing.Union[UrlSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_parts = api_client.QueryParameter( + name="parts", + style=api_client.ParameterStyle.FORM, + schema=PartsSchema, + explode=True, +) +request_query_default_track = api_client.QueryParameter( + name="defaultTrack", + style=api_client.ParameterStyle.FORM, + schema=DefaultTrackSchema, + explode=True, +) +request_query_url = api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=UrlSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema + + +class FormatSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "json": "JSON", + "mxl": "MXL", + "xml": "XML", + "mp3": "MP3", + "wav": "WAV", + "midi": "MIDI", + "thumbnail.png": "THUMBNAIL_PNG", + "synchronizationPoints": "SYNCHRONIZATION_POINTS", + } + + @schemas.classproperty + def JSON(cls): + return cls("json") + + @schemas.classproperty + def MXL(cls): + return cls("mxl") + + @schemas.classproperty + def XML(cls): + return cls("xml") + + @schemas.classproperty + def MP3(cls): + return cls("mp3") + + @schemas.classproperty + def WAV(cls): + return cls("wav") + + @schemas.classproperty + def MIDI(cls): + return cls("midi") + + @schemas.classproperty + def THUMBNAIL_PNG(cls): + return cls("thumbnail.png") + + @schemas.classproperty + def SYNCHRONIZATION_POINTS(cls): + return cls("synchronizationPoints") +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + 'format': typing.Union[FormatSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +request_path_format = api_client.PathParameter( + name="format", + style=api_client.ParameterStyle.SIMPLE, + schema=FormatSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = schemas.BinarySchema +SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml = schemas.BinarySchema +SchemaFor200ResponseBodyApplicationVndRecordareMusicxml = schemas.BinarySchema +SchemaFor200ResponseBodyAudioMp3 = schemas.BinarySchema +SchemaFor200ResponseBodyAudioWav = schemas.BinarySchema +SchemaFor200ResponseBodyAudioMidi = schemas.BinarySchema +SchemaFor200ResponseBodyImagePng = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, + SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, + SchemaFor200ResponseBodyAudioMp3, + SchemaFor200ResponseBodyAudioWav, + SchemaFor200ResponseBodyAudioMidi, + SchemaFor200ResponseBodyImagePng, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + 'application/vnd.recordare.musicxml+xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml), + 'application/vnd.recordare.musicxml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxml), + 'audio/mp3': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioMp3), + 'audio/wav': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioWav), + 'audio/midi': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioMidi), + 'image/png': api_client.MediaType( + schema=SchemaFor200ResponseBodyImagePng), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', + 'application/vnd.recordare.musicxml+xml', + 'application/vnd.recordare.musicxml', + 'audio/mp3', + 'audio/wav', + 'audio/midi', + 'image/png', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revision_data_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score revision data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + request_path_format, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_parts, + request_query_default_track, + request_query_url, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevisionData(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revision_data( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_data_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_data_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision_format/get.pyi b/flat_api/paths/scores_score_revisions_revision_format/get.pyi new file mode 100644 index 0000000..b0c1334 --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format/get.pyi @@ -0,0 +1,541 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +PartsSchema = schemas.StrSchema +DefaultTrackSchema = schemas.BoolSchema +UrlSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'parts': typing.Union[PartsSchema, str, ], + 'defaultTrack': typing.Union[DefaultTrackSchema, bool, ], + 'url': typing.Union[UrlSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_parts = api_client.QueryParameter( + name="parts", + style=api_client.ParameterStyle.FORM, + schema=PartsSchema, + explode=True, +) +request_query_default_track = api_client.QueryParameter( + name="defaultTrack", + style=api_client.ParameterStyle.FORM, + schema=DefaultTrackSchema, + explode=True, +) +request_query_url = api_client.QueryParameter( + name="url", + style=api_client.ParameterStyle.FORM, + schema=UrlSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema + + +class FormatSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def JSON(cls): + return cls("json") + + @schemas.classproperty + def MXL(cls): + return cls("mxl") + + @schemas.classproperty + def XML(cls): + return cls("xml") + + @schemas.classproperty + def MP3(cls): + return cls("mp3") + + @schemas.classproperty + def WAV(cls): + return cls("wav") + + @schemas.classproperty + def MIDI(cls): + return cls("midi") + + @schemas.classproperty + def THUMBNAIL_PNG(cls): + return cls("thumbnail.png") + + @schemas.classproperty + def SYNCHRONIZATION_POINTS(cls): + return cls("synchronizationPoints") +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + 'format': typing.Union[FormatSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +request_path_format = api_client.PathParameter( + name="format", + style=api_client.ParameterStyle.SIMPLE, + schema=FormatSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.BinarySchema +SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml = schemas.BinarySchema +SchemaFor200ResponseBodyApplicationVndRecordareMusicxml = schemas.BinarySchema +SchemaFor200ResponseBodyAudioMp3 = schemas.BinarySchema +SchemaFor200ResponseBodyAudioWav = schemas.BinarySchema +SchemaFor200ResponseBodyAudioMidi = schemas.BinarySchema +SchemaFor200ResponseBodyImagePng = schemas.BinarySchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, + SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, + SchemaFor200ResponseBodyAudioMp3, + SchemaFor200ResponseBodyAudioWav, + SchemaFor200ResponseBodyAudioMidi, + SchemaFor200ResponseBodyImagePng, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + 'application/vnd.recordare.musicxml+xml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml), + 'application/vnd.recordare.musicxml': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxml), + 'audio/mp3': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioMp3), + 'audio/wav': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioWav), + 'audio/midi': api_client.MediaType( + schema=SchemaFor200ResponseBodyAudioMidi), + 'image/png': api_client.MediaType( + schema=SchemaFor200ResponseBodyImagePng), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', + 'application/vnd.recordare.musicxml+xml', + 'application/vnd.recordare.musicxml', + 'audio/mp3', + 'audio/wav', + 'audio/midi', + 'image/png', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_revision_data_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_revision_data_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a score revision data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + request_path_format, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_parts, + request_query_default_track, + request_query_url, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreRevisionData(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_revision_data( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_revision_data( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_data_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_revision_data_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py b/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py new file mode 100644 index 0000000..55cf3cf --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_revisions_revision_format_task import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/post.py b/flat_api/paths/scores_score_revisions_revision_format_task/post.py new file mode 100644 index 0000000..bca65a0 --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format_task/post.py @@ -0,0 +1,586 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema + + +class FormatSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "mp3": "MP3", + "wav": "WAV", + "practicefirst": "PRACTICEFIRST", + } + + @schemas.classproperty + def MP3(cls): + return cls("mp3") + + @schemas.classproperty + def WAV(cls): + return cls("wav") + + @schemas.classproperty + def PRACTICEFIRST(cls): + return cls("practicefirst") +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + 'format': typing.Union[FormatSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +request_path_format = api_client.PathParameter( + name="format", + style=api_client.ParameterStyle.SIMPLE, + schema=FormatSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = TaskExportOptions + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Task + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '402': _response_for_402, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_export_task_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_export_task_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_export_task_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_export_task_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_export_task_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new score export task + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + request_path_format, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateExportTask(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_export_task( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_export_task( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_export_task( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_export_task( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_export_task( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_export_task_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_export_task_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi b/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi new file mode 100644 index 0000000..eedc116 --- /dev/null +++ b/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi @@ -0,0 +1,566 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RevisionSchema = schemas.StrSchema + + +class FormatSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def MP3(cls): + return cls("mp3") + + @schemas.classproperty + def WAV(cls): + return cls("wav") + + @schemas.classproperty + def PRACTICEFIRST(cls): + return cls("practicefirst") +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'revision': typing.Union[RevisionSchema, str, ], + 'format': typing.Union[FormatSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_revision = api_client.PathParameter( + name="revision", + style=api_client.ParameterStyle.SIMPLE, + schema=RevisionSchema, + required=True, +) +request_path_format = api_client.PathParameter( + name="format", + style=api_client.ParameterStyle.SIMPLE, + schema=FormatSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = TaskExportOptions + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, +) +SchemaFor200ResponseBodyApplicationJson = Task + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor402(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor402ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_402 = api_client.OpenApiResponse( + response_cls=ApiResponseFor402, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor402ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_export_task_oapg( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _create_export_task_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _create_export_task_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_export_task_oapg( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_export_task_oapg( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Create a new score export task + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_revision, + request_path_format, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + _fields = None + _body = None + if body is not schemas.unset: + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateExportTask(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_export_task( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def create_export_task( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def create_export_task( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_export_task( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_export_task( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_export_task_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + content_type: typing_extensions.Literal["application/json"] = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + content_type: str = ..., + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + content_type: str = 'application/json', + body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_export_task_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_submissions/__init__.py b/flat_api/paths/scores_score_submissions/__init__.py new file mode 100644 index 0000000..aa347bf --- /dev/null +++ b/flat_api/paths/scores_score_submissions/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_submissions import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/scores_score_submissions/get.py b/flat_api/paths/scores_score_submissions/get.py new file mode 100644 index 0000000..7734a63 --- /dev/null +++ b/flat_api/paths/scores_score_submissions/get.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List submissions related to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_submissions/get.pyi b/flat_api/paths/scores_score_submissions/get.pyi new file mode 100644 index 0000000..9129673 --- /dev/null +++ b/flat_api/paths/scores_score_submissions/get.pyi @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['AssignmentSubmission']: + return AssignmentSubmission + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'AssignmentSubmission': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_submissions_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_submissions_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List submissions related to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreSubmissions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_submissions( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_submissions( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_submissions_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks/__init__.py b/flat_api/paths/scores_score_tracks/__init__.py new file mode 100644 index 0000000..c230f3b --- /dev/null +++ b/flat_api/paths/scores_score_tracks/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_tracks import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_TRACKS \ No newline at end of file diff --git a/flat_api/paths/scores_score_tracks/get.py b/flat_api/paths/scores_score_tracks/get.py new file mode 100644 index 0000000..c4cc5ab --- /dev/null +++ b/flat_api/paths/scores_score_tracks/get.py @@ -0,0 +1,465 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +ListAutoTrackSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'listAutoTrack': typing.Union[ListAutoTrackSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_assignment = api_client.QueryParameter( + name="assignment", + style=api_client.ParameterStyle.FORM, + schema=AssignmentSchema, + explode=True, +) +request_query_list_auto_track = api_client.QueryParameter( + name="listAutoTrack", + style=api_client.ParameterStyle.FORM, + schema=ListAutoTrackSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrack']: + return ScoreTrack + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrack'], typing.List['ScoreTrack']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrack': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_score_tracks_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the audio or video tracks linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_assignment, + request_query_list_auto_track, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListScoreTracks(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_score_tracks( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_score_tracks_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_score_tracks_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks/get.pyi b/flat_api/paths/scores_score_tracks/get.pyi new file mode 100644 index 0000000..c8cee34 --- /dev/null +++ b/flat_api/paths/scores_score_tracks/get.pyi @@ -0,0 +1,454 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +AssignmentSchema = schemas.StrSchema +ListAutoTrackSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + 'assignment': typing.Union[AssignmentSchema, str, ], + 'listAutoTrack': typing.Union[ListAutoTrackSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +request_query_assignment = api_client.QueryParameter( + name="assignment", + style=api_client.ParameterStyle.FORM, + schema=AssignmentSchema, + explode=True, +) +request_query_list_auto_track = api_client.QueryParameter( + name="listAutoTrack", + style=api_client.ParameterStyle.FORM, + schema=ListAutoTrackSchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreTrack']: + return ScoreTrack + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreTrack'], typing.List['ScoreTrack']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreTrack': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _list_score_tracks_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _list_score_tracks_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List the audio or video tracks linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + request_query_assignment, + request_query_list_auto_track, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ListScoreTracks(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def list_score_tracks( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def list_score_tracks( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_score_tracks_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._list_score_tracks_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks/post.py b/flat_api/paths/scores_score_tracks/post.py new file mode 100644 index 0000000..60a2f21 --- /dev/null +++ b/flat_api/paths/scores_score_tracks/post.py @@ -0,0 +1,469 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_creation import ScoreTrackCreation + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreTrackCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a new video or audio track to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks/post.pyi b/flat_api/paths/scores_score_tracks/post.pyi new file mode 100644 index 0000000..7bdda68 --- /dev/null +++ b/flat_api/paths/scores_score_tracks/post.pyi @@ -0,0 +1,458 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_creation import ScoreTrackCreation + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreTrackCreation + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _add_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Add a new video or audio track to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class AddScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def add_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._add_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/__init__.py b/flat_api/paths/scores_score_tracks_track/__init__.py new file mode 100644 index 0000000..13dbb87 --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_tracks_track import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_TRACKS_TRACK \ No newline at end of file diff --git a/flat_api/paths/scores_score_tracks_track/delete.py b/flat_api/paths/scores_score_tracks_track/delete.py new file mode 100644 index 0000000..8873760 --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/delete.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_track_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an audio or video track linked to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_track( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_track_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_track_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/delete.pyi b/flat_api/paths/scores_score_tracks_track/delete.pyi new file mode 100644 index 0000000..147822f --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/delete.pyi @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _delete_score_track_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_score_track_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Remove an audio or video track linked to the score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DeleteScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete_score_track( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_score_track( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_track_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_score_track_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/get.py b/flat_api/paths/scores_score_tracks_track/get.py new file mode 100644 index 0000000..3454cbe --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/get.py @@ -0,0 +1,431 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_track_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Retrieve the details of an audio or video track linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_track( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_track_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_track_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/get.pyi b/flat_api/paths/scores_score_tracks_track/get.pyi new file mode 100644 index 0000000..404ddf9 --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/get.pyi @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +SharingKeySchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'sharingKey': typing.Union[SharingKeySchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_sharing_key = api_client.QueryParameter( + name="sharingKey", + style=api_client.ParameterStyle.FORM, + schema=SharingKeySchema, + explode=True, +) +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_score_track_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_score_track_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Retrieve the details of an audio or video track linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_sharing_key, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_score_track( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_score_track( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_track_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_score_track_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/put.py b/flat_api/paths/scores_score_tracks_track/put.py new file mode 100644 index 0000000..c9a83d0 --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/put.py @@ -0,0 +1,478 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_update import ScoreTrackUpdate + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreTrackUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an audio or video track linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_tracks_track/put.pyi b/flat_api/paths/scores_score_tracks_track/put.pyi new file mode 100644 index 0000000..d740425 --- /dev/null +++ b/flat_api/paths/scores_score_tracks_track/put.pyi @@ -0,0 +1,467 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_update import ScoreTrackUpdate + +# Path params +ScoreSchema = schemas.StrSchema +TrackSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + 'track': typing.Union[TrackSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +request_path_track = api_client.PathParameter( + name="track", + style=api_client.ParameterStyle.SIMPLE, + schema=TrackSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ScoreTrackUpdate + + +request_body_body = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = ScoreTrack + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_score_track_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Update an audio or video track linked to a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + request_path_track, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_body.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateScoreTrack(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_score_track( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_score_track_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_untrash/__init__.py b/flat_api/paths/scores_score_untrash/__init__.py new file mode 100644 index 0000000..22f1094 --- /dev/null +++ b/flat_api/paths/scores_score_untrash/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.scores_score_untrash import Api + +from flat_api.paths import PathValues + +path = PathValues.SCORES_SCORE_UNTRASH \ No newline at end of file diff --git a/flat_api/paths/scores_score_untrash/post.py b/flat_api/paths/scores_score_untrash/post.py new file mode 100644 index 0000000..3cc1c86 --- /dev/null +++ b/flat_api/paths/scores_score_untrash/post.py @@ -0,0 +1,360 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '204': _response_for_204, + '403': _response_for_403, + '404': _response_for_404, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _untrash_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Untrash a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UntrashScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def untrash_score( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_score_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_score_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/scores_score_untrash/post.pyi b/flat_api/paths/scores_score_untrash/post.pyi new file mode 100644 index 0000000..4847063 --- /dev/null +++ b/flat_api/paths/scores_score_untrash/post.pyi @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +ScoreSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'score': typing.Union[ScoreSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_score = api_client.PathParameter( + name="score", + style=api_client.ParameterStyle.SIMPLE, + schema=ScoreSchema, + required=True, +) + + +@dataclass +class ApiResponseFor204(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_204 = api_client.OpenApiResponse( + response_cls=ApiResponseFor204, +) +SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _untrash_score_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _untrash_score_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Untrash a score + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_score, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UntrashScore(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def untrash_score( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def untrash_score( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_score_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor204, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._untrash_score_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/tasks_task/__init__.py b/flat_api/paths/tasks_task/__init__.py new file mode 100644 index 0000000..2e6f8e8 --- /dev/null +++ b/flat_api/paths/tasks_task/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.tasks_task import Api + +from flat_api.paths import PathValues + +path = PathValues.TASKS_TASK \ No newline at end of file diff --git a/flat_api/paths/tasks_task/get.py b/flat_api/paths/tasks_task/get.py new file mode 100644 index 0000000..1c6b2d9 --- /dev/null +++ b/flat_api/paths/tasks_task/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task + +from . import path + +# Path params +TaskSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'task': typing.Union[TaskSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_task = api_client.PathParameter( + name="task", + style=api_client.ParameterStyle.SIMPLE, + schema=TaskSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = Task + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_task_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a task details + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_task, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetTask(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_task( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_task_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_task_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/tasks_task/get.pyi b/flat_api/paths/tasks_task/get.pyi new file mode 100644 index 0000000..5de5c96 --- /dev/null +++ b/flat_api/paths/tasks_task/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task + +# Path params +TaskSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'task': typing.Union[TaskSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_task = api_client.PathParameter( + name="task", + style=api_client.ParameterStyle.SIMPLE, + schema=TaskSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = Task + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_task_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_task_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a task details + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_task, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetTask(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_task( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_task( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_task_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_task_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user/__init__.py b/flat_api/paths/users_user/__init__.py new file mode 100644 index 0000000..d8f63de --- /dev/null +++ b/flat_api/paths/users_user/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.users_user import Api + +from flat_api.paths import PathValues + +path = PathValues.USERS_USER \ No newline at end of file diff --git a/flat_api/paths/users_user/get.py b/flat_api/paths/users_user/get.py new file mode 100644 index 0000000..30bb270 --- /dev/null +++ b/flat_api/paths/users_user/get.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] +SchemaFor200ResponseBodyApplicationJson = UserPublic + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a public user profile + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user/get.pyi b/flat_api/paths/users_user/get.pyi new file mode 100644 index 0000000..a925d5c --- /dev/null +++ b/flat_api/paths/users_user/get.pyi @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse + +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = UserPublic + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_user_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_user_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + Get a public user profile + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_user( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user_likes/__init__.py b/flat_api/paths/users_user_likes/__init__.py new file mode 100644 index 0000000..e7f02aa --- /dev/null +++ b/flat_api/paths/users_user_likes/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.users_user_likes import Api + +from flat_api.paths import PathValues + +path = PathValues.USERS_USER_LIKES \ No newline at end of file diff --git a/flat_api/paths/users_user_likes/get.py b/flat_api/paths/users_user_likes/get.py new file mode 100644 index 0000000..94e3c29 --- /dev/null +++ b/flat_api/paths/users_user_likes/get.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +IdsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'ids': typing.Union[IdsSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_ids = api_client.QueryParameter( + name="ids", + style=api_client.ParameterStyle.FORM, + schema=IdsSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _ger_user_likes_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List liked scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_ids, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GerUserLikes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def ger_user_likes( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._ger_user_likes_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._ger_user_likes_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user_likes/get.pyi b/flat_api/paths/users_user_likes/get.pyi new file mode 100644 index 0000000..5e1b23b --- /dev/null +++ b/flat_api/paths/users_user_likes/get.pyi @@ -0,0 +1,398 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +IdsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'ids': typing.Union[IdsSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_ids = api_client.QueryParameter( + name="ids", + style=api_client.ParameterStyle.FORM, + schema=IdsSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _ger_user_likes_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _ger_user_likes_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List liked scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_ids, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GerUserLikes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def ger_user_likes( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def ger_user_likes( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._ger_user_likes_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._ger_user_likes_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user_scores/__init__.py b/flat_api/paths/users_user_scores/__init__.py new file mode 100644 index 0000000..0cda8cf --- /dev/null +++ b/flat_api/paths/users_user_scores/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from flat_api.paths.users_user_scores import Api + +from flat_api.paths import PathValues + +path = PathValues.USERS_USER_SCORES \ No newline at end of file diff --git a/flat_api/paths/users_user_scores/get.py b/flat_api/paths/users_user_scores/get.py new file mode 100644 index 0000000..0206fb3 --- /dev/null +++ b/flat_api/paths/users_user_scores/get.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +from . import path + +# Query params +ParentSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) +_auth = [ + 'OAuth2', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + 'default': _response_for_default, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_user_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List user's scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetUserScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_user_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/paths/users_user_scores/get.pyi b/flat_api/paths/users_user_scores/get.pyi new file mode 100644 index 0000000..bafcad6 --- /dev/null +++ b/flat_api/paths/users_user_scores/get.pyi @@ -0,0 +1,398 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from flat_api import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from flat_api import schemas # noqa: F401 + +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse + +# Query params +ParentSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'parent': typing.Union[ParentSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_parent = api_client.QueryParameter( + name="parent", + style=api_client.ParameterStyle.FORM, + schema=ParentSchema, + explode=True, +) +# Path params +UserSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'user': typing.Union[UserSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_user = api_client.PathParameter( + name="user", + style=api_client.ParameterStyle.SIMPLE, + schema=UserSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ScoreDetails']: + return ScoreDetails + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ScoreDetails': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse + + +@dataclass +class ApiResponseForDefault(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor0ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_default = api_client.OpenApiResponse( + response_cls=ApiResponseForDefault, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor0ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def _get_user_scores_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_user_scores_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + List user's scores + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_user, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_parent, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + default_response = _status_code_to_response.get('default') + if default_response: + api_response = default_response.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetUserScores(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get_user_scores( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_user_scores( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + ApiResponseForDefault, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_user_scores_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/flat_api/rest.py b/flat_api/rest.py index 4b1ed92..af5a8d6 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -5,25 +5,19 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - The version of the OpenAPI document: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - -import io -import json import logging -import re import ssl +from urllib.parse import urlencode +import typing import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode import urllib3 +from urllib3._collections import HTTPHeaderDict from flat_api.exceptions import ApiException, ApiValueError @@ -31,23 +25,6 @@ logger = logging.getLogger(__name__) -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - class RESTClientObject(object): def __init__(self, configuration, pools_size=4, maxsize=None): @@ -77,6 +54,12 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if configuration.retries is not None: addition_pool_args['retries'] = configuration.retries + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize @@ -107,72 +90,70 @@ def __init__(self, configuration, pools_size=4, maxsize=None): **addition_pool_args ) - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] - if post_params and body: + if fields and body: raise ApiValueError( - "body parameter cannot be used with post_params parameter." + "body parameter cannot be used with fields parameter." ) - post_params = post_params or {} + fields = fields or {} headers = headers or {} - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' + if timeout: + if isinstance(timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) + if 'Content-Type' not in headers and body is None: r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, + method, + url, + preload_content=not stream, timeout=timeout, - headers=headers) + headers=headers + ) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, - fields=post_params, + body=body, + fields=fields, encode_multipart=False, - preload_content=_preload_content, + preload_content=not stream, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': @@ -182,9 +163,9 @@ def request(self, method, url, query_params=None, headers=None, del headers['Content-Type'] r = self.pool_manager.request( method, url, - fields=post_params, + fields=fields, encode_multipart=True, - preload_content=_preload_content, + preload_content=not stream, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support @@ -195,7 +176,7 @@ def request(self, method, url, query_params=None, headers=None, r = self.pool_manager.request( method, url, body=request_body, - preload_content=_preload_content, + preload_content=not stream, timeout=timeout, headers=headers) else: @@ -207,86 +188,71 @@ def request(self, method, url, query_params=None, headers=None, # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, + preload_content=not stream, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - + if not stream: # log response body logger.debug("response body: %s", r.data) - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): + def GET(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("GET", url, headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) + stream=stream, + timeout=timeout, + fields=fields) - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): + def HEAD(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("HEAD", url, headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) + stream=stream, + timeout=timeout, + fields=fields) - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): + def OPTIONS(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("OPTIONS", url, headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def DELETE(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("DELETE", url, headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + stream=stream, + timeout=timeout, + body=body, fields=fields) - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): + def POST(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("POST", url, headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PUT(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("PUT", url, headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PATCH(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: return self.request("PATCH", url, headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/flat_api/schemas.py b/flat_api/schemas.py new file mode 100644 index 0000000..4d7a32d --- /dev/null +++ b/flat_api/schemas.py @@ -0,0 +1,2476 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +from collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 +import functools +import decimal +import io +import re +import types +import typing +import uuid + +from dateutil.parser.isoparser import isoparser, _takes_ascii +import frozendict + +from flat_api.exceptions import ( + ApiTypeError, + ApiValueError, +) +from flat_api.configuration import ( + Configuration, +) + + +class Unset(object): + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset = Unset() + +none_type = type(None) +file_type = io.IOBase + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: + raise ApiValueError('Invalid file state; file is closed and must be open') + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) + return inst + raise ApiValueError('FileIO must be passed _arg which contains the open file') + + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): + pass + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is defaultdict(set) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k] = d[k] | v + + +class ValidationMetadata(frozendict.frozendict): + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + def __new__( + cls, + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + from_server: bool = False, + configuration: typing.Optional[Configuration] = None, + seen_classes: typing.FrozenSet[typing.Type] = frozenset(), + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() + ): + """ + Args: + path_to_item: the path to the current data being instantiated. + For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) + This changes from location to location + from_server: whether or not this data came form the server + True when receiving server data + False when instantiating model with client side data not form the server + This does not change from location to location + configuration: the Configuration instance to use + This is needed because in Configuration: + - one can disable validation checking + This does not change from location to location + seen_classes: when deserializing data that matches multiple schemas, this is used to store + the schemas that have been traversed. This is used to stop processing when a cycle is seen. + This changes from location to location + validated_path_to_schemas: stores the already validated schema classes for a given path location + This does not change from location to location + """ + return super().__new__( + cls, + path_to_item=path_to_item, + from_server=from_server, + configuration=configuration, + seen_classes=seen_classes, + validated_path_to_schemas=validated_path_to_schemas + ) + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) + validation_ran_earlier = validated_schemas and cls in validated_schemas + if validation_ran_earlier: + return True + if cls in self.seen_classes: + return True + return False + + @property + def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: + return self.get('path_to_item') + + @property + def from_server(self) -> bool: + return self.get('from_server') + + @property + def configuration(self) -> typing.Optional[Configuration]: + return self.get('configuration') + + @property + def seen_classes(self) -> typing.FrozenSet[typing.Type]: + return self.get('seen_classes') + + @property + def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: + return self.get('validated_path_to_schemas') + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +class Singleton: + """ + Enums and singletons are the same + The same instance is returned for a given key of (cls, _arg) + """ + _instances = {} + + def __new__(cls, _arg: typing.Any, **kwargs): + """ + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, _arg, str(_arg)) + if key not in cls._instances: + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): + inst = super().__new__(cls) + cls._instances[key] = inst + else: + cls._instances[key] = super().__new__(cls, _arg) + return cls._instances[key] + + def __repr__(self): + if isinstance(self, NoneClass): + return f'<{self.__class__.__name__}: None>' + elif isinstance(self, BoolClass): + if bool(self): + return f'<{self.__class__.__name__}: True>' + return f'<{self.__class__.__name__}: False>' + return f'<{self.__class__.__name__}: {super().__repr__()}>' + + +class classproperty: + + def __init__(self, fget): + self.fget = fget + + def __get__(self, owner_self, owner_cls): + return self.fget(owner_cls) + + +class NoneClass(Singleton): + @classproperty + def NONE(cls): + return cls(None) + + def __bool__(self) -> bool: + return False + + +class BoolClass(Singleton): + @classproperty + def TRUE(cls): + return cls(True) + + @classproperty + def FALSE(cls): + return cls(False) + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +class MetaOapgTyped: + exclusive_maximum: typing.Union[int, float] + inclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + max_items: int + min_items: int + discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] + + + class properties: + # to hold object properties + pass + + additional_properties: typing.Optional[typing.Type['Schema']] + max_properties: int + min_properties: int + all_of: typing.List[typing.Type['Schema']] + one_of: typing.List[typing.Type['Schema']] + any_of: typing.List[typing.Type['Schema']] + not_schema: typing.Type['Schema'] + max_length: int + min_length: int + items: typing.Type['Schema'] + + +class Schema: + """ + the base class of all swagger/openapi schemas/models + """ + __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} + _types: typing.Set[typing.Type] + MetaOapg = MetaOapgTyped + + @staticmethod + def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + @staticmethod + def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: + if isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + return item_cls + + @classmethod + def __type_error_message( + cls, var_value=None, var_name=None, valid_classes=None, key_type=None + ): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + @classmethod + def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): + error_msg = cls.__type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + Schema _validate_oapg + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + + Returns: + path_to_schemas: a map of path to schemas + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + base_class = type(arg) + if base_class not in cls._types: + raise cls.__get_type_error( + arg, + validation_metadata.path_to_item, + cls._types, + key_type=False, + ) + + path_to_schemas = {validation_metadata.path_to_item: set()} + path_to_schemas[validation_metadata.path_to_item].add(cls) + path_to_schemas[validation_metadata.path_to_item].add(base_class) + return path_to_schemas + + @staticmethod + def _process_schema_classes_oapg( + schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] + ): + """ + Processes and mutates schema_classes + If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included + """ + if len(schema_classes) < 2: + return + if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: + schema_classes.remove(UnsetAnyTypeSchema) + x_schema = schema_type_classes & schema_classes + if not x_schema: + return + x_schema = x_schema.pop() + if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): + # needed to not have a mro error in get_new_class + schema_classes.remove(x_schema) + + @classmethod + def __get_new_cls( + cls, + arg, + validation_metadata: ValidationMetadata + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: + """ + Make a new dynamic class and return an instance of that class + We are making an instance of cls, but instead of making cls + make a new class, new_cls + which includes dynamic bases including cls + return an instance of that new class + + Dict property + List Item Assignment Use cases: + 1. value is NOT an instance of the required schema class + the value is validated by _validate_oapg + _validate_oapg returns a key value pair + where the key is the path to the item, and the value will be the required manufactured class + made out of the matching schemas + 2. value is an instance of the correct schema type + the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type + for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas + and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned + because value is of the correct type, and validation was run earlier when the instance was created + """ + _path_to_schemas = {} + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) + update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas = {} + for path, schema_classes in _path_to_schemas.items(): + """ + Use cases + 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo + needs Singleton added + 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass + Singleton already added + 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo + """ + cls._process_schema_classes_oapg(schema_classes) + enum_schema = any( + issubclass(this_cls, EnumBase) for this_cls in schema_classes) + inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) + chosen_schema_classes = schema_classes - inheritable_primitive_type + suffix = tuple(inheritable_primitive_type) + if enum_schema and suffix[0] not in {NoneClass, BoolClass}: + suffix = (Singleton,) + suffix + + used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix + mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) + path_to_schemas[path] = mfg_cls + + return path_to_schemas + + @classmethod + def _get_new_instance_without_conversion_oapg( + cls, + arg: typing.Any, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + # We have a Dynamic class and we are making an instance of it + if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): + properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) + return super(Schema, cls).__new__(cls, properties) + elif issubclass(cls, tuple) and issubclass(cls, ListBase): + items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) + return super(Schema, cls).__new__(cls, items) + """ + str = openapi str, date, and datetime + decimal.Decimal = openapi int and float + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return super(Schema, cls).__new__(cls, arg) + + @classmethod + def from_openapi_data_oapg( + cls, + arg: typing.Union[ + str, + date, + datetime, + int, + float, + decimal.Decimal, + bool, + None, + 'Schema', + dict, + frozendict.frozendict, + tuple, + list, + io.FileIO, + io.BufferedReader, + bytes + ], + _configuration: typing.Optional[Configuration] + ): + """ + Schema from_openapi_data_oapg + """ + from_server = True + validated_path_to_schemas = {} + arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) + validation_metadata = ValidationMetadata( + from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) + path_to_schemas = cls.__get_new_cls(arg, validation_metadata) + new_cls = path_to_schemas[validation_metadata.path_to_item] + new_inst = new_cls._get_new_instance_without_conversion_oapg( + arg, + validation_metadata.path_to_item, + path_to_schemas + ) + return new_inst + + @staticmethod + def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: + input_dict = {} + if args and isinstance(args[0], (dict, frozendict.frozendict)): + input_dict.update(args[0]) + if kwargs: + input_dict.update(kwargs) + return frozendict.frozendict(input_dict) + + @staticmethod + def __remove_unsets(kwargs): + return {key: val for key, val in kwargs.items() if val is not unset} + + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + """ + Schema __new__ + + Args: + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values + _configuration: contains the Configuration that enables json schema validation keywords + like minItems, minLength etc + + Note: double underscores are used here because pycharm thinks that these variables + are instance properties if they are named normally :( + """ + __kwargs = cls.__remove_unsets(kwargs) + if not _args and not __kwargs: + raise TypeError( + 'No input given. args or kwargs must be given.' + ) + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] + else: + __arg = cls.__get_input_dict(*_args, **__kwargs) + __from_server = False + __validated_path_to_schemas = {} + __arg = cast_to_allowed_types( + __arg, __from_server, __validated_path_to_schemas) + __validation_metadata = ValidationMetadata( + configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) + __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) + __new_cls = __path_to_schemas[__validation_metadata.path_to_item] + return __new_cls._get_new_instance_without_conversion_oapg( + __arg, + __validation_metadata.path_to_item, + __path_to_schemas + ) + + def __init__( + self, + *_args: typing.Union[ + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Union[ + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + ] + ): + """ + this is needed to fix 'Unexpected argument' warning in pycharm + this code does nothing because all Schema instances are immutable + this means that all input data is passed into and used in new, and after the new instance is made + no new attributes are assigned and init is not used + """ + pass + +""" +import itertools +data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') +type_to_cls = { + 'None': 'NoneClass', + 'FrozenDict': 'frozendict.frozendict', + 'Tuple': 'tuple', + 'Str': 'str', + 'Decimal': 'decimal.Decimal', + 'Bool': 'BoolClass' +} +cls_tuples = [v for v in itertools.combinations(data_types, 5)] +typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] +for cls in typed_classes: + print(cls) +object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] +for cls in object_classes: + print(cls) +""" +if typing.TYPE_CHECKING: + # qty 1 + NoneMixin = NoneClass + FrozenDictMixin = frozendict.frozendict + TupleMixin = tuple + StrMixin = str + DecimalMixin = decimal.Decimal + BoolMixin = BoolClass + BytesMixin = bytes + FileMixin = FileIO + # qty 2 + class BinaryMixin(bytes, FileIO): + pass + class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): + pass + class NoneTupleMixin(NoneClass, tuple): + pass + class NoneStrMixin(NoneClass, str): + pass + class NoneDecimalMixin(NoneClass, decimal.Decimal): + pass + class NoneBoolMixin(NoneClass, BoolClass): + pass + class FrozenDictTupleMixin(frozendict.frozendict, tuple): + pass + class FrozenDictStrMixin(frozendict.frozendict, str): + pass + class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): + pass + class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): + pass + class TupleStrMixin(tuple, str): + pass + class TupleDecimalMixin(tuple, decimal.Decimal): + pass + class TupleBoolMixin(tuple, BoolClass): + pass + class StrDecimalMixin(str, decimal.Decimal): + pass + class StrBoolMixin(str, BoolClass): + pass + class DecimalBoolMixin(decimal.Decimal, BoolClass): + pass + # qty 3 + class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): + pass + class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): + pass + class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): + pass + class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): + pass + class NoneTupleStrMixin(NoneClass, tuple, str): + pass + class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): + pass + class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): + pass + class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): + pass + class NoneStrBoolMixin(NoneClass, str, BoolClass): + pass + class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): + pass + class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): + pass + class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): + pass + class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): + pass + class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): + pass + class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): + pass + class TupleStrDecimalMixin(tuple, str, decimal.Decimal): + pass + class TupleStrBoolMixin(tuple, str, BoolClass): + pass + class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): + pass + class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): + pass + # qty 4 + class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): + pass + class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): + pass + class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): + pass + class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): + pass + class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): + pass + class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): + pass + class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): + pass + class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): + pass + class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): + pass + class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): + pass + class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): + pass + class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): + pass + class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): + pass + class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): + pass + # qty 5 + class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): + pass + class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): + pass + class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): + pass + class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): + pass + class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): + pass + # qty 6 + class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): + pass + # qty 8 + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): + pass +else: + # qty 1 + class NoneMixin: + _types = {NoneClass} + class FrozenDictMixin: + _types = {frozendict.frozendict} + class TupleMixin: + _types = {tuple} + class StrMixin: + _types = {str} + class DecimalMixin: + _types = {decimal.Decimal} + class BoolMixin: + _types = {BoolClass} + class BytesMixin: + _types = {bytes} + class FileMixin: + _types = {FileIO} + # qty 2 + class BinaryMixin: + _types = {bytes, FileIO} + class NoneFrozenDictMixin: + _types = {NoneClass, frozendict.frozendict} + class NoneTupleMixin: + _types = {NoneClass, tuple} + class NoneStrMixin: + _types = {NoneClass, str} + class NoneDecimalMixin: + _types = {NoneClass, decimal.Decimal} + class NoneBoolMixin: + _types = {NoneClass, BoolClass} + class FrozenDictTupleMixin: + _types = {frozendict.frozendict, tuple} + class FrozenDictStrMixin: + _types = {frozendict.frozendict, str} + class FrozenDictDecimalMixin: + _types = {frozendict.frozendict, decimal.Decimal} + class FrozenDictBoolMixin: + _types = {frozendict.frozendict, BoolClass} + class TupleStrMixin: + _types = {tuple, str} + class TupleDecimalMixin: + _types = {tuple, decimal.Decimal} + class TupleBoolMixin: + _types = {tuple, BoolClass} + class StrDecimalMixin: + _types = {str, decimal.Decimal} + class StrBoolMixin: + _types = {str, BoolClass} + class DecimalBoolMixin: + _types = {decimal.Decimal, BoolClass} + # qty 3 + class NoneFrozenDictTupleMixin: + _types = {NoneClass, frozendict.frozendict, tuple} + class NoneFrozenDictStrMixin: + _types = {NoneClass, frozendict.frozendict, str} + class NoneFrozenDictDecimalMixin: + _types = {NoneClass, frozendict.frozendict, decimal.Decimal} + class NoneFrozenDictBoolMixin: + _types = {NoneClass, frozendict.frozendict, BoolClass} + class NoneTupleStrMixin: + _types = {NoneClass, tuple, str} + class NoneTupleDecimalMixin: + _types = {NoneClass, tuple, decimal.Decimal} + class NoneTupleBoolMixin: + _types = {NoneClass, tuple, BoolClass} + class NoneStrDecimalMixin: + _types = {NoneClass, str, decimal.Decimal} + class NoneStrBoolMixin: + _types = {NoneClass, str, BoolClass} + class NoneDecimalBoolMixin: + _types = {NoneClass, decimal.Decimal, BoolClass} + class FrozenDictTupleStrMixin: + _types = {frozendict.frozendict, tuple, str} + class FrozenDictTupleDecimalMixin: + _types = {frozendict.frozendict, tuple, decimal.Decimal} + class FrozenDictTupleBoolMixin: + _types = {frozendict.frozendict, tuple, BoolClass} + class FrozenDictStrDecimalMixin: + _types = {frozendict.frozendict, str, decimal.Decimal} + class FrozenDictStrBoolMixin: + _types = {frozendict.frozendict, str, BoolClass} + class FrozenDictDecimalBoolMixin: + _types = {frozendict.frozendict, decimal.Decimal, BoolClass} + class TupleStrDecimalMixin: + _types = {tuple, str, decimal.Decimal} + class TupleStrBoolMixin: + _types = {tuple, str, BoolClass} + class TupleDecimalBoolMixin: + _types = {tuple, decimal.Decimal, BoolClass} + class StrDecimalBoolMixin: + _types = {str, decimal.Decimal, BoolClass} + # qty 4 + class NoneFrozenDictTupleStrMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str} + class NoneFrozenDictTupleDecimalMixin: + _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} + class NoneFrozenDictTupleBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} + class NoneFrozenDictStrDecimalMixin: + _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} + class NoneFrozenDictStrBoolMixin: + _types = {NoneClass, frozendict.frozendict, str, BoolClass} + class NoneFrozenDictDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalMixin: + _types = {NoneClass, tuple, str, decimal.Decimal} + class NoneTupleStrBoolMixin: + _types = {NoneClass, tuple, str, BoolClass} + class NoneTupleDecimalBoolMixin: + _types = {NoneClass, tuple, decimal.Decimal, BoolClass} + class NoneStrDecimalBoolMixin: + _types = {NoneClass, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalMixin: + _types = {frozendict.frozendict, tuple, str, decimal.Decimal} + class FrozenDictTupleStrBoolMixin: + _types = {frozendict.frozendict, tuple, str, BoolClass} + class FrozenDictTupleDecimalBoolMixin: + _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class FrozenDictStrDecimalBoolMixin: + _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} + class TupleStrDecimalBoolMixin: + _types = {tuple, str, decimal.Decimal, BoolClass} + # qty 5 + class NoneFrozenDictTupleStrDecimalMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} + class NoneFrozenDictTupleStrBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} + class NoneFrozenDictTupleDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class NoneFrozenDictStrDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalBoolMixin: + _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalBoolMixin: + _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 6 + class NoneFrozenDictTupleStrDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 8 + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} + + +class ValidatorBase: + @staticmethod + def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + Note: the suffix _oapg stands for openapi python (experimental) generator and + it has been added to prevent collisions with other methods and properties + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + @staticmethod + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class EnumBase: + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + EnumBase _validate_oapg + Validates that arg is in the enum's allowed values + """ + try: + cls.MetaOapg.enum_value_to_name[arg] + except KeyError: + raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class BoolBase: + def is_true_oapg(self) -> bool: + """ + A replacement for x is True + True if the instance is a BoolClass True Singleton + """ + if not issubclass(self.__class__, BoolClass): + return False + return bool(self) + + def is_false_oapg(self) -> bool: + """ + A replacement for x is False + True if the instance is a BoolClass False Singleton + """ + if not issubclass(self.__class__, BoolClass): + return False + return bool(self) is False + + +class NoneBase: + def is_none_oapg(self) -> bool: + """ + A replacement for x is None + True if the instance is a NoneClass None Singleton + """ + if issubclass(self.__class__, NoneClass): + return True + return False + + +class StrBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @property + def as_str_oapg(self) -> str: + return self + + @property + def as_date_oapg(self) -> date: + raise Exception('not implemented') + + @property + def as_datetime_oapg(self) -> datetime: + raise Exception('not implemented') + + @property + def as_decimal_oapg(self) -> decimal.Decimal: + raise Exception('not implemented') + + @property + def as_uuid_oapg(self) -> uuid.UUID: + raise Exception('not implemented') + + @classmethod + def __check_str_validations( + cls, + arg: str, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_length') and + len(arg) > cls.MetaOapg.max_length): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=cls.MetaOapg.max_length, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_length') and + len(arg) < cls.MetaOapg.min_length): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=cls.MetaOapg.min_length, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'regex')): + for regex_dict in cls.MetaOapg.regex: + flags = regex_dict.get('flags', 0) + if not re.search(regex_dict['pattern'], arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + StrBase _validate_oapg + Validates that validations pass + """ + if isinstance(arg, str): + cls.__check_str_validations(arg, validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class UUIDBase: + @property + @functools.lru_cache() + def as_uuid_oapg(self) -> uuid.UUID: + return uuid.UUID(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + uuid.UUID(arg) + return True + except ValueError: + raise ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + UUIDBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class CustomIsoparser(isoparser): + + @_takes_ascii + def parse_isodatetime(self, dt_str): + components, pos = self._parse_isodate(dt_str) + if len(dt_str) > pos: + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1:]) + else: + raise ValueError('String contains unknown ISO components') + + if len(components) > 3 and components[3] == 24: + components[3] = 0 + return datetime(*components) + timedelta(days=1) + + if len(components) <= 3: + raise ValueError('Value is not a datetime') + + return datetime(*components) + + @_takes_ascii + def parse_isodate(self, datestr): + components, pos = self._parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return date(*components) + + +DEFAULT_ISOPARSER = CustomIsoparser() + + +class DateBase: + @property + @functools.lru_cache() + def as_date_oapg(self) -> date: + return DEFAULT_ISOPARSER.parse_isodate(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodate(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + DateBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class DateTimeBase: + @property + @functools.lru_cache() + def as_datetime_oapg(self) -> datetime: + return DEFAULT_ISOPARSER.parse_isodatetime(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodatetime(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DateTimeBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class DecimalBase: + """ + A class for storing decimals that are sent over the wire as strings + These schemas must remain based on StrBase rather than NumberBase + because picking base classes must be deterministic + """ + + @property + @functools.lru_cache() + def as_decimal_oapg(self) -> decimal.Decimal: + return decimal.Decimal(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + decimal.Decimal(arg) + return True + except decimal.InvalidOperation: + raise ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DecimalBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class NumberBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @property + def as_int_oapg(self) -> int: + try: + return self._as_int + except AttributeError: + """ + Note: for some numbers like 9.0 they could be represented as an + integer but our code chooses to store them as + >>> Decimal('9.0').as_tuple() + DecimalTuple(sign=0, digits=(9, 0), exponent=-1) + so we can tell that the value came from a float and convert it back to a float + during later serialization + """ + if self.as_tuple().exponent < 0: + # this could be represented as an integer but should be represented as a float + # because that's what it was serialized from + raise ApiValueError(f'{self} is not an integer') + self._as_int = int(self) + return self._as_int + + @property + def as_float_oapg(self) -> float: + try: + return self._as_float + except AttributeError: + if self.as_tuple().exponent >= 0: + raise ApiValueError(f'{self} is not a float') + self._as_float = float(self) + return self._as_float + + @classmethod + def __check_numeric_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if cls._is_json_validation_enabled_oapg('multipleOf', + validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): + multiple_of_value = cls.MetaOapg.multiple_of + if (not (float(arg) / multiple_of_value).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of_value, + path_to_item=validation_metadata.path_to_item + ) + + checking_max_or_min_values = any( + hasattr(cls.MetaOapg, validation_key) for validation_key in { + 'exclusive_maximum', + 'inclusive_maximum', + 'exclusive_minimum', + 'inclusive_minimum', + } + ) + if not checking_max_or_min_values: + return + + if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_maximum') and + arg >= cls.MetaOapg.exclusive_maximum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value less than", + constraint_value=cls.MetaOapg.exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_maximum') and + arg > cls.MetaOapg.inclusive_maximum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=cls.MetaOapg.inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_minimum') and + arg <= cls.MetaOapg.exclusive_minimum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=cls.MetaOapg.exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_minimum') and + arg < cls.MetaOapg.inclusive_minimum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=cls.MetaOapg.inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + NumberBase _validate_oapg + Validates that validations pass + """ + if isinstance(arg, decimal.Decimal): + cls.__check_numeric_validations(arg, validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class ListBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @classmethod + def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): + """ + Ensures that: + - values passed in for items are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + list_items: the input list of items + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + + # if we have definitions for an items schema, use it + # otherwise accept anything + item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) + item_cls = cls._get_class_oapg(item_cls) + path_to_schemas = {} + for i, value in enumerate(list_items): + item_validation_metadata = ValidationMetadata( + from_server=validation_metadata.from_server, + configuration=validation_metadata.configuration, + path_to_item=validation_metadata.path_to_item+(i,), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate_oapg( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __check_tuple_validations( + cls, arg, + validation_metadata: ValidationMetadata): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_items') and + len(arg) > cls.MetaOapg.max_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=cls.MetaOapg.max_items, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_items') and + len(arg) < cls.MetaOapg.min_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=cls.MetaOapg.min_items, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): + unique_items = set(arg) + if len(arg) > len(unique_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + ListBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if isinstance(arg, tuple): + cls.__check_tuple_validations(arg, validation_metadata) + _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + if not isinstance(arg, tuple): + return _path_to_schemas + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_items_oapg( + cls: 'Schema', + arg: typing.List[typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + ''' + ListBase _get_items_oapg + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion_oapg( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return cast_items + + +class Discriminable: + MetaOapg: MetaOapgTyped + + @classmethod + def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): + if not args or args and disc_property_name not in args[0]: + # The input data does not contain the discriminator property + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + @classmethod + def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + if not hasattr(cls.MetaOapg, 'discriminator'): + return None + disc = cls.MetaOapg.discriminator() + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not hasattr(cls, 'MetaOapg'): + return None + elif not ( + hasattr(cls.MetaOapg, 'all_of') or + hasattr(cls.MetaOapg, 'one_of') or + hasattr(cls.MetaOapg, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls.MetaOapg, 'all_of'): + for allof_cls in cls.MetaOapg.all_of(): + discriminated_cls = allof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls.MetaOapg, 'one_of'): + for oneof_cls in cls.MetaOapg.one_of(): + discriminated_cls = oneof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls.MetaOapg, 'any_of'): + for anyof_cls in cls.MetaOapg.any_of(): + discriminated_cls = anyof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +class DictBase(Discriminable, ValidatorBase): + + @classmethod + def __validate_arg_presence(cls, arg): + """ + Ensures that: + - all required arguments are passed in + - the input variable names are valid + - present in properties or + - accepted because additionalProperties exists + Exceptions will be raised if: + - invalid arguments were passed in + - a var_name is invalid if additional_properties == NotAnyTypeSchema + and var_name not in properties.__annotations__ + - required properties were not passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + seen_required_properties = set() + invalid_arguments = [] + required_property_names = getattr(cls.MetaOapg, 'required', set()) + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) + for property_name in arg: + if property_name in required_property_names: + seen_required_properties.add(property_name) + elif property_name in property_annotations: + continue + elif additional_properties is not NotAnyTypeSchema: + continue + else: + invalid_arguments.append(property_name) + missing_required_arguments = list(required_property_names - seen_required_properties) + if missing_required_arguments: + missing_required_arguments.sort() + raise ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + if invalid_arguments: + invalid_arguments.sort() + raise ApiTypeError( + "{} was passed {} invalid argument{}: {}".format( + cls.__name__, + len(invalid_arguments), + "s" if len(invalid_arguments) > 1 else "", + invalid_arguments + ) + ) + + @classmethod + def __validate_args(cls, arg, validation_metadata: ValidationMetadata): + """ + Ensures that: + - values passed in for properties are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + path_to_schemas = {} + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) + for property_name, value in arg.items(): + path_to_item = validation_metadata.path_to_item+(property_name,) + if property_name in property_annotations: + schema = property_annotations[property_name] + elif additional_properties is not NotAnyTypeSchema: + if additional_properties is UnsetAnyTypeSchema: + """ + If additionalProperties is unset and this path_to_item does not yet have + any validations on it, validate it. + If it already has validations on it, skip this validation. + """ + if path_to_item in path_to_schemas: + continue + schema = additional_properties + else: + raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( + value, cls, validation_metadata.path_to_item+(property_name,) + )) + schema = cls._get_class_oapg(schema) + arg_validation_metadata = ValidationMetadata( + from_server=validation_metadata.from_server, + configuration=validation_metadata.configuration, + path_to_item=path_to_item, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __check_dict_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_properties') and + len(arg) > cls.MetaOapg.max_properties): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=cls.MetaOapg.max_properties, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_properties') and + len(arg) < cls.MetaOapg.min_properties): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=cls.MetaOapg.min_properties, + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DictBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if isinstance(arg, frozendict.frozendict): + cls.__check_dict_validations(arg, validation_metadata) + _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + if not isinstance(arg, frozendict.frozendict): + return _path_to_schemas + cls.__validate_arg_presence(arg) + other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) + update(_path_to_schemas, other_path_to_schemas) + try: + discriminator = cls.MetaOapg.discriminator() + except AttributeError: + return _path_to_schemas + # discriminator exists + disc_prop_name = list(discriminator.keys())[0] + cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) + discriminated_cls = cls.get_discriminated_class_oapg( + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) + return _path_to_schemas + other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_properties_oapg( + cls, + arg: typing.Dict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + """ + DictBase _get_properties_oapg, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion_oapg( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return dict_items + + def __setattr__(self, name: str, value: typing.Any): + if not isinstance(self, FileIO): + raise AttributeError('property setting not supported on immutable instances') + + def __getattr__(self, name: str): + """ + for instance.name access + Properties are only type hinted for required properties + so that hasattr(instance, 'optionalProp') is False when that key is not present + """ + if not isinstance(self, frozendict.frozendict): + return super().__getattr__(name) + if name not in self.__class__.__annotations__: + raise AttributeError(f"{self} has no attribute '{name}'") + try: + value = self[name] + return value + except KeyError as ex: + raise AttributeError(str(ex)) + + def __getitem__(self, name: str): + """ + dict_instance[name] accessor + key errors thrown + """ + if not isinstance(self, frozendict.frozendict): + return super().__getattr__(name) + return super().__getitem__(name) + + def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: + # dict_instance[name] accessor + if not isinstance(self, frozendict.frozendict): + raise NotImplementedError() + try: + return super().__getitem__(name) + except KeyError: + return unset + + +def cast_to_allowed_types( + arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), +) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + if isinstance(arg, Schema): + # store the already run validations + schema_classes = set() + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) + validated_path_to_schemas[path_to_item] = schema_classes + + type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + return str(arg) + elif isinstance(arg, (dict, frozendict.frozendict)): + return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) + elif isinstance(arg, (bool, BoolClass)): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + if arg: + return BoolClass.TRUE + return BoolClass.FALSE + elif isinstance(arg, int): + return decimal.Decimal(arg) + elif isinstance(arg, float): + decimal_from_float = decimal.Decimal(arg) + if decimal_from_float.as_integer_ratio()[1] == 1: + # 9.0 -> Decimal('9.0') + # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') + return decimal.Decimal(str(decimal_from_float)+'.0') + return decimal_from_float + elif isinstance(arg, (tuple, list)): + return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) + elif isinstance(arg, (none_type, NoneClass)): + return NoneClass.NONE + elif isinstance(arg, (date, datetime)): + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, decimal.Decimal): + return decimal.Decimal(arg) + elif isinstance(arg, bytes): + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + return FileIO(arg) + raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class ComposedBase(Discriminable): + + @classmethod + def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): + path_to_schemas = defaultdict(set) + for allof_cls in cls.MetaOapg.all_of(): + if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __get_oneof_class( + cls, + arg, + discriminated_cls, + validation_metadata: ValidationMetadata, + ): + oneof_classes = [] + path_to_schemas = defaultdict(set) + for oneof_cls in cls.MetaOapg.one_of(): + if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(oneof_cls) + continue + if validation_metadata.validation_ran_earlier(oneof_cls): + oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and oneof_cls is discriminated_cls: + raise ex + continue + oneof_classes.append(oneof_cls) + if not oneof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the oneOf schemas matched the input data.".format(cls) + ) + elif len(oneof_classes) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. Multiple " + "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) + ) + # exactly one class matches + return path_to_schemas + + @classmethod + def __get_anyof_classes( + cls, + arg, + discriminated_cls, + validation_metadata: ValidationMetadata + ): + anyof_classes = [] + path_to_schemas = defaultdict(set) + for anyof_cls in cls.MetaOapg.any_of(): + if validation_metadata.validation_ran_earlier(anyof_cls): + anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and anyof_cls is discriminated_cls: + raise ex + continue + anyof_classes.append(anyof_cls) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + ComposedBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + # validation checking on types, validations, and enums + path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + + # process composed schema + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() + discriminated_cls = None + if discriminator and arg and isinstance(arg, frozendict.frozendict): + disc_property_name = list(discriminator.keys())[0] + cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) + # get discriminated_cls by looking at the dict in the current class + discriminated_cls = cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( + arg[disc_property_name], + cls.__name__, + disc_property_name, + list(discriminator[disc_property_name].keys()), + updated_vm.path_to_item + (disc_property_name,) + ) + ) + + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): + other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) + update(path_to_schemas, other_path_to_schemas) + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): + other_path_to_schemas = cls.__get_oneof_class( + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm + ) + update(path_to_schemas, other_path_to_schemas) + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): + other_path_to_schemas = cls.__get_anyof_classes( + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm + ) + update(path_to_schemas, other_path_to_schemas) + not_cls = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): + not_cls = cls.MetaOapg.not_schema + not_cls = cls._get_class_oapg(not_cls) + if not_cls: + other_path_to_schemas = None + not_exception = ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_cls.__name__, + ) + ) + if updated_vm.validation_ran_earlier(not_cls): + raise not_exception + + try: + other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) + except (ApiValueError, ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + + if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): + # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) + assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] + return path_to_schemas + + +# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase +class ComposedSchema( + ComposedBase, + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema, + NoneFrozenDictTupleStrDecimalBoolMixin +): + @classmethod + def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): + if not args: + if not kwargs: + raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) + args = (kwargs, ) + return super().from_openapi_data_oapg(args[0], _configuration=_configuration) + + +class ListSchema( + ListBase, + Schema, + TupleMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class NoneSchema( + NoneBase, + Schema, + NoneMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class NumberSchema( + NumberBase, + Schema, + DecimalMixin +): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + + @classmethod + def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class IntBase: + @property + def as_int_oapg(self) -> int: + try: + return self._as_int + except AttributeError: + self._as_int = int(self) + return self._as_int + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + + denominator = arg.as_integer_ratio()[-1] + if denominator != 1: + raise ApiValueError( + "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + IntBase _validate_oapg + TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class IntSchema(IntBase, NumberSchema): + + @classmethod + def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class Int32Base: + __inclusive_minimum = decimal.Decimal(-2147483648) + __inclusive_maximum = decimal.Decimal(2147483647) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Int32Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Int32Schema( + Int32Base, + IntSchema +): + pass + + +class Int64Base: + __inclusive_minimum = decimal.Decimal(-9223372036854775808) + __inclusive_maximum = decimal.Decimal(9223372036854775807) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Int64Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Int64Schema( + Int64Base, + IntSchema +): + pass + + +class Float32Base: + __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) + __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Float32Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Float32Schema( + Float32Base, + NumberSchema +): + + @classmethod + def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + +class Float64Base: + __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) + __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Float64Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + +class Float64Schema( + Float64Base, + NumberSchema +): + + @classmethod + def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): + # todo check format + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + +class StrSchema( + StrBase, + Schema, + StrMixin +): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + + @classmethod + def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class UUIDSchema(UUIDBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DateSchema(DateBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DateTimeSchema(DateTimeBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DecimalSchema(DecimalBase, StrSchema): + + def __new__(cls, _arg: str, **kwargs: Configuration): + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().__new__(cls, _arg, **kwargs) + + +class BytesSchema( + Schema, + BytesMixin +): + """ + this class will subclass bytes and is immutable + """ + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) + + +class FileSchema( + Schema, + FileMixin +): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) + + +class BinaryBase: + pass + + +class BinarySchema( + ComposedBase, + BinaryBase, + Schema, + BinaryMixin +): + class MetaOapg: + @staticmethod + def one_of(): + return [ + BytesSchema, + FileSchema, + ] + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) + + +class BoolSchema( + BoolBase, + Schema, + BoolMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) + + +class AnyTypeSchema( + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema, + NoneFrozenDictTupleStrDecimalBoolFileBytesMixin +): + # Python representation of a schema defined as true or {} + pass + + +class UnsetAnyTypeSchema(AnyTypeSchema): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + + +class NotAnyTypeSchema( + ComposedSchema, +): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + + class MetaOapg: + not_schema = AnyTypeSchema + + def __new__( + cls, + *_args, + _configuration: typing.Optional[Configuration] = None, + ) -> 'NotAnyTypeSchema': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + +class DictSchema( + DictBase, + Schema, + FrozenDictMixin +): + @classmethod + def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) + + +schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} + + +@functools.lru_cache() +def get_new_class( + class_name: str, + bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] +) -> typing.Type[Schema]: + """ + Returns a new class that is made with the subclass bases + """ + new_cls: typing.Type[Schema] = type(class_name, bases, {}) + return new_cls + + +LOG_CACHE_USAGE = False + + +def log_cache_usage(cache_fn): + if LOG_CACHE_USAGE: + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index eb358ef..3cb6612 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -certifi >= 14.05.14 -future; python_version<="2.7" -six >= 1.10 -python_dateutil >= 2.5.3 +certifi >= 14.5.14 +frozendict ~= 2.3.4 +python-dateutil ~= 2.7.0 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +typing_extensions ~= 4.3.0 +urllib3 ~= 1.26.7 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py index 2d42503..f2ffaf5 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages NAME = "flat_api" -VERSION = "0.8.0" +VERSION = "0.8.1" # To install the library, run the following # # python setup.py install diff --git a/test-requirements.txt b/test-requirements.txt index 4ed3991..2d88b03 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,3 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 +pytest~=4.6.7 # needed for python 3.4 pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 2.7+3.4 +pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/test/test_assignment_creation_microsoft_graph.py b/test/test_assignment_creation_microsoft_graph.py deleted file mode 100644 index f350999..0000000 --- a/test/test_assignment_creation_microsoft_graph.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.assignment_creation_microsoft_graph import AssignmentCreationMicrosoftGraph # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentCreationMicrosoftGraph(unittest.TestCase): - """AssignmentCreationMicrosoftGraph unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentCreationMicrosoftGraph(self): - """Test AssignmentCreationMicrosoftGraph""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_creation_microsoft_graph.AssignmentCreationMicrosoftGraph() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_history_attachment.py b/test/test_assignment_submission_history_attachment.py deleted file mode 100644 index 2cb0524..0000000 --- a/test/test_assignment_submission_history_attachment.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentSubmissionHistoryAttachment(unittest.TestCase): - """AssignmentSubmissionHistoryAttachment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionHistoryAttachment(self): - """Test AssignmentSubmissionHistoryAttachment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_history_attachment.AssignmentSubmissionHistoryAttachment() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_update_comments.py b/test/test_assignment_submission_update_comments.py deleted file mode 100644 index b662d3d..0000000 --- a/test/test_assignment_submission_update_comments.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.assignment_submission_update_comments import AssignmentSubmissionUpdateComments # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentSubmissionUpdateComments(unittest.TestCase): - """AssignmentSubmissionUpdateComments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionUpdateComments(self): - """Test AssignmentSubmissionUpdateComments""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_update_comments.AssignmentSubmissionUpdateComments() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_api.py b/test/test_class_api.py deleted file mode 100644 index f98836c..0000000 --- a/test/test_class_api.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.class_api import ClassApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassApi(unittest.TestCase): - """ClassApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.class_api.ClassApi() # noqa: E501 - - def tearDown(self): - pass - - def test_activate_class(self): - """Test case for activate_class - - Activate the class # noqa: E501 - """ - pass - - def test_add_class_user(self): - """Test case for add_class_user - - Add a user to the class # noqa: E501 - """ - pass - - def test_archive_assignment(self): - """Test case for archive_assignment - - Archive the assignment # noqa: E501 - """ - pass - - def test_archive_class(self): - """Test case for archive_class - - Archive the class # noqa: E501 - """ - pass - - def test_copy_assignment(self): - """Test case for copy_assignment - - Copy an assignment # noqa: E501 - """ - pass - - def test_create_assignment(self): - """Test case for create_assignment - - Assignment creation # noqa: E501 - """ - pass - - def test_create_class(self): - """Test case for create_class - - Create a new class # noqa: E501 - """ - pass - - def test_create_submission(self): - """Test case for create_submission - - Create or edit a submission # noqa: E501 - """ - pass - - def test_delete_class_user(self): - """Test case for delete_class_user - - Remove a user from the class # noqa: E501 - """ - pass - - def test_delete_submission(self): - """Test case for delete_submission - - Delete a submission # noqa: E501 - """ - pass - - def test_delete_submission_comment(self): - """Test case for delete_submission_comment - - Delete a feedback comment to a submission # noqa: E501 - """ - pass - - def test_edit_submission(self): - """Test case for edit_submission - - Edit a submission # noqa: E501 - """ - pass - - def test_enroll_class(self): - """Test case for enroll_class - - Join a class # noqa: E501 - """ - pass - - def test_export_submissions_reviews_as_csv(self): - """Test case for export_submissions_reviews_as_csv - - CSV Grades exports # noqa: E501 - """ - pass - - def test_export_submissions_reviews_as_excel(self): - """Test case for export_submissions_reviews_as_excel - - Excel Grades exports # noqa: E501 - """ - pass - - def test_fork_score(self): - """Test case for fork_score - - Fork a score # noqa: E501 - """ - pass - - def test_get_class(self): - """Test case for get_class - - Get the details of a single class # noqa: E501 - """ - pass - - def test_get_score_submissions(self): - """Test case for get_score_submissions - - List submissions related to the score # noqa: E501 - """ - pass - - def test_get_submission(self): - """Test case for get_submission - - Get a student submission # noqa: E501 - """ - pass - - def test_get_submission_comments(self): - """Test case for get_submission_comments - - List the feedback comments of a submission # noqa: E501 - """ - pass - - def test_get_submission_history(self): - """Test case for get_submission_history - - Get the history of the submission # noqa: E501 - """ - pass - - def test_get_submissions(self): - """Test case for get_submissions - - List the students' submissions # noqa: E501 - """ - pass - - def test_list_assignments(self): - """Test case for list_assignments - - Assignments listing # noqa: E501 - """ - pass - - def test_list_class_student_submissions(self): - """Test case for list_class_student_submissions - - List the submissions for a student # noqa: E501 - """ - pass - - def test_list_classes(self): - """Test case for list_classes - - List the classes available for the current user # noqa: E501 - """ - pass - - def test_post_submission_comment(self): - """Test case for post_submission_comment - - Add a feedback comment to a submission # noqa: E501 - """ - pass - - def test_unarchive_assignment(self): - """Test case for unarchive_assignment - - Unarchive the assignment. # noqa: E501 - """ - pass - - def test_unarchive_class(self): - """Test case for unarchive_class - - Unarchive the class # noqa: E501 - """ - pass - - def test_update_class(self): - """Test case for update_class - - Update the class # noqa: E501 - """ - pass - - def test_update_submission_comment(self): - """Test case for update_submission_comment - - Update a feedback comment to a submission # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py deleted file mode 100644 index 1e22c34..0000000 --- a/test/test_class_details_canvas.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_canvas import ClassDetailsCanvas # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsCanvas(unittest.TestCase): - """ClassDetailsCanvas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsCanvas(self): - """Test ClassDetailsCanvas""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_canvas.ClassDetailsCanvas() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py deleted file mode 100644 index b882c13..0000000 --- a/test/test_class_details_clever.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_clever import ClassDetailsClever # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsClever(unittest.TestCase): - """ClassDetailsClever unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsClever(self): - """Test ClassDetailsClever""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_clever.ClassDetailsClever() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py deleted file mode 100644 index 9bd8aa2..0000000 --- a/test/test_class_details_google_classroom.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsGoogleClassroom(unittest.TestCase): - """ClassDetailsGoogleClassroom unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsGoogleClassroom(self): - """Test ClassDetailsGoogleClassroom""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_google_classroom.ClassDetailsGoogleClassroom() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py deleted file mode 100644 index 2550674..0000000 --- a/test/test_class_details_google_drive.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsGoogleDrive(unittest.TestCase): - """ClassDetailsGoogleDrive unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsGoogleDrive(self): - """Test ClassDetailsGoogleDrive""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_google_drive.ClassDetailsGoogleDrive() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_issues.py b/test/test_class_details_issues.py deleted file mode 100644 index a8dcee2..0000000 --- a/test/test_class_details_issues.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_issues import ClassDetailsIssues # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsIssues(unittest.TestCase): - """ClassDetailsIssues unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsIssues(self): - """Test ClassDetailsIssues""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_issues.ClassDetailsIssues() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_issues_sync.py b/test/test_class_details_issues_sync.py deleted file mode 100644 index 79cf74e..0000000 --- a/test/test_class_details_issues_sync.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_issues_sync import ClassDetailsIssuesSync # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsIssuesSync(unittest.TestCase): - """ClassDetailsIssuesSync unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsIssuesSync(self): - """Test ClassDetailsIssuesSync""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_issues_sync.ClassDetailsIssuesSync() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py deleted file mode 100644 index 1d56555..0000000 --- a/test/test_class_details_lti.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_lti import ClassDetailsLti # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsLti(unittest.TestCase): - """ClassDetailsLti unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsLti(self): - """Test ClassDetailsLti""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_lti.ClassDetailsLti() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_mfc.py b/test/test_class_details_mfc.py deleted file mode 100644 index db58c54..0000000 --- a/test/test_class_details_mfc.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_mfc import ClassDetailsMfc # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsMfc(unittest.TestCase): - """ClassDetailsMfc unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsMfc(self): - """Test ClassDetailsMfc""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_mfc.ClassDetailsMfc() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_microsoft_graph.py b/test/test_class_details_microsoft_graph.py deleted file mode 100644 index a3ba6b1..0000000 --- a/test/test_class_details_microsoft_graph.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph # noqa: E501 -from flat_api.rest import ApiException - - -class TestClassDetailsMicrosoftGraph(unittest.TestCase): - """ClassDetailsMicrosoftGraph unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetailsMicrosoftGraph(self): - """Test ClassDetailsMicrosoftGraph""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details_microsoft_graph.ClassDetailsMicrosoftGraph() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_api.py b/test/test_collection_api.py deleted file mode 100644 index 2a50b45..0000000 --- a/test/test_collection_api.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.collection_api import CollectionApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestCollectionApi(unittest.TestCase): - """CollectionApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.collection_api.CollectionApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_score_to_collection(self): - """Test case for add_score_to_collection - - Add a score to the collection # noqa: E501 - """ - pass - - def test_create_collection(self): - """Test case for create_collection - - Create a new collection # noqa: E501 - """ - pass - - def test_delete_collection(self): - """Test case for delete_collection - - Delete the collection # noqa: E501 - """ - pass - - def test_delete_score_from_collection(self): - """Test case for delete_score_from_collection - - Delete a score from the collection # noqa: E501 - """ - pass - - def test_edit_collection(self): - """Test case for edit_collection - - Update a collection's metadata # noqa: E501 - """ - pass - - def test_get_collection(self): - """Test case for get_collection - - Get collection details # noqa: E501 - """ - pass - - def test_list_collection_scores(self): - """Test case for list_collection_scores - - List the scores contained in a collection # noqa: E501 - """ - pass - - def test_list_collections(self): - """Test case for list_collections - - List the collections # noqa: E501 - """ - pass - - def test_untrash_collection(self): - """Test case for untrash_collection - - Untrash a collection # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py deleted file mode 100644 index f66e8c4..0000000 --- a/test/test_collection_capabilities.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.collection_capabilities import CollectionCapabilities # noqa: E501 -from flat_api.rest import ApiException - - -class TestCollectionCapabilities(unittest.TestCase): - """CollectionCapabilities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionCapabilities(self): - """Test CollectionCapabilities""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_capabilities.CollectionCapabilities() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_models/__init__.py b/test/test_models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_api_access_token.py b/test/test_models/test_api_access_token.py similarity index 79% rename from test/test_api_access_token.py rename to test/test_models/test_api_access_token.py index 07fc12c..62cf657 100644 --- a/test/test_api_access_token.py +++ b/test/test_models/test_api_access_token.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.api_access_token import ApiAccessToken # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.api_access_token import ApiAccessToken +from flat_api import configuration class TestApiAccessToken(unittest.TestCase): """ApiAccessToken unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApiAccessToken(self): - """Test ApiAccessToken""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.api_access_token.ApiAccessToken() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_app_scopes.py b/test/test_models/test_app_scopes.py similarity index 80% rename from test/test_app_scopes.py rename to test/test_models/test_app_scopes.py index ee412da..d186875 100644 --- a/test/test_app_scopes.py +++ b/test/test_models/test_app_scopes.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.app_scopes import AppScopes # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.app_scopes import AppScopes +from flat_api import configuration class TestAppScopes(unittest.TestCase): """AppScopes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAppScopes(self): - """Test AppScopes""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.app_scopes.AppScopes() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment.py b/test/test_models/test_assignment.py similarity index 80% rename from test/test_assignment.py rename to test/test_models/test_assignment.py index 4af8cc3..4b237ac 100644 --- a/test/test_assignment.py +++ b/test/test_models/test_assignment.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment import Assignment # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment import Assignment +from flat_api import configuration class TestAssignment(unittest.TestCase): """Assignment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignment(self): - """Test Assignment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment.Assignment() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_copy.py b/test/test_models/test_assignment_copy.py similarity index 79% rename from test/test_assignment_copy.py rename to test/test_models/test_assignment_copy.py index f17004a..65d6630 100644 --- a/test/test_assignment_copy.py +++ b/test/test_models/test_assignment_copy.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_copy import AssignmentCopy # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api import configuration class TestAssignmentCopy(unittest.TestCase): """AssignmentCopy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentCopy(self): - """Test AssignmentCopy""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_copy.AssignmentCopy() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_account_api.py b/test/test_models/test_assignment_copy_response.py similarity index 77% rename from test/test_account_api.py rename to test/test_models/test_assignment_copy_response.py index 8ce4099..57cade7 100644 --- a/test/test_account_api.py +++ b/test/test_models/test_assignment_copy_response.py @@ -5,36 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.api.account_api import AccountApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.account_api.AccountApi() # noqa: E501 - - def tearDown(self): - pass +from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from flat_api import configuration - def test_get_authenticated_user(self): - """Test case for get_authenticated_user - Get current user profile # noqa: E501 - """ - pass +class TestAssignmentCopyResponse(unittest.TestCase): + """AssignmentCopyResponse unit test stubs""" + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission.py b/test/test_models/test_assignment_submission.py similarity index 78% rename from test/test_assignment_submission.py rename to test/test_models/test_assignment_submission.py index 3c575e4..6d88d0f 100644 --- a/test/test_assignment_submission.py +++ b/test/test_models/test_assignment_submission.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission import AssignmentSubmission # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api import configuration class TestAssignmentSubmission(unittest.TestCase): """AssignmentSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmission(self): - """Test AssignmentSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission.AssignmentSubmission() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission_comment.py b/test/test_models/test_assignment_submission_comment.py similarity index 77% rename from test/test_assignment_submission_comment.py rename to test/test_models/test_assignment_submission_comment.py index 4a6bc76..cb33e7c 100644 --- a/test/test_assignment_submission_comment.py +++ b/test/test_models/test_assignment_submission_comment.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api import configuration class TestAssignmentSubmissionComment(unittest.TestCase): """AssignmentSubmissionComment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionComment(self): - """Test AssignmentSubmissionComment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_comment.AssignmentSubmissionComment() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission_comment_creation.py b/test/test_models/test_assignment_submission_comment_creation.py similarity index 76% rename from test/test_assignment_submission_comment_creation.py rename to test/test_models/test_assignment_submission_comment_creation.py index a19f908..3c3c414 100644 --- a/test/test_assignment_submission_comment_creation.py +++ b/test/test_models/test_assignment_submission_comment_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api import configuration class TestAssignmentSubmissionCommentCreation(unittest.TestCase): """AssignmentSubmissionCommentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionCommentCreation(self): - """Test AssignmentSubmissionCommentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_comment_creation.AssignmentSubmissionCommentCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission_history.py b/test/test_models/test_assignment_submission_history.py similarity index 77% rename from test/test_assignment_submission_history.py rename to test/test_models/test_assignment_submission_history.py index 78f2560..9b9c3d8 100644 --- a/test/test_assignment_submission_history.py +++ b/test/test_models/test_assignment_submission_history.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api import configuration class TestAssignmentSubmissionHistory(unittest.TestCase): """AssignmentSubmissionHistory unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionHistory(self): - """Test AssignmentSubmissionHistory""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_history.AssignmentSubmissionHistory() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_task_progress.py b/test/test_models/test_assignment_submission_history_state.py similarity index 76% rename from test/test_task_progress.py rename to test/test_models/test_assignment_submission_history_state.py index 54b0587..ae3bca5 100644 --- a/test/test_task_progress.py +++ b/test/test_models/test_assignment_submission_history_state.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.task_progress import TaskProgress # noqa: E501 -from flat_api.rest import ApiException - - -class TestTaskProgress(unittest.TestCase): - """TaskProgress unit test stubs""" - - def setUp(self): - pass +from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState +from flat_api import configuration - def tearDown(self): - pass - def testTaskProgress(self): - """Test TaskProgress""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.task_progress.TaskProgress() # noqa: E501 - pass +class TestAssignmentSubmissionHistoryState(unittest.TestCase): + """AssignmentSubmissionHistoryState unit test stubs""" + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission_state.py b/test/test_models/test_assignment_submission_state.py similarity index 77% rename from test/test_assignment_submission_state.py rename to test/test_models/test_assignment_submission_state.py index 2a13cbe..71b8758 100644 --- a/test/test_assignment_submission_state.py +++ b/test/test_models/test_assignment_submission_state.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission_state import AssignmentSubmissionState # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission_state import AssignmentSubmissionState +from flat_api import configuration class TestAssignmentSubmissionState(unittest.TestCase): """AssignmentSubmissionState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionState(self): - """Test AssignmentSubmissionState""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_state.AssignmentSubmissionState() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_submission_update.py b/test/test_models/test_assignment_submission_update.py similarity index 77% rename from test/test_assignment_submission_update.py rename to test/test_models/test_assignment_submission_update.py index 508579b..20f8804 100644 --- a/test/test_assignment_submission_update.py +++ b/test/test_models/test_assignment_submission_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api import configuration class TestAssignmentSubmissionUpdate(unittest.TestCase): """AssignmentSubmissionUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionUpdate(self): - """Test AssignmentSubmissionUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_submission_update.AssignmentSubmissionUpdate() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_type.py b/test/test_models/test_assignment_type.py similarity index 79% rename from test/test_assignment_type.py rename to test/test_models/test_assignment_type.py index ac46c44..dbb3b9d 100644 --- a/test/test_assignment_type.py +++ b/test/test_models/test_assignment_type.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_type import AssignmentType # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.assignment_type import AssignmentType +from flat_api import configuration class TestAssignmentType(unittest.TestCase): """AssignmentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentType(self): - """Test AssignmentType""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_type.AssignmentType() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_lti.py b/test/test_models/test_assignment_update.py similarity index 76% rename from test/test_assignment_lti.py rename to test/test_models/test_assignment_update.py index 7a8d937..957c467 100644 --- a/test/test_assignment_lti.py +++ b/test/test_models/test_assignment_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_lti import AssignmentLti # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentLti(unittest.TestCase): - """AssignmentLti unit test stubs""" - - def setUp(self): - pass +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api import configuration - def tearDown(self): - pass - def testAssignmentLti(self): - """Test AssignmentLti""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_lti.AssignmentLti() # noqa: E501 - pass +class TestAssignmentUpdate(unittest.TestCase): + """AssignmentUpdate unit test stubs""" + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_class_assignment.py b/test/test_models/test_class_assignment.py new file mode 100644 index 0000000..b6ae17b --- /dev/null +++ b/test/test_models/test_class_assignment.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api import configuration + + +class TestClassAssignment(unittest.TestCase): + """ClassAssignment unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_class_assignment_update.py b/test/test_models/test_class_assignment_update.py new file mode 100644 index 0000000..a0ccf95 --- /dev/null +++ b/test/test_models/test_class_assignment_update.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from flat_api import configuration + + +class TestClassAssignmentUpdate(unittest.TestCase): + """ClassAssignmentUpdate unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_attachment_creation.py b/test/test_models/test_class_attachment_creation.py similarity index 78% rename from test/test_class_attachment_creation.py rename to test/test_models/test_class_attachment_creation.py index 6aba661..68eec23 100644 --- a/test/test_class_attachment_creation.py +++ b/test/test_models/test_class_attachment_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_attachment_creation import ClassAttachmentCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_attachment_creation import ClassAttachmentCreation +from flat_api import configuration class TestClassAttachmentCreation(unittest.TestCase): """ClassAttachmentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassAttachmentCreation(self): - """Test ClassAttachmentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_attachment_creation.ClassAttachmentCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_class_creation.py b/test/test_models/test_class_creation.py similarity index 79% rename from test/test_class_creation.py rename to test/test_models/test_class_creation.py index 46d7f75..1aef906 100644 --- a/test/test_class_creation.py +++ b/test/test_models/test_class_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_creation import ClassCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_creation import ClassCreation +from flat_api import configuration class TestClassCreation(unittest.TestCase): """ClassCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassCreation(self): - """Test ClassCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_creation.ClassCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_class_details.py b/test/test_models/test_class_details.py similarity index 80% rename from test/test_class_details.py rename to test/test_models/test_class_details.py index 8c349f9..47a0d2c 100644 --- a/test/test_class_details.py +++ b/test/test_models/test_class_details.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_details import ClassDetails # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_details import ClassDetails +from flat_api import configuration class TestClassDetails(unittest.TestCase): """ClassDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassDetails(self): - """Test ClassDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_details.ClassDetails() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_class_grade_level.py b/test/test_models/test_class_grade_level.py new file mode 100644 index 0000000..8b0f7d5 --- /dev/null +++ b/test/test_models/test_class_grade_level.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api import configuration + + +class TestClassGradeLevel(unittest.TestCase): + """ClassGradeLevel unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_roles.py b/test/test_models/test_class_roles.py similarity index 80% rename from test/test_class_roles.py rename to test/test_models/test_class_roles.py index 307f025..78bd927 100644 --- a/test/test_class_roles.py +++ b/test/test_models/test_class_roles.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_roles import ClassRoles # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_roles import ClassRoles +from flat_api import configuration class TestClassRoles(unittest.TestCase): """ClassRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassRoles(self): - """Test ClassRoles""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_roles.ClassRoles() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_class_state.py b/test/test_models/test_class_state.py similarity index 80% rename from test/test_class_state.py rename to test/test_models/test_class_state.py index c485624..25113d8 100644 --- a/test/test_class_state.py +++ b/test/test_models/test_class_state.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_state import ClassState # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_state import ClassState +from flat_api import configuration class TestClassState(unittest.TestCase): """ClassState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassState(self): - """Test ClassState""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_state.ClassState() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_class_update.py b/test/test_models/test_class_update.py similarity index 80% rename from test/test_class_update.py rename to test/test_models/test_class_update.py index f122eb6..1115950 100644 --- a/test/test_class_update.py +++ b/test/test_models/test_class_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.class_update import ClassUpdate # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.class_update import ClassUpdate +from flat_api import configuration class TestClassUpdate(unittest.TestCase): """ClassUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassUpdate(self): - """Test ClassUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.class_update.ClassUpdate() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection.py b/test/test_models/test_collection.py similarity index 80% rename from test/test_collection.py rename to test/test_models/test_collection.py index 4e9c045..e2c6f16 100644 --- a/test/test_collection.py +++ b/test/test_models/test_collection.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection import Collection # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection import Collection +from flat_api import configuration class TestCollection(unittest.TestCase): """Collection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollection(self): - """Test Collection""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection.Collection() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection_app.py b/test/test_models/test_collection_app.py similarity index 79% rename from test/test_collection_app.py rename to test/test_models/test_collection_app.py index 7a67ece..5335027 100644 --- a/test/test_collection_app.py +++ b/test/test_models/test_collection_app.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection_app import CollectionApp # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection_app import CollectionApp +from flat_api import configuration class TestCollectionApp(unittest.TestCase): """CollectionApp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionApp(self): - """Test CollectionApp""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_app.CollectionApp() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection_creation.py b/test/test_models/test_collection_creation.py similarity index 79% rename from test/test_collection_creation.py rename to test/test_models/test_collection_creation.py index 3719a83..5607229 100644 --- a/test/test_collection_creation.py +++ b/test/test_models/test_collection_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection_creation import CollectionCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection_creation import CollectionCreation +from flat_api import configuration class TestCollectionCreation(unittest.TestCase): """CollectionCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionCreation(self): - """Test CollectionCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_creation.CollectionCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection_modification.py b/test/test_models/test_collection_modification.py similarity index 78% rename from test/test_collection_modification.py rename to test/test_models/test_collection_modification.py index 43ea6a5..a85723c 100644 --- a/test/test_collection_modification.py +++ b/test/test_models/test_collection_modification.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection_modification import CollectionModification # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection_modification import CollectionModification +from flat_api import configuration class TestCollectionModification(unittest.TestCase): """CollectionModification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionModification(self): - """Test CollectionModification""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_modification.CollectionModification() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection_privacy.py b/test/test_models/test_collection_privacy.py similarity index 79% rename from test/test_collection_privacy.py rename to test/test_models/test_collection_privacy.py index f26d6c8..75d348e 100644 --- a/test/test_collection_privacy.py +++ b/test/test_models/test_collection_privacy.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection_privacy import CollectionPrivacy # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection_privacy import CollectionPrivacy +from flat_api import configuration class TestCollectionPrivacy(unittest.TestCase): """CollectionPrivacy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionPrivacy(self): - """Test CollectionPrivacy""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_privacy.CollectionPrivacy() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_collection_type.py b/test/test_models/test_collection_type.py similarity index 79% rename from test/test_collection_type.py rename to test/test_models/test_collection_type.py index 8ea6a36..f500456 100644 --- a/test/test_collection_type.py +++ b/test/test_models/test_collection_type.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.collection_type import CollectionType # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.collection_type import CollectionType +from flat_api import configuration class TestCollectionType(unittest.TestCase): """CollectionType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionType(self): - """Test CollectionType""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.collection_type.CollectionType() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_edu_library.py b/test/test_models/test_edu_library.py new file mode 100644 index 0000000..8af2bf5 --- /dev/null +++ b/test/test_models/test_edu_library.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_library import EduLibrary +from flat_api import configuration + + +class TestEduLibrary(unittest.TestCase): + """EduLibrary unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource.py b/test/test_models/test_edu_resource.py new file mode 100644 index 0000000..a2d4248 --- /dev/null +++ b/test/test_models/test_edu_resource.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource import EduResource +from flat_api import configuration + + +class TestEduResource(unittest.TestCase): + """EduResource unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_copy.py b/test/test_models/test_edu_resource_copy.py new file mode 100644 index 0000000..0f6b259 --- /dev/null +++ b/test/test_models/test_edu_resource_copy.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api import configuration + + +class TestEduResourceCopy(unittest.TestCase): + """EduResourceCopy unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_creation.py b/test/test_models/test_edu_resource_creation.py new file mode 100644 index 0000000..01498b7 --- /dev/null +++ b/test/test_models/test_edu_resource_creation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api import configuration + + +class TestEduResourceCreation(unittest.TestCase): + """EduResourceCreation unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_move.py b/test/test_models/test_edu_resource_move.py new file mode 100644 index 0000000..0fac466 --- /dev/null +++ b/test/test_models/test_edu_resource_move.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api import configuration + + +class TestEduResourceMove(unittest.TestCase): + """EduResourceMove unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_privacy.py b/test/test_models/test_edu_resource_privacy.py new file mode 100644 index 0000000..f0957fc --- /dev/null +++ b/test/test_models/test_edu_resource_privacy.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api import configuration + + +class TestEduResourcePrivacy(unittest.TestCase): + """EduResourcePrivacy unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_type.py b/test/test_models/test_edu_resource_type.py new file mode 100644 index 0000000..7d3e9cf --- /dev/null +++ b/test/test_models/test_edu_resource_type.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_resource_type import EduResourceType +from flat_api import configuration + + +class TestEduResourceType(unittest.TestCase): + """EduResourceType unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_task_api.py b/test/test_models/test_edu_resource_update.py similarity index 79% rename from test/test_task_api.py rename to test/test_models/test_edu_resource_update.py index 7055b86..72cc104 100644 --- a/test/test_task_api.py +++ b/test/test_models/test_edu_resource_update.py @@ -5,36 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.api.task_api import TaskApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestTaskApi(unittest.TestCase): - """TaskApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.task_api.TaskApi() # noqa: E501 - - def tearDown(self): - pass +from flat_api.model.edu_resource_update import EduResourceUpdate +from flat_api import configuration - def test_get_task(self): - """Test case for get_task - Get a task details # noqa: E501 - """ - pass +class TestEduResourceUpdate(unittest.TestCase): + """EduResourceUpdate unit test stubs""" + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_assignment_mfc.py b/test/test_models/test_edu_resource_use_in_class.py similarity index 76% rename from test/test_assignment_mfc.py rename to test/test_models/test_edu_resource_use_in_class.py index 9e210a3..5950aaa 100644 --- a/test/test_assignment_mfc.py +++ b/test/test_models/test_edu_resource_use_in_class.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.assignment_mfc import AssignmentMfc # noqa: E501 -from flat_api.rest import ApiException - - -class TestAssignmentMfc(unittest.TestCase): - """AssignmentMfc unit test stubs""" - - def setUp(self): - pass +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api import configuration - def tearDown(self): - pass - def testAssignmentMfc(self): - """Test AssignmentMfc""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.assignment_mfc.AssignmentMfc() # noqa: E501 - pass +class TestEduResourceUseInClass(unittest.TestCase): + """EduResourceUseInClass unit test stubs""" + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_edu_skills_focused.py b/test/test_models/test_edu_skills_focused.py new file mode 100644 index 0000000..ad2af1b --- /dev/null +++ b/test/test_models/test_edu_skills_focused.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.edu_skills_focused import EduSkillsFocused +from flat_api import configuration + + +class TestEduSkillsFocused(unittest.TestCase): + """EduSkillsFocused unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flat_error_response.py b/test/test_models/test_flat_error_response.py similarity index 79% rename from test/test_flat_error_response.py rename to test/test_models/test_flat_error_response.py index b261f97..2fb538b 100644 --- a/test/test_flat_error_response.py +++ b/test/test_models/test_flat_error_response.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.flat_error_response import FlatErrorResponse # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api import configuration class TestFlatErrorResponse(unittest.TestCase): """FlatErrorResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFlatErrorResponse(self): - """Test FlatErrorResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.flat_error_response.FlatErrorResponse() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_flat_locales.py b/test/test_models/test_flat_locales.py similarity index 80% rename from test/test_flat_locales.py rename to test/test_models/test_flat_locales.py index db6b822..697d28d 100644 --- a/test/test_flat_locales.py +++ b/test/test_models/test_flat_locales.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.flat_locales import FlatLocales # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.flat_locales import FlatLocales +from flat_api import configuration class TestFlatLocales(unittest.TestCase): """FlatLocales unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFlatLocales(self): - """Test FlatLocales""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.flat_locales.FlatLocales() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_google_classroom_coursework.py b/test/test_models/test_google_classroom_coursework.py similarity index 77% rename from test/test_google_classroom_coursework.py rename to test/test_models/test_google_classroom_coursework.py index 6320247..088a4d0 100644 --- a/test/test_google_classroom_coursework.py +++ b/test/test_models/test_google_classroom_coursework.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +from flat_api import configuration class TestGoogleClassroomCoursework(unittest.TestCase): """GoogleClassroomCoursework unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGoogleClassroomCoursework(self): - """Test GoogleClassroomCoursework""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.google_classroom_coursework.GoogleClassroomCoursework() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_google_classroom_submission.py b/test/test_models/test_google_classroom_submission.py similarity index 77% rename from test/test_google_classroom_submission.py rename to test/test_models/test_google_classroom_submission.py index e37ce7d..a762538 100644 --- a/test/test_google_classroom_submission.py +++ b/test/test_models/test_google_classroom_submission.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +from flat_api import configuration class TestGoogleClassroomSubmission(unittest.TestCase): """GoogleClassroomSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGoogleClassroomSubmission(self): - """Test GoogleClassroomSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.google_classroom_submission.GoogleClassroomSubmission() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_group.py b/test/test_models/test_group.py similarity index 81% rename from test/test_group.py rename to test/test_models/test_group.py index f574b5a..a87a9ce 100644 --- a/test/test_group.py +++ b/test/test_models/test_group.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.group import Group # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.group import Group +from flat_api import configuration class TestGroup(unittest.TestCase): """Group unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroup(self): - """Test Group""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.group.Group() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_group_details.py b/test/test_models/test_group_details.py similarity index 80% rename from test/test_group_details.py rename to test/test_models/test_group_details.py index 165bc8a..d13f230 100644 --- a/test/test_group_details.py +++ b/test/test_models/test_group_details.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.group_details import GroupDetails # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.group_details import GroupDetails +from flat_api import configuration class TestGroupDetails(unittest.TestCase): """GroupDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroupDetails(self): - """Test GroupDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.group_details.GroupDetails() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_group_type.py b/test/test_models/test_group_type.py similarity index 80% rename from test/test_group_type.py rename to test/test_models/test_group_type.py index eb18109..52e34cf 100644 --- a/test/test_group_type.py +++ b/test/test_models/test_group_type.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.group_type import GroupType # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.group_type import GroupType +from flat_api import configuration class TestGroupType(unittest.TestCase): """GroupType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroupType(self): - """Test GroupType""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.group_type.GroupType() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_license_mode.py b/test/test_models/test_license_mode.py similarity index 80% rename from test/test_license_mode.py rename to test/test_models/test_license_mode.py index c7bfd71..76b0a97 100644 --- a/test/test_license_mode.py +++ b/test/test_models/test_license_mode.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.license_mode import LicenseMode # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.license_mode import LicenseMode +from flat_api import configuration class TestLicenseMode(unittest.TestCase): """LicenseMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLicenseMode(self): - """Test LicenseMode""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.license_mode.LicenseMode() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_license_sources.py b/test/test_models/test_license_sources.py similarity index 79% rename from test/test_license_sources.py rename to test/test_models/test_license_sources.py index 5e9aa62..ad38fc6 100644 --- a/test/test_license_sources.py +++ b/test/test_models/test_license_sources.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.license_sources import LicenseSources # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.license_sources import LicenseSources +from flat_api import configuration class TestLicenseSources(unittest.TestCase): """LicenseSources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLicenseSources(self): - """Test LicenseSources""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.license_sources.LicenseSources() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_lms_name.py b/test/test_models/test_lms_name.py similarity index 81% rename from test/test_lms_name.py rename to test/test_models/test_lms_name.py index 87a62ad..5efca34 100644 --- a/test/test_lms_name.py +++ b/test/test_models/test_lms_name.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.lms_name import LmsName # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.lms_name import LmsName +from flat_api import configuration class TestLmsName(unittest.TestCase): """LmsName unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLmsName(self): - """Test LmsName""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.lms_name.LmsName() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_lti_credentials.py b/test/test_models/test_lti_credentials.py similarity index 79% rename from test/test_lti_credentials.py rename to test/test_models/test_lti_credentials.py index b9b4ceb..780d4a9 100644 --- a/test/test_lti_credentials.py +++ b/test/test_models/test_lti_credentials.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.lti_credentials import LtiCredentials # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.lti_credentials import LtiCredentials +from flat_api import configuration class TestLtiCredentials(unittest.TestCase): """LtiCredentials unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLtiCredentials(self): - """Test LtiCredentials""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.lti_credentials.LtiCredentials() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_lti_credentials_creation.py b/test/test_models/test_lti_credentials_creation.py similarity index 78% rename from test/test_lti_credentials_creation.py rename to test/test_models/test_lti_credentials_creation.py index 5431e9a..37d5fe6 100644 --- a/test/test_lti_credentials_creation.py +++ b/test/test_models/test_lti_credentials_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.lti_credentials_creation import LtiCredentialsCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from flat_api import configuration class TestLtiCredentialsCreation(unittest.TestCase): """LtiCredentialsCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLtiCredentialsCreation(self): - """Test LtiCredentialsCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.lti_credentials_creation.LtiCredentialsCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_media_attachment.py b/test/test_models/test_media_attachment.py similarity index 79% rename from test/test_media_attachment.py rename to test/test_models/test_media_attachment.py index bd7cc5e..8b1ab1c 100644 --- a/test/test_media_attachment.py +++ b/test/test_models/test_media_attachment.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.media_attachment import MediaAttachment # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.media_attachment import MediaAttachment +from flat_api import configuration class TestMediaAttachment(unittest.TestCase): """MediaAttachment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMediaAttachment(self): - """Test MediaAttachment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.media_attachment.MediaAttachment() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_media_score_sharing_mode.py b/test/test_models/test_media_score_sharing_mode.py similarity index 78% rename from test/test_media_score_sharing_mode.py rename to test/test_models/test_media_score_sharing_mode.py index 4bb5efc..15a98ee 100644 --- a/test/test_media_score_sharing_mode.py +++ b/test/test_models/test_media_score_sharing_mode.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode +from flat_api import configuration class TestMediaScoreSharingMode(unittest.TestCase): """MediaScoreSharingMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMediaScoreSharingMode(self): - """Test MediaScoreSharingMode""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.media_score_sharing_mode.MediaScoreSharingMode() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_microsoft_graph_assignment.py b/test/test_models/test_microsoft_graph_assignment.py similarity index 77% rename from test/test_microsoft_graph_assignment.py rename to test/test_models/test_microsoft_graph_assignment.py index adc78d3..7e710fc 100644 --- a/test/test_microsoft_graph_assignment.py +++ b/test/test_models/test_microsoft_graph_assignment.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api import configuration class TestMicrosoftGraphAssignment(unittest.TestCase): """MicrosoftGraphAssignment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMicrosoftGraphAssignment(self): - """Test MicrosoftGraphAssignment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.microsoft_graph_assignment.MicrosoftGraphAssignment() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_microsoft_graph_submission.py b/test/test_models/test_microsoft_graph_submission.py similarity index 77% rename from test/test_microsoft_graph_submission.py rename to test/test_models/test_microsoft_graph_submission.py index f868a88..8267eb9 100644 --- a/test/test_microsoft_graph_submission.py +++ b/test/test_models/test_microsoft_graph_submission.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api import configuration class TestMicrosoftGraphSubmission(unittest.TestCase): """MicrosoftGraphSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMicrosoftGraphSubmission(self): - """Test MicrosoftGraphSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.microsoft_graph_submission.MicrosoftGraphSubmission() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_organization_invitation.py b/test/test_models/test_organization_invitation.py similarity index 78% rename from test/test_organization_invitation.py rename to test/test_models/test_organization_invitation.py index 694efc0..6b84b13 100644 --- a/test/test_organization_invitation.py +++ b/test/test_models/test_organization_invitation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.organization_invitation import OrganizationInvitation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.organization_invitation import OrganizationInvitation +from flat_api import configuration class TestOrganizationInvitation(unittest.TestCase): """OrganizationInvitation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationInvitation(self): - """Test OrganizationInvitation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_invitation.OrganizationInvitation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_organization_invitation_creation.py b/test/test_models/test_organization_invitation_creation.py similarity index 77% rename from test/test_organization_invitation_creation.py rename to test/test_models/test_organization_invitation_creation.py index c37e7ba..28c34c7 100644 --- a/test/test_organization_invitation_creation.py +++ b/test/test_models/test_organization_invitation_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api import configuration class TestOrganizationInvitationCreation(unittest.TestCase): """OrganizationInvitationCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationInvitationCreation(self): - """Test OrganizationInvitationCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_invitation_creation.OrganizationInvitationCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_organization_roles.py b/test/test_models/test_organization_roles.py similarity index 79% rename from test/test_organization_roles.py rename to test/test_models/test_organization_roles.py index a37b966..afd476d 100644 --- a/test/test_organization_roles.py +++ b/test/test_models/test_organization_roles.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.organization_roles import OrganizationRoles # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.organization_roles import OrganizationRoles +from flat_api import configuration class TestOrganizationRoles(unittest.TestCase): """OrganizationRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationRoles(self): - """Test OrganizationRoles""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_roles.OrganizationRoles() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_organization_user_access_token_creation.py b/test/test_models/test_organization_user_access_token_creation.py similarity index 76% rename from test/test_organization_user_access_token_creation.py rename to test/test_models/test_organization_user_access_token_creation.py index d8b6878..cb27c7a 100644 --- a/test/test_organization_user_access_token_creation.py +++ b/test/test_models/test_organization_user_access_token_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api import configuration class TestOrganizationUserAccessTokenCreation(unittest.TestCase): """OrganizationUserAccessTokenCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationUserAccessTokenCreation(self): - """Test OrganizationUserAccessTokenCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_user_access_token_creation.OrganizationUserAccessTokenCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_resource_collaborator.py b/test/test_models/test_resource_collaborator.py similarity index 78% rename from test/test_resource_collaborator.py rename to test/test_models/test_resource_collaborator.py index e55c781..fa35dbd 100644 --- a/test/test_resource_collaborator.py +++ b/test/test_models/test_resource_collaborator.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.resource_collaborator import ResourceCollaborator # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api import configuration class TestResourceCollaborator(unittest.TestCase): """ResourceCollaborator unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResourceCollaborator(self): - """Test ResourceCollaborator""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.resource_collaborator.ResourceCollaborator() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_resource_collaborator_creation.py b/test/test_models/test_resource_collaborator_creation.py similarity index 77% rename from test/test_resource_collaborator_creation.py rename to test/test_models/test_resource_collaborator_creation.py index 6c8fc98..916b80b 100644 --- a/test/test_resource_collaborator_creation.py +++ b/test/test_models/test_resource_collaborator_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api import configuration class TestResourceCollaboratorCreation(unittest.TestCase): """ResourceCollaboratorCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResourceCollaboratorCreation(self): - """Test ResourceCollaboratorCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.resource_collaborator_creation.ResourceCollaboratorCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_resource_rights.py b/test/test_models/test_resource_rights.py similarity index 79% rename from test/test_resource_rights.py rename to test/test_models/test_resource_rights.py index 2ec631a..f366596 100644 --- a/test/test_resource_rights.py +++ b/test/test_models/test_resource_rights.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.resource_rights import ResourceRights # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.resource_rights import ResourceRights +from flat_api import configuration class TestResourceRights(unittest.TestCase): """ResourceRights unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResourceRights(self): - """Test ResourceRights""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.resource_rights.ResourceRights() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_comment.py b/test/test_models/test_score_comment.py similarity index 80% rename from test/test_score_comment.py rename to test/test_models/test_score_comment.py index c959b1f..fc89095 100644 --- a/test/test_score_comment.py +++ b/test/test_models/test_score_comment.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_comment import ScoreComment # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_comment import ScoreComment +from flat_api import configuration class TestScoreComment(unittest.TestCase): """ScoreComment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreComment(self): - """Test ScoreComment""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comment.ScoreComment() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_comment_context.py b/test/test_models/test_score_comment_context.py similarity index 78% rename from test/test_score_comment_context.py rename to test/test_models/test_score_comment_context.py index f8367ac..405918a 100644 --- a/test/test_score_comment_context.py +++ b/test/test_models/test_score_comment_context.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_comment_context import ScoreCommentContext # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_comment_context import ScoreCommentContext +from flat_api import configuration class TestScoreCommentContext(unittest.TestCase): """ScoreCommentContext unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCommentContext(self): - """Test ScoreCommentContext""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comment_context.ScoreCommentContext() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_comment_creation.py b/test/test_models/test_score_comment_creation.py similarity index 78% rename from test/test_score_comment_creation.py rename to test/test_models/test_score_comment_creation.py index fa4afa4..445ce63 100644 --- a/test/test_score_comment_creation.py +++ b/test/test_models/test_score_comment_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_comment_creation import ScoreCommentCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api import configuration class TestScoreCommentCreation(unittest.TestCase): """ScoreCommentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCommentCreation(self): - """Test ScoreCommentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comment_creation.ScoreCommentCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_comment_update.py b/test/test_models/test_score_comment_update.py similarity index 78% rename from test/test_score_comment_update.py rename to test/test_models/test_score_comment_update.py index fbf5b2b..8c18a27 100644 --- a/test/test_score_comment_update.py +++ b/test/test_models/test_score_comment_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_comment_update import ScoreCommentUpdate # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_comment_update import ScoreCommentUpdate +from flat_api import configuration class TestScoreCommentUpdate(unittest.TestCase): """ScoreCommentUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCommentUpdate(self): - """Test ScoreCommentUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comment_update.ScoreCommentUpdate() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_comments_counts.py b/test/test_models/test_score_comments_counts.py similarity index 78% rename from test/test_score_comments_counts.py rename to test/test_models/test_score_comments_counts.py index 85e970d..f2be2df 100644 --- a/test/test_score_comments_counts.py +++ b/test/test_models/test_score_comments_counts.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_comments_counts import ScoreCommentsCounts # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_comments_counts import ScoreCommentsCounts +from flat_api import configuration class TestScoreCommentsCounts(unittest.TestCase): """ScoreCommentsCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCommentsCounts(self): - """Test ScoreCommentsCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comments_counts.ScoreCommentsCounts() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_creation.py b/test/test_models/test_score_creation.py similarity index 79% rename from test/test_score_creation.py rename to test/test_models/test_score_creation.py index ac211b0..2cb21c7 100644 --- a/test/test_score_creation.py +++ b/test/test_models/test_score_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_creation import ScoreCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_creation import ScoreCreation +from flat_api import configuration class TestScoreCreation(unittest.TestCase): """ScoreCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreation(self): - """Test ScoreCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation.ScoreCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_creation_type.py b/test/test_models/test_score_creation_type.py similarity index 79% rename from test/test_score_creation_type.py rename to test/test_models/test_score_creation_type.py index 5bbf68e..78530b9 100644 --- a/test/test_score_creation_type.py +++ b/test/test_models/test_score_creation_type.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_creation_type import ScoreCreationType # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api import configuration class TestScoreCreationType(unittest.TestCase): """ScoreCreationType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationType(self): - """Test ScoreCreationType""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation_type.ScoreCreationType() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_details.py b/test/test_models/test_score_details.py similarity index 80% rename from test/test_score_details.py rename to test/test_models/test_score_details.py index ba8f232..e75b842 100644 --- a/test/test_score_details.py +++ b/test/test_models/test_score_details.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_details import ScoreDetails # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_details import ScoreDetails +from flat_api import configuration class TestScoreDetails(unittest.TestCase): """ScoreDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreDetails(self): - """Test ScoreDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_details.ScoreDetails() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_fork.py b/test/test_models/test_score_fork.py similarity index 80% rename from test/test_score_fork.py rename to test/test_models/test_score_fork.py index 267b055..fc0fdd1 100644 --- a/test/test_score_fork.py +++ b/test/test_models/test_score_fork.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_fork import ScoreFork # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_fork import ScoreFork +from flat_api import configuration class TestScoreFork(unittest.TestCase): """ScoreFork unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreFork(self): - """Test ScoreFork""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_fork.ScoreFork() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_license.py b/test/test_models/test_score_license.py similarity index 80% rename from test/test_score_license.py rename to test/test_models/test_score_license.py index dab65ad..a5d8631 100644 --- a/test/test_score_license.py +++ b/test/test_models/test_score_license.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_license import ScoreLicense # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_license import ScoreLicense +from flat_api import configuration class TestScoreLicense(unittest.TestCase): """ScoreLicense unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreLicense(self): - """Test ScoreLicense""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_license.ScoreLicense() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_likes_counts.py b/test/test_models/test_score_likes_counts.py similarity index 79% rename from test/test_score_likes_counts.py rename to test/test_models/test_score_likes_counts.py index ebe4660..4f13c03 100644 --- a/test/test_score_likes_counts.py +++ b/test/test_models/test_score_likes_counts.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_likes_counts import ScoreLikesCounts # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_likes_counts import ScoreLikesCounts +from flat_api import configuration class TestScoreLikesCounts(unittest.TestCase): """ScoreLikesCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreLikesCounts(self): - """Test ScoreLikesCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_likes_counts.ScoreLikesCounts() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_modification.py b/test/test_models/test_score_modification.py similarity index 79% rename from test/test_score_modification.py rename to test/test_models/test_score_modification.py index 933772d..cbb84b0 100644 --- a/test/test_score_modification.py +++ b/test/test_models/test_score_modification.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_modification import ScoreModification # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_modification import ScoreModification +from flat_api import configuration class TestScoreModification(unittest.TestCase): """ScoreModification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreModification(self): - """Test ScoreModification""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_modification.ScoreModification() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_plays_counts.py b/test/test_models/test_score_plays_counts.py similarity index 79% rename from test/test_score_plays_counts.py rename to test/test_models/test_score_plays_counts.py index 408e3d6..0f5631c 100644 --- a/test/test_score_plays_counts.py +++ b/test/test_models/test_score_plays_counts.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_plays_counts import ScorePlaysCounts # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_plays_counts import ScorePlaysCounts +from flat_api import configuration class TestScorePlaysCounts(unittest.TestCase): """ScorePlaysCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScorePlaysCounts(self): - """Test ScorePlaysCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_plays_counts.ScorePlaysCounts() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_privacy.py b/test/test_models/test_score_privacy.py similarity index 80% rename from test/test_score_privacy.py rename to test/test_models/test_score_privacy.py index 8cf3c80..b506edc 100644 --- a/test/test_score_privacy.py +++ b/test/test_models/test_score_privacy.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_privacy import ScorePrivacy # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_privacy import ScorePrivacy +from flat_api import configuration class TestScorePrivacy(unittest.TestCase): """ScorePrivacy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScorePrivacy(self): - """Test ScorePrivacy""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_privacy.ScorePrivacy() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_revision.py b/test/test_models/test_score_revision.py similarity index 79% rename from test/test_score_revision.py rename to test/test_models/test_score_revision.py index 91533bb..cf5c25f 100644 --- a/test/test_score_revision.py +++ b/test/test_models/test_score_revision.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_revision import ScoreRevision # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_revision import ScoreRevision +from flat_api import configuration class TestScoreRevision(unittest.TestCase): """ScoreRevision unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreRevision(self): - """Test ScoreRevision""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_revision.ScoreRevision() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_revision_creation.py b/test/test_models/test_score_revision_creation.py similarity index 78% rename from test/test_score_revision_creation.py rename to test/test_models/test_score_revision_creation.py index d4e3895..6473f6a 100644 --- a/test/test_score_revision_creation.py +++ b/test/test_models/test_score_revision_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_revision_creation import ScoreRevisionCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api import configuration class TestScoreRevisionCreation(unittest.TestCase): """ScoreRevisionCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreRevisionCreation(self): - """Test ScoreRevisionCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_revision_creation.ScoreRevisionCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_revision_statistics.py b/test/test_models/test_score_revision_statistics.py similarity index 78% rename from test/test_score_revision_statistics.py rename to test/test_models/test_score_revision_statistics.py index fc94df0..fe9ceda 100644 --- a/test/test_score_revision_statistics.py +++ b/test/test_models/test_score_revision_statistics.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_revision_statistics import ScoreRevisionStatistics +from flat_api import configuration class TestScoreRevisionStatistics(unittest.TestCase): """ScoreRevisionStatistics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreRevisionStatistics(self): - """Test ScoreRevisionStatistics""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_revision_statistics.ScoreRevisionStatistics() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_source.py b/test/test_models/test_score_source.py similarity index 80% rename from test/test_score_source.py rename to test/test_models/test_score_source.py index 85eae74..b85ae06 100644 --- a/test/test_score_source.py +++ b/test/test_models/test_score_source.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_source import ScoreSource # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_source import ScoreSource +from flat_api import configuration class TestScoreSource(unittest.TestCase): """ScoreSource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreSource(self): - """Test ScoreSource""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_source.ScoreSource() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track.py b/test/test_models/test_score_track.py similarity index 80% rename from test/test_score_track.py rename to test/test_models/test_score_track.py index 83ea68e..f9ca2de 100644 --- a/test/test_score_track.py +++ b/test/test_models/test_score_track.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track import ScoreTrack # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track import ScoreTrack +from flat_api import configuration class TestScoreTrack(unittest.TestCase): """ScoreTrack unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrack(self): - """Test ScoreTrack""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track.ScoreTrack() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track_creation.py b/test/test_models/test_score_track_creation.py similarity index 78% rename from test/test_score_track_creation.py rename to test/test_models/test_score_track_creation.py index 4df5954..74d436e 100644 --- a/test/test_score_track_creation.py +++ b/test/test_models/test_score_track_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track_creation import ScoreTrackCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track_creation import ScoreTrackCreation +from flat_api import configuration class TestScoreTrackCreation(unittest.TestCase): """ScoreTrackCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackCreation(self): - """Test ScoreTrackCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track_creation.ScoreTrackCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track_point.py b/test/test_models/test_score_track_point.py similarity index 79% rename from test/test_score_track_point.py rename to test/test_models/test_score_track_point.py index b34cdc6..07407cb 100644 --- a/test/test_score_track_point.py +++ b/test/test_models/test_score_track_point.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track_point import ScoreTrackPoint # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api import configuration class TestScoreTrackPoint(unittest.TestCase): """ScoreTrackPoint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackPoint(self): - """Test ScoreTrackPoint""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track_point.ScoreTrackPoint() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track_state.py b/test/test_models/test_score_track_state.py similarity index 79% rename from test/test_score_track_state.py rename to test/test_models/test_score_track_state.py index 6937628..00a2626 100644 --- a/test/test_score_track_state.py +++ b/test/test_models/test_score_track_state.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track_state import ScoreTrackState # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track_state import ScoreTrackState +from flat_api import configuration class TestScoreTrackState(unittest.TestCase): """ScoreTrackState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackState(self): - """Test ScoreTrackState""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track_state.ScoreTrackState() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track_type.py b/test/test_models/test_score_track_type.py similarity index 79% rename from test/test_score_track_type.py rename to test/test_models/test_score_track_type.py index d8236a9..99f9431 100644 --- a/test/test_score_track_type.py +++ b/test/test_models/test_score_track_type.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track_type import ScoreTrackType # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track_type import ScoreTrackType +from flat_api import configuration class TestScoreTrackType(unittest.TestCase): """ScoreTrackType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackType(self): - """Test ScoreTrackType""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track_type.ScoreTrackType() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_track_update.py b/test/test_models/test_score_track_update.py similarity index 79% rename from test/test_score_track_update.py rename to test/test_models/test_score_track_update.py index 8447454..7d13c38 100644 --- a/test/test_score_track_update.py +++ b/test/test_models/test_score_track_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_track_update import ScoreTrackUpdate # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_track_update import ScoreTrackUpdate +from flat_api import configuration class TestScoreTrackUpdate(unittest.TestCase): """ScoreTrackUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackUpdate(self): - """Test ScoreTrackUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_track_update.ScoreTrackUpdate() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_score_views_counts.py b/test/test_models/test_score_views_counts.py similarity index 79% rename from test/test_score_views_counts.py rename to test/test_models/test_score_views_counts.py index a9dca32..20b5de4 100644 --- a/test/test_score_views_counts.py +++ b/test/test_models/test_score_views_counts.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.score_views_counts import ScoreViewsCounts # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.score_views_counts import ScoreViewsCounts +from flat_api import configuration class TestScoreViewsCounts(unittest.TestCase): """ScoreViewsCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreViewsCounts(self): - """Test ScoreViewsCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_views_counts.ScoreViewsCounts() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_task.py b/test/test_models/test_task.py similarity index 81% rename from test/test_task.py rename to test/test_models/test_task.py index 62ec6d3..58a78ae 100644 --- a/test/test_task.py +++ b/test/test_models/test_task.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.task import Task # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.task import Task +from flat_api import configuration class TestTask(unittest.TestCase): """Task unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTask(self): - """Test Task""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.task.Task() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_task_export_options.py b/test/test_models/test_task_export_options.py similarity index 79% rename from test/test_task_export_options.py rename to test/test_models/test_task_export_options.py index 8fe388a..8b106f2 100644 --- a/test/test_task_export_options.py +++ b/test/test_models/test_task_export_options.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.task_export_options import TaskExportOptions # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.task_export_options import TaskExportOptions +from flat_api import configuration class TestTaskExportOptions(unittest.TestCase): """TaskExportOptions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTaskExportOptions(self): - """Test TaskExportOptions""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.task_export_options.TaskExportOptions() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_user_admin_update.py b/test/test_models/test_user_admin_update.py similarity index 79% rename from test/test_user_admin_update.py rename to test/test_models/test_user_admin_update.py index bd09aa0..b012b91 100644 --- a/test/test_user_admin_update.py +++ b/test/test_models/test_user_admin_update.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_admin_update import UserAdminUpdate # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_admin_update import UserAdminUpdate +from flat_api import configuration class TestUserAdminUpdate(unittest.TestCase): """UserAdminUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserAdminUpdate(self): - """Test UserAdminUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_admin_update.UserAdminUpdate() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_user_azure_details.py b/test/test_models/test_user_azure_details.py new file mode 100644 index 0000000..fa34557 --- /dev/null +++ b/test/test_models/test_user_azure_details.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.user_azure_details import UserAzureDetails +from flat_api import configuration + + +class TestUserAzureDetails(unittest.TestCase): + """UserAzureDetails unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_user_community_profile_links.py b/test/test_models/test_user_community_profile_links.py new file mode 100644 index 0000000..4b7fa94 --- /dev/null +++ b/test/test_models/test_user_community_profile_links.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks +from flat_api import configuration + + +class TestUserCommunityProfileLinks(unittest.TestCase): + """UserCommunityProfileLinks unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_creation.py b/test/test_models/test_user_creation.py similarity index 80% rename from test/test_user_creation.py rename to test/test_models/test_user_creation.py index c7a92e9..59104f6 100644 --- a/test/test_user_creation.py +++ b/test/test_models/test_user_creation.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_creation import UserCreation # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_creation import UserCreation +from flat_api import configuration class TestUserCreation(unittest.TestCase): """UserCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserCreation(self): - """Test UserCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_creation.UserCreation() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_user_details.py b/test/test_models/test_user_details.py similarity index 80% rename from test/test_user_details.py rename to test/test_models/test_user_details.py index d49124b..3c3b786 100644 --- a/test/test_user_details.py +++ b/test/test_models/test_user_details.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_details import UserDetails # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_details import UserDetails +from flat_api import configuration class TestUserDetails(unittest.TestCase): """UserDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserDetails(self): - """Test UserDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_details.UserDetails() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_user_details_admin.py b/test/test_models/test_user_details_admin.py similarity index 79% rename from test/test_user_details_admin.py rename to test/test_models/test_user_details_admin.py index d593ff4..fb3d560 100644 --- a/test/test_user_details_admin.py +++ b/test/test_models/test_user_details_admin.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_details_admin import UserDetailsAdmin # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api import configuration class TestUserDetailsAdmin(unittest.TestCase): """UserDetailsAdmin unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserDetailsAdmin(self): - """Test UserDetailsAdmin""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_details_admin.UserDetailsAdmin() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_user_public.py b/test/test_models/test_user_public.py similarity index 80% rename from test/test_user_public.py rename to test/test_models/test_user_public.py index 4357edf..1b53b35 100644 --- a/test/test_user_public.py +++ b/test/test_models/test_user_public.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_public import UserPublic # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_public import UserPublic +from flat_api import configuration class TestUserPublic(unittest.TestCase): """UserPublic unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserPublic(self): - """Test UserPublic""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_public.UserPublic() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_user_public_summary.py b/test/test_models/test_user_public_summary.py similarity index 79% rename from test/test_user_public_summary.py rename to test/test_models/test_user_public_summary.py index 0146dea..887a993 100644 --- a/test/test_user_public_summary.py +++ b/test/test_models/test_user_public_summary.py @@ -5,35 +5,21 @@ The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - OpenAPI spec version: 2.17.0 + The version of the OpenAPI document: 2.18.0 Contact: developers@flat.io Generated by: https://openapi-generator.tech """ - -from __future__ import absolute_import - import unittest import flat_api -from flat_api.models.user_public_summary import UserPublicSummary # noqa: E501 -from flat_api.rest import ApiException +from flat_api.model.user_public_summary import UserPublicSummary +from flat_api import configuration class TestUserPublicSummary(unittest.TestCase): """UserPublicSummary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserPublicSummary(self): - """Test UserPublicSummary""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_public_summary.UserPublicSummary() # noqa: E501 - pass + _configuration = configuration.Configuration() if __name__ == '__main__': diff --git a/test/test_models/test_user_signin_link.py b/test/test_models/test_user_signin_link.py new file mode 100644 index 0000000..5397aa0 --- /dev/null +++ b/test/test_models/test_user_signin_link.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.user_signin_link import UserSigninLink +from flat_api import configuration + + +class TestUserSigninLink(unittest.TestCase): + """UserSigninLink unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_user_signin_link_creation.py b/test/test_models/test_user_signin_link_creation.py new file mode 100644 index 0000000..c20d29f --- /dev/null +++ b/test/test_models/test_user_signin_link_creation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + +import unittest + +import flat_api +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +from flat_api import configuration + + +class TestUserSigninLinkCreation(unittest.TestCase): + """UserSigninLinkCreation unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py deleted file mode 100644 index 2fa732f..0000000 --- a/test/test_organization_api.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.organization_api import OrganizationApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestOrganizationApi(unittest.TestCase): - """OrganizationApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.organization_api.OrganizationApi() # noqa: E501 - - def tearDown(self): - pass - - def test_count_orga_users(self): - """Test case for count_orga_users - - Count the organization users using the provided filters # noqa: E501 - """ - pass - - def test_create_lti_credentials(self): - """Test case for create_lti_credentials - - Create a new couple of LTI 1.x credentials # noqa: E501 - """ - pass - - def test_create_organization_invitation(self): - """Test case for create_organization_invitation - - Create a new invitation to join the organization # noqa: E501 - """ - pass - - def test_create_organization_user(self): - """Test case for create_organization_user - - Create a new user account # noqa: E501 - """ - pass - - def test_create_organization_user_access_token(self): - """Test case for create_organization_user_access_token - - Create a delegated API access token for an organization user # noqa: E501 - """ - pass - - def test_create_organization_user_signin_link(self): - """Test case for create_organization_user_signin_link - - Create a sign in link for an organization user # noqa: E501 - """ - pass - - def test_list_lti_credentials(self): - """Test case for list_lti_credentials - - List LTI 1.x credentials # noqa: E501 - """ - pass - - def test_list_organization_invitations(self): - """Test case for list_organization_invitations - - List the organization invitations # noqa: E501 - """ - pass - - def test_list_organization_users(self): - """Test case for list_organization_users - - List the organization users # noqa: E501 - """ - pass - - def test_remove_organization_invitation(self): - """Test case for remove_organization_invitation - - Remove an organization invitation # noqa: E501 - """ - pass - - def test_remove_organization_user(self): - """Test case for remove_organization_user - - Remove an account from Flat # noqa: E501 - """ - pass - - def test_revoke_lti_credentials(self): - """Test case for revoke_lti_credentials - - Revoke LTI 1.x credentials # noqa: E501 - """ - pass - - def test_update_organization_user(self): - """Test case for update_organization_user - - Update account information # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_user_signin_link.py b/test/test_organization_user_signin_link.py deleted file mode 100644 index 2dc77ab..0000000 --- a/test/test_organization_user_signin_link.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.organization_user_signin_link import OrganizationUserSigninLink # noqa: E501 -from flat_api.rest import ApiException - - -class TestOrganizationUserSigninLink(unittest.TestCase): - """OrganizationUserSigninLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationUserSigninLink(self): - """Test OrganizationUserSigninLink""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_user_signin_link.OrganizationUserSigninLink() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_user_signin_link_creation.py b/test/test_organization_user_signin_link_creation.py deleted file mode 100644 index b7696ba..0000000 --- a/test/test_organization_user_signin_link_creation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.organization_user_signin_link_creation import OrganizationUserSigninLinkCreation # noqa: E501 -from flat_api.rest import ApiException - - -class TestOrganizationUserSigninLinkCreation(unittest.TestCase): - """OrganizationUserSigninLinkCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationUserSigninLinkCreation(self): - """Test OrganizationUserSigninLinkCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.organization_user_signin_link_creation.OrganizationUserSigninLinkCreation() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/__init__.py b/test/test_paths/__init__.py new file mode 100644 index 0000000..1309632 --- /dev/null +++ b/test/test_paths/__init__.py @@ -0,0 +1,68 @@ +import json +import typing + +import urllib3 +from urllib3._collections import HTTPHeaderDict + + +class ApiTestMixin: + json_content_type = 'application/json' + user_agent = 'OpenAPI-Generator/1.0.0/python' + + @classmethod + def assert_pool_manager_request_called_with( + cls, + mock_request, + url: str, + method: str = 'POST', + body: typing.Optional[bytes] = None, + content_type: typing.Optional[str] = None, + accept_content_type: typing.Optional[str] = None, + stream: bool = False, + ): + headers = { + 'User-Agent': cls.user_agent + } + if accept_content_type: + headers['Accept'] = accept_content_type + if content_type: + headers['Content-Type'] = content_type + kwargs = dict( + headers=HTTPHeaderDict(headers), + preload_content=not stream, + timeout=None, + ) + if content_type and method != 'GET': + kwargs['body'] = body + mock_request.assert_called_with( + method, + url, + **kwargs + ) + + @staticmethod + def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: + return {'content-type': content_type} + + @classmethod + def response( + cls, + body: typing.Union[str, bytes], + status: int = 200, + content_type: str = json_content_type, + headers: typing.Optional[typing.Dict[str, str]] = None, + preload_content: bool = True + ) -> urllib3.HTTPResponse: + if headers is None: + headers = {} + headers.update(cls.headers_for_content_type(content_type)) + return urllib3.HTTPResponse( + body, + headers=headers, + status=status, + preload_content=preload_content + ) + + @staticmethod + def json_bytes(in_data: typing.Any) -> bytes: + return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/test/test_paths/test_classes/__init__.py b/test/test_paths/test_classes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes/test_get.py b/test/test_paths/test_classes/test_get.py new file mode 100644 index 0000000..b1e317d --- /dev/null +++ b/test/test_paths/test_classes/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClasses(ApiTestMixin, unittest.TestCase): + """ + Classes unit test stubs + List the classes available for the current user # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes/test_post.py b/test/test_paths/test_classes/test_post.py new file mode 100644 index 0000000..b787a65 --- /dev/null +++ b/test/test_paths/test_classes/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClasses(ApiTestMixin, unittest.TestCase): + """ + Classes unit test stubs + Create a new class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class/__init__.py b/test/test_paths/test_classes_class/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class/test_get.py b/test/test_paths/test_classes_class/test_get.py new file mode 100644 index 0000000..37ad65c --- /dev/null +++ b/test/test_paths/test_classes_class/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClass(ApiTestMixin, unittest.TestCase): + """ + ClassesClass unit test stubs + Get the details of a single class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class/test_put.py b/test/test_paths/test_classes_class/test_put.py new file mode 100644 index 0000000..7a15582 --- /dev/null +++ b/test/test_paths/test_classes_class/test_put.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClass(ApiTestMixin, unittest.TestCase): + """ + ClassesClass unit test stubs + Update the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_activate/__init__.py b/test/test_paths/test_classes_class_activate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_activate/test_post.py b/test/test_paths/test_classes_class_activate/test_post.py new file mode 100644 index 0000000..380d148 --- /dev/null +++ b/test/test_paths/test_classes_class_activate/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_activate import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassActivate(ApiTestMixin, unittest.TestCase): + """ + ClassesClassActivate unit test stubs + Activate the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_archive/__init__.py b/test/test_paths/test_classes_class_archive/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_archive/test_delete.py b/test/test_paths/test_classes_class_archive/test_delete.py new file mode 100644 index 0000000..735ac0e --- /dev/null +++ b/test/test_paths/test_classes_class_archive/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_archive import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassArchive(ApiTestMixin, unittest.TestCase): + """ + ClassesClassArchive unit test stubs + Unarchive the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_archive/test_post.py b/test/test_paths/test_classes_class_archive/test_post.py new file mode 100644 index 0000000..1c14c1d --- /dev/null +++ b/test/test_paths/test_classes_class_archive/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_archive import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassArchive(ApiTestMixin, unittest.TestCase): + """ + ClassesClassArchive unit test stubs + Archive the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments/__init__.py b/test/test_paths/test_classes_class_assignments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments/test_get.py b/test/test_paths/test_classes_class_assignments/test_get.py new file mode 100644 index 0000000..b5eb029 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignments(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignments unit test stubs + Assignments listing # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments/test_post.py b/test/test_paths/test_classes_class_assignments/test_post.py new file mode 100644 index 0000000..3c4f97d --- /dev/null +++ b/test/test_paths/test_classes_class_assignments/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignments(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignments unit test stubs + Assignment creation # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py new file mode 100644 index 0000000..9200d7e --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_archive import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentArchive(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentArchive unit test stubs + Unarchive the assignment. # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py new file mode 100644 index 0000000..2ecfb35 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_archive import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentArchive(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentArchive unit test stubs + Archive the assignment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py new file mode 100644 index 0000000..db494be --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_copy import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentCopy(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentCopy unit test stubs + Copy an assignment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py new file mode 100644 index 0000000..1266caa --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissions(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissions unit test stubs + List the students' submissions # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py new file mode 100644 index 0000000..b8f0d88 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissions(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissions unit test stubs + Create or edit a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py new file mode 100644 index 0000000..804b55e --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_csv import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsCsv(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsCsv unit test stubs + CSV Grades exports # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py new file mode 100644 index 0000000..baa454a --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_excel import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsExcel(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsExcel unit test stubs + Excel Grades exports # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py new file mode 100644 index 0000000..81af3c5 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs + Reset a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py new file mode 100644 index 0000000..a26df52 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs + Get a student submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py new file mode 100644 index 0000000..eca6b62 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs + Edit a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py new file mode 100644 index 0000000..9baac86 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionComments(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments unit test stubs + List the feedback comments of a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py new file mode 100644 index 0000000..ed9f858 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionComments(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments unit test stubs + Add a feedback comment to a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py new file mode 100644 index 0000000..215bf64 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment unit test stubs + Delete a feedback comment to a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py new file mode 100644 index 0000000..9f5d910 --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment unit test stubs + Update a feedback comment to a submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py new file mode 100644 index 0000000..39267bd --- /dev/null +++ b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory(ApiTestMixin, unittest.TestCase): + """ + ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory unit test stubs + Get the history of the submission # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_students_user_submissions/__init__.py b/test/test_paths/test_classes_class_students_user_submissions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_students_user_submissions/test_get.py b/test/test_paths/test_classes_class_students_user_submissions/test_get.py new file mode 100644 index 0000000..4772822 --- /dev/null +++ b/test/test_paths/test_classes_class_students_user_submissions/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_students_user_submissions import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassStudentsUserSubmissions(ApiTestMixin, unittest.TestCase): + """ + ClassesClassStudentsUserSubmissions unit test stubs + List the submissions for a student # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_test_student/__init__.py b/test/test_paths/test_classes_class_test_student/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_test_student/test_post.py b/test/test_paths/test_classes_class_test_student/test_post.py new file mode 100644 index 0000000..c5e951e --- /dev/null +++ b/test/test_paths/test_classes_class_test_student/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_test_student import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassTestStudent(ApiTestMixin, unittest.TestCase): + """ + ClassesClassTestStudent unit test stubs + Create a test student account # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_users_user/__init__.py b/test/test_paths/test_classes_class_users_user/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_class_users_user/test_delete.py b/test/test_paths/test_classes_class_users_user/test_delete.py new file mode 100644 index 0000000..7b3bc01 --- /dev/null +++ b/test/test_paths/test_classes_class_users_user/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_users_user import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassUsersUser(ApiTestMixin, unittest.TestCase): + """ + ClassesClassUsersUser unit test stubs + Remove a user from the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_class_users_user/test_put.py b/test/test_paths/test_classes_class_users_user/test_put.py new file mode 100644 index 0000000..e5e351d --- /dev/null +++ b/test/test_paths/test_classes_class_users_user/test_put.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_class_users_user import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesClassUsersUser(ApiTestMixin, unittest.TestCase): + """ + ClassesClassUsersUser unit test stubs + Add a user to the class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_classes_enroll_enrollment_code/__init__.py b/test/test_paths/test_classes_enroll_enrollment_code/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_classes_enroll_enrollment_code/test_post.py b/test/test_paths/test_classes_enroll_enrollment_code/test_post.py new file mode 100644 index 0000000..ed5785a --- /dev/null +++ b/test/test_paths/test_classes_enroll_enrollment_code/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.classes_enroll_enrollment_code import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestClassesEnrollEnrollmentCode(ApiTestMixin, unittest.TestCase): + """ + ClassesEnrollEnrollmentCode unit test stubs + Join a class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections/__init__.py b/test/test_paths/test_collections/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_collections/test_get.py b/test/test_paths/test_collections/test_get.py new file mode 100644 index 0000000..540cb7e --- /dev/null +++ b/test/test_paths/test_collections/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollections(ApiTestMixin, unittest.TestCase): + """ + Collections unit test stubs + List the collections # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections/test_post.py b/test/test_paths/test_collections/test_post.py new file mode 100644 index 0000000..7bf829a --- /dev/null +++ b/test/test_paths/test_collections/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollections(ApiTestMixin, unittest.TestCase): + """ + Collections unit test stubs + Create a new collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection/__init__.py b/test/test_paths/test_collections_collection/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_collections_collection/test_delete.py b/test/test_paths/test_collections_collection/test_delete.py new file mode 100644 index 0000000..61cab77 --- /dev/null +++ b/test/test_paths/test_collections_collection/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollection unit test stubs + Delete the collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection/test_get.py b/test/test_paths/test_collections_collection/test_get.py new file mode 100644 index 0000000..2ef7ed5 --- /dev/null +++ b/test/test_paths/test_collections_collection/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollection unit test stubs + Get collection details # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection/test_put.py b/test/test_paths/test_collections_collection/test_put.py new file mode 100644 index 0000000..78f24db --- /dev/null +++ b/test/test_paths/test_collections_collection/test_put.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollection unit test stubs + Update a collection's metadata # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection_scores/__init__.py b/test/test_paths/test_collections_collection_scores/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_collections_collection_scores/test_get.py b/test/test_paths/test_collections_collection_scores/test_get.py new file mode 100644 index 0000000..eeaeac1 --- /dev/null +++ b/test/test_paths/test_collections_collection_scores/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection_scores import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollectionScores(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollectionScores unit test stubs + List the scores contained in a collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection_scores_score/__init__.py b/test/test_paths/test_collections_collection_scores_score/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_collections_collection_scores_score/test_delete.py b/test/test_paths/test_collections_collection_scores_score/test_delete.py new file mode 100644 index 0000000..5debfce --- /dev/null +++ b/test/test_paths/test_collections_collection_scores_score/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection_scores_score import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollectionScoresScore(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollectionScoresScore unit test stubs + Delete a score from the collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection_scores_score/test_put.py b/test/test_paths/test_collections_collection_scores_score/test_put.py new file mode 100644 index 0000000..e89cdba --- /dev/null +++ b/test/test_paths/test_collections_collection_scores_score/test_put.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection_scores_score import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollectionScoresScore(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollectionScoresScore unit test stubs + Add a score to the collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_collections_collection_untrash/__init__.py b/test/test_paths/test_collections_collection_untrash/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_collections_collection_untrash/test_post.py b/test/test_paths/test_collections_collection_untrash/test_post.py new file mode 100644 index 0000000..77c5e46 --- /dev/null +++ b/test/test_paths/test_collections_collection_untrash/test_post.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.collections_collection_untrash import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestCollectionsCollectionUntrash(ApiTestMixin, unittest.TestCase): + """ + CollectionsCollectionUntrash unit test stubs + Untrash a collection # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources/__init__.py b/test/test_paths/test_edu_resources/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources/test_get.py b/test/test_paths/test_edu_resources/test_get.py new file mode 100644 index 0000000..83d9349 --- /dev/null +++ b/test/test_paths/test_edu_resources/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResources(ApiTestMixin, unittest.TestCase): + """ + EduResources unit test stubs + List education resources in a library or folder # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources/test_post.py b/test/test_paths/test_edu_resources/test_post.py new file mode 100644 index 0000000..0be4cbd --- /dev/null +++ b/test/test_paths/test_edu_resources/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResources(ApiTestMixin, unittest.TestCase): + """ + EduResources unit test stubs + Create a new education resource # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_libraries/__init__.py b/test/test_paths/test_edu_resources_libraries/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_libraries/test_get.py b/test/test_paths/test_edu_resources_libraries/test_get.py new file mode 100644 index 0000000..76d675d --- /dev/null +++ b/test/test_paths/test_edu_resources_libraries/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_libraries import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesLibraries(ApiTestMixin, unittest.TestCase): + """ + EduResourcesLibraries unit test stubs + List the education libraries # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/__init__.py b/test/test_paths/test_edu_resources_resource/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource/test_delete.py b/test/test_paths/test_edu_resources_resource/test_delete.py new file mode 100644 index 0000000..6528af9 --- /dev/null +++ b/test/test_paths/test_edu_resources_resource/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResource unit test stubs + Delete an education resource # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/test_get.py b/test/test_paths/test_edu_resources_resource/test_get.py new file mode 100644 index 0000000..ac7437a --- /dev/null +++ b/test/test_paths/test_edu_resources_resource/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResource unit test stubs + Get an education resource # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/test_put.py b/test/test_paths/test_edu_resources_resource/test_put.py new file mode 100644 index 0000000..fd59f4e --- /dev/null +++ b/test/test_paths/test_edu_resources_resource/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResource unit test stubs + Update an education resource metadata # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_assignment/__init__.py b/test/test_paths/test_edu_resources_resource_assignment/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource_assignment/test_put.py b/test/test_paths/test_edu_resources_resource_assignment/test_put.py new file mode 100644 index 0000000..9b713f1 --- /dev/null +++ b/test/test_paths/test_edu_resources_resource_assignment/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource_assignment import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResourceAssignment(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResourceAssignment unit test stubs + Update an education resource assignment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_copy/__init__.py b/test/test_paths/test_edu_resources_resource_copy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource_copy/test_post.py b/test/test_paths/test_edu_resources_resource_copy/test_post.py new file mode 100644 index 0000000..0f287be --- /dev/null +++ b/test/test_paths/test_edu_resources_resource_copy/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource_copy import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResourceCopy(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResourceCopy unit test stubs + Copy an education resource to a Resource Library # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py b/test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py b/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py new file mode 100644 index 0000000..d692ee1 --- /dev/null +++ b/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource_copy_to_demo_class import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResourceCopyToDemoClass(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResourceCopyToDemoClass unit test stubs + Copy an education assignment to a teacher demo class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_move/__init__.py b/test/test_paths/test_edu_resources_resource_move/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource_move/test_post.py b/test/test_paths/test_edu_resources_resource_move/test_post.py new file mode 100644 index 0000000..b3c0e01 --- /dev/null +++ b/test/test_paths/test_edu_resources_resource_move/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource_move import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResourceMove(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResourceMove unit test stubs + Move an education resource # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_use_in_class/__init__.py b/test/test_paths/test_edu_resources_resource_use_in_class/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py b/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py new file mode 100644 index 0000000..0b160a9 --- /dev/null +++ b/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.edu_resources_resource_use_in_class import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestEduResourcesResourceUseInClass(ApiTestMixin, unittest.TestCase): + """ + EduResourcesResourceUseInClass unit test stubs + Use an education resource in a class # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_groups_group/__init__.py b/test/test_paths/test_groups_group/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_groups_group/test_get.py b/test/test_paths/test_groups_group/test_get.py new file mode 100644 index 0000000..21689db --- /dev/null +++ b/test/test_paths/test_groups_group/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.groups_group import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestGroupsGroup(ApiTestMixin, unittest.TestCase): + """ + GroupsGroup unit test stubs + Get group information # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_groups_group_scores/__init__.py b/test/test_paths/test_groups_group_scores/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_groups_group_scores/test_get.py b/test/test_paths/test_groups_group_scores/test_get.py new file mode 100644 index 0000000..351fda0 --- /dev/null +++ b/test/test_paths/test_groups_group_scores/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.groups_group_scores import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestGroupsGroupScores(ApiTestMixin, unittest.TestCase): + """ + GroupsGroupScores unit test stubs + List group's scores # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_groups_group_users/__init__.py b/test/test_paths/test_groups_group_users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_groups_group_users/test_get.py b/test/test_paths/test_groups_group_users/test_get.py new file mode 100644 index 0000000..8e2faf9 --- /dev/null +++ b/test/test_paths/test_groups_group_users/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.groups_group_users import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestGroupsGroupUsers(ApiTestMixin, unittest.TestCase): + """ + GroupsGroupUsers unit test stubs + List group's users # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_me/__init__.py b/test/test_paths/test_me/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_me/test_get.py b/test/test_paths/test_me/test_get.py new file mode 100644 index 0000000..9548e8a --- /dev/null +++ b/test/test_paths/test_me/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.me import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestMe(ApiTestMixin, unittest.TestCase): + """ + Me unit test stubs + Get current user account # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_invitations/__init__.py b/test/test_paths/test_organizations_invitations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_invitations/test_get.py b/test/test_paths/test_organizations_invitations/test_get.py new file mode 100644 index 0000000..64e06b9 --- /dev/null +++ b/test/test_paths/test_organizations_invitations/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_invitations import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsInvitations(ApiTestMixin, unittest.TestCase): + """ + OrganizationsInvitations unit test stubs + List the organization invitations # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_invitations/test_post.py b/test/test_paths/test_organizations_invitations/test_post.py new file mode 100644 index 0000000..7c91a11 --- /dev/null +++ b/test/test_paths/test_organizations_invitations/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_invitations import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsInvitations(ApiTestMixin, unittest.TestCase): + """ + OrganizationsInvitations unit test stubs + Create a new invitation to join the organization # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_invitations_invitation/__init__.py b/test/test_paths/test_organizations_invitations_invitation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_invitations_invitation/test_delete.py b/test/test_paths/test_organizations_invitations_invitation/test_delete.py new file mode 100644 index 0000000..cfa005d --- /dev/null +++ b/test/test_paths/test_organizations_invitations_invitation/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_invitations_invitation import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsInvitationsInvitation(ApiTestMixin, unittest.TestCase): + """ + OrganizationsInvitationsInvitation unit test stubs + Remove an organization invitation # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials/__init__.py b/test/test_paths/test_organizations_lti_credentials/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_lti_credentials/test_get.py b/test/test_paths/test_organizations_lti_credentials/test_get.py new file mode 100644 index 0000000..edd0514 --- /dev/null +++ b/test/test_paths/test_organizations_lti_credentials/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_lti_credentials import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsLtiCredentials(ApiTestMixin, unittest.TestCase): + """ + OrganizationsLtiCredentials unit test stubs + List LTI 1.x credentials # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials/test_post.py b/test/test_paths/test_organizations_lti_credentials/test_post.py new file mode 100644 index 0000000..640374d --- /dev/null +++ b/test/test_paths/test_organizations_lti_credentials/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_lti_credentials import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsLtiCredentials(ApiTestMixin, unittest.TestCase): + """ + OrganizationsLtiCredentials unit test stubs + Create a new couple of LTI 1.x credentials # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials_credentials/__init__.py b/test/test_paths/test_organizations_lti_credentials_credentials/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py b/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py new file mode 100644 index 0000000..9ba2831 --- /dev/null +++ b/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_lti_credentials_credentials import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsLtiCredentialsCredentials(ApiTestMixin, unittest.TestCase): + """ + OrganizationsLtiCredentialsCredentials unit test stubs + Revoke LTI 1.x credentials # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users/__init__.py b/test/test_paths/test_organizations_users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_users/test_get.py b/test/test_paths/test_organizations_users/test_get.py new file mode 100644 index 0000000..6dad7cb --- /dev/null +++ b/test/test_paths/test_organizations_users/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsers(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsers unit test stubs + List the organization users # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users/test_post.py b/test/test_paths/test_organizations_users/test_post.py new file mode 100644 index 0000000..69d069c --- /dev/null +++ b/test/test_paths/test_organizations_users/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsers(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsers unit test stubs + Create a new user account # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users_count/__init__.py b/test/test_paths/test_organizations_users_count/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_users_count/test_get.py b/test/test_paths/test_organizations_users_count/test_get.py new file mode 100644 index 0000000..58bba1c --- /dev/null +++ b/test/test_paths/test_organizations_users_count/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users_count import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsersCount(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsersCount unit test stubs + Count the organization users using the provided filters # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users_user/__init__.py b/test/test_paths/test_organizations_users_user/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_users_user/test_delete.py b/test/test_paths/test_organizations_users_user/test_delete.py new file mode 100644 index 0000000..891ca54 --- /dev/null +++ b/test/test_paths/test_organizations_users_user/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users_user import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsersUser(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsersUser unit test stubs + Remove an account from Flat # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users_user/test_put.py b/test/test_paths/test_organizations_users_user/test_put.py new file mode 100644 index 0000000..2d987cd --- /dev/null +++ b/test/test_paths/test_organizations_users_user/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users_user import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsersUser(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsersUser unit test stubs + Update account information # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users_user_access_token/__init__.py b/test/test_paths/test_organizations_users_user_access_token/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_users_user_access_token/test_post.py b/test/test_paths/test_organizations_users_user_access_token/test_post.py new file mode 100644 index 0000000..ce66a6a --- /dev/null +++ b/test/test_paths/test_organizations_users_user_access_token/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users_user_access_token import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsersUserAccessToken(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsersUserAccessToken unit test stubs + Create a delegated API access token for an organization user # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_organizations_users_user_signin_link/__init__.py b/test/test_paths/test_organizations_users_user_signin_link/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_organizations_users_user_signin_link/test_post.py b/test/test_paths/test_organizations_users_user_signin_link/test_post.py new file mode 100644 index 0000000..7b631f7 --- /dev/null +++ b/test/test_paths/test_organizations_users_user_signin_link/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.organizations_users_user_signin_link import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOrganizationsUsersUserSigninLink(ApiTestMixin, unittest.TestCase): + """ + OrganizationsUsersUserSigninLink unit test stubs + Create a sign in link for an organization user # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores/__init__.py b/test/test_paths/test_scores/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores/test_post.py b/test/test_paths/test_scores/test_post.py new file mode 100644 index 0000000..e47f111 --- /dev/null +++ b/test/test_paths/test_scores/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScores(ApiTestMixin, unittest.TestCase): + """ + Scores unit test stubs + Create a new score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score/__init__.py b/test/test_paths/test_scores_score/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score/test_delete.py b/test/test_paths/test_scores_score/test_delete.py new file mode 100644 index 0000000..0288e68 --- /dev/null +++ b/test/test_paths/test_scores_score/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScore(ApiTestMixin, unittest.TestCase): + """ + ScoresScore unit test stubs + Delete a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score/test_get.py b/test/test_paths/test_scores_score/test_get.py new file mode 100644 index 0000000..7073fdc --- /dev/null +++ b/test/test_paths/test_scores_score/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScore(ApiTestMixin, unittest.TestCase): + """ + ScoresScore unit test stubs + Get a score's metadata # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score/test_put.py b/test/test_paths/test_scores_score/test_put.py new file mode 100644 index 0000000..8894fba --- /dev/null +++ b/test/test_paths/test_scores_score/test_put.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScore(ApiTestMixin, unittest.TestCase): + """ + ScoresScore unit test stubs + Edit a score's metadata # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators/__init__.py b/test/test_paths/test_scores_score_collaborators/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_collaborators/test_get.py b/test/test_paths/test_scores_score_collaborators/test_get.py new file mode 100644 index 0000000..5cfc7e1 --- /dev/null +++ b/test/test_paths/test_scores_score_collaborators/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_collaborators import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCollaborators(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCollaborators unit test stubs + List the collaborators # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators/test_post.py b/test/test_paths/test_scores_score_collaborators/test_post.py new file mode 100644 index 0000000..1f8937e --- /dev/null +++ b/test/test_paths/test_scores_score_collaborators/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_collaborators import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCollaborators(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCollaborators unit test stubs + Add a new collaborator # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/__init__.py b/test/test_paths/test_scores_score_collaborators_collaborator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py b/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py new file mode 100644 index 0000000..40dab5a --- /dev/null +++ b/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_collaborators_collaborator import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCollaboratorsCollaborator(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCollaboratorsCollaborator unit test stubs + Delete a collaborator # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py b/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py new file mode 100644 index 0000000..c292928 --- /dev/null +++ b/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_collaborators_collaborator import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCollaboratorsCollaborator(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCollaboratorsCollaborator unit test stubs + Get a collaborator # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments/__init__.py b/test/test_paths/test_scores_score_comments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_comments/test_get.py b/test/test_paths/test_scores_score_comments/test_get.py new file mode 100644 index 0000000..abc3133 --- /dev/null +++ b/test/test_paths/test_scores_score_comments/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreComments(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreComments unit test stubs + List comments # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments/test_post.py b/test/test_paths/test_scores_score_comments/test_post.py new file mode 100644 index 0000000..c63ae0f --- /dev/null +++ b/test/test_paths/test_scores_score_comments/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreComments(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreComments unit test stubs + Post a new comment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment/__init__.py b/test/test_paths/test_scores_score_comments_comment/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_comments_comment/test_delete.py b/test/test_paths/test_scores_score_comments_comment/test_delete.py new file mode 100644 index 0000000..eeb3b42 --- /dev/null +++ b/test/test_paths/test_scores_score_comments_comment/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments_comment import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCommentsComment(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCommentsComment unit test stubs + Delete a comment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment/test_put.py b/test/test_paths/test_scores_score_comments_comment/test_put.py new file mode 100644 index 0000000..d89258f --- /dev/null +++ b/test/test_paths/test_scores_score_comments_comment/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments_comment import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCommentsComment(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCommentsComment unit test stubs + Update an existing comment # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/__init__.py b/test/test_paths/test_scores_score_comments_comment_resolved/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py b/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py new file mode 100644 index 0000000..dcb124b --- /dev/null +++ b/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments_comment_resolved import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCommentsCommentResolved(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCommentsCommentResolved unit test stubs + Mark the comment as unresolved # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py b/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py new file mode 100644 index 0000000..e6b2a1b --- /dev/null +++ b/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_comments_comment_resolved import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreCommentsCommentResolved(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreCommentsCommentResolved unit test stubs + Mark the comment as resolved # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_fork/__init__.py b/test/test_paths/test_scores_score_fork/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_fork/test_post.py b/test/test_paths/test_scores_score_fork/test_post.py new file mode 100644 index 0000000..578caef --- /dev/null +++ b/test/test_paths/test_scores_score_fork/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_fork import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreFork(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreFork unit test stubs + Fork a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_revisions/__init__.py b/test/test_paths/test_scores_score_revisions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_revisions/test_get.py b/test/test_paths/test_scores_score_revisions/test_get.py new file mode 100644 index 0000000..c538dca --- /dev/null +++ b/test/test_paths/test_scores_score_revisions/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_revisions import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreRevisions(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreRevisions unit test stubs + List the revisions # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_revisions/test_post.py b/test/test_paths/test_scores_score_revisions/test_post.py new file mode 100644 index 0000000..666ad5e --- /dev/null +++ b/test/test_paths/test_scores_score_revisions/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_revisions import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreRevisions(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreRevisions unit test stubs + Create a new revision # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision/__init__.py b/test/test_paths/test_scores_score_revisions_revision/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_revisions_revision/test_get.py b/test/test_paths/test_scores_score_revisions_revision/test_get.py new file mode 100644 index 0000000..55ef03f --- /dev/null +++ b/test/test_paths/test_scores_score_revisions_revision/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_revisions_revision import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreRevisionsRevision(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreRevisionsRevision unit test stubs + Get a score revision # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision_format/__init__.py b/test/test_paths/test_scores_score_revisions_revision_format/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_revisions_revision_format/test_get.py b/test/test_paths/test_scores_score_revisions_revision_format/test_get.py new file mode 100644 index 0000000..dda41d5 --- /dev/null +++ b/test/test_paths/test_scores_score_revisions_revision_format/test_get.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_revisions_revision_format import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreRevisionsRevisionFormat(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreRevisionsRevisionFormat unit test stubs + Get a score revision data # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + + + + + + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py b/test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py b/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py new file mode 100644 index 0000000..9974936 --- /dev/null +++ b/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_revisions_revision_format_task import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreRevisionsRevisionFormatTask(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreRevisionsRevisionFormatTask unit test stubs + Create a new score export task # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_submissions/__init__.py b/test/test_paths/test_scores_score_submissions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_submissions/test_get.py b/test/test_paths/test_scores_score_submissions/test_get.py new file mode 100644 index 0000000..6b07ff3 --- /dev/null +++ b/test/test_paths/test_scores_score_submissions/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_submissions import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreSubmissions(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreSubmissions unit test stubs + List submissions related to the score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_tracks/__init__.py b/test/test_paths/test_scores_score_tracks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_tracks/test_get.py b/test/test_paths/test_scores_score_tracks/test_get.py new file mode 100644 index 0000000..0e7ef65 --- /dev/null +++ b/test/test_paths/test_scores_score_tracks/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_tracks import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreTracks(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreTracks unit test stubs + List the audio or video tracks linked to a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_tracks/test_post.py b/test/test_paths/test_scores_score_tracks/test_post.py new file mode 100644 index 0000000..5e1449c --- /dev/null +++ b/test/test_paths/test_scores_score_tracks/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_tracks import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreTracks(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreTracks unit test stubs + Add a new video or audio track to the score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/__init__.py b/test/test_paths/test_scores_score_tracks_track/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_tracks_track/test_delete.py b/test/test_paths/test_scores_score_tracks_track/test_delete.py new file mode 100644 index 0000000..9559c8e --- /dev/null +++ b/test/test_paths/test_scores_score_tracks_track/test_delete.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_tracks_track import delete # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreTracksTrack unit test stubs + Remove an audio or video track linked to the score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/test_get.py b/test/test_paths/test_scores_score_tracks_track/test_get.py new file mode 100644 index 0000000..add853b --- /dev/null +++ b/test/test_paths/test_scores_score_tracks_track/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_tracks_track import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreTracksTrack unit test stubs + Retrieve the details of an audio or video track linked to a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/test_put.py b/test/test_paths/test_scores_score_tracks_track/test_put.py new file mode 100644 index 0000000..17e3d94 --- /dev/null +++ b/test/test_paths/test_scores_score_tracks_track/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_tracks_track import put # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreTracksTrack unit test stubs + Update an audio or video track linked to a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_scores_score_untrash/__init__.py b/test/test_paths/test_scores_score_untrash/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_scores_score_untrash/test_post.py b/test/test_paths/test_scores_score_untrash/test_post.py new file mode 100644 index 0000000..8308fe2 --- /dev/null +++ b/test/test_paths/test_scores_score_untrash/test_post.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.scores_score_untrash import post # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestScoresScoreUntrash(ApiTestMixin, unittest.TestCase): + """ + ScoresScoreUntrash unit test stubs + Untrash a score # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 204 + response_body = '' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_tasks_task/__init__.py b/test/test_paths/test_tasks_task/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_tasks_task/test_get.py b/test/test_paths/test_tasks_task/test_get.py new file mode 100644 index 0000000..9c0686e --- /dev/null +++ b/test/test_paths/test_tasks_task/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.tasks_task import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestTasksTask(ApiTestMixin, unittest.TestCase): + """ + TasksTask unit test stubs + Get a task details # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_users_user/__init__.py b/test/test_paths/test_users_user/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_users_user/test_get.py b/test/test_paths/test_users_user/test_get.py new file mode 100644 index 0000000..53e2960 --- /dev/null +++ b/test/test_paths/test_users_user/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.users_user import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestUsersUser(ApiTestMixin, unittest.TestCase): + """ + UsersUser unit test stubs + Get a public user profile # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_users_user_likes/__init__.py b/test/test_paths/test_users_user_likes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_users_user_likes/test_get.py b/test/test_paths/test_users_user_likes/test_get.py new file mode 100644 index 0000000..a89a7ae --- /dev/null +++ b/test/test_paths/test_users_user_likes/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.users_user_likes import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestUsersUserLikes(ApiTestMixin, unittest.TestCase): + """ + UsersUserLikes unit test stubs + List liked scores # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_users_user_scores/__init__.py b/test/test_paths/test_users_user_scores/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_users_user_scores/test_get.py b/test/test_paths/test_users_user_scores/test_get.py new file mode 100644 index 0000000..8ae4107 --- /dev/null +++ b/test/test_paths/test_users_user_scores/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import flat_api +from flat_api.paths.users_user_scores import get # noqa: E501 +from flat_api import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestUsersUserScores(ApiTestMixin, unittest.TestCase): + """ + UsersUserScores unit test stubs + List user's scores # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_api.py b/test/test_score_api.py deleted file mode 100644 index 79d24a0..0000000 --- a/test/test_score_api.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.score_api import ScoreApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreApi(unittest.TestCase): - """ScoreApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.score_api.ScoreApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_score_collaborator(self): - """Test case for add_score_collaborator - - Add a new collaborator # noqa: E501 - """ - pass - - def test_add_score_track(self): - """Test case for add_score_track - - Add a new video or audio track to the score # noqa: E501 - """ - pass - - def test_create_export_task(self): - """Test case for create_export_task - - Create a new score export task # noqa: E501 - """ - pass - - def test_create_score(self): - """Test case for create_score - - Create a new score # noqa: E501 - """ - pass - - def test_create_score_revision(self): - """Test case for create_score_revision - - Create a new revision # noqa: E501 - """ - pass - - def test_delete_score(self): - """Test case for delete_score - - Delete a score # noqa: E501 - """ - pass - - def test_delete_score_comment(self): - """Test case for delete_score_comment - - Delete a comment # noqa: E501 - """ - pass - - def test_delete_score_track(self): - """Test case for delete_score_track - - Remove an audio or video track linked to the score # noqa: E501 - """ - pass - - def test_edit_score(self): - """Test case for edit_score - - Edit a score's metadata # noqa: E501 - """ - pass - - def test_fork_score(self): - """Test case for fork_score - - Fork a score # noqa: E501 - """ - pass - - def test_ger_user_likes(self): - """Test case for ger_user_likes - - List liked scores # noqa: E501 - """ - pass - - def test_get_group_scores(self): - """Test case for get_group_scores - - List group's scores # noqa: E501 - """ - pass - - def test_get_score(self): - """Test case for get_score - - Get a score's metadata # noqa: E501 - """ - pass - - def test_get_score_collaborator(self): - """Test case for get_score_collaborator - - Get a collaborator # noqa: E501 - """ - pass - - def test_get_score_collaborators(self): - """Test case for get_score_collaborators - - List the collaborators # noqa: E501 - """ - pass - - def test_get_score_comments(self): - """Test case for get_score_comments - - List comments # noqa: E501 - """ - pass - - def test_get_score_revision(self): - """Test case for get_score_revision - - Get a score revision # noqa: E501 - """ - pass - - def test_get_score_revision_data(self): - """Test case for get_score_revision_data - - Get a score revision data # noqa: E501 - """ - pass - - def test_get_score_revisions(self): - """Test case for get_score_revisions - - List the revisions # noqa: E501 - """ - pass - - def test_get_score_submissions(self): - """Test case for get_score_submissions - - List submissions related to the score # noqa: E501 - """ - pass - - def test_get_score_track(self): - """Test case for get_score_track - - Retrieve the details of an audio or video track linked to a score # noqa: E501 - """ - pass - - def test_get_user_scores(self): - """Test case for get_user_scores - - List user's scores # noqa: E501 - """ - pass - - def test_list_score_tracks(self): - """Test case for list_score_tracks - - List the audio or video tracks linked to a score # noqa: E501 - """ - pass - - def test_mark_score_comment_resolved(self): - """Test case for mark_score_comment_resolved - - Mark the comment as resolved # noqa: E501 - """ - pass - - def test_mark_score_comment_unresolved(self): - """Test case for mark_score_comment_unresolved - - Mark the comment as unresolved # noqa: E501 - """ - pass - - def test_post_score_comment(self): - """Test case for post_score_comment - - Post a new comment # noqa: E501 - """ - pass - - def test_remove_score_collaborator(self): - """Test case for remove_score_collaborator - - Delete a collaborator # noqa: E501 - """ - pass - - def test_untrash_score(self): - """Test case for untrash_score - - Untrash a score # noqa: E501 - """ - pass - - def test_update_score_comment(self): - """Test case for update_score_comment - - Update an existing comment # noqa: E501 - """ - pass - - def test_update_score_track(self): - """Test case for update_score_track - - Update an audio or video track linked to a score # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment_moderation.py b/test/test_score_comment_moderation.py deleted file mode 100644 index 183f425..0000000 --- a/test/test_score_comment_moderation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_comment_moderation import ScoreCommentModeration # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreCommentModeration(unittest.TestCase): - """ScoreCommentModeration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCommentModeration(self): - """Test ScoreCommentModeration""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_comment_moderation.ScoreCommentModeration() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data.py b/test/test_score_creation_builder_data.py deleted file mode 100644 index 24b6f54..0000000 --- a/test/test_score_creation_builder_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreCreationBuilderData(unittest.TestCase): - """ScoreCreationBuilderData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationBuilderData(self): - """Test ScoreCreationBuilderData""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation_builder_data.ScoreCreationBuilderData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_layout_data.py b/test/test_score_creation_builder_data_layout_data.py deleted file mode 100644 index 622ce23..0000000 --- a/test/test_score_creation_builder_data_layout_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreCreationBuilderDataLayoutData(unittest.TestCase): - """ScoreCreationBuilderDataLayoutData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationBuilderDataLayoutData(self): - """Test ScoreCreationBuilderDataLayoutData""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation_builder_data_layout_data.ScoreCreationBuilderDataLayoutData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_score_data.py b/test/test_score_creation_builder_data_score_data.py deleted file mode 100644 index a1590f6..0000000 --- a/test/test_score_creation_builder_data_score_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreCreationBuilderDataScoreData(unittest.TestCase): - """ScoreCreationBuilderDataScoreData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationBuilderDataScoreData(self): - """Test ScoreCreationBuilderDataScoreData""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation_builder_data_score_data.ScoreCreationBuilderDataScoreData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_score_data_instruments.py b/test/test_score_creation_builder_data_score_data_instruments.py deleted file mode 100644 index 0aa6d63..0000000 --- a/test/test_score_creation_builder_data_score_data_instruments.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.score_creation_builder_data_score_data_instruments import ScoreCreationBuilderDataScoreDataInstruments # noqa: E501 -from flat_api.rest import ApiException - - -class TestScoreCreationBuilderDataScoreDataInstruments(unittest.TestCase): - """ScoreCreationBuilderDataScoreDataInstruments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationBuilderDataScoreDataInstruments(self): - """Test ScoreCreationBuilderDataScoreDataInstruments""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.score_creation_builder_data_score_data_instruments.ScoreCreationBuilderDataScoreDataInstruments() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py deleted file mode 100644 index 892bb0b..0000000 --- a/test/test_user_api.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.api.user_api import UserApi # noqa: E501 -from flat_api.rest import ApiException - - -class TestUserApi(unittest.TestCase): - """UserApi unit test stubs""" - - def setUp(self): - self.api = flat_api.api.user_api.UserApi() # noqa: E501 - - def tearDown(self): - pass - - def test_ger_user_likes(self): - """Test case for ger_user_likes - - List liked scores # noqa: E501 - """ - pass - - def test_get_user(self): - """Test case for get_user - - Get a public user profile # noqa: E501 - """ - pass - - def test_get_user_scores(self): - """Test case for get_user_scores - - List user's scores # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py deleted file mode 100644 index 5c3cdaa..0000000 --- a/test/test_user_details_admin_license.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - OpenAPI spec version: 2.17.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import flat_api -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense # noqa: E501 -from flat_api.rest import ApiException - - -class TestUserDetailsAdminLicense(unittest.TestCase): - """UserDetailsAdminLicense unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserDetailsAdminLicense(self): - """Test UserDetailsAdminLicense""" - # FIXME: construct object with mandatory attributes with example values - # model = flat_api.models.user_details_admin_license.UserDetailsAdminLicense() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tox.ini b/tox.ini index e3381c4..0b4e252 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = py27, py3 +envlist = py37 [testenv] +passenv = PYTHON_VERSION deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt From e8bca44120f2954037d19322cd1f2b91759d0a15 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 14:21:54 +0200 Subject: [PATCH 14/46] chore: fix gh actions --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 31e7c2a..952b246 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7" "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 From f241b0a8dc1145cfc1d8f2d44e8acafc4a91369e Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 14:25:07 +0200 Subject: [PATCH 15/46] chore(ci): copy script from .gitlab-ci --- .github/workflows/python-package.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 952b246..2831039 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -24,17 +24,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Test run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest + pip install -r requirements.txt + pip install -r test-requirements.txt + pytest --cov=flat_api From 4af99a4f185751e13ea67bcd963e0b0b7db8ab9d Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 14:44:30 +0200 Subject: [PATCH 16/46] feat: regenerate with python-nextgen generator (6.6.0) --- .github/workflows/python-package.yml | 31 - .github/workflows/python.yml | 37 + .gitlab-ci.yml | 6 +- .openapi-generator/FILES | 631 +- .openapi-generator/VERSION | 2 +- README.md | 473 +- docs/AccountApi.md | 90 + docs/ApiAccessToken.md | 18 + docs/AppScopes.md | 12 + docs/Assignment.md | 26 + docs/AssignmentCopy.md | 15 + docs/AssignmentCopyResponse.md | 26 + docs/AssignmentCopyResponseCapabilities.md | 17 + ...ponseCapabilitiesCanPublishInClassError.md | 14 + docs/AssignmentSubmission.md | 28 + docs/AssignmentSubmissionComment.md | 19 + docs/AssignmentSubmissionCommentCreation.md | 13 + docs/AssignmentSubmissionHistory.md | 22 + docs/AssignmentSubmissionHistoryAttachment.md | 14 + docs/AssignmentSubmissionHistoryState.md | 12 + docs/AssignmentSubmissionState.md | 12 + docs/AssignmentSubmissionUpdate.md | 19 + docs/AssignmentSubmissionUpdateComments.md | 13 + docs/AssignmentType.md | 12 + docs/AssignmentUpdate.md | 23 + docs/ClassApi.md | 2637 ++++++++ docs/ClassAssignment.md | 40 + docs/ClassAssignmentCanvas.md | 14 + docs/ClassAssignmentLti.md | 13 + docs/ClassAssignmentMfc.md | 14 + docs/ClassAssignmentUpdate.md | 29 + docs/ClassAssignmentUpdateGoogleClassroom.md | 13 + docs/ClassAssignmentUpdateMicrosoftGraph.md | 13 + docs/ClassAttachmentCreation.md | 19 + docs/ClassCreation.md | 17 + docs/ClassDetails.md | 36 + docs/ClassDetailsCanvas.md | 14 + docs/ClassDetailsClever.md | 19 + docs/ClassDetailsGoogleClassroom.md | 14 + docs/ClassDetailsGoogleDrive.md | 14 + docs/ClassDetailsIssues.md | 13 + docs/ClassDetailsIssuesSyncInner.md | 15 + docs/ClassDetailsLti.md | 15 + docs/ClassDetailsMfc.md | 14 + docs/ClassDetailsMicrosoftGraph.md | 12 + docs/ClassGradeLevel.md | 12 + docs/ClassRoles.md | 12 + docs/ClassState.md | 12 + docs/ClassUpdate.md | 17 + docs/Collection.md | 25 + docs/CollectionApi.md | 827 +++ docs/CollectionApp.md | 15 + docs/CollectionCapabilities.md | 17 + docs/CollectionCreation.md | 13 + docs/CollectionModification.md | 14 + docs/CollectionPrivacy.md | 12 + docs/CollectionType.md | 12 + docs/EduLibrary.md | 16 + docs/EduResource.md | 23 + docs/EduResourceCapabilities.md | 15 + docs/EduResourceCopy.md | 13 + docs/EduResourceCreation.md | 15 + docs/EduResourceMove.md | 13 + docs/EduResourcePrivacy.md | 12 + docs/EduResourceResource.md | 25 + docs/EduResourceType.md | 12 + docs/EduResourceUpdate.md | 13 + docs/EduResourceUseInClass.md | 14 + docs/EduResourcesApi.md | 941 +++ docs/EduSkillsFocused.md | 12 + docs/FlatErrorResponse.md | 16 + docs/FlatLocales.md | 12 + docs/GoogleClassroomCoursework.md | 16 + docs/GoogleClassroomSubmission.md | 15 + docs/Group.md | 19 + docs/GroupApi.md | 269 + docs/GroupDetails.md | 19 + docs/GroupType.md | 12 + docs/LicenseMode.md | 12 + docs/LicenseSources.md | 12 + docs/LmsName.md | 12 + docs/LtiCredentials.md | 21 + docs/LtiCredentialsCreation.md | 14 + docs/MediaAttachment.md | 34 + docs/MediaScoreSharingMode.md | 12 + docs/MicrosoftGraphAssignment.md | 16 + docs/MicrosoftGraphSubmission.md | 15 + docs/OrganizationApi.md | 1153 ++++ docs/OrganizationInvitation.md | 19 + docs/OrganizationInvitationCreation.md | 14 + docs/OrganizationRoles.md | 12 + docs/OrganizationUserAccessTokenCreation.md | 13 + docs/ResourceCollaborator.md | 22 + docs/ResourceCollaboratorCreation.md | 19 + docs/ResourceRights.md | 16 + docs/ScoreApi.md | 2901 +++++++++ docs/ScoreComment.md | 28 + docs/ScoreCommentContext.md | 20 + docs/ScoreCommentCreation.md | 18 + docs/ScoreCommentModeration.md | 14 + docs/ScoreCommentUpdate.md | 16 + docs/ScoreCommentsCounts.md | 16 + docs/ScoreCreation.md | 20 + docs/ScoreCreationBuilderData.md | 13 + docs/ScoreCreationBuilderDataLayoutData.md | 20 + docs/ScoreCreationBuilderDataScoreData.md | 17 + ...ionBuilderDataScoreDataInstrumentsInner.md | 16 + docs/ScoreCreationType.md | 12 + docs/ScoreDetails.md | 44 + docs/ScoreFork.md | 14 + docs/ScoreLicense.md | 12 + docs/ScoreLikesCounts.md | 15 + docs/ScoreModification.md | 24 + docs/ScorePlaysCounts.md | 15 + docs/ScorePrivacy.md | 12 + docs/ScoreRevision.md | 20 + docs/ScoreRevisionCreation.md | 16 + docs/ScoreRevisionStatistics.md | 16 + docs/ScoreSource.md | 12 + docs/ScoreTrack.md | 24 + docs/ScoreTrackCreation.md | 17 + docs/ScoreTrackPoint.md | 15 + docs/ScoreTrackState.md | 12 + docs/ScoreTrackType.md | 12 + docs/ScoreTrackUpdate.md | 16 + docs/ScoreViewsCounts.md | 15 + docs/Task.md | 23 + docs/TaskApi.md | 89 + docs/TaskExportOptions.md | 13 + docs/TaskProgress.md | 14 + docs/TaskResult.md | 14 + docs/UserAdminUpdate.md | 18 + docs/UserApi.md | 271 + docs/UserAzureDetails.md | 14 + docs/UserCommunityProfileLinks.md | 18 + docs/UserCreation.md | 19 + docs/UserDetails.md | 40 + docs/UserDetailsAdmin.md | 28 + docs/UserDetailsAdminLicense.md | 17 + docs/UserPublic.md | 34 + docs/UserPublicSummary.md | 24 + docs/UserSigninLink.md | 13 + docs/UserSigninLinkCreation.md | 12 + docs/apis/tags/AccountApi.md | 125 - docs/apis/tags/CollectionApi.md | 1498 ----- docs/apis/tags/EduResourcesApi.md | 1397 ---- docs/apis/tags/GroupApi.md | 436 -- docs/apis/tags/ModelClassApi.md | 4122 ------------ docs/apis/tags/OrganizationApi.md | 1826 ------ docs/apis/tags/ScoreApi.md | 5655 ----------------- docs/apis/tags/TaskApi.md | 124 - docs/apis/tags/UserApi.md | 438 -- docs/models/ApiAccessToken.md | 36 - docs/models/AppScopes.md | 11 - docs/models/Assignment.md | 77 - docs/models/AssignmentCopy.md | 18 - docs/models/AssignmentCopyResponse.md | 76 - docs/models/AssignmentSubmission.md | 58 - docs/models/AssignmentSubmissionComment.md | 23 - .../AssignmentSubmissionCommentCreation.md | 17 - docs/models/AssignmentSubmissionHistory.md | 55 - .../AssignmentSubmissionHistoryState.md | 11 - docs/models/AssignmentSubmissionState.md | 11 - docs/models/AssignmentSubmissionUpdate.md | 63 - docs/models/AssignmentType.md | 11 - docs/models/AssignmentUpdate.md | 39 - docs/models/ClassAssignment.md | 163 - docs/models/ClassAssignmentUpdate.md | 102 - docs/models/ClassAttachmentCreation.md | 23 - docs/models/ClassCreation.md | 21 - docs/models/ClassDetails.md | 201 - docs/models/ClassGradeLevel.md | 11 - docs/models/ClassRoles.md | 11 - docs/models/ClassState.md | 11 - docs/models/ClassUpdate.md | 21 - docs/models/Collection.md | 76 - docs/models/CollectionApp.md | 19 - docs/models/CollectionCreation.md | 16 - docs/models/CollectionModification.md | 18 - docs/models/CollectionPrivacy.md | 11 - docs/models/CollectionType.md | 11 - docs/models/EduLibrary.md | 20 - docs/models/EduResource.md | 131 - docs/models/EduResourceCopy.md | 17 - docs/models/EduResourceCreation.md | 19 - docs/models/EduResourceMove.md | 17 - docs/models/EduResourcePrivacy.md | 11 - docs/models/EduResourceType.md | 11 - docs/models/EduResourceUpdate.md | 17 - docs/models/EduResourceUseInClass.md | 18 - docs/models/EduSkillsFocused.md | 16 - docs/models/FlatErrorResponse.md | 20 - docs/models/FlatLocales.md | 11 - docs/models/GoogleClassroomCoursework.md | 20 - docs/models/GoogleClassroomSubmission.md | 19 - docs/models/Group.md | 23 - docs/models/GroupDetails.md | 23 - docs/models/GroupType.md | 11 - docs/models/LicenseMode.md | 11 - docs/models/LicenseSources.md | 11 - docs/models/LmsName.md | 11 - docs/models/LtiCredentials.md | 25 - docs/models/LtiCredentialsCreation.md | 18 - docs/models/MediaAttachment.md | 38 - docs/models/MediaScoreSharingMode.md | 11 - docs/models/MicrosoftGraphAssignment.md | 34 - docs/models/MicrosoftGraphSubmission.md | 19 - docs/models/OrganizationInvitation.md | 23 - docs/models/OrganizationInvitationCreation.md | 18 - docs/models/OrganizationRoles.md | 11 - .../OrganizationUserAccessTokenCreation.md | 31 - docs/models/ResourceCollaborator.md | 25 - docs/models/ResourceCollaboratorCreation.md | 23 - docs/models/ResourceRights.md | 20 - docs/models/ScoreComment.md | 62 - docs/models/ScoreCommentContext.md | 38 - docs/models/ScoreCommentCreation.md | 36 - docs/models/ScoreCommentUpdate.md | 20 - docs/models/ScoreCommentsCounts.md | 20 - docs/models/ScoreCreation.md | 108 - docs/models/ScoreCreationType.md | 11 - docs/models/ScoreDetails.md | 117 - docs/models/ScoreFork.md | 18 - docs/models/ScoreLicense.md | 11 - docs/models/ScoreLikesCounts.md | 19 - docs/models/ScoreModification.md | 42 - docs/models/ScorePlaysCounts.md | 19 - docs/models/ScorePrivacy.md | 11 - docs/models/ScoreRevision.md | 36 - docs/models/ScoreRevisionCreation.md | 20 - docs/models/ScoreRevisionStatistics.md | 20 - docs/models/ScoreSource.md | 15 - docs/models/ScoreTrack.md | 40 - docs/models/ScoreTrackCreation.md | 33 - docs/models/ScoreTrackPoint.md | 19 - docs/models/ScoreTrackState.md | 11 - docs/models/ScoreTrackType.md | 11 - docs/models/ScoreTrackUpdate.md | 32 - docs/models/ScoreViewsCounts.md | 19 - docs/models/Task.md | 73 - docs/models/TaskExportOptions.md | 31 - docs/models/UserAdminUpdate.md | 22 - docs/models/UserAzureDetails.md | 17 - docs/models/UserCommunityProfileLinks.md | 22 - docs/models/UserCreation.md | 23 - docs/models/UserDetails.md | 85 - docs/models/UserDetailsAdmin.md | 78 - docs/models/UserPublic.md | 65 - docs/models/UserPublicSummary.md | 41 - docs/models/UserSigninLink.md | 16 - docs/models/UserSigninLinkCreation.md | 15 - flat_api/__init__.py | 3 +- flat_api/api/__init__.py | 3 + flat_api/api/account_api.py | 168 + flat_api/api/class_api.py | 4421 +++++++++++++ flat_api/api/collection_api.py | 1390 ++++ flat_api/api/edu_resources_api.py | 1614 +++++ flat_api/api/group_api.py | 461 ++ flat_api/api/organization_api.py | 1924 ++++++ flat_api/api/score_api.py | 4509 +++++++++++++ flat_api/api/task_api.py | 174 + flat_api/api/user_api.py | 454 ++ flat_api/api_client.py | 1981 ++---- flat_api/apis/__init__.py | 28 +- flat_api/apis/path_to_api.py | 206 - flat_api/apis/paths/__init__.py | 3 - flat_api/apis/paths/classes.py | 9 - flat_api/apis/paths/classes_class.py | 9 - flat_api/apis/paths/classes_class_activate.py | 7 - flat_api/apis/paths/classes_class_archive.py | 9 - .../apis/paths/classes_class_assignments.py | 9 - ...es_class_assignments_assignment_archive.py | 9 - ...asses_class_assignments_assignment_copy.py | 7 - ...lass_assignments_assignment_submissions.py | 9 - ..._assignments_assignment_submissions_csv.py | 7 - ...ssignments_assignment_submissions_excel.py | 7 - ...ments_assignment_submissions_submission.py | 11 - ...ignment_submissions_submission_comments.py | 9 - ...submissions_submission_comments_comment.py | 9 - ...signment_submissions_submission_history.py | 7 - ...classes_class_students_user_submissions.py | 7 - .../apis/paths/classes_class_test_student.py | 7 - .../apis/paths/classes_class_users_user.py | 9 - .../paths/classes_enroll_enrollment_code.py | 7 - flat_api/apis/paths/collections.py | 9 - flat_api/apis/paths/collections_collection.py | 11 - .../paths/collections_collection_scores.py | 7 - .../collections_collection_scores_score.py | 9 - .../paths/collections_collection_untrash.py | 7 - flat_api/apis/paths/edu_resources.py | 9 - .../apis/paths/edu_resources_libraries.py | 7 - flat_api/apis/paths/edu_resources_resource.py | 11 - .../edu_resources_resource_assignment.py | 7 - .../apis/paths/edu_resources_resource_copy.py | 7 - ...u_resources_resource_copy_to_demo_class.py | 7 - .../apis/paths/edu_resources_resource_move.py | 7 - .../edu_resources_resource_use_in_class.py | 7 - flat_api/apis/paths/groups_group.py | 7 - flat_api/apis/paths/groups_group_scores.py | 7 - flat_api/apis/paths/groups_group_users.py | 7 - flat_api/apis/paths/me.py | 7 - .../apis/paths/organizations_invitations.py | 9 - .../organizations_invitations_invitation.py | 7 - .../paths/organizations_lti_credentials.py | 9 - ...ganizations_lti_credentials_credentials.py | 7 - flat_api/apis/paths/organizations_users.py | 9 - .../apis/paths/organizations_users_count.py | 7 - .../apis/paths/organizations_users_user.py | 9 - .../organizations_users_user_access_token.py | 7 - .../organizations_users_user_signin_link.py | 7 - flat_api/apis/paths/scores.py | 7 - flat_api/apis/paths/scores_score.py | 11 - .../apis/paths/scores_score_collaborators.py | 9 - ...scores_score_collaborators_collaborator.py | 9 - flat_api/apis/paths/scores_score_comments.py | 9 - .../paths/scores_score_comments_comment.py | 9 - .../scores_score_comments_comment_resolved.py | 9 - flat_api/apis/paths/scores_score_fork.py | 7 - flat_api/apis/paths/scores_score_revisions.py | 9 - .../paths/scores_score_revisions_revision.py | 7 - .../scores_score_revisions_revision_format.py | 7 - ...es_score_revisions_revision_format_task.py | 7 - .../apis/paths/scores_score_submissions.py | 7 - flat_api/apis/paths/scores_score_tracks.py | 9 - .../apis/paths/scores_score_tracks_track.py | 11 - flat_api/apis/paths/scores_score_untrash.py | 7 - flat_api/apis/paths/tasks_task.py | 7 - flat_api/apis/paths/users_user.py | 7 - flat_api/apis/paths/users_user_likes.py | 7 - flat_api/apis/paths/users_user_scores.py | 7 - flat_api/apis/tag_to_api.py | 41 - flat_api/apis/tags/__init__.py | 17 - flat_api/apis/tags/account_api.py | 24 - flat_api/apis/tags/collection_api.py | 40 - flat_api/apis/tags/edu_resources_api.py | 44 - flat_api/apis/tags/group_api.py | 28 - flat_api/apis/tags/model_class_api.py | 82 - flat_api/apis/tags/organization_api.py | 48 - flat_api/apis/tags/score_api.py | 82 - flat_api/apis/tags/task_api.py | 24 - flat_api/apis/tags/user_api.py | 28 - flat_api/configuration.py | 62 +- flat_api/exceptions.py | 63 +- flat_api/model/api_access_token.py | 400 +- flat_api/model/api_access_token.pyi | 158 - flat_api/model/app_scopes.py | 409 +- flat_api/model/app_scopes.pyi | 121 - flat_api/model/assignment.py | 733 +-- flat_api/model/assignment.pyi | 434 -- flat_api/model/assignment_copy.py | 341 +- flat_api/model/assignment_copy.pyi | 109 - flat_api/model/assignment_copy_response.py | 722 +-- flat_api/model/assignment_copy_response.pyi | 429 -- .../assignment_copy_response_capabilities.py | 298 + ...capabilities_can_publish_in_class_error.py | 276 + flat_api/model/assignment_submission.py | 646 +- flat_api/model/assignment_submission.pyi | 346 - .../model/assignment_submission_comment.py | 383 +- .../model/assignment_submission_comment.pyi | 141 - .../assignment_submission_comment_creation.py | 308 +- ...assignment_submission_comment_creation.pyi | 86 - .../model/assignment_submission_history.py | 555 +- .../model/assignment_submission_history.pyi | 284 - ...ssignment_submission_history_attachment.py | 272 + .../assignment_submission_history_state.py | 307 +- .../assignment_submission_history_state.pyi | 53 - flat_api/model/assignment_submission_state.py | 301 +- .../model/assignment_submission_state.pyi | 49 - .../model/assignment_submission_update.py | 550 +- .../model/assignment_submission_update.pyi | 292 - .../assignment_submission_update_comments.py | 268 + flat_api/model/assignment_type.py | 319 +- flat_api/model/assignment_type.pyi | 61 - flat_api/model/assignment_update.py | 615 +- flat_api/model/assignment_update.pyi | 328 - flat_api/model/class_assignment.py | 1207 ++-- flat_api/model/class_assignment.pyi | 822 --- flat_api/model/class_assignment_canvas.py | 268 + flat_api/model/class_assignment_lti.py | 264 + flat_api/model/class_assignment_mfc.py | 268 + flat_api/model/class_assignment_update.py | 975 +-- flat_api/model/class_assignment_update.pyi | 632 -- ...lass_assignment_update_google_classroom.py | 264 + ...class_assignment_update_microsoft_graph.py | 264 + flat_api/model/class_attachment_creation.py | 456 +- flat_api/model/class_attachment_creation.pyi | 185 - flat_api/model/class_creation.py | 427 +- flat_api/model/class_creation.pyi | 167 - flat_api/model/class_details.py | 1368 ++-- flat_api/model/class_details.pyi | 1015 --- flat_api/model/class_details_canvas.py | 268 + flat_api/model/class_details_clever.py | 301 + .../model/class_details_google_classroom.py | 268 + flat_api/model/class_details_google_drive.py | 268 + flat_api/model/class_details_issues.py | 270 + .../model/class_details_issues_sync_inner.py | 276 + flat_api/model/class_details_lti.py | 272 + flat_api/model/class_details_mfc.py | 268 + .../model/class_details_microsoft_graph.py | 264 + flat_api/model/class_grade_level.py | 313 +- flat_api/model/class_grade_level.pyi | 57 - flat_api/model/class_roles.py | 295 +- flat_api/model/class_roles.pyi | 45 - flat_api/model/class_state.py | 301 +- flat_api/model/class_state.pyi | 49 - flat_api/model/class_update.py | 418 +- flat_api/model/class_update.pyi | 162 - flat_api/model/collection.py | 639 +- flat_api/model/collection.pyi | 359 -- flat_api/model/collection_app.py | 327 +- flat_api/model/collection_app.pyi | 101 - flat_api/model/collection_capabilities.py | 280 + flat_api/model/collection_creation.py | 350 +- flat_api/model/collection_creation.pyi | 106 - flat_api/model/collection_modification.py | 337 +- flat_api/model/collection_modification.pyi | 101 - flat_api/model/collection_privacy.py | 283 +- flat_api/model/collection_privacy.pyi | 43 - flat_api/model/collection_type.py | 321 +- flat_api/model/collection_type.pyi | 63 - flat_api/model/edu_library.py | 395 +- flat_api/model/edu_library.pyi | 141 - flat_api/model/edu_resource.py | 963 +-- flat_api/model/edu_resource.pyi | 680 -- flat_api/model/edu_resource_capabilities.py | 272 + flat_api/model/edu_resource_copy.py | 308 +- flat_api/model/edu_resource_copy.pyi | 86 - flat_api/model/edu_resource_creation.py | 364 +- flat_api/model/edu_resource_creation.pyi | 118 - flat_api/model/edu_resource_move.py | 308 +- flat_api/model/edu_resource_move.pyi | 86 - flat_api/model/edu_resource_privacy.py | 288 +- flat_api/model/edu_resource_privacy.pyi | 46 - flat_api/model/edu_resource_resource.py | 330 + flat_api/model/edu_resource_type.py | 295 +- flat_api/model/edu_resource_type.pyi | 45 - flat_api/model/edu_resource_update.py | 312 +- flat_api/model/edu_resource_update.pyi | 86 - flat_api/model/edu_resource_use_in_class.py | 322 +- flat_api/model/edu_resource_use_in_class.pyi | 96 - flat_api/model/edu_skills_focused.py | 350 +- flat_api/model/edu_skills_focused.pyi | 95 - flat_api/model/flat_error_response.py | 354 +- flat_api/model/flat_error_response.pyi | 118 - flat_api/model/flat_locales.py | 383 +- flat_api/model/flat_locales.pyi | 109 - flat_api/model/google_classroom_coursework.py | 358 +- .../model/google_classroom_coursework.pyi | 130 - flat_api/model/google_classroom_submission.py | 327 +- .../model/google_classroom_submission.pyi | 101 - flat_api/model/group.py | 413 +- flat_api/model/group.pyi | 158 - flat_api/model/group_details.py | 394 +- flat_api/model/group_details.pyi | 146 - flat_api/model/group_type.py | 301 +- flat_api/model/group_type.pyi | 49 - flat_api/model/license_mode.py | 295 +- flat_api/model/license_mode.pyi | 45 - flat_api/model/license_sources.py | 323 +- flat_api/model/license_sources.pyi | 69 - flat_api/model/lms_name.py | 331 +- flat_api/model/lms_name.pyi | 69 - flat_api/model/lti_credentials.py | 422 +- flat_api/model/lti_credentials.pyi | 166 - flat_api/model/lti_credentials_creation.py | 348 +- flat_api/model/lti_credentials_creation.pyi | 108 - flat_api/model/media_attachment.py | 675 +- flat_api/model/media_attachment.pyi | 340 - flat_api/model/media_score_sharing_mode.py | 299 +- flat_api/model/media_score_sharing_mode.pyi | 53 - flat_api/model/microsoft_graph_assignment.py | 361 +- flat_api/model/microsoft_graph_assignment.pyi | 133 - flat_api/model/microsoft_graph_submission.py | 327 +- flat_api/model/microsoft_graph_submission.pyi | 101 - flat_api/model/organization_invitation.py | 394 +- flat_api/model/organization_invitation.pyi | 146 - .../model/organization_invitation_creation.py | 324 +- .../organization_invitation_creation.pyi | 96 - flat_api/model/organization_roles.py | 307 +- flat_api/model/organization_roles.pyi | 53 - ...organization_user_access_token_creation.py | 339 +- ...rganization_user_access_token_creation.pyi | 113 - flat_api/model/resource_collaborator.py | 456 +- flat_api/model/resource_collaborator.pyi | 188 - .../model/resource_collaborator_creation.py | 383 +- .../model/resource_collaborator_creation.pyi | 141 - flat_api/model/resource_rights.py | 341 +- flat_api/model/resource_rights.pyi | 111 - flat_api/model/score_comment.py | 643 +- flat_api/model/score_comment.pyi | 343 - flat_api/model/score_comment_context.py | 447 +- flat_api/model/score_comment_context.pyi | 189 - flat_api/model/score_comment_creation.py | 409 +- flat_api/model/score_comment_creation.pyi | 163 - flat_api/model/score_comment_moderation.py | 272 + flat_api/model/score_comment_update.py | 378 +- flat_api/model/score_comment_update.pyi | 126 - flat_api/model/score_comments_counts.py | 343 +- flat_api/model/score_comments_counts.pyi | 113 - flat_api/model/score_creation.py | 871 +-- flat_api/model/score_creation.pyi | 595 -- flat_api/model/score_creation_builder_data.py | 282 + ...score_creation_builder_data_layout_data.py | 296 + .../score_creation_builder_data_score_data.py | 296 + ...ilder_data_score_data_instruments_inner.py | 288 + flat_api/model/score_creation_type.py | 301 +- flat_api/model/score_creation_type.pyi | 49 - flat_api/model/score_details.py | 928 ++- flat_api/model/score_details.pyi | 555 -- flat_api/model/score_fork.py | 330 +- flat_api/model/score_fork.pyi | 110 - flat_api/model/score_license.py | 332 +- flat_api/model/score_license.pyi | 70 - flat_api/model/score_likes_counts.py | 329 +- flat_api/model/score_likes_counts.pyi | 103 - flat_api/model/score_modification.py | 522 +- flat_api/model/score_modification.pyi | 236 - flat_api/model/score_plays_counts.py | 329 +- flat_api/model/score_plays_counts.pyi | 103 - flat_api/model/score_privacy.py | 305 +- flat_api/model/score_privacy.pyi | 65 - flat_api/model/score_revision.py | 428 +- flat_api/model/score_revision.pyi | 178 - flat_api/model/score_revision_creation.py | 368 +- flat_api/model/score_revision_creation.pyi | 125 - flat_api/model/score_revision_statistics.py | 342 +- flat_api/model/score_revision_statistics.pyi | 112 - flat_api/model/score_source.py | 299 +- flat_api/model/score_source.pyi | 79 - flat_api/model/score_track.py | 496 +- flat_api/model/score_track.pyi | 226 - flat_api/model/score_track_creation.py | 393 +- flat_api/model/score_track_creation.pyi | 153 - flat_api/model/score_track_point.py | 364 +- flat_api/model/score_track_point.pyi | 121 - flat_api/model/score_track_state.py | 293 +- flat_api/model/score_track_state.pyi | 49 - flat_api/model/score_track_type.py | 307 +- flat_api/model/score_track_type.pyi | 53 - flat_api/model/score_track_update.py | 379 +- flat_api/model/score_track_update.pyi | 143 - flat_api/model/score_views_counts.py | 329 +- flat_api/model/score_views_counts.pyi | 103 - flat_api/model/task.py | 625 +- flat_api/model/task.pyi | 346 - flat_api/model/task_export_options.py | 320 +- flat_api/model/task_export_options.pyi | 104 - flat_api/model/task_progress.py | 268 + flat_api/model/task_result.py | 268 + flat_api/model/user_admin_update.py | 435 +- flat_api/model/user_admin_update.pyi | 156 - flat_api/model/user_azure_details.py | 327 +- flat_api/model/user_azure_details.pyi | 99 - .../model/user_community_profile_links.py | 479 +- .../model/user_community_profile_links.pyi | 245 - flat_api/model/user_creation.py | 492 +- flat_api/model/user_creation.pyi | 190 - flat_api/model/user_details.py | 869 ++- flat_api/model/user_details.pyi | 516 -- flat_api/model/user_details_admin.py | 722 +-- flat_api/model/user_details_admin.pyi | 421 -- flat_api/model/user_details_admin_license.py | 288 + flat_api/model/user_public.py | 713 +-- flat_api/model/user_public.pyi | 388 -- flat_api/model/user_public_summary.py | 545 +- flat_api/model/user_public_summary.pyi | 262 - flat_api/model/user_signin_link.py | 313 +- flat_api/model/user_signin_link.pyi | 89 - flat_api/model/user_signin_link_creation.py | 299 +- flat_api/model/user_signin_link_creation.pyi | 79 - flat_api/model_utils.py | 2057 ++++++ flat_api/models/__init__.py | 33 +- flat_api/paths/__init__.py | 72 - flat_api/paths/classes/__init__.py | 7 - flat_api/paths/classes/get.py | 378 -- flat_api/paths/classes/get.pyi | 361 -- flat_api/paths/classes/post.py | 392 -- flat_api/paths/classes/post.pyi | 382 -- flat_api/paths/classes_class/__init__.py | 7 - flat_api/paths/classes_class/get.py | 328 - flat_api/paths/classes_class/get.pyi | 319 - flat_api/paths/classes_class/put.py | 426 -- flat_api/paths/classes_class/put.pyi | 417 -- .../paths/classes_class_activate/__init__.py | 7 - flat_api/paths/classes_class_activate/post.py | 328 - .../paths/classes_class_activate/post.pyi | 319 - .../paths/classes_class_archive/__init__.py | 7 - .../paths/classes_class_archive/delete.py | 328 - .../paths/classes_class_archive/delete.pyi | 319 - flat_api/paths/classes_class_archive/post.py | 328 - flat_api/paths/classes_class_archive/post.pyi | 319 - .../classes_class_assignments/__init__.py | 7 - .../paths/classes_class_assignments/get.py | 353 - .../paths/classes_class_assignments/get.pyi | 344 - .../paths/classes_class_assignments/post.py | 426 -- .../paths/classes_class_assignments/post.pyi | 417 -- .../__init__.py | 7 - .../delete.py | 337 - .../delete.pyi | 328 - .../post.py | 337 - .../post.pyi | 328 - .../__init__.py | 7 - .../post.py | 438 -- .../post.pyi | 429 -- .../__init__.py | 7 - .../get.py | 362 -- .../get.pyi | 353 - .../put.py | 438 -- .../put.pyi | 429 -- .../__init__.py | 7 - .../get.py | 336 - .../get.pyi | 327 - .../__init__.py | 7 - .../get.py | 336 - .../get.pyi | 327 - .../__init__.py | 7 - .../delete.py | 346 - .../delete.pyi | 337 - .../get.py | 346 - .../get.pyi | 337 - .../put.py | 447 -- .../put.pyi | 438 -- .../__init__.py | 7 - .../get.py | 411 -- .../get.pyi | 400 -- .../post.py | 487 -- .../post.pyi | 476 -- .../__init__.py | 7 - .../delete.py | 347 - .../delete.pyi | 338 - .../put.py | 496 -- .../put.pyi | 485 -- .../__init__.py | 7 - .../get.py | 411 -- .../get.pyi | 400 -- .../__init__.py | 7 - .../get.py | 362 -- .../get.pyi | 353 - .../classes_class_test_student/__init__.py | 7 - .../paths/classes_class_test_student/post.py | 382 -- .../paths/classes_class_test_student/post.pyi | 373 -- .../classes_class_users_user/__init__.py | 7 - .../paths/classes_class_users_user/delete.py | 329 - .../paths/classes_class_users_user/delete.pyi | 320 - .../paths/classes_class_users_user/put.py | 329 - .../paths/classes_class_users_user/put.pyi | 320 - .../__init__.py | 7 - .../classes_enroll_enrollment_code/post.py | 328 - .../classes_enroll_enrollment_code/post.pyi | 319 - flat_api/paths/collections/__init__.py | 7 - flat_api/paths/collections/get.py | 447 -- flat_api/paths/collections/get.pyi | 420 -- flat_api/paths/collections/post.py | 392 -- flat_api/paths/collections/post.pyi | 382 -- .../paths/collections_collection/__init__.py | 7 - .../paths/collections_collection/delete.py | 360 -- .../paths/collections_collection/delete.pyi | 349 - flat_api/paths/collections_collection/get.py | 422 -- flat_api/paths/collections_collection/get.pyi | 411 -- flat_api/paths/collections_collection/put.py | 466 -- flat_api/paths/collections_collection/put.pyi | 455 -- .../collections_collection_scores/__init__.py | 7 - .../collections_collection_scores/get.py | 506 -- .../collections_collection_scores/get.pyi | 478 -- .../__init__.py | 7 - .../delete.py | 423 -- .../delete.pyi | 412 -- .../put.py | 431 -- .../put.pyi | 420 -- .../__init__.py | 7 - .../collections_collection_untrash/post.py | 360 -- .../collections_collection_untrash/post.pyi | 349 - flat_api/paths/edu_resources/__init__.py | 7 - flat_api/paths/edu_resources/get.py | 481 -- flat_api/paths/edu_resources/get.pyi | 446 -- flat_api/paths/edu_resources/post.py | 372 -- flat_api/paths/edu_resources/post.pyi | 363 -- .../paths/edu_resources_libraries/__init__.py | 7 - flat_api/paths/edu_resources_libraries/get.py | 299 - .../paths/edu_resources_libraries/get.pyi | 290 - .../paths/edu_resources_resource/__init__.py | 7 - .../paths/edu_resources_resource/delete.py | 320 - .../paths/edu_resources_resource/delete.pyi | 311 - flat_api/paths/edu_resources_resource/get.py | 328 - flat_api/paths/edu_resources_resource/get.pyi | 319 - flat_api/paths/edu_resources_resource/put.py | 429 -- flat_api/paths/edu_resources_resource/put.pyi | 420 -- .../__init__.py | 7 - .../edu_resources_resource_assignment/put.py | 429 -- .../edu_resources_resource_assignment/put.pyi | 420 -- .../edu_resources_resource_copy/__init__.py | 7 - .../paths/edu_resources_resource_copy/post.py | 429 -- .../edu_resources_resource_copy/post.pyi | 420 -- .../__init__.py | 7 - .../post.py | 328 - .../post.pyi | 319 - .../edu_resources_resource_move/__init__.py | 7 - .../paths/edu_resources_resource_move/post.py | 429 -- .../edu_resources_resource_move/post.pyi | 420 -- .../__init__.py | 7 - .../post.py | 429 -- .../post.pyi | 420 -- flat_api/paths/groups_group/__init__.py | 7 - flat_api/paths/groups_group/get.py | 328 - flat_api/paths/groups_group/get.pyi | 319 - .../paths/groups_group_scores/__init__.py | 7 - flat_api/paths/groups_group_scores/get.py | 407 -- flat_api/paths/groups_group_scores/get.pyi | 398 -- flat_api/paths/groups_group_users/__init__.py | 7 - flat_api/paths/groups_group_users/get.py | 432 -- flat_api/paths/groups_group_users/get.pyi | 415 -- flat_api/paths/me/__init__.py | 7 - flat_api/paths/me/get.py | 328 - flat_api/paths/me/get.pyi | 319 - .../organizations_invitations/__init__.py | 7 - .../paths/organizations_invitations/get.py | 414 -- .../paths/organizations_invitations/get.pyi | 393 -- .../paths/organizations_invitations/post.py | 369 -- .../paths/organizations_invitations/post.pyi | 360 -- .../__init__.py | 7 - .../delete.py | 320 - .../delete.pyi | 311 - .../organizations_lti_credentials/__init__.py | 7 - .../organizations_lti_credentials/get.py | 319 - .../organizations_lti_credentials/get.pyi | 309 - .../organizations_lti_credentials/post.py | 392 -- .../organizations_lti_credentials/post.pyi | 382 -- .../__init__.py | 7 - .../delete.py | 360 -- .../delete.pyi | 349 - .../paths/organizations_users/__init__.py | 7 - flat_api/paths/organizations_users/get.py | 615 -- flat_api/paths/organizations_users/get.pyi | 578 -- flat_api/paths/organizations_users/post.py | 369 -- flat_api/paths/organizations_users/post.pyi | 360 -- .../organizations_users_count/__init__.py | 7 - .../paths/organizations_users_count/get.py | 449 -- .../paths/organizations_users_count/get.pyi | 432 -- .../organizations_users_user/__init__.py | 7 - .../paths/organizations_users_user/delete.py | 374 -- .../paths/organizations_users_user/delete.pyi | 365 -- .../paths/organizations_users_user/put.py | 429 -- .../paths/organizations_users_user/put.pyi | 420 -- .../__init__.py | 7 - .../post.py | 426 -- .../post.pyi | 417 -- .../__init__.py | 7 - .../post.py | 426 -- .../post.pyi | 417 -- flat_api/paths/scores/__init__.py | 7 - flat_api/paths/scores/post.py | 412 -- flat_api/paths/scores/post.pyi | 401 -- flat_api/paths/scores_score/__init__.py | 7 - flat_api/paths/scores_score/delete.py | 414 -- flat_api/paths/scores_score/delete.pyi | 403 -- flat_api/paths/scores_score/get.py | 442 -- flat_api/paths/scores_score/get.pyi | 430 -- flat_api/paths/scores_score/put.py | 486 -- flat_api/paths/scores_score/put.pyi | 474 -- .../scores_score_collaborators/__init__.py | 7 - .../paths/scores_score_collaborators/get.py | 467 -- .../paths/scores_score_collaborators/get.pyi | 455 -- .../paths/scores_score_collaborators/post.py | 489 -- .../paths/scores_score_collaborators/post.pyi | 477 -- .../__init__.py | 7 - .../delete.py | 369 -- .../delete.pyi | 358 -- .../get.py | 451 -- .../get.pyi | 439 -- .../paths/scores_score_comments/__init__.py | 7 - flat_api/paths/scores_score_comments/get.py | 549 -- flat_api/paths/scores_score_comments/get.pyi | 517 -- flat_api/paths/scores_score_comments/post.py | 546 -- flat_api/paths/scores_score_comments/post.pyi | 534 -- .../scores_score_comments_comment/__init__.py | 7 - .../scores_score_comments_comment/delete.py | 423 -- .../scores_score_comments_comment/delete.pyi | 412 -- .../scores_score_comments_comment/put.py | 555 -- .../scores_score_comments_comment/put.pyi | 543 -- .../__init__.py | 7 - .../delete.py | 423 -- .../delete.pyi | 412 -- .../put.py | 423 -- .../put.pyi | 412 -- flat_api/paths/scores_score_fork/__init__.py | 7 - flat_api/paths/scores_score_fork/post.py | 546 -- flat_api/paths/scores_score_fork/post.pyi | 534 -- .../paths/scores_score_revisions/__init__.py | 7 - flat_api/paths/scores_score_revisions/get.py | 467 -- flat_api/paths/scores_score_revisions/get.pyi | 455 -- flat_api/paths/scores_score_revisions/post.py | 489 -- .../paths/scores_score_revisions/post.pyi | 477 -- .../__init__.py | 7 - .../scores_score_revisions_revision/get.py | 451 -- .../scores_score_revisions_revision/get.pyi | 439 -- .../__init__.py | 7 - .../get.py | 566 -- .../get.pyi | 541 -- .../__init__.py | 7 - .../post.py | 586 -- .../post.pyi | 566 -- .../scores_score_submissions/__init__.py | 7 - .../paths/scores_score_submissions/get.py | 353 - .../paths/scores_score_submissions/get.pyi | 344 - .../paths/scores_score_tracks/__init__.py | 7 - flat_api/paths/scores_score_tracks/get.py | 465 -- flat_api/paths/scores_score_tracks/get.pyi | 454 -- flat_api/paths/scores_score_tracks/post.py | 469 -- flat_api/paths/scores_score_tracks/post.pyi | 458 -- .../scores_score_tracks_track/__init__.py | 7 - .../paths/scores_score_tracks_track/delete.py | 369 -- .../scores_score_tracks_track/delete.pyi | 358 -- .../paths/scores_score_tracks_track/get.py | 431 -- .../paths/scores_score_tracks_track/get.pyi | 420 -- .../paths/scores_score_tracks_track/put.py | 478 -- .../paths/scores_score_tracks_track/put.pyi | 467 -- .../paths/scores_score_untrash/__init__.py | 7 - flat_api/paths/scores_score_untrash/post.py | 360 -- flat_api/paths/scores_score_untrash/post.pyi | 349 - flat_api/paths/tasks_task/__init__.py | 7 - flat_api/paths/tasks_task/get.py | 328 - flat_api/paths/tasks_task/get.pyi | 319 - flat_api/paths/users_user/__init__.py | 7 - flat_api/paths/users_user/get.py | 328 - flat_api/paths/users_user/get.pyi | 319 - flat_api/paths/users_user_likes/__init__.py | 7 - flat_api/paths/users_user_likes/get.py | 407 -- flat_api/paths/users_user_likes/get.pyi | 398 -- flat_api/paths/users_user_scores/__init__.py | 7 - flat_api/paths/users_user_scores/get.py | 407 -- flat_api/paths/users_user_scores/get.pyi | 398 -- flat_api/rest.py | 299 +- flat_api/schemas.py | 2476 -------- pyproject.toml | 29 + requirements.txt | 7 +- test-requirements.txt | 2 - ...lass_assignment.py => test_account_api.py} | 24 +- .../test_api_access_token.py | 20 +- test/{test_models => }/test_app_scopes.py | 18 +- test/{test_models => }/test_assignment.py | 24 +- .../{test_models => }/test_assignment_copy.py | 18 +- test/test_assignment_copy_response.py | 42 + ...t_assignment_copy_response_capabilities.py | 38 + ...capabilities_can_publish_in_class_error.py | 36 + test/test_assignment_submission.py | 44 + .../test_assignment_submission_comment.py | 18 +- ..._assignment_submission_comment_creation.py | 18 +- test/test_assignment_submission_history.py | 40 + ...ssignment_submission_history_attachment.py | 36 + ...est_assignment_submission_history_state.py | 18 +- .../test_assignment_submission_state.py | 18 +- .../test_assignment_submission_update.py | 22 +- ...t_assignment_submission_update_comments.py | 36 + .../{test_models => }/test_assignment_type.py | 18 +- .../test_assignment_update.py | 22 +- test/test_class_api.py | 239 + test/test_class_assignment.py | 54 + test/test_class_assignment_canvas.py | 36 + test/test_class_assignment_lti.py | 36 + test/test_class_assignment_mfc.py | 36 + .../test_class_assignment_update.py | 26 +- ...lass_assignment_update_google_classroom.py | 36 + ...class_assignment_update_microsoft_graph.py | 36 + .../test_class_attachment_creation.py | 20 +- test/{test_models => }/test_class_creation.py | 22 +- test/{test_models => }/test_class_details.py | 42 +- test/test_class_details_canvas.py | 36 + test/test_class_details_clever.py | 36 + test/test_class_details_google_classroom.py | 36 + test/test_class_details_google_drive.py | 36 + test/test_class_details_issues.py | 38 + test/test_class_details_issues_sync_inner.py | 36 + test/test_class_details_lti.py | 36 + test/test_class_details_mfc.py | 36 + test/test_class_details_microsoft_graph.py | 36 + .../test_class_grade_level.py | 18 +- test/{test_models => }/test_class_roles.py | 18 +- test/{test_models => }/test_class_state.py | 18 +- test/{test_models => }/test_class_update.py | 22 +- test/{test_models => }/test_collection.py | 32 +- test/test_collection_api.py | 92 + test/{test_models => }/test_collection_app.py | 18 +- test/test_collection_capabilities.py | 36 + .../test_collection_creation.py | 20 +- .../test_collection_modification.py | 20 +- .../test_collection_privacy.py | 18 +- .../{test_models => }/test_collection_type.py | 18 +- test/{test_models => }/test_edu_library.py | 18 +- test/{test_models => }/test_edu_resource.py | 26 +- test/test_edu_resource_capabilities.py | 36 + .../test_edu_resource_copy.py | 18 +- .../test_edu_resource_creation.py | 20 +- .../test_edu_resource_move.py | 18 +- .../test_edu_resource_privacy.py | 18 +- test/test_edu_resource_resource.py | 42 + .../test_edu_resource_type.py | 18 +- .../test_edu_resource_update.py | 18 +- .../test_edu_resource_use_in_class.py | 18 +- test/test_edu_resources_api.py | 106 + .../test_edu_skills_focused.py | 18 +- .../test_flat_error_response.py | 18 +- test/{test_models => }/test_flat_locales.py | 18 +- .../test_google_classroom_coursework.py | 18 +- .../test_google_classroom_submission.py | 18 +- test/{test_models => }/test_group.py | 18 +- test/test_group_api.py | 50 + test/{test_models => }/test_group_details.py | 20 +- test/{test_models => }/test_group_type.py | 18 +- test/{test_models => }/test_license_mode.py | 18 +- .../{test_models => }/test_license_sources.py | 18 +- test/{test_models => }/test_lms_name.py | 18 +- .../{test_models => }/test_lti_credentials.py | 20 +- .../test_lti_credentials_creation.py | 20 +- .../test_media_attachment.py | 20 +- .../test_media_score_sharing_mode.py | 18 +- .../test_microsoft_graph_assignment.py | 18 +- .../test_microsoft_graph_submission.py | 18 +- test/test_models/__init__.py | 0 test/test_organization_api.py | 120 + .../test_organization_invitation.py | 20 +- .../test_organization_invitation_creation.py | 20 +- .../test_organization_roles.py | 18 +- ...organization_user_access_token_creation.py | 20 +- test/test_paths/__init__.py | 68 - test/test_paths/test_classes/__init__.py | 0 test/test_paths/test_classes/test_get.py | 41 - test/test_paths/test_classes/test_post.py | 43 - .../test_paths/test_classes_class/__init__.py | 0 .../test_paths/test_classes_class/test_get.py | 41 - .../test_paths/test_classes_class/test_put.py | 41 - .../test_classes_class_activate/__init__.py | 0 .../test_classes_class_activate/test_post.py | 41 - .../test_classes_class_archive/__init__.py | 0 .../test_classes_class_archive/test_delete.py | 41 - .../test_classes_class_archive/test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_delete.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../test_put.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 41 - .../test_get.py | 41 - .../test_put.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - .../test_classes_class_users_user/__init__.py | 0 .../test_delete.py | 40 - .../test_classes_class_users_user/test_put.py | 40 - .../__init__.py | 0 .../test_post.py | 41 - test/test_paths/test_collections/__init__.py | 0 test/test_paths/test_collections/test_get.py | 41 - test/test_paths/test_collections/test_post.py | 43 - .../test_collections_collection/__init__.py | 0 .../test_delete.py | 40 - .../test_collections_collection/test_get.py | 41 - .../test_collections_collection/test_put.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 41 - .../__init__.py | 0 .../test_post.py | 40 - .../test_paths/test_edu_resources/__init__.py | 0 .../test_paths/test_edu_resources/test_get.py | 41 - .../test_edu_resources/test_post.py | 43 - .../test_edu_resources_libraries/__init__.py | 0 .../test_edu_resources_libraries/test_get.py | 41 - .../test_edu_resources_resource/__init__.py | 0 .../test_delete.py | 40 - .../test_edu_resources_resource/test_get.py | 41 - .../test_edu_resources_resource/test_put.py | 43 - .../__init__.py | 0 .../test_put.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - test/test_paths/test_groups_group/__init__.py | 0 test/test_paths/test_groups_group/test_get.py | 41 - .../test_groups_group_scores/__init__.py | 0 .../test_groups_group_scores/test_get.py | 41 - .../test_groups_group_users/__init__.py | 0 .../test_groups_group_users/test_get.py | 41 - test/test_paths/test_me/__init__.py | 0 test/test_paths/test_me/test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_organizations_users/__init__.py | 0 .../test_organizations_users/test_get.py | 41 - .../test_organizations_users/test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_organizations_users_user/__init__.py | 0 .../test_delete.py | 40 - .../test_organizations_users_user/test_put.py | 43 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - test/test_paths/test_scores/__init__.py | 0 test/test_paths/test_scores/test_post.py | 43 - test/test_paths/test_scores_score/__init__.py | 0 .../test_scores_score/test_delete.py | 40 - test/test_paths/test_scores_score/test_get.py | 41 - test/test_paths/test_scores_score/test_put.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_get.py | 41 - .../test_scores_score_comments/__init__.py | 0 .../test_scores_score_comments/test_get.py | 41 - .../test_scores_score_comments/test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 40 - .../test_scores_score_fork/__init__.py | 0 .../test_scores_score_fork/test_post.py | 43 - .../test_scores_score_revisions/__init__.py | 0 .../test_scores_score_revisions/test_get.py | 41 - .../test_scores_score_revisions/test_post.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 53 - .../__init__.py | 0 .../test_post.py | 41 - .../test_scores_score_submissions/__init__.py | 0 .../test_scores_score_submissions/test_get.py | 41 - .../test_scores_score_tracks/__init__.py | 0 .../test_scores_score_tracks/test_get.py | 41 - .../test_scores_score_tracks/test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_get.py | 41 - .../test_put.py | 43 - .../test_scores_score_untrash/__init__.py | 0 .../test_scores_score_untrash/test_post.py | 40 - test/test_paths/test_tasks_task/__init__.py | 0 test/test_paths/test_tasks_task/test_get.py | 41 - test/test_paths/test_users_user/__init__.py | 0 test/test_paths/test_users_user/test_get.py | 41 - .../test_users_user_likes/__init__.py | 0 .../test_users_user_likes/test_get.py | 41 - .../test_users_user_scores/__init__.py | 0 .../test_users_user_scores/test_get.py | 41 - .../test_resource_collaborator.py | 22 +- .../test_resource_collaborator_creation.py | 18 +- .../{test_models => }/test_resource_rights.py | 18 +- test/test_score_api.py | 239 + test/{test_models => }/test_score_comment.py | 22 +- .../test_score_comment_context.py | 18 +- .../test_score_comment_creation.py | 20 +- test/test_score_comment_moderation.py | 36 + .../test_score_comment_update.py | 20 +- .../test_score_comments_counts.py | 18 +- test/{test_models => }/test_score_creation.py | 24 +- test/test_score_creation_builder_data.py | 40 + ...score_creation_builder_data_layout_data.py | 36 + ..._score_creation_builder_data_score_data.py | 38 + ...ilder_data_score_data_instruments_inner.py | 36 + .../test_score_creation_type.py | 18 +- test/{test_models => }/test_score_details.py | 38 +- test/{test_models => }/test_score_fork.py | 18 +- test/{test_models => }/test_score_license.py | 18 +- .../test_score_likes_counts.py | 18 +- .../test_score_modification.py | 24 +- .../test_score_plays_counts.py | 18 +- test/{test_models => }/test_score_privacy.py | 18 +- test/{test_models => }/test_score_revision.py | 20 +- .../test_score_revision_creation.py | 18 +- .../test_score_revision_statistics.py | 18 +- test/{test_models => }/test_score_source.py | 18 +- test/{test_models => }/test_score_track.py | 24 +- .../test_score_track_creation.py | 22 +- .../test_score_track_point.py | 18 +- .../test_score_track_state.py | 18 +- .../test_score_track_type.py | 18 +- .../test_score_track_update.py | 22 +- .../test_score_views_counts.py | 18 +- test/{test_models => }/test_task.py | 22 +- ...ment_copy_response.py => test_task_api.py} | 24 +- .../test_task_export_options.py | 18 +- ...ssion_history.py => test_task_progress.py} | 24 +- ...ment_submission.py => test_task_result.py} | 24 +- .../test_user_admin_update.py | 20 +- test/test_user_api.py | 50 + .../test_user_azure_details.py | 18 +- .../test_user_community_profile_links.py | 18 +- test/{test_models => }/test_user_creation.py | 20 +- test/{test_models => }/test_user_details.py | 28 +- .../test_user_details_admin.py | 24 +- test/test_user_details_admin_license.py | 40 + test/{test_models => }/test_user_public.py | 24 +- .../test_user_public_summary.py | 22 +- .../test_user_signin_link.py | 18 +- .../test_user_signin_link_creation.py | 18 +- tox.ini | 3 +- 1137 files changed, 69147 insertions(+), 142176 deletions(-) delete mode 100644 .github/workflows/python-package.yml create mode 100644 .github/workflows/python.yml create mode 100644 docs/AccountApi.md create mode 100644 docs/ApiAccessToken.md create mode 100644 docs/AppScopes.md create mode 100644 docs/Assignment.md create mode 100644 docs/AssignmentCopy.md create mode 100644 docs/AssignmentCopyResponse.md create mode 100644 docs/AssignmentCopyResponseCapabilities.md create mode 100644 docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md create mode 100644 docs/AssignmentSubmission.md create mode 100644 docs/AssignmentSubmissionComment.md create mode 100644 docs/AssignmentSubmissionCommentCreation.md create mode 100644 docs/AssignmentSubmissionHistory.md create mode 100644 docs/AssignmentSubmissionHistoryAttachment.md create mode 100644 docs/AssignmentSubmissionHistoryState.md create mode 100644 docs/AssignmentSubmissionState.md create mode 100644 docs/AssignmentSubmissionUpdate.md create mode 100644 docs/AssignmentSubmissionUpdateComments.md create mode 100644 docs/AssignmentType.md create mode 100644 docs/AssignmentUpdate.md create mode 100644 docs/ClassApi.md create mode 100644 docs/ClassAssignment.md create mode 100644 docs/ClassAssignmentCanvas.md create mode 100644 docs/ClassAssignmentLti.md create mode 100644 docs/ClassAssignmentMfc.md create mode 100644 docs/ClassAssignmentUpdate.md create mode 100644 docs/ClassAssignmentUpdateGoogleClassroom.md create mode 100644 docs/ClassAssignmentUpdateMicrosoftGraph.md create mode 100644 docs/ClassAttachmentCreation.md create mode 100644 docs/ClassCreation.md create mode 100644 docs/ClassDetails.md create mode 100644 docs/ClassDetailsCanvas.md create mode 100644 docs/ClassDetailsClever.md create mode 100644 docs/ClassDetailsGoogleClassroom.md create mode 100644 docs/ClassDetailsGoogleDrive.md create mode 100644 docs/ClassDetailsIssues.md create mode 100644 docs/ClassDetailsIssuesSyncInner.md create mode 100644 docs/ClassDetailsLti.md create mode 100644 docs/ClassDetailsMfc.md create mode 100644 docs/ClassDetailsMicrosoftGraph.md create mode 100644 docs/ClassGradeLevel.md create mode 100644 docs/ClassRoles.md create mode 100644 docs/ClassState.md create mode 100644 docs/ClassUpdate.md create mode 100644 docs/Collection.md create mode 100644 docs/CollectionApi.md create mode 100644 docs/CollectionApp.md create mode 100644 docs/CollectionCapabilities.md create mode 100644 docs/CollectionCreation.md create mode 100644 docs/CollectionModification.md create mode 100644 docs/CollectionPrivacy.md create mode 100644 docs/CollectionType.md create mode 100644 docs/EduLibrary.md create mode 100644 docs/EduResource.md create mode 100644 docs/EduResourceCapabilities.md create mode 100644 docs/EduResourceCopy.md create mode 100644 docs/EduResourceCreation.md create mode 100644 docs/EduResourceMove.md create mode 100644 docs/EduResourcePrivacy.md create mode 100644 docs/EduResourceResource.md create mode 100644 docs/EduResourceType.md create mode 100644 docs/EduResourceUpdate.md create mode 100644 docs/EduResourceUseInClass.md create mode 100644 docs/EduResourcesApi.md create mode 100644 docs/EduSkillsFocused.md create mode 100644 docs/FlatErrorResponse.md create mode 100644 docs/FlatLocales.md create mode 100644 docs/GoogleClassroomCoursework.md create mode 100644 docs/GoogleClassroomSubmission.md create mode 100644 docs/Group.md create mode 100644 docs/GroupApi.md create mode 100644 docs/GroupDetails.md create mode 100644 docs/GroupType.md create mode 100644 docs/LicenseMode.md create mode 100644 docs/LicenseSources.md create mode 100644 docs/LmsName.md create mode 100644 docs/LtiCredentials.md create mode 100644 docs/LtiCredentialsCreation.md create mode 100644 docs/MediaAttachment.md create mode 100644 docs/MediaScoreSharingMode.md create mode 100644 docs/MicrosoftGraphAssignment.md create mode 100644 docs/MicrosoftGraphSubmission.md create mode 100644 docs/OrganizationApi.md create mode 100644 docs/OrganizationInvitation.md create mode 100644 docs/OrganizationInvitationCreation.md create mode 100644 docs/OrganizationRoles.md create mode 100644 docs/OrganizationUserAccessTokenCreation.md create mode 100644 docs/ResourceCollaborator.md create mode 100644 docs/ResourceCollaboratorCreation.md create mode 100644 docs/ResourceRights.md create mode 100644 docs/ScoreApi.md create mode 100644 docs/ScoreComment.md create mode 100644 docs/ScoreCommentContext.md create mode 100644 docs/ScoreCommentCreation.md create mode 100644 docs/ScoreCommentModeration.md create mode 100644 docs/ScoreCommentUpdate.md create mode 100644 docs/ScoreCommentsCounts.md create mode 100644 docs/ScoreCreation.md create mode 100644 docs/ScoreCreationBuilderData.md create mode 100644 docs/ScoreCreationBuilderDataLayoutData.md create mode 100644 docs/ScoreCreationBuilderDataScoreData.md create mode 100644 docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md create mode 100644 docs/ScoreCreationType.md create mode 100644 docs/ScoreDetails.md create mode 100644 docs/ScoreFork.md create mode 100644 docs/ScoreLicense.md create mode 100644 docs/ScoreLikesCounts.md create mode 100644 docs/ScoreModification.md create mode 100644 docs/ScorePlaysCounts.md create mode 100644 docs/ScorePrivacy.md create mode 100644 docs/ScoreRevision.md create mode 100644 docs/ScoreRevisionCreation.md create mode 100644 docs/ScoreRevisionStatistics.md create mode 100644 docs/ScoreSource.md create mode 100644 docs/ScoreTrack.md create mode 100644 docs/ScoreTrackCreation.md create mode 100644 docs/ScoreTrackPoint.md create mode 100644 docs/ScoreTrackState.md create mode 100644 docs/ScoreTrackType.md create mode 100644 docs/ScoreTrackUpdate.md create mode 100644 docs/ScoreViewsCounts.md create mode 100644 docs/Task.md create mode 100644 docs/TaskApi.md create mode 100644 docs/TaskExportOptions.md create mode 100644 docs/TaskProgress.md create mode 100644 docs/TaskResult.md create mode 100644 docs/UserAdminUpdate.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserAzureDetails.md create mode 100644 docs/UserCommunityProfileLinks.md create mode 100644 docs/UserCreation.md create mode 100644 docs/UserDetails.md create mode 100644 docs/UserDetailsAdmin.md create mode 100644 docs/UserDetailsAdminLicense.md create mode 100644 docs/UserPublic.md create mode 100644 docs/UserPublicSummary.md create mode 100644 docs/UserSigninLink.md create mode 100644 docs/UserSigninLinkCreation.md delete mode 100644 docs/apis/tags/AccountApi.md delete mode 100644 docs/apis/tags/CollectionApi.md delete mode 100644 docs/apis/tags/EduResourcesApi.md delete mode 100644 docs/apis/tags/GroupApi.md delete mode 100644 docs/apis/tags/ModelClassApi.md delete mode 100644 docs/apis/tags/OrganizationApi.md delete mode 100644 docs/apis/tags/ScoreApi.md delete mode 100644 docs/apis/tags/TaskApi.md delete mode 100644 docs/apis/tags/UserApi.md delete mode 100644 docs/models/ApiAccessToken.md delete mode 100644 docs/models/AppScopes.md delete mode 100644 docs/models/Assignment.md delete mode 100644 docs/models/AssignmentCopy.md delete mode 100644 docs/models/AssignmentCopyResponse.md delete mode 100644 docs/models/AssignmentSubmission.md delete mode 100644 docs/models/AssignmentSubmissionComment.md delete mode 100644 docs/models/AssignmentSubmissionCommentCreation.md delete mode 100644 docs/models/AssignmentSubmissionHistory.md delete mode 100644 docs/models/AssignmentSubmissionHistoryState.md delete mode 100644 docs/models/AssignmentSubmissionState.md delete mode 100644 docs/models/AssignmentSubmissionUpdate.md delete mode 100644 docs/models/AssignmentType.md delete mode 100644 docs/models/AssignmentUpdate.md delete mode 100644 docs/models/ClassAssignment.md delete mode 100644 docs/models/ClassAssignmentUpdate.md delete mode 100644 docs/models/ClassAttachmentCreation.md delete mode 100644 docs/models/ClassCreation.md delete mode 100644 docs/models/ClassDetails.md delete mode 100644 docs/models/ClassGradeLevel.md delete mode 100644 docs/models/ClassRoles.md delete mode 100644 docs/models/ClassState.md delete mode 100644 docs/models/ClassUpdate.md delete mode 100644 docs/models/Collection.md delete mode 100644 docs/models/CollectionApp.md delete mode 100644 docs/models/CollectionCreation.md delete mode 100644 docs/models/CollectionModification.md delete mode 100644 docs/models/CollectionPrivacy.md delete mode 100644 docs/models/CollectionType.md delete mode 100644 docs/models/EduLibrary.md delete mode 100644 docs/models/EduResource.md delete mode 100644 docs/models/EduResourceCopy.md delete mode 100644 docs/models/EduResourceCreation.md delete mode 100644 docs/models/EduResourceMove.md delete mode 100644 docs/models/EduResourcePrivacy.md delete mode 100644 docs/models/EduResourceType.md delete mode 100644 docs/models/EduResourceUpdate.md delete mode 100644 docs/models/EduResourceUseInClass.md delete mode 100644 docs/models/EduSkillsFocused.md delete mode 100644 docs/models/FlatErrorResponse.md delete mode 100644 docs/models/FlatLocales.md delete mode 100644 docs/models/GoogleClassroomCoursework.md delete mode 100644 docs/models/GoogleClassroomSubmission.md delete mode 100644 docs/models/Group.md delete mode 100644 docs/models/GroupDetails.md delete mode 100644 docs/models/GroupType.md delete mode 100644 docs/models/LicenseMode.md delete mode 100644 docs/models/LicenseSources.md delete mode 100644 docs/models/LmsName.md delete mode 100644 docs/models/LtiCredentials.md delete mode 100644 docs/models/LtiCredentialsCreation.md delete mode 100644 docs/models/MediaAttachment.md delete mode 100644 docs/models/MediaScoreSharingMode.md delete mode 100644 docs/models/MicrosoftGraphAssignment.md delete mode 100644 docs/models/MicrosoftGraphSubmission.md delete mode 100644 docs/models/OrganizationInvitation.md delete mode 100644 docs/models/OrganizationInvitationCreation.md delete mode 100644 docs/models/OrganizationRoles.md delete mode 100644 docs/models/OrganizationUserAccessTokenCreation.md delete mode 100644 docs/models/ResourceCollaborator.md delete mode 100644 docs/models/ResourceCollaboratorCreation.md delete mode 100644 docs/models/ResourceRights.md delete mode 100644 docs/models/ScoreComment.md delete mode 100644 docs/models/ScoreCommentContext.md delete mode 100644 docs/models/ScoreCommentCreation.md delete mode 100644 docs/models/ScoreCommentUpdate.md delete mode 100644 docs/models/ScoreCommentsCounts.md delete mode 100644 docs/models/ScoreCreation.md delete mode 100644 docs/models/ScoreCreationType.md delete mode 100644 docs/models/ScoreDetails.md delete mode 100644 docs/models/ScoreFork.md delete mode 100644 docs/models/ScoreLicense.md delete mode 100644 docs/models/ScoreLikesCounts.md delete mode 100644 docs/models/ScoreModification.md delete mode 100644 docs/models/ScorePlaysCounts.md delete mode 100644 docs/models/ScorePrivacy.md delete mode 100644 docs/models/ScoreRevision.md delete mode 100644 docs/models/ScoreRevisionCreation.md delete mode 100644 docs/models/ScoreRevisionStatistics.md delete mode 100644 docs/models/ScoreSource.md delete mode 100644 docs/models/ScoreTrack.md delete mode 100644 docs/models/ScoreTrackCreation.md delete mode 100644 docs/models/ScoreTrackPoint.md delete mode 100644 docs/models/ScoreTrackState.md delete mode 100644 docs/models/ScoreTrackType.md delete mode 100644 docs/models/ScoreTrackUpdate.md delete mode 100644 docs/models/ScoreViewsCounts.md delete mode 100644 docs/models/Task.md delete mode 100644 docs/models/TaskExportOptions.md delete mode 100644 docs/models/UserAdminUpdate.md delete mode 100644 docs/models/UserAzureDetails.md delete mode 100644 docs/models/UserCommunityProfileLinks.md delete mode 100644 docs/models/UserCreation.md delete mode 100644 docs/models/UserDetails.md delete mode 100644 docs/models/UserDetailsAdmin.md delete mode 100644 docs/models/UserPublic.md delete mode 100644 docs/models/UserPublicSummary.md delete mode 100644 docs/models/UserSigninLink.md delete mode 100644 docs/models/UserSigninLinkCreation.md create mode 100644 flat_api/api/__init__.py create mode 100644 flat_api/api/account_api.py create mode 100644 flat_api/api/class_api.py create mode 100644 flat_api/api/collection_api.py create mode 100644 flat_api/api/edu_resources_api.py create mode 100644 flat_api/api/group_api.py create mode 100644 flat_api/api/organization_api.py create mode 100644 flat_api/api/score_api.py create mode 100644 flat_api/api/task_api.py create mode 100644 flat_api/api/user_api.py delete mode 100644 flat_api/apis/path_to_api.py delete mode 100644 flat_api/apis/paths/__init__.py delete mode 100644 flat_api/apis/paths/classes.py delete mode 100644 flat_api/apis/paths/classes_class.py delete mode 100644 flat_api/apis/paths/classes_class_activate.py delete mode 100644 flat_api/apis/paths/classes_class_archive.py delete mode 100644 flat_api/apis/paths/classes_class_assignments.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_archive.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_copy.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py delete mode 100644 flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py delete mode 100644 flat_api/apis/paths/classes_class_students_user_submissions.py delete mode 100644 flat_api/apis/paths/classes_class_test_student.py delete mode 100644 flat_api/apis/paths/classes_class_users_user.py delete mode 100644 flat_api/apis/paths/classes_enroll_enrollment_code.py delete mode 100644 flat_api/apis/paths/collections.py delete mode 100644 flat_api/apis/paths/collections_collection.py delete mode 100644 flat_api/apis/paths/collections_collection_scores.py delete mode 100644 flat_api/apis/paths/collections_collection_scores_score.py delete mode 100644 flat_api/apis/paths/collections_collection_untrash.py delete mode 100644 flat_api/apis/paths/edu_resources.py delete mode 100644 flat_api/apis/paths/edu_resources_libraries.py delete mode 100644 flat_api/apis/paths/edu_resources_resource.py delete mode 100644 flat_api/apis/paths/edu_resources_resource_assignment.py delete mode 100644 flat_api/apis/paths/edu_resources_resource_copy.py delete mode 100644 flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py delete mode 100644 flat_api/apis/paths/edu_resources_resource_move.py delete mode 100644 flat_api/apis/paths/edu_resources_resource_use_in_class.py delete mode 100644 flat_api/apis/paths/groups_group.py delete mode 100644 flat_api/apis/paths/groups_group_scores.py delete mode 100644 flat_api/apis/paths/groups_group_users.py delete mode 100644 flat_api/apis/paths/me.py delete mode 100644 flat_api/apis/paths/organizations_invitations.py delete mode 100644 flat_api/apis/paths/organizations_invitations_invitation.py delete mode 100644 flat_api/apis/paths/organizations_lti_credentials.py delete mode 100644 flat_api/apis/paths/organizations_lti_credentials_credentials.py delete mode 100644 flat_api/apis/paths/organizations_users.py delete mode 100644 flat_api/apis/paths/organizations_users_count.py delete mode 100644 flat_api/apis/paths/organizations_users_user.py delete mode 100644 flat_api/apis/paths/organizations_users_user_access_token.py delete mode 100644 flat_api/apis/paths/organizations_users_user_signin_link.py delete mode 100644 flat_api/apis/paths/scores.py delete mode 100644 flat_api/apis/paths/scores_score.py delete mode 100644 flat_api/apis/paths/scores_score_collaborators.py delete mode 100644 flat_api/apis/paths/scores_score_collaborators_collaborator.py delete mode 100644 flat_api/apis/paths/scores_score_comments.py delete mode 100644 flat_api/apis/paths/scores_score_comments_comment.py delete mode 100644 flat_api/apis/paths/scores_score_comments_comment_resolved.py delete mode 100644 flat_api/apis/paths/scores_score_fork.py delete mode 100644 flat_api/apis/paths/scores_score_revisions.py delete mode 100644 flat_api/apis/paths/scores_score_revisions_revision.py delete mode 100644 flat_api/apis/paths/scores_score_revisions_revision_format.py delete mode 100644 flat_api/apis/paths/scores_score_revisions_revision_format_task.py delete mode 100644 flat_api/apis/paths/scores_score_submissions.py delete mode 100644 flat_api/apis/paths/scores_score_tracks.py delete mode 100644 flat_api/apis/paths/scores_score_tracks_track.py delete mode 100644 flat_api/apis/paths/scores_score_untrash.py delete mode 100644 flat_api/apis/paths/tasks_task.py delete mode 100644 flat_api/apis/paths/users_user.py delete mode 100644 flat_api/apis/paths/users_user_likes.py delete mode 100644 flat_api/apis/paths/users_user_scores.py delete mode 100644 flat_api/apis/tag_to_api.py delete mode 100644 flat_api/apis/tags/__init__.py delete mode 100644 flat_api/apis/tags/account_api.py delete mode 100644 flat_api/apis/tags/collection_api.py delete mode 100644 flat_api/apis/tags/edu_resources_api.py delete mode 100644 flat_api/apis/tags/group_api.py delete mode 100644 flat_api/apis/tags/model_class_api.py delete mode 100644 flat_api/apis/tags/organization_api.py delete mode 100644 flat_api/apis/tags/score_api.py delete mode 100644 flat_api/apis/tags/task_api.py delete mode 100644 flat_api/apis/tags/user_api.py delete mode 100644 flat_api/model/api_access_token.pyi delete mode 100644 flat_api/model/app_scopes.pyi delete mode 100644 flat_api/model/assignment.pyi delete mode 100644 flat_api/model/assignment_copy.pyi delete mode 100644 flat_api/model/assignment_copy_response.pyi create mode 100644 flat_api/model/assignment_copy_response_capabilities.py create mode 100644 flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py delete mode 100644 flat_api/model/assignment_submission.pyi delete mode 100644 flat_api/model/assignment_submission_comment.pyi delete mode 100644 flat_api/model/assignment_submission_comment_creation.pyi delete mode 100644 flat_api/model/assignment_submission_history.pyi create mode 100644 flat_api/model/assignment_submission_history_attachment.py delete mode 100644 flat_api/model/assignment_submission_history_state.pyi delete mode 100644 flat_api/model/assignment_submission_state.pyi delete mode 100644 flat_api/model/assignment_submission_update.pyi create mode 100644 flat_api/model/assignment_submission_update_comments.py delete mode 100644 flat_api/model/assignment_type.pyi delete mode 100644 flat_api/model/assignment_update.pyi delete mode 100644 flat_api/model/class_assignment.pyi create mode 100644 flat_api/model/class_assignment_canvas.py create mode 100644 flat_api/model/class_assignment_lti.py create mode 100644 flat_api/model/class_assignment_mfc.py delete mode 100644 flat_api/model/class_assignment_update.pyi create mode 100644 flat_api/model/class_assignment_update_google_classroom.py create mode 100644 flat_api/model/class_assignment_update_microsoft_graph.py delete mode 100644 flat_api/model/class_attachment_creation.pyi delete mode 100644 flat_api/model/class_creation.pyi delete mode 100644 flat_api/model/class_details.pyi create mode 100644 flat_api/model/class_details_canvas.py create mode 100644 flat_api/model/class_details_clever.py create mode 100644 flat_api/model/class_details_google_classroom.py create mode 100644 flat_api/model/class_details_google_drive.py create mode 100644 flat_api/model/class_details_issues.py create mode 100644 flat_api/model/class_details_issues_sync_inner.py create mode 100644 flat_api/model/class_details_lti.py create mode 100644 flat_api/model/class_details_mfc.py create mode 100644 flat_api/model/class_details_microsoft_graph.py delete mode 100644 flat_api/model/class_grade_level.pyi delete mode 100644 flat_api/model/class_roles.pyi delete mode 100644 flat_api/model/class_state.pyi delete mode 100644 flat_api/model/class_update.pyi delete mode 100644 flat_api/model/collection.pyi delete mode 100644 flat_api/model/collection_app.pyi create mode 100644 flat_api/model/collection_capabilities.py delete mode 100644 flat_api/model/collection_creation.pyi delete mode 100644 flat_api/model/collection_modification.pyi delete mode 100644 flat_api/model/collection_privacy.pyi delete mode 100644 flat_api/model/collection_type.pyi delete mode 100644 flat_api/model/edu_library.pyi delete mode 100644 flat_api/model/edu_resource.pyi create mode 100644 flat_api/model/edu_resource_capabilities.py delete mode 100644 flat_api/model/edu_resource_copy.pyi delete mode 100644 flat_api/model/edu_resource_creation.pyi delete mode 100644 flat_api/model/edu_resource_move.pyi delete mode 100644 flat_api/model/edu_resource_privacy.pyi create mode 100644 flat_api/model/edu_resource_resource.py delete mode 100644 flat_api/model/edu_resource_type.pyi delete mode 100644 flat_api/model/edu_resource_update.pyi delete mode 100644 flat_api/model/edu_resource_use_in_class.pyi delete mode 100644 flat_api/model/edu_skills_focused.pyi delete mode 100644 flat_api/model/flat_error_response.pyi delete mode 100644 flat_api/model/flat_locales.pyi delete mode 100644 flat_api/model/google_classroom_coursework.pyi delete mode 100644 flat_api/model/google_classroom_submission.pyi delete mode 100644 flat_api/model/group.pyi delete mode 100644 flat_api/model/group_details.pyi delete mode 100644 flat_api/model/group_type.pyi delete mode 100644 flat_api/model/license_mode.pyi delete mode 100644 flat_api/model/license_sources.pyi delete mode 100644 flat_api/model/lms_name.pyi delete mode 100644 flat_api/model/lti_credentials.pyi delete mode 100644 flat_api/model/lti_credentials_creation.pyi delete mode 100644 flat_api/model/media_attachment.pyi delete mode 100644 flat_api/model/media_score_sharing_mode.pyi delete mode 100644 flat_api/model/microsoft_graph_assignment.pyi delete mode 100644 flat_api/model/microsoft_graph_submission.pyi delete mode 100644 flat_api/model/organization_invitation.pyi delete mode 100644 flat_api/model/organization_invitation_creation.pyi delete mode 100644 flat_api/model/organization_roles.pyi delete mode 100644 flat_api/model/organization_user_access_token_creation.pyi delete mode 100644 flat_api/model/resource_collaborator.pyi delete mode 100644 flat_api/model/resource_collaborator_creation.pyi delete mode 100644 flat_api/model/resource_rights.pyi delete mode 100644 flat_api/model/score_comment.pyi delete mode 100644 flat_api/model/score_comment_context.pyi delete mode 100644 flat_api/model/score_comment_creation.pyi create mode 100644 flat_api/model/score_comment_moderation.py delete mode 100644 flat_api/model/score_comment_update.pyi delete mode 100644 flat_api/model/score_comments_counts.pyi delete mode 100644 flat_api/model/score_creation.pyi create mode 100644 flat_api/model/score_creation_builder_data.py create mode 100644 flat_api/model/score_creation_builder_data_layout_data.py create mode 100644 flat_api/model/score_creation_builder_data_score_data.py create mode 100644 flat_api/model/score_creation_builder_data_score_data_instruments_inner.py delete mode 100644 flat_api/model/score_creation_type.pyi delete mode 100644 flat_api/model/score_details.pyi delete mode 100644 flat_api/model/score_fork.pyi delete mode 100644 flat_api/model/score_license.pyi delete mode 100644 flat_api/model/score_likes_counts.pyi delete mode 100644 flat_api/model/score_modification.pyi delete mode 100644 flat_api/model/score_plays_counts.pyi delete mode 100644 flat_api/model/score_privacy.pyi delete mode 100644 flat_api/model/score_revision.pyi delete mode 100644 flat_api/model/score_revision_creation.pyi delete mode 100644 flat_api/model/score_revision_statistics.pyi delete mode 100644 flat_api/model/score_source.pyi delete mode 100644 flat_api/model/score_track.pyi delete mode 100644 flat_api/model/score_track_creation.pyi delete mode 100644 flat_api/model/score_track_point.pyi delete mode 100644 flat_api/model/score_track_state.pyi delete mode 100644 flat_api/model/score_track_type.pyi delete mode 100644 flat_api/model/score_track_update.pyi delete mode 100644 flat_api/model/score_views_counts.pyi delete mode 100644 flat_api/model/task.pyi delete mode 100644 flat_api/model/task_export_options.pyi create mode 100644 flat_api/model/task_progress.py create mode 100644 flat_api/model/task_result.py delete mode 100644 flat_api/model/user_admin_update.pyi delete mode 100644 flat_api/model/user_azure_details.pyi delete mode 100644 flat_api/model/user_community_profile_links.pyi delete mode 100644 flat_api/model/user_creation.pyi delete mode 100644 flat_api/model/user_details.pyi delete mode 100644 flat_api/model/user_details_admin.pyi create mode 100644 flat_api/model/user_details_admin_license.py delete mode 100644 flat_api/model/user_public.pyi delete mode 100644 flat_api/model/user_public_summary.pyi delete mode 100644 flat_api/model/user_signin_link.pyi delete mode 100644 flat_api/model/user_signin_link_creation.pyi create mode 100644 flat_api/model_utils.py delete mode 100644 flat_api/paths/__init__.py delete mode 100644 flat_api/paths/classes/__init__.py delete mode 100644 flat_api/paths/classes/get.py delete mode 100644 flat_api/paths/classes/get.pyi delete mode 100644 flat_api/paths/classes/post.py delete mode 100644 flat_api/paths/classes/post.pyi delete mode 100644 flat_api/paths/classes_class/__init__.py delete mode 100644 flat_api/paths/classes_class/get.py delete mode 100644 flat_api/paths/classes_class/get.pyi delete mode 100644 flat_api/paths/classes_class/put.py delete mode 100644 flat_api/paths/classes_class/put.pyi delete mode 100644 flat_api/paths/classes_class_activate/__init__.py delete mode 100644 flat_api/paths/classes_class_activate/post.py delete mode 100644 flat_api/paths/classes_class_activate/post.pyi delete mode 100644 flat_api/paths/classes_class_archive/__init__.py delete mode 100644 flat_api/paths/classes_class_archive/delete.py delete mode 100644 flat_api/paths/classes_class_archive/delete.pyi delete mode 100644 flat_api/paths/classes_class_archive/post.py delete mode 100644 flat_api/paths/classes_class_archive/post.pyi delete mode 100644 flat_api/paths/classes_class_assignments/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments/get.py delete mode 100644 flat_api/paths/classes_class_assignments/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments/post.py delete mode 100644 flat_api/paths/classes_class_assignments/post.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/delete.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/post.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_archive/post.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/post.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_copy/post.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/put.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py delete mode 100644 flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi delete mode 100644 flat_api/paths/classes_class_students_user_submissions/__init__.py delete mode 100644 flat_api/paths/classes_class_students_user_submissions/get.py delete mode 100644 flat_api/paths/classes_class_students_user_submissions/get.pyi delete mode 100644 flat_api/paths/classes_class_test_student/__init__.py delete mode 100644 flat_api/paths/classes_class_test_student/post.py delete mode 100644 flat_api/paths/classes_class_test_student/post.pyi delete mode 100644 flat_api/paths/classes_class_users_user/__init__.py delete mode 100644 flat_api/paths/classes_class_users_user/delete.py delete mode 100644 flat_api/paths/classes_class_users_user/delete.pyi delete mode 100644 flat_api/paths/classes_class_users_user/put.py delete mode 100644 flat_api/paths/classes_class_users_user/put.pyi delete mode 100644 flat_api/paths/classes_enroll_enrollment_code/__init__.py delete mode 100644 flat_api/paths/classes_enroll_enrollment_code/post.py delete mode 100644 flat_api/paths/classes_enroll_enrollment_code/post.pyi delete mode 100644 flat_api/paths/collections/__init__.py delete mode 100644 flat_api/paths/collections/get.py delete mode 100644 flat_api/paths/collections/get.pyi delete mode 100644 flat_api/paths/collections/post.py delete mode 100644 flat_api/paths/collections/post.pyi delete mode 100644 flat_api/paths/collections_collection/__init__.py delete mode 100644 flat_api/paths/collections_collection/delete.py delete mode 100644 flat_api/paths/collections_collection/delete.pyi delete mode 100644 flat_api/paths/collections_collection/get.py delete mode 100644 flat_api/paths/collections_collection/get.pyi delete mode 100644 flat_api/paths/collections_collection/put.py delete mode 100644 flat_api/paths/collections_collection/put.pyi delete mode 100644 flat_api/paths/collections_collection_scores/__init__.py delete mode 100644 flat_api/paths/collections_collection_scores/get.py delete mode 100644 flat_api/paths/collections_collection_scores/get.pyi delete mode 100644 flat_api/paths/collections_collection_scores_score/__init__.py delete mode 100644 flat_api/paths/collections_collection_scores_score/delete.py delete mode 100644 flat_api/paths/collections_collection_scores_score/delete.pyi delete mode 100644 flat_api/paths/collections_collection_scores_score/put.py delete mode 100644 flat_api/paths/collections_collection_scores_score/put.pyi delete mode 100644 flat_api/paths/collections_collection_untrash/__init__.py delete mode 100644 flat_api/paths/collections_collection_untrash/post.py delete mode 100644 flat_api/paths/collections_collection_untrash/post.pyi delete mode 100644 flat_api/paths/edu_resources/__init__.py delete mode 100644 flat_api/paths/edu_resources/get.py delete mode 100644 flat_api/paths/edu_resources/get.pyi delete mode 100644 flat_api/paths/edu_resources/post.py delete mode 100644 flat_api/paths/edu_resources/post.pyi delete mode 100644 flat_api/paths/edu_resources_libraries/__init__.py delete mode 100644 flat_api/paths/edu_resources_libraries/get.py delete mode 100644 flat_api/paths/edu_resources_libraries/get.pyi delete mode 100644 flat_api/paths/edu_resources_resource/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource/delete.py delete mode 100644 flat_api/paths/edu_resources_resource/delete.pyi delete mode 100644 flat_api/paths/edu_resources_resource/get.py delete mode 100644 flat_api/paths/edu_resources_resource/get.pyi delete mode 100644 flat_api/paths/edu_resources_resource/put.py delete mode 100644 flat_api/paths/edu_resources_resource/put.pyi delete mode 100644 flat_api/paths/edu_resources_resource_assignment/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource_assignment/put.py delete mode 100644 flat_api/paths/edu_resources_resource_assignment/put.pyi delete mode 100644 flat_api/paths/edu_resources_resource_copy/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource_copy/post.py delete mode 100644 flat_api/paths/edu_resources_resource_copy/post.pyi delete mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py delete mode 100644 flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi delete mode 100644 flat_api/paths/edu_resources_resource_move/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource_move/post.py delete mode 100644 flat_api/paths/edu_resources_resource_move/post.pyi delete mode 100644 flat_api/paths/edu_resources_resource_use_in_class/__init__.py delete mode 100644 flat_api/paths/edu_resources_resource_use_in_class/post.py delete mode 100644 flat_api/paths/edu_resources_resource_use_in_class/post.pyi delete mode 100644 flat_api/paths/groups_group/__init__.py delete mode 100644 flat_api/paths/groups_group/get.py delete mode 100644 flat_api/paths/groups_group/get.pyi delete mode 100644 flat_api/paths/groups_group_scores/__init__.py delete mode 100644 flat_api/paths/groups_group_scores/get.py delete mode 100644 flat_api/paths/groups_group_scores/get.pyi delete mode 100644 flat_api/paths/groups_group_users/__init__.py delete mode 100644 flat_api/paths/groups_group_users/get.py delete mode 100644 flat_api/paths/groups_group_users/get.pyi delete mode 100644 flat_api/paths/me/__init__.py delete mode 100644 flat_api/paths/me/get.py delete mode 100644 flat_api/paths/me/get.pyi delete mode 100644 flat_api/paths/organizations_invitations/__init__.py delete mode 100644 flat_api/paths/organizations_invitations/get.py delete mode 100644 flat_api/paths/organizations_invitations/get.pyi delete mode 100644 flat_api/paths/organizations_invitations/post.py delete mode 100644 flat_api/paths/organizations_invitations/post.pyi delete mode 100644 flat_api/paths/organizations_invitations_invitation/__init__.py delete mode 100644 flat_api/paths/organizations_invitations_invitation/delete.py delete mode 100644 flat_api/paths/organizations_invitations_invitation/delete.pyi delete mode 100644 flat_api/paths/organizations_lti_credentials/__init__.py delete mode 100644 flat_api/paths/organizations_lti_credentials/get.py delete mode 100644 flat_api/paths/organizations_lti_credentials/get.pyi delete mode 100644 flat_api/paths/organizations_lti_credentials/post.py delete mode 100644 flat_api/paths/organizations_lti_credentials/post.pyi delete mode 100644 flat_api/paths/organizations_lti_credentials_credentials/__init__.py delete mode 100644 flat_api/paths/organizations_lti_credentials_credentials/delete.py delete mode 100644 flat_api/paths/organizations_lti_credentials_credentials/delete.pyi delete mode 100644 flat_api/paths/organizations_users/__init__.py delete mode 100644 flat_api/paths/organizations_users/get.py delete mode 100644 flat_api/paths/organizations_users/get.pyi delete mode 100644 flat_api/paths/organizations_users/post.py delete mode 100644 flat_api/paths/organizations_users/post.pyi delete mode 100644 flat_api/paths/organizations_users_count/__init__.py delete mode 100644 flat_api/paths/organizations_users_count/get.py delete mode 100644 flat_api/paths/organizations_users_count/get.pyi delete mode 100644 flat_api/paths/organizations_users_user/__init__.py delete mode 100644 flat_api/paths/organizations_users_user/delete.py delete mode 100644 flat_api/paths/organizations_users_user/delete.pyi delete mode 100644 flat_api/paths/organizations_users_user/put.py delete mode 100644 flat_api/paths/organizations_users_user/put.pyi delete mode 100644 flat_api/paths/organizations_users_user_access_token/__init__.py delete mode 100644 flat_api/paths/organizations_users_user_access_token/post.py delete mode 100644 flat_api/paths/organizations_users_user_access_token/post.pyi delete mode 100644 flat_api/paths/organizations_users_user_signin_link/__init__.py delete mode 100644 flat_api/paths/organizations_users_user_signin_link/post.py delete mode 100644 flat_api/paths/organizations_users_user_signin_link/post.pyi delete mode 100644 flat_api/paths/scores/__init__.py delete mode 100644 flat_api/paths/scores/post.py delete mode 100644 flat_api/paths/scores/post.pyi delete mode 100644 flat_api/paths/scores_score/__init__.py delete mode 100644 flat_api/paths/scores_score/delete.py delete mode 100644 flat_api/paths/scores_score/delete.pyi delete mode 100644 flat_api/paths/scores_score/get.py delete mode 100644 flat_api/paths/scores_score/get.pyi delete mode 100644 flat_api/paths/scores_score/put.py delete mode 100644 flat_api/paths/scores_score/put.pyi delete mode 100644 flat_api/paths/scores_score_collaborators/__init__.py delete mode 100644 flat_api/paths/scores_score_collaborators/get.py delete mode 100644 flat_api/paths/scores_score_collaborators/get.pyi delete mode 100644 flat_api/paths/scores_score_collaborators/post.py delete mode 100644 flat_api/paths/scores_score_collaborators/post.pyi delete mode 100644 flat_api/paths/scores_score_collaborators_collaborator/__init__.py delete mode 100644 flat_api/paths/scores_score_collaborators_collaborator/delete.py delete mode 100644 flat_api/paths/scores_score_collaborators_collaborator/delete.pyi delete mode 100644 flat_api/paths/scores_score_collaborators_collaborator/get.py delete mode 100644 flat_api/paths/scores_score_collaborators_collaborator/get.pyi delete mode 100644 flat_api/paths/scores_score_comments/__init__.py delete mode 100644 flat_api/paths/scores_score_comments/get.py delete mode 100644 flat_api/paths/scores_score_comments/get.pyi delete mode 100644 flat_api/paths/scores_score_comments/post.py delete mode 100644 flat_api/paths/scores_score_comments/post.pyi delete mode 100644 flat_api/paths/scores_score_comments_comment/__init__.py delete mode 100644 flat_api/paths/scores_score_comments_comment/delete.py delete mode 100644 flat_api/paths/scores_score_comments_comment/delete.pyi delete mode 100644 flat_api/paths/scores_score_comments_comment/put.py delete mode 100644 flat_api/paths/scores_score_comments_comment/put.pyi delete mode 100644 flat_api/paths/scores_score_comments_comment_resolved/__init__.py delete mode 100644 flat_api/paths/scores_score_comments_comment_resolved/delete.py delete mode 100644 flat_api/paths/scores_score_comments_comment_resolved/delete.pyi delete mode 100644 flat_api/paths/scores_score_comments_comment_resolved/put.py delete mode 100644 flat_api/paths/scores_score_comments_comment_resolved/put.pyi delete mode 100644 flat_api/paths/scores_score_fork/__init__.py delete mode 100644 flat_api/paths/scores_score_fork/post.py delete mode 100644 flat_api/paths/scores_score_fork/post.pyi delete mode 100644 flat_api/paths/scores_score_revisions/__init__.py delete mode 100644 flat_api/paths/scores_score_revisions/get.py delete mode 100644 flat_api/paths/scores_score_revisions/get.pyi delete mode 100644 flat_api/paths/scores_score_revisions/post.py delete mode 100644 flat_api/paths/scores_score_revisions/post.pyi delete mode 100644 flat_api/paths/scores_score_revisions_revision/__init__.py delete mode 100644 flat_api/paths/scores_score_revisions_revision/get.py delete mode 100644 flat_api/paths/scores_score_revisions_revision/get.pyi delete mode 100644 flat_api/paths/scores_score_revisions_revision_format/__init__.py delete mode 100644 flat_api/paths/scores_score_revisions_revision_format/get.py delete mode 100644 flat_api/paths/scores_score_revisions_revision_format/get.pyi delete mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/__init__.py delete mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/post.py delete mode 100644 flat_api/paths/scores_score_revisions_revision_format_task/post.pyi delete mode 100644 flat_api/paths/scores_score_submissions/__init__.py delete mode 100644 flat_api/paths/scores_score_submissions/get.py delete mode 100644 flat_api/paths/scores_score_submissions/get.pyi delete mode 100644 flat_api/paths/scores_score_tracks/__init__.py delete mode 100644 flat_api/paths/scores_score_tracks/get.py delete mode 100644 flat_api/paths/scores_score_tracks/get.pyi delete mode 100644 flat_api/paths/scores_score_tracks/post.py delete mode 100644 flat_api/paths/scores_score_tracks/post.pyi delete mode 100644 flat_api/paths/scores_score_tracks_track/__init__.py delete mode 100644 flat_api/paths/scores_score_tracks_track/delete.py delete mode 100644 flat_api/paths/scores_score_tracks_track/delete.pyi delete mode 100644 flat_api/paths/scores_score_tracks_track/get.py delete mode 100644 flat_api/paths/scores_score_tracks_track/get.pyi delete mode 100644 flat_api/paths/scores_score_tracks_track/put.py delete mode 100644 flat_api/paths/scores_score_tracks_track/put.pyi delete mode 100644 flat_api/paths/scores_score_untrash/__init__.py delete mode 100644 flat_api/paths/scores_score_untrash/post.py delete mode 100644 flat_api/paths/scores_score_untrash/post.pyi delete mode 100644 flat_api/paths/tasks_task/__init__.py delete mode 100644 flat_api/paths/tasks_task/get.py delete mode 100644 flat_api/paths/tasks_task/get.pyi delete mode 100644 flat_api/paths/users_user/__init__.py delete mode 100644 flat_api/paths/users_user/get.py delete mode 100644 flat_api/paths/users_user/get.pyi delete mode 100644 flat_api/paths/users_user_likes/__init__.py delete mode 100644 flat_api/paths/users_user_likes/get.py delete mode 100644 flat_api/paths/users_user_likes/get.pyi delete mode 100644 flat_api/paths/users_user_scores/__init__.py delete mode 100644 flat_api/paths/users_user_scores/get.py delete mode 100644 flat_api/paths/users_user_scores/get.pyi delete mode 100644 flat_api/schemas.py create mode 100644 pyproject.toml rename test/{test_models/test_class_assignment.py => test_account_api.py} (82%) rename test/{test_models => }/test_api_access_token.py (84%) rename test/{test_models => }/test_app_scopes.py (87%) rename test/{test_models => }/test_assignment.py (75%) rename test/{test_models => }/test_assignment_copy.py (87%) create mode 100644 test/test_assignment_copy_response.py create mode 100644 test/test_assignment_copy_response_capabilities.py create mode 100644 test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py create mode 100644 test/test_assignment_submission.py rename test/{test_models => }/test_assignment_submission_comment.py (86%) rename test/{test_models => }/test_assignment_submission_comment_creation.py (85%) create mode 100644 test/test_assignment_submission_history.py create mode 100644 test/test_assignment_submission_history_attachment.py rename test/{test_models => }/test_assignment_submission_history_state.py (85%) rename test/{test_models => }/test_assignment_submission_state.py (86%) rename test/{test_models => }/test_assignment_submission_update.py (76%) create mode 100644 test/test_assignment_submission_update_comments.py rename test/{test_models => }/test_assignment_type.py (87%) rename test/{test_models => }/test_assignment_update.py (79%) create mode 100644 test/test_class_api.py create mode 100644 test/test_class_assignment.py create mode 100644 test/test_class_assignment_canvas.py create mode 100644 test/test_class_assignment_lti.py create mode 100644 test/test_class_assignment_mfc.py rename test/{test_models => }/test_class_assignment_update.py (68%) create mode 100644 test/test_class_assignment_update_google_classroom.py create mode 100644 test/test_class_assignment_update_microsoft_graph.py rename test/{test_models => }/test_class_attachment_creation.py (82%) rename test/{test_models => }/test_class_creation.py (80%) rename test/{test_models => }/test_class_details.py (54%) create mode 100644 test/test_class_details_canvas.py create mode 100644 test/test_class_details_clever.py create mode 100644 test/test_class_details_google_classroom.py create mode 100644 test/test_class_details_google_drive.py create mode 100644 test/test_class_details_issues.py create mode 100644 test/test_class_details_issues_sync_inner.py create mode 100644 test/test_class_details_lti.py create mode 100644 test/test_class_details_mfc.py create mode 100644 test/test_class_details_microsoft_graph.py rename test/{test_models => }/test_class_grade_level.py (87%) rename test/{test_models => }/test_class_roles.py (87%) rename test/{test_models => }/test_class_state.py (87%) rename test/{test_models => }/test_class_update.py (80%) rename test/{test_models => }/test_collection.py (65%) create mode 100644 test/test_collection_api.py rename test/{test_models => }/test_collection_app.py (87%) create mode 100644 test/test_collection_capabilities.py rename test/{test_models => }/test_collection_creation.py (83%) rename test/{test_models => }/test_collection_modification.py (82%) rename test/{test_models => }/test_collection_privacy.py (87%) rename test/{test_models => }/test_collection_type.py (87%) rename test/{test_models => }/test_edu_library.py (87%) rename test/{test_models => }/test_edu_resource.py (72%) create mode 100644 test/test_edu_resource_capabilities.py rename test/{test_models => }/test_edu_resource_copy.py (87%) rename test/{test_models => }/test_edu_resource_creation.py (83%) rename test/{test_models => }/test_edu_resource_move.py (87%) rename test/{test_models => }/test_edu_resource_privacy.py (87%) create mode 100644 test/test_edu_resource_resource.py rename test/{test_models => }/test_edu_resource_type.py (87%) rename test/{test_models => }/test_edu_resource_update.py (87%) rename test/{test_models => }/test_edu_resource_use_in_class.py (86%) create mode 100644 test/test_edu_resources_api.py rename test/{test_models => }/test_edu_skills_focused.py (87%) rename test/{test_models => }/test_flat_error_response.py (87%) rename test/{test_models => }/test_flat_locales.py (87%) rename test/{test_models => }/test_google_classroom_coursework.py (86%) rename test/{test_models => }/test_google_classroom_submission.py (86%) rename test/{test_models => }/test_group.py (88%) create mode 100644 test/test_group_api.py rename test/{test_models => }/test_group_details.py (84%) rename test/{test_models => }/test_group_type.py (87%) rename test/{test_models => }/test_license_mode.py (87%) rename test/{test_models => }/test_license_sources.py (87%) rename test/{test_models => }/test_lms_name.py (88%) rename test/{test_models => }/test_lti_credentials.py (84%) rename test/{test_models => }/test_lti_credentials_creation.py (84%) rename test/{test_models => }/test_media_attachment.py (82%) rename test/{test_models => }/test_media_score_sharing_mode.py (86%) rename test/{test_models => }/test_microsoft_graph_assignment.py (86%) rename test/{test_models => }/test_microsoft_graph_submission.py (86%) delete mode 100644 test/test_models/__init__.py create mode 100644 test/test_organization_api.py rename test/{test_models => }/test_organization_invitation.py (82%) rename test/{test_models => }/test_organization_invitation_creation.py (82%) rename test/{test_models => }/test_organization_roles.py (87%) rename test/{test_models => }/test_organization_user_access_token_creation.py (83%) delete mode 100644 test/test_paths/__init__.py delete mode 100644 test/test_paths/test_classes/__init__.py delete mode 100644 test/test_paths/test_classes/test_get.py delete mode 100644 test/test_paths/test_classes/test_post.py delete mode 100644 test/test_paths/test_classes_class/__init__.py delete mode 100644 test/test_paths/test_classes_class/test_get.py delete mode 100644 test/test_paths/test_classes_class/test_put.py delete mode 100644 test/test_paths/test_classes_class_activate/__init__.py delete mode 100644 test/test_paths/test_classes_class_activate/test_post.py delete mode 100644 test/test_paths/test_classes_class_archive/__init__.py delete mode 100644 test/test_paths/test_classes_class_archive/test_delete.py delete mode 100644 test/test_paths/test_classes_class_archive/test_post.py delete mode 100644 test/test_paths/test_classes_class_assignments/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments/test_post.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py delete mode 100644 test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py delete mode 100644 test/test_paths/test_classes_class_students_user_submissions/__init__.py delete mode 100644 test/test_paths/test_classes_class_students_user_submissions/test_get.py delete mode 100644 test/test_paths/test_classes_class_test_student/__init__.py delete mode 100644 test/test_paths/test_classes_class_test_student/test_post.py delete mode 100644 test/test_paths/test_classes_class_users_user/__init__.py delete mode 100644 test/test_paths/test_classes_class_users_user/test_delete.py delete mode 100644 test/test_paths/test_classes_class_users_user/test_put.py delete mode 100644 test/test_paths/test_classes_enroll_enrollment_code/__init__.py delete mode 100644 test/test_paths/test_classes_enroll_enrollment_code/test_post.py delete mode 100644 test/test_paths/test_collections/__init__.py delete mode 100644 test/test_paths/test_collections/test_get.py delete mode 100644 test/test_paths/test_collections/test_post.py delete mode 100644 test/test_paths/test_collections_collection/__init__.py delete mode 100644 test/test_paths/test_collections_collection/test_delete.py delete mode 100644 test/test_paths/test_collections_collection/test_get.py delete mode 100644 test/test_paths/test_collections_collection/test_put.py delete mode 100644 test/test_paths/test_collections_collection_scores/__init__.py delete mode 100644 test/test_paths/test_collections_collection_scores/test_get.py delete mode 100644 test/test_paths/test_collections_collection_scores_score/__init__.py delete mode 100644 test/test_paths/test_collections_collection_scores_score/test_delete.py delete mode 100644 test/test_paths/test_collections_collection_scores_score/test_put.py delete mode 100644 test/test_paths/test_collections_collection_untrash/__init__.py delete mode 100644 test/test_paths/test_collections_collection_untrash/test_post.py delete mode 100644 test/test_paths/test_edu_resources/__init__.py delete mode 100644 test/test_paths/test_edu_resources/test_get.py delete mode 100644 test/test_paths/test_edu_resources/test_post.py delete mode 100644 test/test_paths/test_edu_resources_libraries/__init__.py delete mode 100644 test/test_paths/test_edu_resources_libraries/test_get.py delete mode 100644 test/test_paths/test_edu_resources_resource/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource/test_delete.py delete mode 100644 test/test_paths/test_edu_resources_resource/test_get.py delete mode 100644 test/test_paths/test_edu_resources_resource/test_put.py delete mode 100644 test/test_paths/test_edu_resources_resource_assignment/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource_assignment/test_put.py delete mode 100644 test/test_paths/test_edu_resources_resource_copy/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource_copy/test_post.py delete mode 100644 test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py delete mode 100644 test/test_paths/test_edu_resources_resource_move/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource_move/test_post.py delete mode 100644 test/test_paths/test_edu_resources_resource_use_in_class/__init__.py delete mode 100644 test/test_paths/test_edu_resources_resource_use_in_class/test_post.py delete mode 100644 test/test_paths/test_groups_group/__init__.py delete mode 100644 test/test_paths/test_groups_group/test_get.py delete mode 100644 test/test_paths/test_groups_group_scores/__init__.py delete mode 100644 test/test_paths/test_groups_group_scores/test_get.py delete mode 100644 test/test_paths/test_groups_group_users/__init__.py delete mode 100644 test/test_paths/test_groups_group_users/test_get.py delete mode 100644 test/test_paths/test_me/__init__.py delete mode 100644 test/test_paths/test_me/test_get.py delete mode 100644 test/test_paths/test_organizations_invitations/__init__.py delete mode 100644 test/test_paths/test_organizations_invitations/test_get.py delete mode 100644 test/test_paths/test_organizations_invitations/test_post.py delete mode 100644 test/test_paths/test_organizations_invitations_invitation/__init__.py delete mode 100644 test/test_paths/test_organizations_invitations_invitation/test_delete.py delete mode 100644 test/test_paths/test_organizations_lti_credentials/__init__.py delete mode 100644 test/test_paths/test_organizations_lti_credentials/test_get.py delete mode 100644 test/test_paths/test_organizations_lti_credentials/test_post.py delete mode 100644 test/test_paths/test_organizations_lti_credentials_credentials/__init__.py delete mode 100644 test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py delete mode 100644 test/test_paths/test_organizations_users/__init__.py delete mode 100644 test/test_paths/test_organizations_users/test_get.py delete mode 100644 test/test_paths/test_organizations_users/test_post.py delete mode 100644 test/test_paths/test_organizations_users_count/__init__.py delete mode 100644 test/test_paths/test_organizations_users_count/test_get.py delete mode 100644 test/test_paths/test_organizations_users_user/__init__.py delete mode 100644 test/test_paths/test_organizations_users_user/test_delete.py delete mode 100644 test/test_paths/test_organizations_users_user/test_put.py delete mode 100644 test/test_paths/test_organizations_users_user_access_token/__init__.py delete mode 100644 test/test_paths/test_organizations_users_user_access_token/test_post.py delete mode 100644 test/test_paths/test_organizations_users_user_signin_link/__init__.py delete mode 100644 test/test_paths/test_organizations_users_user_signin_link/test_post.py delete mode 100644 test/test_paths/test_scores/__init__.py delete mode 100644 test/test_paths/test_scores/test_post.py delete mode 100644 test/test_paths/test_scores_score/__init__.py delete mode 100644 test/test_paths/test_scores_score/test_delete.py delete mode 100644 test/test_paths/test_scores_score/test_get.py delete mode 100644 test/test_paths/test_scores_score/test_put.py delete mode 100644 test/test_paths/test_scores_score_collaborators/__init__.py delete mode 100644 test/test_paths/test_scores_score_collaborators/test_get.py delete mode 100644 test/test_paths/test_scores_score_collaborators/test_post.py delete mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/__init__.py delete mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py delete mode 100644 test/test_paths/test_scores_score_collaborators_collaborator/test_get.py delete mode 100644 test/test_paths/test_scores_score_comments/__init__.py delete mode 100644 test/test_paths/test_scores_score_comments/test_get.py delete mode 100644 test/test_paths/test_scores_score_comments/test_post.py delete mode 100644 test/test_paths/test_scores_score_comments_comment/__init__.py delete mode 100644 test/test_paths/test_scores_score_comments_comment/test_delete.py delete mode 100644 test/test_paths/test_scores_score_comments_comment/test_put.py delete mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/__init__.py delete mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py delete mode 100644 test/test_paths/test_scores_score_comments_comment_resolved/test_put.py delete mode 100644 test/test_paths/test_scores_score_fork/__init__.py delete mode 100644 test/test_paths/test_scores_score_fork/test_post.py delete mode 100644 test/test_paths/test_scores_score_revisions/__init__.py delete mode 100644 test/test_paths/test_scores_score_revisions/test_get.py delete mode 100644 test/test_paths/test_scores_score_revisions/test_post.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision/__init__.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision/test_get.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision_format/__init__.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision_format/test_get.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py delete mode 100644 test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py delete mode 100644 test/test_paths/test_scores_score_submissions/__init__.py delete mode 100644 test/test_paths/test_scores_score_submissions/test_get.py delete mode 100644 test/test_paths/test_scores_score_tracks/__init__.py delete mode 100644 test/test_paths/test_scores_score_tracks/test_get.py delete mode 100644 test/test_paths/test_scores_score_tracks/test_post.py delete mode 100644 test/test_paths/test_scores_score_tracks_track/__init__.py delete mode 100644 test/test_paths/test_scores_score_tracks_track/test_delete.py delete mode 100644 test/test_paths/test_scores_score_tracks_track/test_get.py delete mode 100644 test/test_paths/test_scores_score_tracks_track/test_put.py delete mode 100644 test/test_paths/test_scores_score_untrash/__init__.py delete mode 100644 test/test_paths/test_scores_score_untrash/test_post.py delete mode 100644 test/test_paths/test_tasks_task/__init__.py delete mode 100644 test/test_paths/test_tasks_task/test_get.py delete mode 100644 test/test_paths/test_users_user/__init__.py delete mode 100644 test/test_paths/test_users_user/test_get.py delete mode 100644 test/test_paths/test_users_user_likes/__init__.py delete mode 100644 test/test_paths/test_users_user_likes/test_get.py delete mode 100644 test/test_paths/test_users_user_scores/__init__.py delete mode 100644 test/test_paths/test_users_user_scores/test_get.py rename test/{test_models => }/test_resource_collaborator.py (81%) rename test/{test_models => }/test_resource_collaborator_creation.py (86%) rename test/{test_models => }/test_resource_rights.py (87%) create mode 100644 test/test_score_api.py rename test/{test_models => }/test_score_comment.py (78%) rename test/{test_models => }/test_score_comment_context.py (87%) rename test/{test_models => }/test_score_comment_creation.py (82%) create mode 100644 test/test_score_comment_moderation.py rename test/{test_models => }/test_score_comment_update.py (82%) rename test/{test_models => }/test_score_comments_counts.py (87%) rename test/{test_models => }/test_score_creation.py (76%) create mode 100644 test/test_score_creation_builder_data.py create mode 100644 test/test_score_creation_builder_data_layout_data.py create mode 100644 test/test_score_creation_builder_data_score_data.py create mode 100644 test/test_score_creation_builder_data_score_data_instruments_inner.py rename test/{test_models => }/test_score_creation_type.py (87%) rename test/{test_models => }/test_score_details.py (59%) rename test/{test_models => }/test_score_fork.py (87%) rename test/{test_models => }/test_score_license.py (87%) rename test/{test_models => }/test_score_likes_counts.py (87%) rename test/{test_models => }/test_score_modification.py (77%) rename test/{test_models => }/test_score_plays_counts.py (87%) rename test/{test_models => }/test_score_privacy.py (87%) rename test/{test_models => }/test_score_revision.py (82%) rename test/{test_models => }/test_score_revision_creation.py (86%) rename test/{test_models => }/test_score_revision_statistics.py (86%) rename test/{test_models => }/test_score_source.py (87%) rename test/{test_models => }/test_score_track.py (77%) rename test/{test_models => }/test_score_track_creation.py (79%) rename test/{test_models => }/test_score_track_point.py (87%) rename test/{test_models => }/test_score_track_state.py (87%) rename test/{test_models => }/test_score_track_type.py (87%) rename test/{test_models => }/test_score_track_update.py (80%) rename test/{test_models => }/test_score_views_counts.py (87%) rename test/{test_models => }/test_task.py (81%) rename test/{test_models/test_assignment_copy_response.py => test_task_api.py} (84%) rename test/{test_models => }/test_task_export_options.py (87%) rename test/{test_models/test_assignment_submission_history.py => test_task_progress.py} (81%) rename test/{test_models/test_assignment_submission.py => test_task_result.py} (82%) rename test/{test_models => }/test_user_admin_update.py (83%) create mode 100644 test/test_user_api.py rename test/{test_models => }/test_user_azure_details.py (87%) rename test/{test_models => }/test_user_community_profile_links.py (86%) rename test/{test_models => }/test_user_creation.py (84%) rename test/{test_models => }/test_user_details.py (70%) rename test/{test_models => }/test_user_details_admin.py (76%) create mode 100644 test/test_user_details_admin_license.py rename test/{test_models => }/test_user_public.py (76%) rename test/{test_models => }/test_user_public_summary.py (80%) rename test/{test_models => }/test_user_signin_link.py (87%) rename test/{test_models => }/test_user_signin_link_creation.py (86%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index 2831039..0000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python package - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Test - run: | - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=flat_api diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..bf7d8a6 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,37 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: flat_api Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + #- name: Lint with flake8 + # run: | + # # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 21132e1..666cfae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,9 +10,6 @@ stages: - pip install -r test-requirements.txt - pytest --cov=flat_api -test-3.5: - extends: .tests - image: python:3.5-alpine test-3.6: extends: .tests image: python:3.6-alpine @@ -22,3 +19,6 @@ test-3.7: test-3.8: extends: .tests image: python:3.8-alpine +test-3.9: + extends: .tests + image: python:3.9-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b199c04..9f9563b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,431 +1,428 @@ .gitlab-ci.yml README.md -docs/apis/tags/AccountApi.md -docs/apis/tags/CollectionApi.md -docs/apis/tags/EduResourcesApi.md -docs/apis/tags/GroupApi.md -docs/apis/tags/ModelClassApi.md -docs/apis/tags/OrganizationApi.md -docs/apis/tags/ScoreApi.md -docs/apis/tags/TaskApi.md -docs/apis/tags/UserApi.md -docs/models/ApiAccessToken.md -docs/models/AppScopes.md -docs/models/Assignment.md -docs/models/AssignmentCopy.md -docs/models/AssignmentCopyResponse.md -docs/models/AssignmentSubmission.md -docs/models/AssignmentSubmissionComment.md -docs/models/AssignmentSubmissionCommentCreation.md -docs/models/AssignmentSubmissionHistory.md -docs/models/AssignmentSubmissionHistoryState.md -docs/models/AssignmentSubmissionState.md -docs/models/AssignmentSubmissionUpdate.md -docs/models/AssignmentType.md -docs/models/AssignmentUpdate.md -docs/models/ClassAssignment.md -docs/models/ClassAssignmentUpdate.md -docs/models/ClassAttachmentCreation.md -docs/models/ClassCreation.md -docs/models/ClassDetails.md -docs/models/ClassGradeLevel.md -docs/models/ClassRoles.md -docs/models/ClassState.md -docs/models/ClassUpdate.md -docs/models/Collection.md -docs/models/CollectionApp.md -docs/models/CollectionCreation.md -docs/models/CollectionModification.md -docs/models/CollectionPrivacy.md -docs/models/CollectionType.md -docs/models/EduLibrary.md -docs/models/EduResource.md -docs/models/EduResourceCopy.md -docs/models/EduResourceCreation.md -docs/models/EduResourceMove.md -docs/models/EduResourcePrivacy.md -docs/models/EduResourceType.md -docs/models/EduResourceUpdate.md -docs/models/EduResourceUseInClass.md -docs/models/EduSkillsFocused.md -docs/models/FlatErrorResponse.md -docs/models/FlatLocales.md -docs/models/GoogleClassroomCoursework.md -docs/models/GoogleClassroomSubmission.md -docs/models/Group.md -docs/models/GroupDetails.md -docs/models/GroupType.md -docs/models/LicenseMode.md -docs/models/LicenseSources.md -docs/models/LmsName.md -docs/models/LtiCredentials.md -docs/models/LtiCredentialsCreation.md -docs/models/MediaAttachment.md -docs/models/MediaScoreSharingMode.md -docs/models/MicrosoftGraphAssignment.md -docs/models/MicrosoftGraphSubmission.md -docs/models/OrganizationInvitation.md -docs/models/OrganizationInvitationCreation.md -docs/models/OrganizationRoles.md -docs/models/OrganizationUserAccessTokenCreation.md -docs/models/ResourceCollaborator.md -docs/models/ResourceCollaboratorCreation.md -docs/models/ResourceRights.md -docs/models/ScoreComment.md -docs/models/ScoreCommentContext.md -docs/models/ScoreCommentCreation.md -docs/models/ScoreCommentUpdate.md -docs/models/ScoreCommentsCounts.md -docs/models/ScoreCreation.md -docs/models/ScoreCreationType.md -docs/models/ScoreDetails.md -docs/models/ScoreFork.md -docs/models/ScoreLicense.md -docs/models/ScoreLikesCounts.md -docs/models/ScoreModification.md -docs/models/ScorePlaysCounts.md -docs/models/ScorePrivacy.md -docs/models/ScoreRevision.md -docs/models/ScoreRevisionCreation.md -docs/models/ScoreRevisionStatistics.md -docs/models/ScoreSource.md -docs/models/ScoreTrack.md -docs/models/ScoreTrackCreation.md -docs/models/ScoreTrackPoint.md -docs/models/ScoreTrackState.md -docs/models/ScoreTrackType.md -docs/models/ScoreTrackUpdate.md -docs/models/ScoreViewsCounts.md -docs/models/Task.md -docs/models/TaskExportOptions.md -docs/models/UserAdminUpdate.md -docs/models/UserAzureDetails.md -docs/models/UserCommunityProfileLinks.md -docs/models/UserCreation.md -docs/models/UserDetails.md -docs/models/UserDetailsAdmin.md -docs/models/UserPublic.md -docs/models/UserPublicSummary.md -docs/models/UserSigninLink.md -docs/models/UserSigninLinkCreation.md +docs/AccountApi.md +docs/ApiAccessToken.md +docs/AppScopes.md +docs/Assignment.md +docs/AssignmentCopy.md +docs/AssignmentCopyResponse.md +docs/AssignmentCopyResponseCapabilities.md +docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md +docs/AssignmentSubmission.md +docs/AssignmentSubmissionComment.md +docs/AssignmentSubmissionCommentCreation.md +docs/AssignmentSubmissionHistory.md +docs/AssignmentSubmissionHistoryAttachment.md +docs/AssignmentSubmissionHistoryState.md +docs/AssignmentSubmissionState.md +docs/AssignmentSubmissionUpdate.md +docs/AssignmentSubmissionUpdateComments.md +docs/AssignmentType.md +docs/AssignmentUpdate.md +docs/ClassApi.md +docs/ClassAssignment.md +docs/ClassAssignmentCanvas.md +docs/ClassAssignmentLti.md +docs/ClassAssignmentMfc.md +docs/ClassAssignmentUpdate.md +docs/ClassAssignmentUpdateGoogleClassroom.md +docs/ClassAssignmentUpdateMicrosoftGraph.md +docs/ClassAttachmentCreation.md +docs/ClassCreation.md +docs/ClassDetails.md +docs/ClassDetailsCanvas.md +docs/ClassDetailsClever.md +docs/ClassDetailsGoogleClassroom.md +docs/ClassDetailsGoogleDrive.md +docs/ClassDetailsIssues.md +docs/ClassDetailsIssuesSyncInner.md +docs/ClassDetailsLti.md +docs/ClassDetailsMfc.md +docs/ClassDetailsMicrosoftGraph.md +docs/ClassGradeLevel.md +docs/ClassRoles.md +docs/ClassState.md +docs/ClassUpdate.md +docs/Collection.md +docs/CollectionApi.md +docs/CollectionApp.md +docs/CollectionCapabilities.md +docs/CollectionCreation.md +docs/CollectionModification.md +docs/CollectionPrivacy.md +docs/CollectionType.md +docs/EduLibrary.md +docs/EduResource.md +docs/EduResourceCapabilities.md +docs/EduResourceCopy.md +docs/EduResourceCreation.md +docs/EduResourceMove.md +docs/EduResourcePrivacy.md +docs/EduResourceResource.md +docs/EduResourceType.md +docs/EduResourceUpdate.md +docs/EduResourceUseInClass.md +docs/EduResourcesApi.md +docs/EduSkillsFocused.md +docs/FlatErrorResponse.md +docs/FlatLocales.md +docs/GoogleClassroomCoursework.md +docs/GoogleClassroomSubmission.md +docs/Group.md +docs/GroupApi.md +docs/GroupDetails.md +docs/GroupType.md +docs/LicenseMode.md +docs/LicenseSources.md +docs/LmsName.md +docs/LtiCredentials.md +docs/LtiCredentialsCreation.md +docs/MediaAttachment.md +docs/MediaScoreSharingMode.md +docs/MicrosoftGraphAssignment.md +docs/MicrosoftGraphSubmission.md +docs/OrganizationApi.md +docs/OrganizationInvitation.md +docs/OrganizationInvitationCreation.md +docs/OrganizationRoles.md +docs/OrganizationUserAccessTokenCreation.md +docs/ResourceCollaborator.md +docs/ResourceCollaboratorCreation.md +docs/ResourceRights.md +docs/ScoreApi.md +docs/ScoreComment.md +docs/ScoreCommentContext.md +docs/ScoreCommentCreation.md +docs/ScoreCommentModeration.md +docs/ScoreCommentUpdate.md +docs/ScoreCommentsCounts.md +docs/ScoreCreation.md +docs/ScoreCreationBuilderData.md +docs/ScoreCreationBuilderDataLayoutData.md +docs/ScoreCreationBuilderDataScoreData.md +docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md +docs/ScoreCreationType.md +docs/ScoreDetails.md +docs/ScoreFork.md +docs/ScoreLicense.md +docs/ScoreLikesCounts.md +docs/ScoreModification.md +docs/ScorePlaysCounts.md +docs/ScorePrivacy.md +docs/ScoreRevision.md +docs/ScoreRevisionCreation.md +docs/ScoreRevisionStatistics.md +docs/ScoreSource.md +docs/ScoreTrack.md +docs/ScoreTrackCreation.md +docs/ScoreTrackPoint.md +docs/ScoreTrackState.md +docs/ScoreTrackType.md +docs/ScoreTrackUpdate.md +docs/ScoreViewsCounts.md +docs/Task.md +docs/TaskApi.md +docs/TaskExportOptions.md +docs/TaskProgress.md +docs/TaskResult.md +docs/UserAdminUpdate.md +docs/UserApi.md +docs/UserAzureDetails.md +docs/UserCommunityProfileLinks.md +docs/UserCreation.md +docs/UserDetails.md +docs/UserDetailsAdmin.md +docs/UserDetailsAdminLicense.md +docs/UserPublic.md +docs/UserPublicSummary.md +docs/UserSigninLink.md +docs/UserSigninLinkCreation.md flat_api/__init__.py +flat_api/api/__init__.py +flat_api/api/account_api.py +flat_api/api/class_api.py +flat_api/api/collection_api.py +flat_api/api/edu_resources_api.py +flat_api/api/group_api.py +flat_api/api/organization_api.py +flat_api/api/score_api.py +flat_api/api/task_api.py +flat_api/api/user_api.py flat_api/api_client.py flat_api/apis/__init__.py -flat_api/apis/tags/account_api.py -flat_api/apis/tags/collection_api.py -flat_api/apis/tags/edu_resources_api.py -flat_api/apis/tags/group_api.py -flat_api/apis/tags/model_class_api.py -flat_api/apis/tags/organization_api.py -flat_api/apis/tags/score_api.py -flat_api/apis/tags/task_api.py -flat_api/apis/tags/user_api.py flat_api/configuration.py flat_api/exceptions.py flat_api/model/__init__.py flat_api/model/api_access_token.py -flat_api/model/api_access_token.pyi flat_api/model/app_scopes.py -flat_api/model/app_scopes.pyi flat_api/model/assignment.py -flat_api/model/assignment.pyi flat_api/model/assignment_copy.py -flat_api/model/assignment_copy.pyi flat_api/model/assignment_copy_response.py -flat_api/model/assignment_copy_response.pyi +flat_api/model/assignment_copy_response_capabilities.py +flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py flat_api/model/assignment_submission.py -flat_api/model/assignment_submission.pyi flat_api/model/assignment_submission_comment.py -flat_api/model/assignment_submission_comment.pyi flat_api/model/assignment_submission_comment_creation.py -flat_api/model/assignment_submission_comment_creation.pyi flat_api/model/assignment_submission_history.py -flat_api/model/assignment_submission_history.pyi +flat_api/model/assignment_submission_history_attachment.py flat_api/model/assignment_submission_history_state.py -flat_api/model/assignment_submission_history_state.pyi flat_api/model/assignment_submission_state.py -flat_api/model/assignment_submission_state.pyi flat_api/model/assignment_submission_update.py -flat_api/model/assignment_submission_update.pyi +flat_api/model/assignment_submission_update_comments.py flat_api/model/assignment_type.py -flat_api/model/assignment_type.pyi flat_api/model/assignment_update.py -flat_api/model/assignment_update.pyi flat_api/model/class_assignment.py -flat_api/model/class_assignment.pyi +flat_api/model/class_assignment_canvas.py +flat_api/model/class_assignment_lti.py +flat_api/model/class_assignment_mfc.py flat_api/model/class_assignment_update.py -flat_api/model/class_assignment_update.pyi +flat_api/model/class_assignment_update_google_classroom.py +flat_api/model/class_assignment_update_microsoft_graph.py flat_api/model/class_attachment_creation.py -flat_api/model/class_attachment_creation.pyi flat_api/model/class_creation.py -flat_api/model/class_creation.pyi flat_api/model/class_details.py -flat_api/model/class_details.pyi +flat_api/model/class_details_canvas.py +flat_api/model/class_details_clever.py +flat_api/model/class_details_google_classroom.py +flat_api/model/class_details_google_drive.py +flat_api/model/class_details_issues.py +flat_api/model/class_details_issues_sync_inner.py +flat_api/model/class_details_lti.py +flat_api/model/class_details_mfc.py +flat_api/model/class_details_microsoft_graph.py flat_api/model/class_grade_level.py -flat_api/model/class_grade_level.pyi flat_api/model/class_roles.py -flat_api/model/class_roles.pyi flat_api/model/class_state.py -flat_api/model/class_state.pyi flat_api/model/class_update.py -flat_api/model/class_update.pyi flat_api/model/collection.py -flat_api/model/collection.pyi flat_api/model/collection_app.py -flat_api/model/collection_app.pyi +flat_api/model/collection_capabilities.py flat_api/model/collection_creation.py -flat_api/model/collection_creation.pyi flat_api/model/collection_modification.py -flat_api/model/collection_modification.pyi flat_api/model/collection_privacy.py -flat_api/model/collection_privacy.pyi flat_api/model/collection_type.py -flat_api/model/collection_type.pyi flat_api/model/edu_library.py -flat_api/model/edu_library.pyi flat_api/model/edu_resource.py -flat_api/model/edu_resource.pyi +flat_api/model/edu_resource_capabilities.py flat_api/model/edu_resource_copy.py -flat_api/model/edu_resource_copy.pyi flat_api/model/edu_resource_creation.py -flat_api/model/edu_resource_creation.pyi flat_api/model/edu_resource_move.py -flat_api/model/edu_resource_move.pyi flat_api/model/edu_resource_privacy.py -flat_api/model/edu_resource_privacy.pyi +flat_api/model/edu_resource_resource.py flat_api/model/edu_resource_type.py -flat_api/model/edu_resource_type.pyi flat_api/model/edu_resource_update.py -flat_api/model/edu_resource_update.pyi flat_api/model/edu_resource_use_in_class.py -flat_api/model/edu_resource_use_in_class.pyi flat_api/model/edu_skills_focused.py -flat_api/model/edu_skills_focused.pyi flat_api/model/flat_error_response.py -flat_api/model/flat_error_response.pyi flat_api/model/flat_locales.py -flat_api/model/flat_locales.pyi flat_api/model/google_classroom_coursework.py -flat_api/model/google_classroom_coursework.pyi flat_api/model/google_classroom_submission.py -flat_api/model/google_classroom_submission.pyi flat_api/model/group.py -flat_api/model/group.pyi flat_api/model/group_details.py -flat_api/model/group_details.pyi flat_api/model/group_type.py -flat_api/model/group_type.pyi flat_api/model/license_mode.py -flat_api/model/license_mode.pyi flat_api/model/license_sources.py -flat_api/model/license_sources.pyi flat_api/model/lms_name.py -flat_api/model/lms_name.pyi flat_api/model/lti_credentials.py -flat_api/model/lti_credentials.pyi flat_api/model/lti_credentials_creation.py -flat_api/model/lti_credentials_creation.pyi flat_api/model/media_attachment.py -flat_api/model/media_attachment.pyi flat_api/model/media_score_sharing_mode.py -flat_api/model/media_score_sharing_mode.pyi flat_api/model/microsoft_graph_assignment.py -flat_api/model/microsoft_graph_assignment.pyi flat_api/model/microsoft_graph_submission.py -flat_api/model/microsoft_graph_submission.pyi flat_api/model/organization_invitation.py -flat_api/model/organization_invitation.pyi flat_api/model/organization_invitation_creation.py -flat_api/model/organization_invitation_creation.pyi flat_api/model/organization_roles.py -flat_api/model/organization_roles.pyi flat_api/model/organization_user_access_token_creation.py -flat_api/model/organization_user_access_token_creation.pyi flat_api/model/resource_collaborator.py -flat_api/model/resource_collaborator.pyi flat_api/model/resource_collaborator_creation.py -flat_api/model/resource_collaborator_creation.pyi flat_api/model/resource_rights.py -flat_api/model/resource_rights.pyi flat_api/model/score_comment.py -flat_api/model/score_comment.pyi flat_api/model/score_comment_context.py -flat_api/model/score_comment_context.pyi flat_api/model/score_comment_creation.py -flat_api/model/score_comment_creation.pyi +flat_api/model/score_comment_moderation.py flat_api/model/score_comment_update.py -flat_api/model/score_comment_update.pyi flat_api/model/score_comments_counts.py -flat_api/model/score_comments_counts.pyi flat_api/model/score_creation.py -flat_api/model/score_creation.pyi +flat_api/model/score_creation_builder_data.py +flat_api/model/score_creation_builder_data_layout_data.py +flat_api/model/score_creation_builder_data_score_data.py +flat_api/model/score_creation_builder_data_score_data_instruments_inner.py flat_api/model/score_creation_type.py -flat_api/model/score_creation_type.pyi flat_api/model/score_details.py -flat_api/model/score_details.pyi flat_api/model/score_fork.py -flat_api/model/score_fork.pyi flat_api/model/score_license.py -flat_api/model/score_license.pyi flat_api/model/score_likes_counts.py -flat_api/model/score_likes_counts.pyi flat_api/model/score_modification.py -flat_api/model/score_modification.pyi flat_api/model/score_plays_counts.py -flat_api/model/score_plays_counts.pyi flat_api/model/score_privacy.py -flat_api/model/score_privacy.pyi flat_api/model/score_revision.py -flat_api/model/score_revision.pyi flat_api/model/score_revision_creation.py -flat_api/model/score_revision_creation.pyi flat_api/model/score_revision_statistics.py -flat_api/model/score_revision_statistics.pyi flat_api/model/score_source.py -flat_api/model/score_source.pyi flat_api/model/score_track.py -flat_api/model/score_track.pyi flat_api/model/score_track_creation.py -flat_api/model/score_track_creation.pyi flat_api/model/score_track_point.py -flat_api/model/score_track_point.pyi flat_api/model/score_track_state.py -flat_api/model/score_track_state.pyi flat_api/model/score_track_type.py -flat_api/model/score_track_type.pyi flat_api/model/score_track_update.py -flat_api/model/score_track_update.pyi flat_api/model/score_views_counts.py -flat_api/model/score_views_counts.pyi flat_api/model/task.py -flat_api/model/task.pyi flat_api/model/task_export_options.py -flat_api/model/task_export_options.pyi +flat_api/model/task_progress.py +flat_api/model/task_result.py flat_api/model/user_admin_update.py -flat_api/model/user_admin_update.pyi flat_api/model/user_azure_details.py -flat_api/model/user_azure_details.pyi flat_api/model/user_community_profile_links.py -flat_api/model/user_community_profile_links.pyi flat_api/model/user_creation.py -flat_api/model/user_creation.pyi flat_api/model/user_details.py -flat_api/model/user_details.pyi flat_api/model/user_details_admin.py -flat_api/model/user_details_admin.pyi +flat_api/model/user_details_admin_license.py flat_api/model/user_public.py -flat_api/model/user_public.pyi flat_api/model/user_public_summary.py -flat_api/model/user_public_summary.pyi flat_api/model/user_signin_link.py -flat_api/model/user_signin_link.pyi flat_api/model/user_signin_link_creation.py -flat_api/model/user_signin_link_creation.pyi +flat_api/model_utils.py flat_api/models/__init__.py flat_api/rest.py -flat_api/schemas.py requirements.txt setup.cfg test-requirements.txt test/__init__.py -test/test_models/__init__.py -test/test_models/test_api_access_token.py -test/test_models/test_app_scopes.py -test/test_models/test_assignment.py -test/test_models/test_assignment_copy.py -test/test_models/test_assignment_copy_response.py -test/test_models/test_assignment_submission.py -test/test_models/test_assignment_submission_comment.py -test/test_models/test_assignment_submission_comment_creation.py -test/test_models/test_assignment_submission_history.py -test/test_models/test_assignment_submission_history_state.py -test/test_models/test_assignment_submission_state.py -test/test_models/test_assignment_submission_update.py -test/test_models/test_assignment_type.py -test/test_models/test_assignment_update.py -test/test_models/test_class_assignment.py -test/test_models/test_class_assignment_update.py -test/test_models/test_class_attachment_creation.py -test/test_models/test_class_creation.py -test/test_models/test_class_details.py -test/test_models/test_class_grade_level.py -test/test_models/test_class_roles.py -test/test_models/test_class_state.py -test/test_models/test_class_update.py -test/test_models/test_collection.py -test/test_models/test_collection_app.py -test/test_models/test_collection_creation.py -test/test_models/test_collection_modification.py -test/test_models/test_collection_privacy.py -test/test_models/test_collection_type.py -test/test_models/test_edu_library.py -test/test_models/test_edu_resource.py -test/test_models/test_edu_resource_copy.py -test/test_models/test_edu_resource_creation.py -test/test_models/test_edu_resource_move.py -test/test_models/test_edu_resource_privacy.py -test/test_models/test_edu_resource_type.py -test/test_models/test_edu_resource_update.py -test/test_models/test_edu_resource_use_in_class.py -test/test_models/test_edu_skills_focused.py -test/test_models/test_flat_error_response.py -test/test_models/test_flat_locales.py -test/test_models/test_google_classroom_coursework.py -test/test_models/test_google_classroom_submission.py -test/test_models/test_group.py -test/test_models/test_group_details.py -test/test_models/test_group_type.py -test/test_models/test_license_mode.py -test/test_models/test_license_sources.py -test/test_models/test_lms_name.py -test/test_models/test_lti_credentials.py -test/test_models/test_lti_credentials_creation.py -test/test_models/test_media_attachment.py -test/test_models/test_media_score_sharing_mode.py -test/test_models/test_microsoft_graph_assignment.py -test/test_models/test_microsoft_graph_submission.py -test/test_models/test_organization_invitation.py -test/test_models/test_organization_invitation_creation.py -test/test_models/test_organization_roles.py -test/test_models/test_organization_user_access_token_creation.py -test/test_models/test_resource_collaborator.py -test/test_models/test_resource_collaborator_creation.py -test/test_models/test_resource_rights.py -test/test_models/test_score_comment.py -test/test_models/test_score_comment_context.py -test/test_models/test_score_comment_creation.py -test/test_models/test_score_comment_update.py -test/test_models/test_score_comments_counts.py -test/test_models/test_score_creation.py -test/test_models/test_score_creation_type.py -test/test_models/test_score_details.py -test/test_models/test_score_fork.py -test/test_models/test_score_license.py -test/test_models/test_score_likes_counts.py -test/test_models/test_score_modification.py -test/test_models/test_score_plays_counts.py -test/test_models/test_score_privacy.py -test/test_models/test_score_revision.py -test/test_models/test_score_revision_creation.py -test/test_models/test_score_revision_statistics.py -test/test_models/test_score_source.py -test/test_models/test_score_track.py -test/test_models/test_score_track_creation.py -test/test_models/test_score_track_point.py -test/test_models/test_score_track_state.py -test/test_models/test_score_track_type.py -test/test_models/test_score_track_update.py -test/test_models/test_score_views_counts.py -test/test_models/test_task.py -test/test_models/test_task_export_options.py -test/test_models/test_user_admin_update.py -test/test_models/test_user_azure_details.py -test/test_models/test_user_community_profile_links.py -test/test_models/test_user_creation.py -test/test_models/test_user_details.py -test/test_models/test_user_details_admin.py -test/test_models/test_user_public.py -test/test_models/test_user_public_summary.py -test/test_models/test_user_signin_link.py -test/test_models/test_user_signin_link_creation.py +test/test_account_api.py +test/test_api_access_token.py +test/test_app_scopes.py +test/test_assignment.py +test/test_assignment_copy.py +test/test_assignment_copy_response.py +test/test_assignment_copy_response_capabilities.py +test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py +test/test_assignment_submission.py +test/test_assignment_submission_comment.py +test/test_assignment_submission_comment_creation.py +test/test_assignment_submission_history.py +test/test_assignment_submission_history_attachment.py +test/test_assignment_submission_history_state.py +test/test_assignment_submission_state.py +test/test_assignment_submission_update.py +test/test_assignment_submission_update_comments.py +test/test_assignment_type.py +test/test_assignment_update.py +test/test_class_api.py +test/test_class_assignment.py +test/test_class_assignment_canvas.py +test/test_class_assignment_lti.py +test/test_class_assignment_mfc.py +test/test_class_assignment_update.py +test/test_class_assignment_update_google_classroom.py +test/test_class_assignment_update_microsoft_graph.py +test/test_class_attachment_creation.py +test/test_class_creation.py +test/test_class_details.py +test/test_class_details_canvas.py +test/test_class_details_clever.py +test/test_class_details_google_classroom.py +test/test_class_details_google_drive.py +test/test_class_details_issues.py +test/test_class_details_issues_sync_inner.py +test/test_class_details_lti.py +test/test_class_details_mfc.py +test/test_class_details_microsoft_graph.py +test/test_class_grade_level.py +test/test_class_roles.py +test/test_class_state.py +test/test_class_update.py +test/test_collection.py +test/test_collection_api.py +test/test_collection_app.py +test/test_collection_capabilities.py +test/test_collection_creation.py +test/test_collection_modification.py +test/test_collection_privacy.py +test/test_collection_type.py +test/test_edu_library.py +test/test_edu_resource.py +test/test_edu_resource_capabilities.py +test/test_edu_resource_copy.py +test/test_edu_resource_creation.py +test/test_edu_resource_move.py +test/test_edu_resource_privacy.py +test/test_edu_resource_resource.py +test/test_edu_resource_type.py +test/test_edu_resource_update.py +test/test_edu_resource_use_in_class.py +test/test_edu_resources_api.py +test/test_edu_skills_focused.py +test/test_flat_error_response.py +test/test_flat_locales.py +test/test_google_classroom_coursework.py +test/test_google_classroom_submission.py +test/test_group.py +test/test_group_api.py +test/test_group_details.py +test/test_group_type.py +test/test_license_mode.py +test/test_license_sources.py +test/test_lms_name.py +test/test_lti_credentials.py +test/test_lti_credentials_creation.py +test/test_media_attachment.py +test/test_media_score_sharing_mode.py +test/test_microsoft_graph_assignment.py +test/test_microsoft_graph_submission.py +test/test_organization_api.py +test/test_organization_invitation.py +test/test_organization_invitation_creation.py +test/test_organization_roles.py +test/test_organization_user_access_token_creation.py +test/test_resource_collaborator.py +test/test_resource_collaborator_creation.py +test/test_resource_rights.py +test/test_score_api.py +test/test_score_comment.py +test/test_score_comment_context.py +test/test_score_comment_creation.py +test/test_score_comment_moderation.py +test/test_score_comment_update.py +test/test_score_comments_counts.py +test/test_score_creation.py +test/test_score_creation_builder_data.py +test/test_score_creation_builder_data_layout_data.py +test/test_score_creation_builder_data_score_data.py +test/test_score_creation_builder_data_score_data_instruments_inner.py +test/test_score_creation_type.py +test/test_score_details.py +test/test_score_fork.py +test/test_score_license.py +test/test_score_likes_counts.py +test/test_score_modification.py +test/test_score_plays_counts.py +test/test_score_privacy.py +test/test_score_revision.py +test/test_score_revision_creation.py +test/test_score_revision_statistics.py +test/test_score_source.py +test/test_score_track.py +test/test_score_track_creation.py +test/test_score_track_point.py +test/test_score_track_state.py +test/test_score_track_type.py +test/test_score_track_update.py +test/test_score_views_counts.py +test/test_task.py +test/test_task_api.py +test/test_task_export_options.py +test/test_task_progress.py +test/test_task_result.py +test/test_user_admin_update.py +test/test_user_api.py +test/test_user_azure_details.py +test/test_user_community_profile_links.py +test/test_user_creation.py +test/test_user_details.py +test/test_user_details_admin.py +test/test_user_details_admin_license.py +test/test_user_public.py +test/test_user_public_summary.py +test/test_user_signin_link.py +test/test_user_signin_link_creation.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index cd802a1..757e674 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.0.0-SNAPSHOT \ No newline at end of file diff --git a/README.md b/README.md index 25de9fa..74f7c53 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import flat_api from pprint import pprint -from flat_api.apis.tags import account_api +from flat_api.api import account_api from flat_api.model.flat_error_response import FlatErrorResponse from flat_api.model.user_details import UserDetails # Defining the host is optional and defaults to https://api.flat.io/v2 @@ -72,29 +72,16 @@ configuration = flat_api.Configuration( # Configure OAuth2 access token for authorization: OAuth2 configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' + host = "https://api.flat.io/v2" ) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = account_api.AccountApi(api_client) - only_id = False # bool | Only return the user id (optional) (default to CodegenParameter{isFormParam=false, isQueryParam=true, isPathParam=false, isHeaderParam=false, isCookieParam=false, isBodyParam=false, isContainer=false, isCollectionFormatMulti=false, isPrimitiveType=true, isModel=false, isExplode=true, baseName='onlyId', paramName='only_id', dataType='bool', datatypeWithEnum='null', dataFormat='null', collectionFormat='null', description='Only return the user id', unescapedDescription='Only return the user id', baseType='null', defaultValue='False', enumDefaultValue='null', enumName='null', style='FORM', deepObject='false', allowEmptyValue='false', example='False', jsonSchema='{ - "name" : "onlyId", - "in" : "query", - "description" : "Only return the user id", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "boolean", - "default" : false - } -}', isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isBoolean=true, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isAnyType=false, isArray=false, isMap=false, isFile=false, isEnum=false, isEnumRef=false, _enum=null, allowableValues=null, items=null, mostInnerItems=null, additionalProperties=null, vars=[], requiredVars=[], vendorExtensions={}, hasValidation=false, maxProperties=null, minProperties=null, isNullable=false, isDeprecated=false, required=false, maximum='null', exclusiveMaximum=false, minimum='null', exclusiveMinimum=false, maxLength=null, minLength=null, pattern='null', maxItems=null, minItems=null, uniqueItems=false, uniqueItemsBoolean=null, contentType=null, multipleOf=null, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, schema=CodegenProperty{openApiType='boolean', baseName='OnlyIdSchema', complexType='null', getter='getOnlyId', setter='setOnlyId', description='null', dataType='bool', datatypeWithEnum='bool', dataFormat='null', name='only_id', min='null', max='null', defaultValue='False', defaultValueWithParam=' = data.onlyId;', baseType='bool', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='False', jsonSchema='{ - "type" : "boolean", - "default" : false -}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=true, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='OnlyId', nameInSnakeCase='null', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, content=null, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false}) + only_id = False # bool | Only return the user id (optional) (default to False) try: # Get current user account @@ -110,215 +97,245 @@ All URIs are relative to *https://api.flat.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AccountApi* | [**get_authenticated_user**](docs/apis/tags/AccountApi.md#get_authenticated_user) | **get** /me | Get current user account -*ModelClassApi* | [**activate_class**](docs/apis/tags/ModelClassApi.md#activate_class) | **post** /classes/{class}/activate | Activate the class -*ModelClassApi* | [**add_class_user**](docs/apis/tags/ModelClassApi.md#add_class_user) | **put** /classes/{class}/users/{user} | Add a user to the class -*ModelClassApi* | [**archive_assignment**](docs/apis/tags/ModelClassApi.md#archive_assignment) | **post** /classes/{class}/assignments/{assignment}/archive | Archive the assignment -*ModelClassApi* | [**archive_class**](docs/apis/tags/ModelClassApi.md#archive_class) | **post** /classes/{class}/archive | Archive the class -*ModelClassApi* | [**copy_assignment**](docs/apis/tags/ModelClassApi.md#copy_assignment) | **post** /classes/{class}/assignments/{assignment}/copy | Copy an assignment -*ModelClassApi* | [**create_class**](docs/apis/tags/ModelClassApi.md#create_class) | **post** /classes | Create a new class -*ModelClassApi* | [**create_class_assignment**](docs/apis/tags/ModelClassApi.md#create_class_assignment) | **post** /classes/{class}/assignments | Assignment creation -*ModelClassApi* | [**create_submission**](docs/apis/tags/ModelClassApi.md#create_submission) | **put** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission -*ModelClassApi* | [**create_test_student_account**](docs/apis/tags/ModelClassApi.md#create_test_student_account) | **post** /classes/{class}/testStudent | Create a test student account -*ModelClassApi* | [**delete_class_user**](docs/apis/tags/ModelClassApi.md#delete_class_user) | **delete** /classes/{class}/users/{user} | Remove a user from the class -*ModelClassApi* | [**delete_submission**](docs/apis/tags/ModelClassApi.md#delete_submission) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission -*ModelClassApi* | [**delete_submission_comment**](docs/apis/tags/ModelClassApi.md#delete_submission_comment) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission -*ModelClassApi* | [**edit_submission**](docs/apis/tags/ModelClassApi.md#edit_submission) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission -*ModelClassApi* | [**enroll_class**](docs/apis/tags/ModelClassApi.md#enroll_class) | **post** /classes/enroll/{enrollmentCode} | Join a class -*ModelClassApi* | [**export_submissions_reviews_as_csv**](docs/apis/tags/ModelClassApi.md#export_submissions_reviews_as_csv) | **get** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports -*ModelClassApi* | [**export_submissions_reviews_as_excel**](docs/apis/tags/ModelClassApi.md#export_submissions_reviews_as_excel) | **get** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports -*ModelClassApi* | [**get_class**](docs/apis/tags/ModelClassApi.md#get_class) | **get** /classes/{class} | Get the details of a single class -*ModelClassApi* | [**get_score_submissions**](docs/apis/tags/ModelClassApi.md#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score -*ModelClassApi* | [**get_submission**](docs/apis/tags/ModelClassApi.md#get_submission) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission -*ModelClassApi* | [**get_submission_comments**](docs/apis/tags/ModelClassApi.md#get_submission_comments) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission -*ModelClassApi* | [**get_submission_history**](docs/apis/tags/ModelClassApi.md#get_submission_history) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission -*ModelClassApi* | [**get_submissions**](docs/apis/tags/ModelClassApi.md#get_submissions) | **get** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions -*ModelClassApi* | [**list_assignments**](docs/apis/tags/ModelClassApi.md#list_assignments) | **get** /classes/{class}/assignments | Assignments listing -*ModelClassApi* | [**list_class_student_submissions**](docs/apis/tags/ModelClassApi.md#list_class_student_submissions) | **get** /classes/{class}/students/{user}/submissions | List the submissions for a student -*ModelClassApi* | [**list_classes**](docs/apis/tags/ModelClassApi.md#list_classes) | **get** /classes | List the classes available for the current user -*ModelClassApi* | [**post_submission_comment**](docs/apis/tags/ModelClassApi.md#post_submission_comment) | **post** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission -*ModelClassApi* | [**unarchive_assignment**](docs/apis/tags/ModelClassApi.md#unarchive_assignment) | **delete** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. -*ModelClassApi* | [**unarchive_class**](docs/apis/tags/ModelClassApi.md#unarchive_class) | **delete** /classes/{class}/archive | Unarchive the class -*ModelClassApi* | [**update_class**](docs/apis/tags/ModelClassApi.md#update_class) | **put** /classes/{class} | Update the class -*ModelClassApi* | [**update_submission_comment**](docs/apis/tags/ModelClassApi.md#update_submission_comment) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission -*CollectionApi* | [**add_score_to_collection**](docs/apis/tags/CollectionApi.md#add_score_to_collection) | **put** /collections/{collection}/scores/{score} | Add a score to the collection -*CollectionApi* | [**create_collection**](docs/apis/tags/CollectionApi.md#create_collection) | **post** /collections | Create a new collection -*CollectionApi* | [**delete_collection**](docs/apis/tags/CollectionApi.md#delete_collection) | **delete** /collections/{collection} | Delete the collection -*CollectionApi* | [**delete_score_from_collection**](docs/apis/tags/CollectionApi.md#delete_score_from_collection) | **delete** /collections/{collection}/scores/{score} | Delete a score from the collection -*CollectionApi* | [**edit_collection**](docs/apis/tags/CollectionApi.md#edit_collection) | **put** /collections/{collection} | Update a collection's metadata -*CollectionApi* | [**get_collection**](docs/apis/tags/CollectionApi.md#get_collection) | **get** /collections/{collection} | Get collection details -*CollectionApi* | [**list_collection_scores**](docs/apis/tags/CollectionApi.md#list_collection_scores) | **get** /collections/{collection}/scores | List the scores contained in a collection -*CollectionApi* | [**list_collections**](docs/apis/tags/CollectionApi.md#list_collections) | **get** /collections | List the collections -*CollectionApi* | [**untrash_collection**](docs/apis/tags/CollectionApi.md#untrash_collection) | **post** /collections/{collection}/untrash | Untrash a collection -*EduResourcesApi* | [**copy_edu_resource**](docs/apis/tags/EduResourcesApi.md#copy_edu_resource) | **post** /eduResources/{resource}/copy | Copy an education resource to a Resource Library -*EduResourcesApi* | [**copy_edu_resource_to_demo_class**](docs/apis/tags/EduResourcesApi.md#copy_edu_resource_to_demo_class) | **post** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class -*EduResourcesApi* | [**create_edu_resource**](docs/apis/tags/EduResourcesApi.md#create_edu_resource) | **post** /eduResources | Create a new education resource -*EduResourcesApi* | [**delete_edu_resource**](docs/apis/tags/EduResourcesApi.md#delete_edu_resource) | **delete** /eduResources/{resource} | Delete an education resource -*EduResourcesApi* | [**get_edu_resource**](docs/apis/tags/EduResourcesApi.md#get_edu_resource) | **get** /eduResources/{resource} | Get an education resource -*EduResourcesApi* | [**list_edu_libraries**](docs/apis/tags/EduResourcesApi.md#list_edu_libraries) | **get** /eduResources/libraries | List the education libraries -*EduResourcesApi* | [**list_edu_resources**](docs/apis/tags/EduResourcesApi.md#list_edu_resources) | **get** /eduResources | List education resources in a library or folder -*EduResourcesApi* | [**move_edu_resource**](docs/apis/tags/EduResourcesApi.md#move_edu_resource) | **post** /eduResources/{resource}/move | Move an education resource -*EduResourcesApi* | [**update_edu_resource**](docs/apis/tags/EduResourcesApi.md#update_edu_resource) | **put** /eduResources/{resource} | Update an education resource metadata -*EduResourcesApi* | [**update_edu_resource_assignment**](docs/apis/tags/EduResourcesApi.md#update_edu_resource_assignment) | **put** /eduResources/{resource}/assignment | Update an education resource assignment -*EduResourcesApi* | [**use_edu_resource_in_class**](docs/apis/tags/EduResourcesApi.md#use_edu_resource_in_class) | **post** /eduResources/{resource}/useInClass | Use an education resource in a class -*GroupApi* | [**get_group_details**](docs/apis/tags/GroupApi.md#get_group_details) | **get** /groups/{group} | Get group information -*GroupApi* | [**get_group_scores**](docs/apis/tags/GroupApi.md#get_group_scores) | **get** /groups/{group}/scores | List group's scores -*GroupApi* | [**list_group_users**](docs/apis/tags/GroupApi.md#list_group_users) | **get** /groups/{group}/users | List group's users -*OrganizationApi* | [**count_orga_users**](docs/apis/tags/OrganizationApi.md#count_orga_users) | **get** /organizations/users/count | Count the organization users using the provided filters -*OrganizationApi* | [**create_lti_credentials**](docs/apis/tags/OrganizationApi.md#create_lti_credentials) | **post** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials -*OrganizationApi* | [**create_organization_invitation**](docs/apis/tags/OrganizationApi.md#create_organization_invitation) | **post** /organizations/invitations | Create a new invitation to join the organization -*OrganizationApi* | [**create_organization_user**](docs/apis/tags/OrganizationApi.md#create_organization_user) | **post** /organizations/users | Create a new user account -*OrganizationApi* | [**create_organization_user_access_token**](docs/apis/tags/OrganizationApi.md#create_organization_user_access_token) | **post** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user -*OrganizationApi* | [**create_organization_user_signin_link**](docs/apis/tags/OrganizationApi.md#create_organization_user_signin_link) | **post** /organizations/users/{user}/signinLink | Create a sign in link for an organization user -*OrganizationApi* | [**list_lti_credentials**](docs/apis/tags/OrganizationApi.md#list_lti_credentials) | **get** /organizations/lti/credentials | List LTI 1.x credentials -*OrganizationApi* | [**list_organization_invitations**](docs/apis/tags/OrganizationApi.md#list_organization_invitations) | **get** /organizations/invitations | List the organization invitations -*OrganizationApi* | [**list_organization_users**](docs/apis/tags/OrganizationApi.md#list_organization_users) | **get** /organizations/users | List the organization users -*OrganizationApi* | [**remove_organization_invitation**](docs/apis/tags/OrganizationApi.md#remove_organization_invitation) | **delete** /organizations/invitations/{invitation} | Remove an organization invitation -*OrganizationApi* | [**remove_organization_user**](docs/apis/tags/OrganizationApi.md#remove_organization_user) | **delete** /organizations/users/{user} | Remove an account from Flat -*OrganizationApi* | [**revoke_lti_credentials**](docs/apis/tags/OrganizationApi.md#revoke_lti_credentials) | **delete** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials -*OrganizationApi* | [**update_organization_user**](docs/apis/tags/OrganizationApi.md#update_organization_user) | **put** /organizations/users/{user} | Update account information -*ScoreApi* | [**add_score_collaborator**](docs/apis/tags/ScoreApi.md#add_score_collaborator) | **post** /scores/{score}/collaborators | Add a new collaborator -*ScoreApi* | [**add_score_track**](docs/apis/tags/ScoreApi.md#add_score_track) | **post** /scores/{score}/tracks | Add a new video or audio track to the score -*ScoreApi* | [**create_export_task**](docs/apis/tags/ScoreApi.md#create_export_task) | **post** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task -*ScoreApi* | [**create_score**](docs/apis/tags/ScoreApi.md#create_score) | **post** /scores | Create a new score -*ScoreApi* | [**create_score_revision**](docs/apis/tags/ScoreApi.md#create_score_revision) | **post** /scores/{score}/revisions | Create a new revision -*ScoreApi* | [**delete_score**](docs/apis/tags/ScoreApi.md#delete_score) | **delete** /scores/{score} | Delete a score -*ScoreApi* | [**delete_score_comment**](docs/apis/tags/ScoreApi.md#delete_score_comment) | **delete** /scores/{score}/comments/{comment} | Delete a comment -*ScoreApi* | [**delete_score_track**](docs/apis/tags/ScoreApi.md#delete_score_track) | **delete** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score -*ScoreApi* | [**edit_score**](docs/apis/tags/ScoreApi.md#edit_score) | **put** /scores/{score} | Edit a score's metadata -*ScoreApi* | [**fork_score**](docs/apis/tags/ScoreApi.md#fork_score) | **post** /scores/{score}/fork | Fork a score -*ScoreApi* | [**ger_user_likes**](docs/apis/tags/ScoreApi.md#ger_user_likes) | **get** /users/{user}/likes | List liked scores -*ScoreApi* | [**get_group_scores**](docs/apis/tags/ScoreApi.md#get_group_scores) | **get** /groups/{group}/scores | List group's scores -*ScoreApi* | [**get_score**](docs/apis/tags/ScoreApi.md#get_score) | **get** /scores/{score} | Get a score's metadata -*ScoreApi* | [**get_score_collaborator**](docs/apis/tags/ScoreApi.md#get_score_collaborator) | **get** /scores/{score}/collaborators/{collaborator} | Get a collaborator -*ScoreApi* | [**get_score_collaborators**](docs/apis/tags/ScoreApi.md#get_score_collaborators) | **get** /scores/{score}/collaborators | List the collaborators -*ScoreApi* | [**get_score_comments**](docs/apis/tags/ScoreApi.md#get_score_comments) | **get** /scores/{score}/comments | List comments -*ScoreApi* | [**get_score_revision**](docs/apis/tags/ScoreApi.md#get_score_revision) | **get** /scores/{score}/revisions/{revision} | Get a score revision -*ScoreApi* | [**get_score_revision_data**](docs/apis/tags/ScoreApi.md#get_score_revision_data) | **get** /scores/{score}/revisions/{revision}/{format} | Get a score revision data -*ScoreApi* | [**get_score_revisions**](docs/apis/tags/ScoreApi.md#get_score_revisions) | **get** /scores/{score}/revisions | List the revisions -*ScoreApi* | [**get_score_submissions**](docs/apis/tags/ScoreApi.md#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score -*ScoreApi* | [**get_score_track**](docs/apis/tags/ScoreApi.md#get_score_track) | **get** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score -*ScoreApi* | [**get_user_scores**](docs/apis/tags/ScoreApi.md#get_user_scores) | **get** /users/{user}/scores | List user's scores -*ScoreApi* | [**list_score_tracks**](docs/apis/tags/ScoreApi.md#list_score_tracks) | **get** /scores/{score}/tracks | List the audio or video tracks linked to a score -*ScoreApi* | [**mark_score_comment_resolved**](docs/apis/tags/ScoreApi.md#mark_score_comment_resolved) | **put** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved -*ScoreApi* | [**mark_score_comment_unresolved**](docs/apis/tags/ScoreApi.md#mark_score_comment_unresolved) | **delete** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved -*ScoreApi* | [**post_score_comment**](docs/apis/tags/ScoreApi.md#post_score_comment) | **post** /scores/{score}/comments | Post a new comment -*ScoreApi* | [**remove_score_collaborator**](docs/apis/tags/ScoreApi.md#remove_score_collaborator) | **delete** /scores/{score}/collaborators/{collaborator} | Delete a collaborator -*ScoreApi* | [**untrash_score**](docs/apis/tags/ScoreApi.md#untrash_score) | **post** /scores/{score}/untrash | Untrash a score -*ScoreApi* | [**update_score_comment**](docs/apis/tags/ScoreApi.md#update_score_comment) | **put** /scores/{score}/comments/{comment} | Update an existing comment -*ScoreApi* | [**update_score_track**](docs/apis/tags/ScoreApi.md#update_score_track) | **put** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score -*TaskApi* | [**get_task**](docs/apis/tags/TaskApi.md#get_task) | **get** /tasks/{task} | Get a task details -*UserApi* | [**ger_user_likes**](docs/apis/tags/UserApi.md#ger_user_likes) | **get** /users/{user}/likes | List liked scores -*UserApi* | [**get_user**](docs/apis/tags/UserApi.md#get_user) | **get** /users/{user} | Get a public user profile -*UserApi* | [**get_user_scores**](docs/apis/tags/UserApi.md#get_user_scores) | **get** /users/{user}/scores | List user's scores +*AccountApi* | [**get_authenticated_user**](docs/AccountApi.md#get_authenticated_user) | **GET** /me | Get current user account +*ClassApi* | [**activate_class**](docs/ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class +*ClassApi* | [**add_class_user**](docs/ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class +*ClassApi* | [**archive_assignment**](docs/ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment +*ClassApi* | [**archive_class**](docs/ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class +*ClassApi* | [**copy_assignment**](docs/ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment +*ClassApi* | [**create_class**](docs/ClassApi.md#create_class) | **POST** /classes | Create a new class +*ClassApi* | [**create_class_assignment**](docs/ClassApi.md#create_class_assignment) | **POST** /classes/{class}/assignments | Assignment creation +*ClassApi* | [**create_submission**](docs/ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission +*ClassApi* | [**create_test_student_account**](docs/ClassApi.md#create_test_student_account) | **POST** /classes/{class}/testStudent | Create a test student account +*ClassApi* | [**delete_class_user**](docs/ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class +*ClassApi* | [**delete_submission**](docs/ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission +*ClassApi* | [**delete_submission_comment**](docs/ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission +*ClassApi* | [**edit_submission**](docs/ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission +*ClassApi* | [**enroll_class**](docs/ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class +*ClassApi* | [**export_submissions_reviews_as_csv**](docs/ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +*ClassApi* | [**export_submissions_reviews_as_excel**](docs/ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +*ClassApi* | [**get_class**](docs/ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class +*ClassApi* | [**get_score_submissions**](docs/ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score +*ClassApi* | [**get_submission**](docs/ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +*ClassApi* | [**get_submission_comments**](docs/ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +*ClassApi* | [**get_submission_history**](docs/ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission +*ClassApi* | [**get_submissions**](docs/ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions +*ClassApi* | [**list_assignments**](docs/ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing +*ClassApi* | [**list_class_student_submissions**](docs/ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student +*ClassApi* | [**list_classes**](docs/ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user +*ClassApi* | [**post_submission_comment**](docs/ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +*ClassApi* | [**unarchive_assignment**](docs/ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. +*ClassApi* | [**unarchive_class**](docs/ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class +*ClassApi* | [**update_class**](docs/ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class +*ClassApi* | [**update_submission_comment**](docs/ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission +*CollectionApi* | [**add_score_to_collection**](docs/CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection +*CollectionApi* | [**create_collection**](docs/CollectionApi.md#create_collection) | **POST** /collections | Create a new collection +*CollectionApi* | [**delete_collection**](docs/CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection +*CollectionApi* | [**delete_score_from_collection**](docs/CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection +*CollectionApi* | [**edit_collection**](docs/CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata +*CollectionApi* | [**get_collection**](docs/CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details +*CollectionApi* | [**list_collection_scores**](docs/CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection +*CollectionApi* | [**list_collections**](docs/CollectionApi.md#list_collections) | **GET** /collections | List the collections +*CollectionApi* | [**untrash_collection**](docs/CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection +*EduResourcesApi* | [**copy_edu_resource**](docs/EduResourcesApi.md#copy_edu_resource) | **POST** /eduResources/{resource}/copy | Copy an education resource to a Resource Library +*EduResourcesApi* | [**copy_edu_resource_to_demo_class**](docs/EduResourcesApi.md#copy_edu_resource_to_demo_class) | **POST** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class +*EduResourcesApi* | [**create_edu_resource**](docs/EduResourcesApi.md#create_edu_resource) | **POST** /eduResources | Create a new education resource +*EduResourcesApi* | [**delete_edu_resource**](docs/EduResourcesApi.md#delete_edu_resource) | **DELETE** /eduResources/{resource} | Delete an education resource +*EduResourcesApi* | [**get_edu_resource**](docs/EduResourcesApi.md#get_edu_resource) | **GET** /eduResources/{resource} | Get an education resource +*EduResourcesApi* | [**list_edu_libraries**](docs/EduResourcesApi.md#list_edu_libraries) | **GET** /eduResources/libraries | List the education libraries +*EduResourcesApi* | [**list_edu_resources**](docs/EduResourcesApi.md#list_edu_resources) | **GET** /eduResources | List education resources in a library or folder +*EduResourcesApi* | [**move_edu_resource**](docs/EduResourcesApi.md#move_edu_resource) | **POST** /eduResources/{resource}/move | Move an education resource +*EduResourcesApi* | [**update_edu_resource**](docs/EduResourcesApi.md#update_edu_resource) | **PUT** /eduResources/{resource} | Update an education resource metadata +*EduResourcesApi* | [**update_edu_resource_assignment**](docs/EduResourcesApi.md#update_edu_resource_assignment) | **PUT** /eduResources/{resource}/assignment | Update an education resource assignment +*EduResourcesApi* | [**use_edu_resource_in_class**](docs/EduResourcesApi.md#use_edu_resource_in_class) | **POST** /eduResources/{resource}/useInClass | Use an education resource in a class +*GroupApi* | [**get_group_details**](docs/GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information +*GroupApi* | [**get_group_scores**](docs/GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores +*GroupApi* | [**list_group_users**](docs/GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users +*OrganizationApi* | [**count_orga_users**](docs/OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters +*OrganizationApi* | [**create_lti_credentials**](docs/OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials +*OrganizationApi* | [**create_organization_invitation**](docs/OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization +*OrganizationApi* | [**create_organization_user**](docs/OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account +*OrganizationApi* | [**create_organization_user_access_token**](docs/OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +*OrganizationApi* | [**create_organization_user_signin_link**](docs/OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user +*OrganizationApi* | [**list_lti_credentials**](docs/OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials +*OrganizationApi* | [**list_organization_invitations**](docs/OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations +*OrganizationApi* | [**list_organization_users**](docs/OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users +*OrganizationApi* | [**remove_organization_invitation**](docs/OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation +*OrganizationApi* | [**remove_organization_user**](docs/OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat +*OrganizationApi* | [**revoke_lti_credentials**](docs/OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials +*OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information +*ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator +*ScoreApi* | [**add_score_track**](docs/ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score +*ScoreApi* | [**create_export_task**](docs/ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task +*ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score +*ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision +*ScoreApi* | [**delete_score**](docs/ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score +*ScoreApi* | [**delete_score_comment**](docs/ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment +*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 +*ScoreApi* | [**edit_score**](docs/ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata +*ScoreApi* | [**fork_score**](docs/ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score +*ScoreApi* | [**ger_user_likes**](docs/ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores +*ScoreApi* | [**get_group_scores**](docs/ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores +*ScoreApi* | [**get_score**](docs/ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata +*ScoreApi* | [**get_score_collaborator**](docs/ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator +*ScoreApi* | [**get_score_collaborators**](docs/ScoreApi.md#get_score_collaborators) | **GET** /scores/{score}/collaborators | List the collaborators +*ScoreApi* | [**get_score_comments**](docs/ScoreApi.md#get_score_comments) | **GET** /scores/{score}/comments | List comments +*ScoreApi* | [**get_score_revision**](docs/ScoreApi.md#get_score_revision) | **GET** /scores/{score}/revisions/{revision} | Get a score revision +*ScoreApi* | [**get_score_revision_data**](docs/ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data +*ScoreApi* | [**get_score_revisions**](docs/ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions +*ScoreApi* | [**get_score_submissions**](docs/ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score +*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 +*ScoreApi* | [**get_user_scores**](docs/ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores +*ScoreApi* | [**list_score_tracks**](docs/ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score +*ScoreApi* | [**mark_score_comment_resolved**](docs/ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved +*ScoreApi* | [**mark_score_comment_unresolved**](docs/ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved +*ScoreApi* | [**post_score_comment**](docs/ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment +*ScoreApi* | [**remove_score_collaborator**](docs/ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator +*ScoreApi* | [**untrash_score**](docs/ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score +*ScoreApi* | [**update_score_comment**](docs/ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment +*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 +*TaskApi* | [**get_task**](docs/TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details +*UserApi* | [**ger_user_likes**](docs/UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores +*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile +*UserApi* | [**get_user_scores**](docs/UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores + ## Documentation For Models - - [ApiAccessToken](docs/models/ApiAccessToken.md) - - [AppScopes](docs/models/AppScopes.md) - - [Assignment](docs/models/Assignment.md) - - [AssignmentCopy](docs/models/AssignmentCopy.md) - - [AssignmentCopyResponse](docs/models/AssignmentCopyResponse.md) - - [AssignmentSubmission](docs/models/AssignmentSubmission.md) - - [AssignmentSubmissionComment](docs/models/AssignmentSubmissionComment.md) - - [AssignmentSubmissionCommentCreation](docs/models/AssignmentSubmissionCommentCreation.md) - - [AssignmentSubmissionHistory](docs/models/AssignmentSubmissionHistory.md) - - [AssignmentSubmissionHistoryState](docs/models/AssignmentSubmissionHistoryState.md) - - [AssignmentSubmissionState](docs/models/AssignmentSubmissionState.md) - - [AssignmentSubmissionUpdate](docs/models/AssignmentSubmissionUpdate.md) - - [AssignmentType](docs/models/AssignmentType.md) - - [AssignmentUpdate](docs/models/AssignmentUpdate.md) - - [ClassAssignment](docs/models/ClassAssignment.md) - - [ClassAssignmentUpdate](docs/models/ClassAssignmentUpdate.md) - - [ClassAttachmentCreation](docs/models/ClassAttachmentCreation.md) - - [ClassCreation](docs/models/ClassCreation.md) - - [ClassDetails](docs/models/ClassDetails.md) - - [ClassGradeLevel](docs/models/ClassGradeLevel.md) - - [ClassRoles](docs/models/ClassRoles.md) - - [ClassState](docs/models/ClassState.md) - - [ClassUpdate](docs/models/ClassUpdate.md) - - [Collection](docs/models/Collection.md) - - [CollectionApp](docs/models/CollectionApp.md) - - [CollectionCreation](docs/models/CollectionCreation.md) - - [CollectionModification](docs/models/CollectionModification.md) - - [CollectionPrivacy](docs/models/CollectionPrivacy.md) - - [CollectionType](docs/models/CollectionType.md) - - [EduLibrary](docs/models/EduLibrary.md) - - [EduResource](docs/models/EduResource.md) - - [EduResourceCopy](docs/models/EduResourceCopy.md) - - [EduResourceCreation](docs/models/EduResourceCreation.md) - - [EduResourceMove](docs/models/EduResourceMove.md) - - [EduResourcePrivacy](docs/models/EduResourcePrivacy.md) - - [EduResourceType](docs/models/EduResourceType.md) - - [EduResourceUpdate](docs/models/EduResourceUpdate.md) - - [EduResourceUseInClass](docs/models/EduResourceUseInClass.md) - - [EduSkillsFocused](docs/models/EduSkillsFocused.md) - - [FlatErrorResponse](docs/models/FlatErrorResponse.md) - - [FlatLocales](docs/models/FlatLocales.md) - - [GoogleClassroomCoursework](docs/models/GoogleClassroomCoursework.md) - - [GoogleClassroomSubmission](docs/models/GoogleClassroomSubmission.md) - - [Group](docs/models/Group.md) - - [GroupDetails](docs/models/GroupDetails.md) - - [GroupType](docs/models/GroupType.md) - - [LicenseMode](docs/models/LicenseMode.md) - - [LicenseSources](docs/models/LicenseSources.md) - - [LmsName](docs/models/LmsName.md) - - [LtiCredentials](docs/models/LtiCredentials.md) - - [LtiCredentialsCreation](docs/models/LtiCredentialsCreation.md) - - [MediaAttachment](docs/models/MediaAttachment.md) - - [MediaScoreSharingMode](docs/models/MediaScoreSharingMode.md) - - [MicrosoftGraphAssignment](docs/models/MicrosoftGraphAssignment.md) - - [MicrosoftGraphSubmission](docs/models/MicrosoftGraphSubmission.md) - - [OrganizationInvitation](docs/models/OrganizationInvitation.md) - - [OrganizationInvitationCreation](docs/models/OrganizationInvitationCreation.md) - - [OrganizationRoles](docs/models/OrganizationRoles.md) - - [OrganizationUserAccessTokenCreation](docs/models/OrganizationUserAccessTokenCreation.md) - - [ResourceCollaborator](docs/models/ResourceCollaborator.md) - - [ResourceCollaboratorCreation](docs/models/ResourceCollaboratorCreation.md) - - [ResourceRights](docs/models/ResourceRights.md) - - [ScoreComment](docs/models/ScoreComment.md) - - [ScoreCommentContext](docs/models/ScoreCommentContext.md) - - [ScoreCommentCreation](docs/models/ScoreCommentCreation.md) - - [ScoreCommentUpdate](docs/models/ScoreCommentUpdate.md) - - [ScoreCommentsCounts](docs/models/ScoreCommentsCounts.md) - - [ScoreCreation](docs/models/ScoreCreation.md) - - [ScoreCreationType](docs/models/ScoreCreationType.md) - - [ScoreDetails](docs/models/ScoreDetails.md) - - [ScoreFork](docs/models/ScoreFork.md) - - [ScoreLicense](docs/models/ScoreLicense.md) - - [ScoreLikesCounts](docs/models/ScoreLikesCounts.md) - - [ScoreModification](docs/models/ScoreModification.md) - - [ScorePlaysCounts](docs/models/ScorePlaysCounts.md) - - [ScorePrivacy](docs/models/ScorePrivacy.md) - - [ScoreRevision](docs/models/ScoreRevision.md) - - [ScoreRevisionCreation](docs/models/ScoreRevisionCreation.md) - - [ScoreRevisionStatistics](docs/models/ScoreRevisionStatistics.md) - - [ScoreSource](docs/models/ScoreSource.md) - - [ScoreTrack](docs/models/ScoreTrack.md) - - [ScoreTrackCreation](docs/models/ScoreTrackCreation.md) - - [ScoreTrackPoint](docs/models/ScoreTrackPoint.md) - - [ScoreTrackState](docs/models/ScoreTrackState.md) - - [ScoreTrackType](docs/models/ScoreTrackType.md) - - [ScoreTrackUpdate](docs/models/ScoreTrackUpdate.md) - - [ScoreViewsCounts](docs/models/ScoreViewsCounts.md) - - [Task](docs/models/Task.md) - - [TaskExportOptions](docs/models/TaskExportOptions.md) - - [UserAdminUpdate](docs/models/UserAdminUpdate.md) - - [UserAzureDetails](docs/models/UserAzureDetails.md) - - [UserCommunityProfileLinks](docs/models/UserCommunityProfileLinks.md) - - [UserCreation](docs/models/UserCreation.md) - - [UserDetails](docs/models/UserDetails.md) - - [UserDetailsAdmin](docs/models/UserDetailsAdmin.md) - - [UserPublic](docs/models/UserPublic.md) - - [UserPublicSummary](docs/models/UserPublicSummary.md) - - [UserSigninLink](docs/models/UserSigninLink.md) - - [UserSigninLinkCreation](docs/models/UserSigninLinkCreation.md) + - [ApiAccessToken](docs/ApiAccessToken.md) + - [AppScopes](docs/AppScopes.md) + - [Assignment](docs/Assignment.md) + - [AssignmentCopy](docs/AssignmentCopy.md) + - [AssignmentCopyResponse](docs/AssignmentCopyResponse.md) + - [AssignmentCopyResponseCapabilities](docs/AssignmentCopyResponseCapabilities.md) + - [AssignmentCopyResponseCapabilitiesCanPublishInClassError](docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) + - [AssignmentSubmission](docs/AssignmentSubmission.md) + - [AssignmentSubmissionComment](docs/AssignmentSubmissionComment.md) + - [AssignmentSubmissionCommentCreation](docs/AssignmentSubmissionCommentCreation.md) + - [AssignmentSubmissionHistory](docs/AssignmentSubmissionHistory.md) + - [AssignmentSubmissionHistoryAttachment](docs/AssignmentSubmissionHistoryAttachment.md) + - [AssignmentSubmissionHistoryState](docs/AssignmentSubmissionHistoryState.md) + - [AssignmentSubmissionState](docs/AssignmentSubmissionState.md) + - [AssignmentSubmissionUpdate](docs/AssignmentSubmissionUpdate.md) + - [AssignmentSubmissionUpdateComments](docs/AssignmentSubmissionUpdateComments.md) + - [AssignmentType](docs/AssignmentType.md) + - [AssignmentUpdate](docs/AssignmentUpdate.md) + - [ClassAssignment](docs/ClassAssignment.md) + - [ClassAssignmentCanvas](docs/ClassAssignmentCanvas.md) + - [ClassAssignmentLti](docs/ClassAssignmentLti.md) + - [ClassAssignmentMfc](docs/ClassAssignmentMfc.md) + - [ClassAssignmentUpdate](docs/ClassAssignmentUpdate.md) + - [ClassAssignmentUpdateGoogleClassroom](docs/ClassAssignmentUpdateGoogleClassroom.md) + - [ClassAssignmentUpdateMicrosoftGraph](docs/ClassAssignmentUpdateMicrosoftGraph.md) + - [ClassAttachmentCreation](docs/ClassAttachmentCreation.md) + - [ClassCreation](docs/ClassCreation.md) + - [ClassDetails](docs/ClassDetails.md) + - [ClassDetailsCanvas](docs/ClassDetailsCanvas.md) + - [ClassDetailsClever](docs/ClassDetailsClever.md) + - [ClassDetailsGoogleClassroom](docs/ClassDetailsGoogleClassroom.md) + - [ClassDetailsGoogleDrive](docs/ClassDetailsGoogleDrive.md) + - [ClassDetailsIssues](docs/ClassDetailsIssues.md) + - [ClassDetailsIssuesSyncInner](docs/ClassDetailsIssuesSyncInner.md) + - [ClassDetailsLti](docs/ClassDetailsLti.md) + - [ClassDetailsMfc](docs/ClassDetailsMfc.md) + - [ClassDetailsMicrosoftGraph](docs/ClassDetailsMicrosoftGraph.md) + - [ClassGradeLevel](docs/ClassGradeLevel.md) + - [ClassRoles](docs/ClassRoles.md) + - [ClassState](docs/ClassState.md) + - [ClassUpdate](docs/ClassUpdate.md) + - [Collection](docs/Collection.md) + - [CollectionApp](docs/CollectionApp.md) + - [CollectionCapabilities](docs/CollectionCapabilities.md) + - [CollectionCreation](docs/CollectionCreation.md) + - [CollectionModification](docs/CollectionModification.md) + - [CollectionPrivacy](docs/CollectionPrivacy.md) + - [CollectionType](docs/CollectionType.md) + - [EduLibrary](docs/EduLibrary.md) + - [EduResource](docs/EduResource.md) + - [EduResourceCapabilities](docs/EduResourceCapabilities.md) + - [EduResourceCopy](docs/EduResourceCopy.md) + - [EduResourceCreation](docs/EduResourceCreation.md) + - [EduResourceMove](docs/EduResourceMove.md) + - [EduResourcePrivacy](docs/EduResourcePrivacy.md) + - [EduResourceResource](docs/EduResourceResource.md) + - [EduResourceType](docs/EduResourceType.md) + - [EduResourceUpdate](docs/EduResourceUpdate.md) + - [EduResourceUseInClass](docs/EduResourceUseInClass.md) + - [EduSkillsFocused](docs/EduSkillsFocused.md) + - [FlatErrorResponse](docs/FlatErrorResponse.md) + - [FlatLocales](docs/FlatLocales.md) + - [GoogleClassroomCoursework](docs/GoogleClassroomCoursework.md) + - [GoogleClassroomSubmission](docs/GoogleClassroomSubmission.md) + - [Group](docs/Group.md) + - [GroupDetails](docs/GroupDetails.md) + - [GroupType](docs/GroupType.md) + - [LicenseMode](docs/LicenseMode.md) + - [LicenseSources](docs/LicenseSources.md) + - [LmsName](docs/LmsName.md) + - [LtiCredentials](docs/LtiCredentials.md) + - [LtiCredentialsCreation](docs/LtiCredentialsCreation.md) + - [MediaAttachment](docs/MediaAttachment.md) + - [MediaScoreSharingMode](docs/MediaScoreSharingMode.md) + - [MicrosoftGraphAssignment](docs/MicrosoftGraphAssignment.md) + - [MicrosoftGraphSubmission](docs/MicrosoftGraphSubmission.md) + - [OrganizationInvitation](docs/OrganizationInvitation.md) + - [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md) + - [OrganizationRoles](docs/OrganizationRoles.md) + - [OrganizationUserAccessTokenCreation](docs/OrganizationUserAccessTokenCreation.md) + - [ResourceCollaborator](docs/ResourceCollaborator.md) + - [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md) + - [ResourceRights](docs/ResourceRights.md) + - [ScoreComment](docs/ScoreComment.md) + - [ScoreCommentContext](docs/ScoreCommentContext.md) + - [ScoreCommentCreation](docs/ScoreCommentCreation.md) + - [ScoreCommentModeration](docs/ScoreCommentModeration.md) + - [ScoreCommentUpdate](docs/ScoreCommentUpdate.md) + - [ScoreCommentsCounts](docs/ScoreCommentsCounts.md) + - [ScoreCreation](docs/ScoreCreation.md) + - [ScoreCreationBuilderData](docs/ScoreCreationBuilderData.md) + - [ScoreCreationBuilderDataLayoutData](docs/ScoreCreationBuilderDataLayoutData.md) + - [ScoreCreationBuilderDataScoreData](docs/ScoreCreationBuilderDataScoreData.md) + - [ScoreCreationBuilderDataScoreDataInstrumentsInner](docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md) + - [ScoreCreationType](docs/ScoreCreationType.md) + - [ScoreDetails](docs/ScoreDetails.md) + - [ScoreFork](docs/ScoreFork.md) + - [ScoreLicense](docs/ScoreLicense.md) + - [ScoreLikesCounts](docs/ScoreLikesCounts.md) + - [ScoreModification](docs/ScoreModification.md) + - [ScorePlaysCounts](docs/ScorePlaysCounts.md) + - [ScorePrivacy](docs/ScorePrivacy.md) + - [ScoreRevision](docs/ScoreRevision.md) + - [ScoreRevisionCreation](docs/ScoreRevisionCreation.md) + - [ScoreRevisionStatistics](docs/ScoreRevisionStatistics.md) + - [ScoreSource](docs/ScoreSource.md) + - [ScoreTrack](docs/ScoreTrack.md) + - [ScoreTrackCreation](docs/ScoreTrackCreation.md) + - [ScoreTrackPoint](docs/ScoreTrackPoint.md) + - [ScoreTrackState](docs/ScoreTrackState.md) + - [ScoreTrackType](docs/ScoreTrackType.md) + - [ScoreTrackUpdate](docs/ScoreTrackUpdate.md) + - [ScoreViewsCounts](docs/ScoreViewsCounts.md) + - [Task](docs/Task.md) + - [TaskExportOptions](docs/TaskExportOptions.md) + - [TaskProgress](docs/TaskProgress.md) + - [TaskResult](docs/TaskResult.md) + - [UserAdminUpdate](docs/UserAdminUpdate.md) + - [UserAzureDetails](docs/UserAzureDetails.md) + - [UserCommunityProfileLinks](docs/UserCommunityProfileLinks.md) + - [UserCreation](docs/UserCreation.md) + - [UserDetails](docs/UserDetails.md) + - [UserDetailsAdmin](docs/UserDetailsAdmin.md) + - [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md) + - [UserPublic](docs/UserPublic.md) + - [UserPublicSummary](docs/UserPublicSummary.md) + - [UserSigninLink](docs/UserSigninLink.md) + - [UserSigninLinkCreation](docs/UserSigninLinkCreation.md) + ## Documentation For Authorization -Authentication schemes defined for the API: - -### OAuth2 + +## OAuth2 - **Type**: OAuth - **Flow**: accessCode @@ -350,14 +367,7 @@ Authentication schemes defined for the API: ## Author developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io -developers@flat.io + ## Notes for Large OpenAPI documents If the OpenAPI document is large, imports in flat_api.apis and flat_api.models may fail with a @@ -365,10 +375,10 @@ RecursionError indicating the maximum recursion limit has been exceeded. In that Solution 1: Use specific imports for apis and models like: -- `from flat_api.apis.default_api import DefaultApi` +- `from flat_api.api.default_api import DefaultApi` - `from flat_api.model.pet import Pet` -Solution 1: +Solution 2: Before importing the package, adjust the maximum recursion limit as shown below: ``` import sys @@ -377,3 +387,4 @@ import flat_api from flat_api.apis import * from flat_api.models import * ``` + diff --git a/docs/AccountApi.md b/docs/AccountApi.md new file mode 100644 index 0000000..37db87e --- /dev/null +++ b/docs/AccountApi.md @@ -0,0 +1,90 @@ +# flat_api.AccountApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_authenticated_user**](AccountApi.md#get_authenticated_user) | **GET** /me | Get current user account + + +# **get_authenticated_user** +> UserDetails get_authenticated_user() + +Get current user account + +Get details about the current authenticated User. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import account_api +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = account_api.AccountApi(api_client) + only_id = False # bool | Only return the user id (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get current user account + api_response = api_instance.get_authenticated_user(only_id=only_id) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **only_id** | **bool**| Only return the user id | [optional] if omitted the server will use the default value of False + +### Return type + +[**UserDetails**](UserDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current user details | - | +**0** | Error | - | + +[[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) + diff --git a/docs/ApiAccessToken.md b/docs/ApiAccessToken.md new file mode 100644 index 0000000..1f00ed1 --- /dev/null +++ b/docs/ApiAccessToken.md @@ -0,0 +1,18 @@ +# ApiAccessToken + +An API access token + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of this private token | [optional] +**name** | **str** | Name of the personal access token | [optional] +**token** | **str** | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] +**issued_date** | **datetime** | The date then this token was issued | [optional] +**expiration_date** | **datetime** | The date then this token will expire | [optional] +**scopes** | [**[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AppScopes.md b/docs/AppScopes.md new file mode 100644 index 0000000..ea30b63 --- /dev/null +++ b/docs/AppScopes.md @@ -0,0 +1,12 @@ +# AppScopes + +Available scopes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Available scopes | must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Assignment.md b/docs/Assignment.md new file mode 100644 index 0000000..9a58449 --- /dev/null +++ b/docs/Assignment.md @@ -0,0 +1,26 @@ +# Assignment + +Assignment details + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | +**title** | **str** | Title of the assignment | +**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | +**description** | **str** | Description and content of the assignment | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopy.md b/docs/AssignmentCopy.md new file mode 100644 index 0000000..6d59a0c --- /dev/null +++ b/docs/AssignmentCopy.md @@ -0,0 +1,15 @@ +# AssignmentCopy + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classroom** | **str** | The destination classroom where the assignment will be copied | [optional] +**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] +**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopyResponse.md b/docs/AssignmentCopyResponse.md new file mode 100644 index 0000000..2908195 --- /dev/null +++ b/docs/AssignmentCopyResponse.md @@ -0,0 +1,26 @@ +# AssignmentCopyResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Description and content of the assignment | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**resource** | **str** | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopyResponseCapabilities.md b/docs/AssignmentCopyResponseCapabilities.md new file mode 100644 index 0000000..1dffc9d --- /dev/null +++ b/docs/AssignmentCopyResponseCapabilities.md @@ -0,0 +1,17 @@ +# AssignmentCopyResponseCapabilities + +Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_edit** | **bool** | Whether the current user can edit the assignment | +**can_publish_in_class** | **bool** | Whether this assignment can be published in a class | +**can_archive** | **bool** | Whether the current user can archive the assignment | +**can_unarchive** | **bool** | Whether the current user can unarchive the assignment | +**can_publish_in_class_error** | [**AssignmentCopyResponseCapabilitiesCanPublishInClassError**](AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md b/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md new file mode 100644 index 0000000..16f3b02 --- /dev/null +++ b/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md @@ -0,0 +1,14 @@ +# AssignmentCopyResponseCapabilitiesCanPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | A corresponding code for this error | +**message** | **str** | A printable and localized message for this error | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmission.md b/docs/AssignmentSubmission.md new file mode 100644 index 0000000..5043b6b --- /dev/null +++ b/docs/AssignmentSubmission.md @@ -0,0 +1,28 @@ +# AssignmentSubmission + +Assignment Submission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the submission | +**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | +**classroom** | **str** | Unique identifier of the classroom where the assignment was posted | +**assignment** | **str** | Unique identifier of the assignment | +**creator** | **str** | The User identifier of the student who created the submission | +**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | +**creation_date** | **str** | The date when the submission was created | [optional] +**submission_date** | **str** | The date when the student submitted their work | [optional] +**return_date** | **str** | The date when the teacher returned the work | [optional] +**return_creator** | **str** | The User unique identifier of the teacher who returned the submission | [optional] +**grade** | **float, none_type** | Optional grade. If unset, no grade was set. | [optional] +**draft_grade** | **float, none_type** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] +**exercises_ids** | **[str], none_type** | The ids of exercises when they need to be in a specific order | [optional] +**google_classroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] +**microsoft_graph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionComment.md b/docs/AssignmentSubmissionComment.md new file mode 100644 index 0000000..bd96c0d --- /dev/null +++ b/docs/AssignmentSubmissionComment.md @@ -0,0 +1,19 @@ +# AssignmentSubmissionComment + +Feedback comment added to an assignment submission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The comment unique identifier | [optional] +**user** | **str** | The author unique identifier | [optional] +**submission** | **str** | The submission unique identifier | [optional] +**date** | **datetime** | The date when the comment was posted | [optional] +**modification_date** | **datetime** | The date of the last comment modification | [optional] +**comment** | **str** | The comment text | [optional] +**unread** | **bool** | True if the comment is unread by the current user | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/AssignmentSubmissionCommentCreation.md new file mode 100644 index 0000000..174be70 --- /dev/null +++ b/docs/AssignmentSubmissionCommentCreation.md @@ -0,0 +1,13 @@ +# AssignmentSubmissionCommentCreation + +Creation of a assignment submission comment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | **str** | The comment text | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistory.md b/docs/AssignmentSubmissionHistory.md new file mode 100644 index 0000000..3cf7436 --- /dev/null +++ b/docs/AssignmentSubmissionHistory.md @@ -0,0 +1,22 @@ +# AssignmentSubmissionHistory + +History item of the submission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **datetime** | The date when the submission was changed | [optional] +**users** | **[str]** | The user(s) unique identifier(s) who made the change | [optional] +**source** | **str** | The source of the change if the change was made by a third-party software | [optional] +**state** | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | | [optional] +**draft_grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] +**grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] +**max_points** | **float** | The denominator of the grade at this time in the submission grade history | [optional] +**comment** | **str** | The comment that is made to this submission | [optional] +**due_date** | **datetime** | The due date of this assignment | [optional] +**attachment** | [**AssignmentSubmissionHistoryAttachment**](AssignmentSubmissionHistoryAttachment.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistoryAttachment.md b/docs/AssignmentSubmissionHistoryAttachment.md new file mode 100644 index 0000000..d27a227 --- /dev/null +++ b/docs/AssignmentSubmissionHistoryAttachment.md @@ -0,0 +1,14 @@ +# AssignmentSubmissionHistoryAttachment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **str** | The score identifier that changed | [optional] +**revision** | **str** | The revision identifier that changed | [optional] +**title** | **str** | The title of the score that changed | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistoryState.md b/docs/AssignmentSubmissionHistoryState.md new file mode 100644 index 0000000..9a7b017 --- /dev/null +++ b/docs/AssignmentSubmissionHistoryState.md @@ -0,0 +1,12 @@ +# AssignmentSubmissionHistoryState + +State of the submission history + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | State of the submission history | must be one of ["created", "turnedIn", "returned", "reset", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionState.md b/docs/AssignmentSubmissionState.md new file mode 100644 index 0000000..dc685c7 --- /dev/null +++ b/docs/AssignmentSubmissionState.md @@ -0,0 +1,12 @@ +# AssignmentSubmissionState + +State of the submission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | State of the submission | must be one of ["created", "turnedIn", "returned", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/AssignmentSubmissionUpdate.md new file mode 100644 index 0000000..7ae284b --- /dev/null +++ b/docs/AssignmentSubmissionUpdate.md @@ -0,0 +1,19 @@ +# AssignmentSubmissionUpdate + +Assignment Submission creation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**submit** | **bool** | If `true`, the submission will be marked as done | [optional] +**draft_grade** | **float, none_type** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**grade** | **float, none_type** | Optional grade. If unset, no grade was set. | [optional] +**exercises_ids** | **[str], none_type** | The ids of exercises when they need to be in a specific order | [optional] +**_return** | **bool** | If `true`, the submission will be marked as done | [optional] +**comments** | [**AssignmentSubmissionUpdateComments**](AssignmentSubmissionUpdateComments.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionUpdateComments.md b/docs/AssignmentSubmissionUpdateComments.md new file mode 100644 index 0000000..de2a78e --- /dev/null +++ b/docs/AssignmentSubmissionUpdateComments.md @@ -0,0 +1,13 @@ +# AssignmentSubmissionUpdateComments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of comments added to the submission | [optional] +**unread** | **float** | The number of unread comments for the current user | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentType.md b/docs/AssignmentType.md new file mode 100644 index 0000000..1e1b0ae --- /dev/null +++ b/docs/AssignmentType.md @@ -0,0 +1,12 @@ +# AssignmentType + +Type of the assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Type of the assignment | must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentUpdate.md b/docs/AssignmentUpdate.md new file mode 100644 index 0000000..06b0c37 --- /dev/null +++ b/docs/AssignmentUpdate.md @@ -0,0 +1,23 @@ +# AssignmentUpdate + +Assignment Resource Editing + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Description and content of the assignment | [optional] +**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**nb_playback_authorized** | **float, none_type** | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | **str, none_type** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str, none_type** | The id of the cover to display | [optional] +**cover** | **str, none_type** | The URL of the cover to display | [optional] +**max_points** | **float, none_type** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassApi.md b/docs/ClassApi.md new file mode 100644 index 0000000..8b2a1c7 --- /dev/null +++ b/docs/ClassApi.md @@ -0,0 +1,2637 @@ +# flat_api.ClassApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activate_class**](ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class +[**add_class_user**](ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class +[**archive_assignment**](ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment +[**archive_class**](ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class +[**copy_assignment**](ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment +[**create_class**](ClassApi.md#create_class) | **POST** /classes | Create a new class +[**create_class_assignment**](ClassApi.md#create_class_assignment) | **POST** /classes/{class}/assignments | Assignment creation +[**create_submission**](ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission +[**create_test_student_account**](ClassApi.md#create_test_student_account) | **POST** /classes/{class}/testStudent | Create a test student account +[**delete_class_user**](ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class +[**delete_submission**](ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission +[**delete_submission_comment**](ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission +[**edit_submission**](ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission +[**enroll_class**](ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class +[**export_submissions_reviews_as_csv**](ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports +[**export_submissions_reviews_as_excel**](ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +[**get_class**](ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class +[**get_score_submissions**](ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score +[**get_submission**](ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission +[**get_submission_comments**](ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission +[**get_submission_history**](ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission +[**get_submissions**](ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions +[**list_assignments**](ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing +[**list_class_student_submissions**](ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student +[**list_classes**](ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user +[**post_submission_comment**](ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission +[**unarchive_assignment**](ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. +[**unarchive_class**](ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class +[**update_class**](ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class +[**update_submission_comment**](ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission + + +# **activate_class** +> ClassDetails activate_class(_class) + +Activate the class + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + + # example passing only required values which don't have defaults set + try: + # Activate the class + api_response = api_instance.activate_class(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->activate_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + +[[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) + +# **add_class_user** +> add_class_user(_class, user) + +Add a user to the class + +This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + user = "user_example" # str | Unique identifier of the user + + # example passing only required values which don't have defaults set + try: + # Add a user to the class + api_instance.add_class_user(_class, user) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->add_class_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The user has been added to the class | - | +**0** | Error | - | + +[[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) + +# **archive_assignment** +> Assignment archive_assignment(_class, assignment) + +Archive the assignment + +Archive the assignment + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + + # example passing only required values which don't have defaults set + try: + # Archive the assignment + api_response = api_instance.archive_assignment(_class, assignment) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->archive_assignment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment details | - | +**0** | Error | - | + +[[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) + +# **archive_class** +> ClassDetails archive_class(_class) + +Archive the class + +Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + + # example passing only required values which don't have defaults set + try: + # Archive the class + api_response = api_instance.archive_class(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->archive_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + +[[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) + +# **copy_assignment** +> AssignmentCopyResponse copy_assignment(_class, assignment, body) + +Copy an assignment + +Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + body = AssignmentCopy( + classroom="classroom_example", + assignment="assignment_example", + scheduled_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + library_parent="library_parent_example", + ) # AssignmentCopy | + + # example passing only required values which don't have defaults set + try: + # Copy an assignment + api_response = api_instance.copy_assignment(_class, assignment, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->copy_assignment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **body** | [**AssignmentCopy**](AssignmentCopy.md)| | + +### Return type + +[**AssignmentCopyResponse**](AssignmentCopyResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new created assignment | - | +**0** | Error | - | + +[[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) + +# **create_class** +> ClassDetails create_class(body) + +Create a new class + +Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_creation import ClassCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + body = ClassCreation( + name="name_example", + section="section_example", + level=ClassGradeLevel("elementary"), + skills_focused=EduSkillsFocused([ + "notation", + ]), + size=0, + ) # ClassCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new class + api_response = api_instance.create_class(body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ClassCreation**](ClassCreation.md)| | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**402** | Account overquota | - | +**0** | Error | - | + +[[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) + +# **create_class_assignment** +> Assignment create_class_assignment(_class) + +Assignment creation + +Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + body = ClassAssignmentUpdate( + type=AssignmentType("none"), + title="title_example", + description="description_example", + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ), + ], + nb_playback_authorized=3.14, + toolset="toolset_example", + cover_file="cover_file_example", + cover="cover_example", + max_points=0, + release_grades="auto", + shuffle_exercises=True, + state="draft", + due_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + scheduled_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + google_classroom=ClassAssignmentUpdateGoogleClassroom( + topic_id="topic_id_example", + ), + microsoft_graph=ClassAssignmentUpdateMicrosoftGraph( + categories=[ + "categories_example", + ], + ), + assignee_mode="everyone", + assigned_students=[ + "assigned_students_example", + ], + ) # ClassAssignmentUpdate | (optional) + + # example passing only required values which don't have defaults set + try: + # Assignment creation + api_response = api_instance.create_class_assignment(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_class_assignment: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Assignment creation + api_response = api_instance.create_class_assignment(_class, body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_class_assignment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **body** | [**ClassAssignmentUpdate**](ClassAssignmentUpdate.md)| | [optional] + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment has been created | - | +**0** | Error | - | + +[[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) + +# **create_submission** +> AssignmentSubmission create_submission(_class, assignment, body) + +Create or edit a submission + +Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + body = AssignmentSubmissionUpdate( + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ), + ], + submit=True, + draft_grade=0, + grade=0, + exercises_ids=[ + "exercises_ids_example", + ], + _return=True, + comments=AssignmentSubmissionUpdateComments( + total=3.14, + unread=3.14, + ), + ) # AssignmentSubmissionUpdate | + + # example passing only required values which don't have defaults set + try: + # Create or edit a submission + api_response = api_instance.create_submission(_class, assignment, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_submission: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + +### Return type + +[**AssignmentSubmission**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submission | - | +**0** | Error | - | + +[[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) + +# **create_test_student_account** +> UserDetails create_test_student_account(_class) + +Create a test student account + +Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.user_details import UserDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + reset = True # bool | If true, the testing account will be re-created. (optional) + + # example passing only required values which don't have defaults set + try: + # Create a test student account + api_response = api_instance.create_test_student_account(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_test_student_account: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a test student account + api_response = api_instance.create_test_student_account(_class, reset=reset) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->create_test_student_account: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **reset** | **bool**| If true, the testing account will be re-created. | [optional] + +### Return type + +[**UserDetails**](UserDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Test account created | - | +**0** | Error | - | + +[[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) + +# **delete_class_user** +> delete_class_user(_class, user) + +Remove a user from the class + +This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + user = "user_example" # str | Unique identifier of the user + + # example passing only required values which don't have defaults set + try: + # Remove a user from the class + api_instance.delete_class_user(_class, user) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->delete_class_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The user has been removed from the class | - | +**0** | Error | - | + +[[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) + +# **delete_submission** +> AssignmentSubmission delete_submission(_class, assignment, submission) + +Reset a submission + +Use this method as a teacher to reset a submission and allow student to start over the assignment + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + + # example passing only required values which don't have defaults set + try: + # Reset a submission + api_response = api_instance.delete_submission(_class, assignment, submission) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->delete_submission: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + +### Return type + +[**AssignmentSubmission**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submission object once reset | - | +**0** | Error | - | + +[[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) + +# **delete_submission_comment** +> delete_submission_comment(_class, assignment, submission, comment) + +Delete a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + comment = "comment_example" # str | Unique identifier of the comment + + # example passing only required values which don't have defaults set + try: + # Delete a feedback comment to a submission + api_instance.delete_submission_comment(_class, assignment, submission, comment) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been deleted | - | +**0** | Error | - | + +[[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) + +# **edit_submission** +> AssignmentSubmission edit_submission(_class, assignment, submission, body) + +Edit a submission + +Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + body = AssignmentSubmissionUpdate( + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ), + ], + submit=True, + draft_grade=0, + grade=0, + exercises_ids=[ + "exercises_ids_example", + ], + _return=True, + comments=AssignmentSubmissionUpdateComments( + total=3.14, + unread=3.14, + ), + ) # AssignmentSubmissionUpdate | + + # example passing only required values which don't have defaults set + try: + # Edit a submission + api_response = api_instance.edit_submission(_class, assignment, submission, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->edit_submission: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + +### Return type + +[**AssignmentSubmission**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submission | - | +**0** | Error | - | + +[[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) + +# **enroll_class** +> ClassDetails enroll_class(enrollment_code) + +Join a class + +Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + enrollment_code = "enrollmentCode_example" # str | The enrollment code, available to the teacher in `ClassDetails` + + # example passing only required values which don't have defaults set + try: + # Join a class + api_response = api_instance.enroll_class(enrollment_code) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->enroll_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + +[[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) + +# **export_submissions_reviews_as_csv** +> file_type export_submissions_reviews_as_csv(_class, assignment) + +CSV Grades exports + +Export list of submissions grades to a CSV file + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + + # example passing only required values which don't have defaults set + try: + # CSV Grades exports + api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +**file_type** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/csv + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + +[[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) + +# **export_submissions_reviews_as_excel** +> file_type export_submissions_reviews_as_excel(_class, assignment) + +Excel Grades exports + +Export list of submissions grades to an Excel file + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + + # example passing only required values which don't have defaults set + try: + # Excel Grades exports + api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +**file_type** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + +[[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) + +# **get_class** +> ClassDetails get_class(_class) + +Get the details of a single class + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + + # example passing only required values which don't have defaults set + try: + # Get the details of a single class + api_response = api_instance.get_class(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + +[[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) + +# **get_score_submissions** +> [AssignmentSubmission] get_score_submissions(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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + score = "score_example" # str | 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`). + + # example passing only required values which don't have defaults set + try: + # List submissions related to the score + api_response = api_instance.get_score_submissions(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + +### Return type + +[**[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + +[[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) + +# **get_submission** +> AssignmentSubmission get_submission(_class, assignment, submission) + +Get a student submission + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + + # example passing only required values which don't have defaults set + try: + # Get a student submission + api_response = api_instance.get_submission(_class, assignment, submission) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_submission: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + +### Return type + +[**AssignmentSubmission**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A submission | - | +**0** | Error | - | + +[[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) + +# **get_submission_comments** +> [AssignmentSubmissionComment] get_submission_comments(_class, assignment, submission) + +List the feedback comments of a submission + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + + # example passing only required values which don't have defaults set + try: + # List the feedback comments of a submission + api_response = api_instance.get_submission_comments(_class, assignment, submission) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + +### Return type + +[**[AssignmentSubmissionComment]**](AssignmentSubmissionComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comments of the score | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + +[[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) + +# **get_submission_history** +> [AssignmentSubmissionHistory] get_submission_history(_class, assignment, submission) + +Get the history of the submission + +For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + + # example passing only required values which don't have defaults set + try: + # Get the history of the submission + api_response = api_instance.get_submission_history(_class, assignment, submission) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_submission_history: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + +### Return type + +[**[AssignmentSubmissionHistory]**](AssignmentSubmissionHistory.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The history of the submission | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + +[[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) + +# **get_submissions** +> [AssignmentSubmission] get_submissions(_class, assignment) + +List the students' submissions + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + + # example passing only required values which don't have defaults set + try: + # List the students' submissions + api_response = api_instance.get_submissions(_class, assignment) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->get_submissions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The submissions | - | +**0** | Error | - | + +[[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) + +# **list_assignments** +> [ClassAssignment] list_assignments(_class) + +Assignments listing + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + + # example passing only required values which don't have defaults set + try: + # Assignments listing + api_response = api_instance.list_assignments(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->list_assignments: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**[ClassAssignment]**](ClassAssignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of assignments for the class | - | +**0** | Error | - | + +[[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) + +# **list_class_student_submissions** +> [AssignmentSubmission] list_class_student_submissions(_class, user) + +List the submissions for a student + +Use this method as a teacher to list all the assignment submissions sent by a student of the class + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + user = "user_example" # str | Unique identifier of the user + + # example passing only required values which don't have defaults set + try: + # List the submissions for a student + api_response = api_instance.list_class_student_submissions(_class, user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | + +### Return type + +[**[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of submissions | - | +**0** | Error | - | + +[[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) + +# **list_classes** +> [ClassDetails] list_classes() + +List the classes available for the current user + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + state = "active" # str | Filter the classes by state (optional) if omitted the server will use the default value of "active" + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the classes available for the current user + api_response = api_instance.list_classes(state=state) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->list_classes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **state** | **str**| Filter the classes by state | [optional] if omitted the server will use the default value of "active" + +### Return type + +[**[ClassDetails]**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of classes | - | +**0** | Error | - | + +[[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) + +# **post_submission_comment** +> AssignmentSubmissionComment post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + +Add a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + assignment_submission_comment_creation = AssignmentSubmissionCommentCreation( + comment="comment_example", + ) # AssignmentSubmissionCommentCreation | + + # example passing only required values which don't have defaults set + try: + # Add a feedback comment to a submission + api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + +### Return type + +[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comment | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + +[[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) + +# **unarchive_assignment** +> Assignment unarchive_assignment(_class, assignment) + +Unarchive the assignment. + +Mark the assignment as `active`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + + # example passing only required values which don't have defaults set + try: + # Unarchive the assignment. + api_response = api_instance.unarchive_assignment(_class, assignment) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment details | - | +**0** | Error | - | + +[[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) + +# **unarchive_class** +> ClassDetails unarchive_class(_class) + +Unarchive the class + +Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + + # example passing only required values which don't have defaults set + try: + # Unarchive the class + api_response = api_instance.unarchive_class(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->unarchive_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The class details | - | +**0** | Error | - | + +[[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) + +# **update_class** +> ClassDetails update_class(_class) + +Update the class + +Update the meta information of the class + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.class_details import ClassDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.class_update import ClassUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + body = ClassUpdate( + name="name_example", + section="section_example", + level=ClassGradeLevel("elementary"), + skills_focused=EduSkillsFocused([ + "notation", + ]), + size=0, + ) # ClassUpdate | Details of the Class (optional) + + # example passing only required values which don't have defaults set + try: + # Update the class + api_response = api_instance.update_class(_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->update_class: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update the class + api_response = api_instance.update_class(_class, body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->update_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] + +### Return type + +[**ClassDetails**](ClassDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new class details | - | +**0** | Error | - | + +[[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) + +# **update_submission_comment** +> AssignmentSubmissionComment update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + +Update a feedback comment to a submission + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import class_api +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = class_api.ClassApi(api_client) + _class = "class_example" # str | Unique identifier of the class + assignment = "assignment_example" # str | Unique identifier of the assignment + submission = "submission_example" # str | Unique identifier of the submission + comment = "comment_example" # str | Unique identifier of the comment + assignment_submission_comment_creation = AssignmentSubmissionCommentCreation( + comment="comment_example", + ) # AssignmentSubmissionCommentCreation | + + # example passing only required values which don't have defaults set + try: + # Update a feedback comment to a submission + api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + +### Return type + +[**AssignmentSubmissionComment**](AssignmentSubmissionComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comment | - | +**403** | Not granted to access to this submission | - | +**404** | Submission not found | - | +**0** | Error | - | + +[[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) + diff --git a/docs/ClassAssignment.md b/docs/ClassAssignment.md new file mode 100644 index 0000000..176cbc5 --- /dev/null +++ b/docs/ClassAssignment.md @@ -0,0 +1,40 @@ +# ClassAssignment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Description and content of the assignment | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**creator** | **str** | The User unique identifier of the creator of this assignment | [optional] +**state** | **str** | State of the assignment | [optional] +**classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] +**creation_date** | **datetime** | The creation date of this assignment | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] +**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] +**assigned_students** | **[str]** | Identifiers for the students that have access to the assignment | [optional] +**submissions** | [**[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] +**google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] +**microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] +**mfc** | [**ClassAssignmentMfc**](ClassAssignmentMfc.md) | | [optional] +**canvas** | [**ClassAssignmentCanvas**](ClassAssignmentCanvas.md) | | [optional] +**lti** | [**ClassAssignmentLti**](ClassAssignmentLti.md) | | [optional] +**issue** | **str** | Detected issue for this assignment | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentCanvas.md b/docs/ClassAssignmentCanvas.md new file mode 100644 index 0000000..b874646 --- /dev/null +++ b/docs/ClassAssignmentCanvas.md @@ -0,0 +1,14 @@ +# ClassAssignmentCanvas + +A Canvas LMS assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on Canvas assignment | [optional] +**alternate_link** | **str** | Link to Canvas assignment | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentLti.md b/docs/ClassAssignmentLti.md new file mode 100644 index 0000000..101a092 --- /dev/null +++ b/docs/ClassAssignmentLti.md @@ -0,0 +1,13 @@ +# ClassAssignmentLti + +An LTI assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Resource ID in the LMS | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentMfc.md b/docs/ClassAssignmentMfc.md new file mode 100644 index 0000000..03916e5 --- /dev/null +++ b/docs/ClassAssignmentMfc.md @@ -0,0 +1,14 @@ +# ClassAssignmentMfc + +A MusicFirst Classroom assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on MusicFirst Task | [optional] +**alternate_link** | **str** | Link to MusicFirst Classroom task | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentUpdate.md b/docs/ClassAssignmentUpdate.md new file mode 100644 index 0000000..35bbdc1 --- /dev/null +++ b/docs/ClassAssignmentUpdate.md @@ -0,0 +1,29 @@ +# ClassAssignmentUpdate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Description and content of the assignment | [optional] +**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**nb_playback_authorized** | **float, none_type** | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | **str, none_type** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str, none_type** | The id of the cover to display | [optional] +**cover** | **str, none_type** | The URL of the cover to display | [optional] +**max_points** | **float, none_type** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**state** | **str** | State of the assignment | [optional] +**due_date** | **datetime, none_type** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] +**scheduled_date** | **datetime, none_type** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**google_classroom** | [**ClassAssignmentUpdateGoogleClassroom**](ClassAssignmentUpdateGoogleClassroom.md) | | [optional] +**microsoft_graph** | [**ClassAssignmentUpdateMicrosoftGraph**](ClassAssignmentUpdateMicrosoftGraph.md) | | [optional] +**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] +**assigned_students** | **[str]** | Identifiers for the students that have access to the assignment | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentUpdateGoogleClassroom.md b/docs/ClassAssignmentUpdateGoogleClassroom.md new file mode 100644 index 0000000..780cad2 --- /dev/null +++ b/docs/ClassAssignmentUpdateGoogleClassroom.md @@ -0,0 +1,13 @@ +# ClassAssignmentUpdateGoogleClassroom + +Google Classroom options for this assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic_id** | **str, none_type** | Identifier of the topic where the assignment is created | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentUpdateMicrosoftGraph.md b/docs/ClassAssignmentUpdateMicrosoftGraph.md new file mode 100644 index 0000000..ee62c93 --- /dev/null +++ b/docs/ClassAssignmentUpdateMicrosoftGraph.md @@ -0,0 +1,13 @@ +# ClassAssignmentUpdateMicrosoftGraph + +Microsoft Graph options for this assignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **[str], none_type** | List of categories this assignment belongs to | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAttachmentCreation.md b/docs/ClassAttachmentCreation.md new file mode 100644 index 0000000..9fb1132 --- /dev/null +++ b/docs/ClassAttachmentCreation.md @@ -0,0 +1,19 @@ +# ClassAttachmentCreation + +Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of the attachment posted: * `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] +**score** | **str** | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] +**worksheet** | **str** | An unique worksheet identifier | [optional] +**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] +**url** | **str** | The URL of the attachment. | [optional] +**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassCreation.md b/docs/ClassCreation.md new file mode 100644 index 0000000..6e80257 --- /dev/null +++ b/docs/ClassCreation.md @@ -0,0 +1,17 @@ +# ClassCreation + +Creation of a classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the new class | +**section** | **str** | The section of the new class | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | **float, none_type** | Number of students in the classroom | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetails.md b/docs/ClassDetails.md new file mode 100644 index 0000000..53e3c54 --- /dev/null +++ b/docs/ClassDetails.md @@ -0,0 +1,36 @@ +# ClassDetails + +A classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the class | [optional] +**state** | [**ClassState**](ClassState.md) | | [optional] +**name** | **str** | The name of the class | [optional] +**section** | **str** | The section of the class | [optional] +**description** | **str** | An optionnal description for this class | [optional] +**organization** | **str** | The unique identifier of the Organization owning this class | [optional] +**owner** | **str** | The unique identifier of the User owning this class | [optional] +**creation_date** | **datetime** | The date when the class was create | [optional] +**enrollment_code** | **str** | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] +**theme** | **str** | The theme identifier using in Flat User Interface | [optional] +**assignments_count** | **float** | The number of assignments created in the class | [optional] +**students_group** | [**GroupDetails**](GroupDetails.md) | | [optional] +**teachers_group** | [**GroupDetails**](GroupDetails.md) | | [optional] +**issues** | [**ClassDetailsIssues**](ClassDetailsIssues.md) | | [optional] +**google_classroom** | [**ClassDetailsGoogleClassroom**](ClassDetailsGoogleClassroom.md) | | [optional] +**google_drive** | [**ClassDetailsGoogleDrive**](ClassDetailsGoogleDrive.md) | | [optional] +**microsoft_graph** | [**ClassDetailsMicrosoftGraph**](ClassDetailsMicrosoftGraph.md) | | [optional] +**lti** | [**ClassDetailsLti**](ClassDetailsLti.md) | | [optional] +**canvas** | [**ClassDetailsCanvas**](ClassDetailsCanvas.md) | | [optional] +**mfc** | [**ClassDetailsMfc**](ClassDetailsMfc.md) | | [optional] +**clever** | [**ClassDetailsClever**](ClassDetailsClever.md) | | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | **float, none_type** | Number of students in the classroom | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md new file mode 100644 index 0000000..43e134c --- /dev/null +++ b/docs/ClassDetailsCanvas.md @@ -0,0 +1,14 @@ +# ClassDetailsCanvas + +Meta information provided by Canvs LMS + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on Canvas | [optional] +**domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md new file mode 100644 index 0000000..2bd671e --- /dev/null +++ b/docs/ClassDetailsClever.md @@ -0,0 +1,19 @@ +# ClassDetailsClever + +Clever.com section-related information + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Clever section unique identifier | [optional] +**creation_date** | **datetime** | The creation date of the section on clever | [optional] +**modification_date** | **datetime** | The last modification date of the section on clever | [optional] +**subject** | **str** | Normalized subject of the course | [optional] +**term_name** | **str** | Name of the term when this course happens | [optional] +**term_start_date** | **datetime** | Beginning date of the term | [optional] +**term_end_date** | **datetime** | End date of the term | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md new file mode 100644 index 0000000..6fec601 --- /dev/null +++ b/docs/ClassDetailsGoogleClassroom.md @@ -0,0 +1,14 @@ +# ClassDetailsGoogleClassroom + +Google Classroom course-related information + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The course identifier on Google Classroom | [optional] +**alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsGoogleDrive.md b/docs/ClassDetailsGoogleDrive.md new file mode 100644 index 0000000..ecb553a --- /dev/null +++ b/docs/ClassDetailsGoogleDrive.md @@ -0,0 +1,14 @@ +# ClassDetailsGoogleDrive + +Google Drive course-related information provided by Google Classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**teacher_folder_id** | **str** | [Teachers only] The Drive directory identifier of the teachers' folder | [optional] +**teacher_folder_alternate_link** | **str** | [Teachers only] The Drive URL of the teachers' folder | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsIssues.md b/docs/ClassDetailsIssues.md new file mode 100644 index 0000000..cd93258 --- /dev/null +++ b/docs/ClassDetailsIssues.md @@ -0,0 +1,13 @@ +# ClassDetailsIssues + +Detected issues for this class + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sync** | [**[ClassDetailsIssuesSyncInner]**](ClassDetailsIssuesSyncInner.md) | Synchronization issues for the class | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsIssuesSyncInner.md b/docs/ClassDetailsIssuesSyncInner.md new file mode 100644 index 0000000..a69deab --- /dev/null +++ b/docs/ClassDetailsIssuesSyncInner.md @@ -0,0 +1,15 @@ +# ClassDetailsIssuesSyncInner + +A sync issue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The account user identifier | [optional] +**email** | **str** | The email address of the user concerned by this sync issue | [optional] +**reason** | **str** | The reason why the account cannot be synced | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsLti.md b/docs/ClassDetailsLti.md new file mode 100644 index 0000000..24f866b --- /dev/null +++ b/docs/ClassDetailsLti.md @@ -0,0 +1,15 @@ +# ClassDetailsLti + +Meta information provided by the LTI consumer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context_id** | **str** | Unique context identifier provided | [optional] +**context_title** | **str** | Context title | [optional] +**context_label** | **str** | Context label | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsMfc.md b/docs/ClassDetailsMfc.md new file mode 100644 index 0000000..b5c606c --- /dev/null +++ b/docs/ClassDetailsMfc.md @@ -0,0 +1,14 @@ +# ClassDetailsMfc + +Meta information provided by Canvs LMS + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the course on MusicFirst Classroom | [optional] +**alternate_link** | **str** | Link to MusicFirst Classroom class | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassDetailsMicrosoftGraph.md b/docs/ClassDetailsMicrosoftGraph.md new file mode 100644 index 0000000..57ea912 --- /dev/null +++ b/docs/ClassDetailsMicrosoftGraph.md @@ -0,0 +1,12 @@ +# ClassDetailsMicrosoftGraph + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The course identifier on Microsoft Graph | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassGradeLevel.md b/docs/ClassGradeLevel.md new file mode 100644 index 0000000..57c07b9 --- /dev/null +++ b/docs/ClassGradeLevel.md @@ -0,0 +1,12 @@ +# ClassGradeLevel + +Class grade level + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Class grade level | must be one of ["elementary", "middle", "high", "university", "other", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassRoles.md b/docs/ClassRoles.md new file mode 100644 index 0000000..79155fa --- /dev/null +++ b/docs/ClassRoles.md @@ -0,0 +1,12 @@ +# ClassRoles + +User's Class Role (for Edu users only) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | User's Class Role (for Edu users only) | must be one of ["teacher", "student", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassState.md b/docs/ClassState.md new file mode 100644 index 0000000..d319788 --- /dev/null +++ b/docs/ClassState.md @@ -0,0 +1,12 @@ +# ClassState + +The state of a classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The state of a classroom | must be one of ["active", "inactive", "archived", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassUpdate.md b/docs/ClassUpdate.md new file mode 100644 index 0000000..7194df5 --- /dev/null +++ b/docs/ClassUpdate.md @@ -0,0 +1,17 @@ +# ClassUpdate + +Update of a classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the class | [optional] +**section** | **str** | The section of the class | [optional] +**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] +**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] +**size** | **float, none_type** | Number of students in the classroom | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Collection.md b/docs/Collection.md new file mode 100644 index 0000000..669c0a1 --- /dev/null +++ b/docs/Collection.md @@ -0,0 +1,25 @@ +# Collection + +Collection of scores + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the collection | [optional] +**title** | **str** | The title of the collection | [optional] +**html_url** | **str** | The url where the collection can be viewed in a web browser | [optional] +**type** | [**CollectionType**](CollectionType.md) | | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**sharing_key** | **str** | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] +**app** | [**CollectionApp**](CollectionApp.md) | | [optional] +**creation_date** | **datetime** | The date when the collection was created | [optional] +**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**rights** | [**ResourceRights**](ResourceRights.md) | | [optional] +**collaborators** | [**[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] +**capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | [optional] +**collections** | **[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md new file mode 100644 index 0000000..5fabe24 --- /dev/null +++ b/docs/CollectionApi.md @@ -0,0 +1,827 @@ +# flat_api.CollectionApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_score_to_collection**](CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection +[**create_collection**](CollectionApi.md#create_collection) | **POST** /collections | Create a new collection +[**delete_collection**](CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection +[**delete_score_from_collection**](CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection +[**edit_collection**](CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata +[**get_collection**](CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details +[**list_collection_scores**](CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection +[**list_collections**](CollectionApi.md#list_collections) | **GET** /collections | List the collections +[**untrash_collection**](CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection + + +# **add_score_to_collection** +> ScoreDetails add_score_to_collection(collection, score) + +Add a score to the collection + +This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Add a score to the collection + api_response = api_instance.add_score_to_collection(collection, score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Add a score to the collection + api_response = api_instance.add_score_to_collection(collection, score, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**403** | Not granted to access to this collection or score | - | +**404** | Collection or score not found | - | +**0** | Error | - | + +[[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) + +# **create_collection** +> Collection create_collection(body) + +Create a new collection + +This method will create a new collection and add it to your `root` collection. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + body = CollectionCreation( + title="title_example", + privacy=CollectionPrivacy("private"), + ) # CollectionCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new collection + api_response = api_instance.create_collection(body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->create_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CollectionCreation**](CollectionCreation.md)| | + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created | - | +**400** | Bad collection creation request | - | +**0** | Error | - | + +[[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) + +# **delete_collection** +> delete_collection(collection) + +Delete the collection + +This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + # example passing only required values which don't have defaults set + try: + # Delete the collection + api_instance.delete_collection(collection) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection deleted | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + +[[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) + +# **delete_score_from_collection** +> delete_score_from_collection(collection, score) + +Delete a score from the collection + +This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Delete a score from the collection + api_instance.delete_score_from_collection(collection, score) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a score from the collection + api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Score removed from the collection | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + +[[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) + +# **edit_collection** +> Collection edit_collection(collection) + +Update a collection's metadata + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.collection_modification import CollectionModification +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + body = CollectionModification( + title="title_example", + privacy=CollectionPrivacy("private"), + ) # CollectionModification | (optional) + + # example passing only required values which don't have defaults set + try: + # Update a collection's metadata + api_response = api_instance.edit_collection(collection) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->edit_collection: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update a collection's metadata + api_response = api_instance.edit_collection(collection, body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->edit_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **body** | [**CollectionModification**](CollectionModification.md)| | [optional] + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection details | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + +[[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) + +# **get_collection** +> Collection get_collection(collection) + +Get collection details + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Get collection details + api_response = api_instance.get_collection(collection) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->get_collection: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get collection details + api_response = api_instance.get_collection(collection, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->get_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **sharing_key** | **str**| 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] + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection details | - | +**403** | Not granted to access to this collection | - | +**404** | Collection not found | - | +**0** | Error | - | + +[[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) + +# **list_collection_scores** +> [ScoreDetails] list_collection_scores(collection) + +List the scores contained in a collection + +Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + sharing_key = "sharingKey_example" # str | 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) + sort = "creationDate" # str | Sort (optional) + direction = "asc" # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 + next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + + # example passing only required values which don't have defaults set + try: + # List the scores contained in a collection + api_response = api_instance.list_collection_scores(collection) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the scores contained in a collection + api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **sharing_key** | **str**| 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] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of scores | - | +**0** | Error | - | + +[[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) + +# **list_collections** +> [Collection] list_collections() + +List the collections + +Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.collection import Collection +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + parent = "root" # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) if omitted the server will use the default value of "root" + sort = "creationDate" # str | Sort (optional) + direction = "asc" # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 + next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the collections + api_response = api_instance.list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->list_collections: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] if omitted the server will use the default value of "root" + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + +### Return type + +[**[Collection]**](Collection.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of collections | - | +**0** | Error | - | + +[[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) + +# **untrash_collection** +> untrash_collection(collection) + +Untrash a collection + +This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import collection_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = collection_api.CollectionApi(api_client) + collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + # example passing only required values which don't have defaults set + try: + # Untrash a collection + api_instance.untrash_collection(collection) + except flat_api.ApiException as e: + print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been untrashed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + diff --git a/docs/CollectionApp.md b/docs/CollectionApp.md new file mode 100644 index 0000000..76aaf44 --- /dev/null +++ b/docs/CollectionApp.md @@ -0,0 +1,15 @@ +# CollectionApp + +For App collections, the details of the app that created the collection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The app unique identifier | [optional] +**name** | **str** | The name of the app | [optional] +**logo** | **str** | The app logo url | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md new file mode 100644 index 0000000..04fd28f --- /dev/null +++ b/docs/CollectionCapabilities.md @@ -0,0 +1,17 @@ +# CollectionCapabilities + +Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_edit** | **bool** | Whether the current user can modify the metadata for the collection | [optional] +**can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | [optional] +**can_delete** | **bool** | Whether the current user can delete the collection | [optional] +**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] +**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionCreation.md b/docs/CollectionCreation.md new file mode 100644 index 0000000..8c9950a --- /dev/null +++ b/docs/CollectionCreation.md @@ -0,0 +1,13 @@ +# CollectionCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the collection | +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md new file mode 100644 index 0000000..01c09f8 --- /dev/null +++ b/docs/CollectionModification.md @@ -0,0 +1,14 @@ +# CollectionModification + +Edit the collection metadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the collection | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionPrivacy.md b/docs/CollectionPrivacy.md new file mode 100644 index 0000000..e72cbd2 --- /dev/null +++ b/docs/CollectionPrivacy.md @@ -0,0 +1,12 @@ +# CollectionPrivacy + +The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. | defaults to "private", must be one of ["private", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionType.md b/docs/CollectionType.md new file mode 100644 index 0000000..9ea4989 --- /dev/null +++ b/docs/CollectionType.md @@ -0,0 +1,12 @@ +# CollectionType + +Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. | must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduLibrary.md b/docs/EduLibrary.md new file mode 100644 index 0000000..da5808b --- /dev/null +++ b/docs/EduLibrary.md @@ -0,0 +1,16 @@ +# EduLibrary + +A Flat for Education Library + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | [optional] +**name** | **str** | Name of the lirbary | [optional] +**type** | **str** | Type of the library | [optional] +**visibility** | **str** | Visibility of the library | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResource.md b/docs/EduResource.md new file mode 100644 index 0000000..ccf80d5 --- /dev/null +++ b/docs/EduResource.md @@ -0,0 +1,23 @@ +# EduResource + +A Flat for Education resource contained in a resources library + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Resource unique identifier | +**type** | [**EduResourceType**](EduResourceType.md) | | +**title** | **str** | Title of the resource | +**capabilities** | [**EduResourceCapabilities**](EduResourceCapabilities.md) | | +**creator** | **str** | The User identifier of the resource creator | [optional] +**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] +**tags** | **[str]** | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] +**parent** | **str** | Identifier of the parent resource, e.g. a folder or root | [optional] +**creation_date** | **datetime** | The date when the resource was created | [optional] +**update_date** | **datetime** | The date when the resource was updated | [optional] +**resource** | [**EduResourceResource**](EduResourceResource.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceCapabilities.md b/docs/EduResourceCapabilities.md new file mode 100644 index 0000000..43ea614 --- /dev/null +++ b/docs/EduResourceCapabilities.md @@ -0,0 +1,15 @@ +# EduResourceCapabilities + +Capabilities available for this resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**can_edit** | **bool** | Whether the current user can modify this resource | [optional] +**can_add_resources** | **bool** | Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) | [optional] +**can_add_folders** | **bool** | Whether the current user can add folders within this resource (e.g. `folder` inside `root`) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceCopy.md b/docs/EduResourceCopy.md new file mode 100644 index 0000000..0bd4d0b --- /dev/null +++ b/docs/EduResourceCopy.md @@ -0,0 +1,13 @@ +# EduResourceCopy + +Copy an education resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination** | **str** | Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceCreation.md b/docs/EduResourceCreation.md new file mode 100644 index 0000000..245b724 --- /dev/null +++ b/docs/EduResourceCreation.md @@ -0,0 +1,15 @@ +# EduResourceCreation + +Creation of an education resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**EduResourceType**](EduResourceType.md) | | +**title** | **str** | Title of the resource | +**parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] if omitted the server will use the default value of "root" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceMove.md b/docs/EduResourceMove.md new file mode 100644 index 0000000..ee201c5 --- /dev/null +++ b/docs/EduResourceMove.md @@ -0,0 +1,13 @@ +# EduResourceMove + +Move an education resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination** | **str** | Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourcePrivacy.md b/docs/EduResourcePrivacy.md new file mode 100644 index 0000000..69b4280 --- /dev/null +++ b/docs/EduResourcePrivacy.md @@ -0,0 +1,12 @@ +# EduResourcePrivacy + +The Education resource privacy mode. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The Education resource privacy mode. | defaults to "private", must be one of ["private", "public", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceResource.md b/docs/EduResourceResource.md new file mode 100644 index 0000000..8ab90e1 --- /dev/null +++ b/docs/EduResourceResource.md @@ -0,0 +1,25 @@ +# EduResourceResource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] +**title** | **str** | Title of the folder | [optional] +**description** | **str** | Description and content of the assignment | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceType.md b/docs/EduResourceType.md new file mode 100644 index 0000000..dadb93c --- /dev/null +++ b/docs/EduResourceType.md @@ -0,0 +1,12 @@ +# EduResourceType + +Type of an education resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Type of an education resource | must be one of ["assignment", "folder", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceUpdate.md b/docs/EduResourceUpdate.md new file mode 100644 index 0000000..b99f69a --- /dev/null +++ b/docs/EduResourceUpdate.md @@ -0,0 +1,13 @@ +# EduResourceUpdate + +Update of an education resource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Title of the resource | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceUseInClass.md b/docs/EduResourceUseInClass.md new file mode 100644 index 0000000..b384157 --- /dev/null +++ b/docs/EduResourceUseInClass.md @@ -0,0 +1,14 @@ +# EduResourceUseInClass + +Use an education resource in class + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classroom** | **str** | The destination classroom where the resource will be copied. | +**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourcesApi.md b/docs/EduResourcesApi.md new file mode 100644 index 0000000..b75ff17 --- /dev/null +++ b/docs/EduResourcesApi.md @@ -0,0 +1,941 @@ +# flat_api.EduResourcesApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**copy_edu_resource**](EduResourcesApi.md#copy_edu_resource) | **POST** /eduResources/{resource}/copy | Copy an education resource to a Resource Library +[**copy_edu_resource_to_demo_class**](EduResourcesApi.md#copy_edu_resource_to_demo_class) | **POST** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class +[**create_edu_resource**](EduResourcesApi.md#create_edu_resource) | **POST** /eduResources | Create a new education resource +[**delete_edu_resource**](EduResourcesApi.md#delete_edu_resource) | **DELETE** /eduResources/{resource} | Delete an education resource +[**get_edu_resource**](EduResourcesApi.md#get_edu_resource) | **GET** /eduResources/{resource} | Get an education resource +[**list_edu_libraries**](EduResourcesApi.md#list_edu_libraries) | **GET** /eduResources/libraries | List the education libraries +[**list_edu_resources**](EduResourcesApi.md#list_edu_resources) | **GET** /eduResources | List education resources in a library or folder +[**move_edu_resource**](EduResourcesApi.md#move_edu_resource) | **POST** /eduResources/{resource}/move | Move an education resource +[**update_edu_resource**](EduResourcesApi.md#update_edu_resource) | **PUT** /eduResources/{resource} | Update an education resource metadata +[**update_edu_resource_assignment**](EduResourcesApi.md#update_edu_resource_assignment) | **PUT** /eduResources/{resource}/assignment | Update an education resource assignment +[**use_edu_resource_in_class**](EduResourcesApi.md#use_edu_resource_in_class) | **POST** /eduResources/{resource}/useInClass | Use an education resource in a class + + +# **copy_edu_resource** +> EduResource copy_edu_resource(resource, edu_resource_copy) + +Copy an education resource to a Resource Library + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + edu_resource_copy = EduResourceCopy( + destination="destination_example", + ) # EduResourceCopy | + + # example passing only required values which don't have defaults set + try: + # Copy an education resource to a Resource Library + api_response = api_instance.copy_edu_resource(resource, edu_resource_copy) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->copy_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + **edu_resource_copy** | [**EduResourceCopy**](EduResourceCopy.md)| | + +### Return type + +[**EduResource**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **copy_edu_resource_to_demo_class** +> ClassAssignment copy_edu_resource_to_demo_class(resource) + +Copy an education assignment to a teacher demo class + +Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + + # example passing only required values which don't have defaults set + try: + # Copy an education assignment to a teacher demo class + api_response = api_instance.copy_edu_resource_to_demo_class(resource) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->copy_edu_resource_to_demo_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + +### Return type + +[**ClassAssignment**](ClassAssignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Assignment copied to the demo class | - | +**0** | Error | - | + +[[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) + +# **create_edu_resource** +> EduResource create_edu_resource(edu_resource_creation) + +Create a new education resource + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + edu_resource_creation = EduResourceCreation( + type=EduResourceType("assignment"), + title="title_example", + parent="root", + ) # EduResourceCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new education resource + api_response = api_instance.create_edu_resource(edu_resource_creation) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->create_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **edu_resource_creation** | [**EduResourceCreation**](EduResourceCreation.md)| | + +### Return type + +[**EduResource**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **delete_edu_resource** +> delete_edu_resource(resource) + +Delete an education resource + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + + # example passing only required values which don't have defaults set + try: + # Delete an education resource + api_instance.delete_edu_resource(resource) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->delete_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Resource deleted | - | +**0** | Error | - | + +[[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) + +# **get_edu_resource** +> EduResource get_edu_resource(resource) + +Get an education resource + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + + # example passing only required values which don't have defaults set + try: + # Get an education resource + api_response = api_instance.get_edu_resource(resource) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->get_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + +### Return type + +[**EduResource**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **list_edu_libraries** +> [EduLibrary] list_edu_libraries() + +List the education libraries + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.edu_library import EduLibrary +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List the education libraries + api_response = api_instance.list_edu_libraries() + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->list_edu_libraries: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**[EduLibrary]**](EduLibrary.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **list_edu_resources** +> [EduResource] list_edu_resources() + +List education resources in a library or folder + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + parent = "root" # str | List the resources contained in this `parent` library or folder (optional) if omitted the server will use the default value of "root" + type = "assignment" # str | Filter the returned resources by type (optional) + sort = "creationDate" # str | Sort (optional) if omitted the server will use the default value of "creationDate" + direction = "asc" # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of resources that may be returned (optional) if omitted the server will use the default value of 25 + next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List education resources in a library or folder + api_response = api_instance.list_edu_resources(parent=parent, type=type, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->list_edu_resources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parent** | **str**| List the resources contained in this `parent` library or folder | [optional] if omitted the server will use the default value of "root" + **type** | **str**| Filter the returned resources by type | [optional] + **sort** | **str**| Sort | [optional] if omitted the server will use the default value of "creationDate" + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of resources that may be returned | [optional] if omitted the server will use the default value of 25 + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + +### Return type + +[**[EduResource]**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of resources | - | +**0** | Error | - | + +[[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) + +# **move_edu_resource** +> EduResource move_edu_resource(resource, edu_resource_move) + +Move an education resource + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + edu_resource_move = EduResourceMove( + destination="destination_example", + ) # EduResourceMove | + + # example passing only required values which don't have defaults set + try: + # Move an education resource + api_response = api_instance.move_edu_resource(resource, edu_resource_move) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->move_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + **edu_resource_move** | [**EduResourceMove**](EduResourceMove.md)| | + +### Return type + +[**EduResource**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **update_edu_resource** +> EduResource update_edu_resource(resource, edu_resource_update) + +Update an education resource metadata + +Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_update import EduResourceUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + edu_resource_update = EduResourceUpdate( + title="title_example", + ) # EduResourceUpdate | + + # example passing only required values which don't have defaults set + try: + # Update an education resource metadata + api_response = api_instance.update_edu_resource(resource, edu_resource_update) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->update_edu_resource: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + **edu_resource_update** | [**EduResourceUpdate**](EduResourceUpdate.md)| | + +### Return type + +[**EduResource**](EduResource.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **update_edu_resource_assignment** +> Assignment update_edu_resource_assignment(resource, assignment_update) + +Update an education resource assignment + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.assignment import Assignment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + assignment_update = AssignmentUpdate( + type=AssignmentType("none"), + title="title_example", + description="description_example", + attachments=[ + ClassAttachmentCreation( + type="rich", + score="score_example", + worksheet="worksheet_example", + sharing_mode=MediaScoreSharingMode("read"), + lock_score_template=True, + url="url_example", + google_drive_file_id="google_drive_file_id_example", + ), + ], + nb_playback_authorized=3.14, + toolset="toolset_example", + cover_file="cover_file_example", + cover="cover_example", + max_points=0, + release_grades="auto", + shuffle_exercises=True, + ) # AssignmentUpdate | + + # example passing only required values which don't have defaults set + try: + # Update an education resource assignment + api_response = api_instance.update_edu_resource_assignment(resource, assignment_update) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->update_edu_resource_assignment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + **assignment_update** | [**AssignmentUpdate**](AssignmentUpdate.md)| | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Fetched resource | - | +**0** | Error | - | + +[[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) + +# **use_edu_resource_in_class** +> ClassAssignment use_edu_resource_in_class(resource, edu_resource_use_in_class) + +Use an education resource in a class + +This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import edu_resources_api +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edu_resources_api.EduResourcesApi(api_client) + resource = "resource_example" # str | Unique identifier of the resource + edu_resource_use_in_class = EduResourceUseInClass( + classroom="classroom_example", + assignment="assignment_example", + ) # EduResourceUseInClass | + + # example passing only required values which don't have defaults set + try: + # Use an education resource in a class + api_response = api_instance.use_edu_resource_in_class(resource, edu_resource_use_in_class) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling EduResourcesApi->use_edu_resource_in_class: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + **edu_resource_use_in_class** | [**EduResourceUseInClass**](EduResourceUseInClass.md)| | + +### Return type + +[**ClassAssignment**](ClassAssignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Assignment copied to the chosen class | - | +**0** | Error | - | + +[[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) + diff --git a/docs/EduSkillsFocused.md b/docs/EduSkillsFocused.md new file mode 100644 index 0000000..1caa654 --- /dev/null +++ b/docs/EduSkillsFocused.md @@ -0,0 +1,12 @@ +# EduSkillsFocused + +Specific skills that will be focused in classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[str]** | Specific skills that will be focused in classroom | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlatErrorResponse.md b/docs/FlatErrorResponse.md new file mode 100644 index 0000000..dedd1ae --- /dev/null +++ b/docs/FlatErrorResponse.md @@ -0,0 +1,16 @@ +# FlatErrorResponse + +An API Error response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | A corresponding code for this error | +**message** | **str** | A printable message for this error | +**id** | **str** | An unique error identifier generated for the request | [optional] +**param** | **str** | The related parameter that caused the error | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlatLocales.md b/docs/FlatLocales.md new file mode 100644 index 0000000..3f854cf --- /dev/null +++ b/docs/FlatLocales.md @@ -0,0 +1,12 @@ +# FlatLocales + +The user language + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The user language | defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GoogleClassroomCoursework.md b/docs/GoogleClassroomCoursework.md new file mode 100644 index 0000000..027e686 --- /dev/null +++ b/docs/GoogleClassroomCoursework.md @@ -0,0 +1,16 @@ +# GoogleClassroomCoursework + +A coursework on Google Classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the coursework assigned by Classroom | [optional] +**state** | **str** | State of the coursework | [optional] +**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] +**topic_id** | **str, none_type** | Identifier of the topic where the assignment is created | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GoogleClassroomSubmission.md b/docs/GoogleClassroomSubmission.md new file mode 100644 index 0000000..15cf3a0 --- /dev/null +++ b/docs/GoogleClassroomSubmission.md @@ -0,0 +1,15 @@ +# GoogleClassroomSubmission + +A coursework submission on Google Classroom + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the coursework submission assigned by Classroom | [optional] +**state** | **str** | State of the submission on Google Classroom | [optional] +**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Group.md b/docs/Group.md new file mode 100644 index 0000000..b56e61c --- /dev/null +++ b/docs/Group.md @@ -0,0 +1,19 @@ +# Group + +A group of users + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the group | [optional] +**name** | **str** | The display name of the group | [optional] +**type** | **str** | The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class | [optional] +**users_count** | **float** | The number of users in this group | [optional] +**read_only** | **bool** | `True` if the group is set in read-only | [optional] +**organization** | **str** | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] +**creation_date** | **datetime** | The creation date of the group | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupApi.md b/docs/GroupApi.md new file mode 100644 index 0000000..52a481c --- /dev/null +++ b/docs/GroupApi.md @@ -0,0 +1,269 @@ +# flat_api.GroupApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_group_details**](GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information +[**get_group_scores**](GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores +[**list_group_users**](GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users + + +# **get_group_details** +> GroupDetails get_group_details(group) + +Get group information + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import group_api +from flat_api.model.group_details import GroupDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + group = "group_example" # str | Unique identifier of a Flat group + + # example passing only required values which don't have defaults set + try: + # Get group information + api_response = api_instance.get_group_details(group) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_details: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + +### Return type + +[**GroupDetails**](GroupDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group details | - | +**0** | Error | - | + +[[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) + +# **get_group_scores** +> [ScoreDetails] get_group_scores(group) + +List group's scores + +Get the list of scores shared with a group. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import group_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + group = "group_example" # str | Unique identifier of a Flat group + parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) + + # example passing only required values which don't have defaults set + try: + # List group's scores + api_response = api_instance.get_group_scores(group) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List group's scores + api_response = api_instance.get_group_scores(group, parent=parent) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group's scores | - | +**0** | Error | - | + +[[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) + +# **list_group_users** +> [UserPublic] list_group_users(group) + +List group's users + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import group_api +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = group_api.GroupApi(api_client) + group = "group_example" # str | Unique identifier of a Flat group + source = "googleClassroom" # str | Filter the users by their source (optional) + + # example passing only required values which don't have defaults set + try: + # List group's users + api_response = api_instance.list_group_users(group) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List group's users + api_response = api_instance.list_group_users(group, source=source) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **source** | **str**| Filter the users by their source | [optional] + +### Return type + +[**[UserPublic]**](UserPublic.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of users member of the group | - | +**0** | Error | - | + +[[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) + diff --git a/docs/GroupDetails.md b/docs/GroupDetails.md new file mode 100644 index 0000000..5ccc9fa --- /dev/null +++ b/docs/GroupDetails.md @@ -0,0 +1,19 @@ +# GroupDetails + +The details of a group + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the group | [optional] +**name** | **str** | The displayable name of the group | [optional] +**type** | [**GroupType**](GroupType.md) | | [optional] +**organization** | **str** | The unique identifier of the Organization owning the group | [optional] +**creation_date** | **datetime** | The date when the group was create | [optional] +**users_count** | **float** | The number of students in this group | [optional] +**read_only** | **bool** | `true` if the properties and members of this group are in in read-only | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupType.md b/docs/GroupType.md new file mode 100644 index 0000000..289644d --- /dev/null +++ b/docs/GroupType.md @@ -0,0 +1,12 @@ +# GroupType + +The type of the group + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The type of the group | must be one of ["generic", "classTeachers", "classStudents", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LicenseMode.md b/docs/LicenseMode.md new file mode 100644 index 0000000..bc6a562 --- /dev/null +++ b/docs/LicenseMode.md @@ -0,0 +1,12 @@ +# LicenseMode + +Mode of the license + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Mode of the license | must be one of ["credit", "site", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LicenseSources.md b/docs/LicenseSources.md new file mode 100644 index 0000000..b53c555 --- /dev/null +++ b/docs/LicenseSources.md @@ -0,0 +1,12 @@ +# LicenseSources + +Source of the license + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Source of the license | defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LmsName.md b/docs/LmsName.md new file mode 100644 index 0000000..fe13e2e --- /dev/null +++ b/docs/LmsName.md @@ -0,0 +1,12 @@ +# LmsName + +LMS name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | LMS name | must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LtiCredentials.md b/docs/LtiCredentials.md new file mode 100644 index 0000000..12a4390 --- /dev/null +++ b/docs/LtiCredentials.md @@ -0,0 +1,21 @@ +# LtiCredentials + +A couple of LTI 1.x OAuth credentials + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of this couple of credentials | [optional] +**name** | **str** | Name of the couple of credentials | [optional] +**lms** | [**LmsName**](LmsName.md) | | [optional] +**organization** | **str** | The unique identifier of the Organization associated to these credentials | [optional] +**creator** | **str** | Unique identifier of the user who created these credentials | [optional] +**creation_date** | **datetime** | The creation date of thse credentials | [optional] +**last_usage** | **datetime** | The last time these credentials were used | [optional] +**consumer_key** | **str** | OAuth 1 Consumer Key | [optional] +**consumer_secret** | **str** | OAuth 1 Consumer Secret | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LtiCredentialsCreation.md b/docs/LtiCredentialsCreation.md new file mode 100644 index 0000000..96f50f8 --- /dev/null +++ b/docs/LtiCredentialsCreation.md @@ -0,0 +1,14 @@ +# LtiCredentialsCreation + +Creation of a couple of LTI 1.x OAuth credentials + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the couple of credentials | +**lms** | [**LmsName**](LmsName.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaAttachment.md b/docs/MediaAttachment.md new file mode 100644 index 0000000..df78867 --- /dev/null +++ b/docs/MediaAttachment.md @@ -0,0 +1,34 @@ +# MediaAttachment + +Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | +**score** | **str** | An unique Flat score identifier | [optional] +**revision** | **str** | An unique revision identifier of a score | [optional] +**worksheet** | **str** | An unique worksheet identifier | [optional] +**dedicated** | **bool** | True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment | [optional] +**track** | **str** | A unique track identifier | [optional] +**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] +**title** | **str** | The resolved title of the attachment | [optional] +**description** | **str** | The resolved description of the attachment | [optional] +**html** | **str** | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] +**html_width** | **str** | If the `html` is available, the width of the widget | [optional] +**html_height** | **str** | If the `html` is available, the height of the widget | [optional] +**url** | **str** | The url of the attachment | [optional] +**thumbnail_url** | **str** | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] +**thumbnail_width** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**thumbnail_height** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**author_name** | **str** | The resolved author name of the attachment | [optional] +**author_url** | **str** | The resolved author url of the attachment | [optional] +**icon_url** | **str** | The URL of the icon | [optional] +**mime_type** | **str** | The mine type of the file | [optional] +**google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaScoreSharingMode.md b/docs/MediaScoreSharingMode.md new file mode 100644 index 0000000..becf510 --- /dev/null +++ b/docs/MediaScoreSharingMode.md @@ -0,0 +1,12 @@ +# MediaScoreSharingMode + +The sharing mode of the score for classes post and assignments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The sharing mode of the score for classes post and assignments | defaults to "read", must be one of ["read", "write", "copy", "performance", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md new file mode 100644 index 0000000..133d8c4 --- /dev/null +++ b/docs/MicrosoftGraphAssignment.md @@ -0,0 +1,16 @@ +# MicrosoftGraphAssignment + +A Microsoft Teams asignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the assignement assigned by Microsoft Teams | [optional] +**state** | **str** | State of the assignment | [optional] +**alternate_link** | **str** | Absolute link to this assignement in the Microsoft Teams web UI | [optional] +**categories** | **[str]** | List of categories where this assignment is published under | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MicrosoftGraphSubmission.md b/docs/MicrosoftGraphSubmission.md new file mode 100644 index 0000000..5cec94d --- /dev/null +++ b/docs/MicrosoftGraphSubmission.md @@ -0,0 +1,15 @@ +# MicrosoftGraphSubmission + +A Microsoft Teams submission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the submission assigned by Microsoft Teams | [optional] +**state** | **str** | State of the submission | [optional] +**alternate_link** | **str** | Absolute link to this submission in the Microsoft Teams web UI | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md new file mode 100644 index 0000000..87b03a0 --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,1153 @@ +# flat_api.OrganizationApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**count_orga_users**](OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters +[**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials +[**create_organization_invitation**](OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization +[**create_organization_user**](OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account +[**create_organization_user_access_token**](OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user +[**create_organization_user_signin_link**](OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user +[**list_lti_credentials**](OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials +[**list_organization_invitations**](OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations +[**list_organization_users**](OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users +[**remove_organization_invitation**](OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation +[**remove_organization_user**](OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat +[**revoke_lti_credentials**](OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials +[**update_organization_user**](OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information + + +# **count_orga_users** +> [UserDetailsAdmin] count_orga_users() + +Count the organization users using the provided filters + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + role = [ + "user", + ] # [str] | Filter users by role (optional) + q = "q_example" # str | The query to search (optional) + group = [ + "group_example", + ] # [str] | Filter users by group (optional) + no_active_license = True # bool | Filter users who don't have an active license (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Count the organization users using the provided filters + api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role** | **[str]**| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | **[str]**| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + +### Return type + +[**[UserDetailsAdmin]**](UserDetailsAdmin.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Number of users | - | +**0** | Error | - | + +[[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) + +# **create_lti_credentials** +> LtiCredentials create_lti_credentials(body) + +Create a new couple of LTI 1.x credentials + +Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + body = LtiCredentialsCreation( + name="name_example", + lms=LmsName("canvas"), + ) # LtiCredentialsCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new couple of LTI 1.x credentials + api_response = api_instance.create_lti_credentials(body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | + +### Return type + +[**LtiCredentials**](LtiCredentials.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The LTI Credentials | - | +**403** | Not admin of an organization | - | +**0** | Error | - | + +[[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) + +# **create_organization_invitation** +> OrganizationInvitation create_organization_invitation() + +Create a new invitation to join the organization + +This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_invitation import OrganizationInvitation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + body = OrganizationInvitationCreation( + email="email_example", + organization_role=OrganizationRoles("admin"), + ) # OrganizationInvitationCreation | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a new invitation to join the organization + api_response = api_instance.create_organization_invitation(body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] + +### Return type + +[**OrganizationInvitation**](OrganizationInvitation.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New invitation created | - | +**0** | Error | - | + +[[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) + +# **create_organization_user** +> UserDetailsAdmin create_organization_user() + +Create a new user account + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + body = UserCreation( + username="2", + firstname="firstname_example", + lastname="lastname_example", + email="email_example", + password="password_example", + locale=FlatLocales("en"), + role="user", + ) # UserCreation | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a new user account + api_response = api_instance.create_organization_user(body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UserCreation**](UserCreation.md)| | [optional] + +### Return type + +[**UserDetailsAdmin**](UserDetailsAdmin.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New user created | - | +**0** | Error | - | + +[[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) + +# **create_organization_user_access_token** +> ApiAccessToken create_organization_user_access_token(user) + +Create a delegated API access token for an organization user + +This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + user = "user_example" # str | Unique identifier of the Flat account + organization_user_access_token_creation = OrganizationUserAccessTokenCreation( + scopes=[ + AppScopes("account.public_profile"), + ], + ) # OrganizationUserAccessTokenCreation | (optional) + + # example passing only required values which don't have defaults set + try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a delegated API access token for an organization user + api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **organization_user_access_token_creation** | [**OrganizationUserAccessTokenCreation**](OrganizationUserAccessTokenCreation.md)| | [optional] + +### Return type + +[**ApiAccessToken**](ApiAccessToken.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created API access token | - | +**0** | Error | - | + +[[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) + +# **create_organization_user_signin_link** +> UserSigninLink create_organization_user_signin_link(user) + +Create a sign in link for an organization user + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_signin_link import UserSigninLink +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + user = "user_example" # str | Unique identifier of the Flat account + user_signin_link_creation = UserSigninLinkCreation( + destination_path="/", + ) # UserSigninLinkCreation | (optional) + + # example passing only required values which don't have defaults set + try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a sign in link for an organization user + api_response = api_instance.create_organization_user_signin_link(user, user_signin_link_creation=user_signin_link_creation) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **user_signin_link_creation** | [**UserSigninLinkCreation**](UserSigninLinkCreation.md)| | [optional] + +### Return type + +[**UserSigninLink**](UserSigninLink.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sign in link | - | +**0** | Error | - | + +[[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) + +# **list_lti_credentials** +> [LtiCredentials] list_lti_credentials() + +List LTI 1.x credentials + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List LTI 1.x credentials + api_response = api_instance.list_lti_credentials() + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**[LtiCredentials]**](LtiCredentials.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of LTI Credentials | - | +**403** | Not admin of an organization | - | +**0** | Error | - | + +[[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) + +# **list_organization_invitations** +> [OrganizationInvitation] list_organization_invitations() + +List the organization invitations + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.organization_invitation import OrganizationInvitation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + role = "user" # str | Filter users by role (optional) + limit = 50 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 50 + next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the organization invitations + api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role** | **str**| Filter users by role | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 50 + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + +### Return type + +[**[OrganizationInvitation]**](OrganizationInvitation.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of invitations | - | +**0** | Error | - | + +[[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) + +# **list_organization_users** +> [UserDetailsAdmin] list_organization_users() + +List the organization users + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + sort = [ + "firstname", + ] # [str] | The order to sort the user list (optional) + direction = "asc" # str | Sort direction (optional) + next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + role = [ + "user", + ] # [str] | Filter users by role (optional) + q = "q_example" # str | The query to search (optional) + group = [ + "group_example", + ] # [str] | Filter users by group (optional) + no_active_license = True # bool | Filter users who don't have an active license (optional) + license_expiration_date = [ + "licenseExpirationDate_example", + ] # [str] | Filter users by license expiration date or `active` / `notActive` (optional) + only_ids = True # bool | Return only user ids (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the organization users + api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sort** | **[str]**| The order to sort the user list | [optional] + **direction** | **str**| Sort direction | [optional] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **role** | **[str]**| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | **[str]**| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **license_expiration_date** | **[str]**| Filter users by license expiration date or `active` / `notActive` | [optional] + **only_ids** | **bool**| Return only user ids | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 + +### Return type + +[**[UserDetailsAdmin]**](UserDetailsAdmin.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of users | - | +**0** | Error | - | + +[[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) + +# **remove_organization_invitation** +> remove_organization_invitation(invitation) + +Remove an organization invitation + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + invitation = "invitation_example" # str | Unique identifier of the invitation + + # example passing only required values which don't have defaults set + try: + # Remove an organization invitation + api_instance.remove_organization_invitation(invitation) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation** | **str**| Unique identifier of the invitation | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The invitation has been removed | - | +**0** | Error | - | + +[[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) + +# **remove_organization_user** +> remove_organization_user(user) + +Remove an account from Flat + +This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + user = "user_example" # str | Unique identifier of the Flat account + convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) + + # example passing only required values which don't have defaults set + try: + # Remove an account from Flat + api_instance.remove_organization_user(user) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Remove an account from Flat + api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User deleted | - | +**0** | Error | - | + +[[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) + +# **revoke_lti_credentials** +> revoke_lti_credentials(credentials) + +Revoke LTI 1.x credentials + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + credentials = "credentials_example" # str | Credentials unique identifier + + # example passing only required values which don't have defaults set + try: + # Revoke LTI 1.x credentials + api_instance.revoke_lti_credentials(credentials) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **credentials** | **str**| Credentials unique identifier | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Credentials revoked | - | +**403** | Not admin of an organization | - | +**404** | Credentials not found | - | +**0** | Error | - | + +[[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) + +# **update_organization_user** +> UserDetailsAdmin update_organization_user(user, body) + +Update account information + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import organization_api +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_admin_update import UserAdminUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = organization_api.OrganizationApi(api_client) + user = "user_example" # str | Unique identifier of the Flat account + body = UserAdminUpdate( + password="password_example", + organization_role=OrganizationRoles("admin"), + username="2", + firstname="firstname_example", + lastname="lastname_example", + email="email_example", + ) # UserAdminUpdate | + + # example passing only required values which don't have defaults set + try: + # Update account information + api_response = api_instance.update_organization_user(user, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of the Flat account | + **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | + +### Return type + +[**UserDetailsAdmin**](UserDetailsAdmin.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User updated | - | +**0** | Error | - | + +[[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) + diff --git a/docs/OrganizationInvitation.md b/docs/OrganizationInvitation.md new file mode 100644 index 0000000..f0d4d26 --- /dev/null +++ b/docs/OrganizationInvitation.md @@ -0,0 +1,19 @@ +# OrganizationInvitation + +Details of an invitation to join an organization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The invitation unique identifier | [optional] +**organization** | **str** | The unique identifier of the Organization owning this class | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**custom_code** | **str** | Enrollment code to use when joining this organization | [optional] +**email** | **str** | The email address this invitation was sent to | [optional] +**invited_by** | **str** | The unique identifier of the User who created this invitation | [optional] +**used_by** | **str** | The unique identifier of the User who used this invitation | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationInvitationCreation.md b/docs/OrganizationInvitationCreation.md new file mode 100644 index 0000000..a801112 --- /dev/null +++ b/docs/OrganizationInvitationCreation.md @@ -0,0 +1,14 @@ +# OrganizationInvitationCreation + +The parameters to create an organization invitation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | The email address you want to send the invitation to | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationRoles.md b/docs/OrganizationRoles.md new file mode 100644 index 0000000..f01979f --- /dev/null +++ b/docs/OrganizationRoles.md @@ -0,0 +1,12 @@ +# OrganizationRoles + +User's Organization Role (for Edu users only) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | User's Organization Role (for Edu users only) | must be one of ["admin", "billing", "teacher", "user", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/OrganizationUserAccessTokenCreation.md new file mode 100644 index 0000000..e64b690 --- /dev/null +++ b/docs/OrganizationUserAccessTokenCreation.md @@ -0,0 +1,13 @@ +# OrganizationUserAccessTokenCreation + +Creation of a delegated API access token for an organization user + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scopes** | [**[AppScopes]**](AppScopes.md) | List of requested scopes for this credential | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCollaborator.md b/docs/ResourceCollaborator.md new file mode 100644 index 0000000..bfa1662 --- /dev/null +++ b/docs/ResourceCollaborator.md @@ -0,0 +1,22 @@ +# ResourceCollaborator + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acl_read** | **bool** | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False +**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False +**id** | **str** | The unique identifier of the permission | [optional] +**score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] +**collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] +**user** | [**UserPublic**](UserPublic.md) | | [optional] +**group** | [**Group**](Group.md) | | [optional] +**user_email** | **str** | If the collaborator is not a user of Flat yet, this field will contain their email. | [optional] +**invited** | **bool** | If this property is `true`, this is still a pending invitation | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCollaboratorCreation.md b/docs/ResourceCollaboratorCreation.md new file mode 100644 index 0000000..99b934c --- /dev/null +++ b/docs/ResourceCollaboratorCreation.md @@ -0,0 +1,19 @@ +# ResourceCollaboratorCreation + +Add a collaborator to a resource. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | The unique identifier of a Flat user | [optional] +**group** | **str** | The unique identifier of a Flat group | [optional] +**user_email** | **str** | Fill this field to invite an individual user by email. | [optional] +**user_token** | **str** | Token received in an invitation to join the score. | [optional] +**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] if omitted the server will use the default value of True +**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] if omitted the server will use the default value of False +**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] if omitted the server will use the default value of False +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRights.md b/docs/ResourceRights.md new file mode 100644 index 0000000..abbebac --- /dev/null +++ b/docs/ResourceRights.md @@ -0,0 +1,16 @@ +# ResourceRights + +The rights of the current user on a score or collection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acl_read** | **bool** | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False +**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md new file mode 100644 index 0000000..daf1765 --- /dev/null +++ b/docs/ScoreApi.md @@ -0,0 +1,2901 @@ +# flat_api.ScoreApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_score_collaborator**](ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator +[**add_score_track**](ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score +[**create_export_task**](ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task +[**create_score**](ScoreApi.md#create_score) | **POST** /scores | Create a new score +[**create_score_revision**](ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision +[**delete_score**](ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score +[**delete_score_comment**](ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment +[**delete_score_track**](ScoreApi.md#delete_score_track) | **DELETE** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score +[**edit_score**](ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata +[**fork_score**](ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score +[**ger_user_likes**](ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores +[**get_group_scores**](ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores +[**get_score**](ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata +[**get_score_collaborator**](ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator +[**get_score_collaborators**](ScoreApi.md#get_score_collaborators) | **GET** /scores/{score}/collaborators | List the collaborators +[**get_score_comments**](ScoreApi.md#get_score_comments) | **GET** /scores/{score}/comments | List comments +[**get_score_revision**](ScoreApi.md#get_score_revision) | **GET** /scores/{score}/revisions/{revision} | Get a score revision +[**get_score_revision_data**](ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data +[**get_score_revisions**](ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions +[**get_score_submissions**](ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score +[**get_score_track**](ScoreApi.md#get_score_track) | **GET** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score +[**get_user_scores**](ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores +[**list_score_tracks**](ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score +[**mark_score_comment_resolved**](ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved +[**mark_score_comment_unresolved**](ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved +[**post_score_comment**](ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment +[**remove_score_collaborator**](ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator +[**untrash_score**](ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score +[**update_score_comment**](ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment +[**update_score_track**](ScoreApi.md#update_score_track) | **PUT** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score + + +# **add_score_collaborator** +> ResourceCollaborator add_score_collaborator(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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ResourceCollaboratorCreation( + user="user_example", + group="group_example", + user_email="user_email_example", + user_token="user_token_example", + acl_read=True, + acl_write=False, + acl_admin=False, + ) # ResourceCollaboratorCreation | + + # example passing only required values which don't have defaults set + try: + # Add a new collaborator + api_response = api_instance.add_score_collaborator(score, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | + +### Return type + +[**ResourceCollaborator**](ResourceCollaborator.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The newly added collaborator metadata | - | +**402** | Account overquota | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **add_score_track** +> ScoreTrack add_score_track(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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_creation import ScoreTrackCreation +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ScoreTrackCreation( + title="title_example", + default=True, + state=ScoreTrackState("draft"), + url="url_example", + synchronization_points=[ + ScoreTrackPoint( + type="measure", + measure_uuid="measure_uuid_example", + time=3.14, + ), + ], + ) # ScoreTrackCreation | + + # example passing only required values which don't have defaults set + try: + # Add a new video or audio track to the score + api_response = api_instance.add_score_track(score, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->add_score_track: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | + +### Return type + +[**ScoreTrack**](ScoreTrack.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created track | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **create_export_task** +> Task create_export_task(score, revision, format) + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format = "mp3" # str | The format of the file that will be generated or the target service name where the file will be exported + sharing_key = "sharingKey_example" # str | 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) + body = TaskExportOptions( + parts=[ + "parts_example", + ], + ) # TaskExportOptions | (optional) + + # example passing only required values which don't have defaults set + try: + # Create a new score export task + api_response = api_instance.create_export_task(score, revision, format) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a new score export task + api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_export_task: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **format** | **str**| The format of the file that will be generated or the target service name where the file will be exported | + **sharing_key** | **str**| 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] + **body** | [**TaskExportOptions**](TaskExportOptions.md)| | [optional] + +### Return type + +[**Task**](Task.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task associated to the generation of the file | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or associated file not found | - | +**0** | Error | - | + +[[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) + +# **create_score** +> ScoreDetails create_score(body) + +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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + body = ScoreCreation( + title="title_example", + privacy=ScorePrivacy("private"), + collection="collection_example", + google_drive_folder="google_drive_folder_example", + builder_data=ScoreCreationBuilderData( + score_data=ScoreCreationBuilderDataScoreData( + use_tab_staff=True, + use_chord_grid=True, + fifths=3.14, + nb_beats=3.14, + beat_type=3.14, + instruments=[ + ScoreCreationBuilderDataScoreDataInstrumentsInner( + group="group_example", + instrument="instrument_example", + long_name="long_name_example", + short_name="short_name_example", + has_quarter_tone=True, + ), + ], + ), + layout_data=ScoreCreationBuilderDataLayoutData( + notes_spacing_coeff=3.14, + length_unit="cm", + page_height=3.14, + page_width=3.14, + page_margin_top=3.14, + page_margin_bottom=3.14, + page_margin_left=3.14, + page_margin_right=3.14, + ), + ), + filename="filename_example", + data="data_example", + data_encoding="base64", + source=ScoreSource( + google_drive="google_drive_example", + ), + ) # ScoreCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new score + api_response = api_instance.create_score(body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ScoreCreation**](ScoreCreation.md)| | + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score created | - | +**400** | Bad score creation request | - | +**402** | Account overquota | - | +**0** | Error | - | + +[[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) + +# **create_score_revision** +> ScoreRevision create_score_revision(score, body) + +Create a new revision + +Update a score by uploading a new revision for this one. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ScoreRevisionCreation( + data="", + data_encoding="base64", + autosave=True, + description="description_example", + ) # ScoreRevisionCreation | + + # example passing only required values which don't have defaults set + try: + # Create a new revision + api_response = api_instance.create_score_revision(score, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | + +### Return type + +[**ScoreRevision**](ScoreRevision.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new created revision metadata | - | +**402** | Account overquota | - | +**403** | Not granted to modify this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **delete_score** +> delete_score(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). + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # Delete a score + api_instance.delete_score(score) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a score + api_instance.delete_score(score, now=now) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] if omitted the server will use the default value of False + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been removed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **delete_score_comment** +> delete_score_comment(score, comment) + +Delete a comment + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Delete a comment + api_instance.delete_score_comment(score, comment) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Delete a comment + api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been deleted | - | +**403** | Not granted to access to this score or not the original comment creator | - | +**404** | Score or comment not found | - | +**0** | Error | - | + +[[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) + +# **delete_score_track** +> delete_score_track(score, track) + +Remove an audio or video track linked to the score + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score audio track + + # example passing only required values which don't have defaults set + try: + # Remove an audio or video track linked to the score + api_instance.delete_score_track(score, track) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Track removed | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + +[[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) + +# **edit_score** +> ScoreDetails edit_score(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ScoreModification( + title="title_example", + subtitle="subtitle_example", + composer="composer_example", + lyricist="lyricist_example", + arranger="arranger_example", + privacy=ScorePrivacy("private"), + sharing_key="bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3", + description="description_example", + tags=[ + "tags_example", + ], + creation_type=ScoreCreationType("original"), + license=ScoreLicense("copyright"), + license_text="license_text_example", + ) # ScoreModification | (optional) + + # example passing only required values which don't have defaults set + try: + # Edit a score's metadata + api_response = api_instance.edit_score(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->edit_score: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Edit a score's metadata + api_response = api_instance.edit_score(score, body=body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->edit_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreModification**](ScoreModification.md)| | [optional] + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **fork_score** +> ScoreDetails fork_score(score, body) + +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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_fork import ScoreFork +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ScoreFork( + collection="root", + keep_original_title=True, + ) # ScoreFork | + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Fork a score + api_response = api_instance.fork_score(score, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->fork_score: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Fork a score + api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->fork_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **ger_user_likes** +> [ScoreDetails] ger_user_likes(user) + +List liked scores + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + user = "user_example" # str | 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 (optional) + + # example passing only required values which don't have defaults set + try: + # List liked scores + api_response = api_instance.ger_user_likes(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List liked scores + api_response = api_instance.ger_user_likes(user, ids=ids) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| 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] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of liked scores | - | +**0** | Error | - | + +[[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) + +# **get_group_scores** +> [ScoreDetails] get_group_scores(group) + +List group's scores + +Get the list of scores shared with a group. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + group = "group_example" # str | Unique identifier of a Flat group + parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) + + # example passing only required values which don't have defaults set + try: + # List group's scores + api_response = api_instance.get_group_scores(group) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List group's scores + api_response = api_instance.get_group_scores(group, parent=parent) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group's scores | - | +**0** | Error | - | + +[[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) + +# **get_score** +> ScoreDetails get_score(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Get a score's metadata + api_response = api_instance.get_score(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a score's metadata + api_response = api_instance.get_score(score, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreDetails**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Score details | - | +**402** | Account overquota and this document is out of the granted quota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **get_score_collaborator** +> ResourceCollaborator get_score_collaborator(score, collaborator) + +Get a collaborator + +Get the information about a collaborator (User or Group). + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Get a collaborator + api_response = api_instance.get_score_collaborator(score, collaborator) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a collaborator + api_response = api_instance.get_score_collaborator(score, collaborator, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | + **sharing_key** | **str**| 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] + +### Return type + +[**ResourceCollaborator**](ResourceCollaborator.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collaborator information | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or collaborator not found | - | +**0** | Error | - | + +[[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) + +# **get_score_collaborators** +> [ResourceCollaborator] get_score_collaborators(score) + +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). + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # List the collaborators + api_response = api_instance.get_score_collaborators(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the collaborators + api_response = api_instance.get_score_collaborators(score, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + +### Return type + +[**[ResourceCollaborator]**](ResourceCollaborator.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of collaborators | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **get_score_comments** +> [ScoreComment] get_score_comments(score) + +List comments + +This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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 = "document" # str | Filter the comments by type (optional) + sort = "date" # str | Sort (optional) if omitted the server will use the default value of "date" + direction = "asc" # str | Sort direction (optional) + + # example passing only required values which don't have defaults set + try: + # List comments + api_response = api_instance.get_score_comments(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List comments + api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **sharing_key** | **str**| 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** | **str**| Filter the comments by type | [optional] + **sort** | **str**| Sort | [optional] if omitted the server will use the default value of "date" + **direction** | **str**| Sort direction | [optional] + +### Return type + +[**[ScoreComment]**](ScoreComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The comments of the score | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **get_score_revision** +> ScoreRevision get_score_revision(score, revision) + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Get a score revision + api_response = api_instance.get_score_revision(score, revision) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a score revision + api_response = api_instance.get_score_revision(score, revision, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreRevision**](ScoreRevision.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Revision metadata | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **get_score_revision_data** +> file_type get_score_revision_data(score, revision, format) + +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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format = "json" # str | The format of the file you will retrieve + sharing_key = "sharingKey_example" # str | 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 = "parts_example" # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) + default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) + url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) + + # example passing only required values which don't have defaults set + try: + # Get a score revision data + api_response = api_instance.get_score_revision_data(score, revision, format) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a score revision data + api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **format** | **str**| The format of the file you will retrieve | + **sharing_key** | **str**| 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** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] + **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] + **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] + +### Return type + +**file_type** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Revision data | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score or associated file not found | - | +**0** | Error | - | + +[[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) + +# **get_score_revisions** +> [ScoreRevision] get_score_revisions(score) + +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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # List the revisions + api_response = api_instance.get_score_revisions(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the revisions + api_response = api_instance.get_score_revisions(score, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + +### Return type + +[**[ScoreRevision]**](ScoreRevision.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of revisions | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **get_score_submissions** +> [AssignmentSubmission] get_score_submissions(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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + + # example passing only required values which don't have defaults set + try: + # List submissions related to the score + api_response = api_instance.get_score_submissions(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + +### Return type + +[**[AssignmentSubmission]**](AssignmentSubmission.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of submissions | - | +**0** | Error | - | + +[[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) + +# **get_score_track** +> ScoreTrack get_score_track(score, track) + +Retrieve the details of an audio or video track linked to a score + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score audio track + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Retrieve the details of an audio or video track linked to a score + api_response = api_instance.get_score_track(score, track) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_track: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Retrieve the details of an audio or video track linked to a score + api_response = api_instance.get_score_track(score, track, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_score_track: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreTrack**](ScoreTrack.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Track details | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + +[[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) + +# **get_user_scores** +> [ScoreDetails] get_user_scores(user) + +List user's scores + +Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + user = "user_example" # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) + + # example passing only required values which don't have defaults set + try: + # List user's scores + api_response = api_instance.get_user_scores(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List user's scores + api_response = api_instance.get_user_scores(user, parent=parent) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user scores | - | +**0** | Error | - | + +[[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) + +# **list_score_tracks** +> [ScoreTrack] list_score_tracks(score) + +List the audio or video tracks linked to a score + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + sharing_key = "sharingKey_example" # str | 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) + assignment = "assignment_example" # str | An assignment id with which all the tracks returned will be related to (optional) + list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) + + # example passing only required values which don't have defaults set + try: + # List the audio or video tracks linked to a score + api_response = api_instance.list_score_tracks(score) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List the audio or video tracks linked to a score + api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] + **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] + +### Return type + +[**[ScoreTrack]**](ScoreTrack.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of tracks | - | +**403** | Not granted to access to this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **mark_score_comment_resolved** +> mark_score_comment_resolved(score, comment) + +Mark the comment as resolved + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Mark the comment as resolved + api_instance.mark_score_comment_resolved(score, comment) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Mark the comment as resolved + api_instance.mark_score_comment_resolved(score, comment, sharing_key=sharing_key) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been marked as resolved | - | +**403** | Not granted to mark this comment as resolved | - | +**404** | Score or comment not found | - | +**0** | Error | - | + +[[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) + +# **mark_score_comment_unresolved** +> mark_score_comment_unresolved(score, comment) + +Mark the comment as unresolved + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Mark the comment as unresolved + api_instance.mark_score_comment_unresolved(score, comment) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Mark the comment as unresolved + api_instance.mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The comment has been unmarked as resolved | - | +**403** | Not granted to unmark this comment as resolved | - | +**404** | Score or comment not found | - | +**0** | Error | - | + +[[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) + +# **post_score_comment** +> ScoreComment post_score_comment(score, body) + +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`. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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 = ScoreCommentCreation( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + mentions=[ + "mentions_example", + ], + reply_to="reply_to_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example", + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) # ScoreCommentCreation | + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Post a new comment + api_response = api_instance.post_score_comment(score, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Post a new comment + api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreComment**](ScoreComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new comment | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score, to post a comment, or your API call triggered our spam filter. | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **remove_score_collaborator** +> remove_score_collaborator(score, collaborator) + +Delete a collaborator + +Remove the specified collaborator from the score + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + + # example passing only required values which don't have defaults set + try: + # Delete a collaborator + api_instance.remove_score_collaborator(score, collaborator) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The collaborator has been removed | - | +**403** | Not granted to manage this score | - | +**404** | Score or collaborator not found | - | +**0** | Error | - | + +[[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) + +# **untrash_score** +> untrash_score(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. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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`). + + # example passing only required values which don't have defaults set + try: + # Untrash a score + api_instance.untrash_score(score) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->untrash_score: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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`). | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The score has been untrashed | - | +**403** | Not granted to manage this score | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **update_score_comment** +> ScoreComment update_score_comment(score, comment, body) + +Update an existing comment + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_comment import ScoreComment +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_comment_update import ScoreCommentUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment + body = ScoreCommentUpdate( + revision="revision_example", + comment="comment_example", + raw_comment="raw_comment_example", + context=ScoreCommentContext( + part_uuid="part_uuid_example", + staff_idx=3.14, + staff_uuid="staff_uuid_example", + measure_uuids=[ + "measure_uuids_example", + ], + start_time_pos=3.14, + stop_time_pos=3.14, + start_dpq=3.14, + stop_dpq=3.14, + ), + ) # ScoreCommentUpdate | + sharing_key = "sharingKey_example" # str | 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) + + # example passing only required values which don't have defaults set + try: + # Update an existing comment + api_response = api_instance.update_score_comment(score, comment, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update an existing comment + api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | + **sharing_key** | **str**| 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] + +### Return type + +[**ScoreComment**](ScoreComment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The edited comment | - | +**402** | Account overquota | - | +**403** | Not granted to access to this score or not the original comment creator | - | +**404** | Score not found | - | +**0** | Error | - | + +[[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) + +# **update_score_track** +> ScoreTrack update_score_track(score, track, body) + +Update an audio or video track linked to a score + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import score_api +from flat_api.model.score_track import ScoreTrack +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_track_update import ScoreTrackUpdate +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = score_api.ScoreApi(api_client) + score = "score_example" # str | 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" # str | Unique identifier of a score audio track + body = ScoreTrackUpdate( + title="title_example", + default=True, + state=ScoreTrackState("draft"), + synchronization_points=[ + ScoreTrackPoint( + type="measure", + measure_uuid="measure_uuid_example", + time=3.14, + ), + ], + ) # ScoreTrackUpdate | + + # example passing only required values which don't have defaults set + try: + # Update an audio or video track linked to a score + api_response = api_instance.update_score_track(score, track, body) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling ScoreApi->update_score_track: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | + +### Return type + +[**ScoreTrack**](ScoreTrack.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated track | - | +**403** | Not granted to access to this score | - | +**404** | Score or Track not found | - | +**0** | Error | - | + +[[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) + diff --git a/docs/ScoreComment.md b/docs/ScoreComment.md new file mode 100644 index 0000000..68e3025 --- /dev/null +++ b/docs/ScoreComment.md @@ -0,0 +1,28 @@ +# ScoreComment + +Comment added on a sheet music + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The comment unique identifier | [optional] +**type** | **str** | The type of the comment | [optional] +**user** | **str** | The author unique identifier | [optional] +**score** | **str** | The unique identifier of the score where the comment was posted | [optional] +**revision** | **str** | The unique identifier of revision the comment was posted | [optional] +**reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] +**date** | **datetime** | The date when the comment was posted | [optional] +**modification_date** | **datetime** | The date of the last comment modification | [optional] +**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] +**raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**mentions** | **[str]** | The list of user identifier mentioned on the score | [optional] +**resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] +**resolved_by** | **str** | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] +**moderation** | [**ScoreCommentModeration**](ScoreCommentModeration.md) | | [optional] +**spam** | **bool** | `true if the message has been detected as spam and hidden from other users | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentContext.md b/docs/ScoreCommentContext.md new file mode 100644 index 0000000..59ecc15 --- /dev/null +++ b/docs/ScoreCommentContext.md @@ -0,0 +1,20 @@ +# ScoreCommentContext + +The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**part_uuid** | **str** | The unique identifier (UUID) of the score part | +**measure_uuids** | **[str]** | The list of measure UUIds | +**start_time_pos** | **float** | | +**stop_time_pos** | **float** | | +**start_dpq** | **float** | | +**stop_dpq** | **float** | | +**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] +**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentCreation.md b/docs/ScoreCommentCreation.md new file mode 100644 index 0000000..e1e893a --- /dev/null +++ b/docs/ScoreCommentCreation.md @@ -0,0 +1,18 @@ +# ScoreCommentCreation + +Creation of a comment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | +**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] +**mentions** | **[str]** | The list of user identifiers mentioned in this comment | [optional] +**reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentModeration.md b/docs/ScoreCommentModeration.md new file mode 100644 index 0000000..b73a7a6 --- /dev/null +++ b/docs/ScoreCommentModeration.md @@ -0,0 +1,14 @@ +# ScoreCommentModeration + +Information about the comment being moderated + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hidden** | **bool** | If true, this comment will be hidden from other users | [optional] +**reason** | **str** | If the comment is hidden, the reason why this one has been moderated | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentUpdate.md b/docs/ScoreCommentUpdate.md new file mode 100644 index 0000000..e999440 --- /dev/null +++ b/docs/ScoreCommentUpdate.md @@ -0,0 +1,16 @@ +# ScoreCommentUpdate + +Update of a comment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] +**raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] +**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCommentsCounts.md b/docs/ScoreCommentsCounts.md new file mode 100644 index 0000000..6460e81 --- /dev/null +++ b/docs/ScoreCommentsCounts.md @@ -0,0 +1,16 @@ +# ScoreCommentsCounts + +A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of comments added to the score | [optional] +**unique** | **float** | The unique (1/user) number of comments added to the score | [optional] +**weekly** | **float** | The weekly unique number of comments added to the score | [optional] +**monthly** | **float** | The monthly unique number of comments added to the score | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreation.md b/docs/ScoreCreation.md new file mode 100644 index 0000000..4eb4915 --- /dev/null +++ b/docs/ScoreCreation.md @@ -0,0 +1,20 @@ +# ScoreCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**builder_data** | [**ScoreCreationBuilderData**](ScoreCreationBuilderData.md) | | [optional] +**filename** | **str** | If this is an imported file, its filename | [optional] +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] if omitted the server will use the default value of "base64" +**source** | [**ScoreSource**](ScoreSource.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md new file mode 100644 index 0000000..6d62a06 --- /dev/null +++ b/docs/ScoreCreationBuilderData.md @@ -0,0 +1,13 @@ +# ScoreCreationBuilderData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | +**layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/ScoreCreationBuilderDataLayoutData.md new file mode 100644 index 0000000..48c6dda --- /dev/null +++ b/docs/ScoreCreationBuilderDataLayoutData.md @@ -0,0 +1,20 @@ +# ScoreCreationBuilderDataLayoutData + +Control the appearance of the score. If missing, default values are used. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notes_spacing_coeff** | **float** | A float value >= 1 that controls the spacing between notes. | [optional] +**length_unit** | **str** | The unit to use for layout customizations | [optional] if omitted the server will use the default value of "cm" +**page_height** | **float** | The height of the page in chosen unit (`lengthUnit`). | [optional] +**page_width** | **float** | The width of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_top** | **float** | The top margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_bottom** | **float** | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_left** | **float** | The left margin of the page in chosen unit (`lengthUnit`). | [optional] +**page_margin_right** | **float** | The right margin of the page in chosen unit (`lengthUnit`). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md new file mode 100644 index 0000000..16eb3de --- /dev/null +++ b/docs/ScoreCreationBuilderDataScoreData.md @@ -0,0 +1,17 @@ +# ScoreCreationBuilderDataScoreData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instruments** | [**[ScoreCreationBuilderDataScoreDataInstrumentsInner]**](ScoreCreationBuilderDataScoreDataInstrumentsInner.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | +**use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] +**use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] +**fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] +**nb_beats** | **float** | The number of beats in the measure | [optional] +**beat_type** | **float** | The duration of a beat in the measure | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md b/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md new file mode 100644 index 0000000..8c1ed32 --- /dev/null +++ b/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md @@ -0,0 +1,16 @@ +# ScoreCreationBuilderDataScoreDataInstrumentsInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | +**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | +**long_name** | **str** | The full name of the instrument | [optional] +**short_name** | **str** | The abbreviation of the name of the instrument | [optional] +**has_quarter_tone** | **bool** | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationType.md b/docs/ScoreCreationType.md new file mode 100644 index 0000000..97cdd97 --- /dev/null +++ b/docs/ScoreCreationType.md @@ -0,0 +1,12 @@ +# ScoreCreationType + +The type of creation (an orginal, an arrangement) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The type of creation (an orginal, an arrangement) | must be one of ["original", "arrangement", "other", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreDetails.md b/docs/ScoreDetails.md new file mode 100644 index 0000000..0a44bcd --- /dev/null +++ b/docs/ScoreDetails.md @@ -0,0 +1,44 @@ +# ScoreDetails + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the score | [optional] +**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] +**title** | **str** | The title of the score | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] +**subtitle** | **str** | Subtitle of the score | [optional] +**lyricist** | **str** | Lyricist of the score | [optional] +**arranger** | **str** | Arranger of the score | [optional] +**composer** | **str** | Composer of the score | [optional] +**description** | **str** | Description of the creation | [optional] +**tags** | **[str]** | Tags describing the score | [optional] +**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] +**license_text** | **str** | Additional license text written on the exported/printed score | [optional] +**duration_time** | **float** | In seconds, an approximative duration of the score | [optional] +**number_measures** | **int** | The number of measures in the score | [optional] +**main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] +**rights** | [**ResourceRights**](ResourceRights.md) | | [optional] +**collaborators** | [**[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] +**creation_date** | **datetime** | The date when the score was created | [optional] +**modification_date** | **datetime** | The date of the last revision of the score | [optional] +**publication_date** | **datetime** | The date when the score was published on Flat | [optional] +**organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] +**parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] +**instruments** | **[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**samples** | **[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] +**google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] +**likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] +**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] +**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] +**plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] +**collections** | **[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreFork.md b/docs/ScoreFork.md new file mode 100644 index 0000000..b4d68e3 --- /dev/null +++ b/docs/ScoreFork.md @@ -0,0 +1,14 @@ +# ScoreFork + +Options to fork the score + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collection** | **str, none_type** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] if omitted the server will use the default value of "root" +**keep_original_title** | **bool** | Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreLicense.md b/docs/ScoreLicense.md new file mode 100644 index 0000000..f90ab0a --- /dev/null +++ b/docs/ScoreLicense.md @@ -0,0 +1,12 @@ +# ScoreLicense + +License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ | must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreLikesCounts.md b/docs/ScoreLikesCounts.md new file mode 100644 index 0000000..7841287 --- /dev/null +++ b/docs/ScoreLikesCounts.md @@ -0,0 +1,15 @@ +# ScoreLikesCounts + +A computed version of the weekly, monthly and total of number of likes for a score + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of likes of the score | [optional] +**weekly** | **float** | The number of new likes during the last week | [optional] +**monthly** | **float** | The number of new likes during the last month | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md new file mode 100644 index 0000000..cac81cd --- /dev/null +++ b/docs/ScoreModification.md @@ -0,0 +1,24 @@ +# ScoreModification + +Edit the score metadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the score | [optional] +**subtitle** | **str** | The subtitle of the score | [optional] +**composer** | **str** | The composer of the score | [optional] +**lyricist** | **str** | The lyricist of the score | [optional] +**arranger** | **str** | The arranger of the score | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] +**description** | **str** | Description of the creation | [optional] +**tags** | **[str]** | Tags describing the score | [optional] +**creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] +**license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] +**license_text** | **str** | The rights info written on the score | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScorePlaysCounts.md b/docs/ScorePlaysCounts.md new file mode 100644 index 0000000..7ae8ac7 --- /dev/null +++ b/docs/ScorePlaysCounts.md @@ -0,0 +1,15 @@ +# ScorePlaysCounts + +A computed version of the total, weekly, and monthly number of plays of the score + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of plays of the score | [optional] +**weekly** | **float** | The weekly number of plays of the score | [optional] +**monthly** | **float** | The monthly number of plays of the score | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScorePrivacy.md b/docs/ScorePrivacy.md new file mode 100644 index 0000000..6334998 --- /dev/null +++ b/docs/ScorePrivacy.md @@ -0,0 +1,12 @@ +# ScorePrivacy + +The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). | defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreRevision.md b/docs/ScoreRevision.md new file mode 100644 index 0000000..aae6257 --- /dev/null +++ b/docs/ScoreRevision.md @@ -0,0 +1,20 @@ +# ScoreRevision + +A score revision metadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the revision. | [optional] +**user** | **str** | The user identifier who created the revision | [optional] +**collaborators** | **[str]** | | [optional] +**creation_date** | **datetime** | The date when this revision was created | [optional] +**event** | **str** | The last event (action id) of the revision | [optional] +**description** | **str** | A description associated to the revision | [optional] +**autosave** | **bool** | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] +**statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md new file mode 100644 index 0000000..2b112d4 --- /dev/null +++ b/docs/ScoreRevisionCreation.md @@ -0,0 +1,16 @@ +# ScoreRevisionCreation + +A new created revision + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] if omitted the server will use the default value of "base64" +**autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] +**description** | **str** | A description associated to the revision | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreRevisionStatistics.md b/docs/ScoreRevisionStatistics.md new file mode 100644 index 0000000..c3e7224 --- /dev/null +++ b/docs/ScoreRevisionStatistics.md @@ -0,0 +1,16 @@ +# ScoreRevisionStatistics + +The statistics related to the score revision (additions and deletions) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additions** | **float** | The number of additions operations in the last revision | [optional] +**deletions** | **float** | The number of deletions operations in the last revision | [optional] +**start_date** | **datetime** | The date of the first action included in this revision | [optional] +**end_date** | **datetime** | The date of the latest action included in this revision | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreSource.md b/docs/ScoreSource.md new file mode 100644 index 0000000..bdee9f6 --- /dev/null +++ b/docs/ScoreSource.md @@ -0,0 +1,12 @@ +# ScoreSource + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google_drive** | **str** | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrack.md b/docs/ScoreTrack.md new file mode 100644 index 0000000..ef739fc --- /dev/null +++ b/docs/ScoreTrack.md @@ -0,0 +1,24 @@ +# ScoreTrack + +An audio track for a score + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the score track | [optional] +**title** | **str** | Title of the track | [optional] +**score** | **str** | The unique identifier of the score | [optional] +**creator** | **str** | The unique identifier of the track creator | [optional] +**creation_date** | **datetime** | The creation date of the track | [optional] +**modification_date** | **datetime** | The modification date of the track | [optional] +**default** | **bool** | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**type** | [**ScoreTrackType**](ScoreTrackType.md) | | [optional] +**url** | **str** | The URL of the track | [optional] +**media_id** | **str** | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] +**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackCreation.md b/docs/ScoreTrackCreation.md new file mode 100644 index 0000000..fbe0978 --- /dev/null +++ b/docs/ScoreTrackCreation.md @@ -0,0 +1,17 @@ +# ScoreTrackCreation + +Creation of a new track. This one must contain the URL of the track or the corresponding file + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Title of the track | [optional] +**default** | **bool** | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**url** | **str** | The URL of the track | [optional] +**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackPoint.md b/docs/ScoreTrackPoint.md new file mode 100644 index 0000000..722ee33 --- /dev/null +++ b/docs/ScoreTrackPoint.md @@ -0,0 +1,15 @@ +# ScoreTrackPoint + +A track synchronization point + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | +**time** | **float** | The corresponding time in seconds | +**measure_uuid** | **str** | The measure unique identifier | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackState.md b/docs/ScoreTrackState.md new file mode 100644 index 0000000..df39241 --- /dev/null +++ b/docs/ScoreTrackState.md @@ -0,0 +1,12 @@ +# ScoreTrackState + +State of the track + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | State of the track | defaults to "draft", must be one of ["draft", "completed", "deleted", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackType.md b/docs/ScoreTrackType.md new file mode 100644 index 0000000..e4f2298 --- /dev/null +++ b/docs/ScoreTrackType.md @@ -0,0 +1,12 @@ +# ScoreTrackType + +The type of an audio track + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The type of an audio track | must be one of ["audio", "soundcloud", "youtube", "vimeo", ] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackUpdate.md b/docs/ScoreTrackUpdate.md new file mode 100644 index 0000000..62d9c95 --- /dev/null +++ b/docs/ScoreTrackUpdate.md @@ -0,0 +1,16 @@ +# ScoreTrackUpdate + +Update an existing track. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Title of the track | [optional] +**default** | **bool** | True if the track should be used as default audio source | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreViewsCounts.md b/docs/ScoreViewsCounts.md new file mode 100644 index 0000000..48b3403 --- /dev/null +++ b/docs/ScoreViewsCounts.md @@ -0,0 +1,15 @@ +# ScoreViewsCounts + +A computed version of the total, weekly, and monthly number of views of the score + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of views of the score | [optional] +**weekly** | **float** | The weekly number of views of the score | [optional] +**monthly** | **float** | The monthly number of views of the score | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Task.md b/docs/Task.md new file mode 100644 index 0000000..9ba61fa --- /dev/null +++ b/docs/Task.md @@ -0,0 +1,23 @@ +# Task + +An asynchronous task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the task | [optional] +**type** | **str** | Type of the task (e.g. audio-export) | [optional] +**state** | **str** | State of the Task | [optional] +**format** | **str** | For files processing, the file format (e.g. `mp3`, `wav`) | [optional] +**score** | **str** | The score unique identifier for tasks related to scores | [optional] +**progress** | [**TaskProgress**](TaskProgress.md) | | [optional] +**creation_date** | **datetime** | The creation date of the task | [optional] +**modification_date** | **datetime** | The last modification date of the task | [optional] +**done_date** | **datetime** | The date when the task has been completed | [optional] +**result** | [**TaskResult**](TaskResult.md) | | [optional] +**error_history** | **[str]** | If any errors happened when processing this task, the list of errors identifiers | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskApi.md b/docs/TaskApi.md new file mode 100644 index 0000000..75b52e5 --- /dev/null +++ b/docs/TaskApi.md @@ -0,0 +1,89 @@ +# flat_api.TaskApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_task**](TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details + + +# **get_task** +> Task get_task(task) + +Get a task details + +This method can be used to follow a task progression, for example while a score is being exported. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import task_api +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = task_api.TaskApi(api_client) + task = "task_example" # str | Unique identifier for the task + + # example passing only required values which don't have defaults set + try: + # Get a task details + api_response = api_instance.get_task(task) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling TaskApi->get_task: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task** | **str**| Unique identifier for the task | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task details | - | +**0** | Error | - | + +[[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) + diff --git a/docs/TaskExportOptions.md b/docs/TaskExportOptions.md new file mode 100644 index 0000000..990ab94 --- /dev/null +++ b/docs/TaskExportOptions.md @@ -0,0 +1,13 @@ +# TaskExportOptions + +Options for the requested export + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parts** | **[str]** | A list of parts to specifically export | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskProgress.md b/docs/TaskProgress.md new file mode 100644 index 0000000..eadbe1d --- /dev/null +++ b/docs/TaskProgress.md @@ -0,0 +1,14 @@ +# TaskProgress + +Details about the task progression + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**percent** | **float** | Percent of the task progression | [optional] +**text** | **str** | Text details of the task progress | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskResult.md b/docs/TaskResult.md new file mode 100644 index 0000000..95505a8 --- /dev/null +++ b/docs/TaskResult.md @@ -0,0 +1,14 @@ +# TaskResult + +Optional result information about this task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | URL returned by the task worker | [optional] +**error** | **str** | Error returned by task worker | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAdminUpdate.md b/docs/UserAdminUpdate.md new file mode 100644 index 0000000..75c06f7 --- /dev/null +++ b/docs/UserAdminUpdate.md @@ -0,0 +1,18 @@ +# UserAdminUpdate + +User update as an organization admin + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password of the account | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**username** | **str** | Username of the account | [optional] +**firstname** | **str** | First name of the user | [optional] +**lastname** | **str** | Last name of the user | [optional] +**email** | **str** | Email of the account | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..d9496cb --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,271 @@ +# flat_api.UserApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ger_user_likes**](UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores +[**get_user**](UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile +[**get_user_scores**](UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores + + +# **ger_user_likes** +> [ScoreDetails] ger_user_likes(user) + +List liked scores + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import user_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + user = "user_example" # str | 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 (optional) + + # example passing only required values which don't have defaults set + try: + # List liked scores + api_response = api_instance.ger_user_likes(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->ger_user_likes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List liked scores + api_response = api_instance.ger_user_likes(user, ids=ids) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->ger_user_likes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| 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] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of liked scores | - | +**0** | Error | - | + +[[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) + +# **get_user** +> UserPublic get_user(user) + +Get a public user profile + +Get a profile of a Flat or Flat for Education User. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import user_api +from flat_api.model.user_public import UserPublic +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + user = "user_example" # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. + + # example passing only required values which don't have defaults set + try: + # Get a public user profile + api_response = api_instance.get_user(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | + +### Return type + +[**UserPublic**](UserPublic.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user public details | - | +**0** | Error | - | + +[[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) + +# **get_user_scores** +> [ScoreDetails] get_user_scores(user) + +List user's scores + +Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import time +import flat_api +from flat_api.api import user_api +from flat_api.model.score_details import ScoreDetails +from flat_api.model.flat_error_response import FlatErrorResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = user_api.UserApi(api_client) + user = "user_example" # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) + + # example passing only required values which don't have defaults set + try: + # List user's scores + api_response = api_instance.get_user_scores(user) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user_scores: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # List user's scores + api_response = api_instance.get_user_scores(user, parent=parent) + pprint(api_response) + except flat_api.ApiException as e: + print("Exception when calling UserApi->get_user_scores: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + +### Return type + +[**[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user scores | - | +**0** | Error | - | + +[[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) + diff --git a/docs/UserAzureDetails.md b/docs/UserAzureDetails.md new file mode 100644 index 0000000..9d2cf4e --- /dev/null +++ b/docs/UserAzureDetails.md @@ -0,0 +1,14 @@ +# UserAzureDetails + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oid** | **str** | User object identifier on Azure AD | [optional] +**hd** | **str** | User tenant (domain name) | [optional] +**preferred_username** | **str** | User Preferred Username (UPN), i.e. the main email of the user | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunityProfileLinks.md b/docs/UserCommunityProfileLinks.md new file mode 100644 index 0000000..deb19d9 --- /dev/null +++ b/docs/UserCommunityProfileLinks.md @@ -0,0 +1,18 @@ +# UserCommunityProfileLinks + +Social networks links + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spotify_url** | **str, none_type** | Spotify Profile URL | [optional] +**youtube_url** | **str, none_type** | YouTube channel URL | [optional] +**soundcloud_url** | **str, none_type** | SoundCloud Profile URL | [optional] +**tiktok_url** | **str, none_type** | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] +**instagram_url** | **str, none_type** | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] +**website_url** | **str, none_type** | Personnal website URL | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCreation.md b/docs/UserCreation.md new file mode 100644 index 0000000..773b5c1 --- /dev/null +++ b/docs/UserCreation.md @@ -0,0 +1,19 @@ +# UserCreation + +User creation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Username of the new account | +**password** | **str** | Password of the new account | +**firstname** | **str** | First name of the user | [optional] +**lastname** | **str** | Last name of the user | [optional] +**email** | **str** | Email of the new account | [optional] +**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**role** | **str** | Role of the new account | [optional] if omitted the server will use the default value of "user" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDetails.md b/docs/UserDetails.md new file mode 100644 index 0000000..ad073dd --- /dev/null +++ b/docs/UserDetails.md @@ -0,0 +1,40 @@ +# UserDetails + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the user | [optional] +**type** | **str** | The type of account | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**picture** | **str, none_type** | The URL of the picture to display | [optional] +**badges** | **[str]** | List of badges for the user profile | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**bio** | **str** | User's biography | [optional] +**registration_date** | **datetime** | Date the user signed up | [optional] +**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] +**followers_count** | **int** | Number of followers the user have | [optional] +**following_count** | **int** | Number of people the user follow | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**profile_theme** | **str** | Theme (background) for the profile | [optional] +**instruments** | **[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] +**azure_details** | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] +**private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] +**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**groups** | **[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**picture_file** | **str, none_type** | The ID of the user profile picture | [optional] +**cover_picture_file** | **str, none_type** | The ID of the user profile cover picture | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDetailsAdmin.md b/docs/UserDetailsAdmin.md new file mode 100644 index 0000000..15bc762 --- /dev/null +++ b/docs/UserDetailsAdmin.md @@ -0,0 +1,28 @@ +# UserDetailsAdmin + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The user unique identifier | [optional] +**type** | **str** | The type of user account | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**picture** | **str, none_type** | The URL of the picture to display | [optional] +**badges** | **[str]** | List of badges for the user profile | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**email** | **str** | Email of the user | [optional] +**last_activity_date** | **datetime** | Date of the last user activity | [optional] +**license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] +**groups** | **[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md new file mode 100644 index 0000000..2e7c6c6 --- /dev/null +++ b/docs/UserDetailsAdminLicense.md @@ -0,0 +1,17 @@ +# UserDetailsAdminLicense + +Current active license of the user + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the current license | [optional] +**expiration_date** | **datetime** | Date when the license expires | [optional] +**source** | [**LicenseSources**](LicenseSources.md) | | [optional] +**mode** | [**LicenseMode**](LicenseMode.md) | | [optional] +**active** | **bool** | ID of the current license | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserPublic.md b/docs/UserPublic.md new file mode 100644 index 0000000..87a8f7d --- /dev/null +++ b/docs/UserPublic.md @@ -0,0 +1,34 @@ +# UserPublic + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The user unique identifier | [optional] +**type** | **str** | The type of user account | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**picture** | **str, none_type** | The URL of the picture to display | [optional] +**badges** | **[str]** | List of badges for the user profile | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**bio** | **str** | User's biography | [optional] +**registration_date** | **datetime** | Date the user signed up | [optional] +**liked_scores_count** | **int** | Number of the scores liked by the user | [optional] +**followers_count** | **int** | Number of followers the user have | [optional] +**following_count** | **int** | Number of people the user follow | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**profile_theme** | **str** | Theme (background) for the profile | [optional] +**instruments** | **[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserPublicSummary.md b/docs/UserPublicSummary.md new file mode 100644 index 0000000..33aab44 --- /dev/null +++ b/docs/UserPublicSummary.md @@ -0,0 +1,24 @@ +# UserPublicSummary + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The user unique identifier | [optional] +**type** | **str** | The type of user account | [optional] +**username** | **str** | The user name (unique for the organization) | [optional] +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**picture** | **str, none_type** | The URL of the picture to display | [optional] +**badges** | **[str]** | List of badges for the user profile | [optional] +**organization** | **str** | Organization ID (for Edu users only) | [optional] +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] +**class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] +**html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSigninLink.md b/docs/UserSigninLink.md new file mode 100644 index 0000000..5116ad6 --- /dev/null +++ b/docs/UserSigninLink.md @@ -0,0 +1,13 @@ +# UserSigninLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | URL to use to sign in to this account | [optional] +**expiration_date** | **datetime** | Date when the link expires | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSigninLinkCreation.md b/docs/UserSigninLinkCreation.md new file mode 100644 index 0000000..b56ec21 --- /dev/null +++ b/docs/UserSigninLinkCreation.md @@ -0,0 +1,12 @@ +# UserSigninLinkCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**destination_path** | **str** | Path to redirect to after signin | [optional] if omitted the server will use the default value of "/" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/apis/tags/AccountApi.md b/docs/apis/tags/AccountApi.md deleted file mode 100644 index e66f1e7..0000000 --- a/docs/apis/tags/AccountApi.md +++ /dev/null @@ -1,125 +0,0 @@ - -# flat_api.apis.tags.account_api.AccountApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_authenticated_user**](#get_authenticated_user) | **get** /me | Get current user account - -# **get_authenticated_user** - -> UserDetails get_authenticated_user() - -Get current user account - -Get details about the current authenticated User. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import account_api -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = account_api.AccountApi(api_client) - - # example passing only optional values - query_params = { - 'onlyId': False, - } - try: - # Get current user account - api_response = api_instance.get_authenticated_user( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -onlyId | OnlyIdSchema | | optional - - -# OnlyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_authenticated_user.ApiResponseFor200) | Current user details -default | [ApiResponseForDefault](#get_authenticated_user.ApiResponseForDefault) | Error - -#### get_authenticated_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserDetails**](../../models/UserDetails.md) | | - - -#### get_authenticated_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/CollectionApi.md b/docs/apis/tags/CollectionApi.md deleted file mode 100644 index 72f7fb2..0000000 --- a/docs/apis/tags/CollectionApi.md +++ /dev/null @@ -1,1498 +0,0 @@ - -# flat_api.apis.tags.collection_api.CollectionApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_score_to_collection**](#add_score_to_collection) | **put** /collections/{collection}/scores/{score} | Add a score to the collection -[**create_collection**](#create_collection) | **post** /collections | Create a new collection -[**delete_collection**](#delete_collection) | **delete** /collections/{collection} | Delete the collection -[**delete_score_from_collection**](#delete_score_from_collection) | **delete** /collections/{collection}/scores/{score} | Delete a score from the collection -[**edit_collection**](#edit_collection) | **put** /collections/{collection} | Update a collection's metadata -[**get_collection**](#get_collection) | **get** /collections/{collection} | Get collection details -[**list_collection_scores**](#list_collection_scores) | **get** /collections/{collection}/scores | List the scores contained in a collection -[**list_collections**](#list_collections) | **get** /collections | List the collections -[**untrash_collection**](#untrash_collection) | **post** /collections/{collection}/untrash | Untrash a collection - -# **add_score_to_collection** - -> ScoreDetails add_score_to_collection(collectionscore) - -Add a score to the collection - -This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - 'score': "score_example", - } - query_params = { - } - try: - # Add a score to the collection - api_response = api_instance.add_score_to_collection( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) - - # example passing only optional values - path_params = { - 'collection': "collection_example", - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Add a score to the collection - api_response = api_instance.add_score_to_collection( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | -score | ScoreSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#add_score_to_collection.ApiResponseFor200) | Score details -403 | [ApiResponseFor403](#add_score_to_collection.ApiResponseFor403) | Not granted to access to this collection or score -404 | [ApiResponseFor404](#add_score_to_collection.ApiResponseFor404) | Collection or score not found -default | [ApiResponseForDefault](#add_score_to_collection.ApiResponseForDefault) | Error - -#### add_score_to_collection.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreDetails**](../../models/ScoreDetails.md) | | - - -#### add_score_to_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_to_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_to_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_collection** - -> Collection create_collection(body) - -Create a new collection - -This method will create a new collection and add it to your `root` collection. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - body = CollectionCreation( - title="title_example", - privacy=CollectionPrivacy("private"), - ) - try: - # Create a new collection - api_response = api_instance.create_collection( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->create_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CollectionCreation**](../../models/CollectionCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_collection.ApiResponseFor200) | Collection created -400 | [ApiResponseFor400](#create_collection.ApiResponseFor400) | Bad collection creation request -default | [ApiResponseForDefault](#create_collection.ApiResponseForDefault) | Error - -#### create_collection.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Collection**](../../models/Collection.md) | | - - -#### create_collection.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_collection** - -> delete_collection(collection) - -Delete the collection - -This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - } - try: - # Delete the collection - api_response = api_instance.delete_collection( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->delete_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_collection.ApiResponseFor204) | Collection deleted -403 | [ApiResponseFor403](#delete_collection.ApiResponseFor403) | Not granted to access to this collection -404 | [ApiResponseFor404](#delete_collection.ApiResponseFor404) | Collection not found -default | [ApiResponseForDefault](#delete_collection.ApiResponseForDefault) | Error - -#### delete_collection.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_score_from_collection** - -> delete_score_from_collection(collectionscore) - -Delete a score from the collection - -This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - 'score': "score_example", - } - query_params = { - } - try: - # Delete a score from the collection - api_response = api_instance.delete_score_from_collection( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) - - # example passing only optional values - path_params = { - 'collection': "collection_example", - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Delete a score from the collection - api_response = api_instance.delete_score_from_collection( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | -score | ScoreSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_score_from_collection.ApiResponseFor204) | Score removed from the collection -403 | [ApiResponseFor403](#delete_score_from_collection.ApiResponseFor403) | Not granted to access to this collection -404 | [ApiResponseFor404](#delete_score_from_collection.ApiResponseFor404) | Collection not found -default | [ApiResponseForDefault](#delete_score_from_collection.ApiResponseForDefault) | Error - -#### delete_score_from_collection.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_score_from_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_from_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_from_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **edit_collection** - -> Collection edit_collection(collection) - -Update a collection's metadata - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.collection_modification import CollectionModification -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - } - try: - # Update a collection's metadata - api_response = api_instance.edit_collection( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->edit_collection: %s\n" % e) - - # example passing only optional values - path_params = { - 'collection': "collection_example", - } - body = CollectionModification( - title="title_example", - privacy=CollectionPrivacy("private"), - ) - try: - # Update a collection's metadata - api_response = api_instance.edit_collection( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->edit_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CollectionModification**](../../models/CollectionModification.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#edit_collection.ApiResponseFor200) | Collection details -403 | [ApiResponseFor403](#edit_collection.ApiResponseFor403) | Not granted to access to this collection -404 | [ApiResponseFor404](#edit_collection.ApiResponseFor404) | Collection not found -default | [ApiResponseForDefault](#edit_collection.ApiResponseForDefault) | Error - -#### edit_collection.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Collection**](../../models/Collection.md) | | - - -#### edit_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### edit_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### edit_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_collection** - -> Collection get_collection(collection) - -Get collection details - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - } - query_params = { - } - try: - # Get collection details - api_response = api_instance.get_collection( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->get_collection: %s\n" % e) - - # example passing only optional values - path_params = { - 'collection': "collection_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Get collection details - api_response = api_instance.get_collection( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->get_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_collection.ApiResponseFor200) | Collection details -403 | [ApiResponseFor403](#get_collection.ApiResponseFor403) | Not granted to access to this collection -404 | [ApiResponseFor404](#get_collection.ApiResponseFor404) | Collection not found -default | [ApiResponseForDefault](#get_collection.ApiResponseForDefault) | Error - -#### get_collection.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Collection**](../../models/Collection.md) | | - - -#### get_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_collection_scores** - -> [ScoreDetails] list_collection_scores(collection) - -List the scores contained in a collection - -Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - } - query_params = { - } - try: - # List the scores contained in a collection - api_response = api_instance.list_collection_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) - - # example passing only optional values - path_params = { - 'collection': "collection_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - 'sort': "creationDate", - 'direction': "asc", - 'limit': 25, - 'next': "next_example", - 'previous': "previous_example", - } - try: - # List the scores contained in a collection - api_response = api_instance.list_collection_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional -sort | SortSchema | | optional -direction | DirectionSchema | | optional -limit | LimitSchema | | optional -next | NextSchema | | optional -previous | PreviousSchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SortSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["creationDate", "modificationDate", "title", ] - -# DirectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["asc", "desc", ] - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 - -# NextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PreviousSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_collection_scores.ApiResponseFor200) | List of scores -default | [ApiResponseForDefault](#list_collection_scores.ApiResponseForDefault) | Error - -#### list_collection_scores.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### list_collection_scores.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_collections** - -> [Collection] list_collections() - -List the collections - -Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only optional values - query_params = { - 'parent': "root", - 'sort': "creationDate", - 'direction': "asc", - 'limit': 25, - 'next': "next_example", - 'previous': "previous_example", - } - try: - # List the collections - api_response = api_instance.list_collections( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->list_collections: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional -sort | SortSchema | | optional -direction | DirectionSchema | | optional -limit | LimitSchema | | optional -next | NextSchema | | optional -previous | PreviousSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "root" - -# SortSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["creationDate", "title", ] - -# DirectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["asc", "desc", ] - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 - -# NextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PreviousSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_collections.ApiResponseFor200) | List of collections -default | [ApiResponseForDefault](#list_collections.ApiResponseForDefault) | Error - -#### list_collections.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Collection**]({{complexTypePrefix}}Collection.md) | [**Collection**]({{complexTypePrefix}}Collection.md) | [**Collection**]({{complexTypePrefix}}Collection.md) | | - -#### list_collections.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **untrash_collection** - -> untrash_collection(collection) - -Untrash a collection - -This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'collection': "collection_example", - } - try: - # Untrash a collection - api_response = api_instance.untrash_collection( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -collection | CollectionSchema | | - -# CollectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#untrash_collection.ApiResponseFor204) | The score has been untrashed -403 | [ApiResponseFor403](#untrash_collection.ApiResponseFor403) | Not granted to manage this score -404 | [ApiResponseFor404](#untrash_collection.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#untrash_collection.ApiResponseForDefault) | Error - -#### untrash_collection.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### untrash_collection.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### untrash_collection.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### untrash_collection.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/EduResourcesApi.md b/docs/apis/tags/EduResourcesApi.md deleted file mode 100644 index 92db4de..0000000 --- a/docs/apis/tags/EduResourcesApi.md +++ /dev/null @@ -1,1397 +0,0 @@ - -# flat_api.apis.tags.edu_resources_api.EduResourcesApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**copy_edu_resource**](#copy_edu_resource) | **post** /eduResources/{resource}/copy | Copy an education resource to a Resource Library -[**copy_edu_resource_to_demo_class**](#copy_edu_resource_to_demo_class) | **post** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class -[**create_edu_resource**](#create_edu_resource) | **post** /eduResources | Create a new education resource -[**delete_edu_resource**](#delete_edu_resource) | **delete** /eduResources/{resource} | Delete an education resource -[**get_edu_resource**](#get_edu_resource) | **get** /eduResources/{resource} | Get an education resource -[**list_edu_libraries**](#list_edu_libraries) | **get** /eduResources/libraries | List the education libraries -[**list_edu_resources**](#list_edu_resources) | **get** /eduResources | List education resources in a library or folder -[**move_edu_resource**](#move_edu_resource) | **post** /eduResources/{resource}/move | Move an education resource -[**update_edu_resource**](#update_edu_resource) | **put** /eduResources/{resource} | Update an education resource metadata -[**update_edu_resource_assignment**](#update_edu_resource_assignment) | **put** /eduResources/{resource}/assignment | Update an education resource assignment -[**use_edu_resource_in_class**](#use_edu_resource_in_class) | **post** /eduResources/{resource}/useInClass | Use an education resource in a class - -# **copy_edu_resource** - -> EduResource copy_edu_resource(resourceedu_resource_copy) - -Copy an education resource to a Resource Library - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - body = EduResourceCopy( - destination="destination_example", - ) - try: - # Copy an education resource to a Resource Library - api_response = api_instance.copy_edu_resource( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->copy_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResourceCopy**](../../models/EduResourceCopy.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#copy_edu_resource.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#copy_edu_resource.ApiResponseForDefault) | Error - -#### copy_edu_resource.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResource**](../../models/EduResource.md) | | - - -#### copy_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **copy_edu_resource_to_demo_class** - -> ClassAssignment copy_edu_resource_to_demo_class(resource) - -Copy an education assignment to a teacher demo class - -Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - try: - # Copy an education assignment to a teacher demo class - api_response = api_instance.copy_edu_resource_to_demo_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->copy_edu_resource_to_demo_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#copy_edu_resource_to_demo_class.ApiResponseFor200) | Assignment copied to the demo class -default | [ApiResponseForDefault](#copy_edu_resource_to_demo_class.ApiResponseForDefault) | Error - -#### copy_edu_resource_to_demo_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassAssignment**](../../models/ClassAssignment.md) | | - - -#### copy_edu_resource_to_demo_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_edu_resource** - -> EduResource create_edu_resource(edu_resource_creation) - -Create a new education resource - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - body = EduResourceCreation( - type=EduResourceType("assignment"), - title="title_example", - parent="root", - ) - try: - # Create a new education resource - api_response = api_instance.create_edu_resource( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->create_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResourceCreation**](../../models/EduResourceCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_edu_resource.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#create_edu_resource.ApiResponseForDefault) | Error - -#### create_edu_resource.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResource**](../../models/EduResource.md) | | - - -#### create_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_edu_resource** - -> delete_edu_resource(resource) - -Delete an education resource - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - try: - # Delete an education resource - api_response = api_instance.delete_edu_resource( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->delete_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_edu_resource.ApiResponseFor204) | Resource deleted -default | [ApiResponseForDefault](#delete_edu_resource.ApiResponseForDefault) | Error - -#### delete_edu_resource.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_edu_resource** - -> EduResource get_edu_resource(resource) - -Get an education resource - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - try: - # Get an education resource - api_response = api_instance.get_edu_resource( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->get_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_edu_resource.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#get_edu_resource.ApiResponseForDefault) | Error - -#### get_edu_resource.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResource**](../../models/EduResource.md) | | - - -#### get_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_edu_libraries** - -> [EduLibrary] list_edu_libraries() - -List the education libraries - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.edu_library import EduLibrary -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # List the education libraries - api_response = api_instance.list_edu_libraries() - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->list_edu_libraries: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_edu_libraries.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#list_edu_libraries.ApiResponseForDefault) | Error - -#### list_edu_libraries.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -List of libraries to display - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of libraries to display | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | [**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | [**EduLibrary**]({{complexTypePrefix}}EduLibrary.md) | | - -#### list_edu_libraries.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_edu_resources** - -> [EduResource] list_edu_resources() - -List education resources in a library or folder - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only optional values - query_params = { - 'parent': "root", - 'type': "assignment", - 'sort': "creationDate", - 'direction': "asc", - 'limit': 25, - 'next': "next_example", - 'previous': "previous_example", - } - try: - # List education resources in a library or folder - api_response = api_instance.list_edu_resources( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->list_edu_resources: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional -type | TypeSchema | | optional -sort | SortSchema | | optional -direction | DirectionSchema | | optional -limit | LimitSchema | | optional -next | NextSchema | | optional -previous | PreviousSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "root" - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["assignment", "folder", ] - -# SortSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["creationDate", "updateDate", "title", ] if omitted the server will use the default value of "creationDate" - -# DirectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["asc", "desc", ] - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 - -# NextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PreviousSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_edu_resources.ApiResponseFor200) | List of resources -default | [ApiResponseForDefault](#list_edu_resources.ApiResponseForDefault) | Error - -#### list_edu_resources.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**EduResource**]({{complexTypePrefix}}EduResource.md) | [**EduResource**]({{complexTypePrefix}}EduResource.md) | [**EduResource**]({{complexTypePrefix}}EduResource.md) | | - -#### list_edu_resources.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **move_edu_resource** - -> EduResource move_edu_resource(resourceedu_resource_move) - -Move an education resource - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - body = EduResourceMove( - destination="destination_example", - ) - try: - # Move an education resource - api_response = api_instance.move_edu_resource( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->move_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResourceMove**](../../models/EduResourceMove.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#move_edu_resource.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#move_edu_resource.ApiResponseForDefault) | Error - -#### move_edu_resource.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResource**](../../models/EduResource.md) | | - - -#### move_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_edu_resource** - -> EduResource update_edu_resource(resourceedu_resource_update) - -Update an education resource metadata - -Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_update import EduResourceUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - body = EduResourceUpdate( - title="title_example", - ) - try: - # Update an education resource metadata - api_response = api_instance.update_edu_resource( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->update_edu_resource: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResourceUpdate**](../../models/EduResourceUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_edu_resource.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#update_edu_resource.ApiResponseForDefault) | Error - -#### update_edu_resource.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResource**](../../models/EduResource.md) | | - - -#### update_edu_resource.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_edu_resource_assignment** - -> Assignment update_edu_resource_assignment(resourceassignment_update) - -Update an education resource assignment - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - body = AssignmentUpdate( - type=AssignmentType("none"), - title="title_example", - description="description_example", - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ) - ], - nb_playback_authorized=3.14, - toolset="toolset_example", - cover_file="cover_file_example", - cover="cover_example", - max_points=0, - release_grades="auto", - shuffle_exercises=True, - ) - try: - # Update an education resource assignment - api_response = api_instance.update_edu_resource_assignment( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->update_edu_resource_assignment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentUpdate**](../../models/AssignmentUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_edu_resource_assignment.ApiResponseFor200) | Fetched resource -default | [ApiResponseForDefault](#update_edu_resource_assignment.ApiResponseForDefault) | Error - -#### update_edu_resource_assignment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Assignment**](../../models/Assignment.md) | | - - -#### update_edu_resource_assignment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **use_edu_resource_in_class** - -> ClassAssignment use_edu_resource_in_class(resourceedu_resource_use_in_class) - -Use an education resource in a class - -This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import edu_resources_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'resource': "resource_example", - } - body = EduResourceUseInClass( - classroom="classroom_example", - assignment="assignment_example", - ) - try: - # Use an education resource in a class - api_response = api_instance.use_edu_resource_in_class( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling EduResourcesApi->use_edu_resource_in_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EduResourceUseInClass**](../../models/EduResourceUseInClass.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -resource | ResourceSchema | | - -# ResourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#use_edu_resource_in_class.ApiResponseFor200) | Assignment copied to the chosen class -default | [ApiResponseForDefault](#use_edu_resource_in_class.ApiResponseForDefault) | Error - -#### use_edu_resource_in_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassAssignment**](../../models/ClassAssignment.md) | | - - -#### use_edu_resource_in_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/GroupApi.md b/docs/apis/tags/GroupApi.md deleted file mode 100644 index a70d516..0000000 --- a/docs/apis/tags/GroupApi.md +++ /dev/null @@ -1,436 +0,0 @@ - -# flat_api.apis.tags.group_api.GroupApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_group_details**](#get_group_details) | **get** /groups/{group} | Get group information -[**get_group_scores**](#get_group_scores) | **get** /groups/{group}/scores | List group's scores -[**list_group_users**](#list_group_users) | **get** /groups/{group}/users | List group's users - -# **get_group_details** - -> GroupDetails get_group_details(group) - -Get group information - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import group_api -from flat_api.model.group_details import GroupDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'group': "group_example", - } - try: - # Get group information - api_response = api_instance.get_group_details( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->get_group_details: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -group | GroupSchema | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_group_details.ApiResponseFor200) | The group details -default | [ApiResponseForDefault](#get_group_details.ApiResponseForDefault) | Error - -#### get_group_details.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GroupDetails**](../../models/GroupDetails.md) | | - - -#### get_group_details.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_group_scores** - -> [ScoreDetails] get_group_scores(group) - -List group's scores - -Get the list of scores shared with a group. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import group_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'group': "group_example", - } - query_params = { - } - try: - # List group's scores - api_response = api_instance.get_group_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) - - # example passing only optional values - path_params = { - 'group': "group_example", - } - query_params = { - 'parent': "parent_example", - } - try: - # List group's scores - api_response = api_instance.get_group_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -group | GroupSchema | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_group_scores.ApiResponseFor200) | The group's scores -default | [ApiResponseForDefault](#get_group_scores.ApiResponseForDefault) | Error - -#### get_group_scores.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### get_group_scores.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_group_users** - -> [UserPublic] list_group_users(group) - -List group's users - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import group_api -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'group': "group_example", - } - query_params = { - } - try: - # List group's users - api_response = api_instance.list_group_users( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) - - # example passing only optional values - path_params = { - 'group': "group_example", - } - query_params = { - 'source': "googleClassroom", - } - try: - # List group's users - api_response = api_instance.list_group_users( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -source | SourceSchema | | optional - - -# SourceSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["googleClassroom", "microsoftGraph", "clever", ] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -group | GroupSchema | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_group_users.ApiResponseFor200) | The list of users member of the group -default | [ApiResponseForDefault](#list_group_users.ApiResponseForDefault) | Error - -#### list_group_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**UserPublic**]({{complexTypePrefix}}UserPublic.md) | [**UserPublic**]({{complexTypePrefix}}UserPublic.md) | [**UserPublic**]({{complexTypePrefix}}UserPublic.md) | | - -#### list_group_users.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/ModelClassApi.md b/docs/apis/tags/ModelClassApi.md deleted file mode 100644 index 7c621f2..0000000 --- a/docs/apis/tags/ModelClassApi.md +++ /dev/null @@ -1,4122 +0,0 @@ - -# flat_api.apis.tags.model_class_api.ModelClassApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**activate_class**](#activate_class) | **post** /classes/{class}/activate | Activate the class -[**add_class_user**](#add_class_user) | **put** /classes/{class}/users/{user} | Add a user to the class -[**archive_assignment**](#archive_assignment) | **post** /classes/{class}/assignments/{assignment}/archive | Archive the assignment -[**archive_class**](#archive_class) | **post** /classes/{class}/archive | Archive the class -[**copy_assignment**](#copy_assignment) | **post** /classes/{class}/assignments/{assignment}/copy | Copy an assignment -[**create_class**](#create_class) | **post** /classes | Create a new class -[**create_class_assignment**](#create_class_assignment) | **post** /classes/{class}/assignments | Assignment creation -[**create_submission**](#create_submission) | **put** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission -[**create_test_student_account**](#create_test_student_account) | **post** /classes/{class}/testStudent | Create a test student account -[**delete_class_user**](#delete_class_user) | **delete** /classes/{class}/users/{user} | Remove a user from the class -[**delete_submission**](#delete_submission) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission -[**delete_submission_comment**](#delete_submission_comment) | **delete** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission -[**edit_submission**](#edit_submission) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission -[**enroll_class**](#enroll_class) | **post** /classes/enroll/{enrollmentCode} | Join a class -[**export_submissions_reviews_as_csv**](#export_submissions_reviews_as_csv) | **get** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports -[**export_submissions_reviews_as_excel**](#export_submissions_reviews_as_excel) | **get** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports -[**get_class**](#get_class) | **get** /classes/{class} | Get the details of a single class -[**get_score_submissions**](#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score -[**get_submission**](#get_submission) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission -[**get_submission_comments**](#get_submission_comments) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission -[**get_submission_history**](#get_submission_history) | **get** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission -[**get_submissions**](#get_submissions) | **get** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions -[**list_assignments**](#list_assignments) | **get** /classes/{class}/assignments | Assignments listing -[**list_class_student_submissions**](#list_class_student_submissions) | **get** /classes/{class}/students/{user}/submissions | List the submissions for a student -[**list_classes**](#list_classes) | **get** /classes | List the classes available for the current user -[**post_submission_comment**](#post_submission_comment) | **post** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission -[**unarchive_assignment**](#unarchive_assignment) | **delete** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. -[**unarchive_class**](#unarchive_class) | **delete** /classes/{class}/archive | Unarchive the class -[**update_class**](#update_class) | **put** /classes/{class} | Update the class -[**update_submission_comment**](#update_submission_comment) | **put** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission - -# **activate_class** - -> ClassDetails activate_class(_class) - -Activate the class - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Activate the class - api_response = api_instance.activate_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->activate_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#activate_class.ApiResponseFor200) | The class details -default | [ApiResponseForDefault](#activate_class.ApiResponseForDefault) | Error - -#### activate_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### activate_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **add_class_user** - -> add_class_user(_classuser) - -Add a user to the class - -This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'user': "user_example", - } - try: - # Add a user to the class - api_response = api_instance.add_class_user( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->add_class_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -user | UserSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#add_class_user.ApiResponseFor204) | The user has been added to the class -default | [ApiResponseForDefault](#add_class_user.ApiResponseForDefault) | Error - -#### add_class_user.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### add_class_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **archive_assignment** - -> Assignment archive_assignment(_classassignment) - -Archive the assignment - -Archive the assignment - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - try: - # Archive the assignment - api_response = api_instance.archive_assignment( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->archive_assignment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#archive_assignment.ApiResponseFor200) | The assignment details -default | [ApiResponseForDefault](#archive_assignment.ApiResponseForDefault) | Error - -#### archive_assignment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Assignment**](../../models/Assignment.md) | | - - -#### archive_assignment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **archive_class** - -> ClassDetails archive_class(_class) - -Archive the class - -Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Archive the class - api_response = api_instance.archive_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->archive_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#archive_class.ApiResponseFor200) | The class details -default | [ApiResponseForDefault](#archive_class.ApiResponseForDefault) | Error - -#### archive_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### archive_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **copy_assignment** - -> AssignmentCopyResponse copy_assignment(_classassignmentbody) - -Copy an assignment - -Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_copy_response import AssignmentCopyResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - body = AssignmentCopy( - classroom="classroom_example", - assignment="assignment_example", - scheduled_date="1970-01-01T00:00:00.00Z", - library_parent="library_parent_example", - ) - try: - # Copy an assignment - api_response = api_instance.copy_assignment( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->copy_assignment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentCopy**](../../models/AssignmentCopy.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#copy_assignment.ApiResponseFor200) | The new created assignment -default | [ApiResponseForDefault](#copy_assignment.ApiResponseForDefault) | Error - -#### copy_assignment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentCopyResponse**](../../models/AssignmentCopyResponse.md) | | - - -#### copy_assignment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_class** - -> ClassDetails create_class(body) - -Create a new class - -Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_creation import ClassCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - body = ClassCreation( - name="name_example", - section="section_example", - level=ClassGradeLevel("elementary"), - skills_focused=EduSkillsFocused([ - "notation" - ]), - size=0, - ) - try: - # Create a new class - api_response = api_instance.create_class( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassCreation**](../../models/ClassCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_class.ApiResponseFor200) | The new class details -402 | [ApiResponseFor402](#create_class.ApiResponseFor402) | Account overquota -default | [ApiResponseForDefault](#create_class.ApiResponseForDefault) | Error - -#### create_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### create_class.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_class_assignment** - -> Assignment create_class_assignment(_class) - -Assignment creation - -Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_assignment_update import ClassAssignmentUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Assignment creation - api_response = api_instance.create_class_assignment( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_class_assignment: %s\n" % e) - - # example passing only optional values - path_params = { - 'class': "class_example", - } - body = ClassAssignmentUpdate( - type=AssignmentType("none"), - title="title_example", - description="description_example", - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ) - ], - nb_playback_authorized=3.14, - toolset="toolset_example", - cover_file="cover_file_example", - cover="cover_example", - max_points=0, - release_grades="auto", - shuffle_exercises=True, - state="draft", - due_date="1970-01-01T00:00:00.00Z", - scheduled_date="1970-01-01T00:00:00.00Z", - google_classroom=dict( - topic_id="topic_id_example", - ), - microsoft_graph=dict( - categories=[ - "categories_example" - ], - ), - assignee_mode="everyone", - assigned_students=[ - "assigned_students_example" - ], - ) - try: - # Assignment creation - api_response = api_instance.create_class_assignment( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_class_assignment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassAssignmentUpdate**](../../models/ClassAssignmentUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_class_assignment.ApiResponseFor200) | The assignment has been created -default | [ApiResponseForDefault](#create_class_assignment.ApiResponseForDefault) | Error - -#### create_class_assignment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Assignment**](../../models/Assignment.md) | | - - -#### create_class_assignment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_submission** - -> AssignmentSubmission create_submission(_classassignmentbody) - -Create or edit a submission - -Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - body = AssignmentSubmissionUpdate( - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ) - ], - submit=True, - draft_grade=0, - grade=0, - exercises_ids=[ - "exercises_ids_example" - ], - _return=True, - comments=dict( - total=3.14, - unread=3.14, - ), - ) - try: - # Create or edit a submission - api_response = api_instance.create_submission( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_submission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionUpdate**](../../models/AssignmentSubmissionUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_submission.ApiResponseFor200) | The submission -default | [ApiResponseForDefault](#create_submission.ApiResponseForDefault) | Error - -#### create_submission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | - - -#### create_submission.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_test_student_account** - -> UserDetails create_test_student_account(_class) - -Create a test student account - -Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - query_params = { - } - try: - # Create a test student account - api_response = api_instance.create_test_student_account( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_test_student_account: %s\n" % e) - - # example passing only optional values - path_params = { - 'class': "class_example", - } - query_params = { - 'reset': True, - } - try: - # Create a test student account - api_response = api_instance.create_test_student_account( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->create_test_student_account: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -reset | ResetSchema | | optional - - -# ResetSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_test_student_account.ApiResponseFor200) | Test account created -default | [ApiResponseForDefault](#create_test_student_account.ApiResponseForDefault) | Error - -#### create_test_student_account.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserDetails**](../../models/UserDetails.md) | | - - -#### create_test_student_account.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_class_user** - -> delete_class_user(_classuser) - -Remove a user from the class - -This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'user': "user_example", - } - try: - # Remove a user from the class - api_response = api_instance.delete_class_user( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->delete_class_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -user | UserSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_class_user.ApiResponseFor204) | The user has been removed from the class -default | [ApiResponseForDefault](#delete_class_user.ApiResponseForDefault) | Error - -#### delete_class_user.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_class_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_submission** - -> AssignmentSubmission delete_submission(_classassignmentsubmission) - -Reset a submission - -Use this method as a teacher to reset a submission and allow student to start over the assignment - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - try: - # Reset a submission - api_response = api_instance.delete_submission( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->delete_submission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_submission.ApiResponseFor200) | The submission object once reset -default | [ApiResponseForDefault](#delete_submission.ApiResponseForDefault) | Error - -#### delete_submission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | - - -#### delete_submission.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_submission_comment** - -> delete_submission_comment(_classassignmentsubmissioncomment) - -Delete a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - 'comment': "comment_example", - } - try: - # Delete a feedback comment to a submission - api_response = api_instance.delete_submission_comment( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->delete_submission_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | -comment | CommentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_submission_comment.ApiResponseFor204) | The comment has been deleted -default | [ApiResponseForDefault](#delete_submission_comment.ApiResponseForDefault) | Error - -#### delete_submission_comment.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_submission_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **edit_submission** - -> AssignmentSubmission edit_submission(_classassignmentsubmissionbody) - -Edit a submission - -Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - body = AssignmentSubmissionUpdate( - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ) - ], - submit=True, - draft_grade=0, - grade=0, - exercises_ids=[ - "exercises_ids_example" - ], - _return=True, - comments=dict( - total=3.14, - unread=3.14, - ), - ) - try: - # Edit a submission - api_response = api_instance.edit_submission( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->edit_submission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionUpdate**](../../models/AssignmentSubmissionUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#edit_submission.ApiResponseFor200) | The submission -default | [ApiResponseForDefault](#edit_submission.ApiResponseForDefault) | Error - -#### edit_submission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | - - -#### edit_submission.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **enroll_class** - -> ClassDetails enroll_class(enrollment_code) - -Join a class - -Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'enrollmentCode': "enrollmentCode_example", - } - try: - # Join a class - api_response = api_instance.enroll_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->enroll_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -enrollmentCode | EnrollmentCodeSchema | | - -# EnrollmentCodeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#enroll_class.ApiResponseFor200) | The new class details -default | [ApiResponseForDefault](#enroll_class.ApiResponseForDefault) | Error - -#### enroll_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### enroll_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **export_submissions_reviews_as_csv** - -> file_type export_submissions_reviews_as_csv(_classassignment) - -CSV Grades exports - -Export list of submissions grades to a CSV file - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - try: - # CSV Grades exports - api_response = api_instance.export_submissions_reviews_as_csv( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->export_submissions_reviews_as_csv: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('text/csv', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#export_submissions_reviews_as_csv.ApiResponseFor200) | List of submissions -default | [ApiResponseForDefault](#export_submissions_reviews_as_csv.ApiResponseForDefault) | Error - -#### export_submissions_reviews_as_csv.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyTextCsv, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyTextCsv - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -#### export_submissions_reviews_as_csv.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyTextCsv, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyTextCsv -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **export_submissions_reviews_as_excel** - -> file_type export_submissions_reviews_as_excel(_classassignment) - -Excel Grades exports - -Export list of submissions grades to an Excel file - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - try: - # Excel Grades exports - api_response = api_instance.export_submissions_reviews_as_excel( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->export_submissions_reviews_as_excel: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#export_submissions_reviews_as_excel.ApiResponseFor200) | List of submissions -default | [ApiResponseForDefault](#export_submissions_reviews_as_excel.ApiResponseForDefault) | Error - -#### export_submissions_reviews_as_excel.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -#### export_submissions_reviews_as_excel.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_class** - -> ClassDetails get_class(_class) - -Get the details of a single class - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Get the details of a single class - api_response = api_instance.get_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_class.ApiResponseFor200) | The new class details -default | [ApiResponseForDefault](#get_class.ApiResponseForDefault) | Error - -#### get_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### get_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_submissions** - -> [AssignmentSubmission] get_score_submissions(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - try: - # List submissions related to the score - api_response = api_instance.get_score_submissions( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_score_submissions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_submissions.ApiResponseFor200) | List of submissions -default | [ApiResponseForDefault](#get_score_submissions.ApiResponseForDefault) | Error - -#### get_score_submissions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | - -#### get_score_submissions.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_submission** - -> AssignmentSubmission get_submission(_classassignmentsubmission) - -Get a student submission - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - try: - # Get a student submission - api_response = api_instance.get_submission( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_submission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_submission.ApiResponseFor200) | A submission -default | [ApiResponseForDefault](#get_submission.ApiResponseForDefault) | Error - -#### get_submission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmission**](../../models/AssignmentSubmission.md) | | - - -#### get_submission.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_submission_comments** - -> [AssignmentSubmissionComment] get_submission_comments(_classassignmentsubmission) - -List the feedback comments of a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - try: - # List the feedback comments of a submission - api_response = api_instance.get_submission_comments( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_submission_comments: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_submission_comments.ApiResponseFor200) | The comments of the score -403 | [ApiResponseFor403](#get_submission_comments.ApiResponseFor403) | Not granted to access to this submission -404 | [ApiResponseFor404](#get_submission_comments.ApiResponseFor404) | Submission not found -default | [ApiResponseForDefault](#get_submission_comments.ApiResponseForDefault) | Error - -#### get_submission_comments.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | [**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | [**AssignmentSubmissionComment**]({{complexTypePrefix}}AssignmentSubmissionComment.md) | | - -#### get_submission_comments.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_submission_comments.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_submission_comments.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_submission_history** - -> [AssignmentSubmissionHistory] get_submission_history(_classassignmentsubmission) - -Get the history of the submission - -For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - try: - # Get the history of the submission - api_response = api_instance.get_submission_history( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_submission_history: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_submission_history.ApiResponseFor200) | The history of the submission -403 | [ApiResponseFor403](#get_submission_history.ApiResponseFor403) | Not granted to access to this submission -404 | [ApiResponseFor404](#get_submission_history.ApiResponseFor404) | Submission not found -default | [ApiResponseForDefault](#get_submission_history.ApiResponseForDefault) | Error - -#### get_submission_history.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | [**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | [**AssignmentSubmissionHistory**]({{complexTypePrefix}}AssignmentSubmissionHistory.md) | | - -#### get_submission_history.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_submission_history.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_submission_history.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_submissions** - -> [AssignmentSubmission] get_submissions(_classassignment) - -List the students' submissions - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - try: - # List the students' submissions - api_response = api_instance.get_submissions( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->get_submissions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_submissions.ApiResponseFor200) | The submissions -default | [ApiResponseForDefault](#get_submissions.ApiResponseForDefault) | Error - -#### get_submissions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | - -#### get_submissions.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_assignments** - -> [ClassAssignment] list_assignments(_class) - -Assignments listing - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Assignments listing - api_response = api_instance.list_assignments( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->list_assignments: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_assignments.ApiResponseFor200) | List of assignments for the class -default | [ApiResponseForDefault](#list_assignments.ApiResponseForDefault) | Error - -#### list_assignments.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | [**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | [**ClassAssignment**]({{complexTypePrefix}}ClassAssignment.md) | | - -#### list_assignments.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_class_student_submissions** - -> [AssignmentSubmission] list_class_student_submissions(_classuser) - -List the submissions for a student - -Use this method as a teacher to list all the assignment submissions sent by a student of the class - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'user': "user_example", - } - try: - # List the submissions for a student - api_response = api_instance.list_class_student_submissions( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->list_class_student_submissions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -user | UserSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_class_student_submissions.ApiResponseFor200) | The list of submissions -default | [ApiResponseForDefault](#list_class_student_submissions.ApiResponseForDefault) | Error - -#### list_class_student_submissions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | - -#### list_class_student_submissions.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_classes** - -> [ClassDetails] list_classes() - -List the classes available for the current user - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only optional values - query_params = { - 'state': "active", - } - try: - # List the classes available for the current user - api_response = api_instance.list_classes( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->list_classes: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -state | StateSchema | | optional - - -# StateSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["active", "inactive", "archived", ] if omitted the server will use the default value of "active" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_classes.ApiResponseFor200) | The list of classes -default | [ApiResponseForDefault](#list_classes.ApiResponseForDefault) | Error - -#### list_classes.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | [**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | [**ClassDetails**]({{complexTypePrefix}}ClassDetails.md) | | - -#### list_classes.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_submission_comment** - -> AssignmentSubmissionComment post_submission_comment(_classassignmentsubmissionassignment_submission_comment_creation) - -Add a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - } - body = AssignmentSubmissionCommentCreation( - comment="comment_example", - ) - try: - # Add a feedback comment to a submission - api_response = api_instance.post_submission_comment( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->post_submission_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionCommentCreation**](../../models/AssignmentSubmissionCommentCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_submission_comment.ApiResponseFor200) | The comment -403 | [ApiResponseFor403](#post_submission_comment.ApiResponseFor403) | Not granted to access to this submission -404 | [ApiResponseFor404](#post_submission_comment.ApiResponseFor404) | Submission not found -default | [ApiResponseForDefault](#post_submission_comment.ApiResponseForDefault) | Error - -#### post_submission_comment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionComment**](../../models/AssignmentSubmissionComment.md) | | - - -#### post_submission_comment.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### post_submission_comment.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### post_submission_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **unarchive_assignment** - -> Assignment unarchive_assignment(_classassignment) - -Unarchive the assignment. - -Mark the assignment as `active`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - } - try: - # Unarchive the assignment. - api_response = api_instance.unarchive_assignment( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->unarchive_assignment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#unarchive_assignment.ApiResponseFor200) | The assignment details -default | [ApiResponseForDefault](#unarchive_assignment.ApiResponseForDefault) | Error - -#### unarchive_assignment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Assignment**](../../models/Assignment.md) | | - - -#### unarchive_assignment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **unarchive_class** - -> ClassDetails unarchive_class(_class) - -Unarchive the class - -Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Unarchive the class - api_response = api_instance.unarchive_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->unarchive_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#unarchive_class.ApiResponseFor200) | The class details -default | [ApiResponseForDefault](#unarchive_class.ApiResponseForDefault) | Error - -#### unarchive_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### unarchive_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_class** - -> ClassDetails update_class(_class) - -Update the class - -Update the meta information of the class - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_update import ClassUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - } - try: - # Update the class - api_response = api_instance.update_class( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->update_class: %s\n" % e) - - # example passing only optional values - path_params = { - 'class': "class_example", - } - body = ClassUpdate( - name="name_example", - section="section_example", - level=ClassGradeLevel("elementary"), - skills_focused=EduSkillsFocused([ - "notation" - ]), - size=0, - ) - try: - # Update the class - api_response = api_instance.update_class( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->update_class: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassUpdate**](../../models/ClassUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_class.ApiResponseFor200) | The new class details -default | [ApiResponseForDefault](#update_class.ApiResponseForDefault) | Error - -#### update_class.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ClassDetails**](../../models/ClassDetails.md) | | - - -#### update_class.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_submission_comment** - -> AssignmentSubmissionComment update_submission_comment(_classassignmentsubmissioncommentassignment_submission_comment_creation) - -Update a feedback comment to a submission - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import model_class_api -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_class_api.ModelClassApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'class': "class_example", - 'assignment': "assignment_example", - 'submission': "submission_example", - 'comment': "comment_example", - } - body = AssignmentSubmissionCommentCreation( - comment="comment_example", - ) - try: - # Update a feedback comment to a submission - api_response = api_instance.update_submission_comment( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ModelClassApi->update_submission_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionCommentCreation**](../../models/AssignmentSubmissionCommentCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -class | ModelClassSchema | | -assignment | AssignmentSchema | | -submission | SubmissionSchema | | -comment | CommentSchema | | - -# ModelClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SubmissionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_submission_comment.ApiResponseFor200) | The comment -403 | [ApiResponseFor403](#update_submission_comment.ApiResponseFor403) | Not granted to access to this submission -404 | [ApiResponseFor404](#update_submission_comment.ApiResponseFor404) | Submission not found -default | [ApiResponseForDefault](#update_submission_comment.ApiResponseForDefault) | Error - -#### update_submission_comment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AssignmentSubmissionComment**](../../models/AssignmentSubmissionComment.md) | | - - -#### update_submission_comment.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_submission_comment.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_submission_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/OrganizationApi.md b/docs/apis/tags/OrganizationApi.md deleted file mode 100644 index d6aeaf3..0000000 --- a/docs/apis/tags/OrganizationApi.md +++ /dev/null @@ -1,1826 +0,0 @@ - -# flat_api.apis.tags.organization_api.OrganizationApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**count_orga_users**](#count_orga_users) | **get** /organizations/users/count | Count the organization users using the provided filters -[**create_lti_credentials**](#create_lti_credentials) | **post** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials -[**create_organization_invitation**](#create_organization_invitation) | **post** /organizations/invitations | Create a new invitation to join the organization -[**create_organization_user**](#create_organization_user) | **post** /organizations/users | Create a new user account -[**create_organization_user_access_token**](#create_organization_user_access_token) | **post** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user -[**create_organization_user_signin_link**](#create_organization_user_signin_link) | **post** /organizations/users/{user}/signinLink | Create a sign in link for an organization user -[**list_lti_credentials**](#list_lti_credentials) | **get** /organizations/lti/credentials | List LTI 1.x credentials -[**list_organization_invitations**](#list_organization_invitations) | **get** /organizations/invitations | List the organization invitations -[**list_organization_users**](#list_organization_users) | **get** /organizations/users | List the organization users -[**remove_organization_invitation**](#remove_organization_invitation) | **delete** /organizations/invitations/{invitation} | Remove an organization invitation -[**remove_organization_user**](#remove_organization_user) | **delete** /organizations/users/{user} | Remove an account from Flat -[**revoke_lti_credentials**](#revoke_lti_credentials) | **delete** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials -[**update_organization_user**](#update_organization_user) | **put** /organizations/users/{user} | Update account information - -# **count_orga_users** - -> [UserDetailsAdmin] count_orga_users() - -Count the organization users using the provided filters - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only optional values - query_params = { - 'role': [ - "user" - ], - 'q': "q_example", - 'group': [ - "group_example" - ], - 'noActiveLicense': True, - } - try: - # Count the organization users using the provided filters - api_response = api_instance.count_orga_users( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -role | RoleSchema | | optional -q | QSchema | | optional -group | GroupSchema | | optional -noActiveLicense | NoActiveLicenseSchema | | optional - - -# RoleSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["user", "teacher", "admin", ] - -# QSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# NoActiveLicenseSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#count_orga_users.ApiResponseFor200) | Number of users -default | [ApiResponseForDefault](#count_orga_users.ApiResponseForDefault) | Error - -#### count_orga_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | | - -#### count_orga_users.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_lti_credentials** - -> LtiCredentials create_lti_credentials(body) - -Create a new couple of LTI 1.x credentials - -Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - body = LtiCredentialsCreation( - name="name_example", - lms=LmsName("canvas"), - ) - try: - # Create a new couple of LTI 1.x credentials - api_response = api_instance.create_lti_credentials( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**LtiCredentialsCreation**](../../models/LtiCredentialsCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_lti_credentials.ApiResponseFor200) | The LTI Credentials -403 | [ApiResponseFor403](#create_lti_credentials.ApiResponseFor403) | Not admin of an organization -default | [ApiResponseForDefault](#create_lti_credentials.ApiResponseForDefault) | Error - -#### create_lti_credentials.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**LtiCredentials**](../../models/LtiCredentials.md) | | - - -#### create_lti_credentials.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_lti_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_organization_invitation** - -> OrganizationInvitation create_organization_invitation() - -Create a new invitation to join the organization - -This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_invitation import OrganizationInvitation -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only optional values - body = OrganizationInvitationCreation( - email="email_example", - organization_role=OrganizationRoles("admin"), - ) - try: - # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OrganizationInvitationCreation**](../../models/OrganizationInvitationCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_organization_invitation.ApiResponseFor200) | New invitation created -default | [ApiResponseForDefault](#create_organization_invitation.ApiResponseForDefault) | Error - -#### create_organization_invitation.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OrganizationInvitation**](../../models/OrganizationInvitation.md) | | - - -#### create_organization_invitation.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_organization_user** - -> UserDetailsAdmin create_organization_user() - -Create a new user account - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only optional values - body = UserCreation( - username="2", - firstname="firstname_example", - lastname="lastname_example", - email="email_example", - password="password_example", - locale=FlatLocales("en"), - role="user", - ) - try: - # Create a new user account - api_response = api_instance.create_organization_user( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserCreation**](../../models/UserCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_organization_user.ApiResponseFor200) | New user created -default | [ApiResponseForDefault](#create_organization_user.ApiResponseForDefault) | Error - -#### create_organization_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserDetailsAdmin**](../../models/UserDetailsAdmin.md) | | - - -#### create_organization_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_organization_user_access_token** - -> ApiAccessToken create_organization_user_access_token(user) - -Create a delegated API access token for an organization user - -This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - try: - # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - body = OrganizationUserAccessTokenCreation( - scopes=[ - AppScopes("account.public_profile") - ], - ) - try: - # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OrganizationUserAccessTokenCreation**](../../models/OrganizationUserAccessTokenCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_organization_user_access_token.ApiResponseFor200) | Created API access token -default | [ApiResponseForDefault](#create_organization_user_access_token.ApiResponseForDefault) | Error - -#### create_organization_user_access_token.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ApiAccessToken**](../../models/ApiAccessToken.md) | | - - -#### create_organization_user_access_token.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_organization_user_signin_link** - -> UserSigninLink create_organization_user_signin_link(user) - -Create a sign in link for an organization user - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_signin_link import UserSigninLink -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - try: - # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - body = UserSigninLinkCreation( - destination_path="/", - ) - try: - # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserSigninLinkCreation**](../../models/UserSigninLinkCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_organization_user_signin_link.ApiResponseFor200) | Sign in link -default | [ApiResponseForDefault](#create_organization_user_signin_link.ApiResponseForDefault) | Error - -#### create_organization_user_signin_link.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserSigninLink**](../../models/UserSigninLink.md) | | - - -#### create_organization_user_signin_link.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_lti_credentials** - -> [LtiCredentials] list_lti_credentials() - -List LTI 1.x credentials - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # List LTI 1.x credentials - api_response = api_instance.list_lti_credentials() - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_lti_credentials.ApiResponseFor200) | The list of LTI Credentials -403 | [ApiResponseFor403](#list_lti_credentials.ApiResponseFor403) | Not admin of an organization -default | [ApiResponseForDefault](#list_lti_credentials.ApiResponseForDefault) | Error - -#### list_lti_credentials.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | [**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | [**LtiCredentials**]({{complexTypePrefix}}LtiCredentials.md) | | - -#### list_lti_credentials.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### list_lti_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_organization_invitations** - -> [OrganizationInvitation] list_organization_invitations() - -List the organization invitations - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation import OrganizationInvitation -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only optional values - query_params = { - 'role': "user", - 'limit': 50, - 'next': "next_example", - 'previous': "previous_example", - } - try: - # List the organization invitations - api_response = api_instance.list_organization_invitations( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -role | RoleSchema | | optional -limit | LimitSchema | | optional -next | NextSchema | | optional -previous | PreviousSchema | | optional - - -# RoleSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["user", "teacher", "admin", ] - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 50 - -# NextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PreviousSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_organization_invitations.ApiResponseFor200) | List of invitations -default | [ApiResponseForDefault](#list_organization_invitations.ApiResponseForDefault) | Error - -#### list_organization_invitations.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | [**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | [**OrganizationInvitation**]({{complexTypePrefix}}OrganizationInvitation.md) | | - -#### list_organization_invitations.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_organization_users** - -> [UserDetailsAdmin] list_organization_users() - -List the organization users - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only optional values - query_params = { - 'sort': [ - "firstname" - ], - 'direction': "asc", - 'next': "next_example", - 'previous': "previous_example", - 'role': [ - "user" - ], - 'q': "q_example", - 'group': [ - "group_example" - ], - 'noActiveLicense': True, - 'licenseExpirationDate': [ - "licenseExpirationDate_example" - ], - 'onlyIds': True, - 'limit': 25, - } - try: - # List the organization users - api_response = api_instance.list_organization_users( - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sort | SortSchema | | optional -direction | DirectionSchema | | optional -next | NextSchema | | optional -previous | PreviousSchema | | optional -role | RoleSchema | | optional -q | QSchema | | optional -group | GroupSchema | | optional -noActiveLicense | NoActiveLicenseSchema | | optional -licenseExpirationDate | LicenseExpirationDateSchema | | optional -onlyIds | OnlyIdsSchema | | optional -limit | LimitSchema | | optional - - -# SortSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["firstname", "lastname", "lastActivityDate", "licenseExpirationDate", ] - -# DirectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["asc", "desc", ] - -# NextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PreviousSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["user", "teacher", "admin", ] - -# QSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# NoActiveLicenseSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# LicenseExpirationDateSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# OnlyIdsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 25 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_organization_users.ApiResponseFor200) | List of users -default | [ApiResponseForDefault](#list_organization_users.ApiResponseForDefault) | Error - -#### list_organization_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | [**UserDetailsAdmin**]({{complexTypePrefix}}UserDetailsAdmin.md) | | - -#### list_organization_users.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_organization_invitation** - -> remove_organization_invitation(invitation) - -Remove an organization invitation - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'invitation': "invitation_example", - } - try: - # Remove an organization invitation - api_response = api_instance.remove_organization_invitation( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -invitation | InvitationSchema | | - -# InvitationSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#remove_organization_invitation.ApiResponseFor204) | The invitation has been removed -default | [ApiResponseForDefault](#remove_organization_invitation.ApiResponseForDefault) | Error - -#### remove_organization_invitation.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### remove_organization_invitation.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_organization_user** - -> remove_organization_user(user) - -Remove an account from Flat - -This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - query_params = { - } - try: - # Remove an account from Flat - api_response = api_instance.remove_organization_user( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - query_params = { - 'convertToIndividual': True, - } - try: - # Remove an account from Flat - api_response = api_instance.remove_organization_user( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -convertToIndividual | ConvertToIndividualSchema | | optional - - -# ConvertToIndividualSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#remove_organization_user.ApiResponseFor204) | User deleted -default | [ApiResponseForDefault](#remove_organization_user.ApiResponseForDefault) | Error - -#### remove_organization_user.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### remove_organization_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **revoke_lti_credentials** - -> revoke_lti_credentials(credentials) - -Revoke LTI 1.x credentials - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'credentials': "credentials_example", - } - try: - # Revoke LTI 1.x credentials - api_response = api_instance.revoke_lti_credentials( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -credentials | CredentialsSchema | | - -# CredentialsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#revoke_lti_credentials.ApiResponseFor204) | Credentials revoked -403 | [ApiResponseFor403](#revoke_lti_credentials.ApiResponseFor403) | Not admin of an organization -404 | [ApiResponseFor404](#revoke_lti_credentials.ApiResponseFor404) | Credentials not found -default | [ApiResponseForDefault](#revoke_lti_credentials.ApiResponseForDefault) | Error - -#### revoke_lti_credentials.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### revoke_lti_credentials.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### revoke_lti_credentials.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### revoke_lti_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_organization_user** - -> UserDetailsAdmin update_organization_user(userbody) - -Update account information - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_admin_update import UserAdminUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - body = UserAdminUpdate( - password="password_example", - organization_role=OrganizationRoles("admin"), - username="2", - firstname="firstname_example", - lastname="lastname_example", - email="email_example", - ) - try: - # Update account information - api_response = api_instance.update_organization_user( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserAdminUpdate**](../../models/UserAdminUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_organization_user.ApiResponseFor200) | User updated -default | [ApiResponseForDefault](#update_organization_user.ApiResponseForDefault) | Error - -#### update_organization_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserDetailsAdmin**](../../models/UserDetailsAdmin.md) | | - - -#### update_organization_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/ScoreApi.md b/docs/apis/tags/ScoreApi.md deleted file mode 100644 index d5cf4ad..0000000 --- a/docs/apis/tags/ScoreApi.md +++ /dev/null @@ -1,5655 +0,0 @@ - -# flat_api.apis.tags.score_api.ScoreApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_score_collaborator**](#add_score_collaborator) | **post** /scores/{score}/collaborators | Add a new collaborator -[**add_score_track**](#add_score_track) | **post** /scores/{score}/tracks | Add a new video or audio track to the score -[**create_export_task**](#create_export_task) | **post** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task -[**create_score**](#create_score) | **post** /scores | Create a new score -[**create_score_revision**](#create_score_revision) | **post** /scores/{score}/revisions | Create a new revision -[**delete_score**](#delete_score) | **delete** /scores/{score} | Delete a score -[**delete_score_comment**](#delete_score_comment) | **delete** /scores/{score}/comments/{comment} | Delete a comment -[**delete_score_track**](#delete_score_track) | **delete** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score -[**edit_score**](#edit_score) | **put** /scores/{score} | Edit a score's metadata -[**fork_score**](#fork_score) | **post** /scores/{score}/fork | Fork a score -[**ger_user_likes**](#ger_user_likes) | **get** /users/{user}/likes | List liked scores -[**get_group_scores**](#get_group_scores) | **get** /groups/{group}/scores | List group's scores -[**get_score**](#get_score) | **get** /scores/{score} | Get a score's metadata -[**get_score_collaborator**](#get_score_collaborator) | **get** /scores/{score}/collaborators/{collaborator} | Get a collaborator -[**get_score_collaborators**](#get_score_collaborators) | **get** /scores/{score}/collaborators | List the collaborators -[**get_score_comments**](#get_score_comments) | **get** /scores/{score}/comments | List comments -[**get_score_revision**](#get_score_revision) | **get** /scores/{score}/revisions/{revision} | Get a score revision -[**get_score_revision_data**](#get_score_revision_data) | **get** /scores/{score}/revisions/{revision}/{format} | Get a score revision data -[**get_score_revisions**](#get_score_revisions) | **get** /scores/{score}/revisions | List the revisions -[**get_score_submissions**](#get_score_submissions) | **get** /scores/{score}/submissions | List submissions related to the score -[**get_score_track**](#get_score_track) | **get** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score -[**get_user_scores**](#get_user_scores) | **get** /users/{user}/scores | List user's scores -[**list_score_tracks**](#list_score_tracks) | **get** /scores/{score}/tracks | List the audio or video tracks linked to a score -[**mark_score_comment_resolved**](#mark_score_comment_resolved) | **put** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved -[**mark_score_comment_unresolved**](#mark_score_comment_unresolved) | **delete** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved -[**post_score_comment**](#post_score_comment) | **post** /scores/{score}/comments | Post a new comment -[**remove_score_collaborator**](#remove_score_collaborator) | **delete** /scores/{score}/collaborators/{collaborator} | Delete a collaborator -[**untrash_score**](#untrash_score) | **post** /scores/{score}/untrash | Untrash a score -[**update_score_comment**](#update_score_comment) | **put** /scores/{score}/comments/{comment} | Update an existing comment -[**update_score_track**](#update_score_track) | **put** /scores/{score}/tracks/{track} | Update an audio or video track linked to a score - -# **add_score_collaborator** - -> ResourceCollaborator add_score_collaborator(scorebody) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - body = ResourceCollaboratorCreation( - user="user_example", - group="group_example", - user_email="user_email_example", - user_token="user_token_example", - acl_read=True, - acl_write=False, - acl_admin=False, - ) - try: - # Add a new collaborator - api_response = api_instance.add_score_collaborator( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ResourceCollaboratorCreation**](../../models/ResourceCollaboratorCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#add_score_collaborator.ApiResponseFor200) | The newly added collaborator metadata -402 | [ApiResponseFor402](#add_score_collaborator.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#add_score_collaborator.ApiResponseFor403) | Not granted to manage this score -404 | [ApiResponseFor404](#add_score_collaborator.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#add_score_collaborator.ApiResponseForDefault) | Error - -#### add_score_collaborator.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ResourceCollaborator**](../../models/ResourceCollaborator.md) | | - - -#### add_score_collaborator.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_collaborator.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_collaborator.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_collaborator.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **add_score_track** - -> ScoreTrack add_score_track(scorebody) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_creation import ScoreTrackCreation -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - body = ScoreTrackCreation( - title="title_example", - default=True, - state=ScoreTrackState("draft"), - url="url_example", - synchronization_points=[ - ScoreTrackPoint( - type="measure", - measure_uuid="measure_uuid_example", - time=3.14, - ) - ], - ) - try: - # Add a new video or audio track to the score - api_response = api_instance.add_score_track( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->add_score_track: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreTrackCreation**](../../models/ScoreTrackCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#add_score_track.ApiResponseFor200) | Created track -403 | [ApiResponseFor403](#add_score_track.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#add_score_track.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#add_score_track.ApiResponseForDefault) | Error - -#### add_score_track.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreTrack**](../../models/ScoreTrack.md) | | - - -#### add_score_track.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_track.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### add_score_track.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_export_task** - -> Task create_export_task(scorerevisionformat) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.task_export_options import TaskExportOptions -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'revision': "revision_example", - 'format': "mp3", - } - query_params = { - } - try: - # Create a new score export task - api_response = api_instance.create_export_task( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->create_export_task: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'revision': "revision_example", - 'format': "mp3", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - body = TaskExportOptions( - parts=[ - "parts_example" - ], - ) - try: - # Create a new score export task - api_response = api_instance.create_export_task( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->create_export_task: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TaskExportOptions**](../../models/TaskExportOptions.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -revision | RevisionSchema | | -format | FormatSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RevisionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# FormatSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["mp3", "wav", "practicefirst", ] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_export_task.ApiResponseFor200) | Task associated to the generation of the file -402 | [ApiResponseFor402](#create_export_task.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#create_export_task.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#create_export_task.ApiResponseFor404) | Score or associated file not found -default | [ApiResponseForDefault](#create_export_task.ApiResponseForDefault) | Error - -#### create_export_task.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Task**](../../models/Task.md) | | - - -#### create_export_task.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_export_task.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_export_task.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_export_task.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_score** - -> ScoreDetails create_score(body) - -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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - body = ScoreCreation( - title="title_example", - privacy=ScorePrivacy("private"), - collection="collection_example", - google_drive_folder="google_drive_folder_example", - builder_data=dict( - score_data=dict( - use_tab_staff=True, - use_chord_grid=True, - fifths=3.14, - nb_beats=3.14, - beat_type=3.14, - instruments=[ - dict( - group="group_example", - instrument="instrument_example", - long_name="long_name_example", - short_name="short_name_example", - has_quarter_tone=True, - ) - ], - ), - layout_data=dict( - notes_spacing_coeff=3.14, - length_unit="cm", - page_height=3.14, - page_width=3.14, - page_margin_top=3.14, - page_margin_bottom=3.14, - page_margin_left=3.14, - page_margin_right=3.14, - ), - ), - filename="filename_example", - data="data_example", - data_encoding="base64", - source=ScoreSource( - google_drive="google_drive_example", - ), - ) - try: - # Create a new score - api_response = api_instance.create_score( - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->create_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreCreation**](../../models/ScoreCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_score.ApiResponseFor200) | Score created -400 | [ApiResponseFor400](#create_score.ApiResponseFor400) | Bad score creation request -402 | [ApiResponseFor402](#create_score.ApiResponseFor402) | Account overquota -default | [ApiResponseForDefault](#create_score.ApiResponseForDefault) | Error - -#### create_score.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreDetails**](../../models/ScoreDetails.md) | | - - -#### create_score.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_score.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_score_revision** - -> ScoreRevision create_score_revision(scorebody) - -Create a new revision - -Update a score by uploading a new revision for this one. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - body = ScoreRevisionCreation( - data="", - data_encoding="base64", - autosave=True, - description="description_example", - ) - try: - # Create a new revision - api_response = api_instance.create_score_revision( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreRevisionCreation**](../../models/ScoreRevisionCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_score_revision.ApiResponseFor200) | The new created revision metadata -402 | [ApiResponseFor402](#create_score_revision.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#create_score_revision.ApiResponseFor403) | Not granted to modify this score -404 | [ApiResponseFor404](#create_score_revision.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#create_score_revision.ApiResponseForDefault) | Error - -#### create_score_revision.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreRevision**](../../models/ScoreRevision.md) | | - - -#### create_score_revision.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_score_revision.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_score_revision.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### create_score_revision.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_score** - -> delete_score(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). - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # Delete a score - api_response = api_instance.delete_score( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'now': False, - } - try: - # Delete a score - api_response = api_instance.delete_score( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -now | NowSchema | | optional - - -# NowSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_score.ApiResponseFor204) | The score has been removed -403 | [ApiResponseFor403](#delete_score.ApiResponseFor403) | Not granted to manage this score -404 | [ApiResponseFor404](#delete_score.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#delete_score.ApiResponseForDefault) | Error - -#### delete_score.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_score.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_score_comment** - -> delete_score_comment(scorecomment) - -Delete a comment - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - } - try: - # Delete a comment - api_response = api_instance.delete_score_comment( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Delete a comment - api_response = api_instance.delete_score_comment( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -comment | CommentSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_score_comment.ApiResponseFor204) | The comment has been deleted -403 | [ApiResponseFor403](#delete_score_comment.ApiResponseFor403) | Not granted to access to this score or not the original comment creator -404 | [ApiResponseFor404](#delete_score_comment.ApiResponseFor404) | Score or comment not found -default | [ApiResponseForDefault](#delete_score_comment.ApiResponseForDefault) | Error - -#### delete_score_comment.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_score_comment.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_comment.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_score_track** - -> delete_score_track(scoretrack) - -Remove an audio or video track linked to the score - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'track': "track_example", - } - try: - # Remove an audio or video track linked to the score - api_response = api_instance.delete_score_track( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -track | TrackSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TrackSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_score_track.ApiResponseFor204) | Track removed -403 | [ApiResponseFor403](#delete_score_track.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#delete_score_track.ApiResponseFor404) | Score or Track not found -default | [ApiResponseForDefault](#delete_score_track.ApiResponseForDefault) | Error - -#### delete_score_track.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_score_track.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_track.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### delete_score_track.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **edit_score** - -> ScoreDetails edit_score(score) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - try: - # Edit a score's metadata - api_response = api_instance.edit_score( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->edit_score: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - body = ScoreModification( - title="title_example", - subtitle="subtitle_example", - composer="composer_example", - lyricist="lyricist_example", - arranger="arranger_example", - privacy=ScorePrivacy("private"), - sharing_key="bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3", - description="description_example", - tags=[ - "tags_example" - ], - creation_type=ScoreCreationType("original"), - license=ScoreLicense("copyright"), - license_text="license_text_example", - ) - try: - # Edit a score's metadata - api_response = api_instance.edit_score( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->edit_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreModification**](../../models/ScoreModification.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#edit_score.ApiResponseFor200) | Score details -402 | [ApiResponseFor402](#edit_score.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#edit_score.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#edit_score.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#edit_score.ApiResponseForDefault) | Error - -#### edit_score.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreDetails**](../../models/ScoreDetails.md) | | - - -#### edit_score.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### edit_score.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### edit_score.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### edit_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **fork_score** - -> ScoreDetails fork_score(scorebody) - -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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_fork import ScoreFork -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - body = ScoreFork( - collection="root", - keep_original_title=True, - ) - try: - # Fork a score - api_response = api_instance.fork_score( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->fork_score: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - body = ScoreFork( - collection="root", - keep_original_title=True, - ) - try: - # Fork a score - api_response = api_instance.fork_score( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->fork_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreFork**](../../models/ScoreFork.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#fork_score.ApiResponseFor200) | Score details -402 | [ApiResponseFor402](#fork_score.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#fork_score.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#fork_score.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#fork_score.ApiResponseForDefault) | Error - -#### fork_score.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreDetails**](../../models/ScoreDetails.md) | | - - -#### fork_score.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### fork_score.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### fork_score.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### fork_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **ger_user_likes** - -> [ScoreDetails] ger_user_likes(user) - -List liked scores - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - query_params = { - } - try: - # List liked scores - api_response = api_instance.ger_user_likes( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - query_params = { - 'ids': True, - } - try: - # List liked scores - api_response = api_instance.ger_user_likes( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -ids | IdsSchema | | optional - - -# IdsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#ger_user_likes.ApiResponseFor200) | List of liked scores -default | [ApiResponseForDefault](#ger_user_likes.ApiResponseForDefault) | Error - -#### ger_user_likes.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### ger_user_likes.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_group_scores** - -> [ScoreDetails] get_group_scores(group) - -List group's scores - -Get the list of scores shared with a group. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'group': "group_example", - } - query_params = { - } - try: - # List group's scores - api_response = api_instance.get_group_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) - - # example passing only optional values - path_params = { - 'group': "group_example", - } - query_params = { - 'parent': "parent_example", - } - try: - # List group's scores - api_response = api_instance.get_group_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -group | GroupSchema | | - -# GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_group_scores.ApiResponseFor200) | The group's scores -default | [ApiResponseForDefault](#get_group_scores.ApiResponseForDefault) | Error - -#### get_group_scores.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### get_group_scores.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score** - -> ScoreDetails get_score(score) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # Get a score's metadata - api_response = api_instance.get_score( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Get a score's metadata - api_response = api_instance.get_score( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score.ApiResponseFor200) | Score details -402 | [ApiResponseFor402](#get_score.ApiResponseFor402) | Account overquota and this document is out of the granted quota -403 | [ApiResponseFor403](#get_score.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#get_score.ApiResponseForDefault) | Error - -#### get_score.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreDetails**](../../models/ScoreDetails.md) | | - - -#### get_score.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_collaborator** - -> ResourceCollaborator get_score_collaborator(scorecollaborator) - -Get a collaborator - -Get the information about a collaborator (User or Group). - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'collaborator': "collaborator_example", - } - query_params = { - } - try: - # Get a collaborator - api_response = api_instance.get_score_collaborator( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'collaborator': "collaborator_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Get a collaborator - api_response = api_instance.get_score_collaborator( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -collaborator | CollaboratorSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CollaboratorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_collaborator.ApiResponseFor200) | Collaborator information -402 | [ApiResponseFor402](#get_score_collaborator.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_collaborator.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_collaborator.ApiResponseFor404) | Score or collaborator not found -default | [ApiResponseForDefault](#get_score_collaborator.ApiResponseForDefault) | Error - -#### get_score_collaborator.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ResourceCollaborator**](../../models/ResourceCollaborator.md) | | - - -#### get_score_collaborator.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborator.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborator.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborator.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_collaborators** - -> [ResourceCollaborator] get_score_collaborators(score) - -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). - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # List the collaborators - api_response = api_instance.get_score_collaborators( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # List the collaborators - api_response = api_instance.get_score_collaborators( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_collaborators.ApiResponseFor200) | List of collaborators -402 | [ApiResponseFor402](#get_score_collaborators.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_collaborators.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_collaborators.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#get_score_collaborators.ApiResponseForDefault) | Error - -#### get_score_collaborators.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | [**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | [**ResourceCollaborator**]({{complexTypePrefix}}ResourceCollaborator.md) | | - -#### get_score_collaborators.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborators.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborators.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_collaborators.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_comments** - -> [ScoreComment] get_score_comments(score) - -List comments - -This method lists the different comments added on a music score (documents and inline) sorted by their post dates. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # List comments - api_response = api_instance.get_score_comments( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - 'type': "document", - 'sort': "date", - 'direction': "asc", - } - try: - # List comments - api_response = api_instance.get_score_comments( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional -type | TypeSchema | | optional -sort | SortSchema | | optional -direction | DirectionSchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["document", "inline", ] - -# SortSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["date", ] - -# DirectionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["asc", "desc", ] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_comments.ApiResponseFor200) | The comments of the score -402 | [ApiResponseFor402](#get_score_comments.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_comments.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_comments.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#get_score_comments.ApiResponseForDefault) | Error - -#### get_score_comments.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | [**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | [**ScoreComment**]({{complexTypePrefix}}ScoreComment.md) | | - -#### get_score_comments.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_comments.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_comments.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_comments.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_revision** - -> ScoreRevision get_score_revision(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'revision': "revision_example", - } - query_params = { - } - try: - # Get a score revision - api_response = api_instance.get_score_revision( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'revision': "revision_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Get a score revision - api_response = api_instance.get_score_revision( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -revision | RevisionSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RevisionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_revision.ApiResponseFor200) | Revision metadata -402 | [ApiResponseFor402](#get_score_revision.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_revision.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_revision.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#get_score_revision.ApiResponseForDefault) | Error - -#### get_score_revision.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreRevision**](../../models/ScoreRevision.md) | | - - -#### get_score_revision.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_revision_data** - -> file_type get_score_revision_data(scorerevisionformat) - -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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'revision': "revision_example", - 'format': "json", - } - query_params = { - } - try: - # Get a score revision data - api_response = api_instance.get_score_revision_data( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'revision': "revision_example", - 'format': "json", - } - query_params = { - 'sharingKey': "sharingKey_example", - 'parts': "parts_example", - 'defaultTrack': True, - 'url': True, - } - try: - # Get a score revision data - api_response = api_instance.get_score_revision_data( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional -parts | PartsSchema | | optional -defaultTrack | DefaultTrackSchema | | optional -url | UrlSchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PartsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# DefaultTrackSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# UrlSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -revision | RevisionSchema | | -format | FormatSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RevisionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# FormatSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["json", "mxl", "xml", "mp3", "wav", "midi", "thumbnail.png", "synchronizationPoints", ] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_revision_data.ApiResponseFor200) | Revision data -402 | [ApiResponseFor402](#get_score_revision_data.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_revision_data.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_revision_data.ApiResponseFor404) | Score or associated file not found -default | [ApiResponseForDefault](#get_score_revision_data.ApiResponseForDefault) | Error - -#### get_score_revision_data.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, SchemaFor200ResponseBodyAudioMp3, SchemaFor200ResponseBodyAudioWav, SchemaFor200ResponseBodyAudioMidi, SchemaFor200ResponseBodyImagePng, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyApplicationVndRecordareMusicxml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyAudioMp3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyAudioWav - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyAudioMidi - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# SchemaFor200ResponseBodyImagePng - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -#### get_score_revision_data.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision_data.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision_data.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revision_data.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_revisions** - -> [ScoreRevision] get_score_revisions(score) - -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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # List the revisions - api_response = api_instance.get_score_revisions( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # List the revisions - api_response = api_instance.get_score_revisions( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_revisions.ApiResponseFor200) | List of revisions -402 | [ApiResponseFor402](#get_score_revisions.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#get_score_revisions.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_revisions.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#get_score_revisions.ApiResponseForDefault) | Error - -#### get_score_revisions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | [**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | [**ScoreRevision**]({{complexTypePrefix}}ScoreRevision.md) | | - -#### get_score_revisions.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revisions.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revisions.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_revisions.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_submissions** - -> [AssignmentSubmission] get_score_submissions(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - try: - # List submissions related to the score - api_response = api_instance.get_score_submissions( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_submissions.ApiResponseFor200) | List of submissions -default | [ApiResponseForDefault](#get_score_submissions.ApiResponseForDefault) | Error - -#### get_score_submissions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | [**AssignmentSubmission**]({{complexTypePrefix}}AssignmentSubmission.md) | | - -#### get_score_submissions.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_score_track** - -> ScoreTrack get_score_track(scoretrack) - -Retrieve the details of an audio or video track linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'track': "track_example", - } - query_params = { - } - try: - # Retrieve the details of an audio or video track linked to a score - api_response = api_instance.get_score_track( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_track: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'track': "track_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Retrieve the details of an audio or video track linked to a score - api_response = api_instance.get_score_track( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_track: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -track | TrackSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TrackSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_score_track.ApiResponseFor200) | Track details -403 | [ApiResponseFor403](#get_score_track.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#get_score_track.ApiResponseFor404) | Score or Track not found -default | [ApiResponseForDefault](#get_score_track.ApiResponseForDefault) | Error - -#### get_score_track.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreTrack**](../../models/ScoreTrack.md) | | - - -#### get_score_track.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_track.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### get_score_track.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user_scores** - -> [ScoreDetails] get_user_scores(user) - -List user's scores - -Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - query_params = { - } - try: - # List user's scores - api_response = api_instance.get_user_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - query_params = { - 'parent': "parent_example", - } - try: - # List user's scores - api_response = api_instance.get_user_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_user_scores.ApiResponseFor200) | The user scores -default | [ApiResponseForDefault](#get_user_scores.ApiResponseForDefault) | Error - -#### get_user_scores.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### get_user_scores.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_score_tracks** - -> [ScoreTrack] list_score_tracks(score) - -List the audio or video tracks linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - try: - # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - 'assignment': "assignment_example", - 'listAutoTrack': True, - } - try: - # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional -assignment | AssignmentSchema | | optional -listAutoTrack | ListAutoTrackSchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AssignmentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ListAutoTrackSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_score_tracks.ApiResponseFor200) | List of tracks -403 | [ApiResponseFor403](#list_score_tracks.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#list_score_tracks.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#list_score_tracks.ApiResponseForDefault) | Error - -#### list_score_tracks.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | [**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | [**ScoreTrack**]({{complexTypePrefix}}ScoreTrack.md) | | - -#### list_score_tracks.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### list_score_tracks.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### list_score_tracks.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **mark_score_comment_resolved** - -> mark_score_comment_resolved(scorecomment) - -Mark the comment as resolved - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - } - try: - # Mark the comment as resolved - api_response = api_instance.mark_score_comment_resolved( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Mark the comment as resolved - api_response = api_instance.mark_score_comment_resolved( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -comment | CommentSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#mark_score_comment_resolved.ApiResponseFor204) | The comment has been marked as resolved -403 | [ApiResponseFor403](#mark_score_comment_resolved.ApiResponseFor403) | Not granted to mark this comment as resolved -404 | [ApiResponseFor404](#mark_score_comment_resolved.ApiResponseFor404) | Score or comment not found -default | [ApiResponseForDefault](#mark_score_comment_resolved.ApiResponseForDefault) | Error - -#### mark_score_comment_resolved.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### mark_score_comment_resolved.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### mark_score_comment_resolved.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### mark_score_comment_resolved.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **mark_score_comment_unresolved** - -> mark_score_comment_unresolved(scorecomment) - -Mark the comment as unresolved - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - } - try: - # Mark the comment as unresolved - api_response = api_instance.mark_score_comment_unresolved( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - try: - # Mark the comment as unresolved - api_response = api_instance.mark_score_comment_unresolved( - path_params=path_params, - query_params=query_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -comment | CommentSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#mark_score_comment_unresolved.ApiResponseFor204) | The comment has been unmarked as resolved -403 | [ApiResponseFor403](#mark_score_comment_unresolved.ApiResponseFor403) | Not granted to unmark this comment as resolved -404 | [ApiResponseFor404](#mark_score_comment_unresolved.ApiResponseFor404) | Score or comment not found -default | [ApiResponseForDefault](#mark_score_comment_unresolved.ApiResponseForDefault) | Error - -#### mark_score_comment_unresolved.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### mark_score_comment_unresolved.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### mark_score_comment_unresolved.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### mark_score_comment_unresolved.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_score_comment** - -> ScoreComment post_score_comment(scorebody) - -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`. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - query_params = { - } - body = ScoreCommentCreation( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - mentions=[ - "mentions_example" - ], - reply_to="reply_to_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example" - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) - try: - # Post a new comment - api_response = api_instance.post_score_comment( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - body = ScoreCommentCreation( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - mentions=[ - "mentions_example" - ], - reply_to="reply_to_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example" - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) - try: - # Post a new comment - api_response = api_instance.post_score_comment( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreCommentCreation**](../../models/ScoreCommentCreation.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_score_comment.ApiResponseFor200) | The new comment -402 | [ApiResponseFor402](#post_score_comment.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#post_score_comment.ApiResponseFor403) | Not granted to access to this score, to post a comment, or your API call triggered our spam filter. -404 | [ApiResponseFor404](#post_score_comment.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#post_score_comment.ApiResponseForDefault) | Error - -#### post_score_comment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreComment**](../../models/ScoreComment.md) | | - - -#### post_score_comment.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### post_score_comment.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### post_score_comment.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### post_score_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_score_collaborator** - -> remove_score_collaborator(scorecollaborator) - -Delete a collaborator - -Remove the specified collaborator from the score - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'collaborator': "collaborator_example", - } - try: - # Delete a collaborator - api_response = api_instance.remove_score_collaborator( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -collaborator | CollaboratorSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CollaboratorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#remove_score_collaborator.ApiResponseFor204) | The collaborator has been removed -403 | [ApiResponseFor403](#remove_score_collaborator.ApiResponseFor403) | Not granted to manage this score -404 | [ApiResponseFor404](#remove_score_collaborator.ApiResponseFor404) | Score or collaborator not found -default | [ApiResponseForDefault](#remove_score_collaborator.ApiResponseForDefault) | Error - -#### remove_score_collaborator.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### remove_score_collaborator.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### remove_score_collaborator.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### remove_score_collaborator.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **untrash_score** - -> untrash_score(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. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - } - try: - # Untrash a score - api_response = api_instance.untrash_score( - path_params=path_params, - ) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->untrash_score: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#untrash_score.ApiResponseFor204) | The score has been untrashed -403 | [ApiResponseFor403](#untrash_score.ApiResponseFor403) | Not granted to manage this score -404 | [ApiResponseFor404](#untrash_score.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#untrash_score.ApiResponseForDefault) | Error - -#### untrash_score.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### untrash_score.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### untrash_score.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### untrash_score.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_score_comment** - -> ScoreComment update_score_comment(scorecommentbody) - -Update an existing comment - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_comment_update import ScoreCommentUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - } - body = ScoreCommentUpdate( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example" - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) - try: - # Update an existing comment - api_response = api_instance.update_score_comment( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) - - # example passing only optional values - path_params = { - 'score': "score_example", - 'comment': "comment_example", - } - query_params = { - 'sharingKey': "sharingKey_example", - } - body = ScoreCommentUpdate( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example" - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) - try: - # Update an existing comment - api_response = api_instance.update_score_comment( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreCommentUpdate**](../../models/ScoreCommentUpdate.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -sharingKey | SharingKeySchema | | optional - - -# SharingKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -comment | CommentSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_score_comment.ApiResponseFor200) | The edited comment -402 | [ApiResponseFor402](#update_score_comment.ApiResponseFor402) | Account overquota -403 | [ApiResponseFor403](#update_score_comment.ApiResponseFor403) | Not granted to access to this score or not the original comment creator -404 | [ApiResponseFor404](#update_score_comment.ApiResponseFor404) | Score not found -default | [ApiResponseForDefault](#update_score_comment.ApiResponseForDefault) | Error - -#### update_score_comment.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreComment**](../../models/ScoreComment.md) | | - - -#### update_score_comment.ApiResponseFor402 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor402ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor402ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_score_comment.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_score_comment.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_score_comment.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_score_track** - -> ScoreTrack update_score_track(scoretrackbody) - -Update an audio or video track linked to a score - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_update import ScoreTrackUpdate -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'score': "score_example", - 'track': "track_example", - } - body = ScoreTrackUpdate( - title="title_example", - default=True, - state=ScoreTrackState("draft"), - synchronization_points=[ - ScoreTrackPoint( - type="measure", - measure_uuid="measure_uuid_example", - time=3.14, - ) - ], - ) - try: - # Update an audio or video track linked to a score - api_response = api_instance.update_score_track( - path_params=path_params, - body=body, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->update_score_track: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreTrackUpdate**](../../models/ScoreTrackUpdate.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -score | ScoreSchema | | -track | TrackSchema | | - -# ScoreSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TrackSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_score_track.ApiResponseFor200) | Updated track -403 | [ApiResponseFor403](#update_score_track.ApiResponseFor403) | Not granted to access to this score -404 | [ApiResponseFor404](#update_score_track.ApiResponseFor404) | Score or Track not found -default | [ApiResponseForDefault](#update_score_track.ApiResponseForDefault) | Error - -#### update_score_track.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ScoreTrack**](../../models/ScoreTrack.md) | | - - -#### update_score_track.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_score_track.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -#### update_score_track.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/TaskApi.md b/docs/apis/tags/TaskApi.md deleted file mode 100644 index 0212dd1..0000000 --- a/docs/apis/tags/TaskApi.md +++ /dev/null @@ -1,124 +0,0 @@ - -# flat_api.apis.tags.task_api.TaskApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_task**](#get_task) | **get** /tasks/{task} | Get a task details - -# **get_task** - -> Task get_task(task) - -Get a task details - -This method can be used to follow a task progression, for example while a score is being exported. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import task_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = task_api.TaskApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'task': "task_example", - } - try: - # Get a task details - api_response = api_instance.get_task( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling TaskApi->get_task: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -task | TaskSchema | | - -# TaskSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_task.ApiResponseFor200) | Task details -default | [ApiResponseForDefault](#get_task.ApiResponseForDefault) | Error - -#### get_task.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Task**](../../models/Task.md) | | - - -#### get_task.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/apis/tags/UserApi.md b/docs/apis/tags/UserApi.md deleted file mode 100644 index f7242c9..0000000 --- a/docs/apis/tags/UserApi.md +++ /dev/null @@ -1,438 +0,0 @@ - -# flat_api.apis.tags.user_api.UserApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ger_user_likes**](#ger_user_likes) | **get** /users/{user}/likes | List liked scores -[**get_user**](#get_user) | **get** /users/{user} | Get a public user profile -[**get_user_scores**](#get_user_scores) | **get** /users/{user}/scores | List user's scores - -# **ger_user_likes** - -> [ScoreDetails] ger_user_likes(user) - -List liked scores - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import user_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - query_params = { - } - try: - # List liked scores - api_response = api_instance.ger_user_likes( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - query_params = { - 'ids': True, - } - try: - # List liked scores - api_response = api_instance.ger_user_likes( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -ids | IdsSchema | | optional - - -# IdsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#ger_user_likes.ApiResponseFor200) | List of liked scores -default | [ApiResponseForDefault](#ger_user_likes.ApiResponseForDefault) | Error - -#### ger_user_likes.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### ger_user_likes.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user** - -> UserPublic get_user(user) - -Get a public user profile - -Get a profile of a Flat or Flat for Education User. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import user_api -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - try: - # Get a public user profile - api_response = api_instance.get_user( - path_params=path_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->get_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_user.ApiResponseFor200) | The user public details -default | [ApiResponseForDefault](#get_user.ApiResponseForDefault) | Error - -#### get_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserPublic**](../../models/UserPublic.md) | | - - -#### get_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user_scores** - -> [ScoreDetails] get_user_scores(user) - -List user's scores - -Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. - -### Example - -* OAuth Authentication (OAuth2): -```python -import flat_api -from flat_api.apis.tags import user_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'user': "user_example", - } - query_params = { - } - try: - # List user's scores - api_response = api_instance.get_user_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->get_user_scores: %s\n" % e) - - # example passing only optional values - path_params = { - 'user': "user_example", - } - query_params = { - 'parent': "parent_example", - } - try: - # List user's scores - api_response = api_instance.get_user_scores( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->get_user_scores: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -parent | ParentSchema | | optional - - -# ParentSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user | UserSchema | | - -# UserSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_user_scores.ApiResponseFor200) | The user scores -default | [ApiResponseForDefault](#get_user_scores.ApiResponseForDefault) | Error - -#### get_user_scores.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | [**ScoreDetails**]({{complexTypePrefix}}ScoreDetails.md) | | - -#### get_user_scores.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FlatErrorResponse**](../../models/FlatErrorResponse.md) | | - - -### Authorization - -[OAuth2](../../../README.md#OAuth2) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/docs/models/ApiAccessToken.md b/docs/models/ApiAccessToken.md deleted file mode 100644 index 4b6dbd7..0000000 --- a/docs/models/ApiAccessToken.md +++ /dev/null @@ -1,36 +0,0 @@ -# flat_api.model.api_access_token.ApiAccessToken - -An API access token - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | An API access token | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of this private token | [optional] -**name** | str, | str, | Name of the personal access token | [optional] -**token** | str, | str, | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] -**issuedDate** | str, datetime, | str, | The date then this token was issued | [optional] value must conform to RFC-3339 date-time -**expirationDate** | str, datetime, | str, | The date then this token will expire | [optional] value must conform to RFC-3339 date-time -**[scopes](#scopes)** | list, tuple, | tuple, | The list of scopes associated to the token | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# scopes - -The list of scopes associated to the token - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of scopes associated to the token | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AppScopes.md b/docs/models/AppScopes.md deleted file mode 100644 index 28aa6c2..0000000 --- a/docs/models/AppScopes.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.app_scopes.AppScopes - -Available scopes - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Available scopes | must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/Assignment.md b/docs/models/Assignment.md deleted file mode 100644 index b1e9f5b..0000000 --- a/docs/models/Assignment.md +++ /dev/null @@ -1,77 +0,0 @@ -# flat_api.model.assignment.Assignment - -Assignment details - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Assignment details | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[attachments](#attachments)** | list, tuple, | tuple, | | -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | -**id** | str, | str, | Unique identifier of the assignment | -**title** | str, | str, | Title of the assignment | -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | -**description** | str, | str, | Description and content of the assignment | [optional] -**cover** | str, | str, | The URL of the cover to display | [optional] -**coverFile** | str, | str, | The id of the cover to display | [optional] -**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**toolset** | str, | str, | The id of the associated toolset | [optional] -**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# capabilities - -Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | -**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | -**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | -**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | -**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canPublishInClassError - -If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | str, | str, | A corresponding code for this error | -**message** | str, | str, | A printable and localized message for this error | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentCopy.md b/docs/models/AssignmentCopy.md deleted file mode 100644 index 955fe86..0000000 --- a/docs/models/AssignmentCopy.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.assignment_copy.AssignmentCopy - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**classroom** | str, | str, | The destination classroom where the assignment will be copied | [optional] -**assignment** | str, | str, | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] -**scheduledDate** | str, datetime, | str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] value must conform to RFC-3339 date-time -**libraryParent** | str, | str, | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentCopyResponse.md b/docs/models/AssignmentCopyResponse.md deleted file mode 100644 index 3f5a084..0000000 --- a/docs/models/AssignmentCopyResponse.md +++ /dev/null @@ -1,76 +0,0 @@ -# flat_api.model.assignment_copy_response.AssignmentCopyResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] -**title** | str, | str, | Title of the assignment | [optional] -**description** | str, | str, | Description and content of the assignment | [optional] -**cover** | str, | str, | The URL of the cover to display | [optional] -**coverFile** | str, | str, | The id of the cover to display | [optional] -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**toolset** | str, | str, | The id of the associated toolset | [optional] -**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**resource** | str, | str, | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# capabilities - -Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | -**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | -**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | -**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | -**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canPublishInClassError - -If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | str, | str, | A corresponding code for this error | -**message** | str, | str, | A printable and localized message for this error | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmission.md b/docs/models/AssignmentSubmission.md deleted file mode 100644 index cad6b11..0000000 --- a/docs/models/AssignmentSubmission.md +++ /dev/null @@ -1,58 +0,0 @@ -# flat_api.model.assignment_submission.AssignmentSubmission - -Assignment Submission - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Submission | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**creator** | str, | str, | The User identifier of the student who created the submission | -**[attachments](#attachments)** | list, tuple, | tuple, | | -**assignment** | str, | str, | Unique identifier of the assignment | -**classroom** | str, | str, | Unique identifier of the classroom where the assignment was posted | -**id** | str, | str, | Unique identifier of the submission | -**state** | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | [**AssignmentSubmissionState**](AssignmentSubmissionState.md) | | -**creationDate** | str, | str, | The date when the submission was created | [optional] -**submissionDate** | str, | str, | The date when the student submitted their work | [optional] -**returnDate** | str, | str, | The date when the teacher returned the work | [optional] -**returnCreator** | str, | str, | The User unique identifier of the teacher who returned the submission | [optional] -**grade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. | [optional] -**draftGrade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] -**[exercisesIds](#exercisesIds)** | list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | [optional] -**googleClassroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] -**microsoftGraph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | - -# exercisesIds - -The ids of exercises when they need to be in a specific order - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionComment.md b/docs/models/AssignmentSubmissionComment.md deleted file mode 100644 index 7856e56..0000000 --- a/docs/models/AssignmentSubmissionComment.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.assignment_submission_comment.AssignmentSubmissionComment - -Feedback comment added to an assignment submission - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Feedback comment added to an assignment submission | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The comment unique identifier | [optional] -**user** | str, | str, | The author unique identifier | [optional] -**submission** | str, | str, | The submission unique identifier | [optional] -**date** | str, datetime, | str, | The date when the comment was posted | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The date of the last comment modification | [optional] value must conform to RFC-3339 date-time -**comment** | str, | str, | The comment text | [optional] -**unread** | bool, | BoolClass, | True if the comment is unread by the current user | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionCommentCreation.md b/docs/models/AssignmentSubmissionCommentCreation.md deleted file mode 100644 index 392e87e..0000000 --- a/docs/models/AssignmentSubmissionCommentCreation.md +++ /dev/null @@ -1,17 +0,0 @@ -# flat_api.model.assignment_submission_comment_creation.AssignmentSubmissionCommentCreation - -Creation of a assignment submission comment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a assignment submission comment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**comment** | str, | str, | The comment text | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionHistory.md b/docs/models/AssignmentSubmissionHistory.md deleted file mode 100644 index 27db4b1..0000000 --- a/docs/models/AssignmentSubmissionHistory.md +++ /dev/null @@ -1,55 +0,0 @@ -# flat_api.model.assignment_submission_history.AssignmentSubmissionHistory - -History item of the submission - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | History item of the submission | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**date** | str, datetime, | str, | The date when the submission was changed | [optional] value must conform to RFC-3339 date-time -**[users](#users)** | list, tuple, | tuple, | The user(s) unique identifier(s) who made the change | [optional] -**source** | str, | str, | The source of the change if the change was made by a third-party software | [optional] must be one of ["lti", "googleClassroom", "microsoftGraph", ] -**state** | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | | [optional] -**draftGrade** | decimal.Decimal, int, float, | decimal.Decimal, | The numerator of the grade at this time in the submission grade history | [optional] -**grade** | decimal.Decimal, int, float, | decimal.Decimal, | The numerator of the grade at this time in the submission grade history | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | The denominator of the grade at this time in the submission grade history | [optional] -**comment** | str, | str, | The comment that is made to this submission | [optional] -**dueDate** | str, datetime, | str, | The due date of this assignment | [optional] value must conform to RFC-3339 date-time -**[attachment](#attachment)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# users - -The user(s) unique identifier(s) who made the change - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The user(s) unique identifier(s) who made the change | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# attachment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**score** | str, | str, | The score identifier that changed | [optional] -**revision** | str, | str, | The revision identifier that changed | [optional] -**title** | str, | str, | The title of the score that changed | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionHistoryState.md b/docs/models/AssignmentSubmissionHistoryState.md deleted file mode 100644 index 43a302f..0000000 --- a/docs/models/AssignmentSubmissionHistoryState.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.assignment_submission_history_state.AssignmentSubmissionHistoryState - -State of the submission history - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | State of the submission history | must be one of ["created", "turnedIn", "returned", "reset", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionState.md b/docs/models/AssignmentSubmissionState.md deleted file mode 100644 index 098f2fc..0000000 --- a/docs/models/AssignmentSubmissionState.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.assignment_submission_state.AssignmentSubmissionState - -State of the submission - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | State of the submission | must be one of ["created", "turnedIn", "returned", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentSubmissionUpdate.md b/docs/models/AssignmentSubmissionUpdate.md deleted file mode 100644 index 9da6e8e..0000000 --- a/docs/models/AssignmentSubmissionUpdate.md +++ /dev/null @@ -1,63 +0,0 @@ -# flat_api.model.assignment_submission_update.AssignmentSubmissionUpdate - -Assignment Submission creation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Submission creation | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**submit** | bool, | BoolClass, | If `true`, the submission will be marked as done | [optional] -**draftGrade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] -**grade** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Optional grade. If unset, no grade was set. | [optional] -**[exercisesIds](#exercisesIds)** | list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | [optional] -**return** | bool, | BoolClass, | If `true`, the submission will be marked as done | [optional] -**[comments](#comments)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | - -# exercisesIds - -The ids of exercises when they need to be in a specific order - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, None, | tuple, NoneClass, | The ids of exercises when they need to be in a specific order | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# comments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of comments added to the submission | [optional] -**unread** | decimal.Decimal, int, float, | decimal.Decimal, | The number of unread comments for the current user | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentType.md b/docs/models/AssignmentType.md deleted file mode 100644 index 1159207..0000000 --- a/docs/models/AssignmentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.assignment_type.AssignmentType - -Type of the assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Type of the assignment | must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/AssignmentUpdate.md b/docs/models/AssignmentUpdate.md deleted file mode 100644 index 2f3719f..0000000 --- a/docs/models/AssignmentUpdate.md +++ /dev/null @@ -1,39 +0,0 @@ -# flat_api.model.assignment_update.AssignmentUpdate - -Assignment Resource Editing - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Assignment Resource Editing | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] -**title** | str, | str, | Title of the assignment | [optional] -**description** | str, | str, | Description and content of the assignment | [optional] -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**nbPlaybackAuthorized** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | None, str, | NoneClass, str, | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**coverFile** | None, str, | NoneClass, str, | The id of the cover to display | [optional] -**cover** | None, str, | NoneClass, str, | The URL of the cover to display | [optional] -**maxPoints** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassAssignment.md b/docs/models/ClassAssignment.md deleted file mode 100644 index 2324c91..0000000 --- a/docs/models/ClassAssignment.md +++ /dev/null @@ -1,163 +0,0 @@ -# flat_api.model.class_assignment.ClassAssignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] -**title** | str, | str, | Title of the assignment | [optional] -**description** | str, | str, | Description and content of the assignment | [optional] -**cover** | str, | str, | The URL of the cover to display | [optional] -**coverFile** | str, | str, | The id of the cover to display | [optional] -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**toolset** | str, | str, | The id of the associated toolset | [optional] -**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**creator** | str, | str, | The User unique identifier of the creator of this assignment | [optional] -**state** | str, | str, | State of the assignment | [optional] must be one of ["draft", "active", "archived", ] -**classroom** | str, | str, | The unique identifier of the class where this assignment was posted | [optional] -**creationDate** | str, datetime, | str, | The creation date of this assignment | [optional] value must conform to RFC-3339 date-time -**scheduledDate** | str, datetime, | str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] value must conform to RFC-3339 date-time -**dueDate** | str, datetime, | str, | The due date of this assignment, late submissions will be marked as paste due. | [optional] value must conform to RFC-3339 date-time -**assigneeMode** | str, | str, | Possible modes of assigning assignments | [optional] must be one of ["everyone", "selected", ] -**[assignedStudents](#assignedStudents)** | list, tuple, | tuple, | Identifiers for the students that have access to the assignment | [optional] -**[submissions](#submissions)** | list, tuple, | tuple, | | [optional] -**googleClassroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] -**microsoftGraph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] -**[mfc](#mfc)** | dict, frozendict.frozendict, | frozendict.frozendict, | A MusicFirst Classroom assignment | [optional] -**[canvas](#canvas)** | dict, frozendict.frozendict, | frozendict.frozendict, | A Canvas LMS assignment | [optional] -**[lti](#lti)** | dict, frozendict.frozendict, | frozendict.frozendict, | An LTI assignment | [optional] -**issue** | str, | str, | Detected issue for this assignment | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# capabilities - -Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | -**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | -**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | -**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | -**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canPublishInClassError - -If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | str, | str, | A corresponding code for this error | -**message** | str, | str, | A printable and localized message for this error | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | - -# assignedStudents - -Identifiers for the students that have access to the assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Identifiers for the students that have access to the assignment | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# submissions - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AssignmentSubmission**](AssignmentSubmission.md) | [**AssignmentSubmission**](AssignmentSubmission.md) | [**AssignmentSubmission**](AssignmentSubmission.md) | | - -# mfc - -A MusicFirst Classroom assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A MusicFirst Classroom assignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the course on MusicFirst Task | [optional] -**alternateLink** | str, | str, | Link to MusicFirst Classroom task | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canvas - -A Canvas LMS assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A Canvas LMS assignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the course on Canvas assignment | [optional] -**alternateLink** | str, | str, | Link to Canvas assignment | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# lti - -An LTI assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | An LTI assignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Resource ID in the LMS | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassAssignmentUpdate.md b/docs/models/ClassAssignmentUpdate.md deleted file mode 100644 index 24537cc..0000000 --- a/docs/models/ClassAssignmentUpdate.md +++ /dev/null @@ -1,102 +0,0 @@ -# flat_api.model.class_assignment_update.ClassAssignmentUpdate - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] -**title** | str, | str, | Title of the assignment | [optional] -**description** | str, | str, | Description and content of the assignment | [optional] -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**nbPlaybackAuthorized** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | None, str, | NoneClass, str, | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**coverFile** | None, str, | NoneClass, str, | The id of the cover to display | [optional] -**cover** | None, str, | NoneClass, str, | The URL of the cover to display | [optional] -**maxPoints** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**state** | str, | str, | State of the assignment | [optional] must be one of ["draft", "active", ] -**dueDate** | None, str, datetime, | NoneClass, str, | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] value must conform to RFC-3339 date-time -**scheduledDate** | None, str, datetime, | NoneClass, str, | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] value must conform to RFC-3339 date-time -**[googleClassroom](#googleClassroom)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom options for this assignment | [optional] -**[microsoftGraph](#microsoftGraph)** | dict, frozendict.frozendict, | frozendict.frozendict, | Microsoft Graph options for this assignment | [optional] -**assigneeMode** | str, | str, | Possible modes of assigning assignments | [optional] must be one of ["everyone", "selected", ] -**[assignedStudents](#assignedStudents)** | list, tuple, | tuple, | Identifiers for the students that have access to the assignment | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | [**ClassAttachmentCreation**](ClassAttachmentCreation.md) | | - -# googleClassroom - -Google Classroom options for this assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom options for this assignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**topicId** | None, str, | NoneClass, str, | Identifier of the topic where the assignment is created | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# microsoftGraph - -Microsoft Graph options for this assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Microsoft Graph options for this assignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[categories](#categories)** | list, tuple, None, | tuple, NoneClass, | List of categories this assignment belongs to | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# categories - -List of categories this assignment belongs to - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, None, | tuple, NoneClass, | List of categories this assignment belongs to | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# assignedStudents - -Identifiers for the students that have access to the assignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Identifiers for the students that have access to the assignment | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassAttachmentCreation.md b/docs/models/ClassAttachmentCreation.md deleted file mode 100644 index 9aceaa9..0000000 --- a/docs/models/ClassAttachmentCreation.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.class_attachment_creation.ClassAttachmentCreation - -Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**type** | str, | str, | The type of the attachment posted: * `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] must be one of ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance", ] -**score** | str, | str, | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] -**worksheet** | str, | str, | An unique worksheet identifier | [optional] -**sharingMode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] -**lockScoreTemplate** | bool, | BoolClass, | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] -**url** | str, | str, | The URL of the attachment. | [optional] -**googleDriveFileId** | str, | str, | The ID of the Google Drive File | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassCreation.md b/docs/models/ClassCreation.md deleted file mode 100644 index 4a699aa..0000000 --- a/docs/models/ClassCreation.md +++ /dev/null @@ -1,21 +0,0 @@ -# flat_api.model.class_creation.ClassCreation - -Creation of a classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | The name of the new class | -**section** | str, | str, | The section of the new class | [optional] -**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassDetails.md b/docs/models/ClassDetails.md deleted file mode 100644 index 6dc35ed..0000000 --- a/docs/models/ClassDetails.md +++ /dev/null @@ -1,201 +0,0 @@ -# flat_api.model.class_details.ClassDetails - -A classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the class | [optional] -**state** | [**ClassState**](ClassState.md) | [**ClassState**](ClassState.md) | | [optional] -**name** | str, | str, | The name of the class | [optional] -**section** | str, | str, | The section of the class | [optional] -**description** | str, | str, | An optionnal description for this class | [optional] -**organization** | str, | str, | The unique identifier of the Organization owning this class | [optional] -**owner** | str, | str, | The unique identifier of the User owning this class | [optional] -**creationDate** | str, datetime, | str, | The date when the class was create | [optional] value must conform to RFC-3339 date-time -**enrollmentCode** | str, | str, | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] -**theme** | str, | str, | The theme identifier using in Flat User Interface | [optional] -**assignmentsCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of assignments created in the class | [optional] -**studentsGroup** | [**GroupDetails**](GroupDetails.md) | [**GroupDetails**](GroupDetails.md) | | [optional] -**teachersGroup** | [**GroupDetails**](GroupDetails.md) | [**GroupDetails**](GroupDetails.md) | | [optional] -**[issues](#issues)** | dict, frozendict.frozendict, | frozendict.frozendict, | Detected issues for this class | [optional] -**[googleClassroom](#googleClassroom)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom course-related information | [optional] -**[googleDrive](#googleDrive)** | dict, frozendict.frozendict, | frozendict.frozendict, | Google Drive course-related information provided by Google Classroom | [optional] -**[microsoftGraph](#microsoftGraph)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[lti](#lti)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by the LTI consumer | [optional] -**[canvas](#canvas)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | [optional] -**[mfc](#mfc)** | dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | [optional] -**[clever](#clever)** | dict, frozendict.frozendict, | frozendict.frozendict, | Clever.com section-related information | [optional] -**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# issues - -Detected issues for this class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Detected issues for this class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[sync](#sync)** | list, tuple, | tuple, | Synchronization issues for the class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# sync - -Synchronization issues for the class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Synchronization issues for the class | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | A sync issue | - -# items - -A sync issue - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A sync issue | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The account user identifier | [optional] -**email** | str, | str, | The email address of the user concerned by this sync issue | [optional] -**reason** | str, | str, | The reason why the account cannot be synced | [optional] must be one of ["otherOrgnanization", "personalSubscription", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# googleClassroom - -Google Classroom course-related information - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Google Classroom course-related information | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The course identifier on Google Classroom | [optional] -**alternateLink** | str, | str, | Absolute link to this course in the Classroom web UI | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# googleDrive - -Google Drive course-related information provided by Google Classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Google Drive course-related information provided by Google Classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**teacherFolderId** | str, | str, | [Teachers only] The Drive directory identifier of the teachers' folder | [optional] -**teacherFolderAlternateLink** | str, | str, | [Teachers only] The Drive URL of the teachers' folder | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# microsoftGraph - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The course identifier on Microsoft Graph | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# lti - -Meta information provided by the LTI consumer - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by the LTI consumer | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**contextId** | str, | str, | Unique context identifier provided | [optional] -**contextTitle** | str, | str, | Context title | [optional] -**contextLabel** | str, | str, | Context label | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canvas - -Meta information provided by Canvs LMS - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the course on Canvas | [optional] -**domain** | str, | str, | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# mfc - -Meta information provided by Canvs LMS - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Meta information provided by Canvs LMS | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the course on MusicFirst Classroom | [optional] -**alternateLink** | str, | str, | Link to MusicFirst Classroom class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# clever - -Clever.com section-related information - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Clever.com section-related information | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Clever section unique identifier | [optional] -**creationDate** | str, datetime, | str, | The creation date of the section on clever | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The last modification date of the section on clever | [optional] value must conform to RFC-3339 date-time -**subject** | str, | str, | Normalized subject of the course | [optional] must be one of ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other", ] -**termName** | str, | str, | Name of the term when this course happens | [optional] -**termStartDate** | str, datetime, | str, | Beginning date of the term | [optional] value must conform to RFC-3339 date-time -**termEndDate** | str, datetime, | str, | End date of the term | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassGradeLevel.md b/docs/models/ClassGradeLevel.md deleted file mode 100644 index 866e1de..0000000 --- a/docs/models/ClassGradeLevel.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.class_grade_level.ClassGradeLevel - -Class grade level - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Class grade level | must be one of ["elementary", "middle", "high", "university", "other", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassRoles.md b/docs/models/ClassRoles.md deleted file mode 100644 index 34201d5..0000000 --- a/docs/models/ClassRoles.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.class_roles.ClassRoles - -User's Class Role (for Edu users only) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | User's Class Role (for Edu users only) | must be one of ["teacher", "student", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassState.md b/docs/models/ClassState.md deleted file mode 100644 index 037e1a7..0000000 --- a/docs/models/ClassState.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.class_state.ClassState - -The state of a classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The state of a classroom | must be one of ["active", "inactive", "archived", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ClassUpdate.md b/docs/models/ClassUpdate.md deleted file mode 100644 index ad8cbbc..0000000 --- a/docs/models/ClassUpdate.md +++ /dev/null @@ -1,21 +0,0 @@ -# flat_api.model.class_update.ClassUpdate - -Update of a classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Update of a classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | The name of the class | [optional] -**section** | str, | str, | The section of the class | [optional] -**level** | [**ClassGradeLevel**](ClassGradeLevel.md) | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skillsFocused** | [**EduSkillsFocused**](EduSkillsFocused.md) | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | Number of students in the classroom | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/Collection.md b/docs/models/Collection.md deleted file mode 100644 index 68874fd..0000000 --- a/docs/models/Collection.md +++ /dev/null @@ -1,76 +0,0 @@ -# flat_api.model.collection.Collection - -Collection of scores - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Collection of scores | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the collection | [optional] -**title** | str, | str, | The title of the collection | [optional] -**htmlUrl** | str, | str, | The url where the collection can be viewed in a web browser | [optional] -**type** | [**CollectionType**](CollectionType.md) | [**CollectionType**](CollectionType.md) | | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] -**sharingKey** | str, | str, | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] -**app** | [**CollectionApp**](CollectionApp.md) | [**CollectionApp**](CollectionApp.md) | | [optional] -**creationDate** | str, datetime, | str, | The date when the collection was created | [optional] value must conform to RFC-3339 date-time -**user** | [**UserPublicSummary**](UserPublicSummary.md) | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**rights** | [**ResourceRights**](ResourceRights.md) | [**ResourceRights**](ResourceRights.md) | | [optional] -**[collaborators](#collaborators)** | list, tuple, | tuple, | The list of the collaborators of the collection | [optional] -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. | [optional] -**[collections](#collections)** | list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# collaborators - -The list of the collaborators of the collection - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of the collaborators of the collection | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | | - -# capabilities - -Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canEdit** | bool, | BoolClass, | Whether the current user can modify the metadata for the collection | [optional] -**canShare** | bool, | BoolClass, | Whether the current user can modify the sharing settings for the collection | [optional] -**canDelete** | bool, | BoolClass, | Whether the current user can delete the collection | [optional] -**canAddScores** | bool, | BoolClass, | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] -**canDeleteScores** | bool, | BoolClass, | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# collections - -The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/CollectionApp.md b/docs/models/CollectionApp.md deleted file mode 100644 index c3be3f0..0000000 --- a/docs/models/CollectionApp.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.collection_app.CollectionApp - -For App collections, the details of the app that created the collection - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | For App collections, the details of the app that created the collection | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The app unique identifier | [optional] -**name** | str, | str, | The name of the app | [optional] -**logo** | str, | str, | The app logo url | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/CollectionCreation.md b/docs/models/CollectionCreation.md deleted file mode 100644 index 8939057..0000000 --- a/docs/models/CollectionCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# flat_api.model.collection_creation.CollectionCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | -**title** | str, | str, | The title of the collection | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/CollectionModification.md b/docs/models/CollectionModification.md deleted file mode 100644 index 41fd240..0000000 --- a/docs/models/CollectionModification.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.collection_modification.CollectionModification - -Edit the collection metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Edit the collection metadata | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | The title of the collection | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/CollectionPrivacy.md b/docs/models/CollectionPrivacy.md deleted file mode 100644 index ffc6057..0000000 --- a/docs/models/CollectionPrivacy.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.collection_privacy.CollectionPrivacy - -The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. | must be one of ["private", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/CollectionType.md b/docs/models/CollectionType.md deleted file mode 100644 index 6224689..0000000 --- a/docs/models/CollectionType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.collection_type.CollectionType - -Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. | must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduLibrary.md b/docs/models/EduLibrary.md deleted file mode 100644 index 05dbf93..0000000 --- a/docs/models/EduLibrary.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.edu_library.EduLibrary - -A Flat for Education Library - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A Flat for Education Library | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | [optional] -**name** | str, | str, | Name of the lirbary | [optional] -**type** | str, | str, | Type of the library | [optional] must be one of ["myResources", "flatEduSamples", ] -**visibility** | str, | str, | Visibility of the library | [optional] must be one of ["private", "organization", "public", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResource.md b/docs/models/EduResource.md deleted file mode 100644 index 82e2cd3..0000000 --- a/docs/models/EduResource.md +++ /dev/null @@ -1,131 +0,0 @@ -# flat_api.model.edu_resource.EduResource - -A Flat for Education resource contained in a resources library - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A Flat for Education resource contained in a resources library | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities available for this resource | -**id** | str, | str, | Resource unique identifier | -**title** | str, | str, | Title of the resource | -**type** | [**EduResourceType**](EduResourceType.md) | [**EduResourceType**](EduResourceType.md) | | -**creator** | str, | str, | The User identifier of the resource creator | [optional] -**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] -**[tags](#tags)** | list, tuple, | tuple, | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] -**parent** | str, | str, | Identifier of the parent resource, e.g. a folder or root | [optional] -**creationDate** | str, datetime, | str, | The date when the resource was created | [optional] value must conform to RFC-3339 date-time -**updateDate** | str, datetime, | str, | The date when the resource was updated | [optional] value must conform to RFC-3339 date-time -**[resource](#resource)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# capabilities - -Capabilities available for this resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities available for this resource | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canEdit** | bool, | BoolClass, | Whether the current user can modify this resource | [optional] -**canAddResources** | bool, | BoolClass, | Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) | [optional] -**canAddFolders** | bool, | BoolClass, | Whether the current user can add folders within this resource (e.g. `folder` inside `root`) | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# tags - -Specific attributes for the resource (e.g. sample resources with custom design) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Specific attributes for the resource (e.g. sample resources with custom design) | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | [**AssignmentType**](AssignmentType.md) | | [optional] -**[capabilities](#capabilities)** | dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | [optional] -**title** | str, | str, | Title of the folder | [optional] -**description** | str, | str, | Description and content of the assignment | [optional] -**cover** | str, | str, | The URL of the cover to display | [optional] -**coverFile** | str, | str, | The id of the cover to display | [optional] -**[attachments](#attachments)** | list, tuple, | tuple, | | [optional] -**useDedicatedAttachments** | bool, | BoolClass, | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**maxPoints** | decimal.Decimal, int, float, | decimal.Decimal, | If set, the grading will be enabled for the assignement | [optional] -**releaseGrades** | str, | str, | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] must be one of ["auto", "manual", ] -**shuffleExercises** | bool, | BoolClass, | Mixing worksheets exercises for each student | [optional] -**toolset** | str, | str, | The id of the associated toolset | [optional] -**nbPlaybackAuthorized** | decimal.Decimal, int, float, | decimal.Decimal, | The number of playback authorized on the scores of the assignment. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# capabilities - -Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**canArchive** | bool, | BoolClass, | Whether the current user can archive the assignment | -**canPublishInClass** | bool, | BoolClass, | Whether this assignment can be published in a class | -**canUnarchive** | bool, | BoolClass, | Whether the current user can unarchive the assignment | -**canEdit** | bool, | BoolClass, | Whether the current user can edit the assignment | -**[canPublishInClassError](#canPublishInClassError)** | dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# canPublishInClassError - -If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | str, | str, | A corresponding code for this error | -**message** | str, | str, | A printable and localized message for this error | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# attachments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | [**MediaAttachment**](MediaAttachment.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceCopy.md b/docs/models/EduResourceCopy.md deleted file mode 100644 index 4069e35..0000000 --- a/docs/models/EduResourceCopy.md +++ /dev/null @@ -1,17 +0,0 @@ -# flat_api.model.edu_resource_copy.EduResourceCopy - -Copy an education resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Copy an education resource | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**destination** | str, | str, | Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceCreation.md b/docs/models/EduResourceCreation.md deleted file mode 100644 index 22003fc..0000000 --- a/docs/models/EduResourceCreation.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.edu_resource_creation.EduResourceCreation - -Creation of an education resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of an education resource | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | Title of the resource | -**type** | [**EduResourceType**](EduResourceType.md) | [**EduResourceType**](EduResourceType.md) | | -**parent** | str, | str, | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] if omitted the server will use the default value of "root" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceMove.md b/docs/models/EduResourceMove.md deleted file mode 100644 index 8cc8883..0000000 --- a/docs/models/EduResourceMove.md +++ /dev/null @@ -1,17 +0,0 @@ -# flat_api.model.edu_resource_move.EduResourceMove - -Move an education resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Move an education resource | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**destination** | str, | str, | Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourcePrivacy.md b/docs/models/EduResourcePrivacy.md deleted file mode 100644 index 1a0ae1d..0000000 --- a/docs/models/EduResourcePrivacy.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.edu_resource_privacy.EduResourcePrivacy - -The Education resource privacy mode. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The Education resource privacy mode. | must be one of ["private", "public", ] if omitted the server will use the default value of "private" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceType.md b/docs/models/EduResourceType.md deleted file mode 100644 index 7f65028..0000000 --- a/docs/models/EduResourceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.edu_resource_type.EduResourceType - -Type of an education resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Type of an education resource | must be one of ["assignment", "folder", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceUpdate.md b/docs/models/EduResourceUpdate.md deleted file mode 100644 index 1de2a63..0000000 --- a/docs/models/EduResourceUpdate.md +++ /dev/null @@ -1,17 +0,0 @@ -# flat_api.model.edu_resource_update.EduResourceUpdate - -Update of an education resource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Update of an education resource | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | Title of the resource | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduResourceUseInClass.md b/docs/models/EduResourceUseInClass.md deleted file mode 100644 index 2b6252f..0000000 --- a/docs/models/EduResourceUseInClass.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.edu_resource_use_in_class.EduResourceUseInClass - -Use an education resource in class - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Use an education resource in class | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**classroom** | str, | str, | The destination classroom where the resource will be copied. | -**assignment** | str, | str, | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/EduSkillsFocused.md b/docs/models/EduSkillsFocused.md deleted file mode 100644 index 191d588..0000000 --- a/docs/models/EduSkillsFocused.md +++ /dev/null @@ -1,16 +0,0 @@ -# flat_api.model.edu_skills_focused.EduSkillsFocused - -Specific skills that will be focused in classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Specific skills that will be focused in classroom | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["notation", "sight-reading", "performance-instrumental", "ear-training", "music-theory", "composition", "jazz-ensemble", "music-technology", "other", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/FlatErrorResponse.md b/docs/models/FlatErrorResponse.md deleted file mode 100644 index fa3dd80..0000000 --- a/docs/models/FlatErrorResponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.flat_error_response.FlatErrorResponse - -An API Error response - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | An API Error response | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | str, | str, | A corresponding code for this error | -**message** | str, | str, | A printable message for this error | -**id** | str, | str, | An unique error identifier generated for the request | [optional] -**param** | str, | str, | The related parameter that caused the error | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/FlatLocales.md b/docs/models/FlatLocales.md deleted file mode 100644 index 040d899..0000000 --- a/docs/models/FlatLocales.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.flat_locales.FlatLocales - -The user language - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The user language | must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] if omitted the server will use the default value of "en" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/GoogleClassroomCoursework.md b/docs/models/GoogleClassroomCoursework.md deleted file mode 100644 index fbfaf32..0000000 --- a/docs/models/GoogleClassroomCoursework.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.google_classroom_coursework.GoogleClassroomCoursework - -A coursework on Google Classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A coursework on Google Classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Identifier of the coursework assigned by Classroom | [optional] -**state** | str, | str, | State of the coursework | [optional] -**alternateLink** | str, | str, | Absolute link to this coursework in the Classroom web UI | [optional] -**topicId** | None, str, | NoneClass, str, | Identifier of the topic where the assignment is created | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/GoogleClassroomSubmission.md b/docs/models/GoogleClassroomSubmission.md deleted file mode 100644 index 4db8750..0000000 --- a/docs/models/GoogleClassroomSubmission.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.google_classroom_submission.GoogleClassroomSubmission - -A coursework submission on Google Classroom - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A coursework submission on Google Classroom | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Identifier of the coursework submission assigned by Classroom | [optional] -**state** | str, | str, | State of the submission on Google Classroom | [optional] -**alternateLink** | str, | str, | Absolute link to this coursework in the Classroom web UI | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/Group.md b/docs/models/Group.md deleted file mode 100644 index 8ebc007..0000000 --- a/docs/models/Group.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.group.Group - -A group of users - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A group of users | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the group | [optional] -**name** | str, | str, | The display name of the group | [optional] -**type** | str, | str, | The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class | [optional] must be one of ["generic", "classTeachers", "classStudents", ] -**usersCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of users in this group | [optional] -**readOnly** | bool, | BoolClass, | `True` if the group is set in read-only | [optional] -**organization** | str, | str, | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] -**creationDate** | str, datetime, | str, | The creation date of the group | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/GroupDetails.md b/docs/models/GroupDetails.md deleted file mode 100644 index ec43fbe..0000000 --- a/docs/models/GroupDetails.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.group_details.GroupDetails - -The details of a group - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | The details of a group | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the group | [optional] -**name** | str, | str, | The displayable name of the group | [optional] -**type** | [**GroupType**](GroupType.md) | [**GroupType**](GroupType.md) | | [optional] -**organization** | str, | str, | The unique identifier of the Organization owning the group | [optional] -**creationDate** | str, datetime, | str, | The date when the group was create | [optional] value must conform to RFC-3339 date-time -**usersCount** | decimal.Decimal, int, float, | decimal.Decimal, | The number of students in this group | [optional] -**readOnly** | bool, | BoolClass, | `true` if the properties and members of this group are in in read-only | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/GroupType.md b/docs/models/GroupType.md deleted file mode 100644 index 3bcc976..0000000 --- a/docs/models/GroupType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.group_type.GroupType - -The type of the group - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The type of the group | must be one of ["generic", "classTeachers", "classStudents", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/LicenseMode.md b/docs/models/LicenseMode.md deleted file mode 100644 index 2d20051..0000000 --- a/docs/models/LicenseMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.license_mode.LicenseMode - -Mode of the license - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Mode of the license | must be one of ["credit", "site", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/LicenseSources.md b/docs/models/LicenseSources.md deleted file mode 100644 index 8198990..0000000 --- a/docs/models/LicenseSources.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.license_sources.LicenseSources - -Source of the license - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | Source of the license | must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] if omitted the server will use the default value of "order" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/LmsName.md b/docs/models/LmsName.md deleted file mode 100644 index 1831660..0000000 --- a/docs/models/LmsName.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.lms_name.LmsName - -LMS name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | LMS name | must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/LtiCredentials.md b/docs/models/LtiCredentials.md deleted file mode 100644 index d540070..0000000 --- a/docs/models/LtiCredentials.md +++ /dev/null @@ -1,25 +0,0 @@ -# flat_api.model.lti_credentials.LtiCredentials - -A couple of LTI 1.x OAuth credentials - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A couple of LTI 1.x OAuth credentials | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of this couple of credentials | [optional] -**name** | str, | str, | Name of the couple of credentials | [optional] -**lms** | [**LmsName**](LmsName.md) | [**LmsName**](LmsName.md) | | [optional] -**organization** | str, | str, | The unique identifier of the Organization associated to these credentials | [optional] -**creator** | str, | str, | Unique identifier of the user who created these credentials | [optional] -**creationDate** | str, datetime, | str, | The creation date of thse credentials | [optional] value must conform to RFC-3339 date-time -**lastUsage** | str, datetime, | str, | The last time these credentials were used | [optional] value must conform to RFC-3339 date-time -**consumerKey** | str, | str, | OAuth 1 Consumer Key | [optional] -**consumerSecret** | str, | str, | OAuth 1 Consumer Secret | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/LtiCredentialsCreation.md b/docs/models/LtiCredentialsCreation.md deleted file mode 100644 index 9e9256a..0000000 --- a/docs/models/LtiCredentialsCreation.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.lti_credentials_creation.LtiCredentialsCreation - -Creation of a couple of LTI 1.x OAuth credentials - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a couple of LTI 1.x OAuth credentials | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**lms** | [**LmsName**](LmsName.md) | [**LmsName**](LmsName.md) | | -**name** | str, | str, | Name of the couple of credentials | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/MediaAttachment.md b/docs/models/MediaAttachment.md deleted file mode 100644 index bcb662e..0000000 --- a/docs/models/MediaAttachment.md +++ /dev/null @@ -1,38 +0,0 @@ -# flat_api.model.media_attachment.MediaAttachment - -Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**type** | str, | str, | The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | must be one of ["rich", "photo", "video", "link", "flat", "googleDrive", "worksheet", "performance", ] -**score** | str, | str, | An unique Flat score identifier | [optional] -**revision** | str, | str, | An unique revision identifier of a score | [optional] -**worksheet** | str, | str, | An unique worksheet identifier | [optional] -**dedicated** | bool, | BoolClass, | True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment | [optional] -**track** | str, | str, | A unique track identifier | [optional] -**sharingMode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] -**lockScoreTemplate** | bool, | BoolClass, | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] -**title** | str, | str, | The resolved title of the attachment | [optional] -**description** | str, | str, | The resolved description of the attachment | [optional] -**html** | str, | str, | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] -**htmlWidth** | str, | str, | If the `html` is available, the width of the widget | [optional] -**htmlHeight** | str, | str, | If the `html` is available, the height of the widget | [optional] -**url** | str, | str, | The url of the attachment | [optional] -**thumbnailUrl** | str, | str, | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] -**thumbnailWidth** | decimal.Decimal, int, | decimal.Decimal, | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**thumbnailHeight** | decimal.Decimal, int, | decimal.Decimal, | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**authorName** | str, | str, | The resolved author name of the attachment | [optional] -**authorUrl** | str, | str, | The resolved author url of the attachment | [optional] -**iconUrl** | str, | str, | The URL of the icon | [optional] -**mimeType** | str, | str, | The mine type of the file | [optional] -**googleDriveFileId** | str, | str, | The ID of the Google Drive File | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/MediaScoreSharingMode.md b/docs/models/MediaScoreSharingMode.md deleted file mode 100644 index f4ffd6c..0000000 --- a/docs/models/MediaScoreSharingMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.media_score_sharing_mode.MediaScoreSharingMode - -The sharing mode of the score for classes post and assignments - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The sharing mode of the score for classes post and assignments | must be one of ["read", "write", "copy", "performance", ] if omitted the server will use the default value of "read" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/MicrosoftGraphAssignment.md b/docs/models/MicrosoftGraphAssignment.md deleted file mode 100644 index b0b3219..0000000 --- a/docs/models/MicrosoftGraphAssignment.md +++ /dev/null @@ -1,34 +0,0 @@ -# flat_api.model.microsoft_graph_assignment.MicrosoftGraphAssignment - -A Microsoft Teams asignment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A Microsoft Teams asignment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Identifier of the assignement assigned by Microsoft Teams | [optional] -**state** | str, | str, | State of the assignment | [optional] -**alternateLink** | str, | str, | Absolute link to this assignement in the Microsoft Teams web UI | [optional] -**[categories](#categories)** | list, tuple, | tuple, | List of categories where this assignment is published under | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# categories - -List of categories where this assignment is published under - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of categories where this assignment is published under | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | A Microsoft Teams assignment category ID | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/MicrosoftGraphSubmission.md b/docs/models/MicrosoftGraphSubmission.md deleted file mode 100644 index 9d2a066..0000000 --- a/docs/models/MicrosoftGraphSubmission.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.microsoft_graph_submission.MicrosoftGraphSubmission - -A Microsoft Teams submission - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A Microsoft Teams submission | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Identifier of the submission assigned by Microsoft Teams | [optional] -**state** | str, | str, | State of the submission | [optional] -**alternateLink** | str, | str, | Absolute link to this submission in the Microsoft Teams web UI | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/OrganizationInvitation.md b/docs/models/OrganizationInvitation.md deleted file mode 100644 index a154032..0000000 --- a/docs/models/OrganizationInvitation.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.organization_invitation.OrganizationInvitation - -Details of an invitation to join an organization - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Details of an invitation to join an organization | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The invitation unique identifier | [optional] -**organization** | str, | str, | The unique identifier of the Organization owning this class | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**customCode** | str, | str, | Enrollment code to use when joining this organization | [optional] -**email** | str, | str, | The email address this invitation was sent to | [optional] -**invitedBy** | str, | str, | The unique identifier of the User who created this invitation | [optional] -**usedBy** | str, | str, | The unique identifier of the User who used this invitation | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/OrganizationInvitationCreation.md b/docs/models/OrganizationInvitationCreation.md deleted file mode 100644 index 8d7d312..0000000 --- a/docs/models/OrganizationInvitationCreation.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.organization_invitation_creation.OrganizationInvitationCreation - -The parameters to create an organization invitation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | The parameters to create an organization invitation | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**email** | str, | str, | The email address you want to send the invitation to | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/OrganizationRoles.md b/docs/models/OrganizationRoles.md deleted file mode 100644 index 251b4ec..0000000 --- a/docs/models/OrganizationRoles.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.organization_roles.OrganizationRoles - -User's Organization Role (for Edu users only) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | User's Organization Role (for Edu users only) | must be one of ["admin", "billing", "teacher", "user", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/OrganizationUserAccessTokenCreation.md b/docs/models/OrganizationUserAccessTokenCreation.md deleted file mode 100644 index 9a322a8..0000000 --- a/docs/models/OrganizationUserAccessTokenCreation.md +++ /dev/null @@ -1,31 +0,0 @@ -# flat_api.model.organization_user_access_token_creation.OrganizationUserAccessTokenCreation - -Creation of a delegated API access token for an organization user - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a delegated API access token for an organization user | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[scopes](#scopes)** | list, tuple, | tuple, | List of requested scopes for this credential | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# scopes - -List of requested scopes for this credential - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of requested scopes for this credential | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | [**AppScopes**](AppScopes.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ResourceCollaborator.md b/docs/models/ResourceCollaborator.md deleted file mode 100644 index 5c6d662..0000000 --- a/docs/models/ResourceCollaborator.md +++ /dev/null @@ -1,25 +0,0 @@ -# flat_api.model.resource_collaborator.ResourceCollaborator - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**aclRead** | bool, | BoolClass, | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False -**aclWrite** | bool, | BoolClass, | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**aclAdmin** | bool, | BoolClass, | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**isCollaborator** | bool, | BoolClass, | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False -**id** | str, | str, | The unique identifier of the permission | [optional] -**score** | str, | str, | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] -**collection** | str, | str, | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] -**user** | [**UserPublic**](UserPublic.md) | [**UserPublic**](UserPublic.md) | | [optional] -**group** | [**Group**](Group.md) | [**Group**](Group.md) | | [optional] -**userEmail** | str, | str, | If the collaborator is not a user of Flat yet, this field will contain their email. | [optional] -**invited** | bool, | BoolClass, | If this property is `true`, this is still a pending invitation | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ResourceCollaboratorCreation.md b/docs/models/ResourceCollaboratorCreation.md deleted file mode 100644 index e821bb5..0000000 --- a/docs/models/ResourceCollaboratorCreation.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.resource_collaborator_creation.ResourceCollaboratorCreation - -Add a collaborator to a resource. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Add a collaborator to a resource. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user** | str, | str, | The unique identifier of a Flat user | [optional] -**group** | str, | str, | The unique identifier of a Flat group | [optional] -**userEmail** | str, | str, | Fill this field to invite an individual user by email. | [optional] -**userToken** | str, | str, | Token received in an invitation to join the score. | [optional] -**aclRead** | bool, | BoolClass, | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] if omitted the server will use the default value of True -**aclWrite** | bool, | BoolClass, | `True` if the related user can modify the score. | [optional] if omitted the server will use the default value of False -**aclAdmin** | bool, | BoolClass, | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] if omitted the server will use the default value of False -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ResourceRights.md b/docs/models/ResourceRights.md deleted file mode 100644 index 9cdbcb2..0000000 --- a/docs/models/ResourceRights.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.resource_rights.ResourceRights - -The rights of the current user on a score or collection - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | The rights of the current user on a score or collection | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**aclRead** | bool, | BoolClass, | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False -**aclWrite** | bool, | BoolClass, | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**aclAdmin** | bool, | BoolClass, | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**isCollaborator** | bool, | BoolClass, | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreComment.md b/docs/models/ScoreComment.md deleted file mode 100644 index 6172cda..0000000 --- a/docs/models/ScoreComment.md +++ /dev/null @@ -1,62 +0,0 @@ -# flat_api.model.score_comment.ScoreComment - -Comment added on a sheet music - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Comment added on a sheet music | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The comment unique identifier | [optional] -**type** | str, | str, | The type of the comment | [optional] must be one of ["document", "inline", ] -**user** | str, | str, | The author unique identifier | [optional] -**score** | str, | str, | The unique identifier of the score where the comment was posted | [optional] -**revision** | str, | str, | The unique identifier of revision the comment was posted | [optional] -**replyTo** | str, | str, | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**date** | str, datetime, | str, | The date when the comment was posted | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The date of the last comment modification | [optional] value must conform to RFC-3339 date-time -**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] -**rawComment** | str, | str, | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**[mentions](#mentions)** | list, tuple, | tuple, | The list of user identifier mentioned on the score | [optional] -**resolved** | bool, | BoolClass, | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] -**resolvedBy** | str, | str, | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] -**[moderation](#moderation)** | dict, frozendict.frozendict, | frozendict.frozendict, | Information about the comment being moderated | [optional] -**spam** | bool, | BoolClass, | `true if the message has been detected as spam and hidden from other users | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# mentions - -The list of user identifier mentioned on the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of user identifier mentioned on the score | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# moderation - -Information about the comment being moderated - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Information about the comment being moderated | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**hidden** | bool, | BoolClass, | If true, this comment will be hidden from other users | [optional] -**reason** | str, | str, | If the comment is hidden, the reason why this one has been moderated | [optional] must be one of ["spam", "inappropriate", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCommentContext.md b/docs/models/ScoreCommentContext.md deleted file mode 100644 index 0afc524..0000000 --- a/docs/models/ScoreCommentContext.md +++ /dev/null @@ -1,38 +0,0 @@ -# flat_api.model.score_comment_context.ScoreCommentContext - -The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[measureUuids](#measureUuids)** | list, tuple, | tuple, | The list of measure UUIds | -**partUuid** | str, | str, | The unique identifier (UUID) of the score part | -**stopDpq** | decimal.Decimal, int, float, | decimal.Decimal, | | -**startTimePos** | decimal.Decimal, int, float, | decimal.Decimal, | | -**startDpq** | decimal.Decimal, int, float, | decimal.Decimal, | | -**stopTimePos** | decimal.Decimal, int, float, | decimal.Decimal, | | -**staffIdx** | decimal.Decimal, int, float, | decimal.Decimal, | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] -**staffUuid** | str, | str, | The unique identififer (UUID) of the staff | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# measureUuids - -The list of measure UUIds - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of measure UUIds | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCommentCreation.md b/docs/models/ScoreCommentCreation.md deleted file mode 100644 index 94e3b2b..0000000 --- a/docs/models/ScoreCommentCreation.md +++ /dev/null @@ -1,36 +0,0 @@ -# flat_api.model.score_comment_creation.ScoreCommentCreation - -Creation of a comment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a comment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | -**revision** | str, | str, | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**rawComment** | str, | str, | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] -**[mentions](#mentions)** | list, tuple, | tuple, | The list of user identifiers mentioned in this comment | [optional] -**replyTo** | str, | str, | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# mentions - -The list of user identifiers mentioned in this comment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of user identifiers mentioned in this comment | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCommentUpdate.md b/docs/models/ScoreCommentUpdate.md deleted file mode 100644 index a1c7eb5..0000000 --- a/docs/models/ScoreCommentUpdate.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.score_comment_update.ScoreCommentUpdate - -Update of a comment - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Update of a comment | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**revision** | str, | str, | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**comment** | str, | str, | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] -**rawComment** | str, | str, | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] -**context** | [**ScoreCommentContext**](ScoreCommentContext.md) | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCommentsCounts.md b/docs/models/ScoreCommentsCounts.md deleted file mode 100644 index dffb02d..0000000 --- a/docs/models/ScoreCommentsCounts.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.score_comments_counts.ScoreCommentsCounts - -A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of comments added to the score | [optional] -**unique** | decimal.Decimal, int, float, | decimal.Decimal, | The unique (1/user) number of comments added to the score | [optional] -**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly unique number of comments added to the score | [optional] -**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly unique number of comments added to the score | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCreation.md b/docs/models/ScoreCreation.md deleted file mode 100644 index 6158acd..0000000 --- a/docs/models/ScoreCreation.md +++ /dev/null @@ -1,108 +0,0 @@ -# flat_api.model.score_creation.ScoreCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**collection** | str, | str, | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] -**googleDriveFolder** | str, | str, | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] -**[builderData](#builderData)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**filename** | str, | str, | If this is an imported file, its filename | [optional] -**data** | str, | str, | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] -**dataEncoding** | str, | str, | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] must be one of ["base64", ] -**source** | [**ScoreSource**](ScoreSource.md) | [**ScoreSource**](ScoreSource.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# builderData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[scoreData](#scoreData)** | dict, frozendict.frozendict, | frozendict.frozendict, | | -**[layoutData](#layoutData)** | dict, frozendict.frozendict, | frozendict.frozendict, | Control the appearance of the score. If missing, default values are used. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# scoreData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[instruments](#instruments)** | list, tuple, | tuple, | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | -**useTabStaff** | bool, | BoolClass, | true if the TAB staff is displayed with fretted instruments | [optional] -**useChordGrid** | bool, | BoolClass, | true if the chord grid must be displayed with fretted instruments | [optional] -**fifths** | decimal.Decimal, int, float, | decimal.Decimal, | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] -**nbBeats** | decimal.Decimal, int, float, | decimal.Decimal, | The number of beats in the measure | [optional] -**beatType** | decimal.Decimal, int, float, | decimal.Decimal, | The duration of a beat in the measure | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# instruments - -The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**instrument** | str, | str, | The identifier of the instrument (e.g. `piano`, `trumpet`) | -**group** | str, | str, | The of the instrument group (e.g. `keyboards`, `brass`) | -**longName** | str, | str, | The full name of the instrument | [optional] -**shortName** | str, | str, | The abbreviation of the name of the instrument | [optional] -**hasQuarterTone** | bool, | BoolClass, | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# layoutData - -Control the appearance of the score. If missing, default values are used. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Control the appearance of the score. If missing, default values are used. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**notesSpacingCoeff** | decimal.Decimal, int, float, | decimal.Decimal, | A float value >= 1 that controls the spacing between notes. | [optional] -**lengthUnit** | str, | str, | The unit to use for layout customizations | [optional] must be one of ["cm", "inch", ] if omitted the server will use the default value of "cm" -**pageHeight** | decimal.Decimal, int, float, | decimal.Decimal, | The height of the page in chosen unit (`lengthUnit`). | [optional] -**pageWidth** | decimal.Decimal, int, float, | decimal.Decimal, | The width of the page in chosen unit (`lengthUnit`). | [optional] -**pageMarginTop** | decimal.Decimal, int, float, | decimal.Decimal, | The top margin of the page in chosen unit (`lengthUnit`). | [optional] -**pageMarginBottom** | decimal.Decimal, int, float, | decimal.Decimal, | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] -**pageMarginLeft** | decimal.Decimal, int, float, | decimal.Decimal, | The left margin of the page in chosen unit (`lengthUnit`). | [optional] -**pageMarginRight** | decimal.Decimal, int, float, | decimal.Decimal, | The right margin of the page in chosen unit (`lengthUnit`). | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreCreationType.md b/docs/models/ScoreCreationType.md deleted file mode 100644 index b4df61d..0000000 --- a/docs/models/ScoreCreationType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.score_creation_type.ScoreCreationType - -The type of creation (an orginal, an arrangement) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The type of creation (an orginal, an arrangement) | must be one of ["original", "arrangement", "other", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreDetails.md b/docs/models/ScoreDetails.md deleted file mode 100644 index c4b1a6a..0000000 --- a/docs/models/ScoreDetails.md +++ /dev/null @@ -1,117 +0,0 @@ -# flat_api.model.score_details.ScoreDetails - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the score | [optional] -**sharingKey** | str, | str, | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] -**title** | str, | str, | The title of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**htmlUrl** | str, | str, | The url where the score can be viewed in a web browser | [optional] -**subtitle** | str, | str, | Subtitle of the score | [optional] -**lyricist** | str, | str, | Lyricist of the score | [optional] -**arranger** | str, | str, | Arranger of the score | [optional] -**composer** | str, | str, | Composer of the score | [optional] -**description** | str, | str, | Description of the creation | [optional] -**[tags](#tags)** | list, tuple, | tuple, | Tags describing the score | [optional] -**creationType** | [**ScoreCreationType**](ScoreCreationType.md) | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] -**license** | [**ScoreLicense**](ScoreLicense.md) | [**ScoreLicense**](ScoreLicense.md) | | [optional] -**licenseText** | str, | str, | Additional license text written on the exported/printed score | [optional] -**durationTime** | decimal.Decimal, int, float, | decimal.Decimal, | In seconds, an approximative duration of the score | [optional] -**numberMeasures** | decimal.Decimal, int, | decimal.Decimal, | The number of measures in the score | [optional] -**mainTempoQpm** | decimal.Decimal, int, float, | decimal.Decimal, | The main tempo of the score (in QPM) | [optional] -**rights** | [**ResourceRights**](ResourceRights.md) | [**ResourceRights**](ResourceRights.md) | | [optional] -**[collaborators](#collaborators)** | list, tuple, | tuple, | The list of the collaborators of the score | [optional] -**creationDate** | str, datetime, | str, | The date when the score was created | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The date of the last revision of the score | [optional] value must conform to RFC-3339 date-time -**publicationDate** | str, datetime, | str, | The date when the score was published on Flat | [optional] value must conform to RFC-3339 date-time -**organization** | str, | str, | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] -**parentScore** | str, | str, | If the score has been forked, the unique identifier of the parent score. | [optional] -**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**[samples](#samples)** | list, tuple, | tuple, | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] -**googleDriveFileId** | str, | str, | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] -**likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] -**comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] -**views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] -**plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] -**[collections](#collections)** | list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# tags - -Tags describing the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Tags describing the score | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# collaborators - -The list of the collaborators of the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The list of the collaborators of the score | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | [**ResourceCollaborator**](ResourceCollaborator.md) | | - -# instruments - -An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# samples - -An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# collections - -The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreFork.md b/docs/models/ScoreFork.md deleted file mode 100644 index b891f5d..0000000 --- a/docs/models/ScoreFork.md +++ /dev/null @@ -1,18 +0,0 @@ -# flat_api.model.score_fork.ScoreFork - -Options to fork the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Options to fork the score | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**collection** | None, str, | NoneClass, str, | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] if omitted the server will use the default value of "root" -**keepOriginalTitle** | bool, | BoolClass, | Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreLicense.md b/docs/models/ScoreLicense.md deleted file mode 100644 index b2c6ac1..0000000 --- a/docs/models/ScoreLicense.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.score_license.ScoreLicense - -License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ | must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreLikesCounts.md b/docs/models/ScoreLikesCounts.md deleted file mode 100644 index a5cf6d9..0000000 --- a/docs/models/ScoreLikesCounts.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.score_likes_counts.ScoreLikesCounts - -A computed version of the weekly, monthly and total of number of likes for a score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the weekly, monthly and total of number of likes for a score | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of likes of the score | [optional] -**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The number of new likes during the last week | [optional] -**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The number of new likes during the last month | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreModification.md b/docs/models/ScoreModification.md deleted file mode 100644 index 0aa29fd..0000000 --- a/docs/models/ScoreModification.md +++ /dev/null @@ -1,42 +0,0 @@ -# flat_api.model.score_modification.ScoreModification - -Edit the score metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Edit the score metadata | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | The title of the score | [optional] -**subtitle** | str, | str, | The subtitle of the score | [optional] -**composer** | str, | str, | The composer of the score | [optional] -**lyricist** | str, | str, | The lyricist of the score | [optional] -**arranger** | str, | str, | The arranger of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**sharingKey** | str, | str, | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] -**description** | str, | str, | Description of the creation | [optional] -**[tags](#tags)** | list, tuple, | tuple, | Tags describing the score | [optional] -**creationType** | [**ScoreCreationType**](ScoreCreationType.md) | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] -**license** | [**ScoreLicense**](ScoreLicense.md) | [**ScoreLicense**](ScoreLicense.md) | | [optional] -**licenseText** | str, | str, | The rights info written on the score | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# tags - -Tags describing the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Tags describing the score | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScorePlaysCounts.md b/docs/models/ScorePlaysCounts.md deleted file mode 100644 index 3a65f19..0000000 --- a/docs/models/ScorePlaysCounts.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.score_plays_counts.ScorePlaysCounts - -A computed version of the total, weekly, and monthly number of plays of the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, weekly, and monthly number of plays of the score | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of plays of the score | [optional] -**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly number of plays of the score | [optional] -**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly number of plays of the score | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScorePrivacy.md b/docs/models/ScorePrivacy.md deleted file mode 100644 index 579a125..0000000 --- a/docs/models/ScorePrivacy.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.score_privacy.ScorePrivacy - -The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). | must be one of ["public", "private", "organizationPublic", "privateLink", ] if omitted the server will use the default value of "private" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreRevision.md b/docs/models/ScoreRevision.md deleted file mode 100644 index e0317cb..0000000 --- a/docs/models/ScoreRevision.md +++ /dev/null @@ -1,36 +0,0 @@ -# flat_api.model.score_revision.ScoreRevision - -A score revision metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A score revision metadata | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the revision. | [optional] -**user** | str, | str, | The user identifier who created the revision | [optional] -**[collaborators](#collaborators)** | list, tuple, | tuple, | | [optional] -**creationDate** | str, datetime, | str, | The date when this revision was created | [optional] value must conform to RFC-3339 date-time -**event** | str, | str, | The last event (action id) of the revision | [optional] -**description** | str, | str, | A description associated to the revision | [optional] -**autosave** | bool, | BoolClass, | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] -**statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# collaborators - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | The list of user identifier or collaborators who worked on this revision. This is list is built from the history of the revision specified during the creation of the revision. | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreRevisionCreation.md b/docs/models/ScoreRevisionCreation.md deleted file mode 100644 index 2ce91e5..0000000 --- a/docs/models/ScoreRevisionCreation.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.score_revision_creation.ScoreRevisionCreation - -A new created revision - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A new created revision | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**data** | str, | str, | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | -**dataEncoding** | str, | str, | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] must be one of ["base64", ] -**autosave** | bool, | BoolClass, | Must be set to `true` if the revision was created automatically. | [optional] -**description** | str, | str, | A description associated to the revision | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreRevisionStatistics.md b/docs/models/ScoreRevisionStatistics.md deleted file mode 100644 index fbfcdc9..0000000 --- a/docs/models/ScoreRevisionStatistics.md +++ /dev/null @@ -1,20 +0,0 @@ -# flat_api.model.score_revision_statistics.ScoreRevisionStatistics - -The statistics related to the score revision (additions and deletions) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | The statistics related to the score revision (additions and deletions) | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**additions** | decimal.Decimal, int, float, | decimal.Decimal, | The number of additions operations in the last revision | [optional] -**deletions** | decimal.Decimal, int, float, | decimal.Decimal, | The number of deletions operations in the last revision | [optional] -**startDate** | str, datetime, | str, | The date of the first action included in this revision | [optional] value must conform to RFC-3339 date-time -**endDate** | str, datetime, | str, | The date of the latest action included in this revision | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreSource.md b/docs/models/ScoreSource.md deleted file mode 100644 index 1491166..0000000 --- a/docs/models/ScoreSource.md +++ /dev/null @@ -1,15 +0,0 @@ -# flat_api.model.score_source.ScoreSource - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**googleDrive** | str, | str, | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrack.md b/docs/models/ScoreTrack.md deleted file mode 100644 index 06ccb57..0000000 --- a/docs/models/ScoreTrack.md +++ /dev/null @@ -1,40 +0,0 @@ -# flat_api.model.score_track.ScoreTrack - -An audio track for a score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | An audio track for a score | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The unique identifier of the score track | [optional] -**title** | str, | str, | Title of the track | [optional] -**score** | str, | str, | The unique identifier of the score | [optional] -**creator** | str, | str, | The unique identifier of the track creator | [optional] -**creationDate** | str, datetime, | str, | The creation date of the track | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The modification date of the track | [optional] value must conform to RFC-3339 date-time -**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**type** | [**ScoreTrackType**](ScoreTrackType.md) | [**ScoreTrackType**](ScoreTrackType.md) | | [optional] -**url** | str, | str, | The URL of the track | [optional] -**mediaId** | str, | str, | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] -**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# synchronizationPoints - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrackCreation.md b/docs/models/ScoreTrackCreation.md deleted file mode 100644 index adbc34d..0000000 --- a/docs/models/ScoreTrackCreation.md +++ /dev/null @@ -1,33 +0,0 @@ -# flat_api.model.score_track_creation.ScoreTrackCreation - -Creation of a new track. This one must contain the URL of the track or the corresponding file - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Creation of a new track. This one must contain the URL of the track or the corresponding file | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | Title of the track | [optional] -**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**url** | str, | str, | The URL of the track | [optional] -**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# synchronizationPoints - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrackPoint.md b/docs/models/ScoreTrackPoint.md deleted file mode 100644 index 9e2e020..0000000 --- a/docs/models/ScoreTrackPoint.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.score_track_point.ScoreTrackPoint - -A track synchronization point - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A track synchronization point | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**time** | decimal.Decimal, int, float, | decimal.Decimal, | The corresponding time in seconds | -**type** | str, | str, | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | must be one of ["measure", "end", ] -**measureUuid** | str, uuid.UUID, | str, | The measure unique identifier | [optional] value must be a uuid -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrackState.md b/docs/models/ScoreTrackState.md deleted file mode 100644 index 56e43b2..0000000 --- a/docs/models/ScoreTrackState.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.score_track_state.ScoreTrackState - -State of the track - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | State of the track | must be one of ["draft", "completed", "deleted", ] if omitted the server will use the default value of "draft" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrackType.md b/docs/models/ScoreTrackType.md deleted file mode 100644 index 7ce08d8..0000000 --- a/docs/models/ScoreTrackType.md +++ /dev/null @@ -1,11 +0,0 @@ -# flat_api.model.score_track_type.ScoreTrackType - -The type of an audio track - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | The type of an audio track | must be one of ["audio", "soundcloud", "youtube", "vimeo", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreTrackUpdate.md b/docs/models/ScoreTrackUpdate.md deleted file mode 100644 index bffbb87..0000000 --- a/docs/models/ScoreTrackUpdate.md +++ /dev/null @@ -1,32 +0,0 @@ -# flat_api.model.score_track_update.ScoreTrackUpdate - -Update an existing track. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Update an existing track. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**title** | str, | str, | Title of the track | [optional] -**default** | bool, | BoolClass, | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**[synchronizationPoints](#synchronizationPoints)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# synchronizationPoints - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | [**ScoreTrackPoint**](ScoreTrackPoint.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/ScoreViewsCounts.md b/docs/models/ScoreViewsCounts.md deleted file mode 100644 index 449b75b..0000000 --- a/docs/models/ScoreViewsCounts.md +++ /dev/null @@ -1,19 +0,0 @@ -# flat_api.model.score_views_counts.ScoreViewsCounts - -A computed version of the total, weekly, and monthly number of views of the score - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A computed version of the total, weekly, and monthly number of views of the score | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**total** | decimal.Decimal, int, float, | decimal.Decimal, | The total number of views of the score | [optional] -**weekly** | decimal.Decimal, int, float, | decimal.Decimal, | The weekly number of views of the score | [optional] -**monthly** | decimal.Decimal, int, float, | decimal.Decimal, | The monthly number of views of the score | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/Task.md b/docs/models/Task.md deleted file mode 100644 index a1ac7fe..0000000 --- a/docs/models/Task.md +++ /dev/null @@ -1,73 +0,0 @@ -# flat_api.model.task.Task - -An asynchronous task - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | An asynchronous task | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Unique identifier of the task | [optional] -**type** | str, | str, | Type of the task (e.g. audio-export) | [optional] -**state** | str, | str, | State of the Task | [optional] must be one of ["created", "doing", "done", "canceled", "error", ] -**format** | str, | str, | For files processing, the file format (e.g. `mp3`, `wav`) | [optional] -**score** | str, | str, | The score unique identifier for tasks related to scores | [optional] -**[progress](#progress)** | dict, frozendict.frozendict, | frozendict.frozendict, | Details about the task progression | [optional] -**creationDate** | str, datetime, | str, | The creation date of the task | [optional] value must conform to RFC-3339 date-time -**modificationDate** | str, datetime, | str, | The last modification date of the task | [optional] value must conform to RFC-3339 date-time -**doneDate** | str, datetime, | str, | The date when the task has been completed | [optional] value must conform to RFC-3339 date-time -**[result](#result)** | dict, frozendict.frozendict, | frozendict.frozendict, | Optional result information about this task | [optional] -**[errorHistory](#errorHistory)** | list, tuple, | tuple, | If any errors happened when processing this task, the list of errors identifiers | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# progress - -Details about the task progression - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Details about the task progression | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**percent** | decimal.Decimal, int, float, | decimal.Decimal, | Percent of the task progression | [optional] -**text** | str, | str, | Text details of the task progress | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# result - -Optional result information about this task - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Optional result information about this task | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**url** | str, | str, | URL returned by the task worker | [optional] -**error** | str, | str, | Error returned by task worker | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# errorHistory - -If any errors happened when processing this task, the list of errors identifiers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | If any errors happened when processing this task, the list of errors identifiers | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/TaskExportOptions.md b/docs/models/TaskExportOptions.md deleted file mode 100644 index 8ad7fa1..0000000 --- a/docs/models/TaskExportOptions.md +++ /dev/null @@ -1,31 +0,0 @@ -# flat_api.model.task_export_options.TaskExportOptions - -Options for the requested export - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Options for the requested export | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[parts](#parts)** | list, tuple, | tuple, | A list of parts to specifically export | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# parts - -A list of parts to specifically export - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | A list of parts to specifically export | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserAdminUpdate.md b/docs/models/UserAdminUpdate.md deleted file mode 100644 index 502c94e..0000000 --- a/docs/models/UserAdminUpdate.md +++ /dev/null @@ -1,22 +0,0 @@ -# flat_api.model.user_admin_update.UserAdminUpdate - -User update as an organization admin - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | User update as an organization admin | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**password** | str, | str, | Password of the account | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**username** | str, | str, | Username of the account | [optional] -**firstname** | str, | str, | First name of the user | [optional] -**lastname** | str, | str, | Last name of the user | [optional] -**email** | str, | str, | Email of the account | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserAzureDetails.md b/docs/models/UserAzureDetails.md deleted file mode 100644 index 90f4668..0000000 --- a/docs/models/UserAzureDetails.md +++ /dev/null @@ -1,17 +0,0 @@ -# flat_api.model.user_azure_details.UserAzureDetails - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**oid** | str, | str, | User object identifier on Azure AD | [optional] -**hd** | str, | str, | User tenant (domain name) | [optional] -**preferredUsername** | str, | str, | User Preferred Username (UPN), i.e. the main email of the user | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserCommunityProfileLinks.md b/docs/models/UserCommunityProfileLinks.md deleted file mode 100644 index 4a119e4..0000000 --- a/docs/models/UserCommunityProfileLinks.md +++ /dev/null @@ -1,22 +0,0 @@ -# flat_api.model.user_community_profile_links.UserCommunityProfileLinks - -Social networks links - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Social networks links | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**spotifyUrl** | None, str, | NoneClass, str, | Spotify Profile URL | [optional] -**youtubeUrl** | None, str, | NoneClass, str, | YouTube channel URL | [optional] -**soundcloudUrl** | None, str, | NoneClass, str, | SoundCloud Profile URL | [optional] -**tiktokUrl** | None, str, | NoneClass, str, | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] -**instagramUrl** | None, str, | NoneClass, str, | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] -**websiteUrl** | None, str, | NoneClass, str, | Personnal website URL | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserCreation.md b/docs/models/UserCreation.md deleted file mode 100644 index 1bdf1ce..0000000 --- a/docs/models/UserCreation.md +++ /dev/null @@ -1,23 +0,0 @@ -# flat_api.model.user_creation.UserCreation - -User creation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | User creation | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**password** | str, | str, | Password of the new account | -**username** | str, | str, | Username of the new account | -**firstname** | str, | str, | First name of the user | [optional] -**lastname** | str, | str, | Last name of the user | [optional] -**email** | str, | str, | Email of the new account | [optional] -**locale** | [**FlatLocales**](FlatLocales.md) | [**FlatLocales**](FlatLocales.md) | | [optional] -**role** | str, | str, | Role of the new account | [optional] must be one of ["user", "teacher", "admin", ] if omitted the server will use the default value of "user" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserDetails.md b/docs/models/UserDetails.md deleted file mode 100644 index d127ad3..0000000 --- a/docs/models/UserDetails.md +++ /dev/null @@ -1,85 +0,0 @@ -# flat_api.model.user_details.UserDetails - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | Identifier of the user | [optional] -**type** | str, | str, | The type of account | [optional] must be one of ["user", "guest", ] -**username** | str, | str, | The user name (unique for the organization) | [optional] -**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**firstname** | str, | str, | Firstname of the user (for education users) | [optional] -**lastname** | str, | str, | Lastname of the user (for education users) | [optional] -**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] -**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] -**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] -**organization** | str, | str, | Organization ID (for Edu users only) | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] -**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] -**bio** | str, | str, | User's biography | [optional] -**registrationDate** | str, datetime, | str, | Date the user signed up | [optional] value must conform to RFC-3339 date-time -**likedScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of the scores liked by the user | [optional] -**followersCount** | decimal.Decimal, int, | decimal.Decimal, | Number of followers the user have | [optional] -**followingCount** | decimal.Decimal, int, | decimal.Decimal, | Number of people the user follow | [optional] -**ownedPublicScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of public scores the user have | [optional] -**coverPicture** | str, | str, | Cover picture (backgroud) for the profile | [optional] -**profileTheme** | str, | str, | Theme (background) for the profile | [optional] -**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] -**azureDetails** | [**UserAzureDetails**](UserAzureDetails.md) | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] -**privateProfile** | bool, | BoolClass, | Tell either this user profile is private or not (individual accounts only) | [optional] -**locale** | [**FlatLocales**](FlatLocales.md) | [**FlatLocales**](FlatLocales.md) | | [optional] -**[groups](#groups)** | list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] -**pictureFile** | None, str, | NoneClass, str, | The ID of the user profile picture | [optional] -**coverPictureFile** | None, str, | NoneClass, str, | The ID of the user profile cover picture | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# badges - -List of badges for the user profile - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of badges for the user profile | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | - -# instruments - -An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# groups - -For Flat for Education accounts, list of Group identifiers the user is part of. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Unique group identifier | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserDetailsAdmin.md b/docs/models/UserDetailsAdmin.md deleted file mode 100644 index e422da0..0000000 --- a/docs/models/UserDetailsAdmin.md +++ /dev/null @@ -1,78 +0,0 @@ -# flat_api.model.user_details_admin.UserDetailsAdmin - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The user unique identifier | [optional] -**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] -**username** | str, | str, | The user name (unique for the organization) | [optional] -**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**firstname** | str, | str, | Firstname of the user (for education users) | [optional] -**lastname** | str, | str, | Lastname of the user (for education users) | [optional] -**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] -**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] -**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] -**organization** | str, | str, | Organization ID (for Edu users only) | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] -**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] -**email** | str, | str, | Email of the user | [optional] -**lastActivityDate** | str, datetime, | str, | Date of the last user activity | [optional] value must conform to RFC-3339 date-time -**[license](#license)** | dict, frozendict.frozendict, | frozendict.frozendict, | Current active license of the user | [optional] -**[groups](#groups)** | list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# badges - -List of badges for the user profile - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of badges for the user profile | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | - -# license - -Current active license of the user - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Current active license of the user | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | ID of the current license | [optional] -**expirationDate** | str, datetime, | str, | Date when the license expires | [optional] value must conform to RFC-3339 date-time -**source** | [**LicenseSources**](LicenseSources.md) | [**LicenseSources**](LicenseSources.md) | | [optional] -**mode** | [**LicenseMode**](LicenseMode.md) | [**LicenseMode**](LicenseMode.md) | | [optional] -**active** | bool, | BoolClass, | ID of the current license | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# groups - -For Flat for Education accounts, list of Group identifiers the user is part of. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | For Flat for Education accounts, list of Group identifiers the user is part of. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Unique group identifier | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserPublic.md b/docs/models/UserPublic.md deleted file mode 100644 index 09bdded..0000000 --- a/docs/models/UserPublic.md +++ /dev/null @@ -1,65 +0,0 @@ -# flat_api.model.user_public.UserPublic - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The user unique identifier | [optional] -**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] -**username** | str, | str, | The user name (unique for the organization) | [optional] -**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**firstname** | str, | str, | Firstname of the user (for education users) | [optional] -**lastname** | str, | str, | Lastname of the user (for education users) | [optional] -**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] -**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] -**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] -**organization** | str, | str, | Organization ID (for Edu users only) | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] -**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] -**bio** | str, | str, | User's biography | [optional] -**registrationDate** | str, datetime, | str, | Date the user signed up | [optional] value must conform to RFC-3339 date-time -**likedScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of the scores liked by the user | [optional] -**followersCount** | decimal.Decimal, int, | decimal.Decimal, | Number of followers the user have | [optional] -**followingCount** | decimal.Decimal, int, | decimal.Decimal, | Number of people the user follow | [optional] -**ownedPublicScoresCount** | decimal.Decimal, int, | decimal.Decimal, | Number of public scores the user have | [optional] -**coverPicture** | str, | str, | Cover picture (backgroud) for the profile | [optional] -**profileTheme** | str, | str, | Theme (background) for the profile | [optional] -**[instruments](#instruments)** | list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# badges - -List of badges for the user profile - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of badges for the user profile | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | - -# instruments - -An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserPublicSummary.md b/docs/models/UserPublicSummary.md deleted file mode 100644 index a72988d..0000000 --- a/docs/models/UserPublicSummary.md +++ /dev/null @@ -1,41 +0,0 @@ -# flat_api.model.user_public_summary.UserPublicSummary - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The user unique identifier | [optional] -**type** | str, | str, | The type of user account | [optional] must be one of ["user", "guest", ] -**username** | str, | str, | The user name (unique for the organization) | [optional] -**printableName** | str, | str, | The name that can be directly printed (name, firstname & lastname, or username) | [optional] -**firstname** | str, | str, | Firstname of the user (for education users) | [optional] -**lastname** | str, | str, | Lastname of the user (for education users) | [optional] -**name** | str, | str, | A displayable name for the user (for consumer users) | [optional] -**picture** | None, str, | NoneClass, str, | The URL of the picture to display | [optional] -**[badges](#badges)** | list, tuple, | tuple, | List of badges for the user profile | [optional] -**organization** | str, | str, | Organization ID (for Edu users only) | [optional] -**organizationRole** | [**OrganizationRoles**](OrganizationRoles.md) | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**classRole** | [**ClassRoles**](ClassRoles.md) | [**ClassRoles**](ClassRoles.md) | | [optional] -**htmlUrl** | str, | str, | Link to user profile (for Indiv. users only) | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# badges - -List of badges for the user profile - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of badges for the user profile | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Badge name, e.g. `power`, `staff`, `composerOfTheMonth` | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserSigninLink.md b/docs/models/UserSigninLink.md deleted file mode 100644 index ad64934..0000000 --- a/docs/models/UserSigninLink.md +++ /dev/null @@ -1,16 +0,0 @@ -# flat_api.model.user_signin_link.UserSigninLink - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**url** | str, | str, | URL to use to sign in to this account | [optional] -**expirationDate** | str, datetime, | str, | Date when the link expires | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/models/UserSigninLinkCreation.md b/docs/models/UserSigninLinkCreation.md deleted file mode 100644 index 11e8611..0000000 --- a/docs/models/UserSigninLinkCreation.md +++ /dev/null @@ -1,15 +0,0 @@ -# flat_api.model.user_signin_link_creation.UserSigninLinkCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**destinationPath** | str, | str, | Path to redirect to after signin | [optional] if omitted the server will use the default value of "/" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 2ee8c17..80c8be8 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -1,5 +1,3 @@ -# coding: utf-8 - # flake8: noqa """ @@ -12,6 +10,7 @@ Generated by: https://openapi-generator.tech """ + __version__ = "0.9.0" # import ApiClient diff --git a/flat_api/api/__init__.py b/flat_api/api/__init__.py new file mode 100644 index 0000000..c5b7882 --- /dev/null +++ b/flat_api/api/__init__.py @@ -0,0 +1,3 @@ +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from flat_api.apis import AccountApi diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py new file mode 100644 index 0000000..de01ee2 --- /dev/null +++ b/flat_api/api/account_api.py @@ -0,0 +1,168 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_details import UserDetails + + +class AccountApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_authenticated_user_endpoint = _Endpoint( + settings={ + 'response_type': (UserDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/me', + 'operation_id': 'get_authenticated_user', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'only_id', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'only_id': + (bool,), + }, + 'attribute_map': { + 'only_id': 'onlyId', + }, + 'location_map': { + 'only_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_authenticated_user( + self, + **kwargs + ): + """Get current user account # noqa: E501 + + Get details about the current authenticated User. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_authenticated_user(async_req=True) + >>> result = thread.get() + + + Keyword Args: + only_id (bool): Only return the user id. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_authenticated_user_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py new file mode 100644 index 0000000..bc954e2 --- /dev/null +++ b/flat_api/api/class_api.py @@ -0,0 +1,4421 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.assignment import Assignment +from flat_api.model.assignment_copy import AssignmentCopy +from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from flat_api.model.class_creation import ClassCreation +from flat_api.model.class_details import ClassDetails +from flat_api.model.class_update import ClassUpdate +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.user_details import UserDetails + + +class ClassApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.activate_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/activate', + 'operation_id': 'activate_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.add_class_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/users/{user}', + 'operation_id': 'add_class_user', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'user', + ], + 'required': [ + '_class', + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'user': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'user': 'user', + }, + 'location_map': { + '_class': 'path', + 'user': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.archive_assignment_endpoint = _Endpoint( + settings={ + 'response_type': (Assignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/archive', + 'operation_id': 'archive_assignment', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + ], + 'required': [ + '_class', + 'assignment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.archive_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/archive', + 'operation_id': 'archive_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.copy_assignment_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentCopyResponse,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/copy', + 'operation_id': 'copy_assignment', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'body', + ], + 'required': [ + '_class', + 'assignment', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'body': + (AssignmentCopy,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes', + 'operation_id': 'create_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [ + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (ClassCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_class_assignment_endpoint = _Endpoint( + settings={ + 'response_type': (Assignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments', + 'operation_id': 'create_class_assignment', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'body', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'body': + (ClassAssignmentUpdate,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_submission_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmission,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions', + 'operation_id': 'create_submission', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'body', + ], + 'required': [ + '_class', + 'assignment', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'body': + (AssignmentSubmissionUpdate,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_test_student_account_endpoint = _Endpoint( + settings={ + 'response_type': (UserDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/testStudent', + 'operation_id': 'create_test_student_account', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'reset', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'reset': + (bool,), + }, + 'attribute_map': { + '_class': 'class', + 'reset': 'reset', + }, + 'location_map': { + '_class': 'path', + 'reset': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_class_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/users/{user}', + 'operation_id': 'delete_class_user', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'user', + ], + 'required': [ + '_class', + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'user': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'user': 'user', + }, + 'location_map': { + '_class': 'path', + 'user': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_submission_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmission,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', + 'operation_id': 'delete_submission', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_submission_comment_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + 'operation_id': 'delete_submission_comment', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + 'comment', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + 'comment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + 'comment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + 'comment': 'comment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + 'comment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.edit_submission_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmission,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', + 'operation_id': 'edit_submission', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + 'body', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + 'body': + (AssignmentSubmissionUpdate,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.enroll_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/enroll/{enrollmentCode}', + 'operation_id': 'enroll_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'enrollment_code', + ], + 'required': [ + 'enrollment_code', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'enrollment_code': + (str,), + }, + 'attribute_map': { + 'enrollment_code': 'enrollmentCode', + }, + 'location_map': { + 'enrollment_code': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.export_submissions_reviews_as_csv_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/csv', + 'operation_id': 'export_submissions_reviews_as_csv', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + ], + 'required': [ + '_class', + 'assignment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'text/csv' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.export_submissions_reviews_as_excel_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/excel', + 'operation_id': 'export_submissions_reviews_as_excel', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + ], + 'required': [ + '_class', + 'assignment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}', + 'operation_id': 'get_class', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_submissions_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmission],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/submissions', + 'operation_id': 'get_score_submissions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_submission_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmission,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', + 'operation_id': 'get_submission', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_submission_comments_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmissionComment],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + 'operation_id': 'get_submission_comments', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_submission_history_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmissionHistory],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/history', + 'operation_id': 'get_submission_history', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_submissions_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmission],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions', + 'operation_id': 'get_submissions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + ], + 'required': [ + '_class', + 'assignment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_assignments_endpoint = _Endpoint( + settings={ + 'response_type': ([ClassAssignment],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments', + 'operation_id': 'list_assignments', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_class_student_submissions_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmission],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/students/{user}/submissions', + 'operation_id': 'list_class_student_submissions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'user', + ], + 'required': [ + '_class', + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'user': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'user': 'user', + }, + 'location_map': { + '_class': 'path', + 'user': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_classes_endpoint = _Endpoint( + settings={ + 'response_type': ([ClassDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes', + 'operation_id': 'list_classes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'state', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'state', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('state',): { + + "ACTIVE": "active", + "INACTIVE": "inactive", + "ARCHIVED": "archived" + }, + }, + 'openapi_types': { + 'state': + (str,), + }, + 'attribute_map': { + 'state': 'state', + }, + 'location_map': { + 'state': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.post_submission_comment_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmissionComment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + 'operation_id': 'post_submission_comment', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + 'assignment_submission_comment_creation', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + 'assignment_submission_comment_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + 'assignment_submission_comment_creation': + (AssignmentSubmissionCommentCreation,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + 'assignment_submission_comment_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.unarchive_assignment_endpoint = _Endpoint( + settings={ + 'response_type': (Assignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/archive', + 'operation_id': 'unarchive_assignment', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + ], + 'required': [ + '_class', + 'assignment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.unarchive_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/archive', + 'operation_id': 'unarchive_class', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}', + 'operation_id': 'update_class', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'body', + ], + 'required': [ + '_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'body': + (ClassUpdate,), + }, + 'attribute_map': { + '_class': 'class', + }, + 'location_map': { + '_class': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_submission_comment_endpoint = _Endpoint( + settings={ + 'response_type': (AssignmentSubmissionComment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + 'operation_id': 'update_submission_comment', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + '_class', + 'assignment', + 'submission', + 'comment', + 'assignment_submission_comment_creation', + ], + 'required': [ + '_class', + 'assignment', + 'submission', + 'comment', + 'assignment_submission_comment_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + '_class': + (str,), + 'assignment': + (str,), + 'submission': + (str,), + 'comment': + (str,), + 'assignment_submission_comment_creation': + (AssignmentSubmissionCommentCreation,), + }, + 'attribute_map': { + '_class': 'class', + 'assignment': 'assignment', + 'submission': 'submission', + 'comment': 'comment', + }, + 'location_map': { + '_class': 'path', + 'assignment': 'path', + 'submission': 'path', + 'comment': 'path', + 'assignment_submission_comment_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def activate_class( + self, + _class, + **kwargs + ): + """Activate the class # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.activate_class(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.activate_class_endpoint.call_with_http_info(**kwargs) + + def add_class_user( + self, + _class, + user, + **kwargs + ): + """Add a user to the class # noqa: E501 + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_class_user(_class, user, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + user (str): Unique identifier of the user + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['user'] = \ + user + return self.add_class_user_endpoint.call_with_http_info(**kwargs) + + def archive_assignment( + self, + _class, + assignment, + **kwargs + ): + """Archive the assignment # noqa: E501 + + Archive the assignment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.archive_assignment(_class, assignment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Assignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + return self.archive_assignment_endpoint.call_with_http_info(**kwargs) + + def archive_class( + self, + _class, + **kwargs + ): + """Archive the class # noqa: E501 + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.archive_class(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.archive_class_endpoint.call_with_http_info(**kwargs) + + def copy_assignment( + self, + _class, + assignment, + body, + **kwargs + ): + """Copy an assignment # noqa: E501 + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.copy_assignment(_class, assignment, body, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + body (AssignmentCopy): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentCopyResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['body'] = \ + body + return self.copy_assignment_endpoint.call_with_http_info(**kwargs) + + def create_class( + self, + body, + **kwargs + ): + """Create a new class # noqa: E501 + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_class(body, async_req=True) + >>> result = thread.get() + + Args: + body (ClassCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['body'] = \ + body + return self.create_class_endpoint.call_with_http_info(**kwargs) + + def create_class_assignment( + self, + _class, + **kwargs + ): + """Assignment creation # noqa: E501 + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_class_assignment(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + body (ClassAssignmentUpdate): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Assignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.create_class_assignment_endpoint.call_with_http_info(**kwargs) + + def create_submission( + self, + _class, + assignment, + body, + **kwargs + ): + """Create or edit a submission # noqa: E501 + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_submission(_class, assignment, body, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + body (AssignmentSubmissionUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmission + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['body'] = \ + body + return self.create_submission_endpoint.call_with_http_info(**kwargs) + + def create_test_student_account( + self, + _class, + **kwargs + ): + """Create a test student account # noqa: E501 + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_test_student_account(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + reset (bool): If true, the testing account will be re-created. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.create_test_student_account_endpoint.call_with_http_info(**kwargs) + + def delete_class_user( + self, + _class, + user, + **kwargs + ): + """Remove a user from the class # noqa: E501 + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_class_user(_class, user, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + user (str): Unique identifier of the user + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['user'] = \ + user + return self.delete_class_user_endpoint.call_with_http_info(**kwargs) + + def delete_submission( + self, + _class, + assignment, + submission, + **kwargs + ): + """Reset a submission # noqa: E501 + + Use this method as a teacher to reset a submission and allow student to start over the assignment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_submission(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmission + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + return self.delete_submission_endpoint.call_with_http_info(**kwargs) + + def delete_submission_comment( + self, + _class, + assignment, + submission, + comment, + **kwargs + ): + """Delete a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_submission_comment(_class, assignment, submission, comment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + comment (str): Unique identifier of the comment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + kwargs['comment'] = \ + comment + return self.delete_submission_comment_endpoint.call_with_http_info(**kwargs) + + def edit_submission( + self, + _class, + assignment, + submission, + body, + **kwargs + ): + """Edit a submission # noqa: E501 + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.edit_submission(_class, assignment, submission, body, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + body (AssignmentSubmissionUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmission + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + kwargs['body'] = \ + body + return self.edit_submission_endpoint.call_with_http_info(**kwargs) + + def enroll_class( + self, + enrollment_code, + **kwargs + ): + """Join a class # noqa: E501 + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enroll_class(enrollment_code, async_req=True) + >>> result = thread.get() + + Args: + enrollment_code (str): The enrollment code, available to the teacher in `ClassDetails` + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['enrollment_code'] = \ + enrollment_code + return self.enroll_class_endpoint.call_with_http_info(**kwargs) + + def export_submissions_reviews_as_csv( + self, + _class, + assignment, + **kwargs + ): + """CSV Grades exports # noqa: E501 + + Export list of submissions grades to a CSV file # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_submissions_reviews_as_csv(_class, assignment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + return self.export_submissions_reviews_as_csv_endpoint.call_with_http_info(**kwargs) + + def export_submissions_reviews_as_excel( + self, + _class, + assignment, + **kwargs + ): + """Excel Grades exports # noqa: E501 + + Export list of submissions grades to an Excel file # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.export_submissions_reviews_as_excel(_class, assignment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + return self.export_submissions_reviews_as_excel_endpoint.call_with_http_info(**kwargs) + + def get_class( + self, + _class, + **kwargs + ): + """Get the details of a single class # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_class(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.get_class_endpoint.call_with_http_info(**kwargs) + + def get_score_submissions( + self, + score, + **kwargs + ): + """List submissions related to the score # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_submissions(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmission] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_submissions_endpoint.call_with_http_info(**kwargs) + + def get_submission( + self, + _class, + assignment, + submission, + **kwargs + ): + """Get a student submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_submission(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmission + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + return self.get_submission_endpoint.call_with_http_info(**kwargs) + + def get_submission_comments( + self, + _class, + assignment, + submission, + **kwargs + ): + """List the feedback comments of a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_submission_comments(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmissionComment] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + return self.get_submission_comments_endpoint.call_with_http_info(**kwargs) + + def get_submission_history( + self, + _class, + assignment, + submission, + **kwargs + ): + """Get the history of the submission # noqa: E501 + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_submission_history(_class, assignment, submission, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmissionHistory] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + return self.get_submission_history_endpoint.call_with_http_info(**kwargs) + + def get_submissions( + self, + _class, + assignment, + **kwargs + ): + """List the students' submissions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_submissions(_class, assignment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmission] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + return self.get_submissions_endpoint.call_with_http_info(**kwargs) + + def list_assignments( + self, + _class, + **kwargs + ): + """Assignments listing # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_assignments(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ClassAssignment] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.list_assignments_endpoint.call_with_http_info(**kwargs) + + def list_class_student_submissions( + self, + _class, + user, + **kwargs + ): + """List the submissions for a student # noqa: E501 + + Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_class_student_submissions(_class, user, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + user (str): Unique identifier of the user + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmission] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['user'] = \ + user + return self.list_class_student_submissions_endpoint.call_with_http_info(**kwargs) + + def list_classes( + self, + **kwargs + ): + """List the classes available for the current user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_classes(async_req=True) + >>> result = thread.get() + + + Keyword Args: + state (str): Filter the classes by state. [optional] if omitted the server will use the default value of "active" + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ClassDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_classes_endpoint.call_with_http_info(**kwargs) + + def post_submission_comment( + self, + _class, + assignment, + submission, + assignment_submission_comment_creation, + **kwargs + ): + """Add a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + assignment_submission_comment_creation (AssignmentSubmissionCommentCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmissionComment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + kwargs['assignment_submission_comment_creation'] = \ + assignment_submission_comment_creation + return self.post_submission_comment_endpoint.call_with_http_info(**kwargs) + + def unarchive_assignment( + self, + _class, + assignment, + **kwargs + ): + """Unarchive the assignment. # noqa: E501 + + Mark the assignment as `active`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unarchive_assignment(_class, assignment, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Assignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + return self.unarchive_assignment_endpoint.call_with_http_info(**kwargs) + + def unarchive_class( + self, + _class, + **kwargs + ): + """Unarchive the class # noqa: E501 + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unarchive_class(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.unarchive_class_endpoint.call_with_http_info(**kwargs) + + def update_class( + self, + _class, + **kwargs + ): + """Update the class # noqa: E501 + + Update the meta information of the class # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_class(_class, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + + Keyword Args: + body (ClassUpdate): Details of the Class. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + return self.update_class_endpoint.call_with_http_info(**kwargs) + + def update_submission_comment( + self, + _class, + assignment, + submission, + comment, + assignment_submission_comment_creation, + **kwargs + ): + """Update a feedback comment to a submission # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) + >>> result = thread.get() + + Args: + _class (str): Unique identifier of the class + assignment (str): Unique identifier of the assignment + submission (str): Unique identifier of the submission + comment (str): Unique identifier of the comment + assignment_submission_comment_creation (AssignmentSubmissionCommentCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + AssignmentSubmissionComment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['_class'] = \ + _class + kwargs['assignment'] = \ + assignment + kwargs['submission'] = \ + submission + kwargs['comment'] = \ + comment + kwargs['assignment_submission_comment_creation'] = \ + assignment_submission_comment_creation + return self.update_submission_comment_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py new file mode 100644 index 0000000..eeb437f --- /dev/null +++ b/flat_api/api/collection_api.py @@ -0,0 +1,1390 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.collection import Collection +from flat_api.model.collection_creation import CollectionCreation +from flat_api.model.collection_modification import CollectionModification +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_details import ScoreDetails + + +class CollectionApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.add_score_to_collection_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}/scores/{score}', + 'operation_id': 'add_score_to_collection', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + 'score', + 'sharing_key', + ], + 'required': [ + 'collection', + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + 'score': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'collection': 'path', + 'score': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_collection_endpoint = _Endpoint( + settings={ + 'response_type': (Collection,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections', + 'operation_id': 'create_collection', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [ + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (CollectionCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_collection_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}', + 'operation_id': 'delete_collection', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + ], + 'required': [ + 'collection', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + }, + 'location_map': { + 'collection': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_score_from_collection_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}/scores/{score}', + 'operation_id': 'delete_score_from_collection', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + 'score', + 'sharing_key', + ], + 'required': [ + 'collection', + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + 'score': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'collection': 'path', + 'score': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.edit_collection_endpoint = _Endpoint( + settings={ + 'response_type': (Collection,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}', + 'operation_id': 'edit_collection', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + 'body', + ], + 'required': [ + 'collection', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + 'body': + (CollectionModification,), + }, + 'attribute_map': { + 'collection': 'collection', + }, + 'location_map': { + 'collection': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_collection_endpoint = _Endpoint( + settings={ + 'response_type': (Collection,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}', + 'operation_id': 'get_collection', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + 'sharing_key', + ], + 'required': [ + 'collection', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'collection': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_collection_scores_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}/scores', + 'operation_id': 'list_collection_scores', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + 'sharing_key', + 'sort', + 'direction', + 'limit', + 'next', + 'previous', + ], + 'required': [ + 'collection', + ], + 'nullable': [ + ], + 'enum': [ + 'sort', + 'direction', + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('sort',): { + + "CREATIONDATE": "creationDate", + "MODIFICATIONDATE": "modificationDate", + "TITLE": "title" + }, + ('direction',): { + + "ASC": "asc", + "DESC": "desc" + }, + }, + 'openapi_types': { + 'collection': + (str,), + 'sharing_key': + (str,), + 'sort': + (str,), + 'direction': + (str,), + 'limit': + (int,), + 'next': + (str,), + 'previous': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + 'sharing_key': 'sharingKey', + 'sort': 'sort', + 'direction': 'direction', + 'limit': 'limit', + 'next': 'next', + 'previous': 'previous', + }, + 'location_map': { + 'collection': 'path', + 'sharing_key': 'query', + 'sort': 'query', + 'direction': 'query', + 'limit': 'query', + 'next': 'query', + 'previous': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_collections_endpoint = _Endpoint( + settings={ + 'response_type': ([Collection],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections', + 'operation_id': 'list_collections', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'parent', + 'sort', + 'direction', + 'limit', + 'next', + 'previous', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'sort', + 'direction', + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('sort',): { + + "CREATIONDATE": "creationDate", + "TITLE": "title" + }, + ('direction',): { + + "ASC": "asc", + "DESC": "desc" + }, + }, + 'openapi_types': { + 'parent': + (str,), + 'sort': + (str,), + 'direction': + (str,), + 'limit': + (int,), + 'next': + (str,), + 'previous': + (str,), + }, + 'attribute_map': { + 'parent': 'parent', + 'sort': 'sort', + 'direction': 'direction', + 'limit': 'limit', + 'next': 'next', + 'previous': 'previous', + }, + 'location_map': { + 'parent': 'query', + 'sort': 'query', + 'direction': 'query', + 'limit': 'query', + 'next': 'query', + 'previous': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.untrash_collection_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/collections/{collection}/untrash', + 'operation_id': 'untrash_collection', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'collection', + ], + 'required': [ + 'collection', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'collection': + (str,), + }, + 'attribute_map': { + 'collection': 'collection', + }, + 'location_map': { + 'collection': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def add_score_to_collection( + self, + collection, + score, + **kwargs + ): + """Add a score to the collection # noqa: E501 + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_score_to_collection(collection, score, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + kwargs['score'] = \ + score + return self.add_score_to_collection_endpoint.call_with_http_info(**kwargs) + + def create_collection( + self, + body, + **kwargs + ): + """Create a new collection # noqa: E501 + + This method will create a new collection and add it to your `root` collection. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_collection(body, async_req=True) + >>> result = thread.get() + + Args: + body (CollectionCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Collection + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['body'] = \ + body + return self.create_collection_endpoint.call_with_http_info(**kwargs) + + def delete_collection( + self, + collection, + **kwargs + ): + """Delete the collection # noqa: E501 + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection(collection, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + return self.delete_collection_endpoint.call_with_http_info(**kwargs) + + def delete_score_from_collection( + self, + collection, + score, + **kwargs + ): + """Delete a score from the collection # noqa: E501 + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_score_from_collection(collection, score, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + kwargs['score'] = \ + score + return self.delete_score_from_collection_endpoint.call_with_http_info(**kwargs) + + def edit_collection( + self, + collection, + **kwargs + ): + """Update a collection's metadata # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.edit_collection(collection, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + Keyword Args: + body (CollectionModification): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Collection + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + return self.edit_collection_endpoint.call_with_http_info(**kwargs) + + def get_collection( + self, + collection, + **kwargs + ): + """Get collection details # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_collection(collection, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Collection + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + return self.get_collection_endpoint.call_with_http_info(**kwargs) + + def list_collection_scores( + self, + collection, + **kwargs + ): + """List the scores contained in a collection # noqa: E501 + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_collection_scores(collection, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + Keyword Args: + sharing_key (str): 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] + sort (str): Sort. [optional] + direction (str): Sort direction. [optional] + limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 + next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + return self.list_collection_scores_endpoint.call_with_http_info(**kwargs) + + def list_collections( + self, + **kwargs + ): + """List the collections # noqa: E501 + + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_collections(async_req=True) + >>> result = thread.get() + + + Keyword Args: + parent (str): List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. . [optional] if omitted the server will use the default value of "root" + sort (str): Sort. [optional] + direction (str): Sort direction. [optional] + limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 + next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [Collection] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_collections_endpoint.call_with_http_info(**kwargs) + + def untrash_collection( + self, + collection, + **kwargs + ): + """Untrash a collection # noqa: E501 + + This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.untrash_collection(collection, async_req=True) + >>> result = thread.get() + + Args: + collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['collection'] = \ + collection + return self.untrash_collection_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/edu_resources_api.py b/flat_api/api/edu_resources_api.py new file mode 100644 index 0000000..9b9a448 --- /dev/null +++ b/flat_api/api/edu_resources_api.py @@ -0,0 +1,1614 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.assignment import Assignment +from flat_api.model.assignment_update import AssignmentUpdate +from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.edu_library import EduLibrary +from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_copy import EduResourceCopy +from flat_api.model.edu_resource_creation import EduResourceCreation +from flat_api.model.edu_resource_move import EduResourceMove +from flat_api.model.edu_resource_update import EduResourceUpdate +from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.model.flat_error_response import FlatErrorResponse + + +class EduResourcesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.copy_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': (EduResource,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}/copy', + 'operation_id': 'copy_edu_resource', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + 'edu_resource_copy', + ], + 'required': [ + 'resource', + 'edu_resource_copy', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + 'edu_resource_copy': + (EduResourceCopy,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + 'edu_resource_copy': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.copy_edu_resource_to_demo_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassAssignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}/copyToDemoClass', + 'operation_id': 'copy_edu_resource_to_demo_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + ], + 'required': [ + 'resource', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': (EduResource,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources', + 'operation_id': 'create_edu_resource', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'edu_resource_creation', + ], + 'required': [ + 'edu_resource_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'edu_resource_creation': + (EduResourceCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'edu_resource_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}', + 'operation_id': 'delete_edu_resource', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + ], + 'required': [ + 'resource', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': (EduResource,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}', + 'operation_id': 'get_edu_resource', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + ], + 'required': [ + 'resource', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_edu_libraries_endpoint = _Endpoint( + settings={ + 'response_type': ([EduLibrary],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/libraries', + 'operation_id': 'list_edu_libraries', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_edu_resources_endpoint = _Endpoint( + settings={ + 'response_type': ([EduResource],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources', + 'operation_id': 'list_edu_resources', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'parent', + 'type', + 'sort', + 'direction', + 'limit', + 'next', + 'previous', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'type', + 'sort', + 'direction', + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 100, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('type',): { + + "ASSIGNMENT": "assignment", + "FOLDER": "folder" + }, + ('sort',): { + + "CREATIONDATE": "creationDate", + "UPDATEDATE": "updateDate", + "TITLE": "title" + }, + ('direction',): { + + "ASC": "asc", + "DESC": "desc" + }, + }, + 'openapi_types': { + 'parent': + (str,), + 'type': + (str,), + 'sort': + (str,), + 'direction': + (str,), + 'limit': + (int,), + 'next': + (str,), + 'previous': + (str,), + }, + 'attribute_map': { + 'parent': 'parent', + 'type': 'type', + 'sort': 'sort', + 'direction': 'direction', + 'limit': 'limit', + 'next': 'next', + 'previous': 'previous', + }, + 'location_map': { + 'parent': 'query', + 'type': 'query', + 'sort': 'query', + 'direction': 'query', + 'limit': 'query', + 'next': 'query', + 'previous': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.move_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': (EduResource,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}/move', + 'operation_id': 'move_edu_resource', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + 'edu_resource_move', + ], + 'required': [ + 'resource', + 'edu_resource_move', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + 'edu_resource_move': + (EduResourceMove,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + 'edu_resource_move': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_edu_resource_endpoint = _Endpoint( + settings={ + 'response_type': (EduResource,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}', + 'operation_id': 'update_edu_resource', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + 'edu_resource_update', + ], + 'required': [ + 'resource', + 'edu_resource_update', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + 'edu_resource_update': + (EduResourceUpdate,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + 'edu_resource_update': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_edu_resource_assignment_endpoint = _Endpoint( + settings={ + 'response_type': (Assignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}/assignment', + 'operation_id': 'update_edu_resource_assignment', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + 'assignment_update', + ], + 'required': [ + 'resource', + 'assignment_update', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + 'assignment_update': + (AssignmentUpdate,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + 'assignment_update': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.use_edu_resource_in_class_endpoint = _Endpoint( + settings={ + 'response_type': (ClassAssignment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/eduResources/{resource}/useInClass', + 'operation_id': 'use_edu_resource_in_class', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'resource', + 'edu_resource_use_in_class', + ], + 'required': [ + 'resource', + 'edu_resource_use_in_class', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'resource': + (str,), + 'edu_resource_use_in_class': + (EduResourceUseInClass,), + }, + 'attribute_map': { + 'resource': 'resource', + }, + 'location_map': { + 'resource': 'path', + 'edu_resource_use_in_class': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def copy_edu_resource( + self, + resource, + edu_resource_copy, + **kwargs + ): + """Copy an education resource to a Resource Library # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.copy_edu_resource(resource, edu_resource_copy, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + edu_resource_copy (EduResourceCopy): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EduResource + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + kwargs['edu_resource_copy'] = \ + edu_resource_copy + return self.copy_edu_resource_endpoint.call_with_http_info(**kwargs) + + def copy_edu_resource_to_demo_class( + self, + resource, + **kwargs + ): + """Copy an education assignment to a teacher demo class # noqa: E501 + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.copy_edu_resource_to_demo_class(resource, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassAssignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + return self.copy_edu_resource_to_demo_class_endpoint.call_with_http_info(**kwargs) + + def create_edu_resource( + self, + edu_resource_creation, + **kwargs + ): + """Create a new education resource # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_edu_resource(edu_resource_creation, async_req=True) + >>> result = thread.get() + + Args: + edu_resource_creation (EduResourceCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EduResource + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['edu_resource_creation'] = \ + edu_resource_creation + return self.create_edu_resource_endpoint.call_with_http_info(**kwargs) + + def delete_edu_resource( + self, + resource, + **kwargs + ): + """Delete an education resource # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_edu_resource(resource, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + return self.delete_edu_resource_endpoint.call_with_http_info(**kwargs) + + def get_edu_resource( + self, + resource, + **kwargs + ): + """Get an education resource # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_edu_resource(resource, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EduResource + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + return self.get_edu_resource_endpoint.call_with_http_info(**kwargs) + + def list_edu_libraries( + self, + **kwargs + ): + """List the education libraries # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_edu_libraries(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [EduLibrary] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_edu_libraries_endpoint.call_with_http_info(**kwargs) + + def list_edu_resources( + self, + **kwargs + ): + """List education resources in a library or folder # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_edu_resources(async_req=True) + >>> result = thread.get() + + + Keyword Args: + parent (str): List the resources contained in this `parent` library or folder . [optional] if omitted the server will use the default value of "root" + type (str): Filter the returned resources by type . [optional] + sort (str): Sort. [optional] if omitted the server will use the default value of "creationDate" + direction (str): Sort direction. [optional] + limit (int): This is the maximum number of resources that may be returned. [optional] if omitted the server will use the default value of 25 + next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [EduResource] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_edu_resources_endpoint.call_with_http_info(**kwargs) + + def move_edu_resource( + self, + resource, + edu_resource_move, + **kwargs + ): + """Move an education resource # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.move_edu_resource(resource, edu_resource_move, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + edu_resource_move (EduResourceMove): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EduResource + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + kwargs['edu_resource_move'] = \ + edu_resource_move + return self.move_edu_resource_endpoint.call_with_http_info(**kwargs) + + def update_edu_resource( + self, + resource, + edu_resource_update, + **kwargs + ): + """Update an education resource metadata # noqa: E501 + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_edu_resource(resource, edu_resource_update, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + edu_resource_update (EduResourceUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + EduResource + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + kwargs['edu_resource_update'] = \ + edu_resource_update + return self.update_edu_resource_endpoint.call_with_http_info(**kwargs) + + def update_edu_resource_assignment( + self, + resource, + assignment_update, + **kwargs + ): + """Update an education resource assignment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_edu_resource_assignment(resource, assignment_update, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + assignment_update (AssignmentUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Assignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + kwargs['assignment_update'] = \ + assignment_update + return self.update_edu_resource_assignment_endpoint.call_with_http_info(**kwargs) + + def use_edu_resource_in_class( + self, + resource, + edu_resource_use_in_class, + **kwargs + ): + """Use an education resource in a class # noqa: E501 + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.use_edu_resource_in_class(resource, edu_resource_use_in_class, async_req=True) + >>> result = thread.get() + + Args: + resource (str): Unique identifier of the resource + edu_resource_use_in_class (EduResourceUseInClass): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ClassAssignment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['resource'] = \ + resource + kwargs['edu_resource_use_in_class'] = \ + edu_resource_use_in_class + return self.use_edu_resource_in_class_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py new file mode 100644 index 0000000..45516eb --- /dev/null +++ b/flat_api/api/group_api.py @@ -0,0 +1,461 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.group_details import GroupDetails +from flat_api.model.score_details import ScoreDetails +from flat_api.model.user_public import UserPublic + + +class GroupApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_group_details_endpoint = _Endpoint( + settings={ + 'response_type': (GroupDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/groups/{group}', + 'operation_id': 'get_group_details', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group', + ], + 'required': [ + 'group', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group': + (str,), + }, + 'attribute_map': { + 'group': 'group', + }, + 'location_map': { + 'group': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_group_scores_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/groups/{group}/scores', + 'operation_id': 'get_group_scores', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group', + 'parent', + ], + 'required': [ + 'group', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group': + (str,), + 'parent': + (str,), + }, + 'attribute_map': { + 'group': 'group', + 'parent': 'parent', + }, + 'location_map': { + 'group': 'path', + 'parent': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_group_users_endpoint = _Endpoint( + settings={ + 'response_type': ([UserPublic],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/groups/{group}/users', + 'operation_id': 'list_group_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group', + 'source', + ], + 'required': [ + 'group', + ], + 'nullable': [ + ], + 'enum': [ + 'source', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('source',): { + + "GOOGLECLASSROOM": "googleClassroom", + "MICROSOFTGRAPH": "microsoftGraph", + "CLEVER": "clever" + }, + }, + 'openapi_types': { + 'group': + (str,), + 'source': + (str,), + }, + 'attribute_map': { + 'group': 'group', + 'source': 'source', + }, + 'location_map': { + 'group': 'path', + 'source': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_group_details( + self, + group, + **kwargs + ): + """Get group information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_group_details(group, async_req=True) + >>> result = thread.get() + + Args: + group (str): Unique identifier of a Flat group + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + GroupDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['group'] = \ + group + return self.get_group_details_endpoint.call_with_http_info(**kwargs) + + def get_group_scores( + self, + group, + **kwargs + ): + """List group's scores # noqa: E501 + + Get the list of scores shared with a group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_group_scores(group, async_req=True) + >>> result = thread.get() + + Args: + group (str): Unique identifier of a Flat group + + Keyword Args: + parent (str): Filter the score forked from the score id `parent`. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['group'] = \ + group + return self.get_group_scores_endpoint.call_with_http_info(**kwargs) + + def list_group_users( + self, + group, + **kwargs + ): + """List group's users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_group_users(group, async_req=True) + >>> result = thread.get() + + Args: + group (str): Unique identifier of a Flat group + + Keyword Args: + source (str): Filter the users by their source . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [UserPublic] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['group'] = \ + group + return self.list_group_users_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py new file mode 100644 index 0000000..2e1cf74 --- /dev/null +++ b/flat_api/api/organization_api.py @@ -0,0 +1,1924 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.api_access_token import ApiAccessToken +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.lti_credentials import LtiCredentials +from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from flat_api.model.organization_invitation import OrganizationInvitation +from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.model.user_admin_update import UserAdminUpdate +from flat_api.model.user_creation import UserCreation +from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.user_signin_link import UserSigninLink +from flat_api.model.user_signin_link_creation import UserSigninLinkCreation + + +class OrganizationApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.count_orga_users_endpoint = _Endpoint( + settings={ + 'response_type': ([UserDetailsAdmin],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users/count', + 'operation_id': 'count_orga_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'role', + 'q', + 'group', + 'no_active_license', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'role', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('role',): { + + "USER": "user", + "TEACHER": "teacher", + "ADMIN": "admin" + }, + }, + 'openapi_types': { + 'role': + ([str],), + 'q': + (str,), + 'group': + ([str],), + 'no_active_license': + (bool,), + }, + 'attribute_map': { + 'role': 'role', + 'q': 'q', + 'group': 'group', + 'no_active_license': 'noActiveLicense', + }, + 'location_map': { + 'role': 'query', + 'q': 'query', + 'group': 'query', + 'no_active_license': 'query', + }, + 'collection_format_map': { + 'role': 'multi', + 'group': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_lti_credentials_endpoint = _Endpoint( + settings={ + 'response_type': (LtiCredentials,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/lti/credentials', + 'operation_id': 'create_lti_credentials', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [ + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (LtiCredentialsCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_organization_invitation_endpoint = _Endpoint( + settings={ + 'response_type': (OrganizationInvitation,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/invitations', + 'operation_id': 'create_organization_invitation', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (OrganizationInvitationCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_organization_user_endpoint = _Endpoint( + settings={ + 'response_type': (UserDetailsAdmin,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users', + 'operation_id': 'create_organization_user', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (UserCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_organization_user_access_token_endpoint = _Endpoint( + settings={ + 'response_type': (ApiAccessToken,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users/{user}/accessToken', + 'operation_id': 'create_organization_user_access_token', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'organization_user_access_token_creation', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'organization_user_access_token_creation': + (OrganizationUserAccessTokenCreation,), + }, + 'attribute_map': { + 'user': 'user', + }, + 'location_map': { + 'user': 'path', + 'organization_user_access_token_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_organization_user_signin_link_endpoint = _Endpoint( + settings={ + 'response_type': (UserSigninLink,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users/{user}/signinLink', + 'operation_id': 'create_organization_user_signin_link', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'user_signin_link_creation', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'user_signin_link_creation': + (UserSigninLinkCreation,), + }, + 'attribute_map': { + 'user': 'user', + }, + 'location_map': { + 'user': 'path', + 'user_signin_link_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.list_lti_credentials_endpoint = _Endpoint( + settings={ + 'response_type': ([LtiCredentials],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/lti/credentials', + 'operation_id': 'list_lti_credentials', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_organization_invitations_endpoint = _Endpoint( + settings={ + 'response_type': ([OrganizationInvitation],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/invitations', + 'operation_id': 'list_organization_invitations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'role', + 'limit', + 'next', + 'previous', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'role', + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('role',): { + + "USER": "user", + "TEACHER": "teacher", + "ADMIN": "admin" + }, + }, + 'openapi_types': { + 'role': + (str,), + 'limit': + (int,), + 'next': + (str,), + 'previous': + (str,), + }, + 'attribute_map': { + 'role': 'role', + 'limit': 'limit', + 'next': 'next', + 'previous': 'previous', + }, + 'location_map': { + 'role': 'query', + 'limit': 'query', + 'next': 'query', + 'previous': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_organization_users_endpoint = _Endpoint( + settings={ + 'response_type': ([UserDetailsAdmin],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users', + 'operation_id': 'list_organization_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'sort', + 'direction', + 'next', + 'previous', + 'role', + 'q', + 'group', + 'no_active_license', + 'license_expiration_date', + 'only_ids', + 'limit', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'sort', + 'direction', + 'role', + ], + 'validation': [ + 'limit', + ] + }, + root_map={ + 'validations': { + ('limit',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': 1, + }, + }, + 'allowed_values': { + ('sort',): { + + "FIRSTNAME": "firstname", + "LASTNAME": "lastname", + "LASTACTIVITYDATE": "lastActivityDate", + "LICENSEEXPIRATIONDATE": "licenseExpirationDate" + }, + ('direction',): { + + "ASC": "asc", + "DESC": "desc" + }, + ('role',): { + + "USER": "user", + "TEACHER": "teacher", + "ADMIN": "admin" + }, + }, + 'openapi_types': { + 'sort': + ([str],), + 'direction': + (str,), + 'next': + (str,), + 'previous': + (str,), + 'role': + ([str],), + 'q': + (str,), + 'group': + ([str],), + 'no_active_license': + (bool,), + 'license_expiration_date': + ([str],), + 'only_ids': + (bool,), + 'limit': + (int,), + }, + 'attribute_map': { + 'sort': 'sort', + 'direction': 'direction', + 'next': 'next', + 'previous': 'previous', + 'role': 'role', + 'q': 'q', + 'group': 'group', + 'no_active_license': 'noActiveLicense', + 'license_expiration_date': 'licenseExpirationDate', + 'only_ids': 'onlyIds', + 'limit': 'limit', + }, + 'location_map': { + 'sort': 'query', + 'direction': 'query', + 'next': 'query', + 'previous': 'query', + 'role': 'query', + 'q': 'query', + 'group': 'query', + 'no_active_license': 'query', + 'license_expiration_date': 'query', + 'only_ids': 'query', + 'limit': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + 'role': 'multi', + 'group': 'multi', + 'license_expiration_date': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.remove_organization_invitation_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/invitations/{invitation}', + 'operation_id': 'remove_organization_invitation', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'invitation', + ], + 'required': [ + 'invitation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'invitation': + (str,), + }, + 'attribute_map': { + 'invitation': 'invitation', + }, + 'location_map': { + 'invitation': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.remove_organization_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users/{user}', + 'operation_id': 'remove_organization_user', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'convert_to_individual', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'convert_to_individual': + (bool,), + }, + 'attribute_map': { + 'user': 'user', + 'convert_to_individual': 'convertToIndividual', + }, + 'location_map': { + 'user': 'path', + 'convert_to_individual': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.revoke_lti_credentials_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/lti/credentials/{credentials}', + 'operation_id': 'revoke_lti_credentials', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'credentials', + ], + 'required': [ + 'credentials', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'credentials': + (str,), + }, + 'attribute_map': { + 'credentials': 'credentials', + }, + 'location_map': { + 'credentials': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_organization_user_endpoint = _Endpoint( + settings={ + 'response_type': (UserDetailsAdmin,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/organizations/users/{user}', + 'operation_id': 'update_organization_user', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'body', + ], + 'required': [ + 'user', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'body': + (UserAdminUpdate,), + }, + 'attribute_map': { + 'user': 'user', + }, + 'location_map': { + 'user': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def count_orga_users( + self, + **kwargs + ): + """Count the organization users using the provided filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.count_orga_users(async_req=True) + >>> result = thread.get() + + + Keyword Args: + role ([str]): Filter users by role. [optional] + q (str): The query to search. [optional] + group ([str]): Filter users by group. [optional] + no_active_license (bool): Filter users who don't have an active license. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [UserDetailsAdmin] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.count_orga_users_endpoint.call_with_http_info(**kwargs) + + def create_lti_credentials( + self, + body, + **kwargs + ): + """Create a new couple of LTI 1.x credentials # noqa: E501 + + Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_lti_credentials(body, async_req=True) + >>> result = thread.get() + + Args: + body (LtiCredentialsCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + LtiCredentials + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['body'] = \ + body + return self.create_lti_credentials_endpoint.call_with_http_info(**kwargs) + + def create_organization_invitation( + self, + **kwargs + ): + """Create a new invitation to join the organization # noqa: E501 + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_organization_invitation(async_req=True) + >>> result = thread.get() + + + Keyword Args: + body (OrganizationInvitationCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + OrganizationInvitation + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.create_organization_invitation_endpoint.call_with_http_info(**kwargs) + + def create_organization_user( + self, + **kwargs + ): + """Create a new user account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_organization_user(async_req=True) + >>> result = thread.get() + + + Keyword Args: + body (UserCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserDetailsAdmin + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.create_organization_user_endpoint.call_with_http_info(**kwargs) + + def create_organization_user_access_token( + self, + user, + **kwargs + ): + """Create a delegated API access token for an organization user # noqa: E501 + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_organization_user_access_token(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of the Flat account + + Keyword Args: + organization_user_access_token_creation (OrganizationUserAccessTokenCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ApiAccessToken + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.create_organization_user_access_token_endpoint.call_with_http_info(**kwargs) + + def create_organization_user_signin_link( + self, + user, + **kwargs + ): + """Create a sign in link for an organization user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_organization_user_signin_link(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of the Flat account + + Keyword Args: + user_signin_link_creation (UserSigninLinkCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserSigninLink + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.create_organization_user_signin_link_endpoint.call_with_http_info(**kwargs) + + def list_lti_credentials( + self, + **kwargs + ): + """List LTI 1.x credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_lti_credentials(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [LtiCredentials] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_lti_credentials_endpoint.call_with_http_info(**kwargs) + + def list_organization_invitations( + self, + **kwargs + ): + """List the organization invitations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_organization_invitations(async_req=True) + >>> result = thread.get() + + + Keyword Args: + role (str): Filter users by role. [optional] + limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 50 + next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [OrganizationInvitation] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_organization_invitations_endpoint.call_with_http_info(**kwargs) + + def list_organization_users( + self, + **kwargs + ): + """List the organization users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_organization_users(async_req=True) + >>> result = thread.get() + + + Keyword Args: + sort ([str]): The order to sort the user list. [optional] + direction (str): Sort direction. [optional] + next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] + role ([str]): Filter users by role. [optional] + q (str): The query to search. [optional] + group ([str]): Filter users by group. [optional] + no_active_license (bool): Filter users who don't have an active license. [optional] + license_expiration_date ([str]): Filter users by license expiration date or `active` / `notActive`. [optional] + only_ids (bool): Return only user ids. [optional] + limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [UserDetailsAdmin] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_organization_users_endpoint.call_with_http_info(**kwargs) + + def remove_organization_invitation( + self, + invitation, + **kwargs + ): + """Remove an organization invitation # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.remove_organization_invitation(invitation, async_req=True) + >>> result = thread.get() + + Args: + invitation (str): Unique identifier of the invitation + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['invitation'] = \ + invitation + return self.remove_organization_invitation_endpoint.call_with_http_info(**kwargs) + + def remove_organization_user( + self, + user, + **kwargs + ): + """Remove an account from Flat # noqa: E501 + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.remove_organization_user(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of the Flat account + + Keyword Args: + convert_to_individual (bool): If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.remove_organization_user_endpoint.call_with_http_info(**kwargs) + + def revoke_lti_credentials( + self, + credentials, + **kwargs + ): + """Revoke LTI 1.x credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.revoke_lti_credentials(credentials, async_req=True) + >>> result = thread.get() + + Args: + credentials (str): Credentials unique identifier + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['credentials'] = \ + credentials + return self.revoke_lti_credentials_endpoint.call_with_http_info(**kwargs) + + def update_organization_user( + self, + user, + body, + **kwargs + ): + """Update account information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_organization_user(user, body, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of the Flat account + body (UserAdminUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserDetailsAdmin + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + kwargs['body'] = \ + body + return self.update_organization_user_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py new file mode 100644 index 0000000..dd25599 --- /dev/null +++ b/flat_api/api/score_api.py @@ -0,0 +1,4509 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.model.score_comment import ScoreComment +from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment_update import ScoreCommentUpdate +from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_details import ScoreDetails +from flat_api.model.score_fork import ScoreFork +from flat_api.model.score_modification import ScoreModification +from flat_api.model.score_revision import ScoreRevision +from flat_api.model.score_revision_creation import ScoreRevisionCreation +from flat_api.model.score_track import ScoreTrack +from flat_api.model.score_track_creation import ScoreTrackCreation +from flat_api.model.score_track_update import ScoreTrackUpdate +from flat_api.model.task import Task +from flat_api.model.task_export_options import TaskExportOptions + + +class ScoreApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.add_score_collaborator_endpoint = _Endpoint( + settings={ + 'response_type': (ResourceCollaborator,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/collaborators', + 'operation_id': 'add_score_collaborator', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + ], + 'required': [ + 'score', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ResourceCollaboratorCreation,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.add_score_track_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreTrack,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/tracks', + 'operation_id': 'add_score_track', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + ], + 'required': [ + 'score', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ScoreTrackCreation,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_export_task_endpoint = _Endpoint( + settings={ + 'response_type': (Task,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/revisions/{revision}/{format}/task', + 'operation_id': 'create_export_task', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'revision', + 'format', + 'sharing_key', + 'body', + ], + 'required': [ + 'score', + 'revision', + 'format', + ], + 'nullable': [ + ], + 'enum': [ + 'format', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('format',): { + + "MP3": "mp3", + "WAV": "wav", + "PRACTICEFIRST": "practicefirst" + }, + }, + 'openapi_types': { + 'score': + (str,), + 'revision': + (str,), + 'format': + (str,), + 'sharing_key': + (str,), + 'body': + (TaskExportOptions,), + }, + 'attribute_map': { + 'score': 'score', + 'revision': 'revision', + 'format': 'format', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'revision': 'path', + 'format': 'path', + 'sharing_key': 'query', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_score_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores', + 'operation_id': 'create_score', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'body', + ], + 'required': [ + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'body': + (ScoreCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_score_revision_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreRevision,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/revisions', + 'operation_id': 'create_score_revision', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + ], + 'required': [ + 'score', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ScoreRevisionCreation,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_score_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}', + 'operation_id': 'delete_score', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'now', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'now': + (bool,), + }, + 'attribute_map': { + 'score': 'score', + 'now': 'now', + }, + 'location_map': { + 'score': 'path', + 'now': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_score_comment_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments/{comment}', + 'operation_id': 'delete_score_comment', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'comment', + 'sharing_key', + ], + 'required': [ + 'score', + 'comment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'comment': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'comment': 'comment', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'comment': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_score_track_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/tracks/{track}', + 'operation_id': 'delete_score_track', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'track', + ], + 'required': [ + 'score', + 'track', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'track': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'track': 'track', + }, + 'location_map': { + 'score': 'path', + 'track': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.edit_score_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}', + 'operation_id': 'edit_score', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ScoreModification,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.fork_score_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/fork', + 'operation_id': 'fork_score', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + 'sharing_key', + ], + 'required': [ + 'score', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ScoreFork,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.ger_user_likes_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/users/{user}/likes', + 'operation_id': 'ger_user_likes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'ids', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'ids': + (bool,), + }, + 'attribute_map': { + 'user': 'user', + 'ids': 'ids', + }, + 'location_map': { + 'user': 'path', + 'ids': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_group_scores_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/groups/{group}/scores', + 'operation_id': 'get_group_scores', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group', + 'parent', + ], + 'required': [ + 'group', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group': + (str,), + 'parent': + (str,), + }, + 'attribute_map': { + 'group': 'group', + 'parent': 'parent', + }, + 'location_map': { + 'group': 'path', + 'parent': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreDetails,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}', + 'operation_id': 'get_score', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'sharing_key', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_collaborator_endpoint = _Endpoint( + settings={ + 'response_type': (ResourceCollaborator,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/collaborators/{collaborator}', + 'operation_id': 'get_score_collaborator', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'collaborator', + 'sharing_key', + ], + 'required': [ + 'score', + 'collaborator', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'collaborator': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'collaborator': 'collaborator', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'collaborator': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_collaborators_endpoint = _Endpoint( + settings={ + 'response_type': ([ResourceCollaborator],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/collaborators', + 'operation_id': 'get_score_collaborators', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'sharing_key', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_comments_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreComment],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments', + 'operation_id': 'get_score_comments', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'sharing_key', + 'type', + 'sort', + 'direction', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + 'type', + 'sort', + 'direction', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('type',): { + + "DOCUMENT": "document", + "INLINE": "inline" + }, + ('sort',): { + + "DATE": "date" + }, + ('direction',): { + + "ASC": "asc", + "DESC": "desc" + }, + }, + 'openapi_types': { + 'score': + (str,), + 'sharing_key': + (str,), + 'type': + (str,), + 'sort': + (str,), + 'direction': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + 'type': 'type', + 'sort': 'sort', + 'direction': 'direction', + }, + 'location_map': { + 'score': 'path', + 'sharing_key': 'query', + 'type': 'query', + 'sort': 'query', + 'direction': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_revision_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreRevision,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/revisions/{revision}', + 'operation_id': 'get_score_revision', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'revision', + 'sharing_key', + ], + 'required': [ + 'score', + 'revision', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'revision': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'revision': 'revision', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'revision': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_revision_data_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/revisions/{revision}/{format}', + 'operation_id': 'get_score_revision_data', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'revision', + 'format', + 'sharing_key', + 'parts', + 'default_track', + 'url', + ], + 'required': [ + 'score', + 'revision', + 'format', + ], + 'nullable': [ + ], + 'enum': [ + 'format', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('format',): { + + "JSON": "json", + "MXL": "mxl", + "XML": "xml", + "MP3": "mp3", + "WAV": "wav", + "MIDI": "midi", + "THUMBNAIL.PNG": "thumbnail.png", + "SYNCHRONIZATIONPOINTS": "synchronizationPoints" + }, + }, + 'openapi_types': { + 'score': + (str,), + 'revision': + (str,), + 'format': + (str,), + 'sharing_key': + (str,), + 'parts': + (str,), + 'default_track': + (bool,), + 'url': + (bool,), + }, + 'attribute_map': { + 'score': 'score', + 'revision': 'revision', + 'format': 'format', + 'sharing_key': 'sharingKey', + 'parts': 'parts', + 'default_track': 'defaultTrack', + 'url': 'url', + }, + 'location_map': { + 'score': 'path', + 'revision': 'path', + 'format': 'path', + 'sharing_key': 'query', + 'parts': 'query', + 'default_track': 'query', + 'url': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json', + 'application/vnd.recordare.musicxml+xml', + 'application/vnd.recordare.musicxml', + 'audio/mp3', + 'audio/wav', + 'audio/midi', + 'image/png' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_revisions_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreRevision],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/revisions', + 'operation_id': 'get_score_revisions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'sharing_key', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_submissions_endpoint = _Endpoint( + settings={ + 'response_type': ([AssignmentSubmission],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/submissions', + 'operation_id': 'get_score_submissions', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_score_track_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreTrack,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/tracks/{track}', + 'operation_id': 'get_score_track', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'track', + 'sharing_key', + ], + 'required': [ + 'score', + 'track', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'track': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'track': 'track', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'track': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_user_scores_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/users/{user}/scores', + 'operation_id': 'get_user_scores', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'parent', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'parent': + (str,), + }, + 'attribute_map': { + 'user': 'user', + 'parent': 'parent', + }, + 'location_map': { + 'user': 'path', + 'parent': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_score_tracks_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreTrack],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/tracks', + 'operation_id': 'list_score_tracks', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'sharing_key', + 'assignment', + 'list_auto_track', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'sharing_key': + (str,), + 'assignment': + (str,), + 'list_auto_track': + (bool,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + 'assignment': 'assignment', + 'list_auto_track': 'listAutoTrack', + }, + 'location_map': { + 'score': 'path', + 'sharing_key': 'query', + 'assignment': 'query', + 'list_auto_track': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.mark_score_comment_resolved_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments/{comment}/resolved', + 'operation_id': 'mark_score_comment_resolved', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'comment', + 'sharing_key', + ], + 'required': [ + 'score', + 'comment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'comment': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'comment': 'comment', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'comment': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.mark_score_comment_unresolved_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments/{comment}/resolved', + 'operation_id': 'mark_score_comment_unresolved', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'comment', + 'sharing_key', + ], + 'required': [ + 'score', + 'comment', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'comment': + (str,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'comment': 'comment', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'comment': 'path', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.post_score_comment_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreComment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments', + 'operation_id': 'post_score_comment', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'body', + 'sharing_key', + ], + 'required': [ + 'score', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'body': + (ScoreCommentCreation,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'body': 'body', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.remove_score_collaborator_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/collaborators/{collaborator}', + 'operation_id': 'remove_score_collaborator', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'collaborator', + ], + 'required': [ + 'score', + 'collaborator', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'collaborator': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'collaborator': 'collaborator', + }, + 'location_map': { + 'score': 'path', + 'collaborator': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.untrash_score_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/untrash', + 'operation_id': 'untrash_score', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + ], + 'required': [ + 'score', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + }, + 'attribute_map': { + 'score': 'score', + }, + 'location_map': { + 'score': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_score_comment_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreComment,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/comments/{comment}', + 'operation_id': 'update_score_comment', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'comment', + 'body', + 'sharing_key', + ], + 'required': [ + 'score', + 'comment', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'comment': + (str,), + 'body': + (ScoreCommentUpdate,), + 'sharing_key': + (str,), + }, + 'attribute_map': { + 'score': 'score', + 'comment': 'comment', + 'sharing_key': 'sharingKey', + }, + 'location_map': { + 'score': 'path', + 'comment': 'path', + 'body': 'body', + 'sharing_key': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_score_track_endpoint = _Endpoint( + settings={ + 'response_type': (ScoreTrack,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/scores/{score}/tracks/{track}', + 'operation_id': 'update_score_track', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'score', + 'track', + 'body', + ], + 'required': [ + 'score', + 'track', + 'body', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'score': + (str,), + 'track': + (str,), + 'body': + (ScoreTrackUpdate,), + }, + 'attribute_map': { + 'score': 'score', + 'track': 'track', + }, + 'location_map': { + 'score': 'path', + 'track': 'path', + 'body': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def add_score_collaborator( + self, + score, + body, + **kwargs + ): + """Add a new collaborator # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_score_collaborator(score, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (ResourceCollaboratorCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ResourceCollaborator + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['body'] = \ + body + return self.add_score_collaborator_endpoint.call_with_http_info(**kwargs) + + def add_score_track( + self, + score, + body, + **kwargs + ): + """Add a new video or audio track to the score # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_score_track(score, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (ScoreTrackCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreTrack + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['body'] = \ + body + return self.add_score_track_endpoint.call_with_http_info(**kwargs) + + def create_export_task( + self, + score, + revision, + format, + **kwargs + ): + """Create a new score export task # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_export_task(score, revision, format, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format (str): The format of the file that will be generated or the target service name where the file will be exported + + Keyword Args: + sharing_key (str): 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] + body (TaskExportOptions): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Task + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['revision'] = \ + revision + kwargs['format'] = \ + format + return self.create_export_task_endpoint.call_with_http_info(**kwargs) + + def create_score( + self, + body, + **kwargs + ): + """Create a new score # noqa: E501 + + 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_score(body, async_req=True) + >>> result = thread.get() + + Args: + body (ScoreCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['body'] = \ + body + return self.create_score_endpoint.call_with_http_info(**kwargs) + + def create_score_revision( + self, + score, + body, + **kwargs + ): + """Create a new revision # noqa: E501 + + Update a score by uploading a new revision for this one. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_score_revision(score, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (ScoreRevisionCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreRevision + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['body'] = \ + body + return self.create_score_revision_endpoint.call_with_http_info(**kwargs) + + def delete_score( + self, + score, + **kwargs + ): + """Delete a score # noqa: E501 + + 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). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_score(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + now (bool): If `true`, the score deletion will be scheduled to be done ASAP. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.delete_score_endpoint.call_with_http_info(**kwargs) + + def delete_score_comment( + self, + score, + comment, + **kwargs + ): + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_score_comment(score, comment, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a sheet music comment + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['comment'] = \ + comment + return self.delete_score_comment_endpoint.call_with_http_info(**kwargs) + + def delete_score_track( + self, + score, + track, + **kwargs + ): + """Remove an audio or video track linked to the score # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_score_track(score, track, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score audio track + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['track'] = \ + track + return self.delete_score_track_endpoint.call_with_http_info(**kwargs) + + def edit_score( + self, + score, + **kwargs + ): + """Edit a score's metadata # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.edit_score(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + body (ScoreModification): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.edit_score_endpoint.call_with_http_info(**kwargs) + + def fork_score( + self, + score, + body, + **kwargs + ): + """Fork a score # noqa: E501 + + 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fork_score(score, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (ScoreFork): + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['body'] = \ + body + return self.fork_score_endpoint.call_with_http_info(**kwargs) + + def ger_user_likes( + self, + user, + **kwargs + ): + """List liked scores # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ger_user_likes(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + + Keyword Args: + ids (bool): Return only the identifiers of the scores. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.ger_user_likes_endpoint.call_with_http_info(**kwargs) + + def get_group_scores( + self, + group, + **kwargs + ): + """List group's scores # noqa: E501 + + Get the list of scores shared with a group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_group_scores(group, async_req=True) + >>> result = thread.get() + + Args: + group (str): Unique identifier of a Flat group + + Keyword Args: + parent (str): Filter the score forked from the score id `parent`. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['group'] = \ + group + return self.get_group_scores_endpoint.call_with_http_info(**kwargs) + + def get_score( + self, + score, + **kwargs + ): + """Get a score's metadata # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreDetails + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_endpoint.call_with_http_info(**kwargs) + + def get_score_collaborator( + self, + score, + collaborator, + **kwargs + ): + """Get a collaborator # noqa: E501 + + Get the information about a collaborator (User or Group). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_collaborator(score, collaborator, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ResourceCollaborator + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['collaborator'] = \ + collaborator + return self.get_score_collaborator_endpoint.call_with_http_info(**kwargs) + + def get_score_collaborators( + self, + score, + **kwargs + ): + """List the collaborators # noqa: E501 + + 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). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_collaborators(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ResourceCollaborator] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_collaborators_endpoint.call_with_http_info(**kwargs) + + def get_score_comments( + self, + score, + **kwargs + ): + """List comments # noqa: E501 + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_comments(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + sharing_key (str): 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 (str): Filter the comments by type. [optional] + sort (str): Sort. [optional] if omitted the server will use the default value of "date" + direction (str): Sort direction. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreComment] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_comments_endpoint.call_with_http_info(**kwargs) + + def get_score_revision( + self, + score, + revision, + **kwargs + ): + """Get a score revision # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_revision(score, revision, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreRevision + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['revision'] = \ + revision + return self.get_score_revision_endpoint.call_with_http_info(**kwargs) + + def get_score_revision_data( + self, + score, + revision, + format, + **kwargs + ): + """Get a score revision data # noqa: E501 + + 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format (str): The format of the file you will retrieve + + Keyword Args: + sharing_key (str): 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 (str): An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". . [optional] + default_track (bool): When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. . [optional] + url (bool): Returns a json with the `url` in it instead of redirecting . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['revision'] = \ + revision + kwargs['format'] = \ + format + return self.get_score_revision_data_endpoint.call_with_http_info(**kwargs) + + def get_score_revisions( + self, + score, + **kwargs + ): + """List the revisions # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_revisions(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreRevision] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_revisions_endpoint.call_with_http_info(**kwargs) + + def get_score_submissions( + self, + score, + **kwargs + ): + """List submissions related to the score # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_submissions(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [AssignmentSubmission] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.get_score_submissions_endpoint.call_with_http_info(**kwargs) + + def get_score_track( + self, + score, + track, + **kwargs + ): + """Retrieve the details of an audio or video track linked to a score # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_score_track(score, track, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score audio track + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreTrack + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['track'] = \ + track + return self.get_score_track_endpoint.call_with_http_info(**kwargs) + + def get_user_scores( + self, + user, + **kwargs + ): + """List user's scores # noqa: E501 + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_scores(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + + Keyword Args: + parent (str): Filter the score forked from the score id `parent`. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.get_user_scores_endpoint.call_with_http_info(**kwargs) + + def list_score_tracks( + self, + score, + **kwargs + ): + """List the audio or video tracks linked to a score # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_score_tracks(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + sharing_key (str): 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] + assignment (str): An assignment id with which all the tracks returned will be related to . [optional] + list_auto_track (bool): If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track . [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreTrack] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.list_score_tracks_endpoint.call_with_http_info(**kwargs) + + def mark_score_comment_resolved( + self, + score, + comment, + **kwargs + ): + """Mark the comment as resolved # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.mark_score_comment_resolved(score, comment, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a sheet music comment + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['comment'] = \ + comment + return self.mark_score_comment_resolved_endpoint.call_with_http_info(**kwargs) + + def mark_score_comment_unresolved( + self, + score, + comment, + **kwargs + ): + """Mark the comment as unresolved # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.mark_score_comment_unresolved(score, comment, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a sheet music comment + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['comment'] = \ + comment + return self.mark_score_comment_unresolved_endpoint.call_with_http_info(**kwargs) + + def post_score_comment( + self, + score, + body, + **kwargs + ): + """Post a new comment # noqa: E501 + + 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`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.post_score_comment(score, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (ScoreCommentCreation): + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreComment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['body'] = \ + body + return self.post_score_comment_endpoint.call_with_http_info(**kwargs) + + def remove_score_collaborator( + self, + score, + collaborator, + **kwargs + ): + """Delete a collaborator # noqa: E501 + + Remove the specified collaborator from the score # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.remove_score_collaborator(score, collaborator, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['collaborator'] = \ + collaborator + return self.remove_score_collaborator_endpoint.call_with_http_info(**kwargs) + + def untrash_score( + self, + score, + **kwargs + ): + """Untrash a score # noqa: E501 + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.untrash_score(score, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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`). + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + return self.untrash_score_endpoint.call_with_http_info(**kwargs) + + def update_score_comment( + self, + score, + comment, + body, + **kwargs + ): + """Update an existing comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_score_comment(score, comment, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a sheet music comment + body (ScoreCommentUpdate): + + Keyword Args: + sharing_key (str): 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] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreComment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['comment'] = \ + comment + kwargs['body'] = \ + body + return self.update_score_comment_endpoint.call_with_http_info(**kwargs) + + def update_score_track( + self, + score, + track, + body, + **kwargs + ): + """Update an audio or video track linked to a score # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_score_track(score, track, body, async_req=True) + >>> result = thread.get() + + Args: + score (str): 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 (str): Unique identifier of a score audio track + body (ScoreTrackUpdate): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ScoreTrack + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['score'] = \ + score + kwargs['track'] = \ + track + kwargs['body'] = \ + body + return self.update_score_track_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py new file mode 100644 index 0000000..2cde8dc --- /dev/null +++ b/flat_api/api/task_api.py @@ -0,0 +1,174 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.task import Task + + +class TaskApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_task_endpoint = _Endpoint( + settings={ + 'response_type': (Task,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/tasks/{task}', + 'operation_id': 'get_task', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'task', + ], + 'required': [ + 'task', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'task': + (str,), + }, + 'attribute_map': { + 'task': 'task', + }, + 'location_map': { + 'task': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_task( + self, + task, + **kwargs + ): + """Get a task details # noqa: E501 + + This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_task(task, async_req=True) + >>> result = thread.get() + + Args: + task (str): Unique identifier for the task + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Task + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['task'] = \ + task + return self.get_task_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py new file mode 100644 index 0000000..2eb12b0 --- /dev/null +++ b/flat_api/api/user_api.py @@ -0,0 +1,454 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.api_client import ApiClient, Endpoint as _Endpoint +from flat_api.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.model.score_details import ScoreDetails +from flat_api.model.user_public import UserPublic + + +class UserApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.ger_user_likes_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/users/{user}/likes', + 'operation_id': 'ger_user_likes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'ids', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'ids': + (bool,), + }, + 'attribute_map': { + 'user': 'user', + 'ids': 'ids', + }, + 'location_map': { + 'user': 'path', + 'ids': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_user_endpoint = _Endpoint( + settings={ + 'response_type': (UserPublic,), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/users/{user}', + 'operation_id': 'get_user', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + }, + 'attribute_map': { + 'user': 'user', + }, + 'location_map': { + 'user': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_user_scores_endpoint = _Endpoint( + settings={ + 'response_type': ([ScoreDetails],), + 'auth': [ + 'OAuth2' + ], + 'endpoint_path': '/users/{user}/scores', + 'operation_id': 'get_user_scores', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user', + 'parent', + ], + 'required': [ + 'user', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user': + (str,), + 'parent': + (str,), + }, + 'attribute_map': { + 'user': 'user', + 'parent': 'parent', + }, + 'location_map': { + 'user': 'path', + 'parent': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def ger_user_likes( + self, + user, + **kwargs + ): + """List liked scores # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ger_user_likes(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + + Keyword Args: + ids (bool): Return only the identifiers of the scores. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.ger_user_likes_endpoint.call_with_http_info(**kwargs) + + def get_user( + self, + user, + **kwargs + ): + """Get a public user profile # noqa: E501 + + Get a profile of a Flat or Flat for Education User. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UserPublic + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.get_user_endpoint.call_with_http_info(**kwargs) + + def get_user_scores( + self, + user, + **kwargs + ): + """List user's scores # noqa: E501 + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_scores(user, async_req=True) + >>> result = thread.get() + + Args: + user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + + Keyword Args: + parent (str): Filter the score forked from the score id `parent`. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ScoreDetails] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['user'] = \ + user + return self.get_user_scores_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 379a96e..2e977c3 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ Flat API @@ -9,959 +8,39 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -from decimal import Decimal -import enum -import email + import json -import os -import io import atexit +import mimetypes from multiprocessing.pool import ThreadPool +import io +import os import re -import tempfile import typing -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote -from urllib3.fields import RequestField as RequestFieldBase +from urllib.parse import quote +from urllib3.fields import RequestField -import frozendict from flat_api import rest from flat_api.configuration import Configuration -from flat_api.exceptions import ApiTypeError, ApiValueError -from flat_api.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, +from flat_api.exceptions import ApiTypeError, ApiValueError, ApiException +from flat_api.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, date, datetime, + deserialize_file, + file_type, + model_to_dict, none_type, - Unset, - unset, + validate_and_convert_types ) -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return float(obj) - elif isinstance(obj, int): - return int(obj) - elif isinstance(obj, Decimal): - if obj.as_tuple().exponent >= 0: - return int(obj) - return float(obj) - elif isinstance(obj, NoneClass): - return None - elif isinstance(obj, BoolClass): - return bool(obj) - elif isinstance(obj, (dict, frozendict.frozendict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - - def __init__(self, prefix: str, separator: str): - self.prefix = prefix - self.separator = separator - self.first = True - if separator in {'.', '|', '%20'}: - item_separator = separator - else: - item_separator = ',' - self.item_separator = item_separator - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return quote(str(in_data)) - return str(in_data) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - if style is ParameterStyle.FORM: - return True - return super()._get_default_explode(style) - - def _serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -@dataclass -class ParameterBase(JSONDetector): - name: str - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] - - __style_to_in_type = { - ParameterStyle.MATRIX: {ParameterInType.PATH}, - ParameterStyle.LABEL: {ParameterInType.PATH}, - ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, - ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, - ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, - } - __in_type_to_default_style = { - ParameterInType.QUERY: ParameterStyle.FORM, - ParameterInType.PATH: ParameterStyle.SIMPLE, - ParameterInType.HEADER: ParameterStyle.SIMPLE, - ParameterInType.COOKIE: ParameterStyle.FORM, - } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} - _json_encoder = JSONEncoder() - - @classmethod - def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): - if style is None: - return - in_type_set = cls.__style_to_in_type[style] - if in_type not in in_type_set: - raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( - style, in_type_set - ) - ) - - def __init__( - self, - name: str, - in_type: ParameterInType, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') - if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) - self.__verify_style_to_in_type(style, in_type) - if content is None and style is None: - style = self.__in_type_to_default_style[in_type] - if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') - self.in_type = in_type - self.name = name - self.required = required - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - self.schema = schema - self.content = content - - def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=self._json_encoder.compact_separators) - return json.dumps(in_data) - - -class PathParameter(ParameterBase, StyleSimpleSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.PATH, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) - return self._to_dict(self.name, value) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if self.style: - if self.style is ParameterStyle.SIMPLE: - return self.__serialize_simple(cast_in_data) - elif self.style is ParameterStyle.LABEL: - return self.__serialize_label(cast_in_data) - elif self.style is ParameterStyle.MATRIX: - return self.__serialize_matrix(cast_in_data) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class QueryParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.QUERY, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_space_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_pipe_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._serialize_form( - in_data, - name=self.name, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if self.style: - # TODO update query ones to omit setting values when [] {} or None is input - if self.style is ParameterStyle.FORM: - return self.__serialize_form(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.SPACE_DELIMITED: - return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.PIPE_DELIMITED: - return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) - # self.content will be length one - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class CookieParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.COOKIE, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if self.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - value = self._serialize_form( - cast_in_data, - explode=self.explode, - name=self.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return self._to_dict(self.name, value) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class HeaderParameter(ParameterBase, StyleSimpleSerializer): - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.HEADER, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> HTTPHeaderDict: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class Encoding: - def __init__( - self, - content_type: str, - headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: bool = False, - ): - self.content_type = content_type - self.headers = headers - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - - -@dataclass -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - def __init__( - self, - response: urllib3.HTTPResponse, - body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - ): - """ - pycharm needs this to prevent 'Unexpected argument' warnings - """ - self.response = response - self.body = body - self.headers = headers - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - def __init__( - self, - response_cls: typing.Type[ApiResponse] = ApiResponse, - content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, - ): - self.headers = headers - if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - self.response_cls = response_cls - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - def __deserialize_application_octet_stream( - self, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as new_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - new_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') - deserialized_body = unset - streamed = response.supports_chunked_reads() - - deserialized_headers = unset - if self.headers is not None: - # TODO add header deserialiation here - pass - - if self.content is not None: - if content_type not in self.content: - raise ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" - ) - body_schema = self.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) - - if self._content_type_is_json(content_type): - body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) - elif streamed: - response.release_conn() - - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -class ApiClient: +class ApiClient(object): """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -985,21 +64,15 @@ class ApiClient: _pool = None - def __init__( - self, - configuration: typing.Optional[Configuration] = None, - header_name: typing.Optional[str] = None, - header_value: typing.Optional[str] = None, - cookie: typing.Optional[str] = None, - pool_threads: int = 1 - ): + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = HTTPHeaderDict() + self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1046,86 +119,298 @@ def __call_api( self, resource_path: str, method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, auth_settings: typing.Optional[typing.List[str]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): + + config = self.configuration # header parameters - used_headers = HTTPHeaderDict(self.default_headers) + header_params = header_params or {} + header_params.update(self.default_headers) if self.cookie: - headers['Cookie'] = self.cookie + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict)) + + # body + if body: + body = self.sanitize_for_serialization(body) - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) + # auth setting + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url - if host is None: + if _host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead - url = host + resource_path - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return (return_data) + return return_data + + # deserialize response data + if response_type: + if response_type != (file_type,): + encoding = "utf-8" + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance( + v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + If obj is io.IOBase, return the bytes + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, + val in model_to_dict( + obj, + serialize=True).items()} + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): + return obj + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] + if isinstance(obj, dict): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError( + 'Unable to prepare type {} for serialization'.format( + obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) + + # fetch data from response object + try: + received_data = json.loads(response.data) + except ValueError: + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration ) - return response + return deserialized_data def call_api( self, resource_path: str, method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, auth_settings: typing.Optional[typing.List[str]] = None, async_req: typing.Optional[bool] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. - :param headers: Header parameters to be + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be placed in the request header. :param body: Request body. - :param fields: Request post form parameters, + :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings: Auth Settings names for the request. - :param async_req: execute request asynchronously - :type async_req: bool, optional TODO remove, unused - :param stream: if True, the urllib3.HTTPResponse object will + :param auth_settings list: Auth Settings names for the request. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict + :param async_req bool: execute request asynchronously + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :type collection_formats: dict, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystme file and the BinarySchema - instance will also inherit from FileSchema and FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :param host: api endpoint host + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -1133,90 +418,82 @@ def call_api( If parameter async_req is False or missing, then the method will return the response directly. """ - if not async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type, _request_auths=_request_auths) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type, None, _request_auths)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, - stream=stream, - timeout=timeout, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "POST": return self.rest_client.POST(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, + query_params=query_params, headers=headers, - stream=stream, - timeout=timeout, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) else: raise ApiValueError( @@ -1224,277 +501,397 @@ def request( " `POST`, `PATCH`, `PUT` or `DELETE`." ) - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data + + def files_parameters(self, + files: typing.Optional[typing.Dict[str, + typing.List[io.IOBase]]] = None): + """Builds form parameters. + + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data + """ + if files is None: + return [] + + params = [] + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values + continue + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types, method=None, body=None): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :param method: http method (e.g. POST, PATCH). + :param body: http body to send. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + content_types = [x.lower() for x in content_types] + + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. :param resource_path: A string representation of the HTTP request resource path. :param method: A string representation of the HTTP request method. :param body: A object representing the body of the HTTP request. The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) - if not auth_setting: - continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query - need to pass in prefix_separator_iterator - and need to output resource_path with query params added - """ - raise ApiValueError("Auth in query not yet implemented") - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - + if auth_setting: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) -class Api: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, api_client: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called + """ + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type', + '_content_type', + '_spec_property_naming', + '_request_auths' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,), + '_spec_property_naming': (bool,), + '_content_type': (none_type, str), + '_request_auths': (none_type, list) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration ) + + if kwargs['_check_input_type'] is False: + return + + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + kwargs['_spec_property_naming'], + kwargs['_check_input_type'], + configuration=self.api_client.configuration ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][base_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][base_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format + + return params + + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: + + api_instance = AccountApi() + api_instance.get_authenticated_user # this is an instance of the class Endpoint + api_instance.get_authenticated_user() # this invokes api_instance.get_authenticated_user.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.get_authenticated_user.callable or self.callable in this class + + """ + return self.callable(self, *args, **kwargs) + + def call_with_http_info(self, **kwargs): - def _get_host_oapg( - self, - operation_id: str, - servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None - ) -> typing.Optional[str]: - configuration = self.api_client.configuration try: - if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) - else: - index = host_index - server_variables = configuration.server_operation_variables.get( - operation_id, configuration.server_variables + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] ) except IndexError: - if servers: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % - len(servers) + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) ) - host = None - return host - - -class SerializedRequestBody(typing_extensions.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType Schema info - """ - __json_encoder = JSONEncoder() - - def __init__( - self, - content: typing.Dict[str, MediaType], - required: bool = False, - ): - self.required = required - if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: - in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return dict(body=json_str) + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) + ) - @staticmethod - def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: - if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') - elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') - elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') - elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') - return dict(body=str(in_data)) - - def __multipart_json_item(self, key: str, value: Schema) -> RequestField: - json_value = self.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - def __multipart_form_item(self, key: str, value: Schema) -> RequestField: - if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, FileIO): - # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) - value.close() - else: - request_field = self.__multipart_json_item(key=key, value=value) - return request_field - - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: - if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + self.__validate_inputs(kwargs) - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: + params = self.__gather_params(kwargs) - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a RequestField for each item with name=key - for item in value: - request_field = self.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = self.__multipart_json_item(key=key, value=value) - fields.append(request_field) - else: - request_field = self.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return dict(fields=tuple(fields)) - - def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: - if isinstance(in_data, bytes): - return dict(body=in_data) - # FileIO type - result = dict(body=in_data.read()) - in_data.close() - return result - - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - if not isinstance(in_data, frozendict.frozendict): - raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') - cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return dict(body=value) - - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = self.content[content_type] - if isinstance(in_data, media_type.schema): - cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = media_type.schema(**in_data) + if kwargs.get('_content_type'): + params['header']['Content-Type'] = kwargs['_content_type'] else: - cast_in_data = media_type.schema(in_data) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if self._content_type_is_json(content_type): - return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': - return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + if params['body'] != "": + content_types_list = self.api_client.select_header_content_type( + content_type_headers_list, self.settings['http_method'], + params['body']) + if content_types_list: + params['header']['Content-Type'] = content_types_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + _request_auths=kwargs['_request_auths'], + collection_formats=params['collection_format']) diff --git a/flat_api/apis/__init__.py b/flat_api/apis/__init__.py index 7840f77..c82c2f5 100644 --- a/flat_api/apis/__init__.py +++ b/flat_api/apis/__init__.py @@ -1,3 +1,25 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from flat_api.api.account_api import AccountApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from flat_api.api.account_api import AccountApi +from flat_api.api.class_api import ClassApi +from flat_api.api.collection_api import CollectionApi +from flat_api.api.edu_resources_api import EduResourcesApi +from flat_api.api.group_api import GroupApi +from flat_api.api.organization_api import OrganizationApi +from flat_api.api.score_api import ScoreApi +from flat_api.api.task_api import TaskApi +from flat_api.api.user_api import UserApi diff --git a/flat_api/apis/path_to_api.py b/flat_api/apis/path_to_api.py deleted file mode 100644 index 8f687e2..0000000 --- a/flat_api/apis/path_to_api.py +++ /dev/null @@ -1,206 +0,0 @@ -import typing_extensions - -from flat_api.paths import PathValues -from flat_api.apis.paths.me import Me -from flat_api.apis.paths.scores import Scores -from flat_api.apis.paths.scores_score import ScoresScore -from flat_api.apis.paths.scores_score_untrash import ScoresScoreUntrash -from flat_api.apis.paths.scores_score_submissions import ScoresScoreSubmissions -from flat_api.apis.paths.scores_score_fork import ScoresScoreFork -from flat_api.apis.paths.scores_score_collaborators import ScoresScoreCollaborators -from flat_api.apis.paths.scores_score_collaborators_collaborator import ScoresScoreCollaboratorsCollaborator -from flat_api.apis.paths.scores_score_tracks import ScoresScoreTracks -from flat_api.apis.paths.scores_score_tracks_track import ScoresScoreTracksTrack -from flat_api.apis.paths.scores_score_comments import ScoresScoreComments -from flat_api.apis.paths.scores_score_comments_comment import ScoresScoreCommentsComment -from flat_api.apis.paths.scores_score_comments_comment_resolved import ScoresScoreCommentsCommentResolved -from flat_api.apis.paths.scores_score_revisions import ScoresScoreRevisions -from flat_api.apis.paths.scores_score_revisions_revision import ScoresScoreRevisionsRevision -from flat_api.apis.paths.scores_score_revisions_revision_format import ScoresScoreRevisionsRevisionFormat -from flat_api.apis.paths.scores_score_revisions_revision_format_task import ScoresScoreRevisionsRevisionFormatTask -from flat_api.apis.paths.collections import Collections -from flat_api.apis.paths.collections_collection import CollectionsCollection -from flat_api.apis.paths.collections_collection_untrash import CollectionsCollectionUntrash -from flat_api.apis.paths.collections_collection_scores import CollectionsCollectionScores -from flat_api.apis.paths.collections_collection_scores_score import CollectionsCollectionScoresScore -from flat_api.apis.paths.tasks_task import TasksTask -from flat_api.apis.paths.users_user import UsersUser -from flat_api.apis.paths.users_user_likes import UsersUserLikes -from flat_api.apis.paths.users_user_scores import UsersUserScores -from flat_api.apis.paths.organizations_users import OrganizationsUsers -from flat_api.apis.paths.organizations_users_count import OrganizationsUsersCount -from flat_api.apis.paths.organizations_users_user import OrganizationsUsersUser -from flat_api.apis.paths.organizations_users_user_signin_link import OrganizationsUsersUserSigninLink -from flat_api.apis.paths.organizations_users_user_access_token import OrganizationsUsersUserAccessToken -from flat_api.apis.paths.organizations_invitations import OrganizationsInvitations -from flat_api.apis.paths.organizations_invitations_invitation import OrganizationsInvitationsInvitation -from flat_api.apis.paths.organizations_lti_credentials import OrganizationsLtiCredentials -from flat_api.apis.paths.organizations_lti_credentials_credentials import OrganizationsLtiCredentialsCredentials -from flat_api.apis.paths.classes import Classes -from flat_api.apis.paths.classes_class import ClassesClass -from flat_api.apis.paths.classes_class_archive import ClassesClassArchive -from flat_api.apis.paths.classes_class_activate import ClassesClassActivate -from flat_api.apis.paths.classes_class_users_user import ClassesClassUsersUser -from flat_api.apis.paths.classes_class_students_user_submissions import ClassesClassStudentsUserSubmissions -from flat_api.apis.paths.classes_class_assignments import ClassesClassAssignments -from flat_api.apis.paths.classes_class_assignments_assignment_copy import ClassesClassAssignmentsAssignmentCopy -from flat_api.apis.paths.classes_class_assignments_assignment_archive import ClassesClassAssignmentsAssignmentArchive -from flat_api.apis.paths.classes_class_assignments_assignment_submissions import ClassesClassAssignmentsAssignmentSubmissions -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_csv import ClassesClassAssignmentsAssignmentSubmissionsCsv -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_excel import ClassesClassAssignmentsAssignmentSubmissionsExcel -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission import ClassesClassAssignmentsAssignmentSubmissionsSubmission -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_history import ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_comments import ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments -from flat_api.apis.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment -from flat_api.apis.paths.classes_class_test_student import ClassesClassTestStudent -from flat_api.apis.paths.classes_enroll_enrollment_code import ClassesEnrollEnrollmentCode -from flat_api.apis.paths.groups_group import GroupsGroup -from flat_api.apis.paths.groups_group_users import GroupsGroupUsers -from flat_api.apis.paths.groups_group_scores import GroupsGroupScores -from flat_api.apis.paths.edu_resources import EduResources -from flat_api.apis.paths.edu_resources_libraries import EduResourcesLibraries -from flat_api.apis.paths.edu_resources_resource import EduResourcesResource -from flat_api.apis.paths.edu_resources_resource_move import EduResourcesResourceMove -from flat_api.apis.paths.edu_resources_resource_copy import EduResourcesResourceCopy -from flat_api.apis.paths.edu_resources_resource_copy_to_demo_class import EduResourcesResourceCopyToDemoClass -from flat_api.apis.paths.edu_resources_resource_use_in_class import EduResourcesResourceUseInClass -from flat_api.apis.paths.edu_resources_resource_assignment import EduResourcesResourceAssignment - -PathToApi = typing_extensions.TypedDict( - 'PathToApi', - { - PathValues.ME: Me, - PathValues.SCORES: Scores, - PathValues.SCORES_SCORE: ScoresScore, - PathValues.SCORES_SCORE_UNTRASH: ScoresScoreUntrash, - PathValues.SCORES_SCORE_SUBMISSIONS: ScoresScoreSubmissions, - PathValues.SCORES_SCORE_FORK: ScoresScoreFork, - PathValues.SCORES_SCORE_COLLABORATORS: ScoresScoreCollaborators, - PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR: ScoresScoreCollaboratorsCollaborator, - PathValues.SCORES_SCORE_TRACKS: ScoresScoreTracks, - PathValues.SCORES_SCORE_TRACKS_TRACK: ScoresScoreTracksTrack, - PathValues.SCORES_SCORE_COMMENTS: ScoresScoreComments, - PathValues.SCORES_SCORE_COMMENTS_COMMENT: ScoresScoreCommentsComment, - PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED: ScoresScoreCommentsCommentResolved, - PathValues.SCORES_SCORE_REVISIONS: ScoresScoreRevisions, - PathValues.SCORES_SCORE_REVISIONS_REVISION: ScoresScoreRevisionsRevision, - PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT: ScoresScoreRevisionsRevisionFormat, - PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK: ScoresScoreRevisionsRevisionFormatTask, - PathValues.COLLECTIONS: Collections, - PathValues.COLLECTIONS_COLLECTION: CollectionsCollection, - PathValues.COLLECTIONS_COLLECTION_UNTRASH: CollectionsCollectionUntrash, - PathValues.COLLECTIONS_COLLECTION_SCORES: CollectionsCollectionScores, - PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE: CollectionsCollectionScoresScore, - PathValues.TASKS_TASK: TasksTask, - PathValues.USERS_USER: UsersUser, - PathValues.USERS_USER_LIKES: UsersUserLikes, - PathValues.USERS_USER_SCORES: UsersUserScores, - PathValues.ORGANIZATIONS_USERS: OrganizationsUsers, - PathValues.ORGANIZATIONS_USERS_COUNT: OrganizationsUsersCount, - PathValues.ORGANIZATIONS_USERS_USER: OrganizationsUsersUser, - PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK: OrganizationsUsersUserSigninLink, - PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN: OrganizationsUsersUserAccessToken, - PathValues.ORGANIZATIONS_INVITATIONS: OrganizationsInvitations, - PathValues.ORGANIZATIONS_INVITATIONS_INVITATION: OrganizationsInvitationsInvitation, - PathValues.ORGANIZATIONS_LTI_CREDENTIALS: OrganizationsLtiCredentials, - PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS: OrganizationsLtiCredentialsCredentials, - PathValues.CLASSES: Classes, - PathValues.CLASSES_CLASS: ClassesClass, - PathValues.CLASSES_CLASS_ARCHIVE: ClassesClassArchive, - PathValues.CLASSES_CLASS_ACTIVATE: ClassesClassActivate, - PathValues.CLASSES_CLASS_USERS_USER: ClassesClassUsersUser, - PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS: ClassesClassStudentsUserSubmissions, - PathValues.CLASSES_CLASS_ASSIGNMENTS: ClassesClassAssignments, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY: ClassesClassAssignmentsAssignmentCopy, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE: ClassesClassAssignmentsAssignmentArchive, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS: ClassesClassAssignmentsAssignmentSubmissions, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV: ClassesClassAssignmentsAssignmentSubmissionsCsv, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL: ClassesClassAssignmentsAssignmentSubmissionsExcel, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION: ClassesClassAssignmentsAssignmentSubmissionsSubmission, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY: ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS: ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT: ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment, - PathValues.CLASSES_CLASS_TEST_STUDENT: ClassesClassTestStudent, - PathValues.CLASSES_ENROLL_ENROLLMENT_CODE: ClassesEnrollEnrollmentCode, - PathValues.GROUPS_GROUP: GroupsGroup, - PathValues.GROUPS_GROUP_USERS: GroupsGroupUsers, - PathValues.GROUPS_GROUP_SCORES: GroupsGroupScores, - PathValues.EDU_RESOURCES: EduResources, - PathValues.EDU_RESOURCES_LIBRARIES: EduResourcesLibraries, - PathValues.EDU_RESOURCES_RESOURCE: EduResourcesResource, - PathValues.EDU_RESOURCES_RESOURCE_MOVE: EduResourcesResourceMove, - PathValues.EDU_RESOURCES_RESOURCE_COPY: EduResourcesResourceCopy, - PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS: EduResourcesResourceCopyToDemoClass, - PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS: EduResourcesResourceUseInClass, - PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT: EduResourcesResourceAssignment, - } -) - -path_to_api = PathToApi( - { - PathValues.ME: Me, - PathValues.SCORES: Scores, - PathValues.SCORES_SCORE: ScoresScore, - PathValues.SCORES_SCORE_UNTRASH: ScoresScoreUntrash, - PathValues.SCORES_SCORE_SUBMISSIONS: ScoresScoreSubmissions, - PathValues.SCORES_SCORE_FORK: ScoresScoreFork, - PathValues.SCORES_SCORE_COLLABORATORS: ScoresScoreCollaborators, - PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR: ScoresScoreCollaboratorsCollaborator, - PathValues.SCORES_SCORE_TRACKS: ScoresScoreTracks, - PathValues.SCORES_SCORE_TRACKS_TRACK: ScoresScoreTracksTrack, - PathValues.SCORES_SCORE_COMMENTS: ScoresScoreComments, - PathValues.SCORES_SCORE_COMMENTS_COMMENT: ScoresScoreCommentsComment, - PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED: ScoresScoreCommentsCommentResolved, - PathValues.SCORES_SCORE_REVISIONS: ScoresScoreRevisions, - PathValues.SCORES_SCORE_REVISIONS_REVISION: ScoresScoreRevisionsRevision, - PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT: ScoresScoreRevisionsRevisionFormat, - PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK: ScoresScoreRevisionsRevisionFormatTask, - PathValues.COLLECTIONS: Collections, - PathValues.COLLECTIONS_COLLECTION: CollectionsCollection, - PathValues.COLLECTIONS_COLLECTION_UNTRASH: CollectionsCollectionUntrash, - PathValues.COLLECTIONS_COLLECTION_SCORES: CollectionsCollectionScores, - PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE: CollectionsCollectionScoresScore, - PathValues.TASKS_TASK: TasksTask, - PathValues.USERS_USER: UsersUser, - PathValues.USERS_USER_LIKES: UsersUserLikes, - PathValues.USERS_USER_SCORES: UsersUserScores, - PathValues.ORGANIZATIONS_USERS: OrganizationsUsers, - PathValues.ORGANIZATIONS_USERS_COUNT: OrganizationsUsersCount, - PathValues.ORGANIZATIONS_USERS_USER: OrganizationsUsersUser, - PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK: OrganizationsUsersUserSigninLink, - PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN: OrganizationsUsersUserAccessToken, - PathValues.ORGANIZATIONS_INVITATIONS: OrganizationsInvitations, - PathValues.ORGANIZATIONS_INVITATIONS_INVITATION: OrganizationsInvitationsInvitation, - PathValues.ORGANIZATIONS_LTI_CREDENTIALS: OrganizationsLtiCredentials, - PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS: OrganizationsLtiCredentialsCredentials, - PathValues.CLASSES: Classes, - PathValues.CLASSES_CLASS: ClassesClass, - PathValues.CLASSES_CLASS_ARCHIVE: ClassesClassArchive, - PathValues.CLASSES_CLASS_ACTIVATE: ClassesClassActivate, - PathValues.CLASSES_CLASS_USERS_USER: ClassesClassUsersUser, - PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS: ClassesClassStudentsUserSubmissions, - PathValues.CLASSES_CLASS_ASSIGNMENTS: ClassesClassAssignments, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY: ClassesClassAssignmentsAssignmentCopy, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE: ClassesClassAssignmentsAssignmentArchive, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS: ClassesClassAssignmentsAssignmentSubmissions, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV: ClassesClassAssignmentsAssignmentSubmissionsCsv, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL: ClassesClassAssignmentsAssignmentSubmissionsExcel, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION: ClassesClassAssignmentsAssignmentSubmissionsSubmission, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY: ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS: ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments, - PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT: ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment, - PathValues.CLASSES_CLASS_TEST_STUDENT: ClassesClassTestStudent, - PathValues.CLASSES_ENROLL_ENROLLMENT_CODE: ClassesEnrollEnrollmentCode, - PathValues.GROUPS_GROUP: GroupsGroup, - PathValues.GROUPS_GROUP_USERS: GroupsGroupUsers, - PathValues.GROUPS_GROUP_SCORES: GroupsGroupScores, - PathValues.EDU_RESOURCES: EduResources, - PathValues.EDU_RESOURCES_LIBRARIES: EduResourcesLibraries, - PathValues.EDU_RESOURCES_RESOURCE: EduResourcesResource, - PathValues.EDU_RESOURCES_RESOURCE_MOVE: EduResourcesResourceMove, - PathValues.EDU_RESOURCES_RESOURCE_COPY: EduResourcesResourceCopy, - PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS: EduResourcesResourceCopyToDemoClass, - PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS: EduResourcesResourceUseInClass, - PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT: EduResourcesResourceAssignment, - } -) diff --git a/flat_api/apis/paths/__init__.py b/flat_api/apis/paths/__init__.py deleted file mode 100644 index 3fdcb1a..0000000 --- a/flat_api/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.apis.path_to_api import path_to_api diff --git a/flat_api/apis/paths/classes.py b/flat_api/apis/paths/classes.py deleted file mode 100644 index 4585167..0000000 --- a/flat_api/apis/paths/classes.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes.get import ApiForget -from flat_api.paths.classes.post import ApiForpost - - -class Classes( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class.py b/flat_api/apis/paths/classes_class.py deleted file mode 100644 index 3d4922c..0000000 --- a/flat_api/apis/paths/classes_class.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class.get import ApiForget -from flat_api.paths.classes_class.put import ApiForput - - -class ClassesClass( - ApiForget, - ApiForput, -): - pass diff --git a/flat_api/apis/paths/classes_class_activate.py b/flat_api/apis/paths/classes_class_activate.py deleted file mode 100644 index 198bed8..0000000 --- a/flat_api/apis/paths/classes_class_activate.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_activate.post import ApiForpost - - -class ClassesClassActivate( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class_archive.py b/flat_api/apis/paths/classes_class_archive.py deleted file mode 100644 index e2d987a..0000000 --- a/flat_api/apis/paths/classes_class_archive.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_archive.post import ApiForpost -from flat_api.paths.classes_class_archive.delete import ApiFordelete - - -class ClassesClassArchive( - ApiForpost, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments.py b/flat_api/apis/paths/classes_class_assignments.py deleted file mode 100644 index a77d0f0..0000000 --- a/flat_api/apis/paths/classes_class_assignments.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_assignments.get import ApiForget -from flat_api.paths.classes_class_assignments.post import ApiForpost - - -class ClassesClassAssignments( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_archive.py b/flat_api/apis/paths/classes_class_assignments_assignment_archive.py deleted file mode 100644 index 8fe80d0..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_archive.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_archive.post import ApiForpost -from flat_api.paths.classes_class_assignments_assignment_archive.delete import ApiFordelete - - -class ClassesClassAssignmentsAssignmentArchive( - ApiForpost, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_copy.py b/flat_api/apis/paths/classes_class_assignments_assignment_copy.py deleted file mode 100644 index db80313..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_copy.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_copy.post import ApiForpost - - -class ClassesClassAssignmentsAssignmentCopy( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py deleted file mode 100644 index 6f2bf87..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions.get import ApiForget -from flat_api.paths.classes_class_assignments_assignment_submissions.put import ApiForput - - -class ClassesClassAssignmentsAssignmentSubmissions( - ApiForget, - ApiForput, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py deleted file mode 100644 index 2041b73..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_csv.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_csv.get import ApiForget - - -class ClassesClassAssignmentsAssignmentSubmissionsCsv( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py deleted file mode 100644 index 024355a..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_excel.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_excel.get import ApiForget - - -class ClassesClassAssignmentsAssignmentSubmissionsExcel( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py deleted file mode 100644 index 6f7422c..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission.py +++ /dev/null @@ -1,11 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.get import ApiForget -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.put import ApiForput -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.delete import ApiFordelete - - -class ClassesClassAssignmentsAssignmentSubmissionsSubmission( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py deleted file mode 100644 index e494234..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.get import ApiForget -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.post import ApiForpost - - -class ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py deleted file mode 100644 index 61cb69a..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_comments_comment.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.put import ApiForput -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.delete import ApiFordelete - - -class ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py b/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py deleted file mode 100644 index 4dc3e5a..0000000 --- a/flat_api/apis/paths/classes_class_assignments_assignment_submissions_submission_history.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history.get import ApiForget - - -class ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/classes_class_students_user_submissions.py b/flat_api/apis/paths/classes_class_students_user_submissions.py deleted file mode 100644 index 625d7ab..0000000 --- a/flat_api/apis/paths/classes_class_students_user_submissions.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_students_user_submissions.get import ApiForget - - -class ClassesClassStudentsUserSubmissions( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/classes_class_test_student.py b/flat_api/apis/paths/classes_class_test_student.py deleted file mode 100644 index 18a7a20..0000000 --- a/flat_api/apis/paths/classes_class_test_student.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_class_test_student.post import ApiForpost - - -class ClassesClassTestStudent( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/classes_class_users_user.py b/flat_api/apis/paths/classes_class_users_user.py deleted file mode 100644 index 3f95af9..0000000 --- a/flat_api/apis/paths/classes_class_users_user.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.classes_class_users_user.put import ApiForput -from flat_api.paths.classes_class_users_user.delete import ApiFordelete - - -class ClassesClassUsersUser( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/classes_enroll_enrollment_code.py b/flat_api/apis/paths/classes_enroll_enrollment_code.py deleted file mode 100644 index ac3406b..0000000 --- a/flat_api/apis/paths/classes_enroll_enrollment_code.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.classes_enroll_enrollment_code.post import ApiForpost - - -class ClassesEnrollEnrollmentCode( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/collections.py b/flat_api/apis/paths/collections.py deleted file mode 100644 index e80f80c..0000000 --- a/flat_api/apis/paths/collections.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.collections.get import ApiForget -from flat_api.paths.collections.post import ApiForpost - - -class Collections( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/collections_collection.py b/flat_api/apis/paths/collections_collection.py deleted file mode 100644 index 215cd77..0000000 --- a/flat_api/apis/paths/collections_collection.py +++ /dev/null @@ -1,11 +0,0 @@ -from flat_api.paths.collections_collection.get import ApiForget -from flat_api.paths.collections_collection.put import ApiForput -from flat_api.paths.collections_collection.delete import ApiFordelete - - -class CollectionsCollection( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/collections_collection_scores.py b/flat_api/apis/paths/collections_collection_scores.py deleted file mode 100644 index 96746e5..0000000 --- a/flat_api/apis/paths/collections_collection_scores.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.collections_collection_scores.get import ApiForget - - -class CollectionsCollectionScores( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/collections_collection_scores_score.py b/flat_api/apis/paths/collections_collection_scores_score.py deleted file mode 100644 index 2ff692a..0000000 --- a/flat_api/apis/paths/collections_collection_scores_score.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.collections_collection_scores_score.put import ApiForput -from flat_api.paths.collections_collection_scores_score.delete import ApiFordelete - - -class CollectionsCollectionScoresScore( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/collections_collection_untrash.py b/flat_api/apis/paths/collections_collection_untrash.py deleted file mode 100644 index d93351e..0000000 --- a/flat_api/apis/paths/collections_collection_untrash.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.collections_collection_untrash.post import ApiForpost - - -class CollectionsCollectionUntrash( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/edu_resources.py b/flat_api/apis/paths/edu_resources.py deleted file mode 100644 index f4eaff0..0000000 --- a/flat_api/apis/paths/edu_resources.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.edu_resources.get import ApiForget -from flat_api.paths.edu_resources.post import ApiForpost - - -class EduResources( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/edu_resources_libraries.py b/flat_api/apis/paths/edu_resources_libraries.py deleted file mode 100644 index ac0e10d..0000000 --- a/flat_api/apis/paths/edu_resources_libraries.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_libraries.get import ApiForget - - -class EduResourcesLibraries( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource.py b/flat_api/apis/paths/edu_resources_resource.py deleted file mode 100644 index e425a6d..0000000 --- a/flat_api/apis/paths/edu_resources_resource.py +++ /dev/null @@ -1,11 +0,0 @@ -from flat_api.paths.edu_resources_resource.get import ApiForget -from flat_api.paths.edu_resources_resource.put import ApiForput -from flat_api.paths.edu_resources_resource.delete import ApiFordelete - - -class EduResourcesResource( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource_assignment.py b/flat_api/apis/paths/edu_resources_resource_assignment.py deleted file mode 100644 index fb3270e..0000000 --- a/flat_api/apis/paths/edu_resources_resource_assignment.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_resource_assignment.put import ApiForput - - -class EduResourcesResourceAssignment( - ApiForput, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource_copy.py b/flat_api/apis/paths/edu_resources_resource_copy.py deleted file mode 100644 index 5243f76..0000000 --- a/flat_api/apis/paths/edu_resources_resource_copy.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_resource_copy.post import ApiForpost - - -class EduResourcesResourceCopy( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py b/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py deleted file mode 100644 index 53044bc..0000000 --- a/flat_api/apis/paths/edu_resources_resource_copy_to_demo_class.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_resource_copy_to_demo_class.post import ApiForpost - - -class EduResourcesResourceCopyToDemoClass( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource_move.py b/flat_api/apis/paths/edu_resources_resource_move.py deleted file mode 100644 index a8f66bf..0000000 --- a/flat_api/apis/paths/edu_resources_resource_move.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_resource_move.post import ApiForpost - - -class EduResourcesResourceMove( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/edu_resources_resource_use_in_class.py b/flat_api/apis/paths/edu_resources_resource_use_in_class.py deleted file mode 100644 index 4bfc946..0000000 --- a/flat_api/apis/paths/edu_resources_resource_use_in_class.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.edu_resources_resource_use_in_class.post import ApiForpost - - -class EduResourcesResourceUseInClass( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/groups_group.py b/flat_api/apis/paths/groups_group.py deleted file mode 100644 index f1ab841..0000000 --- a/flat_api/apis/paths/groups_group.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.groups_group.get import ApiForget - - -class GroupsGroup( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/groups_group_scores.py b/flat_api/apis/paths/groups_group_scores.py deleted file mode 100644 index 57b6935..0000000 --- a/flat_api/apis/paths/groups_group_scores.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.groups_group_scores.get import ApiForget - - -class GroupsGroupScores( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/groups_group_users.py b/flat_api/apis/paths/groups_group_users.py deleted file mode 100644 index 8ad42cc..0000000 --- a/flat_api/apis/paths/groups_group_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.groups_group_users.get import ApiForget - - -class GroupsGroupUsers( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/me.py b/flat_api/apis/paths/me.py deleted file mode 100644 index 79c07b3..0000000 --- a/flat_api/apis/paths/me.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.me.get import ApiForget - - -class Me( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/organizations_invitations.py b/flat_api/apis/paths/organizations_invitations.py deleted file mode 100644 index 98ec5d0..0000000 --- a/flat_api/apis/paths/organizations_invitations.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.organizations_invitations.get import ApiForget -from flat_api.paths.organizations_invitations.post import ApiForpost - - -class OrganizationsInvitations( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/organizations_invitations_invitation.py b/flat_api/apis/paths/organizations_invitations_invitation.py deleted file mode 100644 index 3ffc4fb..0000000 --- a/flat_api/apis/paths/organizations_invitations_invitation.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.organizations_invitations_invitation.delete import ApiFordelete - - -class OrganizationsInvitationsInvitation( - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/organizations_lti_credentials.py b/flat_api/apis/paths/organizations_lti_credentials.py deleted file mode 100644 index 107b2a4..0000000 --- a/flat_api/apis/paths/organizations_lti_credentials.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.organizations_lti_credentials.get import ApiForget -from flat_api.paths.organizations_lti_credentials.post import ApiForpost - - -class OrganizationsLtiCredentials( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/organizations_lti_credentials_credentials.py b/flat_api/apis/paths/organizations_lti_credentials_credentials.py deleted file mode 100644 index a88cdc0..0000000 --- a/flat_api/apis/paths/organizations_lti_credentials_credentials.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.organizations_lti_credentials_credentials.delete import ApiFordelete - - -class OrganizationsLtiCredentialsCredentials( - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/organizations_users.py b/flat_api/apis/paths/organizations_users.py deleted file mode 100644 index e8eb946..0000000 --- a/flat_api/apis/paths/organizations_users.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.organizations_users.get import ApiForget -from flat_api.paths.organizations_users.post import ApiForpost - - -class OrganizationsUsers( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/organizations_users_count.py b/flat_api/apis/paths/organizations_users_count.py deleted file mode 100644 index 6e365b7..0000000 --- a/flat_api/apis/paths/organizations_users_count.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.organizations_users_count.get import ApiForget - - -class OrganizationsUsersCount( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/organizations_users_user.py b/flat_api/apis/paths/organizations_users_user.py deleted file mode 100644 index 15c68c2..0000000 --- a/flat_api/apis/paths/organizations_users_user.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.organizations_users_user.put import ApiForput -from flat_api.paths.organizations_users_user.delete import ApiFordelete - - -class OrganizationsUsersUser( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/organizations_users_user_access_token.py b/flat_api/apis/paths/organizations_users_user_access_token.py deleted file mode 100644 index 72a56ba..0000000 --- a/flat_api/apis/paths/organizations_users_user_access_token.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.organizations_users_user_access_token.post import ApiForpost - - -class OrganizationsUsersUserAccessToken( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/organizations_users_user_signin_link.py b/flat_api/apis/paths/organizations_users_user_signin_link.py deleted file mode 100644 index f5b7236..0000000 --- a/flat_api/apis/paths/organizations_users_user_signin_link.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.organizations_users_user_signin_link.post import ApiForpost - - -class OrganizationsUsersUserSigninLink( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores.py b/flat_api/apis/paths/scores.py deleted file mode 100644 index 6ef7c6b..0000000 --- a/flat_api/apis/paths/scores.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores.post import ApiForpost - - -class Scores( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score.py b/flat_api/apis/paths/scores_score.py deleted file mode 100644 index 52b501e..0000000 --- a/flat_api/apis/paths/scores_score.py +++ /dev/null @@ -1,11 +0,0 @@ -from flat_api.paths.scores_score.get import ApiForget -from flat_api.paths.scores_score.put import ApiForput -from flat_api.paths.scores_score.delete import ApiFordelete - - -class ScoresScore( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/scores_score_collaborators.py b/flat_api/apis/paths/scores_score_collaborators.py deleted file mode 100644 index 3c117ef..0000000 --- a/flat_api/apis/paths/scores_score_collaborators.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_collaborators.get import ApiForget -from flat_api.paths.scores_score_collaborators.post import ApiForpost - - -class ScoresScoreCollaborators( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_collaborators_collaborator.py b/flat_api/apis/paths/scores_score_collaborators_collaborator.py deleted file mode 100644 index 8e5721d..0000000 --- a/flat_api/apis/paths/scores_score_collaborators_collaborator.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_collaborators_collaborator.get import ApiForget -from flat_api.paths.scores_score_collaborators_collaborator.delete import ApiFordelete - - -class ScoresScoreCollaboratorsCollaborator( - ApiForget, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/scores_score_comments.py b/flat_api/apis/paths/scores_score_comments.py deleted file mode 100644 index 615dfd3..0000000 --- a/flat_api/apis/paths/scores_score_comments.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_comments.get import ApiForget -from flat_api.paths.scores_score_comments.post import ApiForpost - - -class ScoresScoreComments( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_comments_comment.py b/flat_api/apis/paths/scores_score_comments_comment.py deleted file mode 100644 index 302d0d3..0000000 --- a/flat_api/apis/paths/scores_score_comments_comment.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_comments_comment.put import ApiForput -from flat_api.paths.scores_score_comments_comment.delete import ApiFordelete - - -class ScoresScoreCommentsComment( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/scores_score_comments_comment_resolved.py b/flat_api/apis/paths/scores_score_comments_comment_resolved.py deleted file mode 100644 index 603e7ec..0000000 --- a/flat_api/apis/paths/scores_score_comments_comment_resolved.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_comments_comment_resolved.put import ApiForput -from flat_api.paths.scores_score_comments_comment_resolved.delete import ApiFordelete - - -class ScoresScoreCommentsCommentResolved( - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/scores_score_fork.py b/flat_api/apis/paths/scores_score_fork.py deleted file mode 100644 index c02e361..0000000 --- a/flat_api/apis/paths/scores_score_fork.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_fork.post import ApiForpost - - -class ScoresScoreFork( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_revisions.py b/flat_api/apis/paths/scores_score_revisions.py deleted file mode 100644 index 2f1c3b9..0000000 --- a/flat_api/apis/paths/scores_score_revisions.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_revisions.get import ApiForget -from flat_api.paths.scores_score_revisions.post import ApiForpost - - -class ScoresScoreRevisions( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision.py b/flat_api/apis/paths/scores_score_revisions_revision.py deleted file mode 100644 index 1d678ff..0000000 --- a/flat_api/apis/paths/scores_score_revisions_revision.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_revisions_revision.get import ApiForget - - -class ScoresScoreRevisionsRevision( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision_format.py b/flat_api/apis/paths/scores_score_revisions_revision_format.py deleted file mode 100644 index c0abe55..0000000 --- a/flat_api/apis/paths/scores_score_revisions_revision_format.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_revisions_revision_format.get import ApiForget - - -class ScoresScoreRevisionsRevisionFormat( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/scores_score_revisions_revision_format_task.py b/flat_api/apis/paths/scores_score_revisions_revision_format_task.py deleted file mode 100644 index f0e0c8b..0000000 --- a/flat_api/apis/paths/scores_score_revisions_revision_format_task.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_revisions_revision_format_task.post import ApiForpost - - -class ScoresScoreRevisionsRevisionFormatTask( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_submissions.py b/flat_api/apis/paths/scores_score_submissions.py deleted file mode 100644 index aabe8fc..0000000 --- a/flat_api/apis/paths/scores_score_submissions.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_submissions.get import ApiForget - - -class ScoresScoreSubmissions( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/scores_score_tracks.py b/flat_api/apis/paths/scores_score_tracks.py deleted file mode 100644 index 421f8d2..0000000 --- a/flat_api/apis/paths/scores_score_tracks.py +++ /dev/null @@ -1,9 +0,0 @@ -from flat_api.paths.scores_score_tracks.get import ApiForget -from flat_api.paths.scores_score_tracks.post import ApiForpost - - -class ScoresScoreTracks( - ApiForget, - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/scores_score_tracks_track.py b/flat_api/apis/paths/scores_score_tracks_track.py deleted file mode 100644 index 96e5e82..0000000 --- a/flat_api/apis/paths/scores_score_tracks_track.py +++ /dev/null @@ -1,11 +0,0 @@ -from flat_api.paths.scores_score_tracks_track.get import ApiForget -from flat_api.paths.scores_score_tracks_track.put import ApiForput -from flat_api.paths.scores_score_tracks_track.delete import ApiFordelete - - -class ScoresScoreTracksTrack( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/flat_api/apis/paths/scores_score_untrash.py b/flat_api/apis/paths/scores_score_untrash.py deleted file mode 100644 index 3e95359..0000000 --- a/flat_api/apis/paths/scores_score_untrash.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.scores_score_untrash.post import ApiForpost - - -class ScoresScoreUntrash( - ApiForpost, -): - pass diff --git a/flat_api/apis/paths/tasks_task.py b/flat_api/apis/paths/tasks_task.py deleted file mode 100644 index 6d0a5a7..0000000 --- a/flat_api/apis/paths/tasks_task.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.tasks_task.get import ApiForget - - -class TasksTask( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/users_user.py b/flat_api/apis/paths/users_user.py deleted file mode 100644 index 8d2e460..0000000 --- a/flat_api/apis/paths/users_user.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.users_user.get import ApiForget - - -class UsersUser( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/users_user_likes.py b/flat_api/apis/paths/users_user_likes.py deleted file mode 100644 index b4ea868..0000000 --- a/flat_api/apis/paths/users_user_likes.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.users_user_likes.get import ApiForget - - -class UsersUserLikes( - ApiForget, -): - pass diff --git a/flat_api/apis/paths/users_user_scores.py b/flat_api/apis/paths/users_user_scores.py deleted file mode 100644 index 5734be7..0000000 --- a/flat_api/apis/paths/users_user_scores.py +++ /dev/null @@ -1,7 +0,0 @@ -from flat_api.paths.users_user_scores.get import ApiForget - - -class UsersUserScores( - ApiForget, -): - pass diff --git a/flat_api/apis/tag_to_api.py b/flat_api/apis/tag_to_api.py deleted file mode 100644 index 3eb8e6d..0000000 --- a/flat_api/apis/tag_to_api.py +++ /dev/null @@ -1,41 +0,0 @@ -import typing_extensions - -from flat_api.apis.tags import TagValues -from flat_api.apis.tags.account_api import AccountApi -from flat_api.apis.tags.score_api import ScoreApi -from flat_api.apis.tags.collection_api import CollectionApi -from flat_api.apis.tags.user_api import UserApi -from flat_api.apis.tags.organization_api import OrganizationApi -from flat_api.apis.tags.model_class_api import ModelClassApi -from flat_api.apis.tags.edu_resources_api import EduResourcesApi -from flat_api.apis.tags.group_api import GroupApi -from flat_api.apis.tags.task_api import TaskApi - -TagToApi = typing_extensions.TypedDict( - 'TagToApi', - { - TagValues.ACCOUNT: AccountApi, - TagValues.SCORE: ScoreApi, - TagValues.COLLECTION: CollectionApi, - TagValues.USER: UserApi, - TagValues.ORGANIZATION: OrganizationApi, - TagValues.CLASS: ModelClassApi, - TagValues.EDU_RESOURCES: EduResourcesApi, - TagValues.GROUP: GroupApi, - TagValues.TASK: TaskApi, - } -) - -tag_to_api = TagToApi( - { - TagValues.ACCOUNT: AccountApi, - TagValues.SCORE: ScoreApi, - TagValues.COLLECTION: CollectionApi, - TagValues.USER: UserApi, - TagValues.ORGANIZATION: OrganizationApi, - TagValues.CLASS: ModelClassApi, - TagValues.EDU_RESOURCES: EduResourcesApi, - TagValues.GROUP: GroupApi, - TagValues.TASK: TaskApi, - } -) diff --git a/flat_api/apis/tags/__init__.py b/flat_api/apis/tags/__init__.py deleted file mode 100644 index 87dadc1..0000000 --- a/flat_api/apis/tags/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.apis.tag_to_api import tag_to_api - -import enum - - -class TagValues(str, enum.Enum): - ACCOUNT = "Account" - SCORE = "Score" - COLLECTION = "Collection" - USER = "User" - ORGANIZATION = "Organization" - CLASS = "Class" - EDU_RESOURCES = "EduResources" - GROUP = "Group" - TASK = "Task" diff --git a/flat_api/apis/tags/account_api.py b/flat_api/apis/tags/account_api.py deleted file mode 100644 index bf92799..0000000 --- a/flat_api/apis/tags/account_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.me.get import GetAuthenticatedUser - - -class AccountApi( - GetAuthenticatedUser, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/collection_api.py b/flat_api/apis/tags/collection_api.py deleted file mode 100644 index 274ab61..0000000 --- a/flat_api/apis/tags/collection_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.collections_collection_scores_score.put import AddScoreToCollection -from flat_api.paths.collections.post import CreateCollection -from flat_api.paths.collections_collection.delete import DeleteCollection -from flat_api.paths.collections_collection_scores_score.delete import DeleteScoreFromCollection -from flat_api.paths.collections_collection.put import EditCollection -from flat_api.paths.collections_collection.get import GetCollection -from flat_api.paths.collections_collection_scores.get import ListCollectionScores -from flat_api.paths.collections.get import ListCollections -from flat_api.paths.collections_collection_untrash.post import UntrashCollection - - -class CollectionApi( - AddScoreToCollection, - CreateCollection, - DeleteCollection, - DeleteScoreFromCollection, - EditCollection, - GetCollection, - ListCollectionScores, - ListCollections, - UntrashCollection, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/edu_resources_api.py b/flat_api/apis/tags/edu_resources_api.py deleted file mode 100644 index 788a2f7..0000000 --- a/flat_api/apis/tags/edu_resources_api.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.edu_resources_resource_copy.post import CopyEduResource -from flat_api.paths.edu_resources_resource_copy_to_demo_class.post import CopyEduResourceToDemoClass -from flat_api.paths.edu_resources.post import CreateEduResource -from flat_api.paths.edu_resources_resource.delete import DeleteEduResource -from flat_api.paths.edu_resources_resource.get import GetEduResource -from flat_api.paths.edu_resources_libraries.get import ListEduLibraries -from flat_api.paths.edu_resources.get import ListEduResources -from flat_api.paths.edu_resources_resource_move.post import MoveEduResource -from flat_api.paths.edu_resources_resource.put import UpdateEduResource -from flat_api.paths.edu_resources_resource_assignment.put import UpdateEduResourceAssignment -from flat_api.paths.edu_resources_resource_use_in_class.post import UseEduResourceInClass - - -class EduResourcesApi( - CopyEduResource, - CopyEduResourceToDemoClass, - CreateEduResource, - DeleteEduResource, - GetEduResource, - ListEduLibraries, - ListEduResources, - MoveEduResource, - UpdateEduResource, - UpdateEduResourceAssignment, - UseEduResourceInClass, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/group_api.py b/flat_api/apis/tags/group_api.py deleted file mode 100644 index 7d8d5b1..0000000 --- a/flat_api/apis/tags/group_api.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.groups_group.get import GetGroupDetails -from flat_api.paths.groups_group_scores.get import GetGroupScores -from flat_api.paths.groups_group_users.get import ListGroupUsers - - -class GroupApi( - GetGroupDetails, - GetGroupScores, - ListGroupUsers, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/model_class_api.py b/flat_api/apis/tags/model_class_api.py deleted file mode 100644 index 5371d4d..0000000 --- a/flat_api/apis/tags/model_class_api.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.classes_class_activate.post import ActivateClass -from flat_api.paths.classes_class_users_user.put import AddClassUser -from flat_api.paths.classes_class_assignments_assignment_archive.post import ArchiveAssignment -from flat_api.paths.classes_class_archive.post import ArchiveClass -from flat_api.paths.classes_class_assignments_assignment_copy.post import CopyAssignment -from flat_api.paths.classes.post import CreateClass -from flat_api.paths.classes_class_assignments.post import CreateClassAssignment -from flat_api.paths.classes_class_assignments_assignment_submissions.put import CreateSubmission -from flat_api.paths.classes_class_test_student.post import CreateTestStudentAccount -from flat_api.paths.classes_class_users_user.delete import DeleteClassUser -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.delete import DeleteSubmission -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.delete import DeleteSubmissionComment -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.put import EditSubmission -from flat_api.paths.classes_enroll_enrollment_code.post import EnrollClass -from flat_api.paths.classes_class_assignments_assignment_submissions_csv.get import ExportSubmissionsReviewsAsCsv -from flat_api.paths.classes_class_assignments_assignment_submissions_excel.get import ExportSubmissionsReviewsAsExcel -from flat_api.paths.classes_class.get import GetClass -from flat_api.paths.scores_score_submissions.get import GetScoreSubmissions -from flat_api.paths.classes_class_assignments_assignment_submissions_submission.get import GetSubmission -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.get import GetSubmissionComments -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history.get import GetSubmissionHistory -from flat_api.paths.classes_class_assignments_assignment_submissions.get import GetSubmissions -from flat_api.paths.classes_class_assignments.get import ListAssignments -from flat_api.paths.classes_class_students_user_submissions.get import ListClassStudentSubmissions -from flat_api.paths.classes.get import ListClasses -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments.post import PostSubmissionComment -from flat_api.paths.classes_class_assignments_assignment_archive.delete import UnarchiveAssignment -from flat_api.paths.classes_class_archive.delete import UnarchiveClass -from flat_api.paths.classes_class.put import UpdateClass -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment.put import UpdateSubmissionComment - - -class ModelClassApi( - ActivateClass, - AddClassUser, - ArchiveAssignment, - ArchiveClass, - CopyAssignment, - CreateClass, - CreateClassAssignment, - CreateSubmission, - CreateTestStudentAccount, - DeleteClassUser, - DeleteSubmission, - DeleteSubmissionComment, - EditSubmission, - EnrollClass, - ExportSubmissionsReviewsAsCsv, - ExportSubmissionsReviewsAsExcel, - GetClass, - GetScoreSubmissions, - GetSubmission, - GetSubmissionComments, - GetSubmissionHistory, - GetSubmissions, - ListAssignments, - ListClassStudentSubmissions, - ListClasses, - PostSubmissionComment, - UnarchiveAssignment, - UnarchiveClass, - UpdateClass, - UpdateSubmissionComment, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/organization_api.py b/flat_api/apis/tags/organization_api.py deleted file mode 100644 index e818ac4..0000000 --- a/flat_api/apis/tags/organization_api.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.organizations_users_count.get import CountOrgaUsers -from flat_api.paths.organizations_lti_credentials.post import CreateLtiCredentials -from flat_api.paths.organizations_invitations.post import CreateOrganizationInvitation -from flat_api.paths.organizations_users.post import CreateOrganizationUser -from flat_api.paths.organizations_users_user_access_token.post import CreateOrganizationUserAccessToken -from flat_api.paths.organizations_users_user_signin_link.post import CreateOrganizationUserSigninLink -from flat_api.paths.organizations_lti_credentials.get import ListLtiCredentials -from flat_api.paths.organizations_invitations.get import ListOrganizationInvitations -from flat_api.paths.organizations_users.get import ListOrganizationUsers -from flat_api.paths.organizations_invitations_invitation.delete import RemoveOrganizationInvitation -from flat_api.paths.organizations_users_user.delete import RemoveOrganizationUser -from flat_api.paths.organizations_lti_credentials_credentials.delete import RevokeLtiCredentials -from flat_api.paths.organizations_users_user.put import UpdateOrganizationUser - - -class OrganizationApi( - CountOrgaUsers, - CreateLtiCredentials, - CreateOrganizationInvitation, - CreateOrganizationUser, - CreateOrganizationUserAccessToken, - CreateOrganizationUserSigninLink, - ListLtiCredentials, - ListOrganizationInvitations, - ListOrganizationUsers, - RemoveOrganizationInvitation, - RemoveOrganizationUser, - RevokeLtiCredentials, - UpdateOrganizationUser, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/score_api.py b/flat_api/apis/tags/score_api.py deleted file mode 100644 index de8b1f0..0000000 --- a/flat_api/apis/tags/score_api.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.scores_score_collaborators.post import AddScoreCollaborator -from flat_api.paths.scores_score_tracks.post import AddScoreTrack -from flat_api.paths.scores_score_revisions_revision_format_task.post import CreateExportTask -from flat_api.paths.scores.post import CreateScore -from flat_api.paths.scores_score_revisions.post import CreateScoreRevision -from flat_api.paths.scores_score.delete import DeleteScore -from flat_api.paths.scores_score_comments_comment.delete import DeleteScoreComment -from flat_api.paths.scores_score_tracks_track.delete import DeleteScoreTrack -from flat_api.paths.scores_score.put import EditScore -from flat_api.paths.scores_score_fork.post import ForkScore -from flat_api.paths.users_user_likes.get import GerUserLikes -from flat_api.paths.groups_group_scores.get import GetGroupScores -from flat_api.paths.scores_score.get import GetScore -from flat_api.paths.scores_score_collaborators_collaborator.get import GetScoreCollaborator -from flat_api.paths.scores_score_collaborators.get import GetScoreCollaborators -from flat_api.paths.scores_score_comments.get import GetScoreComments -from flat_api.paths.scores_score_revisions_revision.get import GetScoreRevision -from flat_api.paths.scores_score_revisions_revision_format.get import GetScoreRevisionData -from flat_api.paths.scores_score_revisions.get import GetScoreRevisions -from flat_api.paths.scores_score_submissions.get import GetScoreSubmissions -from flat_api.paths.scores_score_tracks_track.get import GetScoreTrack -from flat_api.paths.users_user_scores.get import GetUserScores -from flat_api.paths.scores_score_tracks.get import ListScoreTracks -from flat_api.paths.scores_score_comments_comment_resolved.put import MarkScoreCommentResolved -from flat_api.paths.scores_score_comments_comment_resolved.delete import MarkScoreCommentUnresolved -from flat_api.paths.scores_score_comments.post import PostScoreComment -from flat_api.paths.scores_score_collaborators_collaborator.delete import RemoveScoreCollaborator -from flat_api.paths.scores_score_untrash.post import UntrashScore -from flat_api.paths.scores_score_comments_comment.put import UpdateScoreComment -from flat_api.paths.scores_score_tracks_track.put import UpdateScoreTrack - - -class ScoreApi( - AddScoreCollaborator, - AddScoreTrack, - CreateExportTask, - CreateScore, - CreateScoreRevision, - DeleteScore, - DeleteScoreComment, - DeleteScoreTrack, - EditScore, - ForkScore, - GerUserLikes, - GetGroupScores, - GetScore, - GetScoreCollaborator, - GetScoreCollaborators, - GetScoreComments, - GetScoreRevision, - GetScoreRevisionData, - GetScoreRevisions, - GetScoreSubmissions, - GetScoreTrack, - GetUserScores, - ListScoreTracks, - MarkScoreCommentResolved, - MarkScoreCommentUnresolved, - PostScoreComment, - RemoveScoreCollaborator, - UntrashScore, - UpdateScoreComment, - UpdateScoreTrack, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/task_api.py b/flat_api/apis/tags/task_api.py deleted file mode 100644 index af0f9b8..0000000 --- a/flat_api/apis/tags/task_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.tasks_task.get import GetTask - - -class TaskApi( - GetTask, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/apis/tags/user_api.py b/flat_api/apis/tags/user_api.py deleted file mode 100644 index ccefa50..0000000 --- a/flat_api/apis/tags/user_api.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from flat_api.paths.users_user_likes.get import GerUserLikes -from flat_api.paths.users_user.get import GetUser -from flat_api.paths.users_user_scores.get import GetUserScores - - -class UserApi( - GerUserLikes, - GetUser, - GetUserScores, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/flat_api/configuration.py b/flat_api/configuration.py index cd13954..d3afa29 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import copy import logging import multiprocessing @@ -23,8 +22,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', + 'minLength', 'pattern', 'maxItems', 'minItems' } class Configuration(object): @@ -76,23 +74,24 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: """ _default = None - def __init__( - self, - host=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - access_token=None, - ): + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): """Constructor """ self._base_path = "https://api.flat.io/v2" if host is None else host @@ -110,10 +109,28 @@ def __init__( """Temp file folder for downloading files """ # Authentication Settings - self.disabled_client_side_validations = disabled_client_side_validations - self.access_token = None - """access token for OAuth/Bearer + self.access_token = access_token + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ @@ -140,7 +157,7 @@ def __init__( Set this to false to skip verifying SSL certificate when calling API from https server. """ - self.ssl_ca_cert = None + self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ self.cert_file = None @@ -152,10 +169,6 @@ def __init__( self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -168,6 +181,9 @@ def __init__( self.proxy = None """Proxy URL """ + self.no_proxy = None + """bypass proxy for host in the no_proxy list. + """ self.proxy_headers = None """Proxy headers """ diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py index 68b2d7a..5f6bb9d 100644 --- a/flat_api/exceptions.py +++ b/flat_api/exceptions.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -9,10 +7,6 @@ Contact: developers@flat.io Generated by: https://openapi-generator.tech """ -import dataclasses -import typing - -from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -102,30 +96,23 @@ def __init__(self, msg, path_to_item=None): super(ApiKeyError, self).__init__(full_msg) -T = typing.TypeVar("T") - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: str - api_response: typing.Optional[T] = None - - @property - def body(self) -> typing.Union[str, bytes, None]: - if not self.api_response: - return None - return self.api_response.response.data +class ApiException(OpenApiException): - @property - def headers(self) -> typing.Optional[HTTPHeaderDict]: - if not self.api_response: - return None - return self.api_response.response.getheaders() + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( @@ -137,6 +124,30 @@ def __str__(self): return error_message +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/flat_api/model/api_access_token.py b/flat_api/model/api_access_token.py index 5cf3d15..9ecbc4e 100644 --- a/flat_api/model/api_access_token.py +++ b/flat_api/model/api_access_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,149 +8,283 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.app_scopes import AppScopes + globals()['AppScopes'] = AppScopes -class ApiAccessToken( - schemas.DictSchema -): + +class ApiAccessToken(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - An API access token + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + 'issued_date': (datetime,), # noqa: E501 + 'expiration_date': (datetime,), # noqa: E501 + 'scopes': ([AppScopes],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'token': 'token', # noqa: E501 + 'issued_date': 'issuedDate', # noqa: E501 + 'expiration_date': 'expirationDate', # noqa: E501 + 'scopes': 'scopes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApiAccessToken - a model defined in OpenAPI - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - token = schemas.StrSchema - issuedDate = schemas.DateTimeSchema - expirationDate = schemas.DateTimeSchema - - - class scopes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AppScopes']: - return AppScopes - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scopes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of this private token. [optional] # noqa: E501 + name (str): Name of the personal access token. [optional] # noqa: E501 + token (str): The token. This token will only be returned once, then only the first 4 characters will be returned. . [optional] # noqa: E501 + issued_date (datetime): The date then this token was issued . [optional] # noqa: E501 + expiration_date (datetime): The date then this token will expire . [optional] # noqa: E501 + scopes ([AppScopes]): The list of scopes associated to the token . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'AppScopes': - return super().__getitem__(i) - __annotations__ = { - "id": id, - "name": name, - "token": token, - "issuedDate": issuedDate, - "expirationDate": expirationDate, - "scopes": scopes, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issuedDate"]) -> MetaOapg.properties.issuedDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issuedDate"]) -> typing.Union[MetaOapg.properties.issuedDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> typing.Union[MetaOapg.properties.scopes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset, - issuedDate: typing.Union[MetaOapg.properties.issuedDate, str, datetime, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ApiAccessToken': - return super().__new__( - cls, - *_args, - id=id, - name=name, - token=token, - issuedDate=issuedDate, - expirationDate=expirationDate, - scopes=scopes, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.app_scopes import AppScopes + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApiAccessToken - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of this private token. [optional] # noqa: E501 + name (str): Name of the personal access token. [optional] # noqa: E501 + token (str): The token. This token will only be returned once, then only the first 4 characters will be returned. . [optional] # noqa: E501 + issued_date (datetime): The date then this token was issued . [optional] # noqa: E501 + expiration_date (datetime): The date then this token will expire . [optional] # noqa: E501 + scopes ([AppScopes]): The list of scopes associated to the token . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/api_access_token.pyi b/flat_api/model/api_access_token.pyi deleted file mode 100644 index 5cf3d15..0000000 --- a/flat_api/model/api_access_token.pyi +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ApiAccessToken( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - An API access token - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - token = schemas.StrSchema - issuedDate = schemas.DateTimeSchema - expirationDate = schemas.DateTimeSchema - - - class scopes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AppScopes']: - return AppScopes - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scopes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AppScopes': - return super().__getitem__(i) - __annotations__ = { - "id": id, - "name": name, - "token": token, - "issuedDate": issuedDate, - "expirationDate": expirationDate, - "scopes": scopes, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issuedDate"]) -> MetaOapg.properties.issuedDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issuedDate"]) -> typing.Union[MetaOapg.properties.issuedDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> typing.Union[MetaOapg.properties.scopes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "token", "issuedDate", "expirationDate", "scopes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset, - issuedDate: typing.Union[MetaOapg.properties.issuedDate, str, datetime, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ApiAccessToken': - return super().__new__( - cls, - *_args, - id=id, - name=name, - token=token, - issuedDate=issuedDate, - expirationDate=expirationDate, - scopes=scopes, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/app_scopes.py b/flat_api/model/app_scopes.py index 3032118..6a711a6 100644 --- a/flat_api/model/app_scopes.py +++ b/flat_api/model/app_scopes.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,138 +8,303 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AppScopes( - schemas.EnumBase, - schemas.StrSchema -): +class AppScopes(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Available scopes + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ACCOUNT.PUBLIC_PROFILE': "account.public_profile", + 'ACCOUNT.EMAIL': "account.email", + 'ACCOUNT.EDUCATION_PROFILE': "account.education_profile", + 'SCORES.READONLY': "scores.readonly", + 'SCORES.SOCIAL': "scores.social", + 'SCORES': "scores", + 'COLLECTIONS.READONLY': "collections.readonly", + 'COLLECTIONS.ADD_SCORES': "collections.add_scores", + 'COLLECTIONS': "collections", + 'EDU.RESOURCES': "edu.resources", + 'EDU.RESOURCES.READONLY': "edu.resources.readonly", + 'EDU.CLASSES': "edu.classes", + 'EDU.CLASSES.READONLY': "edu.classes.readonly", + 'EDU.ASSIGNMENTS': "edu.assignments", + 'EDU.ASSIGNMENTS.READONLY': "edu.assignments.readonly", + 'EDU.ADMIN': "edu.admin", + 'EDU.ADMIN.LTI': "edu.admin.lti", + 'EDU.ADMIN.LTI.READONLY': "edu.admin.lti.readonly", + 'EDU.ADMIN.USERS': "edu.admin.users", + 'EDU.ADMIN.USERS.READONLY': "edu.admin.users.readonly", + 'TASKS.READONLY': "tasks.readonly", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "account.public_profile": "ACCOUNT_PUBLIC_PROFILE", - "account.email": "ACCOUNT_EMAIL", - "account.education_profile": "ACCOUNT_EDUCATION_PROFILE", - "scores.readonly": "SCORES_READONLY", - "scores.social": "SCORES_SOCIAL", - "scores": "SCORES", - "collections.readonly": "COLLECTIONS_READONLY", - "collections.add_scores": "COLLECTIONS_ADD_SCORES", - "collections": "COLLECTIONS", - "edu.resources": "EDU_RESOURCES", - "edu.resources.readonly": "EDU_RESOURCES_READONLY", - "edu.classes": "EDU_CLASSES", - "edu.classes.readonly": "EDU_CLASSES_READONLY", - "edu.assignments": "EDU_ASSIGNMENTS", - "edu.assignments.readonly": "EDU_ASSIGNMENTS_READONLY", - "edu.admin": "EDU_ADMIN", - "edu.admin.lti": "EDU_ADMIN_LTI", - "edu.admin.lti.readonly": "EDU_ADMIN_LTI_READONLY", - "edu.admin.users": "EDU_ADMIN_USERS", - "edu.admin.users.readonly": "EDU_ADMIN_USERS_READONLY", - "tasks.readonly": "TASKS_READONLY", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ACCOUNT_PUBLIC_PROFILE(cls): - return cls("account.public_profile") - - @schemas.classproperty - def ACCOUNT_EMAIL(cls): - return cls("account.email") - - @schemas.classproperty - def ACCOUNT_EDUCATION_PROFILE(cls): - return cls("account.education_profile") - - @schemas.classproperty - def SCORES_READONLY(cls): - return cls("scores.readonly") - - @schemas.classproperty - def SCORES_SOCIAL(cls): - return cls("scores.social") - - @schemas.classproperty - def SCORES(cls): - return cls("scores") - - @schemas.classproperty - def COLLECTIONS_READONLY(cls): - return cls("collections.readonly") - - @schemas.classproperty - def COLLECTIONS_ADD_SCORES(cls): - return cls("collections.add_scores") - - @schemas.classproperty - def COLLECTIONS(cls): - return cls("collections") - - @schemas.classproperty - def EDU_RESOURCES(cls): - return cls("edu.resources") - - @schemas.classproperty - def EDU_RESOURCES_READONLY(cls): - return cls("edu.resources.readonly") - - @schemas.classproperty - def EDU_CLASSES(cls): - return cls("edu.classes") - - @schemas.classproperty - def EDU_CLASSES_READONLY(cls): - return cls("edu.classes.readonly") - - @schemas.classproperty - def EDU_ASSIGNMENTS(cls): - return cls("edu.assignments") - - @schemas.classproperty - def EDU_ASSIGNMENTS_READONLY(cls): - return cls("edu.assignments.readonly") - - @schemas.classproperty - def EDU_ADMIN(cls): - return cls("edu.admin") - - @schemas.classproperty - def EDU_ADMIN_LTI(cls): - return cls("edu.admin.lti") - - @schemas.classproperty - def EDU_ADMIN_LTI_READONLY(cls): - return cls("edu.admin.lti.readonly") - - @schemas.classproperty - def EDU_ADMIN_USERS(cls): - return cls("edu.admin.users") - - @schemas.classproperty - def EDU_ADMIN_USERS_READONLY(cls): - return cls("edu.admin.users.readonly") - - @schemas.classproperty - def TASKS_READONLY(cls): - return cls("tasks.readonly") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AppScopes - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 + + Keyword Args: + value (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AppScopes - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 + + Keyword Args: + value (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/app_scopes.pyi b/flat_api/model/app_scopes.pyi deleted file mode 100644 index 8c9c2c8..0000000 --- a/flat_api/model/app_scopes.pyi +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AppScopes( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Available scopes - """ - - @schemas.classproperty - def ACCOUNT_PUBLIC_PROFILE(cls): - return cls("account.public_profile") - - @schemas.classproperty - def ACCOUNT_EMAIL(cls): - return cls("account.email") - - @schemas.classproperty - def ACCOUNT_EDUCATION_PROFILE(cls): - return cls("account.education_profile") - - @schemas.classproperty - def SCORES_READONLY(cls): - return cls("scores.readonly") - - @schemas.classproperty - def SCORES_SOCIAL(cls): - return cls("scores.social") - - @schemas.classproperty - def SCORES(cls): - return cls("scores") - - @schemas.classproperty - def COLLECTIONS_READONLY(cls): - return cls("collections.readonly") - - @schemas.classproperty - def COLLECTIONS_ADD_SCORES(cls): - return cls("collections.add_scores") - - @schemas.classproperty - def COLLECTIONS(cls): - return cls("collections") - - @schemas.classproperty - def EDU_RESOURCES(cls): - return cls("edu.resources") - - @schemas.classproperty - def EDU_RESOURCES_READONLY(cls): - return cls("edu.resources.readonly") - - @schemas.classproperty - def EDU_CLASSES(cls): - return cls("edu.classes") - - @schemas.classproperty - def EDU_CLASSES_READONLY(cls): - return cls("edu.classes.readonly") - - @schemas.classproperty - def EDU_ASSIGNMENTS(cls): - return cls("edu.assignments") - - @schemas.classproperty - def EDU_ASSIGNMENTS_READONLY(cls): - return cls("edu.assignments.readonly") - - @schemas.classproperty - def EDU_ADMIN(cls): - return cls("edu.admin") - - @schemas.classproperty - def EDU_ADMIN_LTI(cls): - return cls("edu.admin.lti") - - @schemas.classproperty - def EDU_ADMIN_LTI_READONLY(cls): - return cls("edu.admin.lti.readonly") - - @schemas.classproperty - def EDU_ADMIN_USERS(cls): - return cls("edu.admin.users") - - @schemas.classproperty - def EDU_ADMIN_USERS_READONLY(cls): - return cls("edu.admin.users.readonly") - - @schemas.classproperty - def TASKS_READONLY(cls): - return cls("tasks.readonly") diff --git a/flat_api/model/assignment.py b/flat_api/model/assignment.py index d1b9c1c..fecf50a 100644 --- a/flat_api/model/assignment.py +++ b/flat_api/model/assignment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,432 +8,337 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.media_attachment import MediaAttachment + globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities + globals()['AssignmentType'] = AssignmentType + globals()['MediaAttachment'] = MediaAttachment -class Assignment( - schemas.DictSchema -): + +class Assignment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Assignment details + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "attachments", - "capabilities", - "id", - "title", - "type", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (AssignmentType,), # noqa: E501 + 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'attachments': ([MediaAttachment],), # noqa: E501 + 'description': (str,), # noqa: E501 + 'cover': (str,), # noqa: E501 + 'cover_file': (str,), # noqa: E501 + 'use_dedicated_attachments': (bool,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + 'toolset': (str,), # noqa: E501 + 'nb_playback_authorized': (float,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'title': 'title', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'description': 'description', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, capabilities, title, attachments, *args, **kwargs): # noqa: E501 + """Assignment - a model defined in OpenAPI + + Args: + id (str): Unique identifier of the assignment + type (AssignmentType): + capabilities (AssignmentCopyResponseCapabilities): + title (str): Title of the assignment + attachments ([MediaAttachment]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - title = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.capabilities = capabilities + self.title = title + self.attachments = attachments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, capabilities, title, attachments, *args, **kwargs): # noqa: E501 + """Assignment - a model defined in OpenAPI + + Args: + id (str): Unique identifier of the assignment + type (AssignmentType): + capabilities (AssignmentCopyResponseCapabilities): + title (str): Title of the assignment + attachments ([MediaAttachment]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "attachments": attachments, - "description": description, - "cover": cover, - "coverFile": coverFile, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - } - - attachments: MetaOapg.properties.attachments - capabilities: MetaOapg.properties.capabilities - id: MetaOapg.properties.id - title: MetaOapg.properties.title - type: 'AssignmentType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'AssignmentType', - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Assignment': - return super().__new__( - cls, - *_args, - attachments=attachments, - capabilities=capabilities, - id=id, - title=title, - type=type, - description=description, - cover=cover, - coverFile=coverFile, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.capabilities = capabilities + self.title = title + self.attachments = attachments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment.pyi b/flat_api/model/assignment.pyi deleted file mode 100644 index 2abadd5..0000000 --- a/flat_api/model/assignment.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class Assignment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Assignment details - """ - - - class MetaOapg: - required = { - "attachments", - "capabilities", - "id", - "title", - "type", - } - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "attachments": attachments, - "description": description, - "cover": cover, - "coverFile": coverFile, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - } - - attachments: MetaOapg.properties.attachments - capabilities: MetaOapg.properties.capabilities - id: MetaOapg.properties.id - title: MetaOapg.properties.title - type: 'AssignmentType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "attachments", "description", "cover", "coverFile", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'AssignmentType', - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Assignment': - return super().__new__( - cls, - *_args, - attachments=attachments, - capabilities=capabilities, - id=id, - title=title, - type=type, - description=description, - cover=cover, - coverFile=coverFile, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment_copy.py b/flat_api/model/assignment_copy.py index cf383d0..96ff52e 100644 --- a/flat_api/model/assignment_copy.py +++ b/flat_api/model/assignment_copy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,100 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentCopy( - schemas.DictSchema -): +class AssignmentCopy(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'classroom': (str,), # noqa: E501 + 'assignment': (str,), # noqa: E501 + 'scheduled_date': (datetime,), # noqa: E501 + 'library_parent': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'classroom': 'classroom', # noqa: E501 + 'assignment': 'assignment', # noqa: E501 + 'scheduled_date': 'scheduledDate', # noqa: E501 + 'library_parent': 'libraryParent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentCopy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + classroom (str): The destination classroom where the assignment will be copied. [optional] # noqa: E501 + assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 + scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. . [optional] # noqa: E501 + library_parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentCopy - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + classroom (str): The destination classroom where the assignment will be copied. [optional] # noqa: E501 + assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 + scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. . [optional] # noqa: E501 + library_parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - classroom = schemas.StrSchema - assignment = schemas.StrSchema - scheduledDate = schemas.DateTimeSchema - libraryParent = schemas.StrSchema - __annotations__ = { - "classroom": classroom, - "assignment": assignment, - "scheduledDate": scheduledDate, - "libraryParent": libraryParent, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["libraryParent"]) -> MetaOapg.properties.libraryParent: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["libraryParent"]) -> typing.Union[MetaOapg.properties.libraryParent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, - assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, - libraryParent: typing.Union[MetaOapg.properties.libraryParent, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentCopy': - return super().__new__( - cls, - *_args, - classroom=classroom, - assignment=assignment, - scheduledDate=scheduledDate, - libraryParent=libraryParent, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy.pyi b/flat_api/model/assignment_copy.pyi deleted file mode 100644 index cf383d0..0000000 --- a/flat_api/model/assignment_copy.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentCopy( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - classroom = schemas.StrSchema - assignment = schemas.StrSchema - scheduledDate = schemas.DateTimeSchema - libraryParent = schemas.StrSchema - __annotations__ = { - "classroom": classroom, - "assignment": assignment, - "scheduledDate": scheduledDate, - "libraryParent": libraryParent, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["libraryParent"]) -> MetaOapg.properties.libraryParent: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["libraryParent"]) -> typing.Union[MetaOapg.properties.libraryParent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", "scheduledDate", "libraryParent", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, - assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, - libraryParent: typing.Union[MetaOapg.properties.libraryParent, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentCopy': - return super().__new__( - cls, - *_args, - classroom=classroom, - assignment=assignment, - scheduledDate=scheduledDate, - libraryParent=libraryParent, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/assignment_copy_response.py b/flat_api/model/assignment_copy_response.py index 1656f6f..b745502 100644 --- a/flat_api/model/assignment_copy_response.py +++ b/flat_api/model/assignment_copy_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,427 +8,327 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.media_attachment import MediaAttachment + globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities + globals()['AssignmentType'] = AssignmentType + globals()['MediaAttachment'] = MediaAttachment -class AssignmentCopyResponse( - schemas.DictSchema -): + +class AssignmentCopyResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (AssignmentType,), # noqa: E501 + 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'cover': (str,), # noqa: E501 + 'cover_file': (str,), # noqa: E501 + 'attachments': ([MediaAttachment],), # noqa: E501 + 'use_dedicated_attachments': (bool,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + 'toolset': (str,), # noqa: E501 + 'nb_playback_authorized': (float,), # noqa: E501 + 'resource': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + 'resource': 'resource', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + resource (str): If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + resource (str): If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - resource = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "resource": resource, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - resource: typing.Union[MetaOapg.properties.resource, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentCopyResponse': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - resource=resource, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy_response.pyi b/flat_api/model/assignment_copy_response.pyi deleted file mode 100644 index f4db516..0000000 --- a/flat_api/model/assignment_copy_response.pyi +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentCopyResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - resource = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "resource": resource, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - resource: typing.Union[MetaOapg.properties.resource, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentCopyResponse': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - resource=resource, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/assignment_copy_response_capabilities.py b/flat_api/model/assignment_copy_response_capabilities.py new file mode 100644 index 0000000..6f5ebeb --- /dev/null +++ b/flat_api/model/assignment_copy_response_capabilities.py @@ -0,0 +1,298 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError + globals()['AssignmentCopyResponseCapabilitiesCanPublishInClassError'] = AssignmentCopyResponseCapabilitiesCanPublishInClassError + + +class AssignmentCopyResponseCapabilities(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'can_edit': (bool,), # noqa: E501 + 'can_publish_in_class': (bool,), # noqa: E501 + 'can_archive': (bool,), # noqa: E501 + 'can_unarchive': (bool,), # noqa: E501 + 'can_publish_in_class_error': (AssignmentCopyResponseCapabilitiesCanPublishInClassError,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'can_edit': 'canEdit', # noqa: E501 + 'can_publish_in_class': 'canPublishInClass', # noqa: E501 + 'can_archive': 'canArchive', # noqa: E501 + 'can_unarchive': 'canUnarchive', # noqa: E501 + 'can_publish_in_class_error': 'canPublishInClassError', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, can_edit, can_publish_in_class, can_archive, can_unarchive, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponseCapabilities - a model defined in OpenAPI + + Args: + can_edit (bool): Whether the current user can edit the assignment + can_publish_in_class (bool): Whether this assignment can be published in a class + can_archive (bool): Whether the current user can archive the assignment + can_unarchive (bool): Whether the current user can unarchive the assignment + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_publish_in_class_error (AssignmentCopyResponseCapabilitiesCanPublishInClassError): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.can_edit = can_edit + self.can_publish_in_class = can_publish_in_class + self.can_archive = can_archive + self.can_unarchive = can_unarchive + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, can_edit, can_publish_in_class, can_archive, can_unarchive, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponseCapabilities - a model defined in OpenAPI + + Args: + can_edit (bool): Whether the current user can edit the assignment + can_publish_in_class (bool): Whether this assignment can be published in a class + can_archive (bool): Whether the current user can archive the assignment + can_unarchive (bool): Whether the current user can unarchive the assignment + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_publish_in_class_error (AssignmentCopyResponseCapabilitiesCanPublishInClassError): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.can_edit = can_edit + self.can_publish_in_class = can_publish_in_class + self.can_archive = can_archive + self.can_unarchive = can_unarchive + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py b/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py new file mode 100644 index 0000000..cae9192 --- /dev/null +++ b/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py @@ -0,0 +1,276 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class AssignmentCopyResponseCapabilitiesCanPublishInClassError(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, code, message, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponseCapabilitiesCanPublishInClassError - a model defined in OpenAPI + + Args: + code (str): A corresponding code for this error + message (str): A printable and localized message for this error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, code, message, *args, **kwargs): # noqa: E501 + """AssignmentCopyResponseCapabilitiesCanPublishInClassError - a model defined in OpenAPI + + Args: + code (str): A corresponding code for this error + message (str): A printable and localized message for this error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission.py b/flat_api/model/assignment_submission.py index a3afffd..f4f5f4b 100644 --- a/flat_api/model/assignment_submission.py +++ b/flat_api/model/assignment_submission.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,337 +8,345 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_submission_state import AssignmentSubmissionState + from flat_api.model.google_classroom_submission import GoogleClassroomSubmission + from flat_api.model.media_attachment import MediaAttachment + from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission + globals()['AssignmentSubmissionState'] = AssignmentSubmissionState + globals()['GoogleClassroomSubmission'] = GoogleClassroomSubmission + globals()['MediaAttachment'] = MediaAttachment + globals()['MicrosoftGraphSubmission'] = MicrosoftGraphSubmission -class AssignmentSubmission( - schemas.DictSchema -): + +class AssignmentSubmission(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Assignment Submission + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } - class MetaOapg: - required = { - "creator", - "attachments", - "assignment", - "classroom", - "id", - "state", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'state': (AssignmentSubmissionState,), # noqa: E501 + 'classroom': (str,), # noqa: E501 + 'assignment': (str,), # noqa: E501 + 'creator': (str,), # noqa: E501 + 'attachments': ([MediaAttachment],), # noqa: E501 + 'creation_date': (str,), # noqa: E501 + 'submission_date': (str,), # noqa: E501 + 'return_date': (str,), # noqa: E501 + 'return_creator': (str,), # noqa: E501 + 'grade': (float, none_type,), # noqa: E501 + 'draft_grade': (float, none_type,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'exercises_ids': ([str], none_type,), # noqa: E501 + 'google_classroom': (GoogleClassroomSubmission,), # noqa: E501 + 'microsoft_graph': (MicrosoftGraphSubmission,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - - @staticmethod - def state() -> typing.Type['AssignmentSubmissionState']: - return AssignmentSubmissionState - classroom = schemas.StrSchema - assignment = schemas.StrSchema - creator = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - creationDate = schemas.StrSchema - submissionDate = schemas.StrSchema - returnDate = schemas.StrSchema - returnCreator = schemas.StrSchema - - - class grade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'grade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class draftGrade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'draftGrade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'classroom': 'classroom', # noqa: E501 + 'assignment': 'assignment', # noqa: E501 + 'creator': 'creator', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'submission_date': 'submissionDate', # noqa: E501 + 'return_date': 'returnDate', # noqa: E501 + 'return_creator': 'returnCreator', # noqa: E501 + 'grade': 'grade', # noqa: E501 + 'draft_grade': 'draftGrade', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'exercises_ids': 'exercisesIds', # noqa: E501 + 'google_classroom': 'googleClassroom', # noqa: E501 + 'microsoft_graph': 'microsoftGraph', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, state, classroom, assignment, creator, attachments, *args, **kwargs): # noqa: E501 + """AssignmentSubmission - a model defined in OpenAPI + + Args: + id (str): Unique identifier of the submission + state (AssignmentSubmissionState): + classroom (str): Unique identifier of the classroom where the assignment was posted + assignment (str): Unique identifier of the assignment + creator (str): The User identifier of the student who created the submission + attachments ([MediaAttachment]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creation_date (str): The date when the submission was created. [optional] # noqa: E501 + submission_date (str): The date when the student submitted their work. [optional] # noqa: E501 + return_date (str): The date when the teacher returned the work. [optional] # noqa: E501 + return_creator (str): The User unique identifier of the teacher who returned the submission . [optional] # noqa: E501 + grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 + draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 + max_points (float): Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.. [optional] # noqa: E501 + exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 + google_classroom (GoogleClassroomSubmission): [optional] # noqa: E501 + microsoft_graph (MicrosoftGraphSubmission): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - maxPoints = schemas.NumberSchema - - - class exercisesIds( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'exercisesIds': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.state = state + self.classroom = classroom + self.assignment = assignment + self.creator = creator + self.attachments = attachments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, state, classroom, assignment, creator, attachments, *args, **kwargs): # noqa: E501 + """AssignmentSubmission - a model defined in OpenAPI + + Args: + id (str): Unique identifier of the submission + state (AssignmentSubmissionState): + classroom (str): Unique identifier of the classroom where the assignment was posted + assignment (str): Unique identifier of the assignment + creator (str): The User identifier of the student who created the submission + attachments ([MediaAttachment]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creation_date (str): The date when the submission was created. [optional] # noqa: E501 + submission_date (str): The date when the student submitted their work. [optional] # noqa: E501 + return_date (str): The date when the teacher returned the work. [optional] # noqa: E501 + return_creator (str): The User unique identifier of the teacher who returned the submission . [optional] # noqa: E501 + grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 + draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 + max_points (float): Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.. [optional] # noqa: E501 + exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 + google_classroom (GoogleClassroomSubmission): [optional] # noqa: E501 + microsoft_graph (MicrosoftGraphSubmission): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - @staticmethod - def googleClassroom() -> typing.Type['GoogleClassroomSubmission']: - return GoogleClassroomSubmission - - @staticmethod - def microsoftGraph() -> typing.Type['MicrosoftGraphSubmission']: - return MicrosoftGraphSubmission - __annotations__ = { - "id": id, - "state": state, - "classroom": classroom, - "assignment": assignment, - "creator": creator, - "attachments": attachments, - "creationDate": creationDate, - "submissionDate": submissionDate, - "returnDate": returnDate, - "returnCreator": returnCreator, - "grade": grade, - "draftGrade": draftGrade, - "maxPoints": maxPoints, - "exercisesIds": exercisesIds, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - } - - creator: MetaOapg.properties.creator - attachments: MetaOapg.properties.attachments - assignment: MetaOapg.properties.assignment - classroom: MetaOapg.properties.classroom - id: MetaOapg.properties.id - state: 'AssignmentSubmissionState' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submissionDate"]) -> MetaOapg.properties.submissionDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["returnDate"]) -> MetaOapg.properties.returnDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["returnCreator"]) -> MetaOapg.properties.returnCreator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomSubmission': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphSubmission': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submissionDate"]) -> typing.Union[MetaOapg.properties.submissionDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["returnDate"]) -> typing.Union[MetaOapg.properties.returnDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["returnCreator"]) -> typing.Union[MetaOapg.properties.returnCreator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomSubmission', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphSubmission', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creator: typing.Union[MetaOapg.properties.creator, str, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], - assignment: typing.Union[MetaOapg.properties.assignment, str, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - state: 'AssignmentSubmissionState', - creationDate: typing.Union[MetaOapg.properties.creationDate, str, schemas.Unset] = schemas.unset, - submissionDate: typing.Union[MetaOapg.properties.submissionDate, str, schemas.Unset] = schemas.unset, - returnDate: typing.Union[MetaOapg.properties.returnDate, str, schemas.Unset] = schemas.unset, - returnCreator: typing.Union[MetaOapg.properties.returnCreator, str, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union['GoogleClassroomSubmission', schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union['MicrosoftGraphSubmission', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmission': - return super().__new__( - cls, - *_args, - creator=creator, - attachments=attachments, - assignment=assignment, - classroom=classroom, - id=id, - state=state, - creationDate=creationDate, - submissionDate=submissionDate, - returnDate=returnDate, - returnCreator=returnCreator, - grade=grade, - draftGrade=draftGrade, - maxPoints=maxPoints, - exercisesIds=exercisesIds, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission_state import AssignmentSubmissionState -from flat_api.model.google_classroom_submission import GoogleClassroomSubmission -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.state = state + self.classroom = classroom + self.assignment = assignment + self.creator = creator + self.attachments = attachments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission.pyi b/flat_api/model/assignment_submission.pyi deleted file mode 100644 index a3afffd..0000000 --- a/flat_api/model/assignment_submission.pyi +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmission( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Assignment Submission - """ - - - class MetaOapg: - required = { - "creator", - "attachments", - "assignment", - "classroom", - "id", - "state", - } - - class properties: - id = schemas.StrSchema - - @staticmethod - def state() -> typing.Type['AssignmentSubmissionState']: - return AssignmentSubmissionState - classroom = schemas.StrSchema - assignment = schemas.StrSchema - creator = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - creationDate = schemas.StrSchema - submissionDate = schemas.StrSchema - returnDate = schemas.StrSchema - returnCreator = schemas.StrSchema - - - class grade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'grade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class draftGrade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'draftGrade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - maxPoints = schemas.NumberSchema - - - class exercisesIds( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'exercisesIds': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - @staticmethod - def googleClassroom() -> typing.Type['GoogleClassroomSubmission']: - return GoogleClassroomSubmission - - @staticmethod - def microsoftGraph() -> typing.Type['MicrosoftGraphSubmission']: - return MicrosoftGraphSubmission - __annotations__ = { - "id": id, - "state": state, - "classroom": classroom, - "assignment": assignment, - "creator": creator, - "attachments": attachments, - "creationDate": creationDate, - "submissionDate": submissionDate, - "returnDate": returnDate, - "returnCreator": returnCreator, - "grade": grade, - "draftGrade": draftGrade, - "maxPoints": maxPoints, - "exercisesIds": exercisesIds, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - } - - creator: MetaOapg.properties.creator - attachments: MetaOapg.properties.attachments - assignment: MetaOapg.properties.assignment - classroom: MetaOapg.properties.classroom - id: MetaOapg.properties.id - state: 'AssignmentSubmissionState' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submissionDate"]) -> MetaOapg.properties.submissionDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["returnDate"]) -> MetaOapg.properties.returnDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["returnCreator"]) -> MetaOapg.properties.returnCreator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomSubmission': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphSubmission': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionState': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submissionDate"]) -> typing.Union[MetaOapg.properties.submissionDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["returnDate"]) -> typing.Union[MetaOapg.properties.returnDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["returnCreator"]) -> typing.Union[MetaOapg.properties.returnCreator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomSubmission', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphSubmission', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "classroom", "assignment", "creator", "attachments", "creationDate", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "googleClassroom", "microsoftGraph", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creator: typing.Union[MetaOapg.properties.creator, str, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, ], - assignment: typing.Union[MetaOapg.properties.assignment, str, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - state: 'AssignmentSubmissionState', - creationDate: typing.Union[MetaOapg.properties.creationDate, str, schemas.Unset] = schemas.unset, - submissionDate: typing.Union[MetaOapg.properties.submissionDate, str, schemas.Unset] = schemas.unset, - returnDate: typing.Union[MetaOapg.properties.returnDate, str, schemas.Unset] = schemas.unset, - returnCreator: typing.Union[MetaOapg.properties.returnCreator, str, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union['GoogleClassroomSubmission', schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union['MicrosoftGraphSubmission', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmission': - return super().__new__( - cls, - *_args, - creator=creator, - attachments=attachments, - assignment=assignment, - classroom=classroom, - id=id, - state=state, - creationDate=creationDate, - submissionDate=submissionDate, - returnDate=returnDate, - returnCreator=returnCreator, - grade=grade, - draftGrade=draftGrade, - maxPoints=maxPoints, - exercisesIds=exercisesIds, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission_state import AssignmentSubmissionState -from flat_api.model.google_classroom_submission import GoogleClassroomSubmission -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission diff --git a/flat_api/model/assignment_submission_comment.py b/flat_api/model/assignment_submission_comment.py index 2c28b25..49a5f3a 100644 --- a/flat_api/model/assignment_submission_comment.py +++ b/flat_api/model/assignment_submission_comment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,132 +8,281 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentSubmissionComment( - schemas.DictSchema -): +class AssignmentSubmissionComment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Feedback comment added to an assignment submission + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'user': (str,), # noqa: E501 + 'submission': (str,), # noqa: E501 + 'date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'comment': (str,), # noqa: E501 + 'unread': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'user': 'user', # noqa: E501 + 'submission': 'submission', # noqa: E501 + 'date': 'date', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'comment': 'comment', # noqa: E501 + 'unread': 'unread', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionComment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The comment unique identifier. [optional] # noqa: E501 + user (str): The author unique identifier. [optional] # noqa: E501 + submission (str): The submission unique identifier. [optional] # noqa: E501 + date (datetime): The date when the comment was posted. [optional] # noqa: E501 + modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 + comment (str): The comment text. [optional] # noqa: E501 + unread (bool): True if the comment is unread by the current user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionComment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The comment unique identifier. [optional] # noqa: E501 + user (str): The author unique identifier. [optional] # noqa: E501 + submission (str): The submission unique identifier. [optional] # noqa: E501 + date (datetime): The date when the comment was posted. [optional] # noqa: E501 + modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 + comment (str): The comment text. [optional] # noqa: E501 + unread (bool): True if the comment is unread by the current user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - user = schemas.StrSchema - submission = schemas.StrSchema - date = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - comment = schemas.StrSchema - unread = schemas.BoolSchema - __annotations__ = { - "id": id, - "user": user, - "submission": submission, - "date": date, - "modificationDate": modificationDate, - "comment": comment, - "unread": unread, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submission"]) -> MetaOapg.properties.submission: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submission"]) -> typing.Union[MetaOapg.properties.submission, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - submission: typing.Union[MetaOapg.properties.submission, str, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - unread: typing.Union[MetaOapg.properties.unread, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionComment': - return super().__new__( - cls, - *_args, - id=id, - user=user, - submission=submission, - date=date, - modificationDate=modificationDate, - comment=comment, - unread=unread, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_comment.pyi b/flat_api/model/assignment_submission_comment.pyi deleted file mode 100644 index 2c28b25..0000000 --- a/flat_api/model/assignment_submission_comment.pyi +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionComment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Feedback comment added to an assignment submission - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - user = schemas.StrSchema - submission = schemas.StrSchema - date = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - comment = schemas.StrSchema - unread = schemas.BoolSchema - __annotations__ = { - "id": id, - "user": user, - "submission": submission, - "date": date, - "modificationDate": modificationDate, - "comment": comment, - "unread": unread, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submission"]) -> MetaOapg.properties.submission: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submission"]) -> typing.Union[MetaOapg.properties.submission, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "submission", "date", "modificationDate", "comment", "unread", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - submission: typing.Union[MetaOapg.properties.submission, str, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - unread: typing.Union[MetaOapg.properties.unread, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionComment': - return super().__new__( - cls, - *_args, - id=id, - user=user, - submission=submission, - date=date, - modificationDate=modificationDate, - comment=comment, - unread=unread, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/assignment_submission_comment_creation.py b/flat_api/model/assignment_submission_comment_creation.py index d45f708..a4d7114 100644 --- a/flat_api/model/assignment_submission_comment_creation.py +++ b/flat_api/model/assignment_submission_comment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,77 +8,263 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentSubmissionCommentCreation( - schemas.DictSchema -): +class AssignmentSubmissionCommentCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a assignment submission comment + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "comment", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'comment': (str,), # noqa: E501 } - - class properties: - comment = schemas.StrSchema - __annotations__ = { - "comment": comment, - } - - comment: MetaOapg.properties.comment - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - comment: typing.Union[MetaOapg.properties.comment, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionCommentCreation': - return super().__new__( - cls, - *_args, - comment=comment, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'comment': 'comment', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, comment, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionCommentCreation - a model defined in OpenAPI + + Args: + comment (str): The comment text + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.comment = comment + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, comment, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionCommentCreation - a model defined in OpenAPI + + Args: + comment (str): The comment text + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.comment = comment + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_comment_creation.pyi b/flat_api/model/assignment_submission_comment_creation.pyi deleted file mode 100644 index d45f708..0000000 --- a/flat_api/model/assignment_submission_comment_creation.pyi +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionCommentCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a assignment submission comment - """ - - - class MetaOapg: - required = { - "comment", - } - - class properties: - comment = schemas.StrSchema - __annotations__ = { - "comment": comment, - } - - comment: MetaOapg.properties.comment - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - comment: typing.Union[MetaOapg.properties.comment, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionCommentCreation': - return super().__new__( - cls, - *_args, - comment=comment, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/assignment_submission_history.py b/flat_api/model/assignment_submission_history.py index fa2b7ec..588f91d 100644 --- a/flat_api/model/assignment_submission_history.py +++ b/flat_api/model/assignment_submission_history.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,283 +8,306 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment + from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState + globals()['AssignmentSubmissionHistoryAttachment'] = AssignmentSubmissionHistoryAttachment + globals()['AssignmentSubmissionHistoryState'] = AssignmentSubmissionHistoryState -class AssignmentSubmissionHistory( - schemas.DictSchema -): + +class AssignmentSubmissionHistory(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - History item of the submission + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('source',): { + 'LTI': "lti", + 'GOOGLECLASSROOM': "googleClassroom", + 'MICROSOFTGRAPH': "microsoftGraph", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'date': (datetime,), # noqa: E501 + 'users': ([str],), # noqa: E501 + 'source': (str,), # noqa: E501 + 'state': (AssignmentSubmissionHistoryState,), # noqa: E501 + 'draft_grade': (float,), # noqa: E501 + 'grade': (float,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'comment': (str,), # noqa: E501 + 'due_date': (datetime,), # noqa: E501 + 'attachment': (AssignmentSubmissionHistoryAttachment,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'date': 'date', # noqa: E501 + 'users': 'users', # noqa: E501 + 'source': 'source', # noqa: E501 + 'state': 'state', # noqa: E501 + 'draft_grade': 'draftGrade', # noqa: E501 + 'grade': 'grade', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'comment': 'comment', # noqa: E501 + 'due_date': 'dueDate', # noqa: E501 + 'attachment': 'attachment', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - date = schemas.DateTimeSchema - - - class users( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'users': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionHistory - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + date (datetime): The date when the submission was changed. [optional] # noqa: E501 + users ([str]): The user(s) unique identifier(s) who made the change. [optional] # noqa: E501 + source (str): The source of the change if the change was made by a third-party software. [optional] # noqa: E501 + state (AssignmentSubmissionHistoryState): [optional] # noqa: E501 + draft_grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 + grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 + max_points (float): The denominator of the grade at this time in the submission grade history. [optional] # noqa: E501 + comment (str): The comment that is made to this submission. [optional] # noqa: E501 + due_date (datetime): The due date of this assignment. [optional] # noqa: E501 + attachment (AssignmentSubmissionHistoryAttachment): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class source( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "lti": "LTI", - "googleClassroom": "GOOGLE_CLASSROOM", - "microsoftGraph": "MICROSOFT_GRAPH", - } - - @schemas.classproperty - def LTI(cls): - return cls("lti") - - @schemas.classproperty - def GOOGLE_CLASSROOM(cls): - return cls("googleClassroom") - - @schemas.classproperty - def MICROSOFT_GRAPH(cls): - return cls("microsoftGraph") - - @staticmethod - def state() -> typing.Type['AssignmentSubmissionHistoryState']: - return AssignmentSubmissionHistoryState - draftGrade = schemas.NumberSchema - grade = schemas.NumberSchema - maxPoints = schemas.NumberSchema - comment = schemas.StrSchema - dueDate = schemas.DateTimeSchema - - - class attachment( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - score = schemas.StrSchema - revision = schemas.StrSchema - title = schemas.StrSchema - __annotations__ = { - "score": score, - "revision": revision, - "title": title, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'attachment': - return super().__new__( - cls, - *_args, - score=score, - revision=revision, - title=title, - _configuration=_configuration, - **kwargs, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionHistory - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + date (datetime): The date when the submission was changed. [optional] # noqa: E501 + users ([str]): The user(s) unique identifier(s) who made the change. [optional] # noqa: E501 + source (str): The source of the change if the change was made by a third-party software. [optional] # noqa: E501 + state (AssignmentSubmissionHistoryState): [optional] # noqa: E501 + draft_grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 + grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 + max_points (float): The denominator of the grade at this time in the submission grade history. [optional] # noqa: E501 + comment (str): The comment that is made to this submission. [optional] # noqa: E501 + due_date (datetime): The due date of this assignment. [optional] # noqa: E501 + attachment (AssignmentSubmissionHistoryAttachment): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "date": date, - "users": users, - "source": source, - "state": state, - "draftGrade": draftGrade, - "grade": grade, - "maxPoints": maxPoints, - "comment": comment, - "dueDate": dueDate, - "attachment": attachment, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["users"]) -> MetaOapg.properties.users: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionHistoryState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachment"]) -> MetaOapg.properties.attachment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["users"]) -> typing.Union[MetaOapg.properties.users, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union[MetaOapg.properties.source, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['AssignmentSubmissionHistoryState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachment"]) -> typing.Union[MetaOapg.properties.attachment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - users: typing.Union[MetaOapg.properties.users, list, tuple, schemas.Unset] = schemas.unset, - source: typing.Union[MetaOapg.properties.source, str, schemas.Unset] = schemas.unset, - state: typing.Union['AssignmentSubmissionHistoryState', schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, - attachment: typing.Union[MetaOapg.properties.attachment, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionHistory': - return super().__new__( - cls, - *_args, - date=date, - users=users, - source=source, - state=state, - draftGrade=draftGrade, - grade=grade, - maxPoints=maxPoints, - comment=comment, - dueDate=dueDate, - attachment=attachment, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_history.pyi b/flat_api/model/assignment_submission_history.pyi deleted file mode 100644 index 39c0ff3..0000000 --- a/flat_api/model/assignment_submission_history.pyi +++ /dev/null @@ -1,284 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionHistory( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - History item of the submission - """ - - - class MetaOapg: - - class properties: - date = schemas.DateTimeSchema - - - class users( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'users': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class source( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def LTI(cls): - return cls("lti") - - @schemas.classproperty - def GOOGLE_CLASSROOM(cls): - return cls("googleClassroom") - - @schemas.classproperty - def MICROSOFT_GRAPH(cls): - return cls("microsoftGraph") - - @staticmethod - def state() -> typing.Type['AssignmentSubmissionHistoryState']: - return AssignmentSubmissionHistoryState - draftGrade = schemas.NumberSchema - grade = schemas.NumberSchema - maxPoints = schemas.NumberSchema - comment = schemas.StrSchema - dueDate = schemas.DateTimeSchema - - - class attachment( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - score = schemas.StrSchema - revision = schemas.StrSchema - title = schemas.StrSchema - __annotations__ = { - "score": score, - "revision": revision, - "title": title, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["score", "revision", "title", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'attachment': - return super().__new__( - cls, - *_args, - score=score, - revision=revision, - title=title, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "date": date, - "users": users, - "source": source, - "state": state, - "draftGrade": draftGrade, - "grade": grade, - "maxPoints": maxPoints, - "comment": comment, - "dueDate": dueDate, - "attachment": attachment, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["users"]) -> MetaOapg.properties.users: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'AssignmentSubmissionHistoryState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachment"]) -> MetaOapg.properties.attachment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["users"]) -> typing.Union[MetaOapg.properties.users, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union[MetaOapg.properties.source, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['AssignmentSubmissionHistoryState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachment"]) -> typing.Union[MetaOapg.properties.attachment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["date", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - users: typing.Union[MetaOapg.properties.users, list, tuple, schemas.Unset] = schemas.unset, - source: typing.Union[MetaOapg.properties.source, str, schemas.Unset] = schemas.unset, - state: typing.Union['AssignmentSubmissionHistoryState', schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, - attachment: typing.Union[MetaOapg.properties.attachment, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionHistory': - return super().__new__( - cls, - *_args, - date=date, - users=users, - source=source, - state=state, - draftGrade=draftGrade, - grade=grade, - maxPoints=maxPoints, - comment=comment, - dueDate=dueDate, - attachment=attachment, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState diff --git a/flat_api/model/assignment_submission_history_attachment.py b/flat_api/model/assignment_submission_history_attachment.py new file mode 100644 index 0000000..c0915bd --- /dev/null +++ b/flat_api/model/assignment_submission_history_attachment.py @@ -0,0 +1,272 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class AssignmentSubmissionHistoryAttachment(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'score': (str,), # noqa: E501 + 'revision': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'score': 'score', # noqa: E501 + 'revision': 'revision', # noqa: E501 + 'title': 'title', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (str): The score identifier that changed. [optional] # noqa: E501 + revision (str): The revision identifier that changed. [optional] # noqa: E501 + title (str): The title of the score that changed. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (str): The score identifier that changed. [optional] # noqa: E501 + revision (str): The revision identifier that changed. [optional] # noqa: E501 + title (str): The title of the score that changed. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_history_state.py b/flat_api/model/assignment_submission_history_state.py index 5f528dc..e7beee6 100644 --- a/flat_api/model/assignment_submission_history_state.py +++ b/flat_api/model/assignment_submission_history_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,53 +8,286 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentSubmissionHistoryState( - schemas.EnumBase, - schemas.StrSchema -): +class AssignmentSubmissionHistoryState(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - State of the submission history + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'CREATED': "created", + 'TURNEDIN': "turnedIn", + 'RETURNED': "returned", + 'RESET': "reset", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "created": "CREATED", - "turnedIn": "TURNED_IN", - "returned": "RETURNED", - "reset": "RESET", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def TURNED_IN(cls): - return cls("turnedIn") - - @schemas.classproperty - def RETURNED(cls): - return cls("returned") - - @schemas.classproperty - def RESET(cls): - return cls("reset") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AssignmentSubmissionHistoryState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 + + Keyword Args: + value (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AssignmentSubmissionHistoryState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 + + Keyword Args: + value (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/assignment_submission_history_state.pyi b/flat_api/model/assignment_submission_history_state.pyi deleted file mode 100644 index 8ba3a84..0000000 --- a/flat_api/model/assignment_submission_history_state.pyi +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionHistoryState( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - State of the submission history - """ - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def TURNED_IN(cls): - return cls("turnedIn") - - @schemas.classproperty - def RETURNED(cls): - return cls("returned") - - @schemas.classproperty - def RESET(cls): - return cls("reset") diff --git a/flat_api/model/assignment_submission_state.py b/flat_api/model/assignment_submission_state.py index 5226d31..97beb44 100644 --- a/flat_api/model/assignment_submission_state.py +++ b/flat_api/model/assignment_submission_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,48 +8,285 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentSubmissionState( - schemas.EnumBase, - schemas.StrSchema -): +class AssignmentSubmissionState(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - State of the submission + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'CREATED': "created", + 'TURNEDIN': "turnedIn", + 'RETURNED': "returned", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "created": "CREATED", - "turnedIn": "TURNED_IN", - "returned": "RETURNED", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def TURNED_IN(cls): - return cls("turnedIn") - - @schemas.classproperty - def RETURNED(cls): - return cls("returned") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AssignmentSubmissionState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 + + Keyword Args: + value (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AssignmentSubmissionState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 + + Keyword Args: + value (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/assignment_submission_state.pyi b/flat_api/model/assignment_submission_state.pyi deleted file mode 100644 index 9b3d2de..0000000 --- a/flat_api/model/assignment_submission_state.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionState( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - State of the submission - """ - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def TURNED_IN(cls): - return cls("turnedIn") - - @schemas.classproperty - def RETURNED(cls): - return cls("returned") diff --git a/flat_api/model/assignment_submission_update.py b/flat_api/model/assignment_submission_update.py index 4c6ca72..e09e108 100644 --- a/flat_api/model/assignment_submission_update.py +++ b/flat_api/model/assignment_submission_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,287 +8,297 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments + from flat_api.model.class_attachment_creation import ClassAttachmentCreation + globals()['AssignmentSubmissionUpdateComments'] = AssignmentSubmissionUpdateComments + globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -class AssignmentSubmissionUpdate( - schemas.DictSchema -): + +class AssignmentSubmissionUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Assignment Submission creation + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } - class MetaOapg: - - class properties: - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - submit = schemas.BoolSchema - - - class draftGrade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'draftGrade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class grade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'grade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class exercisesIds( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'exercisesIds': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + validations = { + ('draft_grade',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 0, + }, + ('grade',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attachments': ([ClassAttachmentCreation],), # noqa: E501 + 'submit': (bool,), # noqa: E501 + 'draft_grade': (float, none_type,), # noqa: E501 + 'grade': (float, none_type,), # noqa: E501 + 'exercises_ids': ([str], none_type,), # noqa: E501 + '_return': (bool,), # noqa: E501 + 'comments': (AssignmentSubmissionUpdateComments,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attachments': 'attachments', # noqa: E501 + 'submit': 'submit', # noqa: E501 + 'draft_grade': 'draftGrade', # noqa: E501 + 'grade': 'grade', # noqa: E501 + 'exercises_ids': 'exercisesIds', # noqa: E501 + '_return': 'return', # noqa: E501 + 'comments': 'comments', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + submit (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 + draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 + grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 + exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 + _return (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 + comments (AssignmentSubmissionUpdateComments): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - _return = schemas.BoolSchema - - - class comments( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - unread = schemas.NumberSchema - __annotations__ = { - "total": total, - "unread": unread, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - unread: typing.Union[MetaOapg.properties.unread, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'comments': - return super().__new__( - cls, - *_args, - total=total, - unread=unread, - _configuration=_configuration, - **kwargs, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + submit (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 + draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 + grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 + exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 + _return (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 + comments (AssignmentSubmissionUpdateComments): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "attachments": attachments, - "submit": submit, - "draftGrade": draftGrade, - "grade": grade, - "exercisesIds": exercisesIds, - "return": _return, - "comments": comments, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submit"]) -> MetaOapg.properties.submit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comments"]) -> MetaOapg.properties.comments: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submit"]) -> typing.Union[MetaOapg.properties.submit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union[MetaOapg.properties.comments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - submit: typing.Union[MetaOapg.properties.submit, bool, schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, - comments: typing.Union[MetaOapg.properties.comments, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionUpdate': - return super().__new__( - cls, - *_args, - attachments=attachments, - submit=submit, - draftGrade=draftGrade, - grade=grade, - exercisesIds=exercisesIds, - comments=comments, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_attachment_creation import ClassAttachmentCreation + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_update.pyi b/flat_api/model/assignment_submission_update.pyi deleted file mode 100644 index 32f956a..0000000 --- a/flat_api/model/assignment_submission_update.pyi +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentSubmissionUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Assignment Submission creation - """ - - - class MetaOapg: - - class properties: - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - submit = schemas.BoolSchema - - - class draftGrade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'draftGrade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class grade( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'grade': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class exercisesIds( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'exercisesIds': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - _return = schemas.BoolSchema - - - class comments( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - unread = schemas.NumberSchema - __annotations__ = { - "total": total, - "unread": unread, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unread"]) -> MetaOapg.properties.unread: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unread"]) -> typing.Union[MetaOapg.properties.unread, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unread", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - unread: typing.Union[MetaOapg.properties.unread, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'comments': - return super().__new__( - cls, - *_args, - total=total, - unread=unread, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "attachments": attachments, - "submit": submit, - "draftGrade": draftGrade, - "grade": grade, - "exercisesIds": exercisesIds, - "return": _return, - "comments": comments, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submit"]) -> MetaOapg.properties.submit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["draftGrade"]) -> MetaOapg.properties.draftGrade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grade"]) -> MetaOapg.properties.grade: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exercisesIds"]) -> MetaOapg.properties.exercisesIds: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comments"]) -> MetaOapg.properties.comments: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submit"]) -> typing.Union[MetaOapg.properties.submit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["draftGrade"]) -> typing.Union[MetaOapg.properties.draftGrade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grade"]) -> typing.Union[MetaOapg.properties.grade, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exercisesIds"]) -> typing.Union[MetaOapg.properties.exercisesIds, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union[MetaOapg.properties.comments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return", "comments", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - submit: typing.Union[MetaOapg.properties.submit, bool, schemas.Unset] = schemas.unset, - draftGrade: typing.Union[MetaOapg.properties.draftGrade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - grade: typing.Union[MetaOapg.properties.grade, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - exercisesIds: typing.Union[MetaOapg.properties.exercisesIds, list, tuple, None, schemas.Unset] = schemas.unset, - comments: typing.Union[MetaOapg.properties.comments, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentSubmissionUpdate': - return super().__new__( - cls, - *_args, - attachments=attachments, - submit=submit, - draftGrade=draftGrade, - grade=grade, - exercisesIds=exercisesIds, - comments=comments, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/assignment_submission_update_comments.py b/flat_api/model/assignment_submission_update_comments.py new file mode 100644 index 0000000..2826178 --- /dev/null +++ b/flat_api/model/assignment_submission_update_comments.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class AssignmentSubmissionUpdateComments(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'total': (float,), # noqa: E501 + 'unread': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'unread': 'unread', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionUpdateComments - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of comments added to the submission. [optional] # noqa: E501 + unread (float): The number of unread comments for the current user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentSubmissionUpdateComments - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of comments added to the submission. [optional] # noqa: E501 + unread (float): The number of unread comments for the current user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_type.py b/flat_api/model/assignment_type.py index c938797..73518a9 100644 --- a/flat_api/model/assignment_type.py +++ b/flat_api/model/assignment_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,63 +8,288 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class AssignmentType( - schemas.EnumBase, - schemas.StrSchema -): +class AssignmentType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Type of the assignment + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'NONE': "none", + 'NEWSCORE': "newScore", + 'SCORETEMPLATE': "scoreTemplate", + 'SHAREDWRITING': "sharedWriting", + 'WORKSHEET': "worksheet", + 'PERFORMANCE': "performance", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "none": "NONE", - "newScore": "NEW_SCORE", - "scoreTemplate": "SCORE_TEMPLATE", - "sharedWriting": "SHARED_WRITING", - "worksheet": "WORKSHEET", - "performance": "PERFORMANCE", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def NONE(cls): - return cls("none") - - @schemas.classproperty - def NEW_SCORE(cls): - return cls("newScore") - - @schemas.classproperty - def SCORE_TEMPLATE(cls): - return cls("scoreTemplate") - - @schemas.classproperty - def SHARED_WRITING(cls): - return cls("sharedWriting") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """AssignmentType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 + + Keyword Args: + value (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """AssignmentType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 + + Keyword Args: + value (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/assignment_type.pyi b/flat_api/model/assignment_type.pyi deleted file mode 100644 index 9897fde..0000000 --- a/flat_api/model/assignment_type.pyi +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Type of the assignment - """ - - @schemas.classproperty - def NONE(cls): - return cls("none") - - @schemas.classproperty - def NEW_SCORE(cls): - return cls("newScore") - - @schemas.classproperty - def SCORE_TEMPLATE(cls): - return cls("scoreTemplate") - - @schemas.classproperty - def SHARED_WRITING(cls): - return cls("sharedWriting") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") diff --git a/flat_api/model/assignment_update.py b/flat_api/model/assignment_update.py index 1ba2d48..2280d7b 100644 --- a/flat_api/model/assignment_update.py +++ b/flat_api/model/assignment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,332 +8,317 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.class_attachment_creation import ClassAttachmentCreation + globals()['AssignmentType'] = AssignmentType + globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -class AssignmentUpdate( - schemas.DictSchema -): + +class AssignmentUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Assignment Resource Editing + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + } - class MetaOapg: - - class properties: - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 1000 - min_length = 1 - description = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - - - class nbPlaybackAuthorized( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'nbPlaybackAuthorized': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class toolset( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'toolset': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class coverFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class cover( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'cover': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + validations = { + ('title',): { + 'max_length': 1000, + 'min_length': 1, + }, + ('max_points',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (AssignmentType,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'attachments': ([ClassAttachmentCreation],), # noqa: E501 + 'nb_playback_authorized': (float, none_type,), # noqa: E501 + 'toolset': (str, none_type,), # noqa: E501 + 'cover_file': (str, none_type,), # noqa: E501 + 'cover': (str, none_type,), # noqa: E501 + 'max_points': (float, none_type,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AssignmentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (AssignmentType): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 + cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 + cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 + max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class maxPoints( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'maxPoints': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AssignmentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (AssignmentType): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 + cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 + cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 + max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - __annotations__ = { - "type": type, - "title": title, - "description": description, - "attachments": attachments, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "toolset": toolset, - "coverFile": coverFile, - "cover": cover, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentUpdate': - return super().__new__( - cls, - *_args, - type=type, - title=title, - description=description, - attachments=attachments, - nbPlaybackAuthorized=nbPlaybackAuthorized, - toolset=toolset, - coverFile=coverFile, - cover=cover, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_attachment_creation import ClassAttachmentCreation + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/assignment_update.pyi b/flat_api/model/assignment_update.pyi deleted file mode 100644 index c8c2dab..0000000 --- a/flat_api/model/assignment_update.pyi +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class AssignmentUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Assignment Resource Editing - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class title( - schemas.StrSchema - ): - pass - description = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - - - class nbPlaybackAuthorized( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'nbPlaybackAuthorized': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class toolset( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'toolset': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class coverFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class cover( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'cover': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class maxPoints( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'maxPoints': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - __annotations__ = { - "type": type, - "title": title, - "description": description, - "attachments": attachments, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "toolset": toolset, - "coverFile": coverFile, - "cover": cover, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AssignmentUpdate': - return super().__new__( - cls, - *_args, - type=type, - title=title, - description=description, - attachments=attachments, - nbPlaybackAuthorized=nbPlaybackAuthorized, - toolset=toolset, - coverFile=coverFile, - cover=cover, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/class_assignment.py b/flat_api/model/class_assignment.py index 4f29d17..c1f0b13 100644 --- a/flat_api/model/class_assignment.py +++ b/flat_api/model/class_assignment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,835 +8,404 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + from flat_api.model.assignment_submission import AssignmentSubmission + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas + from flat_api.model.class_assignment_lti import ClassAssignmentLti + from flat_api.model.class_assignment_mfc import ClassAssignmentMfc + from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework + from flat_api.model.media_attachment import MediaAttachment + from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment + globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities + globals()['AssignmentSubmission'] = AssignmentSubmission + globals()['AssignmentType'] = AssignmentType + globals()['ClassAssignmentCanvas'] = ClassAssignmentCanvas + globals()['ClassAssignmentLti'] = ClassAssignmentLti + globals()['ClassAssignmentMfc'] = ClassAssignmentMfc + globals()['GoogleClassroomCoursework'] = GoogleClassroomCoursework + globals()['MediaAttachment'] = MediaAttachment + globals()['MicrosoftGraphAssignment'] = MicrosoftGraphAssignment -class ClassAssignment( - schemas.DictSchema -): + +class ClassAssignment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + ('state',): { + 'DRAFT': "draft", + 'ACTIVE': "active", + 'ARCHIVED': "archived", + }, + ('assignee_mode',): { + 'EVERYONE': "everyone", + 'SELECTED': "selected", + }, + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - creator = schemas.StrSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "draft": "DRAFT", - "active": "ACTIVE", - "archived": "ARCHIVED", - } - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") - classroom = schemas.StrSchema - creationDate = schemas.DateTimeSchema - scheduledDate = schemas.DateTimeSchema - dueDate = schemas.DateTimeSchema - - - class assigneeMode( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "everyone": "EVERYONE", - "selected": "SELECTED", - } - - @schemas.classproperty - def EVERYONE(cls): - return cls("everyone") - - @schemas.classproperty - def SELECTED(cls): - return cls("selected") - - - class assignedStudents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'assignedStudents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class submissions( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'submissions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - @staticmethod - def googleClassroom() -> typing.Type['GoogleClassroomCoursework']: - return GoogleClassroomCoursework - - @staticmethod - def microsoftGraph() -> typing.Type['MicrosoftGraphAssignment']: - return MicrosoftGraphAssignment - - - class mfc( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mfc': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class canvas( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canvas': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (AssignmentType,), # noqa: E501 + 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'cover': (str,), # noqa: E501 + 'cover_file': (str,), # noqa: E501 + 'attachments': ([MediaAttachment],), # noqa: E501 + 'use_dedicated_attachments': (bool,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + 'toolset': (str,), # noqa: E501 + 'nb_playback_authorized': (float,), # noqa: E501 + 'creator': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'classroom': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'scheduled_date': (datetime,), # noqa: E501 + 'due_date': (datetime,), # noqa: E501 + 'assignee_mode': (str,), # noqa: E501 + 'assigned_students': ([str],), # noqa: E501 + 'submissions': ([AssignmentSubmission],), # noqa: E501 + 'google_classroom': (GoogleClassroomCoursework,), # noqa: E501 + 'microsoft_graph': (MicrosoftGraphAssignment,), # noqa: E501 + 'mfc': (ClassAssignmentMfc,), # noqa: E501 + 'canvas': (ClassAssignmentCanvas,), # noqa: E501 + 'lti': (ClassAssignmentLti,), # noqa: E501 + 'issue': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + 'creator': 'creator', # noqa: E501 + 'state': 'state', # noqa: E501 + 'classroom': 'classroom', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'scheduled_date': 'scheduledDate', # noqa: E501 + 'due_date': 'dueDate', # noqa: E501 + 'assignee_mode': 'assigneeMode', # noqa: E501 + 'assigned_students': 'assignedStudents', # noqa: E501 + 'submissions': 'submissions', # noqa: E501 + 'google_classroom': 'googleClassroom', # noqa: E501 + 'microsoft_graph': 'microsoftGraph', # noqa: E501 + 'mfc': 'mfc', # noqa: E501 + 'canvas': 'canvas', # noqa: E501 + 'lti': 'lti', # noqa: E501 + 'issue': 'issue', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + creator (str): The User unique identifier of the creator of this assignment . [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + classroom (str): The unique identifier of the class where this assignment was posted. [optional] # noqa: E501 + creation_date (datetime): The creation date of this assignment. [optional] # noqa: E501 + scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 + due_date (datetime): The due date of this assignment, late submissions will be marked as paste due. . [optional] # noqa: E501 + assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 + assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 + submissions ([AssignmentSubmission]): [optional] # noqa: E501 + google_classroom (GoogleClassroomCoursework): [optional] # noqa: E501 + microsoft_graph (MicrosoftGraphAssignment): [optional] # noqa: E501 + mfc (ClassAssignmentMfc): [optional] # noqa: E501 + canvas (ClassAssignmentCanvas): [optional] # noqa: E501 + lti (ClassAssignmentLti): [optional] # noqa: E501 + issue (str): Detected issue for this assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class lti( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'lti': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + creator (str): The User unique identifier of the creator of this assignment . [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + classroom (str): The unique identifier of the class where this assignment was posted. [optional] # noqa: E501 + creation_date (datetime): The creation date of this assignment. [optional] # noqa: E501 + scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 + due_date (datetime): The due date of this assignment, late submissions will be marked as paste due. . [optional] # noqa: E501 + assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 + assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 + submissions ([AssignmentSubmission]): [optional] # noqa: E501 + google_classroom (GoogleClassroomCoursework): [optional] # noqa: E501 + microsoft_graph (MicrosoftGraphAssignment): [optional] # noqa: E501 + mfc (ClassAssignmentMfc): [optional] # noqa: E501 + canvas (ClassAssignmentCanvas): [optional] # noqa: E501 + lti (ClassAssignmentLti): [optional] # noqa: E501 + issue (str): Detected issue for this assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - issue = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "creator": creator, - "state": state, - "classroom": classroom, - "creationDate": creationDate, - "scheduledDate": scheduledDate, - "dueDate": dueDate, - "assigneeMode": assigneeMode, - "assignedStudents": assignedStudents, - "submissions": submissions, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - "mfc": mfc, - "canvas": canvas, - "lti": lti, - "issue": issue, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submissions"]) -> MetaOapg.properties.submissions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomCoursework': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphAssignment': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issue"]) -> MetaOapg.properties.issue: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submissions"]) -> typing.Union[MetaOapg.properties.submissions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomCoursework', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphAssignment', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issue"]) -> typing.Union[MetaOapg.properties.issue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, - assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, - assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, - submissions: typing.Union[MetaOapg.properties.submissions, list, tuple, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union['GoogleClassroomCoursework', schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union['MicrosoftGraphAssignment', schemas.Unset] = schemas.unset, - mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - issue: typing.Union[MetaOapg.properties.issue, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAssignment': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - creator=creator, - state=state, - classroom=classroom, - creationDate=creationDate, - scheduledDate=scheduledDate, - dueDate=dueDate, - assigneeMode=assigneeMode, - assignedStudents=assignedStudents, - submissions=submissions, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - mfc=mfc, - canvas=canvas, - lti=lti, - issue=issue, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment.pyi b/flat_api/model/class_assignment.pyi deleted file mode 100644 index f4c0c7f..0000000 --- a/flat_api/model/class_assignment.pyi +++ /dev/null @@ -1,822 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassAssignment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - creator = schemas.StrSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") - classroom = schemas.StrSchema - creationDate = schemas.DateTimeSchema - scheduledDate = schemas.DateTimeSchema - dueDate = schemas.DateTimeSchema - - - class assigneeMode( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def EVERYONE(cls): - return cls("everyone") - - @schemas.classproperty - def SELECTED(cls): - return cls("selected") - - - class assignedStudents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'assignedStudents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class submissions( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'submissions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - @staticmethod - def googleClassroom() -> typing.Type['GoogleClassroomCoursework']: - return GoogleClassroomCoursework - - @staticmethod - def microsoftGraph() -> typing.Type['MicrosoftGraphAssignment']: - return MicrosoftGraphAssignment - - - class mfc( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mfc': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class canvas( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canvas': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class lti( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'lti': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) - issue = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "creator": creator, - "state": state, - "classroom": classroom, - "creationDate": creationDate, - "scheduledDate": scheduledDate, - "dueDate": dueDate, - "assigneeMode": assigneeMode, - "assignedStudents": assignedStudents, - "submissions": submissions, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - "mfc": mfc, - "canvas": canvas, - "lti": lti, - "issue": issue, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["submissions"]) -> MetaOapg.properties.submissions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> 'GoogleClassroomCoursework': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> 'MicrosoftGraphAssignment': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issue"]) -> MetaOapg.properties.issue: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> typing.Union[MetaOapg.properties.classroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["submissions"]) -> typing.Union[MetaOapg.properties.submissions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union['GoogleClassroomCoursework', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union['MicrosoftGraphAssignment', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issue"]) -> typing.Union[MetaOapg.properties.issue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - classroom: typing.Union[MetaOapg.properties.classroom, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, str, datetime, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, str, datetime, schemas.Unset] = schemas.unset, - assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, - assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, - submissions: typing.Union[MetaOapg.properties.submissions, list, tuple, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union['GoogleClassroomCoursework', schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union['MicrosoftGraphAssignment', schemas.Unset] = schemas.unset, - mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - issue: typing.Union[MetaOapg.properties.issue, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAssignment': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - creator=creator, - state=state, - classroom=classroom, - creationDate=creationDate, - scheduledDate=scheduledDate, - dueDate=dueDate, - assigneeMode=assigneeMode, - assignedStudents=assignedStudents, - submissions=submissions, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - mfc=mfc, - canvas=canvas, - lti=lti, - issue=issue, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment diff --git a/flat_api/model/class_assignment_canvas.py b/flat_api/model/class_assignment_canvas.py new file mode 100644 index 0000000..2a5a66f --- /dev/null +++ b/flat_api/model/class_assignment_canvas.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassAssignmentCanvas(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentCanvas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on Canvas assignment. [optional] # noqa: E501 + alternate_link (str): Link to Canvas assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentCanvas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on Canvas assignment. [optional] # noqa: E501 + alternate_link (str): Link to Canvas assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_lti.py b/flat_api/model/class_assignment_lti.py new file mode 100644 index 0000000..a81ff3f --- /dev/null +++ b/flat_api/model/class_assignment_lti.py @@ -0,0 +1,264 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassAssignmentLti(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentLti - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Resource ID in the LMS. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentLti - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Resource ID in the LMS. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_mfc.py b/flat_api/model/class_assignment_mfc.py new file mode 100644 index 0000000..450e19c --- /dev/null +++ b/flat_api/model/class_assignment_mfc.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassAssignmentMfc(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentMfc - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on MusicFirst Task. [optional] # noqa: E501 + alternate_link (str): Link to MusicFirst Classroom task. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentMfc - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on MusicFirst Task. [optional] # noqa: E501 + alternate_link (str): Link to MusicFirst Classroom task. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update.py b/flat_api/model/class_assignment_update.py index 48ca1c3..bce119c 100644 --- a/flat_api/model/class_assignment_update.py +++ b/flat_api/model/class_assignment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,650 +8,357 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -import frozendict # noqa: F401 -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom + from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph + from flat_api.model.class_attachment_creation import ClassAttachmentCreation + globals()['AssignmentType'] = AssignmentType + globals()['ClassAssignmentUpdateGoogleClassroom'] = ClassAssignmentUpdateGoogleClassroom + globals()['ClassAssignmentUpdateMicrosoftGraph'] = ClassAssignmentUpdateMicrosoftGraph + globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -class ClassAssignmentUpdate( - schemas.DictSchema -): +class ClassAssignmentUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + ('state',): { + 'DRAFT': "draft", + 'ACTIVE': "active", + }, + ('assignee_mode',): { + 'EVERYONE': "everyone", + 'SELECTED': "selected", + }, + } - class MetaOapg: - - class properties: - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 1000 - min_length = 1 - description = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - - - class nbPlaybackAuthorized( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'nbPlaybackAuthorized': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class toolset( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'toolset': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class coverFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class cover( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'cover': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class maxPoints( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'maxPoints': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "draft": "DRAFT", - "active": "ACTIVE", - } - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - - class dueDate( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'dueDate': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class scheduledDate( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scheduledDate': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class googleClassroom( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class topicId( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'topicId': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "topicId": topicId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleClassroom': - return super().__new__( - cls, - *_args, - topicId=topicId, - _configuration=_configuration, - **kwargs, - ) - - - class microsoftGraph( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class categories( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'categories': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "categories": categories, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - categories: typing.Union[MetaOapg.properties.categories, list, tuple, None, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'microsoftGraph': - return super().__new__( - cls, - *_args, - categories=categories, - _configuration=_configuration, - **kwargs, + validations = { + ('title',): { + 'max_length': 1000, + 'min_length': 1, + }, + ('max_points',): { + 'inclusive_maximum': 100, + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (AssignmentType,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'attachments': ([ClassAttachmentCreation],), # noqa: E501 + 'nb_playback_authorized': (float, none_type,), # noqa: E501 + 'toolset': (str, none_type,), # noqa: E501 + 'cover_file': (str, none_type,), # noqa: E501 + 'cover': (str, none_type,), # noqa: E501 + 'max_points': (float, none_type,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'due_date': (datetime, none_type,), # noqa: E501 + 'scheduled_date': (datetime, none_type,), # noqa: E501 + 'google_classroom': (ClassAssignmentUpdateGoogleClassroom,), # noqa: E501 + 'microsoft_graph': (ClassAssignmentUpdateMicrosoftGraph,), # noqa: E501 + 'assignee_mode': (str,), # noqa: E501 + 'assigned_students': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + 'state': 'state', # noqa: E501 + 'due_date': 'dueDate', # noqa: E501 + 'scheduled_date': 'scheduledDate', # noqa: E501 + 'google_classroom': 'googleClassroom', # noqa: E501 + 'microsoft_graph': 'microsoftGraph', # noqa: E501 + 'assignee_mode': 'assigneeMode', # noqa: E501 + 'assigned_students': 'assignedStudents', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (AssignmentType): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 + cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 + cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 + max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + due_date (datetime, none_type): The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. . [optional] # noqa: E501 + scheduled_date (datetime, none_type): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 + google_classroom (ClassAssignmentUpdateGoogleClassroom): [optional] # noqa: E501 + microsoft_graph (ClassAssignmentUpdateMicrosoftGraph): [optional] # noqa: E501 + assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 + assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class assigneeMode( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "everyone": "EVERYONE", - "selected": "SELECTED", - } - - @schemas.classproperty - def EVERYONE(cls): - return cls("everyone") - - @schemas.classproperty - def SELECTED(cls): - return cls("selected") - - - class assignedStudents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'assignedStudents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (AssignmentType): [optional] # noqa: E501 + title (str): Title of the assignment. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 + nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 + cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 + cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 + max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + due_date (datetime, none_type): The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. . [optional] # noqa: E501 + scheduled_date (datetime, none_type): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 + google_classroom (ClassAssignmentUpdateGoogleClassroom): [optional] # noqa: E501 + microsoft_graph (ClassAssignmentUpdateMicrosoftGraph): [optional] # noqa: E501 + assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 + assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "type": type, - "title": title, - "description": description, - "attachments": attachments, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "toolset": toolset, - "coverFile": coverFile, - "cover": cover, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "state": state, - "dueDate": dueDate, - "scheduledDate": scheduledDate, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - "assigneeMode": assigneeMode, - "assignedStudents": assignedStudents, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, None, str, datetime, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, None, str, datetime, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, - assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAssignmentUpdate': - return super().__new__( - cls, - *_args, - type=type, - title=title, - description=description, - attachments=attachments, - nbPlaybackAuthorized=nbPlaybackAuthorized, - toolset=toolset, - coverFile=coverFile, - cover=cover, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - state=state, - dueDate=dueDate, - scheduledDate=scheduledDate, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - assigneeMode=assigneeMode, - assignedStudents=assignedStudents, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_attachment_creation import ClassAttachmentCreation + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update.pyi b/flat_api/model/class_assignment_update.pyi deleted file mode 100644 index 8adace4..0000000 --- a/flat_api/model/class_assignment_update.pyi +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassAssignmentUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class title( - schemas.StrSchema - ): - pass - description = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAttachmentCreation']: - return ClassAttachmentCreation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAttachmentCreation'], typing.List['ClassAttachmentCreation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAttachmentCreation': - return super().__getitem__(i) - - - class nbPlaybackAuthorized( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'nbPlaybackAuthorized': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class toolset( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'toolset': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class coverFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class cover( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'cover': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class maxPoints( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'maxPoints': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - - class dueDate( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'dueDate': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class scheduledDate( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scheduledDate': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class googleClassroom( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class topicId( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'topicId': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "topicId": topicId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["topicId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleClassroom': - return super().__new__( - cls, - *_args, - topicId=topicId, - _configuration=_configuration, - **kwargs, - ) - - - class microsoftGraph( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class categories( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'categories': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "categories": categories, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["categories", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - categories: typing.Union[MetaOapg.properties.categories, list, tuple, None, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'microsoftGraph': - return super().__new__( - cls, - *_args, - categories=categories, - _configuration=_configuration, - **kwargs, - ) - - - class assigneeMode( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def EVERYONE(cls): - return cls("everyone") - - @schemas.classproperty - def SELECTED(cls): - return cls("selected") - - - class assignedStudents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'assignedStudents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "type": type, - "title": title, - "description": description, - "attachments": attachments, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - "toolset": toolset, - "coverFile": coverFile, - "cover": cover, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "state": state, - "dueDate": dueDate, - "scheduledDate": scheduledDate, - "googleClassroom": googleClassroom, - "microsoftGraph": microsoftGraph, - "assigneeMode": assigneeMode, - "assignedStudents": assignedStudents, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dueDate"]) -> MetaOapg.properties.dueDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scheduledDate"]) -> MetaOapg.properties.scheduledDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assigneeMode"]) -> MetaOapg.properties.assigneeMode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignedStudents"]) -> MetaOapg.properties.assignedStudents: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dueDate"]) -> typing.Union[MetaOapg.properties.dueDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scheduledDate"]) -> typing.Union[MetaOapg.properties.scheduledDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assigneeMode"]) -> typing.Union[MetaOapg.properties.assigneeMode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignedStudents"]) -> typing.Union[MetaOapg.properties.assignedStudents, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, None, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, None, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, None, str, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - dueDate: typing.Union[MetaOapg.properties.dueDate, None, str, datetime, schemas.Unset] = schemas.unset, - scheduledDate: typing.Union[MetaOapg.properties.scheduledDate, None, str, datetime, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - assigneeMode: typing.Union[MetaOapg.properties.assigneeMode, str, schemas.Unset] = schemas.unset, - assignedStudents: typing.Union[MetaOapg.properties.assignedStudents, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAssignmentUpdate': - return super().__new__( - cls, - *_args, - type=type, - title=title, - description=description, - attachments=attachments, - nbPlaybackAuthorized=nbPlaybackAuthorized, - toolset=toolset, - coverFile=coverFile, - cover=cover, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - state=state, - dueDate=dueDate, - scheduledDate=scheduledDate, - googleClassroom=googleClassroom, - microsoftGraph=microsoftGraph, - assigneeMode=assigneeMode, - assignedStudents=assignedStudents, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_attachment_creation import ClassAttachmentCreation diff --git a/flat_api/model/class_assignment_update_google_classroom.py b/flat_api/model/class_assignment_update_google_classroom.py new file mode 100644 index 0000000..79719e2 --- /dev/null +++ b/flat_api/model/class_assignment_update_google_classroom.py @@ -0,0 +1,264 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassAssignmentUpdateGoogleClassroom(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'topic_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'topic_id': 'topicId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdateGoogleClassroom - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdateGoogleClassroom - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update_microsoft_graph.py b/flat_api/model/class_assignment_update_microsoft_graph.py new file mode 100644 index 0000000..e297f77 --- /dev/null +++ b/flat_api/model/class_assignment_update_microsoft_graph.py @@ -0,0 +1,264 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassAssignmentUpdateMicrosoftGraph(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'categories': ([str], none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'categories': 'categories', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdateMicrosoftGraph - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + categories ([str], none_type): List of categories this assignment belongs to. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAssignmentUpdateMicrosoftGraph - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + categories ([str], none_type): List of categories this assignment belongs to. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_attachment_creation.py b/flat_api/model/class_attachment_creation.py index 2653656..dfa79b6 100644 --- a/flat_api/model/class_attachment_creation.py +++ b/flat_api/model/class_attachment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,189 +8,297 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode + globals()['MediaScoreSharingMode'] = MediaScoreSharingMode -class ClassAttachmentCreation( - schemas.DictSchema -): + +class ClassAttachmentCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Attachment creation for an assignment or stream post. -This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'RICH': "rich", + 'PHOTO': "photo", + 'VIDEO': "video", + 'LINK': "link", + 'FLAT': "flat", + 'GOOGLEDRIVE': "googleDrive", + 'WORKSHEET': "worksheet", + 'PERFORMANCE': "performance", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'worksheet': (str,), # noqa: E501 + 'sharing_mode': (MediaScoreSharingMode,), # noqa: E501 + 'lock_score_template': (bool,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'google_drive_file_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'score': 'score', # noqa: E501 + 'worksheet': 'worksheet', # noqa: E501 + 'sharing_mode': 'sharingMode', # noqa: E501 + 'lock_score_template': 'lockScoreTemplate', # noqa: E501 + 'url': 'url', # noqa: E501 + 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassAttachmentCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): The type of the attachment posted: * `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] # noqa: E501 + score (str): A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. . [optional] # noqa: E501 + worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 + sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 + lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 + url (str): The URL of the attachment.. [optional] # noqa: E501 + google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassAttachmentCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): The type of the attachment posted: * `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] # noqa: E501 + score (str): A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. . [optional] # noqa: E501 + worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 + sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 + lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 + url (str): The URL of the attachment.. [optional] # noqa: E501 + google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "rich": "RICH", - "photo": "PHOTO", - "video": "VIDEO", - "link": "LINK", - "flat": "FLAT", - "googleDrive": "GOOGLE_DRIVE", - "worksheet": "WORKSHEET", - "performance": "PERFORMANCE", - } - - @schemas.classproperty - def RICH(cls): - return cls("rich") - - @schemas.classproperty - def PHOTO(cls): - return cls("photo") - - @schemas.classproperty - def VIDEO(cls): - return cls("video") - - @schemas.classproperty - def LINK(cls): - return cls("link") - - @schemas.classproperty - def FLAT(cls): - return cls("flat") - - @schemas.classproperty - def GOOGLE_DRIVE(cls): - return cls("googleDrive") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") - score = schemas.StrSchema - worksheet = schemas.StrSchema - - @staticmethod - def sharingMode() -> typing.Type['MediaScoreSharingMode']: - return MediaScoreSharingMode - lockScoreTemplate = schemas.BoolSchema - url = schemas.StrSchema - googleDriveFileId = schemas.StrSchema - __annotations__ = { - "type": type, - "score": score, - "worksheet": worksheet, - "sharingMode": sharingMode, - "lockScoreTemplate": lockScoreTemplate, - "url": url, - "googleDriveFileId": googleDriveFileId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, - sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, - lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAttachmentCreation': - return super().__new__( - cls, - *_args, - type=type, - score=score, - worksheet=worksheet, - sharingMode=sharingMode, - lockScoreTemplate=lockScoreTemplate, - url=url, - googleDriveFileId=googleDriveFileId, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_attachment_creation.pyi b/flat_api/model/class_attachment_creation.pyi deleted file mode 100644 index 7ad4957..0000000 --- a/flat_api/model/class_attachment_creation.pyi +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassAttachmentCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attachment creation for an assignment or stream post. -This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. - - """ - - - class MetaOapg: - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def RICH(cls): - return cls("rich") - - @schemas.classproperty - def PHOTO(cls): - return cls("photo") - - @schemas.classproperty - def VIDEO(cls): - return cls("video") - - @schemas.classproperty - def LINK(cls): - return cls("link") - - @schemas.classproperty - def FLAT(cls): - return cls("flat") - - @schemas.classproperty - def GOOGLE_DRIVE(cls): - return cls("googleDrive") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") - score = schemas.StrSchema - worksheet = schemas.StrSchema - - @staticmethod - def sharingMode() -> typing.Type['MediaScoreSharingMode']: - return MediaScoreSharingMode - lockScoreTemplate = schemas.BoolSchema - url = schemas.StrSchema - googleDriveFileId = schemas.StrSchema - __annotations__ = { - "type": type, - "score": score, - "worksheet": worksheet, - "sharingMode": sharingMode, - "lockScoreTemplate": lockScoreTemplate, - "url": url, - "googleDriveFileId": googleDriveFileId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, - sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, - lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassAttachmentCreation': - return super().__new__( - cls, - *_args, - type=type, - score=score, - worksheet=worksheet, - sharingMode=sharingMode, - lockScoreTemplate=lockScoreTemplate, - url=url, - googleDriveFileId=googleDriveFileId, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/class_creation.py b/flat_api/model/class_creation.py index 304b846..d0d08b9 100644 --- a/flat_api/model/class_creation.py +++ b/flat_api/model/class_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,165 +8,296 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_grade_level import ClassGradeLevel + from flat_api.model.edu_skills_focused import EduSkillsFocused + globals()['ClassGradeLevel'] = ClassGradeLevel + globals()['EduSkillsFocused'] = EduSkillsFocused -class ClassCreation( - schemas.DictSchema -): + +class ClassCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 255, + }, + ('section',): { + 'max_length': 255, + }, + ('size',): { + 'inclusive_minimum': 0, + }, + } - class MetaOapg: - required = { - "name", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'section': (str,), # noqa: E501 + 'level': (ClassGradeLevel,), # noqa: E501 + 'skills_focused': (EduSkillsFocused,), # noqa: E501 + 'size': (float, none_type,), # noqa: E501 } - - class properties: - - - class name( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 255 - - - class section( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 255 - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'section': 'section', # noqa: E501 + 'level': 'level', # noqa: E501 + 'skills_focused': 'skillsFocused', # noqa: E501 + 'size': 'size', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """ClassCreation - a model defined in OpenAPI + + Args: + name (str): The name of the new class + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + section (str): The section of the new class. [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, *args, **kwargs): # noqa: E501 + """ClassCreation - a model defined in OpenAPI + + Args: + name (str): The name of the new class + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + section (str): The section of the new class. [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "name": name, - "section": section, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassCreation': - return super().__new__( - cls, - *_args, - name=name, - section=section, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_creation.pyi b/flat_api/model/class_creation.pyi deleted file mode 100644 index 4eab4f7..0000000 --- a/flat_api/model/class_creation.pyi +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a classroom - """ - - - class MetaOapg: - required = { - "name", - } - - class properties: - - - class name( - schemas.StrSchema - ): - pass - - - class section( - schemas.StrSchema - ): - pass - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "name": name, - "section": section, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassCreation': - return super().__new__( - cls, - *_args, - name=name, - section=section, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/class_details.py b/flat_api/model/class_details.py index 148ce57..8ba9121 100644 --- a/flat_api/model/class_details.py +++ b/flat_api/model/class_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,1029 +8,377 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_details_canvas import ClassDetailsCanvas + from flat_api.model.class_details_clever import ClassDetailsClever + from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom + from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive + from flat_api.model.class_details_issues import ClassDetailsIssues + from flat_api.model.class_details_lti import ClassDetailsLti + from flat_api.model.class_details_mfc import ClassDetailsMfc + from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph + from flat_api.model.class_grade_level import ClassGradeLevel + from flat_api.model.class_state import ClassState + from flat_api.model.edu_skills_focused import EduSkillsFocused + from flat_api.model.group_details import GroupDetails + globals()['ClassDetailsCanvas'] = ClassDetailsCanvas + globals()['ClassDetailsClever'] = ClassDetailsClever + globals()['ClassDetailsGoogleClassroom'] = ClassDetailsGoogleClassroom + globals()['ClassDetailsGoogleDrive'] = ClassDetailsGoogleDrive + globals()['ClassDetailsIssues'] = ClassDetailsIssues + globals()['ClassDetailsLti'] = ClassDetailsLti + globals()['ClassDetailsMfc'] = ClassDetailsMfc + globals()['ClassDetailsMicrosoftGraph'] = ClassDetailsMicrosoftGraph + globals()['ClassGradeLevel'] = ClassGradeLevel + globals()['ClassState'] = ClassState + globals()['EduSkillsFocused'] = EduSkillsFocused + globals()['GroupDetails'] = GroupDetails -class ClassDetails( - schemas.DictSchema -): + +class ClassDetails(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def state() -> typing.Type['ClassState']: - return ClassState - name = schemas.StrSchema - section = schemas.StrSchema - description = schemas.StrSchema - organization = schemas.StrSchema - owner = schemas.StrSchema - creationDate = schemas.DateTimeSchema - enrollmentCode = schemas.StrSchema - theme = schemas.StrSchema - assignmentsCount = schemas.NumberSchema - - @staticmethod - def studentsGroup() -> typing.Type['GroupDetails']: - return GroupDetails - - @staticmethod - def teachersGroup() -> typing.Type['GroupDetails']: - return GroupDetails - - - class issues( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class sync( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - email = schemas.StrSchema - - - class reason( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "otherOrgnanization": "OTHER_ORGNANIZATION", - "personalSubscription": "PERSONAL_SUBSCRIPTION", - } - - @schemas.classproperty - def OTHER_ORGNANIZATION(cls): - return cls("otherOrgnanization") - - @schemas.classproperty - def PERSONAL_SUBSCRIPTION(cls): - return cls("personalSubscription") - __annotations__ = { - "id": id, - "email": email, - "reason": reason, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - id=id, - email=email, - reason=reason, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'sync': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "sync": sync, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sync"]) -> MetaOapg.properties.sync: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sync"]) -> typing.Union[MetaOapg.properties.sync, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - sync: typing.Union[MetaOapg.properties.sync, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'issues': - return super().__new__( - cls, - *_args, - sync=sync, - _configuration=_configuration, - **kwargs, - ) - - - class googleClassroom( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleClassroom': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class googleDrive( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - teacherFolderId = schemas.StrSchema - teacherFolderAlternateLink = schemas.StrSchema - __annotations__ = { - "teacherFolderId": teacherFolderId, - "teacherFolderAlternateLink": teacherFolderAlternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teacherFolderId"]) -> MetaOapg.properties.teacherFolderId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> MetaOapg.properties.teacherFolderAlternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderId"]) -> typing.Union[MetaOapg.properties.teacherFolderId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> typing.Union[MetaOapg.properties.teacherFolderAlternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - teacherFolderId: typing.Union[MetaOapg.properties.teacherFolderId, str, schemas.Unset] = schemas.unset, - teacherFolderAlternateLink: typing.Union[MetaOapg.properties.teacherFolderAlternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleDrive': - return super().__new__( - cls, - *_args, - teacherFolderId=teacherFolderId, - teacherFolderAlternateLink=teacherFolderAlternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class microsoftGraph( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'microsoftGraph': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) - - - class lti( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - contextId = schemas.StrSchema - contextTitle = schemas.StrSchema - contextLabel = schemas.StrSchema - __annotations__ = { - "contextId": contextId, - "contextTitle": contextTitle, - "contextLabel": contextLabel, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextId"]) -> MetaOapg.properties.contextId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextTitle"]) -> MetaOapg.properties.contextTitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextLabel"]) -> MetaOapg.properties.contextLabel: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextId"]) -> typing.Union[MetaOapg.properties.contextId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextTitle"]) -> typing.Union[MetaOapg.properties.contextTitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextLabel"]) -> typing.Union[MetaOapg.properties.contextLabel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - contextId: typing.Union[MetaOapg.properties.contextId, str, schemas.Unset] = schemas.unset, - contextTitle: typing.Union[MetaOapg.properties.contextTitle, str, schemas.Unset] = schemas.unset, - contextLabel: typing.Union[MetaOapg.properties.contextLabel, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'lti': - return super().__new__( - cls, - *_args, - contextId=contextId, - contextTitle=contextTitle, - contextLabel=contextLabel, - _configuration=_configuration, - **kwargs, - ) - - - class canvas( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - domain = schemas.StrSchema - __annotations__ = { - "id": id, - "domain": domain, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["domain"]) -> MetaOapg.properties.domain: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["domain"]) -> typing.Union[MetaOapg.properties.domain, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - domain: typing.Union[MetaOapg.properties.domain, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canvas': - return super().__new__( - cls, - *_args, - id=id, - domain=domain, - _configuration=_configuration, - **kwargs, - ) - - - class mfc( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mfc': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class clever( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - - - class subject( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "english/language arts": "ENGLISH_LANGUAGE_ARTS", - "math": "MATH", - "science": "SCIENCE", - "social studies": "SOCIAL_STUDIES", - "language": "LANGUAGE", - "homeroom/advisory": "HOMEROOM_ADVISORY", - "interventions/online learning": "INTERVENTIONS_ONLINE_LEARNING", - "technology and engineering": "TECHNOLOGY_AND_ENGINEERING", - "PE and health": "PE_AND_HEALTH", - "arts and music": "ARTS_AND_MUSIC", - "other": "OTHER", - } - - @schemas.classproperty - def ENGLISH_LANGUAGE_ARTS(cls): - return cls("english/language arts") - - @schemas.classproperty - def MATH(cls): - return cls("math") - - @schemas.classproperty - def SCIENCE(cls): - return cls("science") - - @schemas.classproperty - def SOCIAL_STUDIES(cls): - return cls("social studies") - - @schemas.classproperty - def LANGUAGE(cls): - return cls("language") - - @schemas.classproperty - def HOMEROOM_ADVISORY(cls): - return cls("homeroom/advisory") - - @schemas.classproperty - def INTERVENTIONS_ONLINE_LEARNING(cls): - return cls("interventions/online learning") - - @schemas.classproperty - def TECHNOLOGY_AND_ENGINEERING(cls): - return cls("technology and engineering") - - @schemas.classproperty - def PE_AND_HEALTH(cls): - return cls("PE and health") - - @schemas.classproperty - def ARTS_AND_MUSIC(cls): - return cls("arts and music") - - @schemas.classproperty - def OTHER(cls): - return cls("other") - termName = schemas.StrSchema - termStartDate = schemas.DateTimeSchema - termEndDate = schemas.DateTimeSchema - __annotations__ = { - "id": id, - "creationDate": creationDate, - "modificationDate": modificationDate, - "subject": subject, - "termName": termName, - "termStartDate": termStartDate, - "termEndDate": termEndDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subject"]) -> MetaOapg.properties.subject: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termName"]) -> MetaOapg.properties.termName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termStartDate"]) -> MetaOapg.properties.termStartDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termEndDate"]) -> MetaOapg.properties.termEndDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subject"]) -> typing.Union[MetaOapg.properties.subject, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termName"]) -> typing.Union[MetaOapg.properties.termName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termStartDate"]) -> typing.Union[MetaOapg.properties.termStartDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termEndDate"]) -> typing.Union[MetaOapg.properties.termEndDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - subject: typing.Union[MetaOapg.properties.subject, str, schemas.Unset] = schemas.unset, - termName: typing.Union[MetaOapg.properties.termName, str, schemas.Unset] = schemas.unset, - termStartDate: typing.Union[MetaOapg.properties.termStartDate, str, datetime, schemas.Unset] = schemas.unset, - termEndDate: typing.Union[MetaOapg.properties.termEndDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'clever': - return super().__new__( - cls, - *_args, - id=id, - creationDate=creationDate, - modificationDate=modificationDate, - subject=subject, - termName=termName, - termStartDate=termStartDate, - termEndDate=termEndDate, - _configuration=_configuration, - **kwargs, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'state': (ClassState,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'section': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'owner': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'enrollment_code': (str,), # noqa: E501 + 'theme': (str,), # noqa: E501 + 'assignments_count': (float,), # noqa: E501 + 'students_group': (GroupDetails,), # noqa: E501 + 'teachers_group': (GroupDetails,), # noqa: E501 + 'issues': (ClassDetailsIssues,), # noqa: E501 + 'google_classroom': (ClassDetailsGoogleClassroom,), # noqa: E501 + 'google_drive': (ClassDetailsGoogleDrive,), # noqa: E501 + 'microsoft_graph': (ClassDetailsMicrosoftGraph,), # noqa: E501 + 'lti': (ClassDetailsLti,), # noqa: E501 + 'canvas': (ClassDetailsCanvas,), # noqa: E501 + 'mfc': (ClassDetailsMfc,), # noqa: E501 + 'clever': (ClassDetailsClever,), # noqa: E501 + 'level': (ClassGradeLevel,), # noqa: E501 + 'skills_focused': (EduSkillsFocused,), # noqa: E501 + 'size': (float, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'name': 'name', # noqa: E501 + 'section': 'section', # noqa: E501 + 'description': 'description', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'owner': 'owner', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'enrollment_code': 'enrollmentCode', # noqa: E501 + 'theme': 'theme', # noqa: E501 + 'assignments_count': 'assignmentsCount', # noqa: E501 + 'students_group': 'studentsGroup', # noqa: E501 + 'teachers_group': 'teachersGroup', # noqa: E501 + 'issues': 'issues', # noqa: E501 + 'google_classroom': 'googleClassroom', # noqa: E501 + 'google_drive': 'googleDrive', # noqa: E501 + 'microsoft_graph': 'microsoftGraph', # noqa: E501 + 'lti': 'lti', # noqa: E501 + 'canvas': 'canvas', # noqa: E501 + 'mfc': 'mfc', # noqa: E501 + 'clever': 'clever', # noqa: E501 + 'level': 'level', # noqa: E501 + 'skills_focused': 'skillsFocused', # noqa: E501 + 'size': 'size', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the class. [optional] # noqa: E501 + state (ClassState): [optional] # noqa: E501 + name (str): The name of the class. [optional] # noqa: E501 + section (str): The section of the class. [optional] # noqa: E501 + description (str): An optionnal description for this class. [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 + owner (str): The unique identifier of the User owning this class. [optional] # noqa: E501 + creation_date (datetime): The date when the class was create. [optional] # noqa: E501 + enrollment_code (str): [Teachers only] The enrollment code that can be used by the students to join the class . [optional] # noqa: E501 + theme (str): The theme identifier using in Flat User Interface. [optional] # noqa: E501 + assignments_count (float): The number of assignments created in the class. [optional] # noqa: E501 + students_group (GroupDetails): [optional] # noqa: E501 + teachers_group (GroupDetails): [optional] # noqa: E501 + issues (ClassDetailsIssues): [optional] # noqa: E501 + google_classroom (ClassDetailsGoogleClassroom): [optional] # noqa: E501 + google_drive (ClassDetailsGoogleDrive): [optional] # noqa: E501 + microsoft_graph (ClassDetailsMicrosoftGraph): [optional] # noqa: E501 + lti (ClassDetailsLti): [optional] # noqa: E501 + canvas (ClassDetailsCanvas): [optional] # noqa: E501 + mfc (ClassDetailsMfc): [optional] # noqa: E501 + clever (ClassDetailsClever): [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the class. [optional] # noqa: E501 + state (ClassState): [optional] # noqa: E501 + name (str): The name of the class. [optional] # noqa: E501 + section (str): The section of the class. [optional] # noqa: E501 + description (str): An optionnal description for this class. [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 + owner (str): The unique identifier of the User owning this class. [optional] # noqa: E501 + creation_date (datetime): The date when the class was create. [optional] # noqa: E501 + enrollment_code (str): [Teachers only] The enrollment code that can be used by the students to join the class . [optional] # noqa: E501 + theme (str): The theme identifier using in Flat User Interface. [optional] # noqa: E501 + assignments_count (float): The number of assignments created in the class. [optional] # noqa: E501 + students_group (GroupDetails): [optional] # noqa: E501 + teachers_group (GroupDetails): [optional] # noqa: E501 + issues (ClassDetailsIssues): [optional] # noqa: E501 + google_classroom (ClassDetailsGoogleClassroom): [optional] # noqa: E501 + google_drive (ClassDetailsGoogleDrive): [optional] # noqa: E501 + microsoft_graph (ClassDetailsMicrosoftGraph): [optional] # noqa: E501 + lti (ClassDetailsLti): [optional] # noqa: E501 + canvas (ClassDetailsCanvas): [optional] # noqa: E501 + mfc (ClassDetailsMfc): [optional] # noqa: E501 + clever (ClassDetailsClever): [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "id": id, - "state": state, - "name": name, - "section": section, - "description": description, - "organization": organization, - "owner": owner, - "creationDate": creationDate, - "enrollmentCode": enrollmentCode, - "theme": theme, - "assignmentsCount": assignmentsCount, - "studentsGroup": studentsGroup, - "teachersGroup": teachersGroup, - "issues": issues, - "googleClassroom": googleClassroom, - "googleDrive": googleDrive, - "microsoftGraph": microsoftGraph, - "lti": lti, - "canvas": canvas, - "mfc": mfc, - "clever": clever, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ClassState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["owner"]) -> MetaOapg.properties.owner: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enrollmentCode"]) -> MetaOapg.properties.enrollmentCode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["theme"]) -> MetaOapg.properties.theme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignmentsCount"]) -> MetaOapg.properties.assignmentsCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["studentsGroup"]) -> 'GroupDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teachersGroup"]) -> 'GroupDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issues"]) -> MetaOapg.properties.issues: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["clever"]) -> MetaOapg.properties.clever: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ClassState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["owner"]) -> typing.Union[MetaOapg.properties.owner, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enrollmentCode"]) -> typing.Union[MetaOapg.properties.enrollmentCode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["theme"]) -> typing.Union[MetaOapg.properties.theme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignmentsCount"]) -> typing.Union[MetaOapg.properties.assignmentsCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["studentsGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teachersGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issues"]) -> typing.Union[MetaOapg.properties.issues, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["clever"]) -> typing.Union[MetaOapg.properties.clever, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union['ClassState', schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - owner: typing.Union[MetaOapg.properties.owner, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - enrollmentCode: typing.Union[MetaOapg.properties.enrollmentCode, str, schemas.Unset] = schemas.unset, - theme: typing.Union[MetaOapg.properties.theme, str, schemas.Unset] = schemas.unset, - assignmentsCount: typing.Union[MetaOapg.properties.assignmentsCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - studentsGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, - teachersGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, - issues: typing.Union[MetaOapg.properties.issues, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - googleDrive: typing.Union[MetaOapg.properties.googleDrive, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - clever: typing.Union[MetaOapg.properties.clever, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassDetails': - return super().__new__( - cls, - *_args, - id=id, - state=state, - name=name, - section=section, - description=description, - organization=organization, - owner=owner, - creationDate=creationDate, - enrollmentCode=enrollmentCode, - theme=theme, - assignmentsCount=assignmentsCount, - studentsGroup=studentsGroup, - teachersGroup=teachersGroup, - issues=issues, - googleClassroom=googleClassroom, - googleDrive=googleDrive, - microsoftGraph=microsoftGraph, - lti=lti, - canvas=canvas, - mfc=mfc, - clever=clever, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.class_state import ClassState -from flat_api.model.edu_skills_focused import EduSkillsFocused -from flat_api.model.group_details import GroupDetails + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details.pyi b/flat_api/model/class_details.pyi deleted file mode 100644 index 226b58f..0000000 --- a/flat_api/model/class_details.pyi +++ /dev/null @@ -1,1015 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassDetails( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A classroom - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def state() -> typing.Type['ClassState']: - return ClassState - name = schemas.StrSchema - section = schemas.StrSchema - description = schemas.StrSchema - organization = schemas.StrSchema - owner = schemas.StrSchema - creationDate = schemas.DateTimeSchema - enrollmentCode = schemas.StrSchema - theme = schemas.StrSchema - assignmentsCount = schemas.NumberSchema - - @staticmethod - def studentsGroup() -> typing.Type['GroupDetails']: - return GroupDetails - - @staticmethod - def teachersGroup() -> typing.Type['GroupDetails']: - return GroupDetails - - - class issues( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class sync( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - email = schemas.StrSchema - - - class reason( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def OTHER_ORGNANIZATION(cls): - return cls("otherOrgnanization") - - @schemas.classproperty - def PERSONAL_SUBSCRIPTION(cls): - return cls("personalSubscription") - __annotations__ = { - "id": id, - "email": email, - "reason": reason, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "email", "reason", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - id=id, - email=email, - reason=reason, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'sync': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "sync": sync, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sync"]) -> MetaOapg.properties.sync: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sync"]) -> typing.Union[MetaOapg.properties.sync, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sync", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - sync: typing.Union[MetaOapg.properties.sync, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'issues': - return super().__new__( - cls, - *_args, - sync=sync, - _configuration=_configuration, - **kwargs, - ) - - - class googleClassroom( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleClassroom': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class googleDrive( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - teacherFolderId = schemas.StrSchema - teacherFolderAlternateLink = schemas.StrSchema - __annotations__ = { - "teacherFolderId": teacherFolderId, - "teacherFolderAlternateLink": teacherFolderAlternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teacherFolderId"]) -> MetaOapg.properties.teacherFolderId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> MetaOapg.properties.teacherFolderAlternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderId"]) -> typing.Union[MetaOapg.properties.teacherFolderId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teacherFolderAlternateLink"]) -> typing.Union[MetaOapg.properties.teacherFolderAlternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["teacherFolderId", "teacherFolderAlternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - teacherFolderId: typing.Union[MetaOapg.properties.teacherFolderId, str, schemas.Unset] = schemas.unset, - teacherFolderAlternateLink: typing.Union[MetaOapg.properties.teacherFolderAlternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'googleDrive': - return super().__new__( - cls, - *_args, - teacherFolderId=teacherFolderId, - teacherFolderAlternateLink=teacherFolderAlternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class microsoftGraph( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'microsoftGraph': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) - - - class lti( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - contextId = schemas.StrSchema - contextTitle = schemas.StrSchema - contextLabel = schemas.StrSchema - __annotations__ = { - "contextId": contextId, - "contextTitle": contextTitle, - "contextLabel": contextLabel, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextId"]) -> MetaOapg.properties.contextId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextTitle"]) -> MetaOapg.properties.contextTitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["contextLabel"]) -> MetaOapg.properties.contextLabel: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextId"]) -> typing.Union[MetaOapg.properties.contextId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextTitle"]) -> typing.Union[MetaOapg.properties.contextTitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["contextLabel"]) -> typing.Union[MetaOapg.properties.contextLabel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["contextId", "contextTitle", "contextLabel", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - contextId: typing.Union[MetaOapg.properties.contextId, str, schemas.Unset] = schemas.unset, - contextTitle: typing.Union[MetaOapg.properties.contextTitle, str, schemas.Unset] = schemas.unset, - contextLabel: typing.Union[MetaOapg.properties.contextLabel, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'lti': - return super().__new__( - cls, - *_args, - contextId=contextId, - contextTitle=contextTitle, - contextLabel=contextLabel, - _configuration=_configuration, - **kwargs, - ) - - - class canvas( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - domain = schemas.StrSchema - __annotations__ = { - "id": id, - "domain": domain, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["domain"]) -> MetaOapg.properties.domain: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["domain"]) -> typing.Union[MetaOapg.properties.domain, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "domain", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - domain: typing.Union[MetaOapg.properties.domain, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canvas': - return super().__new__( - cls, - *_args, - id=id, - domain=domain, - _configuration=_configuration, - **kwargs, - ) - - - class mfc( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'mfc': - return super().__new__( - cls, - *_args, - id=id, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) - - - class clever( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - - - class subject( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ENGLISH_LANGUAGE_ARTS(cls): - return cls("english/language arts") - - @schemas.classproperty - def MATH(cls): - return cls("math") - - @schemas.classproperty - def SCIENCE(cls): - return cls("science") - - @schemas.classproperty - def SOCIAL_STUDIES(cls): - return cls("social studies") - - @schemas.classproperty - def LANGUAGE(cls): - return cls("language") - - @schemas.classproperty - def HOMEROOM_ADVISORY(cls): - return cls("homeroom/advisory") - - @schemas.classproperty - def INTERVENTIONS_ONLINE_LEARNING(cls): - return cls("interventions/online learning") - - @schemas.classproperty - def TECHNOLOGY_AND_ENGINEERING(cls): - return cls("technology and engineering") - - @schemas.classproperty - def PE_AND_HEALTH(cls): - return cls("PE and health") - - @schemas.classproperty - def ARTS_AND_MUSIC(cls): - return cls("arts and music") - - @schemas.classproperty - def OTHER(cls): - return cls("other") - termName = schemas.StrSchema - termStartDate = schemas.DateTimeSchema - termEndDate = schemas.DateTimeSchema - __annotations__ = { - "id": id, - "creationDate": creationDate, - "modificationDate": modificationDate, - "subject": subject, - "termName": termName, - "termStartDate": termStartDate, - "termEndDate": termEndDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subject"]) -> MetaOapg.properties.subject: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termName"]) -> MetaOapg.properties.termName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termStartDate"]) -> MetaOapg.properties.termStartDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["termEndDate"]) -> MetaOapg.properties.termEndDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subject"]) -> typing.Union[MetaOapg.properties.subject, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termName"]) -> typing.Union[MetaOapg.properties.termName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termStartDate"]) -> typing.Union[MetaOapg.properties.termStartDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["termEndDate"]) -> typing.Union[MetaOapg.properties.termEndDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - subject: typing.Union[MetaOapg.properties.subject, str, schemas.Unset] = schemas.unset, - termName: typing.Union[MetaOapg.properties.termName, str, schemas.Unset] = schemas.unset, - termStartDate: typing.Union[MetaOapg.properties.termStartDate, str, datetime, schemas.Unset] = schemas.unset, - termEndDate: typing.Union[MetaOapg.properties.termEndDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'clever': - return super().__new__( - cls, - *_args, - id=id, - creationDate=creationDate, - modificationDate=modificationDate, - subject=subject, - termName=termName, - termStartDate=termStartDate, - termEndDate=termEndDate, - _configuration=_configuration, - **kwargs, - ) - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "id": id, - "state": state, - "name": name, - "section": section, - "description": description, - "organization": organization, - "owner": owner, - "creationDate": creationDate, - "enrollmentCode": enrollmentCode, - "theme": theme, - "assignmentsCount": assignmentsCount, - "studentsGroup": studentsGroup, - "teachersGroup": teachersGroup, - "issues": issues, - "googleClassroom": googleClassroom, - "googleDrive": googleDrive, - "microsoftGraph": microsoftGraph, - "lti": lti, - "canvas": canvas, - "mfc": mfc, - "clever": clever, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ClassState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["owner"]) -> MetaOapg.properties.owner: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enrollmentCode"]) -> MetaOapg.properties.enrollmentCode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["theme"]) -> MetaOapg.properties.theme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignmentsCount"]) -> MetaOapg.properties.assignmentsCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["studentsGroup"]) -> 'GroupDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["teachersGroup"]) -> 'GroupDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["issues"]) -> MetaOapg.properties.issues: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleClassroom"]) -> MetaOapg.properties.googleClassroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["microsoftGraph"]) -> MetaOapg.properties.microsoftGraph: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lti"]) -> MetaOapg.properties.lti: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canvas"]) -> MetaOapg.properties.canvas: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mfc"]) -> MetaOapg.properties.mfc: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["clever"]) -> MetaOapg.properties.clever: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ClassState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["owner"]) -> typing.Union[MetaOapg.properties.owner, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enrollmentCode"]) -> typing.Union[MetaOapg.properties.enrollmentCode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["theme"]) -> typing.Union[MetaOapg.properties.theme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignmentsCount"]) -> typing.Union[MetaOapg.properties.assignmentsCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["studentsGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["teachersGroup"]) -> typing.Union['GroupDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["issues"]) -> typing.Union[MetaOapg.properties.issues, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleClassroom"]) -> typing.Union[MetaOapg.properties.googleClassroom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["microsoftGraph"]) -> typing.Union[MetaOapg.properties.microsoftGraph, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lti"]) -> typing.Union[MetaOapg.properties.lti, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canvas"]) -> typing.Union[MetaOapg.properties.canvas, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mfc"]) -> typing.Union[MetaOapg.properties.mfc, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["clever"]) -> typing.Union[MetaOapg.properties.clever, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union['ClassState', schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - owner: typing.Union[MetaOapg.properties.owner, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - enrollmentCode: typing.Union[MetaOapg.properties.enrollmentCode, str, schemas.Unset] = schemas.unset, - theme: typing.Union[MetaOapg.properties.theme, str, schemas.Unset] = schemas.unset, - assignmentsCount: typing.Union[MetaOapg.properties.assignmentsCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - studentsGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, - teachersGroup: typing.Union['GroupDetails', schemas.Unset] = schemas.unset, - issues: typing.Union[MetaOapg.properties.issues, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - googleClassroom: typing.Union[MetaOapg.properties.googleClassroom, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - googleDrive: typing.Union[MetaOapg.properties.googleDrive, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - microsoftGraph: typing.Union[MetaOapg.properties.microsoftGraph, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - lti: typing.Union[MetaOapg.properties.lti, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - canvas: typing.Union[MetaOapg.properties.canvas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - mfc: typing.Union[MetaOapg.properties.mfc, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - clever: typing.Union[MetaOapg.properties.clever, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassDetails': - return super().__new__( - cls, - *_args, - id=id, - state=state, - name=name, - section=section, - description=description, - organization=organization, - owner=owner, - creationDate=creationDate, - enrollmentCode=enrollmentCode, - theme=theme, - assignmentsCount=assignmentsCount, - studentsGroup=studentsGroup, - teachersGroup=teachersGroup, - issues=issues, - googleClassroom=googleClassroom, - googleDrive=googleDrive, - microsoftGraph=microsoftGraph, - lti=lti, - canvas=canvas, - mfc=mfc, - clever=clever, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.class_state import ClassState -from flat_api.model.edu_skills_focused import EduSkillsFocused -from flat_api.model.group_details import GroupDetails diff --git a/flat_api/model/class_details_canvas.py b/flat_api/model/class_details_canvas.py new file mode 100644 index 0000000..b129b3e --- /dev/null +++ b/flat_api/model/class_details_canvas.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsCanvas(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'domain': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'domain': 'domain', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsCanvas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on Canvas. [optional] # noqa: E501 + domain (str): Canvas instance domain (e.g. \"canvas.instructure.com\"). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsCanvas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on Canvas. [optional] # noqa: E501 + domain (str): Canvas instance domain (e.g. \"canvas.instructure.com\"). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_clever.py b/flat_api/model/class_details_clever.py new file mode 100644 index 0000000..59e9a77 --- /dev/null +++ b/flat_api/model/class_details_clever.py @@ -0,0 +1,301 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsClever(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('subject',): { + 'ENGLISH/LANGUAGE_ARTS': "english/language arts", + 'MATH': "math", + 'SCIENCE': "science", + 'SOCIAL_STUDIES': "social studies", + 'LANGUAGE': "language", + 'HOMEROOM/ADVISORY': "homeroom/advisory", + 'INTERVENTIONS/ONLINE_LEARNING': "interventions/online learning", + 'TECHNOLOGY_AND_ENGINEERING': "technology and engineering", + 'PE_AND_HEALTH': "PE and health", + 'ARTS_AND_MUSIC': "arts and music", + 'OTHER': "other", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'subject': (str,), # noqa: E501 + 'term_name': (str,), # noqa: E501 + 'term_start_date': (datetime,), # noqa: E501 + 'term_end_date': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'subject': 'subject', # noqa: E501 + 'term_name': 'termName', # noqa: E501 + 'term_start_date': 'termStartDate', # noqa: E501 + 'term_end_date': 'termEndDate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsClever - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Clever section unique identifier. [optional] # noqa: E501 + creation_date (datetime): The creation date of the section on clever. [optional] # noqa: E501 + modification_date (datetime): The last modification date of the section on clever. [optional] # noqa: E501 + subject (str): Normalized subject of the course. [optional] # noqa: E501 + term_name (str): Name of the term when this course happens. [optional] # noqa: E501 + term_start_date (datetime): Beginning date of the term. [optional] # noqa: E501 + term_end_date (datetime): End date of the term. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsClever - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Clever section unique identifier. [optional] # noqa: E501 + creation_date (datetime): The creation date of the section on clever. [optional] # noqa: E501 + modification_date (datetime): The last modification date of the section on clever. [optional] # noqa: E501 + subject (str): Normalized subject of the course. [optional] # noqa: E501 + term_name (str): Name of the term when this course happens. [optional] # noqa: E501 + term_start_date (datetime): Beginning date of the term. [optional] # noqa: E501 + term_end_date (datetime): End date of the term. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_google_classroom.py b/flat_api/model/class_details_google_classroom.py new file mode 100644 index 0000000..24e4288 --- /dev/null +++ b/flat_api/model/class_details_google_classroom.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsGoogleClassroom(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsGoogleClassroom - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The course identifier on Google Classroom. [optional] # noqa: E501 + alternate_link (str): Absolute link to this course in the Classroom web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsGoogleClassroom - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The course identifier on Google Classroom. [optional] # noqa: E501 + alternate_link (str): Absolute link to this course in the Classroom web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_google_drive.py b/flat_api/model/class_details_google_drive.py new file mode 100644 index 0000000..c9384b6 --- /dev/null +++ b/flat_api/model/class_details_google_drive.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsGoogleDrive(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'teacher_folder_id': (str,), # noqa: E501 + 'teacher_folder_alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'teacher_folder_id': 'teacherFolderId', # noqa: E501 + 'teacher_folder_alternate_link': 'teacherFolderAlternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsGoogleDrive - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + teacher_folder_id (str): [Teachers only] The Drive directory identifier of the teachers' folder . [optional] # noqa: E501 + teacher_folder_alternate_link (str): [Teachers only] The Drive URL of the teachers' folder . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsGoogleDrive - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + teacher_folder_id (str): [Teachers only] The Drive directory identifier of the teachers' folder . [optional] # noqa: E501 + teacher_folder_alternate_link (str): [Teachers only] The Drive URL of the teachers' folder . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_issues.py b/flat_api/model/class_details_issues.py new file mode 100644 index 0000000..e3db155 --- /dev/null +++ b/flat_api/model/class_details_issues.py @@ -0,0 +1,270 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner + globals()['ClassDetailsIssuesSyncInner'] = ClassDetailsIssuesSyncInner + + +class ClassDetailsIssues(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'sync': ([ClassDetailsIssuesSyncInner],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'sync': 'sync', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsIssues - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sync ([ClassDetailsIssuesSyncInner]): Synchronization issues for the class. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsIssues - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + sync ([ClassDetailsIssuesSyncInner]): Synchronization issues for the class. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_issues_sync_inner.py b/flat_api/model/class_details_issues_sync_inner.py new file mode 100644 index 0000000..a522b70 --- /dev/null +++ b/flat_api/model/class_details_issues_sync_inner.py @@ -0,0 +1,276 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsIssuesSyncInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('reason',): { + 'OTHERORGNANIZATION': "otherOrgnanization", + 'PERSONALSUBSCRIPTION': "personalSubscription", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'reason': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'email': 'email', # noqa: E501 + 'reason': 'reason', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsIssuesSyncInner - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The account user identifier. [optional] # noqa: E501 + email (str): The email address of the user concerned by this sync issue. [optional] # noqa: E501 + reason (str): The reason why the account cannot be synced. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsIssuesSyncInner - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The account user identifier. [optional] # noqa: E501 + email (str): The email address of the user concerned by this sync issue. [optional] # noqa: E501 + reason (str): The reason why the account cannot be synced. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_lti.py b/flat_api/model/class_details_lti.py new file mode 100644 index 0000000..144fce2 --- /dev/null +++ b/flat_api/model/class_details_lti.py @@ -0,0 +1,272 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsLti(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'context_id': (str,), # noqa: E501 + 'context_title': (str,), # noqa: E501 + 'context_label': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'context_id': 'contextId', # noqa: E501 + 'context_title': 'contextTitle', # noqa: E501 + 'context_label': 'contextLabel', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsLti - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + context_id (str): Unique context identifier provided. [optional] # noqa: E501 + context_title (str): Context title. [optional] # noqa: E501 + context_label (str): Context label. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsLti - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + context_id (str): Unique context identifier provided. [optional] # noqa: E501 + context_title (str): Context title. [optional] # noqa: E501 + context_label (str): Context label. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_mfc.py b/flat_api/model/class_details_mfc.py new file mode 100644 index 0000000..f8c0f17 --- /dev/null +++ b/flat_api/model/class_details_mfc.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsMfc(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsMfc - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on MusicFirst Classroom. [optional] # noqa: E501 + alternate_link (str): Link to MusicFirst Classroom class. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsMfc - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the course on MusicFirst Classroom. [optional] # noqa: E501 + alternate_link (str): Link to MusicFirst Classroom class. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_details_microsoft_graph.py b/flat_api/model/class_details_microsoft_graph.py new file mode 100644 index 0000000..c9d67f0 --- /dev/null +++ b/flat_api/model/class_details_microsoft_graph.py @@ -0,0 +1,264 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ClassDetailsMicrosoftGraph(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassDetailsMicrosoftGraph - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The course identifier on Microsoft Graph. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassDetailsMicrosoftGraph - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The course identifier on Microsoft Graph. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_grade_level.py b/flat_api/model/class_grade_level.py index 6154b11..c72f20b 100644 --- a/flat_api/model/class_grade_level.py +++ b/flat_api/model/class_grade_level.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,58 +8,287 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ClassGradeLevel( - schemas.EnumBase, - schemas.StrSchema -): +class ClassGradeLevel(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Class grade level + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ELEMENTARY': "elementary", + 'MIDDLE': "middle", + 'HIGH': "high", + 'UNIVERSITY': "university", + 'OTHER': "other", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "elementary": "ELEMENTARY", - "middle": "MIDDLE", - "high": "HIGH", - "university": "UNIVERSITY", - "other": "OTHER", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ELEMENTARY(cls): - return cls("elementary") - - @schemas.classproperty - def MIDDLE(cls): - return cls("middle") - - @schemas.classproperty - def HIGH(cls): - return cls("high") - - @schemas.classproperty - def UNIVERSITY(cls): - return cls("university") - - @schemas.classproperty - def OTHER(cls): - return cls("other") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ClassGradeLevel - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 + + Keyword Args: + value (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ClassGradeLevel - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 + + Keyword Args: + value (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/class_grade_level.pyi b/flat_api/model/class_grade_level.pyi deleted file mode 100644 index 5875daa..0000000 --- a/flat_api/model/class_grade_level.pyi +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassGradeLevel( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Class grade level - """ - - @schemas.classproperty - def ELEMENTARY(cls): - return cls("elementary") - - @schemas.classproperty - def MIDDLE(cls): - return cls("middle") - - @schemas.classproperty - def HIGH(cls): - return cls("high") - - @schemas.classproperty - def UNIVERSITY(cls): - return cls("university") - - @schemas.classproperty - def OTHER(cls): - return cls("other") diff --git a/flat_api/model/class_roles.py b/flat_api/model/class_roles.py index f7b6feb..4055479 100644 --- a/flat_api/model/class_roles.py +++ b/flat_api/model/class_roles.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,43 +8,284 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ClassRoles( - schemas.EnumBase, - schemas.StrSchema -): +class ClassRoles(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - User's Class Role (for Edu users only) + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'TEACHER': "teacher", + 'STUDENT': "student", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "teacher": "TEACHER", - "student": "STUDENT", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def STUDENT(cls): - return cls("student") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ClassRoles - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 + + Keyword Args: + value (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ClassRoles - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 + + Keyword Args: + value (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/class_roles.pyi b/flat_api/model/class_roles.pyi deleted file mode 100644 index 019d6c9..0000000 --- a/flat_api/model/class_roles.pyi +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassRoles( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - User's Class Role (for Edu users only) - """ - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def STUDENT(cls): - return cls("student") diff --git a/flat_api/model/class_state.py b/flat_api/model/class_state.py index 783fe59..783f2f2 100644 --- a/flat_api/model/class_state.py +++ b/flat_api/model/class_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,48 +8,285 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ClassState( - schemas.EnumBase, - schemas.StrSchema -): +class ClassState(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The state of a classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ACTIVE': "active", + 'INACTIVE': "inactive", + 'ARCHIVED': "archived", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "active": "ACTIVE", - "inactive": "INACTIVE", - "archived": "ARCHIVED", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def INACTIVE(cls): - return cls("inactive") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ClassState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 + + Keyword Args: + value (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ClassState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 + + Keyword Args: + value (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/class_state.pyi b/flat_api/model/class_state.pyi deleted file mode 100644 index b740fb0..0000000 --- a/flat_api/model/class_state.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassState( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The state of a classroom - """ - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def INACTIVE(cls): - return cls("inactive") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") diff --git a/flat_api/model/class_update.py b/flat_api/model/class_update.py index d971f77..64cbbf8 100644 --- a/flat_api/model/class_update.py +++ b/flat_api/model/class_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,160 +8,290 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_grade_level import ClassGradeLevel + from flat_api.model.edu_skills_focused import EduSkillsFocused + globals()['ClassGradeLevel'] = ClassGradeLevel + globals()['EduSkillsFocused'] = EduSkillsFocused -class ClassUpdate( - schemas.DictSchema -): + +class ClassUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Update of a classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 255, + }, + ('section',): { + 'max_length': 255, + }, + ('size',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'section': (str,), # noqa: E501 + 'level': (ClassGradeLevel,), # noqa: E501 + 'skills_focused': (EduSkillsFocused,), # noqa: E501 + 'size': (float, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'section': 'section', # noqa: E501 + 'level': 'level', # noqa: E501 + 'skills_focused': 'skillsFocused', # noqa: E501 + 'size': 'size', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClassUpdate - a model defined in OpenAPI - class MetaOapg: - - class properties: - - - class name( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 255 - - - class section( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 255 - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - inclusive_minimum = 0 - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The name of the class. [optional] # noqa: E501 + section (str): The section of the class. [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "name": name, - "section": section, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassUpdate': - return super().__new__( - cls, - *_args, - name=name, - section=section, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ClassUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The name of the class. [optional] # noqa: E501 + section (str): The section of the class. [optional] # noqa: E501 + level (ClassGradeLevel): [optional] # noqa: E501 + skills_focused (EduSkillsFocused): [optional] # noqa: E501 + size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/class_update.pyi b/flat_api/model/class_update.pyi deleted file mode 100644 index e7989f4..0000000 --- a/flat_api/model/class_update.pyi +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ClassUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Update of a classroom - """ - - - class MetaOapg: - - class properties: - - - class name( - schemas.StrSchema - ): - pass - - - class section( - schemas.StrSchema - ): - pass - - @staticmethod - def level() -> typing.Type['ClassGradeLevel']: - return ClassGradeLevel - - @staticmethod - def skillsFocused() -> typing.Type['EduSkillsFocused']: - return EduSkillsFocused - - - class size( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'size': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "name": name, - "section": section, - "level": level, - "skillsFocused": skillsFocused, - "size": size, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["section"]) -> MetaOapg.properties.section: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["level"]) -> 'ClassGradeLevel': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["skillsFocused"]) -> 'EduSkillsFocused': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["section"]) -> typing.Union[MetaOapg.properties.section, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["level"]) -> typing.Union['ClassGradeLevel', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["skillsFocused"]) -> typing.Union['EduSkillsFocused', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "section", "level", "skillsFocused", "size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - section: typing.Union[MetaOapg.properties.section, str, schemas.Unset] = schemas.unset, - level: typing.Union['ClassGradeLevel', schemas.Unset] = schemas.unset, - skillsFocused: typing.Union['EduSkillsFocused', schemas.Unset] = schemas.unset, - size: typing.Union[MetaOapg.properties.size, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassUpdate': - return super().__new__( - cls, - *_args, - name=name, - section=section, - level=level, - skillsFocused=skillsFocused, - size=size, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused diff --git a/flat_api/model/collection.py b/flat_api/model/collection.py index 094f139..cda524e 100644 --- a/flat_api/model/collection.py +++ b/flat_api/model/collection.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,350 +8,323 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.collection_app import CollectionApp + from flat_api.model.collection_capabilities import CollectionCapabilities + from flat_api.model.collection_privacy import CollectionPrivacy + from flat_api.model.collection_type import CollectionType + from flat_api.model.resource_collaborator import ResourceCollaborator + from flat_api.model.resource_rights import ResourceRights + from flat_api.model.user_public_summary import UserPublicSummary + globals()['CollectionApp'] = CollectionApp + globals()['CollectionCapabilities'] = CollectionCapabilities + globals()['CollectionPrivacy'] = CollectionPrivacy + globals()['CollectionType'] = CollectionType + globals()['ResourceCollaborator'] = ResourceCollaborator + globals()['ResourceRights'] = ResourceRights + globals()['UserPublicSummary'] = UserPublicSummary -class Collection( - schemas.DictSchema -): + +class Collection(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Collection of scores + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - title = schemas.StrSchema - htmlUrl = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['CollectionType']: - return CollectionType - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - sharingKey = schemas.StrSchema - - @staticmethod - def app() -> typing.Type['CollectionApp']: - return CollectionApp - creationDate = schemas.DateTimeSchema - - @staticmethod - def user() -> typing.Type['UserPublicSummary']: - return UserPublicSummary - - @staticmethod - def rights() -> typing.Type['ResourceRights']: - return ResourceRights - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - canEdit = schemas.BoolSchema - canShare = schemas.BoolSchema - canDelete = schemas.BoolSchema - canAddScores = schemas.BoolSchema - canDeleteScores = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canShare": canShare, - "canDelete": canDelete, - "canAddScores": canAddScores, - "canDeleteScores": canDeleteScores, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canShare"]) -> MetaOapg.properties.canShare: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canDelete"]) -> MetaOapg.properties.canDelete: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddScores"]) -> MetaOapg.properties.canAddScores: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canDeleteScores"]) -> MetaOapg.properties.canDeleteScores: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canShare"]) -> typing.Union[MetaOapg.properties.canShare, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canDelete"]) -> typing.Union[MetaOapg.properties.canDelete, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddScores"]) -> typing.Union[MetaOapg.properties.canAddScores, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canDeleteScores"]) -> typing.Union[MetaOapg.properties.canDeleteScores, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, - canShare: typing.Union[MetaOapg.properties.canShare, bool, schemas.Unset] = schemas.unset, - canDelete: typing.Union[MetaOapg.properties.canDelete, bool, schemas.Unset] = schemas.unset, - canAddScores: typing.Union[MetaOapg.properties.canAddScores, bool, schemas.Unset] = schemas.unset, - canDeleteScores: typing.Union[MetaOapg.properties.canDeleteScores, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canEdit=canEdit, - canShare=canShare, - canDelete=canDelete, - canAddScores=canAddScores, - canDeleteScores=canDeleteScores, - _configuration=_configuration, - **kwargs, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + 'type': (CollectionType,), # noqa: E501 + 'privacy': (CollectionPrivacy,), # noqa: E501 + 'sharing_key': (str,), # noqa: E501 + 'app': (CollectionApp,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'user': (UserPublicSummary,), # noqa: E501 + 'rights': (ResourceRights,), # noqa: E501 + 'collaborators': ([ResourceCollaborator],), # noqa: E501 + 'capabilities': (CollectionCapabilities,), # noqa: E501 + 'collections': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + 'type': 'type', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + 'sharing_key': 'sharingKey', # noqa: E501 + 'app': 'app', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'user': 'user', # noqa: E501 + 'rights': 'rights', # noqa: E501 + 'collaborators': 'collaborators', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'collections': 'collections', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Collection - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the collection. [optional] # noqa: E501 + title (str): The title of the collection. [optional] # noqa: E501 + html_url (str): The url where the collection can be viewed in a web browser. [optional] # noqa: E501 + type (CollectionType): [optional] # noqa: E501 + privacy (CollectionPrivacy): [optional] # noqa: E501 + sharing_key (str): The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 + app (CollectionApp): [optional] # noqa: E501 + creation_date (datetime): The date when the collection was created. [optional] # noqa: E501 + user (UserPublicSummary): [optional] # noqa: E501 + rights (ResourceRights): [optional] # noqa: E501 + collaborators ([ResourceCollaborator]): The list of the collaborators of the collection. [optional] # noqa: E501 + capabilities (CollectionCapabilities): [optional] # noqa: E501 + collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class collections( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collections': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Collection - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the collection. [optional] # noqa: E501 + title (str): The title of the collection. [optional] # noqa: E501 + html_url (str): The url where the collection can be viewed in a web browser. [optional] # noqa: E501 + type (CollectionType): [optional] # noqa: E501 + privacy (CollectionPrivacy): [optional] # noqa: E501 + sharing_key (str): The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 + app (CollectionApp): [optional] # noqa: E501 + creation_date (datetime): The date when the collection was created. [optional] # noqa: E501 + user (UserPublicSummary): [optional] # noqa: E501 + rights (ResourceRights): [optional] # noqa: E501 + collaborators ([ResourceCollaborator]): The list of the collaborators of the collection. [optional] # noqa: E501 + capabilities (CollectionCapabilities): [optional] # noqa: E501 + collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "title": title, - "htmlUrl": htmlUrl, - "type": type, - "privacy": privacy, - "sharingKey": sharingKey, - "app": app, - "creationDate": creationDate, - "user": user, - "rights": rights, - "collaborators": collaborators, - "capabilities": capabilities, - "collections": collections, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'CollectionType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'CollectionApp': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['CollectionType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['CollectionApp', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - type: typing.Union['CollectionType', schemas.Unset] = schemas.unset, - privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - app: typing.Union['CollectionApp', schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, - rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Collection': - return super().__new__( - cls, - *_args, - id=id, - title=title, - htmlUrl=htmlUrl, - type=type, - privacy=privacy, - sharingKey=sharingKey, - app=app, - creationDate=creationDate, - user=user, - rights=rights, - collaborators=collaborators, - capabilities=capabilities, - collections=collections, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_app import CollectionApp -from flat_api.model.collection_privacy import CollectionPrivacy -from flat_api.model.collection_type import CollectionType -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.user_public_summary import UserPublicSummary + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/collection.pyi b/flat_api/model/collection.pyi deleted file mode 100644 index 094f139..0000000 --- a/flat_api/model/collection.pyi +++ /dev/null @@ -1,359 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class Collection( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Collection of scores - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - title = schemas.StrSchema - htmlUrl = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['CollectionType']: - return CollectionType - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - sharingKey = schemas.StrSchema - - @staticmethod - def app() -> typing.Type['CollectionApp']: - return CollectionApp - creationDate = schemas.DateTimeSchema - - @staticmethod - def user() -> typing.Type['UserPublicSummary']: - return UserPublicSummary - - @staticmethod - def rights() -> typing.Type['ResourceRights']: - return ResourceRights - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - canEdit = schemas.BoolSchema - canShare = schemas.BoolSchema - canDelete = schemas.BoolSchema - canAddScores = schemas.BoolSchema - canDeleteScores = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canShare": canShare, - "canDelete": canDelete, - "canAddScores": canAddScores, - "canDeleteScores": canDeleteScores, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canShare"]) -> MetaOapg.properties.canShare: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canDelete"]) -> MetaOapg.properties.canDelete: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddScores"]) -> MetaOapg.properties.canAddScores: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canDeleteScores"]) -> MetaOapg.properties.canDeleteScores: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canShare"]) -> typing.Union[MetaOapg.properties.canShare, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canDelete"]) -> typing.Union[MetaOapg.properties.canDelete, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddScores"]) -> typing.Union[MetaOapg.properties.canAddScores, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canDeleteScores"]) -> typing.Union[MetaOapg.properties.canDeleteScores, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, - canShare: typing.Union[MetaOapg.properties.canShare, bool, schemas.Unset] = schemas.unset, - canDelete: typing.Union[MetaOapg.properties.canDelete, bool, schemas.Unset] = schemas.unset, - canAddScores: typing.Union[MetaOapg.properties.canAddScores, bool, schemas.Unset] = schemas.unset, - canDeleteScores: typing.Union[MetaOapg.properties.canDeleteScores, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canEdit=canEdit, - canShare=canShare, - canDelete=canDelete, - canAddScores=canAddScores, - canDeleteScores=canDeleteScores, - _configuration=_configuration, - **kwargs, - ) - - - class collections( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collections': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "title": title, - "htmlUrl": htmlUrl, - "type": type, - "privacy": privacy, - "sharingKey": sharingKey, - "app": app, - "creationDate": creationDate, - "user": user, - "rights": rights, - "collaborators": collaborators, - "capabilities": capabilities, - "collections": collections, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'CollectionType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'CollectionApp': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['CollectionType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['CollectionApp', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "rights", "collaborators", "capabilities", "collections", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - type: typing.Union['CollectionType', schemas.Unset] = schemas.unset, - privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - app: typing.Union['CollectionApp', schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, - rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Collection': - return super().__new__( - cls, - *_args, - id=id, - title=title, - htmlUrl=htmlUrl, - type=type, - privacy=privacy, - sharingKey=sharingKey, - app=app, - creationDate=creationDate, - user=user, - rights=rights, - collaborators=collaborators, - capabilities=capabilities, - collections=collections, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_app import CollectionApp -from flat_api.model.collection_privacy import CollectionPrivacy -from flat_api.model.collection_type import CollectionType -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/collection_app.py b/flat_api/model/collection_app.py index 36fd150..37f7e2a 100644 --- a/flat_api/model/collection_app.py +++ b/flat_api/model/collection_app.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,92 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class CollectionApp( - schemas.DictSchema -): +class CollectionApp(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - For App collections, the details of the app that created the collection + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'logo': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'logo': 'logo', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CollectionApp - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The app unique identifier. [optional] # noqa: E501 + name (str): The name of the app. [optional] # noqa: E501 + logo (str): The app logo url. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CollectionApp - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The app unique identifier. [optional] # noqa: E501 + name (str): The name of the app. [optional] # noqa: E501 + logo (str): The app logo url. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - logo = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - "logo": logo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["logo"]) -> MetaOapg.properties.logo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["logo"]) -> typing.Union[MetaOapg.properties.logo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - logo: typing.Union[MetaOapg.properties.logo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionApp': - return super().__new__( - cls, - *_args, - id=id, - name=name, - logo=logo, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/collection_app.pyi b/flat_api/model/collection_app.pyi deleted file mode 100644 index 36fd150..0000000 --- a/flat_api/model/collection_app.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class CollectionApp( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - For App collections, the details of the app that created the collection - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - logo = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - "logo": logo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["logo"]) -> MetaOapg.properties.logo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["logo"]) -> typing.Union[MetaOapg.properties.logo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "logo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - logo: typing.Union[MetaOapg.properties.logo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionApp': - return super().__new__( - cls, - *_args, - id=id, - name=name, - logo=logo, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/collection_capabilities.py b/flat_api/model/collection_capabilities.py new file mode 100644 index 0000000..9c3f93b --- /dev/null +++ b/flat_api/model/collection_capabilities.py @@ -0,0 +1,280 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class CollectionCapabilities(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'can_edit': (bool,), # noqa: E501 + 'can_share': (bool,), # noqa: E501 + 'can_delete': (bool,), # noqa: E501 + 'can_add_scores': (bool,), # noqa: E501 + 'can_delete_scores': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'can_edit': 'canEdit', # noqa: E501 + 'can_share': 'canShare', # noqa: E501 + 'can_delete': 'canDelete', # noqa: E501 + 'can_add_scores': 'canAddScores', # noqa: E501 + 'can_delete_scores': 'canDeleteScores', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CollectionCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_edit (bool): Whether the current user can modify the metadata for the collection . [optional] # noqa: E501 + can_share (bool): Whether the current user can modify the sharing settings for the collection . [optional] # noqa: E501 + can_delete (bool): Whether the current user can delete the collection . [optional] # noqa: E501 + can_add_scores (bool): Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. . [optional] # noqa: E501 + can_delete_scores (bool): Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CollectionCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_edit (bool): Whether the current user can modify the metadata for the collection . [optional] # noqa: E501 + can_share (bool): Whether the current user can modify the sharing settings for the collection . [optional] # noqa: E501 + can_delete (bool): Whether the current user can delete the collection . [optional] # noqa: E501 + can_add_scores (bool): Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. . [optional] # noqa: E501 + can_delete_scores (bool): Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/collection_creation.py b/flat_api/model/collection_creation.py index 60bff78..e3038a0 100644 --- a/flat_api/model/collection_creation.py +++ b/flat_api/model/collection_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,101 +8,279 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.collection_privacy import CollectionPrivacy + globals()['CollectionPrivacy'] = CollectionPrivacy -class CollectionCreation( - schemas.DictSchema -): + +class CollectionCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('title',): { + 'max_length': 300, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "privacy", - "title", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'privacy': (CollectionPrivacy,), # noqa: E501 } - - class properties: - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 300 - min_length = 1 - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - __annotations__ = { - "title": title, - "privacy": privacy, - } - - privacy: 'CollectionPrivacy' - title: MetaOapg.properties.title - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - privacy: 'CollectionPrivacy', - title: typing.Union[MetaOapg.properties.title, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionCreation': - return super().__new__( - cls, - *_args, - privacy=privacy, - title=title, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_privacy import CollectionPrivacy + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title, privacy, *args, **kwargs): # noqa: E501 + """CollectionCreation - a model defined in OpenAPI + + Args: + title (str): The title of the collection + privacy (CollectionPrivacy): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.privacy = privacy + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title, privacy, *args, **kwargs): # noqa: E501 + """CollectionCreation - a model defined in OpenAPI + + Args: + title (str): The title of the collection + privacy (CollectionPrivacy): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title = title + self.privacy = privacy + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/collection_creation.pyi b/flat_api/model/collection_creation.pyi deleted file mode 100644 index d03dc54..0000000 --- a/flat_api/model/collection_creation.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class CollectionCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "privacy", - "title", - } - - class properties: - - - class title( - schemas.StrSchema - ): - pass - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - __annotations__ = { - "title": title, - "privacy": privacy, - } - - privacy: 'CollectionPrivacy' - title: MetaOapg.properties.title - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - privacy: 'CollectionPrivacy', - title: typing.Union[MetaOapg.properties.title, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionCreation': - return super().__new__( - cls, - *_args, - privacy=privacy, - title=title, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_modification.py b/flat_api/model/collection_modification.py index 4440213..325474d 100644 --- a/flat_api/model/collection_modification.py +++ b/flat_api/model/collection_modification.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,96 +8,271 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.collection_privacy import CollectionPrivacy + globals()['CollectionPrivacy'] = CollectionPrivacy -class CollectionModification( - schemas.DictSchema -): + +class CollectionModification(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Edit the collection metadata + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('title',): { + 'max_length': 300, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'privacy': (CollectionPrivacy,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CollectionModification - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the collection. [optional] # noqa: E501 + privacy (CollectionPrivacy): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CollectionModification - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the collection. [optional] # noqa: E501 + privacy (CollectionPrivacy): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 300 - min_length = 1 - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - __annotations__ = { - "title": title, - "privacy": privacy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionModification': - return super().__new__( - cls, - *_args, - title=title, - privacy=privacy, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_privacy import CollectionPrivacy + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/collection_modification.pyi b/flat_api/model/collection_modification.pyi deleted file mode 100644 index 7984412..0000000 --- a/flat_api/model/collection_modification.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class CollectionModification( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Edit the collection metadata - """ - - - class MetaOapg: - - class properties: - - - class title( - schemas.StrSchema - ): - pass - - @staticmethod - def privacy() -> typing.Type['CollectionPrivacy']: - return CollectionPrivacy - __annotations__ = { - "title": title, - "privacy": privacy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'CollectionPrivacy': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['CollectionPrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['CollectionPrivacy', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CollectionModification': - return super().__new__( - cls, - *_args, - title=title, - privacy=privacy, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.collection_privacy import CollectionPrivacy diff --git a/flat_api/model/collection_privacy.py b/flat_api/model/collection_privacy.py index 421d9a4..c1fb797 100644 --- a/flat_api/model/collection_privacy.py +++ b/flat_api/model/collection_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,40 +8,275 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class CollectionPrivacy( - schemas.EnumBase, - schemas.StrSchema -): +class CollectionPrivacy(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The collection main privacy mode. -- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'PRIVATE': "private", + }, + } + + validations = { + } - class MetaOapg: - enum_value_to_name = { - "private": "PRIVATE", + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """CollectionPrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 + + Keyword Args: + value (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CollectionPrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 + + Keyword Args: + value (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/collection_privacy.pyi b/flat_api/model/collection_privacy.pyi deleted file mode 100644 index 8878061..0000000 --- a/flat_api/model/collection_privacy.pyi +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class CollectionPrivacy( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The collection main privacy mode. -- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. - - """ - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") diff --git a/flat_api/model/collection_type.py b/flat_api/model/collection_type.py index 55ef4ca..596540a 100644 --- a/flat_api/model/collection_type.py +++ b/flat_api/model/collection_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,65 +8,288 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class CollectionType( - schemas.EnumBase, - schemas.StrSchema -): +class CollectionType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Type of the collection. -The type will influence the capabilitied available on the collections and how this collection is/can be populated. - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ROOT': "root", + 'REGULAR': "regular", + 'SHAREDWITHME': "sharedWithMe", + 'SHAREDWITHGROUP': "sharedWithGroup", + 'APP': "app", + 'TRASH': "trash", + }, + } + + validations = { + } - class MetaOapg: - enum_value_to_name = { - "root": "ROOT", - "regular": "REGULAR", - "sharedWithMe": "SHARED_WITH_ME", - "sharedWithGroup": "SHARED_WITH_GROUP", - "app": "APP", - "trash": "TRASH", + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ROOT(cls): - return cls("root") - - @schemas.classproperty - def REGULAR(cls): - return cls("regular") - - @schemas.classproperty - def SHARED_WITH_ME(cls): - return cls("sharedWithMe") - - @schemas.classproperty - def SHARED_WITH_GROUP(cls): - return cls("sharedWithGroup") - - @schemas.classproperty - def APP(cls): - return cls("app") - - @schemas.classproperty - def TRASH(cls): - return cls("trash") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """CollectionType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 + + Keyword Args: + value (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """CollectionType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 + + Keyword Args: + value (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/collection_type.pyi b/flat_api/model/collection_type.pyi deleted file mode 100644 index 74c85d0..0000000 --- a/flat_api/model/collection_type.pyi +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class CollectionType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Type of the collection. -The type will influence the capabilitied available on the collections and how this collection is/can be populated. - - """ - - @schemas.classproperty - def ROOT(cls): - return cls("root") - - @schemas.classproperty - def REGULAR(cls): - return cls("regular") - - @schemas.classproperty - def SHARED_WITH_ME(cls): - return cls("sharedWithMe") - - @schemas.classproperty - def SHARED_WITH_GROUP(cls): - return cls("sharedWithGroup") - - @schemas.classproperty - def APP(cls): - return cls("app") - - @schemas.classproperty - def TRASH(cls): - return cls("trash") diff --git a/flat_api/model/edu_library.py b/flat_api/model/edu_library.py index fcc48b2..c6558ce 100644 --- a/flat_api/model/edu_library.py +++ b/flat_api/model/edu_library.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,147 +8,278 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduLibrary( - schemas.DictSchema -): +class EduLibrary(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A Flat for Education Library + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'MYRESOURCES': "myResources", + 'FLATEDUSAMPLES': "flatEduSamples", + }, + ('visibility',): { + 'PRIVATE': "private", + 'ORGANIZATION': "organization", + 'PUBLIC': "public", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'visibility': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'visibility': 'visibility', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EduLibrary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` . [optional] # noqa: E501 + name (str): Name of the lirbary. [optional] # noqa: E501 + type (str): Type of the library. [optional] # noqa: E501 + visibility (str): Visibility of the library. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """EduLibrary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` . [optional] # noqa: E501 + name (str): Name of the lirbary. [optional] # noqa: E501 + type (str): Type of the library. [optional] # noqa: E501 + visibility (str): Visibility of the library. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "myResources": "MY_RESOURCES", - "flatEduSamples": "FLAT_EDU_SAMPLES", - } - - @schemas.classproperty - def MY_RESOURCES(cls): - return cls("myResources") - - @schemas.classproperty - def FLAT_EDU_SAMPLES(cls): - return cls("flatEduSamples") - - - class visibility( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "private": "PRIVATE", - "organization": "ORGANIZATION", - "public": "PUBLIC", - } - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def ORGANIZATION(cls): - return cls("organization") - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") - __annotations__ = { - "id": id, - "name": name, - "type": type, - "visibility": visibility, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["visibility"]) -> MetaOapg.properties.visibility: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["visibility"]) -> typing.Union[MetaOapg.properties.visibility, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - visibility: typing.Union[MetaOapg.properties.visibility, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduLibrary': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - visibility=visibility, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_library.pyi b/flat_api/model/edu_library.pyi deleted file mode 100644 index 913871a..0000000 --- a/flat_api/model/edu_library.pyi +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduLibrary( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A Flat for Education Library - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def MY_RESOURCES(cls): - return cls("myResources") - - @schemas.classproperty - def FLAT_EDU_SAMPLES(cls): - return cls("flatEduSamples") - - - class visibility( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def ORGANIZATION(cls): - return cls("organization") - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") - __annotations__ = { - "id": id, - "name": name, - "type": type, - "visibility": visibility, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["visibility"]) -> MetaOapg.properties.visibility: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["visibility"]) -> typing.Union[MetaOapg.properties.visibility, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "visibility", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - visibility: typing.Union[MetaOapg.properties.visibility, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduLibrary': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - visibility=visibility, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/edu_resource.py b/flat_api/model/edu_resource.py index e043302..5c4e194 100644 --- a/flat_api/model/edu_resource.py +++ b/flat_api/model/edu_resource.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,678 +8,321 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.edu_resource_capabilities import EduResourceCapabilities + from flat_api.model.edu_resource_privacy import EduResourcePrivacy + from flat_api.model.edu_resource_resource import EduResourceResource + from flat_api.model.edu_resource_type import EduResourceType + globals()['EduResourceCapabilities'] = EduResourceCapabilities + globals()['EduResourcePrivacy'] = EduResourcePrivacy + globals()['EduResourceResource'] = EduResourceResource + globals()['EduResourceType'] = EduResourceType -class EduResource( - schemas.DictSchema -): + +class EduResource(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A Flat for Education resource contained in a resources library + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } - class MetaOapg: - required = { - "capabilities", - "id", - "title", - "type", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (EduResourceType,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'capabilities': (EduResourceCapabilities,), # noqa: E501 + 'creator': (str,), # noqa: E501 + 'privacy': (EduResourcePrivacy,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'parent': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'update_date': (datetime,), # noqa: E501 + 'resource': (EduResourceResource,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['EduResourceType']: - return EduResourceType - title = schemas.StrSchema - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - canEdit = schemas.BoolSchema - canAddResources = schemas.BoolSchema - canAddFolders = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canAddResources": canAddResources, - "canAddFolders": canAddFolders, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddResources"]) -> MetaOapg.properties.canAddResources: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddFolders"]) -> MetaOapg.properties.canAddFolders: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddResources"]) -> typing.Union[MetaOapg.properties.canAddResources, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddFolders"]) -> typing.Union[MetaOapg.properties.canAddFolders, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, - canAddResources: typing.Union[MetaOapg.properties.canAddResources, bool, schemas.Unset] = schemas.unset, - canAddFolders: typing.Union[MetaOapg.properties.canAddFolders, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canEdit=canEdit, - canAddResources=canAddResources, - canAddFolders=canAddFolders, - _configuration=_configuration, - **kwargs, - ) - creator = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['EduResourcePrivacy']: - return EduResourcePrivacy - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'title': 'title', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'creator': 'creator', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'parent': 'parent', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'update_date': 'updateDate', # noqa: E501 + 'resource': 'resource', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, title, capabilities, *args, **kwargs): # noqa: E501 + """EduResource - a model defined in OpenAPI + + Args: + id (str): Resource unique identifier + type (EduResourceType): + title (str): Title of the resource + capabilities (EduResourceCapabilities): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creator (str): The User identifier of the resource creator. [optional] # noqa: E501 + privacy (EduResourcePrivacy): [optional] # noqa: E501 + tags ([str]): Specific attributes for the resource (e.g. sample resources with custom design). [optional] # noqa: E501 + parent (str): Identifier of the parent resource, e.g. a folder or root. [optional] # noqa: E501 + creation_date (datetime): The date when the resource was created. [optional] # noqa: E501 + update_date (datetime): The date when the resource was updated. [optional] # noqa: E501 + resource (EduResourceResource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - parent = schemas.StrSchema - creationDate = schemas.DateTimeSchema - updateDate = schemas.DateTimeSchema - - - class resource( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "auto": "AUTO", - "manual": "MANUAL", - } - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'resource': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - _configuration=_configuration, - **kwargs, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.title = title + self.capabilities = capabilities + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, title, capabilities, *args, **kwargs): # noqa: E501 + """EduResource - a model defined in OpenAPI + + Args: + id (str): Resource unique identifier + type (EduResourceType): + title (str): Title of the resource + capabilities (EduResourceCapabilities): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creator (str): The User identifier of the resource creator. [optional] # noqa: E501 + privacy (EduResourcePrivacy): [optional] # noqa: E501 + tags ([str]): Specific attributes for the resource (e.g. sample resources with custom design). [optional] # noqa: E501 + parent (str): Identifier of the parent resource, e.g. a folder or root. [optional] # noqa: E501 + creation_date (datetime): The date when the resource was created. [optional] # noqa: E501 + update_date (datetime): The date when the resource was updated. [optional] # noqa: E501 + resource (EduResourceResource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "id": id, - "type": type, - "title": title, - "capabilities": capabilities, - "creator": creator, - "privacy": privacy, - "tags": tags, - "parent": parent, - "creationDate": creationDate, - "updateDate": updateDate, - "resource": resource, - } - - capabilities: MetaOapg.properties.capabilities - id: MetaOapg.properties.id - title: MetaOapg.properties.title - type: 'EduResourceType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'EduResourcePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['EduResourcePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'EduResourceType', - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['EduResourcePrivacy', schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - updateDate: typing.Union[MetaOapg.properties.updateDate, str, datetime, schemas.Unset] = schemas.unset, - resource: typing.Union[MetaOapg.properties.resource, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResource': - return super().__new__( - cls, - *_args, - capabilities=capabilities, - id=id, - title=title, - type=type, - creator=creator, - privacy=privacy, - tags=tags, - parent=parent, - creationDate=creationDate, - updateDate=updateDate, - resource=resource, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.edu_resource_privacy import EduResourcePrivacy -from flat_api.model.edu_resource_type import EduResourceType -from flat_api.model.media_attachment import MediaAttachment + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.title = title + self.capabilities = capabilities + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource.pyi b/flat_api/model/edu_resource.pyi deleted file mode 100644 index b93fd9e..0000000 --- a/flat_api/model/edu_resource.pyi +++ /dev/null @@ -1,680 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResource( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A Flat for Education resource contained in a resources library - """ - - - class MetaOapg: - required = { - "capabilities", - "id", - "title", - "type", - } - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['EduResourceType']: - return EduResourceType - title = schemas.StrSchema - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - canEdit = schemas.BoolSchema - canAddResources = schemas.BoolSchema - canAddFolders = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canAddResources": canAddResources, - "canAddFolders": canAddFolders, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddResources"]) -> MetaOapg.properties.canAddResources: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canAddFolders"]) -> MetaOapg.properties.canAddFolders: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> typing.Union[MetaOapg.properties.canEdit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddResources"]) -> typing.Union[MetaOapg.properties.canAddResources, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canAddFolders"]) -> typing.Union[MetaOapg.properties.canAddFolders, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canAddResources", "canAddFolders", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, schemas.Unset] = schemas.unset, - canAddResources: typing.Union[MetaOapg.properties.canAddResources, bool, schemas.Unset] = schemas.unset, - canAddFolders: typing.Union[MetaOapg.properties.canAddFolders, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canEdit=canEdit, - canAddResources=canAddResources, - canAddFolders=canAddFolders, - _configuration=_configuration, - **kwargs, - ) - creator = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['EduResourcePrivacy']: - return EduResourcePrivacy - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - parent = schemas.StrSchema - creationDate = schemas.DateTimeSchema - updateDate = schemas.DateTimeSchema - - - class resource( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['AssignmentType']: - return AssignmentType - - - class capabilities( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "canArchive", - "canPublishInClass", - "canUnarchive", - "canEdit", - } - - class properties: - canEdit = schemas.BoolSchema - canPublishInClass = schemas.BoolSchema - - - class canPublishInClassError( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'canPublishInClassError': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) - canArchive = schemas.BoolSchema - canUnarchive = schemas.BoolSchema - __annotations__ = { - "canEdit": canEdit, - "canPublishInClass": canPublishInClass, - "canPublishInClassError": canPublishInClassError, - "canArchive": canArchive, - "canUnarchive": canUnarchive, - } - - canArchive: MetaOapg.properties.canArchive - canPublishInClass: MetaOapg.properties.canPublishInClass - canUnarchive: MetaOapg.properties.canUnarchive - canEdit: MetaOapg.properties.canEdit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canPublishInClassError"]) -> MetaOapg.properties.canPublishInClassError: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canEdit"]) -> MetaOapg.properties.canEdit: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClass"]) -> MetaOapg.properties.canPublishInClass: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canPublishInClassError"]) -> typing.Union[MetaOapg.properties.canPublishInClassError, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canArchive"]) -> MetaOapg.properties.canArchive: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["canUnarchive"]) -> MetaOapg.properties.canUnarchive: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - canArchive: typing.Union[MetaOapg.properties.canArchive, bool, ], - canPublishInClass: typing.Union[MetaOapg.properties.canPublishInClass, bool, ], - canUnarchive: typing.Union[MetaOapg.properties.canUnarchive, bool, ], - canEdit: typing.Union[MetaOapg.properties.canEdit, bool, ], - canPublishInClassError: typing.Union[MetaOapg.properties.canPublishInClassError, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'capabilities': - return super().__new__( - cls, - *_args, - canArchive=canArchive, - canPublishInClass=canPublishInClass, - canUnarchive=canUnarchive, - canEdit=canEdit, - canPublishInClassError=canPublishInClassError, - _configuration=_configuration, - **kwargs, - ) - title = schemas.StrSchema - description = schemas.StrSchema - cover = schemas.StrSchema - coverFile = schemas.StrSchema - - - class attachments( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['MediaAttachment']: - return MediaAttachment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['MediaAttachment'], typing.List['MediaAttachment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'attachments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'MediaAttachment': - return super().__getitem__(i) - useDedicatedAttachments = schemas.BoolSchema - maxPoints = schemas.NumberSchema - - - class releaseGrades( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AUTO(cls): - return cls("auto") - - @schemas.classproperty - def MANUAL(cls): - return cls("manual") - shuffleExercises = schemas.BoolSchema - toolset = schemas.StrSchema - nbPlaybackAuthorized = schemas.NumberSchema - __annotations__ = { - "id": id, - "type": type, - "capabilities": capabilities, - "title": title, - "description": description, - "cover": cover, - "coverFile": coverFile, - "attachments": attachments, - "useDedicatedAttachments": useDedicatedAttachments, - "maxPoints": maxPoints, - "releaseGrades": releaseGrades, - "shuffleExercises": shuffleExercises, - "toolset": toolset, - "nbPlaybackAuthorized": nbPlaybackAuthorized, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'AssignmentType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cover"]) -> MetaOapg.properties.cover: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverFile"]) -> MetaOapg.properties.coverFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["attachments"]) -> MetaOapg.properties.attachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> MetaOapg.properties.useDedicatedAttachments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["maxPoints"]) -> MetaOapg.properties.maxPoints: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseGrades"]) -> MetaOapg.properties.releaseGrades: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shuffleExercises"]) -> MetaOapg.properties.shuffleExercises: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["toolset"]) -> MetaOapg.properties.toolset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> MetaOapg.properties.nbPlaybackAuthorized: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['AssignmentType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> typing.Union[MetaOapg.properties.capabilities, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cover"]) -> typing.Union[MetaOapg.properties.cover, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverFile"]) -> typing.Union[MetaOapg.properties.coverFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["attachments"]) -> typing.Union[MetaOapg.properties.attachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useDedicatedAttachments"]) -> typing.Union[MetaOapg.properties.useDedicatedAttachments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["maxPoints"]) -> typing.Union[MetaOapg.properties.maxPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseGrades"]) -> typing.Union[MetaOapg.properties.releaseGrades, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shuffleExercises"]) -> typing.Union[MetaOapg.properties.shuffleExercises, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["toolset"]) -> typing.Union[MetaOapg.properties.toolset, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbPlaybackAuthorized"]) -> typing.Union[MetaOapg.properties.nbPlaybackAuthorized, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union['AssignmentType', schemas.Unset] = schemas.unset, - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - cover: typing.Union[MetaOapg.properties.cover, str, schemas.Unset] = schemas.unset, - coverFile: typing.Union[MetaOapg.properties.coverFile, str, schemas.Unset] = schemas.unset, - attachments: typing.Union[MetaOapg.properties.attachments, list, tuple, schemas.Unset] = schemas.unset, - useDedicatedAttachments: typing.Union[MetaOapg.properties.useDedicatedAttachments, bool, schemas.Unset] = schemas.unset, - maxPoints: typing.Union[MetaOapg.properties.maxPoints, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - releaseGrades: typing.Union[MetaOapg.properties.releaseGrades, str, schemas.Unset] = schemas.unset, - shuffleExercises: typing.Union[MetaOapg.properties.shuffleExercises, bool, schemas.Unset] = schemas.unset, - toolset: typing.Union[MetaOapg.properties.toolset, str, schemas.Unset] = schemas.unset, - nbPlaybackAuthorized: typing.Union[MetaOapg.properties.nbPlaybackAuthorized, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'resource': - return super().__new__( - cls, - *_args, - id=id, - type=type, - capabilities=capabilities, - title=title, - description=description, - cover=cover, - coverFile=coverFile, - attachments=attachments, - useDedicatedAttachments=useDedicatedAttachments, - maxPoints=maxPoints, - releaseGrades=releaseGrades, - shuffleExercises=shuffleExercises, - toolset=toolset, - nbPlaybackAuthorized=nbPlaybackAuthorized, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "id": id, - "type": type, - "title": title, - "capabilities": capabilities, - "creator": creator, - "privacy": privacy, - "tags": tags, - "parent": parent, - "creationDate": creationDate, - "updateDate": updateDate, - "resource": resource, - } - - capabilities: MetaOapg.properties.capabilities - id: MetaOapg.properties.id - title: MetaOapg.properties.title - type: 'EduResourceType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'EduResourcePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["capabilities"]) -> MetaOapg.properties.capabilities: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['EduResourcePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union[MetaOapg.properties.resource, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "title", "capabilities", "creator", "privacy", "tags", "parent", "creationDate", "updateDate", "resource", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - capabilities: typing.Union[MetaOapg.properties.capabilities, dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'EduResourceType', - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['EduResourcePrivacy', schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - updateDate: typing.Union[MetaOapg.properties.updateDate, str, datetime, schemas.Unset] = schemas.unset, - resource: typing.Union[MetaOapg.properties.resource, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResource': - return super().__new__( - cls, - *_args, - capabilities=capabilities, - id=id, - title=title, - type=type, - creator=creator, - privacy=privacy, - tags=tags, - parent=parent, - creationDate=creationDate, - updateDate=updateDate, - resource=resource, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.edu_resource_privacy import EduResourcePrivacy -from flat_api.model.edu_resource_type import EduResourceType -from flat_api.model.media_attachment import MediaAttachment diff --git a/flat_api/model/edu_resource_capabilities.py b/flat_api/model/edu_resource_capabilities.py new file mode 100644 index 0000000..0de08a1 --- /dev/null +++ b/flat_api/model/edu_resource_capabilities.py @@ -0,0 +1,272 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class EduResourceCapabilities(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'can_edit': (bool,), # noqa: E501 + 'can_add_resources': (bool,), # noqa: E501 + 'can_add_folders': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'can_edit': 'canEdit', # noqa: E501 + 'can_add_resources': 'canAddResources', # noqa: E501 + 'can_add_folders': 'canAddFolders', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EduResourceCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_edit (bool): Whether the current user can modify this resource . [optional] # noqa: E501 + can_add_resources (bool): Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) . [optional] # noqa: E501 + can_add_folders (bool): Whether the current user can add folders within this resource (e.g. `folder` inside `root`) . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """EduResourceCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + can_edit (bool): Whether the current user can modify this resource . [optional] # noqa: E501 + can_add_resources (bool): Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) . [optional] # noqa: E501 + can_add_folders (bool): Whether the current user can add folders within this resource (e.g. `folder` inside `root`) . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_copy.py b/flat_api/model/edu_resource_copy.py index 231d1ca..9166226 100644 --- a/flat_api/model/edu_resource_copy.py +++ b/flat_api/model/edu_resource_copy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,77 +8,263 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourceCopy( - schemas.DictSchema -): +class EduResourceCopy(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Copy an education resource + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "destination", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'destination': (str,), # noqa: E501 } - - class properties: - destination = schemas.StrSchema - __annotations__ = { - "destination": destination, - } - - destination: MetaOapg.properties.destination - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceCopy': - return super().__new__( - cls, - *_args, - destination=destination, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'destination': 'destination', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, destination, *args, **kwargs): # noqa: E501 + """EduResourceCopy - a model defined in OpenAPI + + Args: + destination (str): Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.destination = destination + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, destination, *args, **kwargs): # noqa: E501 + """EduResourceCopy - a model defined in OpenAPI + + Args: + destination (str): Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.destination = destination + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_copy.pyi b/flat_api/model/edu_resource_copy.pyi deleted file mode 100644 index 231d1ca..0000000 --- a/flat_api/model/edu_resource_copy.pyi +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceCopy( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Copy an education resource - """ - - - class MetaOapg: - required = { - "destination", - } - - class properties: - destination = schemas.StrSchema - __annotations__ = { - "destination": destination, - } - - destination: MetaOapg.properties.destination - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceCopy': - return super().__new__( - cls, - *_args, - destination=destination, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/edu_resource_creation.py b/flat_api/model/edu_resource_creation.py index f898cf4..b5ac71c 100644 --- a/flat_api/model/edu_resource_creation.py +++ b/flat_api/model/edu_resource_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,113 +8,283 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.edu_resource_type import EduResourceType + globals()['EduResourceType'] = EduResourceType -class EduResourceCreation( - schemas.DictSchema -): + +class EduResourceCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of an education resource + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('title',): { + 'max_length': 1000, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "title", - "type", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (EduResourceType,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'parent': (str,), # noqa: E501 } - - class properties: - - @staticmethod - def type() -> typing.Type['EduResourceType']: - return EduResourceType - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 1000 - min_length = 1 - parent = schemas.StrSchema - __annotations__ = { - "type": type, - "title": title, - "parent": parent, - } - - title: MetaOapg.properties.title - type: 'EduResourceType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'EduResourceType', - parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceCreation': - return super().__new__( - cls, - *_args, - title=title, - type=type, - parent=parent, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.edu_resource_type import EduResourceType + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'title': 'title', # noqa: E501 + 'parent': 'parent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, title, *args, **kwargs): # noqa: E501 + """EduResourceCreation - a model defined in OpenAPI + + Args: + type (EduResourceType): + title (str): Title of the resource + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] if omitted the server will use the default value of "root" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.title = title + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, title, *args, **kwargs): # noqa: E501 + """EduResourceCreation - a model defined in OpenAPI + + Args: + type (EduResourceType): + title (str): Title of the resource + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] if omitted the server will use the default value of "root" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.title = title + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_creation.pyi b/flat_api/model/edu_resource_creation.pyi deleted file mode 100644 index 56e6fcb..0000000 --- a/flat_api/model/edu_resource_creation.pyi +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of an education resource - """ - - - class MetaOapg: - required = { - "title", - "type", - } - - class properties: - - @staticmethod - def type() -> typing.Type['EduResourceType']: - return EduResourceType - - - class title( - schemas.StrSchema - ): - pass - parent = schemas.StrSchema - __annotations__ = { - "type": type, - "title": title, - "parent": parent, - } - - title: MetaOapg.properties.title - type: 'EduResourceType' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent"]) -> MetaOapg.properties.parent: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> 'EduResourceType': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent"]) -> typing.Union[MetaOapg.properties.parent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "title", "parent", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, ], - type: 'EduResourceType', - parent: typing.Union[MetaOapg.properties.parent, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceCreation': - return super().__new__( - cls, - *_args, - title=title, - type=type, - parent=parent, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.edu_resource_type import EduResourceType diff --git a/flat_api/model/edu_resource_move.py b/flat_api/model/edu_resource_move.py index 669e3e4..769ee72 100644 --- a/flat_api/model/edu_resource_move.py +++ b/flat_api/model/edu_resource_move.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,77 +8,263 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourceMove( - schemas.DictSchema -): +class EduResourceMove(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Move an education resource + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "destination", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'destination': (str,), # noqa: E501 } - - class properties: - destination = schemas.StrSchema - __annotations__ = { - "destination": destination, - } - - destination: MetaOapg.properties.destination - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceMove': - return super().__new__( - cls, - *_args, - destination=destination, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'destination': 'destination', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, destination, *args, **kwargs): # noqa: E501 + """EduResourceMove - a model defined in OpenAPI + + Args: + destination (str): Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.destination = destination + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, destination, *args, **kwargs): # noqa: E501 + """EduResourceMove - a model defined in OpenAPI + + Args: + destination (str): Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.destination = destination + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_move.pyi b/flat_api/model/edu_resource_move.pyi deleted file mode 100644 index 669e3e4..0000000 --- a/flat_api/model/edu_resource_move.pyi +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceMove( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Move an education resource - """ - - - class MetaOapg: - required = { - "destination", - } - - class properties: - destination = schemas.StrSchema - __annotations__ = { - "destination": destination, - } - - destination: MetaOapg.properties.destination - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceMove': - return super().__new__( - cls, - *_args, - destination=destination, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/edu_resource_privacy.py b/flat_api/model/edu_resource_privacy.py index f4c3285..12426a8 100644 --- a/flat_api/model/edu_resource_privacy.py +++ b/flat_api/model/edu_resource_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,44 +8,276 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourcePrivacy( - schemas.EnumBase, - schemas.StrSchema -): +class EduResourcePrivacy(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The Education resource privacy mode. - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'PRIVATE': "private", + 'PUBLIC': "public", + }, + } + + validations = { + } - class MetaOapg: - enum_value_to_name = { - "private": "PRIVATE", - "public": "PUBLIC", + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """EduResourcePrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 + + Keyword Args: + value (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """EduResourcePrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 + + Keyword Args: + value (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/edu_resource_privacy.pyi b/flat_api/model/edu_resource_privacy.pyi deleted file mode 100644 index 48fe888..0000000 --- a/flat_api/model/edu_resource_privacy.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourcePrivacy( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The Education resource privacy mode. - - """ - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") diff --git a/flat_api/model/edu_resource_resource.py b/flat_api/model/edu_resource_resource.py new file mode 100644 index 0000000..9faf2e4 --- /dev/null +++ b/flat_api/model/edu_resource_resource.py @@ -0,0 +1,330 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + from flat_api.model.assignment_type import AssignmentType + from flat_api.model.media_attachment import MediaAttachment + globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities + globals()['AssignmentType'] = AssignmentType + globals()['MediaAttachment'] = MediaAttachment + + +class EduResourceResource(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('release_grades',): { + 'AUTO': "auto", + 'MANUAL': "manual", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (AssignmentType,), # noqa: E501 + 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'cover': (str,), # noqa: E501 + 'cover_file': (str,), # noqa: E501 + 'attachments': ([MediaAttachment],), # noqa: E501 + 'use_dedicated_attachments': (bool,), # noqa: E501 + 'max_points': (float,), # noqa: E501 + 'release_grades': (str,), # noqa: E501 + 'shuffle_exercises': (bool,), # noqa: E501 + 'toolset': (str,), # noqa: E501 + 'nb_playback_authorized': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'capabilities': 'capabilities', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'cover': 'cover', # noqa: E501 + 'cover_file': 'coverFile', # noqa: E501 + 'attachments': 'attachments', # noqa: E501 + 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 + 'max_points': 'maxPoints', # noqa: E501 + 'release_grades': 'releaseGrades', # noqa: E501 + 'shuffle_exercises': 'shuffleExercises', # noqa: E501 + 'toolset': 'toolset', # noqa: E501 + 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EduResourceResource - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the folder. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """EduResourceResource - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the assignment. [optional] # noqa: E501 + type (AssignmentType): [optional] # noqa: E501 + capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 + title (str): Title of the folder. [optional] # noqa: E501 + description (str): Description and content of the assignment. [optional] # noqa: E501 + cover (str): The URL of the cover to display. [optional] # noqa: E501 + cover_file (str): The id of the cover to display. [optional] # noqa: E501 + attachments ([MediaAttachment]): [optional] # noqa: E501 + use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 + max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 + release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 + shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 + toolset (str): The id of the associated toolset. [optional] # noqa: E501 + nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_type.py b/flat_api/model/edu_resource_type.py index 8af45de..f942c44 100644 --- a/flat_api/model/edu_resource_type.py +++ b/flat_api/model/edu_resource_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,43 +8,284 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourceType( - schemas.EnumBase, - schemas.StrSchema -): +class EduResourceType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Type of an education resource + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ASSIGNMENT': "assignment", + 'FOLDER': "folder", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "assignment": "ASSIGNMENT", - "folder": "FOLDER", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ASSIGNMENT(cls): - return cls("assignment") - - @schemas.classproperty - def FOLDER(cls): - return cls("folder") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """EduResourceType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 + + Keyword Args: + value (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """EduResourceType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 + + Keyword Args: + value (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/edu_resource_type.pyi b/flat_api/model/edu_resource_type.pyi deleted file mode 100644 index b988bea..0000000 --- a/flat_api/model/edu_resource_type.pyi +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Type of an education resource - """ - - @schemas.classproperty - def ASSIGNMENT(cls): - return cls("assignment") - - @schemas.classproperty - def FOLDER(cls): - return cls("folder") diff --git a/flat_api/model/edu_resource_update.py b/flat_api/model/edu_resource_update.py index 9ef3acf..7cecdf2 100644 --- a/flat_api/model/edu_resource_update.py +++ b/flat_api/model/edu_resource_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,81 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourceUpdate( - schemas.DictSchema -): +class EduResourceUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Update of an education resource + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('title',): { + 'max_length': 1000, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EduResourceUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the resource. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """EduResourceUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the resource. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class title( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 1000 - min_length = 1 - __annotations__ = { - "title": title, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceUpdate': - return super().__new__( - cls, - *_args, - title=title, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_update.pyi b/flat_api/model/edu_resource_update.pyi deleted file mode 100644 index df5f20e..0000000 --- a/flat_api/model/edu_resource_update.pyi +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Update of an education resource - """ - - - class MetaOapg: - - class properties: - - - class title( - schemas.StrSchema - ): - pass - __annotations__ = { - "title": title, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceUpdate': - return super().__new__( - cls, - *_args, - title=title, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/edu_resource_use_in_class.py b/flat_api/model/edu_resource_use_in_class.py index 018a92b..3e7a26e 100644 --- a/flat_api/model/edu_resource_use_in_class.py +++ b/flat_api/model/edu_resource_use_in_class.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,87 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduResourceUseInClass( - schemas.DictSchema -): +class EduResourceUseInClass(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Use an education resource in class + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "classroom", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'classroom': (str,), # noqa: E501 + 'assignment': (str,), # noqa: E501 } - - class properties: - classroom = schemas.StrSchema - assignment = schemas.StrSchema - __annotations__ = { - "classroom": classroom, - "assignment": assignment, - } - - classroom: MetaOapg.properties.classroom - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, ], - assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceUseInClass': - return super().__new__( - cls, - *_args, - classroom=classroom, - assignment=assignment, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'classroom': 'classroom', # noqa: E501 + 'assignment': 'assignment', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, classroom, *args, **kwargs): # noqa: E501 + """EduResourceUseInClass - a model defined in OpenAPI + + Args: + classroom (str): The destination classroom where the resource will be copied. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.classroom = classroom + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, classroom, *args, **kwargs): # noqa: E501 + """EduResourceUseInClass - a model defined in OpenAPI + + Args: + classroom (str): The destination classroom where the resource will be copied. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.classroom = classroom + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_use_in_class.pyi b/flat_api/model/edu_resource_use_in_class.pyi deleted file mode 100644 index 018a92b..0000000 --- a/flat_api/model/edu_resource_use_in_class.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduResourceUseInClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Use an education resource in class - """ - - - class MetaOapg: - required = { - "classroom", - } - - class properties: - classroom = schemas.StrSchema - assignment = schemas.StrSchema - __annotations__ = { - "classroom": classroom, - "assignment": assignment, - } - - classroom: MetaOapg.properties.classroom - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["assignment"]) -> MetaOapg.properties.assignment: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classroom"]) -> MetaOapg.properties.classroom: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["assignment"]) -> typing.Union[MetaOapg.properties.assignment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["classroom", "assignment", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - classroom: typing.Union[MetaOapg.properties.classroom, str, ], - assignment: typing.Union[MetaOapg.properties.assignment, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EduResourceUseInClass': - return super().__new__( - cls, - *_args, - classroom=classroom, - assignment=assignment, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/edu_skills_focused.py b/flat_api/model/edu_skills_focused.py index 6e0702c..26f9f62 100644 --- a/flat_api/model/edu_skills_focused.py +++ b/flat_api/model/edu_skills_focused.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,100 +8,280 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class EduSkillsFocused( - schemas.ListSchema -): +class EduSkillsFocused(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Specific skills that will be focused in classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """EduSkillsFocused - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): Specific skills that will be focused in classroom. # noqa: E501 + + Keyword Args: + value ([str]): Specific skills that will be focused in classroom. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """EduSkillsFocused - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): Specific skills that will be focused in classroom. # noqa: E501 + + Keyword Args: + value ([str]): Specific skills that will be focused in classroom. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "notation": "NOTATION", - "sight-reading": "SIGHTREADING", - "performance-instrumental": "PERFORMANCEINSTRUMENTAL", - "ear-training": "EARTRAINING", - "music-theory": "MUSICTHEORY", - "composition": "COMPOSITION", - "jazz-ensemble": "JAZZENSEMBLE", - "music-technology": "MUSICTECHNOLOGY", - "other": "OTHER", - } - - @schemas.classproperty - def NOTATION(cls): - return cls("notation") - - @schemas.classproperty - def SIGHTREADING(cls): - return cls("sight-reading") - - @schemas.classproperty - def PERFORMANCEINSTRUMENTAL(cls): - return cls("performance-instrumental") - - @schemas.classproperty - def EARTRAINING(cls): - return cls("ear-training") - - @schemas.classproperty - def MUSICTHEORY(cls): - return cls("music-theory") - - @schemas.classproperty - def COMPOSITION(cls): - return cls("composition") - - @schemas.classproperty - def JAZZENSEMBLE(cls): - return cls("jazz-ensemble") - - @schemas.classproperty - def MUSICTECHNOLOGY(cls): - return cls("music-technology") - - @schemas.classproperty - def OTHER(cls): - return cls("other") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EduSkillsFocused': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) + return self diff --git a/flat_api/model/edu_skills_focused.pyi b/flat_api/model/edu_skills_focused.pyi deleted file mode 100644 index 6cebe24..0000000 --- a/flat_api/model/edu_skills_focused.pyi +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class EduSkillsFocused( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Specific skills that will be focused in classroom - """ - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def NOTATION(cls): - return cls("notation") - - @schemas.classproperty - def SIGHTREADING(cls): - return cls("sight-reading") - - @schemas.classproperty - def PERFORMANCEINSTRUMENTAL(cls): - return cls("performance-instrumental") - - @schemas.classproperty - def EARTRAINING(cls): - return cls("ear-training") - - @schemas.classproperty - def MUSICTHEORY(cls): - return cls("music-theory") - - @schemas.classproperty - def COMPOSITION(cls): - return cls("composition") - - @schemas.classproperty - def JAZZENSEMBLE(cls): - return cls("jazz-ensemble") - - @schemas.classproperty - def MUSICTECHNOLOGY(cls): - return cls("music-technology") - - @schemas.classproperty - def OTHER(cls): - return cls("other") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EduSkillsFocused': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/flat_api/model/flat_error_response.py b/flat_api/model/flat_error_response.py index 6b657a7..3440b76 100644 --- a/flat_api/model/flat_error_response.py +++ b/flat_api/model/flat_error_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,109 +8,277 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class FlatErrorResponse( - schemas.DictSchema -): +class FlatErrorResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - An API Error response + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "code", - "message", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'param': (str,), # noqa: E501 } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - id = schemas.StrSchema - param = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - "id": id, - "param": param, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> typing.Union[MetaOapg.properties.param, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - param: typing.Union[MetaOapg.properties.param, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FlatErrorResponse': - return super().__new__( - cls, - *_args, - code=code, - message=message, - id=id, - param=param, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'code': 'code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'id': 'id', # noqa: E501 + 'param': 'param', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, code, message, *args, **kwargs): # noqa: E501 + """FlatErrorResponse - a model defined in OpenAPI + + Args: + code (str): A corresponding code for this error + message (str): A printable message for this error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): An unique error identifier generated for the request. [optional] # noqa: E501 + param (str): The related parameter that caused the error. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, code, message, *args, **kwargs): # noqa: E501 + """FlatErrorResponse - a model defined in OpenAPI + + Args: + code (str): A corresponding code for this error + message (str): A printable message for this error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): An unique error identifier generated for the request. [optional] # noqa: E501 + param (str): The related parameter that caused the error. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.code = code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/flat_error_response.pyi b/flat_api/model/flat_error_response.pyi deleted file mode 100644 index 6b657a7..0000000 --- a/flat_api/model/flat_error_response.pyi +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class FlatErrorResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - An API Error response - """ - - - class MetaOapg: - required = { - "code", - "message", - } - - class properties: - code = schemas.StrSchema - message = schemas.StrSchema - id = schemas.StrSchema - param = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - "id": id, - "param": param, - } - - code: MetaOapg.properties.code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> typing.Union[MetaOapg.properties.param, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "id", "param", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - param: typing.Union[MetaOapg.properties.param, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FlatErrorResponse': - return super().__new__( - cls, - *_args, - code=code, - message=message, - id=id, - param=param, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/flat_locales.py b/flat_api/model/flat_locales.py index 9038632..66c8d93 100644 --- a/flat_api/model/flat_locales.py +++ b/flat_api/model/flat_locales.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,123 +8,292 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class FlatLocales( - schemas.EnumBase, - schemas.StrSchema -): +class FlatLocales(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The user language + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'EN': "en", + 'EN-GB': "en-GB", + 'ES': "es", + 'FR': "fr", + 'DE': "de", + 'IT': "it", + 'JA': "ja", + 'JA-HIRA': "ja-HIRA", + 'KO': "ko", + 'NL': "nl", + 'PL': "pl", + 'PT': "pt", + 'PT-BR': "pt-BR", + 'RO': "ro", + 'RU': "ru", + 'SV': "sv", + 'TR': "tr", + 'ZH-HANS': "zh-Hans", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "en": "EN", - "en-GB": "ENGB", - "es": "ES", - "fr": "FR", - "de": "DE", - "it": "IT", - "ja": "JA", - "ja-HIRA": "JAHIRA", - "ko": "KO", - "nl": "NL", - "pl": "PL", - "pt": "PT", - "pt-BR": "PTBR", - "ro": "RO", - "ru": "RU", - "sv": "SV", - "tr": "TR", - "zh-Hans": "ZHHANS", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def EN(cls): - return cls("en") - - @schemas.classproperty - def ENGB(cls): - return cls("en-GB") - - @schemas.classproperty - def ES(cls): - return cls("es") - - @schemas.classproperty - def FR(cls): - return cls("fr") - - @schemas.classproperty - def DE(cls): - return cls("de") - - @schemas.classproperty - def IT(cls): - return cls("it") - - @schemas.classproperty - def JA(cls): - return cls("ja") - - @schemas.classproperty - def JAHIRA(cls): - return cls("ja-HIRA") - - @schemas.classproperty - def KO(cls): - return cls("ko") - - @schemas.classproperty - def NL(cls): - return cls("nl") - - @schemas.classproperty - def PL(cls): - return cls("pl") - - @schemas.classproperty - def PT(cls): - return cls("pt") - - @schemas.classproperty - def PTBR(cls): - return cls("pt-BR") - - @schemas.classproperty - def RO(cls): - return cls("ro") - - @schemas.classproperty - def RU(cls): - return cls("ru") - - @schemas.classproperty - def SV(cls): - return cls("sv") - - @schemas.classproperty - def TR(cls): - return cls("tr") - - @schemas.classproperty - def ZHHANS(cls): - return cls("zh-Hans") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """FlatLocales - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 + + Keyword Args: + value (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "en" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """FlatLocales - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 + + Keyword Args: + value (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "en" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/flat_locales.pyi b/flat_api/model/flat_locales.pyi deleted file mode 100644 index 6105be9..0000000 --- a/flat_api/model/flat_locales.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class FlatLocales( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The user language - """ - - @schemas.classproperty - def EN(cls): - return cls("en") - - @schemas.classproperty - def ENGB(cls): - return cls("en-GB") - - @schemas.classproperty - def ES(cls): - return cls("es") - - @schemas.classproperty - def FR(cls): - return cls("fr") - - @schemas.classproperty - def DE(cls): - return cls("de") - - @schemas.classproperty - def IT(cls): - return cls("it") - - @schemas.classproperty - def JA(cls): - return cls("ja") - - @schemas.classproperty - def JAHIRA(cls): - return cls("ja-HIRA") - - @schemas.classproperty - def KO(cls): - return cls("ko") - - @schemas.classproperty - def NL(cls): - return cls("nl") - - @schemas.classproperty - def PL(cls): - return cls("pl") - - @schemas.classproperty - def PT(cls): - return cls("pt") - - @schemas.classproperty - def PTBR(cls): - return cls("pt-BR") - - @schemas.classproperty - def RO(cls): - return cls("ro") - - @schemas.classproperty - def RU(cls): - return cls("ru") - - @schemas.classproperty - def SV(cls): - return cls("sv") - - @schemas.classproperty - def TR(cls): - return cls("tr") - - @schemas.classproperty - def ZHHANS(cls): - return cls("zh-Hans") diff --git a/flat_api/model/google_classroom_coursework.py b/flat_api/model/google_classroom_coursework.py index 55c6dea..3643123 100644 --- a/flat_api/model/google_classroom_coursework.py +++ b/flat_api/model/google_classroom_coursework.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,121 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class GoogleClassroomCoursework( - schemas.DictSchema -): +class GoogleClassroomCoursework(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A coursework on Google Classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + 'topic_id': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + 'topic_id': 'topicId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GoogleClassroomCoursework - a model defined in OpenAPI - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - - - class topicId( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'topicId': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the coursework assigned by Classroom. [optional] # noqa: E501 + state (str): State of the coursework. [optional] # noqa: E501 + alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 + topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - "topicId": topicId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GoogleClassroomCoursework': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - topicId=topicId, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GoogleClassroomCoursework - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the coursework assigned by Classroom. [optional] # noqa: E501 + state (str): State of the coursework. [optional] # noqa: E501 + alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 + topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/google_classroom_coursework.pyi b/flat_api/model/google_classroom_coursework.pyi deleted file mode 100644 index 55c6dea..0000000 --- a/flat_api/model/google_classroom_coursework.pyi +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class GoogleClassroomCoursework( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A coursework on Google Classroom - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - - - class topicId( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'topicId': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - "topicId": topicId, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["topicId"]) -> MetaOapg.properties.topicId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["topicId"]) -> typing.Union[MetaOapg.properties.topicId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "topicId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - topicId: typing.Union[MetaOapg.properties.topicId, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GoogleClassroomCoursework': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - topicId=topicId, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/google_classroom_submission.py b/flat_api/model/google_classroom_submission.py index 74c8d5b..e5d4ef1 100644 --- a/flat_api/model/google_classroom_submission.py +++ b/flat_api/model/google_classroom_submission.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,92 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class GoogleClassroomSubmission( - schemas.DictSchema -): +class GoogleClassroomSubmission(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A coursework submission on Google Classroom + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GoogleClassroomSubmission - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the coursework submission assigned by Classroom. [optional] # noqa: E501 + state (str): State of the submission on Google Classroom. [optional] # noqa: E501 + alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GoogleClassroomSubmission - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the coursework submission assigned by Classroom. [optional] # noqa: E501 + state (str): State of the submission on Google Classroom. [optional] # noqa: E501 + alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GoogleClassroomSubmission': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/google_classroom_submission.pyi b/flat_api/model/google_classroom_submission.pyi deleted file mode 100644 index 74c8d5b..0000000 --- a/flat_api/model/google_classroom_submission.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class GoogleClassroomSubmission( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A coursework submission on Google Classroom - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GoogleClassroomSubmission': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/group.py b/flat_api/model/group.py index 087881e..f57f345 100644 --- a/flat_api/model/group.py +++ b/flat_api/model/group.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,157 +8,286 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class Group( - schemas.DictSchema -): +class Group(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A group of users + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'GENERIC': "generic", + 'CLASSTEACHERS': "classTeachers", + 'CLASSSTUDENTS': "classStudents", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'users_count': (float,), # noqa: E501 + 'read_only': (bool,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'users_count': 'usersCount', # noqa: E501 + 'read_only': 'readOnly', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the group. [optional] # noqa: E501 + name (str): The display name of the group. [optional] # noqa: E501 + type (str): The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class . [optional] # noqa: E501 + users_count (float): The number of users in this group. [optional] # noqa: E501 + read_only (bool): `True` if the group is set in read-only . [optional] # noqa: E501 + organization (str): If the group is related to an organization, this field will contain the unique identifier of the organization . [optional] # noqa: E501 + creation_date (datetime): The creation date of the group. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the group. [optional] # noqa: E501 + name (str): The display name of the group. [optional] # noqa: E501 + type (str): The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class . [optional] # noqa: E501 + users_count (float): The number of users in this group. [optional] # noqa: E501 + read_only (bool): `True` if the group is set in read-only . [optional] # noqa: E501 + organization (str): If the group is related to an organization, this field will contain the unique identifier of the organization . [optional] # noqa: E501 + creation_date (datetime): The creation date of the group. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "generic": "GENERIC", - "classTeachers": "CLASS_TEACHERS", - "classStudents": "CLASS_STUDENTS", - } - - @schemas.classproperty - def GENERIC(cls): - return cls("generic") - - @schemas.classproperty - def CLASS_TEACHERS(cls): - return cls("classTeachers") - - @schemas.classproperty - def CLASS_STUDENTS(cls): - return cls("classStudents") - usersCount = schemas.NumberSchema - readOnly = schemas.BoolSchema - organization = schemas.StrSchema - creationDate = schemas.DateTimeSchema - __annotations__ = { - "id": id, - "name": name, - "type": type, - "usersCount": usersCount, - "readOnly": readOnly, - "organization": organization, - "creationDate": creationDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Group': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - usersCount=usersCount, - readOnly=readOnly, - organization=organization, - creationDate=creationDate, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/group.pyi b/flat_api/model/group.pyi deleted file mode 100644 index b545230..0000000 --- a/flat_api/model/group.pyi +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class Group( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A group of users - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def GENERIC(cls): - return cls("generic") - - @schemas.classproperty - def CLASS_TEACHERS(cls): - return cls("classTeachers") - - @schemas.classproperty - def CLASS_STUDENTS(cls): - return cls("classStudents") - usersCount = schemas.NumberSchema - readOnly = schemas.BoolSchema - organization = schemas.StrSchema - creationDate = schemas.DateTimeSchema - __annotations__ = { - "id": id, - "name": name, - "type": type, - "usersCount": usersCount, - "readOnly": readOnly, - "organization": organization, - "creationDate": creationDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Group': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - usersCount=usersCount, - readOnly=readOnly, - organization=organization, - creationDate=creationDate, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/group_details.py b/flat_api/model/group_details.py index caa9f69..25f5844 100644 --- a/flat_api/model/group_details.py +++ b/flat_api/model/group_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,137 +8,287 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.group_type import GroupType + globals()['GroupType'] = GroupType -class GroupDetails( - schemas.DictSchema -): + +class GroupDetails(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The details of a group + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (GroupType,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'users_count': (float,), # noqa: E501 + 'read_only': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'users_count': 'usersCount', # noqa: E501 + 'read_only': 'readOnly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GroupDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the group. [optional] # noqa: E501 + name (str): The displayable name of the group. [optional] # noqa: E501 + type (GroupType): [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning the group. [optional] # noqa: E501 + creation_date (datetime): The date when the group was create. [optional] # noqa: E501 + users_count (float): The number of students in this group. [optional] # noqa: E501 + read_only (bool): `true` if the properties and members of this group are in in read-only . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GroupDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the group. [optional] # noqa: E501 + name (str): The displayable name of the group. [optional] # noqa: E501 + type (GroupType): [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning the group. [optional] # noqa: E501 + creation_date (datetime): The date when the group was create. [optional] # noqa: E501 + users_count (float): The number of students in this group. [optional] # noqa: E501 + read_only (bool): `true` if the properties and members of this group are in in read-only . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['GroupType']: - return GroupType - organization = schemas.StrSchema - creationDate = schemas.DateTimeSchema - usersCount = schemas.NumberSchema - readOnly = schemas.BoolSchema - __annotations__ = { - "id": id, - "name": name, - "type": type, - "organization": organization, - "creationDate": creationDate, - "usersCount": usersCount, - "readOnly": readOnly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'GroupType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['GroupType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union['GroupType', schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupDetails': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - organization=organization, - creationDate=creationDate, - usersCount=usersCount, - readOnly=readOnly, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.group_type import GroupType + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/group_details.pyi b/flat_api/model/group_details.pyi deleted file mode 100644 index caa9f69..0000000 --- a/flat_api/model/group_details.pyi +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class GroupDetails( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The details of a group - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - @staticmethod - def type() -> typing.Type['GroupType']: - return GroupType - organization = schemas.StrSchema - creationDate = schemas.DateTimeSchema - usersCount = schemas.NumberSchema - readOnly = schemas.BoolSchema - __annotations__ = { - "id": id, - "name": name, - "type": type, - "organization": organization, - "creationDate": creationDate, - "usersCount": usersCount, - "readOnly": readOnly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'GroupType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usersCount"]) -> MetaOapg.properties.usersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readOnly"]) -> MetaOapg.properties.readOnly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['GroupType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usersCount"]) -> typing.Union[MetaOapg.properties.usersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readOnly"]) -> typing.Union[MetaOapg.properties.readOnly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - type: typing.Union['GroupType', schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - usersCount: typing.Union[MetaOapg.properties.usersCount, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - readOnly: typing.Union[MetaOapg.properties.readOnly, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupDetails': - return super().__new__( - cls, - *_args, - id=id, - name=name, - type=type, - organization=organization, - creationDate=creationDate, - usersCount=usersCount, - readOnly=readOnly, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.group_type import GroupType diff --git a/flat_api/model/group_type.py b/flat_api/model/group_type.py index b621968..518f22d 100644 --- a/flat_api/model/group_type.py +++ b/flat_api/model/group_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,48 +8,285 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class GroupType( - schemas.EnumBase, - schemas.StrSchema -): +class GroupType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The type of the group + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'GENERIC': "generic", + 'CLASSTEACHERS': "classTeachers", + 'CLASSSTUDENTS': "classStudents", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "generic": "GENERIC", - "classTeachers": "CLASS_TEACHERS", - "classStudents": "CLASS_STUDENTS", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def GENERIC(cls): - return cls("generic") - - @schemas.classproperty - def CLASS_TEACHERS(cls): - return cls("classTeachers") - - @schemas.classproperty - def CLASS_STUDENTS(cls): - return cls("classStudents") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """GroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 + + Keyword Args: + value (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """GroupType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 + + Keyword Args: + value (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/group_type.pyi b/flat_api/model/group_type.pyi deleted file mode 100644 index bb46468..0000000 --- a/flat_api/model/group_type.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class GroupType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The type of the group - """ - - @schemas.classproperty - def GENERIC(cls): - return cls("generic") - - @schemas.classproperty - def CLASS_TEACHERS(cls): - return cls("classTeachers") - - @schemas.classproperty - def CLASS_STUDENTS(cls): - return cls("classStudents") diff --git a/flat_api/model/license_mode.py b/flat_api/model/license_mode.py index 22fec82..2022ec1 100644 --- a/flat_api/model/license_mode.py +++ b/flat_api/model/license_mode.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,43 +8,284 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class LicenseMode( - schemas.EnumBase, - schemas.StrSchema -): +class LicenseMode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Mode of the license + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'CREDIT': "credit", + 'SITE': "site", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "credit": "CREDIT", - "site": "SITE", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def CREDIT(cls): - return cls("credit") - - @schemas.classproperty - def SITE(cls): - return cls("site") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """LicenseMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 + + Keyword Args: + value (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """LicenseMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 + + Keyword Args: + value (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/license_mode.pyi b/flat_api/model/license_mode.pyi deleted file mode 100644 index 9f722ea..0000000 --- a/flat_api/model/license_mode.pyi +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class LicenseMode( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Mode of the license - """ - - @schemas.classproperty - def CREDIT(cls): - return cls("credit") - - @schemas.classproperty - def SITE(cls): - return cls("site") diff --git a/flat_api/model/license_sources.py b/flat_api/model/license_sources.py index e2dd691..bbed8a7 100644 --- a/flat_api/model/license_sources.py +++ b/flat_api/model/license_sources.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,73 +8,282 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class LicenseSources( - schemas.EnumBase, - schemas.StrSchema -): +class LicenseSources(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Source of the license + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ORDER': "order", + 'TRIAL': "trial", + 'VOUCHER': "voucher", + 'DISTRIBUTOR': "distributor", + 'SUBSCRIPTION': "subscription", + 'APPSTORE': "appStore", + 'PLAYSTORE': "playStore", + 'MUSICFIRST': "musicfirst", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "order": "ORDER", - "trial": "TRIAL", - "voucher": "VOUCHER", - "distributor": "DISTRIBUTOR", - "subscription": "SUBSCRIPTION", - "appStore": "APP_STORE", - "playStore": "PLAY_STORE", - "musicfirst": "MUSICFIRST", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ORDER(cls): - return cls("order") - - @schemas.classproperty - def TRIAL(cls): - return cls("trial") - - @schemas.classproperty - def VOUCHER(cls): - return cls("voucher") - - @schemas.classproperty - def DISTRIBUTOR(cls): - return cls("distributor") - - @schemas.classproperty - def SUBSCRIPTION(cls): - return cls("subscription") - - @schemas.classproperty - def APP_STORE(cls): - return cls("appStore") - - @schemas.classproperty - def PLAY_STORE(cls): - return cls("playStore") - - @schemas.classproperty - def MUSICFIRST(cls): - return cls("musicfirst") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """LicenseSources - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 + + Keyword Args: + value (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "order" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """LicenseSources - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 + + Keyword Args: + value (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "order" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/license_sources.pyi b/flat_api/model/license_sources.pyi deleted file mode 100644 index d246080..0000000 --- a/flat_api/model/license_sources.pyi +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class LicenseSources( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Source of the license - """ - - @schemas.classproperty - def ORDER(cls): - return cls("order") - - @schemas.classproperty - def TRIAL(cls): - return cls("trial") - - @schemas.classproperty - def VOUCHER(cls): - return cls("voucher") - - @schemas.classproperty - def DISTRIBUTOR(cls): - return cls("distributor") - - @schemas.classproperty - def SUBSCRIPTION(cls): - return cls("subscription") - - @schemas.classproperty - def APP_STORE(cls): - return cls("appStore") - - @schemas.classproperty - def PLAY_STORE(cls): - return cls("playStore") - - @schemas.classproperty - def MUSICFIRST(cls): - return cls("musicfirst") diff --git a/flat_api/model/lms_name.py b/flat_api/model/lms_name.py index ec71519..aac5403 100644 --- a/flat_api/model/lms_name.py +++ b/flat_api/model/lms_name.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,73 +8,290 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class LmsName( - schemas.EnumBase, - schemas.StrSchema -): +class LmsName(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - LMS name + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'CANVAS': "canvas", + 'MOODLE': "moodle", + 'SCHOOLOGY': "schoology", + 'BLACKBOARD': "blackboard", + 'DESIRE2LEARN': "desire2learn", + 'SAKAI': "sakai", + 'SCHOOLBOX': "schoolbox", + 'OTHER': "other", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "canvas": "CANVAS", - "moodle": "MOODLE", - "schoology": "SCHOOLOGY", - "blackboard": "BLACKBOARD", - "desire2learn": "DESIRE2LEARN", - "sakai": "SAKAI", - "schoolbox": "SCHOOLBOX", - "other": "OTHER", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def CANVAS(cls): - return cls("canvas") - - @schemas.classproperty - def MOODLE(cls): - return cls("moodle") - - @schemas.classproperty - def SCHOOLOGY(cls): - return cls("schoology") - - @schemas.classproperty - def BLACKBOARD(cls): - return cls("blackboard") - - @schemas.classproperty - def DESIRE2LEARN(cls): - return cls("desire2learn") - - @schemas.classproperty - def SAKAI(cls): - return cls("sakai") - - @schemas.classproperty - def SCHOOLBOX(cls): - return cls("schoolbox") - - @schemas.classproperty - def OTHER(cls): - return cls("other") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """LmsName - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 + + Keyword Args: + value (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """LmsName - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 + + Keyword Args: + value (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/lms_name.pyi b/flat_api/model/lms_name.pyi deleted file mode 100644 index f458b85..0000000 --- a/flat_api/model/lms_name.pyi +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class LmsName( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - LMS name - """ - - @schemas.classproperty - def CANVAS(cls): - return cls("canvas") - - @schemas.classproperty - def MOODLE(cls): - return cls("moodle") - - @schemas.classproperty - def SCHOOLOGY(cls): - return cls("schoology") - - @schemas.classproperty - def BLACKBOARD(cls): - return cls("blackboard") - - @schemas.classproperty - def DESIRE2LEARN(cls): - return cls("desire2learn") - - @schemas.classproperty - def SAKAI(cls): - return cls("sakai") - - @schemas.classproperty - def SCHOOLBOX(cls): - return cls("schoolbox") - - @schemas.classproperty - def OTHER(cls): - return cls("other") diff --git a/flat_api/model/lti_credentials.py b/flat_api/model/lti_credentials.py index ae898ba..0112582 100644 --- a/flat_api/model/lti_credentials.py +++ b/flat_api/model/lti_credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,157 +8,295 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.lms_name import LmsName + globals()['LmsName'] = LmsName -class LtiCredentials( - schemas.DictSchema -): + +class LtiCredentials(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A couple of LTI 1.x OAuth credentials + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'lms': (LmsName,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'creator': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'last_usage': (datetime,), # noqa: E501 + 'consumer_key': (str,), # noqa: E501 + 'consumer_secret': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'lms': 'lms', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'creator': 'creator', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'last_usage': 'lastUsage', # noqa: E501 + 'consumer_key': 'consumerKey', # noqa: E501 + 'consumer_secret': 'consumerSecret', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LtiCredentials - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of this couple of credentials. [optional] # noqa: E501 + name (str): Name of the couple of credentials. [optional] # noqa: E501 + lms (LmsName): [optional] # noqa: E501 + organization (str): The unique identifier of the Organization associated to these credentials. [optional] # noqa: E501 + creator (str): Unique identifier of the user who created these credentials. [optional] # noqa: E501 + creation_date (datetime): The creation date of thse credentials. [optional] # noqa: E501 + last_usage (datetime): The last time these credentials were used. [optional] # noqa: E501 + consumer_key (str): OAuth 1 Consumer Key. [optional] # noqa: E501 + consumer_secret (str): OAuth 1 Consumer Secret. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LtiCredentials - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of this couple of credentials. [optional] # noqa: E501 + name (str): Name of the couple of credentials. [optional] # noqa: E501 + lms (LmsName): [optional] # noqa: E501 + organization (str): The unique identifier of the Organization associated to these credentials. [optional] # noqa: E501 + creator (str): Unique identifier of the user who created these credentials. [optional] # noqa: E501 + creation_date (datetime): The creation date of thse credentials. [optional] # noqa: E501 + last_usage (datetime): The last time these credentials were used. [optional] # noqa: E501 + consumer_key (str): OAuth 1 Consumer Key. [optional] # noqa: E501 + consumer_secret (str): OAuth 1 Consumer Secret. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - @staticmethod - def lms() -> typing.Type['LmsName']: - return LmsName - organization = schemas.StrSchema - creator = schemas.StrSchema - creationDate = schemas.DateTimeSchema - lastUsage = schemas.DateTimeSchema - consumerKey = schemas.StrSchema - consumerSecret = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - "lms": lms, - "organization": organization, - "creator": creator, - "creationDate": creationDate, - "lastUsage": lastUsage, - "consumerKey": consumerKey, - "consumerSecret": consumerSecret, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastUsage"]) -> MetaOapg.properties.lastUsage: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["consumerKey"]) -> MetaOapg.properties.consumerKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["consumerSecret"]) -> MetaOapg.properties.consumerSecret: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> typing.Union['LmsName', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastUsage"]) -> typing.Union[MetaOapg.properties.lastUsage, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["consumerKey"]) -> typing.Union[MetaOapg.properties.consumerKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["consumerSecret"]) -> typing.Union[MetaOapg.properties.consumerSecret, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - lms: typing.Union['LmsName', schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - lastUsage: typing.Union[MetaOapg.properties.lastUsage, str, datetime, schemas.Unset] = schemas.unset, - consumerKey: typing.Union[MetaOapg.properties.consumerKey, str, schemas.Unset] = schemas.unset, - consumerSecret: typing.Union[MetaOapg.properties.consumerSecret, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LtiCredentials': - return super().__new__( - cls, - *_args, - id=id, - name=name, - lms=lms, - organization=organization, - creator=creator, - creationDate=creationDate, - lastUsage=lastUsage, - consumerKey=consumerKey, - consumerSecret=consumerSecret, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.lms_name import LmsName + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/lti_credentials.pyi b/flat_api/model/lti_credentials.pyi deleted file mode 100644 index ae898ba..0000000 --- a/flat_api/model/lti_credentials.pyi +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class LtiCredentials( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A couple of LTI 1.x OAuth credentials - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - name = schemas.StrSchema - - @staticmethod - def lms() -> typing.Type['LmsName']: - return LmsName - organization = schemas.StrSchema - creator = schemas.StrSchema - creationDate = schemas.DateTimeSchema - lastUsage = schemas.DateTimeSchema - consumerKey = schemas.StrSchema - consumerSecret = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - "lms": lms, - "organization": organization, - "creator": creator, - "creationDate": creationDate, - "lastUsage": lastUsage, - "consumerKey": consumerKey, - "consumerSecret": consumerSecret, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastUsage"]) -> MetaOapg.properties.lastUsage: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["consumerKey"]) -> MetaOapg.properties.consumerKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["consumerSecret"]) -> MetaOapg.properties.consumerSecret: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> typing.Union['LmsName', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastUsage"]) -> typing.Union[MetaOapg.properties.lastUsage, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["consumerKey"]) -> typing.Union[MetaOapg.properties.consumerKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["consumerSecret"]) -> typing.Union[MetaOapg.properties.consumerSecret, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - lms: typing.Union['LmsName', schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - lastUsage: typing.Union[MetaOapg.properties.lastUsage, str, datetime, schemas.Unset] = schemas.unset, - consumerKey: typing.Union[MetaOapg.properties.consumerKey, str, schemas.Unset] = schemas.unset, - consumerSecret: typing.Union[MetaOapg.properties.consumerSecret, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LtiCredentials': - return super().__new__( - cls, - *_args, - id=id, - name=name, - lms=lms, - organization=organization, - creator=creator, - creationDate=creationDate, - lastUsage=lastUsage, - consumerKey=consumerKey, - consumerSecret=consumerSecret, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/lti_credentials_creation.py b/flat_api/model/lti_credentials_creation.py index abbc3fd..a304bc1 100644 --- a/flat_api/model/lti_credentials_creation.py +++ b/flat_api/model/lti_credentials_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,102 +8,278 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.lms_name import LmsName + globals()['LmsName'] = LmsName -class LtiCredentialsCreation( - schemas.DictSchema -): + +class LtiCredentialsCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a couple of LTI 1.x OAuth credentials + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('name',): { + 'max_length': 300, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "lms", - "name", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'lms': (LmsName,), # noqa: E501 } - - class properties: - - - class name( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 300 - - @staticmethod - def lms() -> typing.Type['LmsName']: - return LmsName - __annotations__ = { - "name": name, - "lms": lms, - } - - lms: 'LmsName' - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lms: 'LmsName', - name: typing.Union[MetaOapg.properties.name, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LtiCredentialsCreation': - return super().__new__( - cls, - *_args, - lms=lms, - name=name, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.lms_name import LmsName + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'lms': 'lms', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, lms, *args, **kwargs): # noqa: E501 + """LtiCredentialsCreation - a model defined in OpenAPI + + Args: + name (str): Name of the couple of credentials + lms (LmsName): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.lms = lms + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, lms, *args, **kwargs): # noqa: E501 + """LtiCredentialsCreation - a model defined in OpenAPI + + Args: + name (str): Name of the couple of credentials + lms (LmsName): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.lms = lms + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/lti_credentials_creation.pyi b/flat_api/model/lti_credentials_creation.pyi deleted file mode 100644 index fca5dcd..0000000 --- a/flat_api/model/lti_credentials_creation.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class LtiCredentialsCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a couple of LTI 1.x OAuth credentials - """ - - - class MetaOapg: - required = { - "lms", - "name", - } - - class properties: - - - class name( - schemas.StrSchema - ): - pass - - @staticmethod - def lms() -> typing.Type['LmsName']: - return LmsName - __annotations__ = { - "name": name, - "lms": lms, - } - - lms: 'LmsName' - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lms"]) -> 'LmsName': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "lms", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lms: 'LmsName', - name: typing.Union[MetaOapg.properties.name, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LtiCredentialsCreation': - return super().__new__( - cls, - *_args, - lms=lms, - name=name, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.lms_name import LmsName diff --git a/flat_api/model/media_attachment.py b/flat_api/model/media_attachment.py index f5525ae..b768846 100644 --- a/flat_api/model/media_attachment.py +++ b/flat_api/model/media_attachment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,344 +8,363 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode + globals()['MediaScoreSharingMode'] = MediaScoreSharingMode -class MediaAttachment( - schemas.DictSchema -): + +class MediaAttachment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Media attachment. The API will automatically resolve the details, oEmbed, -and media available if possible and return them in this object - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'RICH': "rich", + 'PHOTO': "photo", + 'VIDEO': "video", + 'LINK': "link", + 'FLAT': "flat", + 'GOOGLEDRIVE': "googleDrive", + 'WORKSHEET': "worksheet", + 'PERFORMANCE': "performance", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "type", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'revision': (str,), # noqa: E501 + 'worksheet': (str,), # noqa: E501 + 'dedicated': (bool,), # noqa: E501 + 'track': (str,), # noqa: E501 + 'sharing_mode': (MediaScoreSharingMode,), # noqa: E501 + 'lock_score_template': (bool,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'html': (str,), # noqa: E501 + 'html_width': (str,), # noqa: E501 + 'html_height': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'thumbnail_url': (str,), # noqa: E501 + 'thumbnail_width': (int,), # noqa: E501 + 'thumbnail_height': (int,), # noqa: E501 + 'author_name': (str,), # noqa: E501 + 'author_url': (str,), # noqa: E501 + 'icon_url': (str,), # noqa: E501 + 'mime_type': (str,), # noqa: E501 + 'google_drive_file_id': (str,), # noqa: E501 } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "rich": "RICH", - "photo": "PHOTO", - "video": "VIDEO", - "link": "LINK", - "flat": "FLAT", - "googleDrive": "GOOGLE_DRIVE", - "worksheet": "WORKSHEET", - "performance": "PERFORMANCE", - } - - @schemas.classproperty - def RICH(cls): - return cls("rich") - - @schemas.classproperty - def PHOTO(cls): - return cls("photo") - - @schemas.classproperty - def VIDEO(cls): - return cls("video") - - @schemas.classproperty - def LINK(cls): - return cls("link") - - @schemas.classproperty - def FLAT(cls): - return cls("flat") - - @schemas.classproperty - def GOOGLE_DRIVE(cls): - return cls("googleDrive") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") - score = schemas.StrSchema - revision = schemas.StrSchema - worksheet = schemas.StrSchema - dedicated = schemas.BoolSchema - track = schemas.StrSchema - - @staticmethod - def sharingMode() -> typing.Type['MediaScoreSharingMode']: - return MediaScoreSharingMode - lockScoreTemplate = schemas.BoolSchema - title = schemas.StrSchema - description = schemas.StrSchema - html = schemas.StrSchema - htmlWidth = schemas.StrSchema - htmlHeight = schemas.StrSchema - url = schemas.StrSchema - thumbnailUrl = schemas.StrSchema - thumbnailWidth = schemas.IntSchema - thumbnailHeight = schemas.IntSchema - authorName = schemas.StrSchema - authorUrl = schemas.StrSchema - iconUrl = schemas.StrSchema - mimeType = schemas.StrSchema - googleDriveFileId = schemas.StrSchema - __annotations__ = { - "type": type, - "score": score, - "revision": revision, - "worksheet": worksheet, - "dedicated": dedicated, - "track": track, - "sharingMode": sharingMode, - "lockScoreTemplate": lockScoreTemplate, - "title": title, - "description": description, - "html": html, - "htmlWidth": htmlWidth, - "htmlHeight": htmlHeight, - "url": url, - "thumbnailUrl": thumbnailUrl, - "thumbnailWidth": thumbnailWidth, - "thumbnailHeight": thumbnailHeight, - "authorName": authorName, - "authorUrl": authorUrl, - "iconUrl": iconUrl, - "mimeType": mimeType, - "googleDriveFileId": googleDriveFileId, - } - - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dedicated"]) -> MetaOapg.properties.dedicated: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["track"]) -> MetaOapg.properties.track: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["html"]) -> MetaOapg.properties.html: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlWidth"]) -> MetaOapg.properties.htmlWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlHeight"]) -> MetaOapg.properties.htmlHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailUrl"]) -> MetaOapg.properties.thumbnailUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailWidth"]) -> MetaOapg.properties.thumbnailWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailHeight"]) -> MetaOapg.properties.thumbnailHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["authorName"]) -> MetaOapg.properties.authorName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["authorUrl"]) -> MetaOapg.properties.authorUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["iconUrl"]) -> MetaOapg.properties.iconUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mimeType"]) -> MetaOapg.properties.mimeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dedicated"]) -> typing.Union[MetaOapg.properties.dedicated, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["track"]) -> typing.Union[MetaOapg.properties.track, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["html"]) -> typing.Union[MetaOapg.properties.html, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlWidth"]) -> typing.Union[MetaOapg.properties.htmlWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlHeight"]) -> typing.Union[MetaOapg.properties.htmlHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailUrl"]) -> typing.Union[MetaOapg.properties.thumbnailUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailWidth"]) -> typing.Union[MetaOapg.properties.thumbnailWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailHeight"]) -> typing.Union[MetaOapg.properties.thumbnailHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["authorName"]) -> typing.Union[MetaOapg.properties.authorName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["authorUrl"]) -> typing.Union[MetaOapg.properties.authorUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["iconUrl"]) -> typing.Union[MetaOapg.properties.iconUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mimeType"]) -> typing.Union[MetaOapg.properties.mimeType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, ], - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, - dedicated: typing.Union[MetaOapg.properties.dedicated, bool, schemas.Unset] = schemas.unset, - track: typing.Union[MetaOapg.properties.track, str, schemas.Unset] = schemas.unset, - sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, - lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - html: typing.Union[MetaOapg.properties.html, str, schemas.Unset] = schemas.unset, - htmlWidth: typing.Union[MetaOapg.properties.htmlWidth, str, schemas.Unset] = schemas.unset, - htmlHeight: typing.Union[MetaOapg.properties.htmlHeight, str, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - thumbnailUrl: typing.Union[MetaOapg.properties.thumbnailUrl, str, schemas.Unset] = schemas.unset, - thumbnailWidth: typing.Union[MetaOapg.properties.thumbnailWidth, decimal.Decimal, int, schemas.Unset] = schemas.unset, - thumbnailHeight: typing.Union[MetaOapg.properties.thumbnailHeight, decimal.Decimal, int, schemas.Unset] = schemas.unset, - authorName: typing.Union[MetaOapg.properties.authorName, str, schemas.Unset] = schemas.unset, - authorUrl: typing.Union[MetaOapg.properties.authorUrl, str, schemas.Unset] = schemas.unset, - iconUrl: typing.Union[MetaOapg.properties.iconUrl, str, schemas.Unset] = schemas.unset, - mimeType: typing.Union[MetaOapg.properties.mimeType, str, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MediaAttachment': - return super().__new__( - cls, - *_args, - type=type, - score=score, - revision=revision, - worksheet=worksheet, - dedicated=dedicated, - track=track, - sharingMode=sharingMode, - lockScoreTemplate=lockScoreTemplate, - title=title, - description=description, - html=html, - htmlWidth=htmlWidth, - htmlHeight=htmlHeight, - url=url, - thumbnailUrl=thumbnailUrl, - thumbnailWidth=thumbnailWidth, - thumbnailHeight=thumbnailHeight, - authorName=authorName, - authorUrl=authorUrl, - iconUrl=iconUrl, - mimeType=mimeType, - googleDriveFileId=googleDriveFileId, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'score': 'score', # noqa: E501 + 'revision': 'revision', # noqa: E501 + 'worksheet': 'worksheet', # noqa: E501 + 'dedicated': 'dedicated', # noqa: E501 + 'track': 'track', # noqa: E501 + 'sharing_mode': 'sharingMode', # noqa: E501 + 'lock_score_template': 'lockScoreTemplate', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'html': 'html', # noqa: E501 + 'html_width': 'htmlWidth', # noqa: E501 + 'html_height': 'htmlHeight', # noqa: E501 + 'url': 'url', # noqa: E501 + 'thumbnail_url': 'thumbnailUrl', # noqa: E501 + 'thumbnail_width': 'thumbnailWidth', # noqa: E501 + 'thumbnail_height': 'thumbnailHeight', # noqa: E501 + 'author_name': 'authorName', # noqa: E501 + 'author_url': 'authorUrl', # noqa: E501 + 'icon_url': 'iconUrl', # noqa: E501 + 'mime_type': 'mimeType', # noqa: E501 + 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """MediaAttachment - a model defined in OpenAPI + + Args: + type (str): The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (str): An unique Flat score identifier. [optional] # noqa: E501 + revision (str): An unique revision identifier of a score. [optional] # noqa: E501 + worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 + dedicated (bool): True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment. [optional] # noqa: E501 + track (str): A unique track identifier. [optional] # noqa: E501 + sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 + lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 + title (str): The resolved title of the attachment. [optional] # noqa: E501 + description (str): The resolved description of the attachment. [optional] # noqa: E501 + html (str): If the attachment type is `rich` or `video`, the HTML code of the media to display . [optional] # noqa: E501 + html_width (str): If the `html` is available, the width of the widget. [optional] # noqa: E501 + html_height (str): If the `html` is available, the height of the widget. [optional] # noqa: E501 + url (str): The url of the attachment. [optional] # noqa: E501 + thumbnail_url (str): If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment . [optional] # noqa: E501 + thumbnail_width (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 + thumbnail_height (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 + author_name (str): The resolved author name of the attachment. [optional] # noqa: E501 + author_url (str): The resolved author url of the attachment. [optional] # noqa: E501 + icon_url (str): The URL of the icon. [optional] # noqa: E501 + mime_type (str): The mine type of the file. [optional] # noqa: E501 + google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """MediaAttachment - a model defined in OpenAPI + + Args: + type (str): The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + score (str): An unique Flat score identifier. [optional] # noqa: E501 + revision (str): An unique revision identifier of a score. [optional] # noqa: E501 + worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 + dedicated (bool): True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment. [optional] # noqa: E501 + track (str): A unique track identifier. [optional] # noqa: E501 + sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 + lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 + title (str): The resolved title of the attachment. [optional] # noqa: E501 + description (str): The resolved description of the attachment. [optional] # noqa: E501 + html (str): If the attachment type is `rich` or `video`, the HTML code of the media to display . [optional] # noqa: E501 + html_width (str): If the `html` is available, the width of the widget. [optional] # noqa: E501 + html_height (str): If the `html` is available, the height of the widget. [optional] # noqa: E501 + url (str): The url of the attachment. [optional] # noqa: E501 + thumbnail_url (str): If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment . [optional] # noqa: E501 + thumbnail_width (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 + thumbnail_height (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 + author_name (str): The resolved author name of the attachment. [optional] # noqa: E501 + author_url (str): The resolved author url of the attachment. [optional] # noqa: E501 + icon_url (str): The URL of the icon. [optional] # noqa: E501 + mime_type (str): The mine type of the file. [optional] # noqa: E501 + google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/media_attachment.pyi b/flat_api/model/media_attachment.pyi deleted file mode 100644 index ff2e566..0000000 --- a/flat_api/model/media_attachment.pyi +++ /dev/null @@ -1,340 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class MediaAttachment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Media attachment. The API will automatically resolve the details, oEmbed, -and media available if possible and return them in this object - - """ - - - class MetaOapg: - required = { - "type", - } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def RICH(cls): - return cls("rich") - - @schemas.classproperty - def PHOTO(cls): - return cls("photo") - - @schemas.classproperty - def VIDEO(cls): - return cls("video") - - @schemas.classproperty - def LINK(cls): - return cls("link") - - @schemas.classproperty - def FLAT(cls): - return cls("flat") - - @schemas.classproperty - def GOOGLE_DRIVE(cls): - return cls("googleDrive") - - @schemas.classproperty - def WORKSHEET(cls): - return cls("worksheet") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") - score = schemas.StrSchema - revision = schemas.StrSchema - worksheet = schemas.StrSchema - dedicated = schemas.BoolSchema - track = schemas.StrSchema - - @staticmethod - def sharingMode() -> typing.Type['MediaScoreSharingMode']: - return MediaScoreSharingMode - lockScoreTemplate = schemas.BoolSchema - title = schemas.StrSchema - description = schemas.StrSchema - html = schemas.StrSchema - htmlWidth = schemas.StrSchema - htmlHeight = schemas.StrSchema - url = schemas.StrSchema - thumbnailUrl = schemas.StrSchema - thumbnailWidth = schemas.IntSchema - thumbnailHeight = schemas.IntSchema - authorName = schemas.StrSchema - authorUrl = schemas.StrSchema - iconUrl = schemas.StrSchema - mimeType = schemas.StrSchema - googleDriveFileId = schemas.StrSchema - __annotations__ = { - "type": type, - "score": score, - "revision": revision, - "worksheet": worksheet, - "dedicated": dedicated, - "track": track, - "sharingMode": sharingMode, - "lockScoreTemplate": lockScoreTemplate, - "title": title, - "description": description, - "html": html, - "htmlWidth": htmlWidth, - "htmlHeight": htmlHeight, - "url": url, - "thumbnailUrl": thumbnailUrl, - "thumbnailWidth": thumbnailWidth, - "thumbnailHeight": thumbnailHeight, - "authorName": authorName, - "authorUrl": authorUrl, - "iconUrl": iconUrl, - "mimeType": mimeType, - "googleDriveFileId": googleDriveFileId, - } - - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["worksheet"]) -> MetaOapg.properties.worksheet: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dedicated"]) -> MetaOapg.properties.dedicated: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["track"]) -> MetaOapg.properties.track: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingMode"]) -> 'MediaScoreSharingMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> MetaOapg.properties.lockScoreTemplate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["html"]) -> MetaOapg.properties.html: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlWidth"]) -> MetaOapg.properties.htmlWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlHeight"]) -> MetaOapg.properties.htmlHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailUrl"]) -> MetaOapg.properties.thumbnailUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailWidth"]) -> MetaOapg.properties.thumbnailWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["thumbnailHeight"]) -> MetaOapg.properties.thumbnailHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["authorName"]) -> MetaOapg.properties.authorName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["authorUrl"]) -> MetaOapg.properties.authorUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["iconUrl"]) -> MetaOapg.properties.iconUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mimeType"]) -> MetaOapg.properties.mimeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["worksheet"]) -> typing.Union[MetaOapg.properties.worksheet, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dedicated"]) -> typing.Union[MetaOapg.properties.dedicated, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["track"]) -> typing.Union[MetaOapg.properties.track, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingMode"]) -> typing.Union['MediaScoreSharingMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lockScoreTemplate"]) -> typing.Union[MetaOapg.properties.lockScoreTemplate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["html"]) -> typing.Union[MetaOapg.properties.html, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlWidth"]) -> typing.Union[MetaOapg.properties.htmlWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlHeight"]) -> typing.Union[MetaOapg.properties.htmlHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailUrl"]) -> typing.Union[MetaOapg.properties.thumbnailUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailWidth"]) -> typing.Union[MetaOapg.properties.thumbnailWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["thumbnailHeight"]) -> typing.Union[MetaOapg.properties.thumbnailHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["authorName"]) -> typing.Union[MetaOapg.properties.authorName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["authorUrl"]) -> typing.Union[MetaOapg.properties.authorUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["iconUrl"]) -> typing.Union[MetaOapg.properties.iconUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mimeType"]) -> typing.Union[MetaOapg.properties.mimeType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, ], - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - worksheet: typing.Union[MetaOapg.properties.worksheet, str, schemas.Unset] = schemas.unset, - dedicated: typing.Union[MetaOapg.properties.dedicated, bool, schemas.Unset] = schemas.unset, - track: typing.Union[MetaOapg.properties.track, str, schemas.Unset] = schemas.unset, - sharingMode: typing.Union['MediaScoreSharingMode', schemas.Unset] = schemas.unset, - lockScoreTemplate: typing.Union[MetaOapg.properties.lockScoreTemplate, bool, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - html: typing.Union[MetaOapg.properties.html, str, schemas.Unset] = schemas.unset, - htmlWidth: typing.Union[MetaOapg.properties.htmlWidth, str, schemas.Unset] = schemas.unset, - htmlHeight: typing.Union[MetaOapg.properties.htmlHeight, str, schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - thumbnailUrl: typing.Union[MetaOapg.properties.thumbnailUrl, str, schemas.Unset] = schemas.unset, - thumbnailWidth: typing.Union[MetaOapg.properties.thumbnailWidth, decimal.Decimal, int, schemas.Unset] = schemas.unset, - thumbnailHeight: typing.Union[MetaOapg.properties.thumbnailHeight, decimal.Decimal, int, schemas.Unset] = schemas.unset, - authorName: typing.Union[MetaOapg.properties.authorName, str, schemas.Unset] = schemas.unset, - authorUrl: typing.Union[MetaOapg.properties.authorUrl, str, schemas.Unset] = schemas.unset, - iconUrl: typing.Union[MetaOapg.properties.iconUrl, str, schemas.Unset] = schemas.unset, - mimeType: typing.Union[MetaOapg.properties.mimeType, str, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MediaAttachment': - return super().__new__( - cls, - *_args, - type=type, - score=score, - revision=revision, - worksheet=worksheet, - dedicated=dedicated, - track=track, - sharingMode=sharingMode, - lockScoreTemplate=lockScoreTemplate, - title=title, - description=description, - html=html, - htmlWidth=htmlWidth, - htmlHeight=htmlHeight, - url=url, - thumbnailUrl=thumbnailUrl, - thumbnailWidth=thumbnailWidth, - thumbnailHeight=thumbnailHeight, - authorName=authorName, - authorUrl=authorUrl, - iconUrl=iconUrl, - mimeType=mimeType, - googleDriveFileId=googleDriveFileId, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode diff --git a/flat_api/model/media_score_sharing_mode.py b/flat_api/model/media_score_sharing_mode.py index 16ff813..5c44482 100644 --- a/flat_api/model/media_score_sharing_mode.py +++ b/flat_api/model/media_score_sharing_mode.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,53 +8,278 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class MediaScoreSharingMode( - schemas.EnumBase, - schemas.StrSchema -): +class MediaScoreSharingMode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The sharing mode of the score for classes post and assignments + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'READ': "read", + 'WRITE': "write", + 'COPY': "copy", + 'PERFORMANCE': "performance", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "read": "READ", - "write": "WRITE", - "copy": "COPY", - "performance": "PERFORMANCE", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def READ(cls): - return cls("read") - - @schemas.classproperty - def WRITE(cls): - return cls("write") - - @schemas.classproperty - def COPY(cls): - return cls("copy") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """MediaScoreSharingMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 + + Keyword Args: + value (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "read" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """MediaScoreSharingMode - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 + + Keyword Args: + value (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "read" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/media_score_sharing_mode.pyi b/flat_api/model/media_score_sharing_mode.pyi deleted file mode 100644 index 38db927..0000000 --- a/flat_api/model/media_score_sharing_mode.pyi +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class MediaScoreSharingMode( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The sharing mode of the score for classes post and assignments - """ - - @schemas.classproperty - def READ(cls): - return cls("read") - - @schemas.classproperty - def WRITE(cls): - return cls("write") - - @schemas.classproperty - def COPY(cls): - return cls("copy") - - @schemas.classproperty - def PERFORMANCE(cls): - return cls("performance") diff --git a/flat_api/model/microsoft_graph_assignment.py b/flat_api/model/microsoft_graph_assignment.py index 4080306..2e7f5da 100644 --- a/flat_api/model/microsoft_graph_assignment.py +++ b/flat_api/model/microsoft_graph_assignment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,124 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class MicrosoftGraphAssignment( - schemas.DictSchema -): +class MicrosoftGraphAssignment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A Microsoft Teams asignment + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + 'categories': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + 'categories': 'categories', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MicrosoftGraphAssignment - a model defined in OpenAPI - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - - - class categories( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'categories': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the assignement assigned by Microsoft Teams. [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + alternate_link (str): Absolute link to this assignement in the Microsoft Teams web UI. [optional] # noqa: E501 + categories ([str]): List of categories where this assignment is published under. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - "categories": categories, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - categories: typing.Union[MetaOapg.properties.categories, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MicrosoftGraphAssignment': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - categories=categories, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """MicrosoftGraphAssignment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the assignement assigned by Microsoft Teams. [optional] # noqa: E501 + state (str): State of the assignment. [optional] # noqa: E501 + alternate_link (str): Absolute link to this assignement in the Microsoft Teams web UI. [optional] # noqa: E501 + categories ([str]): List of categories where this assignment is published under. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/microsoft_graph_assignment.pyi b/flat_api/model/microsoft_graph_assignment.pyi deleted file mode 100644 index 4080306..0000000 --- a/flat_api/model/microsoft_graph_assignment.pyi +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class MicrosoftGraphAssignment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A Microsoft Teams asignment - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - - - class categories( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'categories': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - "categories": categories, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["categories"]) -> MetaOapg.properties.categories: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["categories"]) -> typing.Union[MetaOapg.properties.categories, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", "categories", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - categories: typing.Union[MetaOapg.properties.categories, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MicrosoftGraphAssignment': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - categories=categories, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/microsoft_graph_submission.py b/flat_api/model/microsoft_graph_submission.py index 4864dcb..b038ebf 100644 --- a/flat_api/model/microsoft_graph_submission.py +++ b/flat_api/model/microsoft_graph_submission.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,92 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class MicrosoftGraphSubmission( - schemas.DictSchema -): +class MicrosoftGraphSubmission(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A Microsoft Teams submission + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'alternate_link': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'state': 'state', # noqa: E501 + 'alternate_link': 'alternateLink', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MicrosoftGraphSubmission - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the submission assigned by Microsoft Teams. [optional] # noqa: E501 + state (str): State of the submission. [optional] # noqa: E501 + alternate_link (str): Absolute link to this submission in the Microsoft Teams web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """MicrosoftGraphSubmission - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the submission assigned by Microsoft Teams. [optional] # noqa: E501 + state (str): State of the submission. [optional] # noqa: E501 + alternate_link (str): Absolute link to this submission in the Microsoft Teams web UI. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MicrosoftGraphSubmission': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/microsoft_graph_submission.pyi b/flat_api/model/microsoft_graph_submission.pyi deleted file mode 100644 index 4864dcb..0000000 --- a/flat_api/model/microsoft_graph_submission.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class MicrosoftGraphSubmission( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A Microsoft Teams submission - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - state = schemas.StrSchema - alternateLink = schemas.StrSchema - __annotations__ = { - "id": id, - "state": state, - "alternateLink": alternateLink, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alternateLink"]) -> MetaOapg.properties.alternateLink: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alternateLink"]) -> typing.Union[MetaOapg.properties.alternateLink, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "state", "alternateLink", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - alternateLink: typing.Union[MetaOapg.properties.alternateLink, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MicrosoftGraphSubmission': - return super().__new__( - cls, - *_args, - id=id, - state=state, - alternateLink=alternateLink, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/organization_invitation.py b/flat_api/model/organization_invitation.py index c425cd3..5d5c7e1 100644 --- a/flat_api/model/organization_invitation.py +++ b/flat_api/model/organization_invitation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,137 +8,287 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.organization_roles import OrganizationRoles + globals()['OrganizationRoles'] = OrganizationRoles -class OrganizationInvitation( - schemas.DictSchema -): + +class OrganizationInvitation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Details of an invitation to join an organization + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'custom_code': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'invited_by': (str,), # noqa: E501 + 'used_by': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'custom_code': 'customCode', # noqa: E501 + 'email': 'email', # noqa: E501 + 'invited_by': 'invitedBy', # noqa: E501 + 'used_by': 'usedBy', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OrganizationInvitation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The invitation unique identifier. [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + custom_code (str): Enrollment code to use when joining this organization. [optional] # noqa: E501 + email (str): The email address this invitation was sent to. [optional] # noqa: E501 + invited_by (str): The unique identifier of the User who created this invitation. [optional] # noqa: E501 + used_by (str): The unique identifier of the User who used this invitation. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OrganizationInvitation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The invitation unique identifier. [optional] # noqa: E501 + organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + custom_code (str): Enrollment code to use when joining this organization. [optional] # noqa: E501 + email (str): The email address this invitation was sent to. [optional] # noqa: E501 + invited_by (str): The unique identifier of the User who created this invitation. [optional] # noqa: E501 + used_by (str): The unique identifier of the User who used this invitation. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - customCode = schemas.StrSchema - email = schemas.StrSchema - invitedBy = schemas.StrSchema - usedBy = schemas.StrSchema - __annotations__ = { - "id": id, - "organization": organization, - "organizationRole": organizationRole, - "customCode": customCode, - "email": email, - "invitedBy": invitedBy, - "usedBy": usedBy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["customCode"]) -> MetaOapg.properties.customCode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invitedBy"]) -> MetaOapg.properties.invitedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usedBy"]) -> MetaOapg.properties.usedBy: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["customCode"]) -> typing.Union[MetaOapg.properties.customCode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invitedBy"]) -> typing.Union[MetaOapg.properties.invitedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usedBy"]) -> typing.Union[MetaOapg.properties.usedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - customCode: typing.Union[MetaOapg.properties.customCode, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - invitedBy: typing.Union[MetaOapg.properties.invitedBy, str, schemas.Unset] = schemas.unset, - usedBy: typing.Union[MetaOapg.properties.usedBy, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationInvitation': - return super().__new__( - cls, - *_args, - id=id, - organization=organization, - organizationRole=organizationRole, - customCode=customCode, - email=email, - invitedBy=invitedBy, - usedBy=usedBy, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/organization_invitation.pyi b/flat_api/model/organization_invitation.pyi deleted file mode 100644 index c425cd3..0000000 --- a/flat_api/model/organization_invitation.pyi +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class OrganizationInvitation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Details of an invitation to join an organization - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - customCode = schemas.StrSchema - email = schemas.StrSchema - invitedBy = schemas.StrSchema - usedBy = schemas.StrSchema - __annotations__ = { - "id": id, - "organization": organization, - "organizationRole": organizationRole, - "customCode": customCode, - "email": email, - "invitedBy": invitedBy, - "usedBy": usedBy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["customCode"]) -> MetaOapg.properties.customCode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invitedBy"]) -> MetaOapg.properties.invitedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["usedBy"]) -> MetaOapg.properties.usedBy: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["customCode"]) -> typing.Union[MetaOapg.properties.customCode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invitedBy"]) -> typing.Union[MetaOapg.properties.invitedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["usedBy"]) -> typing.Union[MetaOapg.properties.usedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "organization", "organizationRole", "customCode", "email", "invitedBy", "usedBy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - customCode: typing.Union[MetaOapg.properties.customCode, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - invitedBy: typing.Union[MetaOapg.properties.invitedBy, str, schemas.Unset] = schemas.unset, - usedBy: typing.Union[MetaOapg.properties.usedBy, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationInvitation': - return super().__new__( - cls, - *_args, - id=id, - organization=organization, - organizationRole=organizationRole, - customCode=customCode, - email=email, - invitedBy=invitedBy, - usedBy=usedBy, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_invitation_creation.py b/flat_api/model/organization_invitation_creation.py index c7f1d0d..e262726 100644 --- a/flat_api/model/organization_invitation_creation.py +++ b/flat_api/model/organization_invitation_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,87 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.organization_roles import OrganizationRoles + globals()['OrganizationRoles'] = OrganizationRoles -class OrganizationInvitationCreation( - schemas.DictSchema -): + +class OrganizationInvitationCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The parameters to create an organization invitation + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'email': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OrganizationInvitationCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): The email address you want to send the invitation to. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OrganizationInvitationCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): The email address you want to send the invitation to. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - email = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - __annotations__ = { - "email": email, - "organizationRole": organizationRole, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationInvitationCreation': - return super().__new__( - cls, - *_args, - email=email, - organizationRole=organizationRole, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/organization_invitation_creation.pyi b/flat_api/model/organization_invitation_creation.pyi deleted file mode 100644 index c7f1d0d..0000000 --- a/flat_api/model/organization_invitation_creation.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class OrganizationInvitationCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The parameters to create an organization invitation - """ - - - class MetaOapg: - - class properties: - email = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - __annotations__ = { - "email": email, - "organizationRole": organizationRole, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", "organizationRole", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationInvitationCreation': - return super().__new__( - cls, - *_args, - email=email, - organizationRole=organizationRole, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/organization_roles.py b/flat_api/model/organization_roles.py index 7894dcf..3d0c34f 100644 --- a/flat_api/model/organization_roles.py +++ b/flat_api/model/organization_roles.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,53 +8,286 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class OrganizationRoles( - schemas.EnumBase, - schemas.StrSchema -): +class OrganizationRoles(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - User's Organization Role (for Edu users only) + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ADMIN': "admin", + 'BILLING': "billing", + 'TEACHER': "teacher", + 'USER': "user", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "admin": "ADMIN", - "billing": "BILLING", - "teacher": "TEACHER", - "user": "USER", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - @schemas.classproperty - def BILLING(cls): - return cls("billing") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def USER(cls): - return cls("user") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """OrganizationRoles - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 + + Keyword Args: + value (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """OrganizationRoles - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 + + Keyword Args: + value (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/organization_roles.pyi b/flat_api/model/organization_roles.pyi deleted file mode 100644 index 592b3d3..0000000 --- a/flat_api/model/organization_roles.pyi +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class OrganizationRoles( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - User's Organization Role (for Edu users only) - """ - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - @schemas.classproperty - def BILLING(cls): - return cls("billing") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def USER(cls): - return cls("user") diff --git a/flat_api/model/organization_user_access_token_creation.py b/flat_api/model/organization_user_access_token_creation.py index 066b648..aecd6cf 100644 --- a/flat_api/model/organization_user_access_token_creation.py +++ b/flat_api/model/organization_user_access_token_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,104 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.app_scopes import AppScopes + globals()['AppScopes'] = AppScopes -class OrganizationUserAccessTokenCreation( - schemas.DictSchema -): + +class OrganizationUserAccessTokenCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a delegated API access token for an organization user + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } - class MetaOapg: - required = { - "scopes", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'scopes': ([AppScopes],), # noqa: E501 } - - class properties: - - - class scopes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AppScopes']: - return AppScopes - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scopes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'scopes': 'scopes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, scopes, *args, **kwargs): # noqa: E501 + """OrganizationUserAccessTokenCreation - a model defined in OpenAPI + + Args: + scopes ([AppScopes]): List of requested scopes for this credential + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.scopes = scopes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, scopes, *args, **kwargs): # noqa: E501 + """OrganizationUserAccessTokenCreation - a model defined in OpenAPI + + Args: + scopes ([AppScopes]): List of requested scopes for this credential + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'AppScopes': - return super().__getitem__(i) - __annotations__ = { - "scopes": scopes, - } - - scopes: MetaOapg.properties.scopes - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationUserAccessTokenCreation': - return super().__new__( - cls, - *_args, - scopes=scopes, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.app_scopes import AppScopes + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.scopes = scopes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/organization_user_access_token_creation.pyi b/flat_api/model/organization_user_access_token_creation.pyi deleted file mode 100644 index 066b648..0000000 --- a/flat_api/model/organization_user_access_token_creation.pyi +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class OrganizationUserAccessTokenCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a delegated API access token for an organization user - """ - - - class MetaOapg: - required = { - "scopes", - } - - class properties: - - - class scopes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AppScopes']: - return AppScopes - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AppScopes'], typing.List['AppScopes']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'scopes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AppScopes': - return super().__getitem__(i) - __annotations__ = { - "scopes": scopes, - } - - scopes: MetaOapg.properties.scopes - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scopes"]) -> MetaOapg.properties.scopes: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scopes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - scopes: typing.Union[MetaOapg.properties.scopes, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OrganizationUserAccessTokenCreation': - return super().__new__( - cls, - *_args, - scopes=scopes, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.app_scopes import AppScopes diff --git a/flat_api/model/resource_collaborator.py b/flat_api/model/resource_collaborator.py index 0b8e1e7..2e96eab 100644 --- a/flat_api/model/resource_collaborator.py +++ b/flat_api/model/resource_collaborator.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,179 +8,305 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.group import Group + from flat_api.model.user_public import UserPublic + globals()['Group'] = Group + globals()['UserPublic'] = UserPublic -class ResourceCollaborator( - schemas.DictSchema -): + +class ResourceCollaborator(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'acl_read': (bool,), # noqa: E501 + 'acl_write': (bool,), # noqa: E501 + 'acl_admin': (bool,), # noqa: E501 + 'is_collaborator': (bool,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'collection': (str,), # noqa: E501 + 'user': (UserPublic,), # noqa: E501 + 'group': (Group,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + 'invited': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'acl_read': 'aclRead', # noqa: E501 + 'acl_write': 'aclWrite', # noqa: E501 + 'acl_admin': 'aclAdmin', # noqa: E501 + 'is_collaborator': 'isCollaborator', # noqa: E501 + 'id': 'id', # noqa: E501 + 'score': 'score', # noqa: E501 + 'collection': 'collection', # noqa: E501 + 'user': 'user', # noqa: E501 + 'group': 'group', # noqa: E501 + 'user_email': 'userEmail', # noqa: E501 + 'invited': 'invited', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ResourceCollaborator - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 + id (str): The unique identifier of the permission. [optional] # noqa: E501 + score (str): If this object is a permission of a score, this property will contain the unique identifier of the score. [optional] # noqa: E501 + collection (str): If this object is a permission of a collection, this property will contain the unique identifier of the collection. [optional] # noqa: E501 + user (UserPublic): [optional] # noqa: E501 + group (Group): [optional] # noqa: E501 + user_email (str): If the collaborator is not a user of Flat yet, this field will contain their email. . [optional] # noqa: E501 + invited (bool): If this property is `true`, this is still a pending invitation . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ResourceCollaborator - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 + id (str): The unique identifier of the permission. [optional] # noqa: E501 + score (str): If this object is a permission of a score, this property will contain the unique identifier of the score. [optional] # noqa: E501 + collection (str): If this object is a permission of a collection, this property will contain the unique identifier of the collection. [optional] # noqa: E501 + user (UserPublic): [optional] # noqa: E501 + group (Group): [optional] # noqa: E501 + user_email (str): If the collaborator is not a user of Flat yet, this field will contain their email. . [optional] # noqa: E501 + invited (bool): If this property is `true`, this is still a pending invitation . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - isCollaborator = schemas.BoolSchema - id = schemas.StrSchema - score = schemas.StrSchema - collection = schemas.StrSchema - - @staticmethod - def user() -> typing.Type['UserPublic']: - return UserPublic - - @staticmethod - def group() -> typing.Type['Group']: - return Group - userEmail = schemas.StrSchema - invited = schemas.BoolSchema - __annotations__ = { - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - "isCollaborator": isCollaborator, - "id": id, - "score": score, - "collection": collection, - "user": user, - "group": group, - "userEmail": userEmail, - "invited": invited, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublic': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> 'Group': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invited"]) -> MetaOapg.properties.invited: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublic', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union['Group', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invited"]) -> typing.Union[MetaOapg.properties.invited, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, - user: typing.Union['UserPublic', schemas.Unset] = schemas.unset, - group: typing.Union['Group', schemas.Unset] = schemas.unset, - userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, - invited: typing.Union[MetaOapg.properties.invited, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceCollaborator': - return super().__new__( - cls, - *_args, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - isCollaborator=isCollaborator, - id=id, - score=score, - collection=collection, - user=user, - group=group, - userEmail=userEmail, - invited=invited, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.group import Group -from flat_api.model.user_public import UserPublic + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/resource_collaborator.pyi b/flat_api/model/resource_collaborator.pyi deleted file mode 100644 index 0b8e1e7..0000000 --- a/flat_api/model/resource_collaborator.pyi +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ResourceCollaborator( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - isCollaborator = schemas.BoolSchema - id = schemas.StrSchema - score = schemas.StrSchema - collection = schemas.StrSchema - - @staticmethod - def user() -> typing.Type['UserPublic']: - return UserPublic - - @staticmethod - def group() -> typing.Type['Group']: - return Group - userEmail = schemas.StrSchema - invited = schemas.BoolSchema - __annotations__ = { - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - "isCollaborator": isCollaborator, - "id": id, - "score": score, - "collection": collection, - "user": user, - "group": group, - "userEmail": userEmail, - "invited": invited, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublic': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> 'Group': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invited"]) -> MetaOapg.properties.invited: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublic', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union['Group', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invited"]) -> typing.Union[MetaOapg.properties.invited, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "id", "score", "collection", "user", "group", "userEmail", "invited", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, - user: typing.Union['UserPublic', schemas.Unset] = schemas.unset, - group: typing.Union['Group', schemas.Unset] = schemas.unset, - userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, - invited: typing.Union[MetaOapg.properties.invited, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceCollaborator': - return super().__new__( - cls, - *_args, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - isCollaborator=isCollaborator, - id=id, - score=score, - collection=collection, - user=user, - group=group, - userEmail=userEmail, - invited=invited, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.group import Group -from flat_api.model.user_public import UserPublic diff --git a/flat_api/model/resource_collaborator_creation.py b/flat_api/model/resource_collaborator_creation.py index 054b8cd..f0b0829 100644 --- a/flat_api/model/resource_collaborator_creation.py +++ b/flat_api/model/resource_collaborator_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,132 +8,281 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ResourceCollaboratorCreation( - schemas.DictSchema -): +class ResourceCollaboratorCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Add a collaborator to a resource. + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'user': (str,), # noqa: E501 + 'group': (str,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + 'user_token': (str,), # noqa: E501 + 'acl_read': (bool,), # noqa: E501 + 'acl_write': (bool,), # noqa: E501 + 'acl_admin': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'user': 'user', # noqa: E501 + 'group': 'group', # noqa: E501 + 'user_email': 'userEmail', # noqa: E501 + 'user_token': 'userToken', # noqa: E501 + 'acl_read': 'aclRead', # noqa: E501 + 'acl_write': 'aclWrite', # noqa: E501 + 'acl_admin': 'aclAdmin', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ResourceCollaboratorCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user (str): The unique identifier of a Flat user. [optional] # noqa: E501 + group (str): The unique identifier of a Flat group. [optional] # noqa: E501 + user_email (str): Fill this field to invite an individual user by email. . [optional] # noqa: E501 + user_token (str): Token received in an invitation to join the score. . [optional] # noqa: E501 + acl_read (bool): `True` if the related user can read the score. (probably true if the user has a permission on the document). . [optional] if omitted the server will use the default value of True # noqa: E501 + acl_write (bool): `True` if the related user can modify the score. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document . [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ResourceCollaboratorCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user (str): The unique identifier of a Flat user. [optional] # noqa: E501 + group (str): The unique identifier of a Flat group. [optional] # noqa: E501 + user_email (str): Fill this field to invite an individual user by email. . [optional] # noqa: E501 + user_token (str): Token received in an invitation to join the score. . [optional] # noqa: E501 + acl_read (bool): `True` if the related user can read the score. (probably true if the user has a permission on the document). . [optional] if omitted the server will use the default value of True # noqa: E501 + acl_write (bool): `True` if the related user can modify the score. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document . [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - user = schemas.StrSchema - group = schemas.StrSchema - userEmail = schemas.StrSchema - userToken = schemas.StrSchema - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - __annotations__ = { - "user": user, - "group": group, - "userEmail": userEmail, - "userToken": userToken, - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userToken"]) -> MetaOapg.properties.userToken: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union[MetaOapg.properties.group, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userToken"]) -> typing.Union[MetaOapg.properties.userToken, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - group: typing.Union[MetaOapg.properties.group, str, schemas.Unset] = schemas.unset, - userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, - userToken: typing.Union[MetaOapg.properties.userToken, str, schemas.Unset] = schemas.unset, - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceCollaboratorCreation': - return super().__new__( - cls, - *_args, - user=user, - group=group, - userEmail=userEmail, - userToken=userToken, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/resource_collaborator_creation.pyi b/flat_api/model/resource_collaborator_creation.pyi deleted file mode 100644 index 054b8cd..0000000 --- a/flat_api/model/resource_collaborator_creation.pyi +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ResourceCollaboratorCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Add a collaborator to a resource. - """ - - - class MetaOapg: - - class properties: - user = schemas.StrSchema - group = schemas.StrSchema - userEmail = schemas.StrSchema - userToken = schemas.StrSchema - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - __annotations__ = { - "user": user, - "group": group, - "userEmail": userEmail, - "userToken": userToken, - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userEmail"]) -> MetaOapg.properties.userEmail: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userToken"]) -> MetaOapg.properties.userToken: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> typing.Union[MetaOapg.properties.group, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userEmail"]) -> typing.Union[MetaOapg.properties.userEmail, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userToken"]) -> typing.Union[MetaOapg.properties.userToken, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - group: typing.Union[MetaOapg.properties.group, str, schemas.Unset] = schemas.unset, - userEmail: typing.Union[MetaOapg.properties.userEmail, str, schemas.Unset] = schemas.unset, - userToken: typing.Union[MetaOapg.properties.userToken, str, schemas.Unset] = schemas.unset, - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceCollaboratorCreation': - return super().__new__( - cls, - *_args, - user=user, - group=group, - userEmail=userEmail, - userToken=userToken, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/resource_rights.py b/flat_api/model/resource_rights.py index ca535c5..e2c06db 100644 --- a/flat_api/model/resource_rights.py +++ b/flat_api/model/resource_rights.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,102 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ResourceRights( - schemas.DictSchema -): +class ResourceRights(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The rights of the current user on a score or collection + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'acl_read': (bool,), # noqa: E501 + 'acl_write': (bool,), # noqa: E501 + 'acl_admin': (bool,), # noqa: E501 + 'is_collaborator': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'acl_read': 'aclRead', # noqa: E501 + 'acl_write': 'aclWrite', # noqa: E501 + 'acl_admin': 'aclAdmin', # noqa: E501 + 'is_collaborator': 'isCollaborator', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ResourceRights - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ResourceRights - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 + is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - isCollaborator = schemas.BoolSchema - __annotations__ = { - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - "isCollaborator": isCollaborator, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceRights': - return super().__new__( - cls, - *_args, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - isCollaborator=isCollaborator, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/resource_rights.pyi b/flat_api/model/resource_rights.pyi deleted file mode 100644 index ca535c5..0000000 --- a/flat_api/model/resource_rights.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ResourceRights( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The rights of the current user on a score or collection - """ - - - class MetaOapg: - - class properties: - aclRead = schemas.BoolSchema - aclWrite = schemas.BoolSchema - aclAdmin = schemas.BoolSchema - isCollaborator = schemas.BoolSchema - __annotations__ = { - "aclRead": aclRead, - "aclWrite": aclWrite, - "aclAdmin": aclAdmin, - "isCollaborator": isCollaborator, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclRead"]) -> MetaOapg.properties.aclRead: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclWrite"]) -> MetaOapg.properties.aclWrite: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aclAdmin"]) -> MetaOapg.properties.aclAdmin: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isCollaborator"]) -> MetaOapg.properties.isCollaborator: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclRead"]) -> typing.Union[MetaOapg.properties.aclRead, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclWrite"]) -> typing.Union[MetaOapg.properties.aclWrite, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aclAdmin"]) -> typing.Union[MetaOapg.properties.aclAdmin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isCollaborator"]) -> typing.Union[MetaOapg.properties.isCollaborator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aclRead", "aclWrite", "aclAdmin", "isCollaborator", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - aclRead: typing.Union[MetaOapg.properties.aclRead, bool, schemas.Unset] = schemas.unset, - aclWrite: typing.Union[MetaOapg.properties.aclWrite, bool, schemas.Unset] = schemas.unset, - aclAdmin: typing.Union[MetaOapg.properties.aclAdmin, bool, schemas.Unset] = schemas.unset, - isCollaborator: typing.Union[MetaOapg.properties.isCollaborator, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResourceRights': - return super().__new__( - cls, - *_args, - aclRead=aclRead, - aclWrite=aclWrite, - aclAdmin=aclAdmin, - isCollaborator=isCollaborator, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_comment.py b/flat_api/model/score_comment.py index b9e9568..6a32c33 100644 --- a/flat_api/model/score_comment.py +++ b/flat_api/model/score_comment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,348 +8,329 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_comment_context import ScoreCommentContext + from flat_api.model.score_comment_moderation import ScoreCommentModeration + globals()['ScoreCommentContext'] = ScoreCommentContext + globals()['ScoreCommentModeration'] = ScoreCommentModeration -class ScoreComment( - schemas.DictSchema -): + +class ScoreComment(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Comment added on a sheet music + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'DOCUMENT': "document", + 'INLINE': "inline", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'user': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'revision': (str,), # noqa: E501 + 'reply_to': (str,), # noqa: E501 + 'date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'comment': (str,), # noqa: E501 + 'raw_comment': (str,), # noqa: E501 + 'context': (ScoreCommentContext,), # noqa: E501 + 'mentions': ([str],), # noqa: E501 + 'resolved': (bool,), # noqa: E501 + 'resolved_by': (str,), # noqa: E501 + 'moderation': (ScoreCommentModeration,), # noqa: E501 + 'spam': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'user': 'user', # noqa: E501 + 'score': 'score', # noqa: E501 + 'revision': 'revision', # noqa: E501 + 'reply_to': 'replyTo', # noqa: E501 + 'date': 'date', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'comment': 'comment', # noqa: E501 + 'raw_comment': 'rawComment', # noqa: E501 + 'context': 'context', # noqa: E501 + 'mentions': 'mentions', # noqa: E501 + 'resolved': 'resolved', # noqa: E501 + 'resolved_by': 'resolvedBy', # noqa: E501 + 'moderation': 'moderation', # noqa: E501 + 'spam': 'spam', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "document": "DOCUMENT", - "inline": "INLINE", - } - - @schemas.classproperty - def DOCUMENT(cls): - return cls("document") - - @schemas.classproperty - def INLINE(cls): - return cls("inline") - user = schemas.StrSchema - score = schemas.StrSchema - revision = schemas.StrSchema - replyTo = schemas.StrSchema - date = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - comment = schemas.StrSchema - rawComment = schemas.StrSchema - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - - - class mentions( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'mentions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreComment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The comment unique identifier. [optional] # noqa: E501 + type (str): The type of the comment. [optional] # noqa: E501 + user (str): The author unique identifier. [optional] # noqa: E501 + score (str): The unique identifier of the score where the comment was posted. [optional] # noqa: E501 + revision (str): The unique identifier of revision the comment was posted. [optional] # noqa: E501 + reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 + date (datetime): The date when the comment was posted. [optional] # noqa: E501 + modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without parsing the mentions. . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + mentions ([str]): The list of user identifier mentioned on the score. [optional] # noqa: E501 + resolved (bool): For inline comments, the comment can be marked as resolved and will be hidden in the future responses . [optional] # noqa: E501 + resolved_by (str): If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved . [optional] # noqa: E501 + moderation (ScoreCommentModeration): [optional] # noqa: E501 + spam (bool): `true if the message has been detected as spam and hidden from other users . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - resolved = schemas.BoolSchema - resolvedBy = schemas.StrSchema - - - class moderation( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - hidden = schemas.BoolSchema - - - class reason( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "spam": "SPAM", - "inappropriate": "INAPPROPRIATE", - } - - @schemas.classproperty - def SPAM(cls): - return cls("spam") - - @schemas.classproperty - def INAPPROPRIATE(cls): - return cls("inappropriate") - __annotations__ = { - "hidden": hidden, - "reason": reason, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hidden"]) -> MetaOapg.properties.hidden: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hidden"]) -> typing.Union[MetaOapg.properties.hidden, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - hidden: typing.Union[MetaOapg.properties.hidden, bool, schemas.Unset] = schemas.unset, - reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'moderation': - return super().__new__( - cls, - *_args, - hidden=hidden, - reason=reason, - _configuration=_configuration, - **kwargs, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreComment - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The comment unique identifier. [optional] # noqa: E501 + type (str): The type of the comment. [optional] # noqa: E501 + user (str): The author unique identifier. [optional] # noqa: E501 + score (str): The unique identifier of the score where the comment was posted. [optional] # noqa: E501 + revision (str): The unique identifier of revision the comment was posted. [optional] # noqa: E501 + reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 + date (datetime): The date when the comment was posted. [optional] # noqa: E501 + modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without parsing the mentions. . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + mentions ([str]): The list of user identifier mentioned on the score. [optional] # noqa: E501 + resolved (bool): For inline comments, the comment can be marked as resolved and will be hidden in the future responses . [optional] # noqa: E501 + resolved_by (str): If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved . [optional] # noqa: E501 + moderation (ScoreCommentModeration): [optional] # noqa: E501 + spam (bool): `true if the message has been detected as spam and hidden from other users . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - spam = schemas.BoolSchema - __annotations__ = { - "id": id, - "type": type, - "user": user, - "score": score, - "revision": revision, - "replyTo": replyTo, - "date": date, - "modificationDate": modificationDate, - "comment": comment, - "rawComment": rawComment, - "context": context, - "mentions": mentions, - "resolved": resolved, - "resolvedBy": resolvedBy, - "moderation": moderation, - "spam": spam, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resolved"]) -> MetaOapg.properties.resolved: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resolvedBy"]) -> MetaOapg.properties.resolvedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["moderation"]) -> MetaOapg.properties.moderation: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["spam"]) -> MetaOapg.properties.spam: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resolved"]) -> typing.Union[MetaOapg.properties.resolved, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resolvedBy"]) -> typing.Union[MetaOapg.properties.resolvedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["moderation"]) -> typing.Union[MetaOapg.properties.moderation, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["spam"]) -> typing.Union[MetaOapg.properties.spam, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, - resolved: typing.Union[MetaOapg.properties.resolved, bool, schemas.Unset] = schemas.unset, - resolvedBy: typing.Union[MetaOapg.properties.resolvedBy, str, schemas.Unset] = schemas.unset, - moderation: typing.Union[MetaOapg.properties.moderation, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - spam: typing.Union[MetaOapg.properties.spam, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreComment': - return super().__new__( - cls, - *_args, - id=id, - type=type, - user=user, - score=score, - revision=revision, - replyTo=replyTo, - date=date, - modificationDate=modificationDate, - comment=comment, - rawComment=rawComment, - context=context, - mentions=mentions, - resolved=resolved, - resolvedBy=resolvedBy, - moderation=moderation, - spam=spam, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comment.pyi b/flat_api/model/score_comment.pyi deleted file mode 100644 index 9bb31ff..0000000 --- a/flat_api/model/score_comment.pyi +++ /dev/null @@ -1,343 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreComment( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Comment added on a sheet music - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def DOCUMENT(cls): - return cls("document") - - @schemas.classproperty - def INLINE(cls): - return cls("inline") - user = schemas.StrSchema - score = schemas.StrSchema - revision = schemas.StrSchema - replyTo = schemas.StrSchema - date = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - comment = schemas.StrSchema - rawComment = schemas.StrSchema - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - - - class mentions( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'mentions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - resolved = schemas.BoolSchema - resolvedBy = schemas.StrSchema - - - class moderation( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - hidden = schemas.BoolSchema - - - class reason( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def SPAM(cls): - return cls("spam") - - @schemas.classproperty - def INAPPROPRIATE(cls): - return cls("inappropriate") - __annotations__ = { - "hidden": hidden, - "reason": reason, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hidden"]) -> MetaOapg.properties.hidden: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hidden"]) -> typing.Union[MetaOapg.properties.hidden, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hidden", "reason", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - hidden: typing.Union[MetaOapg.properties.hidden, bool, schemas.Unset] = schemas.unset, - reason: typing.Union[MetaOapg.properties.reason, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'moderation': - return super().__new__( - cls, - *_args, - hidden=hidden, - reason=reason, - _configuration=_configuration, - **kwargs, - ) - spam = schemas.BoolSchema - __annotations__ = { - "id": id, - "type": type, - "user": user, - "score": score, - "revision": revision, - "replyTo": replyTo, - "date": date, - "modificationDate": modificationDate, - "comment": comment, - "rawComment": rawComment, - "context": context, - "mentions": mentions, - "resolved": resolved, - "resolvedBy": resolvedBy, - "moderation": moderation, - "spam": spam, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resolved"]) -> MetaOapg.properties.resolved: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resolvedBy"]) -> MetaOapg.properties.resolvedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["moderation"]) -> MetaOapg.properties.moderation: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["spam"]) -> MetaOapg.properties.spam: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resolved"]) -> typing.Union[MetaOapg.properties.resolved, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resolvedBy"]) -> typing.Union[MetaOapg.properties.resolvedBy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["moderation"]) -> typing.Union[MetaOapg.properties.moderation, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["spam"]) -> typing.Union[MetaOapg.properties.spam, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, - resolved: typing.Union[MetaOapg.properties.resolved, bool, schemas.Unset] = schemas.unset, - resolvedBy: typing.Union[MetaOapg.properties.resolvedBy, str, schemas.Unset] = schemas.unset, - moderation: typing.Union[MetaOapg.properties.moderation, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - spam: typing.Union[MetaOapg.properties.spam, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreComment': - return super().__new__( - cls, - *_args, - id=id, - type=type, - user=user, - score=score, - revision=revision, - replyTo=replyTo, - date=date, - modificationDate=modificationDate, - comment=comment, - rawComment=rawComment, - context=context, - mentions=mentions, - resolved=resolved, - resolvedBy=resolvedBy, - moderation=moderation, - spam=spam, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_context.py b/flat_api/model/score_comment_context.py index 5d2e4af..65b5b6a 100644 --- a/flat_api/model/score_comment_context.py +++ b/flat_api/model/score_comment_context.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,180 +8,301 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreCommentContext( - schemas.DictSchema -): +class ScoreCommentContext(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } - class MetaOapg: - required = { - "measureUuids", - "partUuid", - "stopDpq", - "startTimePos", - "startDpq", - "stopTimePos", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'part_uuid': (str,), # noqa: E501 + 'measure_uuids': ([str],), # noqa: E501 + 'start_time_pos': (float,), # noqa: E501 + 'stop_time_pos': (float,), # noqa: E501 + 'start_dpq': (float,), # noqa: E501 + 'stop_dpq': (float,), # noqa: E501 + 'staff_idx': (float,), # noqa: E501 + 'staff_uuid': (str,), # noqa: E501 } - - class properties: - partUuid = schemas.StrSchema - - - class measureUuids( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'measureUuids': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'part_uuid': 'partUuid', # noqa: E501 + 'measure_uuids': 'measureUuids', # noqa: E501 + 'start_time_pos': 'startTimePos', # noqa: E501 + 'stop_time_pos': 'stopTimePos', # noqa: E501 + 'start_dpq': 'startDpq', # noqa: E501 + 'stop_dpq': 'stopDpq', # noqa: E501 + 'staff_idx': 'staffIdx', # noqa: E501 + 'staff_uuid': 'staffUuid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, part_uuid, measure_uuids, start_time_pos, stop_time_pos, start_dpq, stop_dpq, *args, **kwargs): # noqa: E501 + """ScoreCommentContext - a model defined in OpenAPI + + Args: + part_uuid (str): The unique identifier (UUID) of the score part + measure_uuids ([str]): The list of measure UUIds + start_time_pos (float): + stop_time_pos (float): + start_dpq (float): + stop_dpq (float): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + staff_idx (float): (Deprecated, use `staffUuid`) The identififer of the staff. [optional] # noqa: E501 + staff_uuid (str): The unique identififer (UUID) of the staff. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.part_uuid = part_uuid + self.measure_uuids = measure_uuids + self.start_time_pos = start_time_pos + self.stop_time_pos = stop_time_pos + self.start_dpq = start_dpq + self.stop_dpq = stop_dpq + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, part_uuid, measure_uuids, start_time_pos, stop_time_pos, start_dpq, stop_dpq, *args, **kwargs): # noqa: E501 + """ScoreCommentContext - a model defined in OpenAPI + + Args: + part_uuid (str): The unique identifier (UUID) of the score part + measure_uuids ([str]): The list of measure UUIds + start_time_pos (float): + stop_time_pos (float): + start_dpq (float): + stop_dpq (float): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + staff_idx (float): (Deprecated, use `staffUuid`) The identififer of the staff. [optional] # noqa: E501 + staff_uuid (str): The unique identififer (UUID) of the staff. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - startTimePos = schemas.NumberSchema - stopTimePos = schemas.NumberSchema - startDpq = schemas.NumberSchema - stopDpq = schemas.NumberSchema - staffIdx = schemas.NumberSchema - staffUuid = schemas.StrSchema - __annotations__ = { - "partUuid": partUuid, - "measureUuids": measureUuids, - "startTimePos": startTimePos, - "stopTimePos": stopTimePos, - "startDpq": startDpq, - "stopDpq": stopDpq, - "staffIdx": staffIdx, - "staffUuid": staffUuid, - } - - measureUuids: MetaOapg.properties.measureUuids - partUuid: MetaOapg.properties.partUuid - stopDpq: MetaOapg.properties.stopDpq - startTimePos: MetaOapg.properties.startTimePos - startDpq: MetaOapg.properties.startDpq - stopTimePos: MetaOapg.properties.stopTimePos - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staffIdx"]) -> MetaOapg.properties.staffIdx: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staffUuid"]) -> MetaOapg.properties.staffUuid: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staffIdx"]) -> typing.Union[MetaOapg.properties.staffIdx, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staffUuid"]) -> typing.Union[MetaOapg.properties.staffUuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - measureUuids: typing.Union[MetaOapg.properties.measureUuids, list, tuple, ], - partUuid: typing.Union[MetaOapg.properties.partUuid, str, ], - stopDpq: typing.Union[MetaOapg.properties.stopDpq, decimal.Decimal, int, float, ], - startTimePos: typing.Union[MetaOapg.properties.startTimePos, decimal.Decimal, int, float, ], - startDpq: typing.Union[MetaOapg.properties.startDpq, decimal.Decimal, int, float, ], - stopTimePos: typing.Union[MetaOapg.properties.stopTimePos, decimal.Decimal, int, float, ], - staffIdx: typing.Union[MetaOapg.properties.staffIdx, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - staffUuid: typing.Union[MetaOapg.properties.staffUuid, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentContext': - return super().__new__( - cls, - *_args, - measureUuids=measureUuids, - partUuid=partUuid, - stopDpq=stopDpq, - startTimePos=startTimePos, - startDpq=startDpq, - stopTimePos=stopTimePos, - staffIdx=staffIdx, - staffUuid=staffUuid, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.part_uuid = part_uuid + self.measure_uuids = measure_uuids + self.start_time_pos = start_time_pos + self.stop_time_pos = stop_time_pos + self.start_dpq = start_dpq + self.stop_dpq = stop_dpq + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comment_context.pyi b/flat_api/model/score_comment_context.pyi deleted file mode 100644 index 5d2e4af..0000000 --- a/flat_api/model/score_comment_context.pyi +++ /dev/null @@ -1,189 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCommentContext( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). - - """ - - - class MetaOapg: - required = { - "measureUuids", - "partUuid", - "stopDpq", - "startTimePos", - "startDpq", - "stopTimePos", - } - - class properties: - partUuid = schemas.StrSchema - - - class measureUuids( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'measureUuids': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - startTimePos = schemas.NumberSchema - stopTimePos = schemas.NumberSchema - startDpq = schemas.NumberSchema - stopDpq = schemas.NumberSchema - staffIdx = schemas.NumberSchema - staffUuid = schemas.StrSchema - __annotations__ = { - "partUuid": partUuid, - "measureUuids": measureUuids, - "startTimePos": startTimePos, - "stopTimePos": stopTimePos, - "startDpq": startDpq, - "stopDpq": stopDpq, - "staffIdx": staffIdx, - "staffUuid": staffUuid, - } - - measureUuids: MetaOapg.properties.measureUuids - partUuid: MetaOapg.properties.partUuid - stopDpq: MetaOapg.properties.stopDpq - startTimePos: MetaOapg.properties.startTimePos - startDpq: MetaOapg.properties.startDpq - stopTimePos: MetaOapg.properties.stopTimePos - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staffIdx"]) -> MetaOapg.properties.staffIdx: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staffUuid"]) -> MetaOapg.properties.staffUuid: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["partUuid"]) -> MetaOapg.properties.partUuid: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["measureUuids"]) -> MetaOapg.properties.measureUuids: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startTimePos"]) -> MetaOapg.properties.startTimePos: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stopTimePos"]) -> MetaOapg.properties.stopTimePos: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startDpq"]) -> MetaOapg.properties.startDpq: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stopDpq"]) -> MetaOapg.properties.stopDpq: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staffIdx"]) -> typing.Union[MetaOapg.properties.staffIdx, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staffUuid"]) -> typing.Union[MetaOapg.properties.staffUuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["partUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq", "staffIdx", "staffUuid", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - measureUuids: typing.Union[MetaOapg.properties.measureUuids, list, tuple, ], - partUuid: typing.Union[MetaOapg.properties.partUuid, str, ], - stopDpq: typing.Union[MetaOapg.properties.stopDpq, decimal.Decimal, int, float, ], - startTimePos: typing.Union[MetaOapg.properties.startTimePos, decimal.Decimal, int, float, ], - startDpq: typing.Union[MetaOapg.properties.startDpq, decimal.Decimal, int, float, ], - stopTimePos: typing.Union[MetaOapg.properties.stopTimePos, decimal.Decimal, int, float, ], - staffIdx: typing.Union[MetaOapg.properties.staffIdx, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - staffUuid: typing.Union[MetaOapg.properties.staffUuid, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentContext': - return super().__new__( - cls, - *_args, - measureUuids=measureUuids, - partUuid=partUuid, - stopDpq=stopDpq, - startTimePos=startTimePos, - startDpq=startDpq, - stopTimePos=stopTimePos, - staffIdx=staffIdx, - staffUuid=staffUuid, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_comment_creation.py b/flat_api/model/score_comment_creation.py index 058fb28..bf8e24b 100644 --- a/flat_api/model/score_comment_creation.py +++ b/flat_api/model/score_comment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,154 +8,289 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_comment_context import ScoreCommentContext + globals()['ScoreCommentContext'] = ScoreCommentContext -class ScoreCommentCreation( - schemas.DictSchema -): + +class ScoreCommentCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a comment + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } - class MetaOapg: - required = { - "comment", + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'comment': (str,), # noqa: E501 + 'revision': (str,), # noqa: E501 + 'raw_comment': (str,), # noqa: E501 + 'mentions': ([str],), # noqa: E501 + 'reply_to': (str,), # noqa: E501 + 'context': (ScoreCommentContext,), # noqa: E501 } - - class properties: - comment = schemas.StrSchema - revision = schemas.StrSchema - rawComment = schemas.StrSchema - - - class mentions( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'mentions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'comment': 'comment', # noqa: E501 + 'revision': 'revision', # noqa: E501 + 'raw_comment': 'rawComment', # noqa: E501 + 'mentions': 'mentions', # noqa: E501 + 'reply_to': 'replyTo', # noqa: E501 + 'context': 'context', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, comment, *args, **kwargs): # noqa: E501 + """ScoreCommentCreation - a model defined in OpenAPI + + Args: + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 + mentions ([str]): The list of user identifiers mentioned in this comment. [optional] # noqa: E501 + reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.comment = comment + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, comment, *args, **kwargs): # noqa: E501 + """ScoreCommentCreation - a model defined in OpenAPI + + Args: + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 + mentions ([str]): The list of user identifiers mentioned in this comment. [optional] # noqa: E501 + reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - replyTo = schemas.StrSchema - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - __annotations__ = { - "comment": comment, - "revision": revision, - "rawComment": rawComment, - "mentions": mentions, - "replyTo": replyTo, - "context": context, - } - - comment: MetaOapg.properties.comment - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - comment: typing.Union[MetaOapg.properties.comment, str, ], - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, - replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentCreation': - return super().__new__( - cls, - *_args, - comment=comment, - revision=revision, - rawComment=rawComment, - mentions=mentions, - replyTo=replyTo, - context=context, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.comment = comment + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comment_creation.pyi b/flat_api/model/score_comment_creation.pyi deleted file mode 100644 index 058fb28..0000000 --- a/flat_api/model/score_comment_creation.pyi +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCommentCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a comment - """ - - - class MetaOapg: - required = { - "comment", - } - - class properties: - comment = schemas.StrSchema - revision = schemas.StrSchema - rawComment = schemas.StrSchema - - - class mentions( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'mentions': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - replyTo = schemas.StrSchema - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - __annotations__ = { - "comment": comment, - "revision": revision, - "rawComment": rawComment, - "mentions": mentions, - "replyTo": replyTo, - "context": context, - } - - comment: MetaOapg.properties.comment - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mentions"]) -> MetaOapg.properties.mentions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["replyTo"]) -> MetaOapg.properties.replyTo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mentions"]) -> typing.Union[MetaOapg.properties.mentions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["replyTo"]) -> typing.Union[MetaOapg.properties.replyTo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["comment", "revision", "rawComment", "mentions", "replyTo", "context", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - comment: typing.Union[MetaOapg.properties.comment, str, ], - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - mentions: typing.Union[MetaOapg.properties.mentions, list, tuple, schemas.Unset] = schemas.unset, - replyTo: typing.Union[MetaOapg.properties.replyTo, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentCreation': - return super().__new__( - cls, - *_args, - comment=comment, - revision=revision, - rawComment=rawComment, - mentions=mentions, - replyTo=replyTo, - context=context, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comment_moderation.py b/flat_api/model/score_comment_moderation.py new file mode 100644 index 0000000..85792aa --- /dev/null +++ b/flat_api/model/score_comment_moderation.py @@ -0,0 +1,272 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ScoreCommentModeration(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('reason',): { + 'SPAM': "spam", + 'INAPPROPRIATE': "inappropriate", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'hidden': (bool,), # noqa: E501 + 'reason': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hidden': 'hidden', # noqa: E501 + 'reason': 'reason', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreCommentModeration - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hidden (bool): If true, this comment will be hidden from other users. [optional] # noqa: E501 + reason (str): If the comment is hidden, the reason why this one has been moderated. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreCommentModeration - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + hidden (bool): If true, this comment will be hidden from other users. [optional] # noqa: E501 + reason (str): If the comment is hidden, the reason why this one has been moderated. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comment_update.py b/flat_api/model/score_comment_update.py index ddcd780..249288b 100644 --- a/flat_api/model/score_comment_update.py +++ b/flat_api/model/score_comment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,125 +8,283 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_comment_context import ScoreCommentContext + globals()['ScoreCommentContext'] = ScoreCommentContext -class ScoreCommentUpdate( - schemas.DictSchema -): + +class ScoreCommentUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Update of a comment + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('comment',): { + 'max_length': 10000, + 'min_length': 1, + }, + ('raw_comment',): { + 'max_length': 10000, + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'revision': (str,), # noqa: E501 + 'comment': (str,), # noqa: E501 + 'raw_comment': (str,), # noqa: E501 + 'context': (ScoreCommentContext,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'revision': 'revision', # noqa: E501 + 'comment': 'comment', # noqa: E501 + 'raw_comment': 'rawComment', # noqa: E501 + 'context': 'context', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreCommentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreCommentUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 + comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 + raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 + context (ScoreCommentContext): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - revision = schemas.StrSchema - - - class comment( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 10000 - min_length = 1 - - - class rawComment( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 10000 - min_length = 1 - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - __annotations__ = { - "revision": revision, - "comment": comment, - "rawComment": rawComment, - "context": context, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentUpdate': - return super().__new__( - cls, - *_args, - revision=revision, - comment=comment, - rawComment=rawComment, - context=context, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comment_update.pyi b/flat_api/model/score_comment_update.pyi deleted file mode 100644 index fb71e09..0000000 --- a/flat_api/model/score_comment_update.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCommentUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Update of a comment - """ - - - class MetaOapg: - - class properties: - revision = schemas.StrSchema - - - class comment( - schemas.StrSchema - ): - pass - - - class rawComment( - schemas.StrSchema - ): - pass - - @staticmethod - def context() -> typing.Type['ScoreCommentContext']: - return ScoreCommentContext - __annotations__ = { - "revision": revision, - "comment": comment, - "rawComment": rawComment, - "context": context, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["revision"]) -> MetaOapg.properties.revision: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rawComment"]) -> MetaOapg.properties.rawComment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["context"]) -> 'ScoreCommentContext': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["revision"]) -> typing.Union[MetaOapg.properties.revision, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rawComment"]) -> typing.Union[MetaOapg.properties.rawComment, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union['ScoreCommentContext', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["revision", "comment", "rawComment", "context", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - revision: typing.Union[MetaOapg.properties.revision, str, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - rawComment: typing.Union[MetaOapg.properties.rawComment, str, schemas.Unset] = schemas.unset, - context: typing.Union['ScoreCommentContext', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentUpdate': - return super().__new__( - cls, - *_args, - revision=revision, - comment=comment, - rawComment=rawComment, - context=context, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_comment_context import ScoreCommentContext diff --git a/flat_api/model/score_comments_counts.py b/flat_api/model/score_comments_counts.py index f61b037..ae80bcc 100644 --- a/flat_api/model/score_comments_counts.py +++ b/flat_api/model/score_comments_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,104 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreCommentsCounts( - schemas.DictSchema -): +class ScoreCommentsCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A computed version of the total, unique, weekly and monthly number of -comments added on the documents (this doesn't include inline comments). - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'total': (float,), # noqa: E501 + 'unique': (float,), # noqa: E501 + 'weekly': (float,), # noqa: E501 + 'monthly': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'unique': 'unique', # noqa: E501 + 'weekly': 'weekly', # noqa: E501 + 'monthly': 'monthly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreCommentsCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of comments added to the score. [optional] # noqa: E501 + unique (float): The unique (1/user) number of comments added to the score. [optional] # noqa: E501 + weekly (float): The weekly unique number of comments added to the score. [optional] # noqa: E501 + monthly (float): The monthly unique number of comments added to the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreCommentsCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of comments added to the score. [optional] # noqa: E501 + unique (float): The unique (1/user) number of comments added to the score. [optional] # noqa: E501 + weekly (float): The weekly unique number of comments added to the score. [optional] # noqa: E501 + monthly (float): The monthly unique number of comments added to the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - total = schemas.NumberSchema - unique = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "unique": unique, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unique"]) -> MetaOapg.properties.unique: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unique"]) -> typing.Union[MetaOapg.properties.unique, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - unique: typing.Union[MetaOapg.properties.unique, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentsCounts': - return super().__new__( - cls, - *_args, - total=total, - unique=unique, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_comments_counts.pyi b/flat_api/model/score_comments_counts.pyi deleted file mode 100644 index f61b037..0000000 --- a/flat_api/model/score_comments_counts.pyi +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCommentsCounts( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A computed version of the total, unique, weekly and monthly number of -comments added on the documents (this doesn't include inline comments). - - """ - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - unique = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "unique": unique, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unique"]) -> MetaOapg.properties.unique: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unique"]) -> typing.Union[MetaOapg.properties.unique, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "unique", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - unique: typing.Union[MetaOapg.properties.unique, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCommentsCounts': - return super().__new__( - cls, - *_args, - total=total, - unique=unique, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_creation.py b/flat_api/model/score_creation.py index e04a33f..cc673a3 100644 --- a/flat_api/model/score_creation.py +++ b/flat_api/model/score_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,599 +8,302 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData + from flat_api.model.score_privacy import ScorePrivacy + from flat_api.model.score_source import ScoreSource + globals()['ScoreCreationBuilderData'] = ScoreCreationBuilderData + globals()['ScorePrivacy'] = ScorePrivacy + globals()['ScoreSource'] = ScoreSource -class ScoreCreation( - schemas.DictSchema -): + +class ScoreCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('data_encoding',): { + 'BASE64': "base64", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'privacy': (ScorePrivacy,), # noqa: E501 + 'collection': (str,), # noqa: E501 + 'google_drive_folder': (str,), # noqa: E501 + 'builder_data': (ScoreCreationBuilderData,), # noqa: E501 + 'filename': (str,), # noqa: E501 + 'data': (str,), # noqa: E501 + 'data_encoding': (str,), # noqa: E501 + 'source': (ScoreSource,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + 'collection': 'collection', # noqa: E501 + 'google_drive_folder': 'googleDriveFolder', # noqa: E501 + 'builder_data': 'builderData', # noqa: E501 + 'filename': 'filename', # noqa: E501 + 'data': 'data', # noqa: E501 + 'data_encoding': 'dataEncoding', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - title = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - collection = schemas.StrSchema - googleDriveFolder = schemas.StrSchema - - - class builderData( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "scoreData", - } - - class properties: - - - class scoreData( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "instruments", - } - - class properties: - useTabStaff = schemas.BoolSchema - useChordGrid = schemas.BoolSchema - fifths = schemas.NumberSchema - nbBeats = schemas.NumberSchema - beatType = schemas.NumberSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "instrument", - "group", - } - - class properties: - group = schemas.StrSchema - instrument = schemas.StrSchema - longName = schemas.StrSchema - shortName = schemas.StrSchema - hasQuarterTone = schemas.BoolSchema - __annotations__ = { - "group": group, - "instrument": instrument, - "longName": longName, - "shortName": shortName, - "hasQuarterTone": hasQuarterTone, - } - - instrument: MetaOapg.properties.instrument - group: MetaOapg.properties.group - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["longName"]) -> MetaOapg.properties.longName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shortName"]) -> MetaOapg.properties.shortName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasQuarterTone"]) -> MetaOapg.properties.hasQuarterTone: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["longName"]) -> typing.Union[MetaOapg.properties.longName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shortName"]) -> typing.Union[MetaOapg.properties.shortName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasQuarterTone"]) -> typing.Union[MetaOapg.properties.hasQuarterTone, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - instrument: typing.Union[MetaOapg.properties.instrument, str, ], - group: typing.Union[MetaOapg.properties.group, str, ], - longName: typing.Union[MetaOapg.properties.longName, str, schemas.Unset] = schemas.unset, - shortName: typing.Union[MetaOapg.properties.shortName, str, schemas.Unset] = schemas.unset, - hasQuarterTone: typing.Union[MetaOapg.properties.hasQuarterTone, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - instrument=instrument, - group=group, - longName=longName, - shortName=shortName, - hasQuarterTone=hasQuarterTone, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "useTabStaff": useTabStaff, - "useChordGrid": useChordGrid, - "fifths": fifths, - "nbBeats": nbBeats, - "beatType": beatType, - "instruments": instruments, - } - - instruments: MetaOapg.properties.instruments - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useTabStaff"]) -> MetaOapg.properties.useTabStaff: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useChordGrid"]) -> MetaOapg.properties.useChordGrid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fifths"]) -> MetaOapg.properties.fifths: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbBeats"]) -> MetaOapg.properties.nbBeats: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["beatType"]) -> MetaOapg.properties.beatType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useTabStaff"]) -> typing.Union[MetaOapg.properties.useTabStaff, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useChordGrid"]) -> typing.Union[MetaOapg.properties.useChordGrid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fifths"]) -> typing.Union[MetaOapg.properties.fifths, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbBeats"]) -> typing.Union[MetaOapg.properties.nbBeats, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["beatType"]) -> typing.Union[MetaOapg.properties.beatType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, ], - useTabStaff: typing.Union[MetaOapg.properties.useTabStaff, bool, schemas.Unset] = schemas.unset, - useChordGrid: typing.Union[MetaOapg.properties.useChordGrid, bool, schemas.Unset] = schemas.unset, - fifths: typing.Union[MetaOapg.properties.fifths, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - nbBeats: typing.Union[MetaOapg.properties.nbBeats, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - beatType: typing.Union[MetaOapg.properties.beatType, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'scoreData': - return super().__new__( - cls, - *_args, - instruments=instruments, - useTabStaff=useTabStaff, - useChordGrid=useChordGrid, - fifths=fifths, - nbBeats=nbBeats, - beatType=beatType, - _configuration=_configuration, - **kwargs, - ) - - - class layoutData( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - notesSpacingCoeff = schemas.NumberSchema - - - class lengthUnit( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "cm": "CM", - "inch": "INCH", - } - - @schemas.classproperty - def CM(cls): - return cls("cm") - - @schemas.classproperty - def INCH(cls): - return cls("inch") - pageHeight = schemas.NumberSchema - pageWidth = schemas.NumberSchema - pageMarginTop = schemas.NumberSchema - pageMarginBottom = schemas.NumberSchema - pageMarginLeft = schemas.NumberSchema - pageMarginRight = schemas.NumberSchema - __annotations__ = { - "notesSpacingCoeff": notesSpacingCoeff, - "lengthUnit": lengthUnit, - "pageHeight": pageHeight, - "pageWidth": pageWidth, - "pageMarginTop": pageMarginTop, - "pageMarginBottom": pageMarginBottom, - "pageMarginLeft": pageMarginLeft, - "pageMarginRight": pageMarginRight, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> MetaOapg.properties.notesSpacingCoeff: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthUnit"]) -> MetaOapg.properties.lengthUnit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageHeight"]) -> MetaOapg.properties.pageHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageWidth"]) -> MetaOapg.properties.pageWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginTop"]) -> MetaOapg.properties.pageMarginTop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginBottom"]) -> MetaOapg.properties.pageMarginBottom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginLeft"]) -> MetaOapg.properties.pageMarginLeft: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginRight"]) -> MetaOapg.properties.pageMarginRight: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> typing.Union[MetaOapg.properties.notesSpacingCoeff, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthUnit"]) -> typing.Union[MetaOapg.properties.lengthUnit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageHeight"]) -> typing.Union[MetaOapg.properties.pageHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageWidth"]) -> typing.Union[MetaOapg.properties.pageWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginTop"]) -> typing.Union[MetaOapg.properties.pageMarginTop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginBottom"]) -> typing.Union[MetaOapg.properties.pageMarginBottom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginLeft"]) -> typing.Union[MetaOapg.properties.pageMarginLeft, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginRight"]) -> typing.Union[MetaOapg.properties.pageMarginRight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - notesSpacingCoeff: typing.Union[MetaOapg.properties.notesSpacingCoeff, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - lengthUnit: typing.Union[MetaOapg.properties.lengthUnit, str, schemas.Unset] = schemas.unset, - pageHeight: typing.Union[MetaOapg.properties.pageHeight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageWidth: typing.Union[MetaOapg.properties.pageWidth, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginTop: typing.Union[MetaOapg.properties.pageMarginTop, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginBottom: typing.Union[MetaOapg.properties.pageMarginBottom, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginLeft: typing.Union[MetaOapg.properties.pageMarginLeft, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginRight: typing.Union[MetaOapg.properties.pageMarginRight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'layoutData': - return super().__new__( - cls, - *_args, - notesSpacingCoeff=notesSpacingCoeff, - lengthUnit=lengthUnit, - pageHeight=pageHeight, - pageWidth=pageWidth, - pageMarginTop=pageMarginTop, - pageMarginBottom=pageMarginBottom, - pageMarginLeft=pageMarginLeft, - pageMarginRight=pageMarginRight, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "scoreData": scoreData, - "layoutData": layoutData, - } - - scoreData: MetaOapg.properties.scoreData - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["layoutData"]) -> MetaOapg.properties.layoutData: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["layoutData"]) -> typing.Union[MetaOapg.properties.layoutData, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - scoreData: typing.Union[MetaOapg.properties.scoreData, dict, frozendict.frozendict, ], - layoutData: typing.Union[MetaOapg.properties.layoutData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'builderData': - return super().__new__( - cls, - *_args, - scoreData=scoreData, - layoutData=layoutData, - _configuration=_configuration, - **kwargs, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") . [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + collection (str): Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. . [optional] # noqa: E501 + google_drive_folder (str): If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. . [optional] # noqa: E501 + builder_data (ScoreCreationBuilderData): [optional] # noqa: E501 + filename (str): If this is an imported file, its filename. [optional] # noqa: E501 + data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. . [optional] # noqa: E501 + data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 + source (ScoreSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") . [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + collection (str): Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. . [optional] # noqa: E501 + google_drive_folder (str): If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. . [optional] # noqa: E501 + builder_data (ScoreCreationBuilderData): [optional] # noqa: E501 + filename (str): If this is an imported file, its filename. [optional] # noqa: E501 + data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. . [optional] # noqa: E501 + data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 + source (ScoreSource): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - filename = schemas.StrSchema - data = schemas.StrSchema - - - class dataEncoding( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "base64": "BASE64", - } - - @schemas.classproperty - def BASE64(cls): - return cls("base64") - - @staticmethod - def source() -> typing.Type['ScoreSource']: - return ScoreSource - __annotations__ = { - "title": title, - "privacy": privacy, - "collection": collection, - "googleDriveFolder": googleDriveFolder, - "builderData": builderData, - "filename": filename, - "data": data, - "dataEncoding": dataEncoding, - "source": source, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFolder"]) -> MetaOapg.properties.googleDriveFolder: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["builderData"]) -> MetaOapg.properties.builderData: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["filename"]) -> MetaOapg.properties.filename: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'ScoreSource': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFolder"]) -> typing.Union[MetaOapg.properties.googleDriveFolder, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["builderData"]) -> typing.Union[MetaOapg.properties.builderData, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["filename"]) -> typing.Union[MetaOapg.properties.filename, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['ScoreSource', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, - googleDriveFolder: typing.Union[MetaOapg.properties.googleDriveFolder, str, schemas.Unset] = schemas.unset, - builderData: typing.Union[MetaOapg.properties.builderData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - filename: typing.Union[MetaOapg.properties.filename, str, schemas.Unset] = schemas.unset, - data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, - dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, - source: typing.Union['ScoreSource', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCreation': - return super().__new__( - cls, - *_args, - title=title, - privacy=privacy, - collection=collection, - googleDriveFolder=googleDriveFolder, - builderData=builderData, - filename=filename, - data=data, - dataEncoding=dataEncoding, - source=source, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_source import ScoreSource + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_creation.pyi b/flat_api/model/score_creation.pyi deleted file mode 100644 index cab25f0..0000000 --- a/flat_api/model/score_creation.pyi +++ /dev/null @@ -1,595 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - title = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - collection = schemas.StrSchema - googleDriveFolder = schemas.StrSchema - - - class builderData( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "scoreData", - } - - class properties: - - - class scoreData( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "instruments", - } - - class properties: - useTabStaff = schemas.BoolSchema - useChordGrid = schemas.BoolSchema - fifths = schemas.NumberSchema - nbBeats = schemas.NumberSchema - beatType = schemas.NumberSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "instrument", - "group", - } - - class properties: - group = schemas.StrSchema - instrument = schemas.StrSchema - longName = schemas.StrSchema - shortName = schemas.StrSchema - hasQuarterTone = schemas.BoolSchema - __annotations__ = { - "group": group, - "instrument": instrument, - "longName": longName, - "shortName": shortName, - "hasQuarterTone": hasQuarterTone, - } - - instrument: MetaOapg.properties.instrument - group: MetaOapg.properties.group - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["longName"]) -> MetaOapg.properties.longName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shortName"]) -> MetaOapg.properties.shortName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasQuarterTone"]) -> MetaOapg.properties.hasQuarterTone: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["group"]) -> MetaOapg.properties.group: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instrument"]) -> MetaOapg.properties.instrument: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["longName"]) -> typing.Union[MetaOapg.properties.longName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shortName"]) -> typing.Union[MetaOapg.properties.shortName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasQuarterTone"]) -> typing.Union[MetaOapg.properties.hasQuarterTone, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["group", "instrument", "longName", "shortName", "hasQuarterTone", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - instrument: typing.Union[MetaOapg.properties.instrument, str, ], - group: typing.Union[MetaOapg.properties.group, str, ], - longName: typing.Union[MetaOapg.properties.longName, str, schemas.Unset] = schemas.unset, - shortName: typing.Union[MetaOapg.properties.shortName, str, schemas.Unset] = schemas.unset, - hasQuarterTone: typing.Union[MetaOapg.properties.hasQuarterTone, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - instrument=instrument, - group=group, - longName=longName, - shortName=shortName, - hasQuarterTone=hasQuarterTone, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "useTabStaff": useTabStaff, - "useChordGrid": useChordGrid, - "fifths": fifths, - "nbBeats": nbBeats, - "beatType": beatType, - "instruments": instruments, - } - - instruments: MetaOapg.properties.instruments - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useTabStaff"]) -> MetaOapg.properties.useTabStaff: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["useChordGrid"]) -> MetaOapg.properties.useChordGrid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fifths"]) -> MetaOapg.properties.fifths: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nbBeats"]) -> MetaOapg.properties.nbBeats: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["beatType"]) -> MetaOapg.properties.beatType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useTabStaff"]) -> typing.Union[MetaOapg.properties.useTabStaff, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["useChordGrid"]) -> typing.Union[MetaOapg.properties.useChordGrid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fifths"]) -> typing.Union[MetaOapg.properties.fifths, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nbBeats"]) -> typing.Union[MetaOapg.properties.nbBeats, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["beatType"]) -> typing.Union[MetaOapg.properties.beatType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, ], - useTabStaff: typing.Union[MetaOapg.properties.useTabStaff, bool, schemas.Unset] = schemas.unset, - useChordGrid: typing.Union[MetaOapg.properties.useChordGrid, bool, schemas.Unset] = schemas.unset, - fifths: typing.Union[MetaOapg.properties.fifths, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - nbBeats: typing.Union[MetaOapg.properties.nbBeats, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - beatType: typing.Union[MetaOapg.properties.beatType, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'scoreData': - return super().__new__( - cls, - *_args, - instruments=instruments, - useTabStaff=useTabStaff, - useChordGrid=useChordGrid, - fifths=fifths, - nbBeats=nbBeats, - beatType=beatType, - _configuration=_configuration, - **kwargs, - ) - - - class layoutData( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - notesSpacingCoeff = schemas.NumberSchema - - - class lengthUnit( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def CM(cls): - return cls("cm") - - @schemas.classproperty - def INCH(cls): - return cls("inch") - pageHeight = schemas.NumberSchema - pageWidth = schemas.NumberSchema - pageMarginTop = schemas.NumberSchema - pageMarginBottom = schemas.NumberSchema - pageMarginLeft = schemas.NumberSchema - pageMarginRight = schemas.NumberSchema - __annotations__ = { - "notesSpacingCoeff": notesSpacingCoeff, - "lengthUnit": lengthUnit, - "pageHeight": pageHeight, - "pageWidth": pageWidth, - "pageMarginTop": pageMarginTop, - "pageMarginBottom": pageMarginBottom, - "pageMarginLeft": pageMarginLeft, - "pageMarginRight": pageMarginRight, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> MetaOapg.properties.notesSpacingCoeff: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthUnit"]) -> MetaOapg.properties.lengthUnit: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageHeight"]) -> MetaOapg.properties.pageHeight: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageWidth"]) -> MetaOapg.properties.pageWidth: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginTop"]) -> MetaOapg.properties.pageMarginTop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginBottom"]) -> MetaOapg.properties.pageMarginBottom: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginLeft"]) -> MetaOapg.properties.pageMarginLeft: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pageMarginRight"]) -> MetaOapg.properties.pageMarginRight: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["notesSpacingCoeff"]) -> typing.Union[MetaOapg.properties.notesSpacingCoeff, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthUnit"]) -> typing.Union[MetaOapg.properties.lengthUnit, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageHeight"]) -> typing.Union[MetaOapg.properties.pageHeight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageWidth"]) -> typing.Union[MetaOapg.properties.pageWidth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginTop"]) -> typing.Union[MetaOapg.properties.pageMarginTop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginBottom"]) -> typing.Union[MetaOapg.properties.pageMarginBottom, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginLeft"]) -> typing.Union[MetaOapg.properties.pageMarginLeft, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pageMarginRight"]) -> typing.Union[MetaOapg.properties.pageMarginRight, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - notesSpacingCoeff: typing.Union[MetaOapg.properties.notesSpacingCoeff, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - lengthUnit: typing.Union[MetaOapg.properties.lengthUnit, str, schemas.Unset] = schemas.unset, - pageHeight: typing.Union[MetaOapg.properties.pageHeight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageWidth: typing.Union[MetaOapg.properties.pageWidth, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginTop: typing.Union[MetaOapg.properties.pageMarginTop, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginBottom: typing.Union[MetaOapg.properties.pageMarginBottom, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginLeft: typing.Union[MetaOapg.properties.pageMarginLeft, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - pageMarginRight: typing.Union[MetaOapg.properties.pageMarginRight, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'layoutData': - return super().__new__( - cls, - *_args, - notesSpacingCoeff=notesSpacingCoeff, - lengthUnit=lengthUnit, - pageHeight=pageHeight, - pageWidth=pageWidth, - pageMarginTop=pageMarginTop, - pageMarginBottom=pageMarginBottom, - pageMarginLeft=pageMarginLeft, - pageMarginRight=pageMarginRight, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "scoreData": scoreData, - "layoutData": layoutData, - } - - scoreData: MetaOapg.properties.scoreData - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["layoutData"]) -> MetaOapg.properties.layoutData: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["scoreData"]) -> MetaOapg.properties.scoreData: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["layoutData"]) -> typing.Union[MetaOapg.properties.layoutData, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["scoreData", "layoutData", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - scoreData: typing.Union[MetaOapg.properties.scoreData, dict, frozendict.frozendict, ], - layoutData: typing.Union[MetaOapg.properties.layoutData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'builderData': - return super().__new__( - cls, - *_args, - scoreData=scoreData, - layoutData=layoutData, - _configuration=_configuration, - **kwargs, - ) - filename = schemas.StrSchema - data = schemas.StrSchema - - - class dataEncoding( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def BASE64(cls): - return cls("base64") - - @staticmethod - def source() -> typing.Type['ScoreSource']: - return ScoreSource - __annotations__ = { - "title": title, - "privacy": privacy, - "collection": collection, - "googleDriveFolder": googleDriveFolder, - "builderData": builderData, - "filename": filename, - "data": data, - "dataEncoding": dataEncoding, - "source": source, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFolder"]) -> MetaOapg.properties.googleDriveFolder: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["builderData"]) -> MetaOapg.properties.builderData: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["filename"]) -> MetaOapg.properties.filename: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'ScoreSource': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFolder"]) -> typing.Union[MetaOapg.properties.googleDriveFolder, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["builderData"]) -> typing.Union[MetaOapg.properties.builderData, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["filename"]) -> typing.Union[MetaOapg.properties.filename, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['ScoreSource', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - collection: typing.Union[MetaOapg.properties.collection, str, schemas.Unset] = schemas.unset, - googleDriveFolder: typing.Union[MetaOapg.properties.googleDriveFolder, str, schemas.Unset] = schemas.unset, - builderData: typing.Union[MetaOapg.properties.builderData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - filename: typing.Union[MetaOapg.properties.filename, str, schemas.Unset] = schemas.unset, - data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, - dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, - source: typing.Union['ScoreSource', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreCreation': - return super().__new__( - cls, - *_args, - title=title, - privacy=privacy, - collection=collection, - googleDriveFolder=googleDriveFolder, - builderData=builderData, - filename=filename, - data=data, - dataEncoding=dataEncoding, - source=source, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_source import ScoreSource diff --git a/flat_api/model/score_creation_builder_data.py b/flat_api/model/score_creation_builder_data.py new file mode 100644 index 0000000..78d1fc7 --- /dev/null +++ b/flat_api/model/score_creation_builder_data.py @@ -0,0 +1,282 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData + from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData + globals()['ScoreCreationBuilderDataLayoutData'] = ScoreCreationBuilderDataLayoutData + globals()['ScoreCreationBuilderDataScoreData'] = ScoreCreationBuilderDataScoreData + + +class ScoreCreationBuilderData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'score_data': (ScoreCreationBuilderDataScoreData,), # noqa: E501 + 'layout_data': (ScoreCreationBuilderDataLayoutData,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'score_data': 'scoreData', # noqa: E501 + 'layout_data': 'layoutData', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, score_data, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderData - a model defined in OpenAPI + + Args: + score_data (ScoreCreationBuilderDataScoreData): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + layout_data (ScoreCreationBuilderDataLayoutData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.score_data = score_data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, score_data, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderData - a model defined in OpenAPI + + Args: + score_data (ScoreCreationBuilderDataScoreData): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + layout_data (ScoreCreationBuilderDataLayoutData): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.score_data = score_data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_layout_data.py b/flat_api/model/score_creation_builder_data_layout_data.py new file mode 100644 index 0000000..a13607f --- /dev/null +++ b/flat_api/model/score_creation_builder_data_layout_data.py @@ -0,0 +1,296 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ScoreCreationBuilderDataLayoutData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('length_unit',): { + 'CM': "cm", + 'INCH': "inch", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'notes_spacing_coeff': (float,), # noqa: E501 + 'length_unit': (str,), # noqa: E501 + 'page_height': (float,), # noqa: E501 + 'page_width': (float,), # noqa: E501 + 'page_margin_top': (float,), # noqa: E501 + 'page_margin_bottom': (float,), # noqa: E501 + 'page_margin_left': (float,), # noqa: E501 + 'page_margin_right': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'notes_spacing_coeff': 'notesSpacingCoeff', # noqa: E501 + 'length_unit': 'lengthUnit', # noqa: E501 + 'page_height': 'pageHeight', # noqa: E501 + 'page_width': 'pageWidth', # noqa: E501 + 'page_margin_top': 'pageMarginTop', # noqa: E501 + 'page_margin_bottom': 'pageMarginBottom', # noqa: E501 + 'page_margin_left': 'pageMarginLeft', # noqa: E501 + 'page_margin_right': 'pageMarginRight', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + notes_spacing_coeff (float): A float value >= 1 that controls the spacing between notes.. [optional] # noqa: E501 + length_unit (str): The unit to use for layout customizations. [optional] if omitted the server will use the default value of "cm" # noqa: E501 + page_height (float): The height of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_width (float): The width of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_top (float): The top margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_bottom (float): The bottom margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_left (float): The left margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_right (float): The right margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + notes_spacing_coeff (float): A float value >= 1 that controls the spacing between notes.. [optional] # noqa: E501 + length_unit (str): The unit to use for layout customizations. [optional] if omitted the server will use the default value of "cm" # noqa: E501 + page_height (float): The height of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_width (float): The width of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_top (float): The top margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_bottom (float): The bottom margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_left (float): The left margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + page_margin_right (float): The right margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_score_data.py b/flat_api/model/score_creation_builder_data_score_data.py new file mode 100644 index 0000000..7e98d44 --- /dev/null +++ b/flat_api/model/score_creation_builder_data_score_data.py @@ -0,0 +1,296 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner + globals()['ScoreCreationBuilderDataScoreDataInstrumentsInner'] = ScoreCreationBuilderDataScoreDataInstrumentsInner + + +class ScoreCreationBuilderDataScoreData(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'instruments': ([ScoreCreationBuilderDataScoreDataInstrumentsInner],), # noqa: E501 + 'use_tab_staff': (bool,), # noqa: E501 + 'use_chord_grid': (bool,), # noqa: E501 + 'fifths': (float,), # noqa: E501 + 'nb_beats': (float,), # noqa: E501 + 'beat_type': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'instruments': 'instruments', # noqa: E501 + 'use_tab_staff': 'useTabStaff', # noqa: E501 + 'use_chord_grid': 'useChordGrid', # noqa: E501 + 'fifths': 'fifths', # noqa: E501 + 'nb_beats': 'nbBeats', # noqa: E501 + 'beat_type': 'beatType', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, instruments, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI + + Args: + instruments ([ScoreCreationBuilderDataScoreDataInstrumentsInner]): The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + use_tab_staff (bool): true if the TAB staff is displayed with fretted instruments. [optional] # noqa: E501 + use_chord_grid (bool): true if the chord grid must be displayed with fretted instruments. [optional] # noqa: E501 + fifths (float): The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.. [optional] # noqa: E501 + nb_beats (float): The number of beats in the measure. [optional] # noqa: E501 + beat_type (float): The duration of a beat in the measure. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.instruments = instruments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, instruments, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI + + Args: + instruments ([ScoreCreationBuilderDataScoreDataInstrumentsInner]): The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + use_tab_staff (bool): true if the TAB staff is displayed with fretted instruments. [optional] # noqa: E501 + use_chord_grid (bool): true if the chord grid must be displayed with fretted instruments. [optional] # noqa: E501 + fifths (float): The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.. [optional] # noqa: E501 + nb_beats (float): The number of beats in the measure. [optional] # noqa: E501 + beat_type (float): The duration of a beat in the measure. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.instruments = instruments + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py b/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py new file mode 100644 index 0000000..65bad5b --- /dev/null +++ b/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py @@ -0,0 +1,288 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class ScoreCreationBuilderDataScoreDataInstrumentsInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'group': (str,), # noqa: E501 + 'instrument': (str,), # noqa: E501 + 'long_name': (str,), # noqa: E501 + 'short_name': (str,), # noqa: E501 + 'has_quarter_tone': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'group': 'group', # noqa: E501 + 'instrument': 'instrument', # noqa: E501 + 'long_name': 'longName', # noqa: E501 + 'short_name': 'shortName', # noqa: E501 + 'has_quarter_tone': 'hasQuarterTone', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, group, instrument, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataScoreDataInstrumentsInner - a model defined in OpenAPI + + Args: + group (str): The of the instrument group (e.g. `keyboards`, `brass`) + instrument (str): The identifier of the instrument (e.g. `piano`, `trumpet`) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + long_name (str): The full name of the instrument. [optional] # noqa: E501 + short_name (str): The abbreviation of the name of the instrument. [optional] # noqa: E501 + has_quarter_tone (bool): True if the part can use quarter tone (prevent the part to have a TAB/chord grid). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.group = group + self.instrument = instrument + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, group, instrument, *args, **kwargs): # noqa: E501 + """ScoreCreationBuilderDataScoreDataInstrumentsInner - a model defined in OpenAPI + + Args: + group (str): The of the instrument group (e.g. `keyboards`, `brass`) + instrument (str): The identifier of the instrument (e.g. `piano`, `trumpet`) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + long_name (str): The full name of the instrument. [optional] # noqa: E501 + short_name (str): The abbreviation of the name of the instrument. [optional] # noqa: E501 + has_quarter_tone (bool): True if the part can use quarter tone (prevent the part to have a TAB/chord grid). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.group = group + self.instrument = instrument + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_creation_type.py b/flat_api/model/score_creation_type.py index 9a8888c..03f6b7d 100644 --- a/flat_api/model/score_creation_type.py +++ b/flat_api/model/score_creation_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,48 +8,285 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreCreationType( - schemas.EnumBase, - schemas.StrSchema -): +class ScoreCreationType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The type of creation (an orginal, an arrangement) + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'ORIGINAL': "original", + 'ARRANGEMENT': "arrangement", + 'OTHER': "other", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "original": "ORIGINAL", - "arrangement": "ARRANGEMENT", - "other": "OTHER", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def ORIGINAL(cls): - return cls("original") - - @schemas.classproperty - def ARRANGEMENT(cls): - return cls("arrangement") - - @schemas.classproperty - def OTHER(cls): - return cls("other") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ScoreCreationType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 + + Keyword Args: + value (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScoreCreationType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 + + Keyword Args: + value (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/score_creation_type.pyi b/flat_api/model/score_creation_type.pyi deleted file mode 100644 index bbecf32..0000000 --- a/flat_api/model/score_creation_type.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreCreationType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The type of creation (an orginal, an arrangement) - """ - - @schemas.classproperty - def ORIGINAL(cls): - return cls("original") - - @schemas.classproperty - def ARRANGEMENT(cls): - return cls("arrangement") - - @schemas.classproperty - def OTHER(cls): - return cls("other") diff --git a/flat_api/model/score_details.py b/flat_api/model/score_details.py index af8e60a..f935bb3 100644 --- a/flat_api/model/score_details.py +++ b/flat_api/model/score_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,551 +8,409 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.resource_collaborator import ResourceCollaborator + from flat_api.model.resource_rights import ResourceRights + from flat_api.model.score_comments_counts import ScoreCommentsCounts + from flat_api.model.score_creation_type import ScoreCreationType + from flat_api.model.score_license import ScoreLicense + from flat_api.model.score_likes_counts import ScoreLikesCounts + from flat_api.model.score_plays_counts import ScorePlaysCounts + from flat_api.model.score_privacy import ScorePrivacy + from flat_api.model.score_views_counts import ScoreViewsCounts + from flat_api.model.user_public_summary import UserPublicSummary + globals()['ResourceCollaborator'] = ResourceCollaborator + globals()['ResourceRights'] = ResourceRights + globals()['ScoreCommentsCounts'] = ScoreCommentsCounts + globals()['ScoreCreationType'] = ScoreCreationType + globals()['ScoreLicense'] = ScoreLicense + globals()['ScoreLikesCounts'] = ScoreLikesCounts + globals()['ScorePlaysCounts'] = ScorePlaysCounts + globals()['ScorePrivacy'] = ScorePrivacy + globals()['ScoreViewsCounts'] = ScoreViewsCounts + globals()['UserPublicSummary'] = UserPublicSummary -class ScoreDetails( - schemas.DictSchema -): + +class ScoreDetails(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - sharingKey = schemas.StrSchema - title = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - - @staticmethod - def user() -> typing.Type['UserPublicSummary']: - return UserPublicSummary - htmlUrl = schemas.StrSchema - subtitle = schemas.StrSchema - lyricist = schemas.StrSchema - arranger = schemas.StrSchema - composer = schemas.StrSchema - description = schemas.StrSchema - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[a-zA-Z0-9]{1,30}$', # noqa: E501 - }] - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def creationType() -> typing.Type['ScoreCreationType']: - return ScoreCreationType - - @staticmethod - def license() -> typing.Type['ScoreLicense']: - return ScoreLicense - licenseText = schemas.StrSchema - durationTime = schemas.NumberSchema - numberMeasures = schemas.IntSchema - mainTempoQpm = schemas.NumberSchema - - @staticmethod - def rights() -> typing.Type['ResourceRights']: - return ResourceRights - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - publicationDate = schemas.DateTimeSchema - organization = schemas.StrSchema - parentScore = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class samples( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'samples': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'sharing_key': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'privacy': (ScorePrivacy,), # noqa: E501 + 'user': (UserPublicSummary,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + 'subtitle': (str,), # noqa: E501 + 'lyricist': (str,), # noqa: E501 + 'arranger': (str,), # noqa: E501 + 'composer': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'creation_type': (ScoreCreationType,), # noqa: E501 + 'license': (ScoreLicense,), # noqa: E501 + 'license_text': (str,), # noqa: E501 + 'duration_time': (float,), # noqa: E501 + 'number_measures': (int,), # noqa: E501 + 'main_tempo_qpm': (float,), # noqa: E501 + 'rights': (ResourceRights,), # noqa: E501 + 'collaborators': ([ResourceCollaborator],), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'publication_date': (datetime,), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'parent_score': (str,), # noqa: E501 + 'instruments': ([str],), # noqa: E501 + 'samples': ([str],), # noqa: E501 + 'google_drive_file_id': (str,), # noqa: E501 + 'likes': (ScoreLikesCounts,), # noqa: E501 + 'comments': (ScoreCommentsCounts,), # noqa: E501 + 'views': (ScoreViewsCounts,), # noqa: E501 + 'plays': (ScorePlaysCounts,), # noqa: E501 + 'collections': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'sharing_key': 'sharingKey', # noqa: E501 + 'title': 'title', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + 'user': 'user', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + 'subtitle': 'subtitle', # noqa: E501 + 'lyricist': 'lyricist', # noqa: E501 + 'arranger': 'arranger', # noqa: E501 + 'composer': 'composer', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'creation_type': 'creationType', # noqa: E501 + 'license': 'license', # noqa: E501 + 'license_text': 'licenseText', # noqa: E501 + 'duration_time': 'durationTime', # noqa: E501 + 'number_measures': 'numberMeasures', # noqa: E501 + 'main_tempo_qpm': 'mainTempoQpm', # noqa: E501 + 'rights': 'rights', # noqa: E501 + 'collaborators': 'collaborators', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'publication_date': 'publicationDate', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'parent_score': 'parentScore', # noqa: E501 + 'instruments': 'instruments', # noqa: E501 + 'samples': 'samples', # noqa: E501 + 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 + 'likes': 'likes', # noqa: E501 + 'comments': 'comments', # noqa: E501 + 'views': 'views', # noqa: E501 + 'plays': 'plays', # noqa: E501 + 'collections': 'collections', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the score. [optional] # noqa: E501 + sharing_key (str): The private sharing key of the score (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 + title (str): The title of the score. [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + user (UserPublicSummary): [optional] # noqa: E501 + html_url (str): The url where the score can be viewed in a web browser. [optional] # noqa: E501 + subtitle (str): Subtitle of the score. [optional] # noqa: E501 + lyricist (str): Lyricist of the score. [optional] # noqa: E501 + arranger (str): Arranger of the score. [optional] # noqa: E501 + composer (str): Composer of the score. [optional] # noqa: E501 + description (str): Description of the creation. [optional] # noqa: E501 + tags ([str]): Tags describing the score. [optional] # noqa: E501 + creation_type (ScoreCreationType): [optional] # noqa: E501 + license (ScoreLicense): [optional] # noqa: E501 + license_text (str): Additional license text written on the exported/printed score. [optional] # noqa: E501 + duration_time (float): In seconds, an approximative duration of the score. [optional] # noqa: E501 + number_measures (int): The number of measures in the score. [optional] # noqa: E501 + main_tempo_qpm (float): The main tempo of the score (in QPM). [optional] # noqa: E501 + rights (ResourceRights): [optional] # noqa: E501 + collaborators ([ResourceCollaborator]): The list of the collaborators of the score. [optional] # noqa: E501 + creation_date (datetime): The date when the score was created. [optional] # noqa: E501 + modification_date (datetime): The date of the last revision of the score. [optional] # noqa: E501 + publication_date (datetime): The date when the score was published on Flat. [optional] # noqa: E501 + organization (str): If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. . [optional] # noqa: E501 + parent_score (str): If the score has been forked, the unique identifier of the parent score. . [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + samples ([str]): An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. . [optional] # noqa: E501 + google_drive_file_id (str): If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` . [optional] # noqa: E501 + likes (ScoreLikesCounts): [optional] # noqa: E501 + comments (ScoreCommentsCounts): [optional] # noqa: E501 + views (ScoreViewsCounts): [optional] # noqa: E501 + plays (ScorePlaysCounts): [optional] # noqa: E501 + collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - googleDriveFileId = schemas.StrSchema - - @staticmethod - def likes() -> typing.Type['ScoreLikesCounts']: - return ScoreLikesCounts - - @staticmethod - def comments() -> typing.Type['ScoreCommentsCounts']: - return ScoreCommentsCounts - - @staticmethod - def views() -> typing.Type['ScoreViewsCounts']: - return ScoreViewsCounts - - @staticmethod - def plays() -> typing.Type['ScorePlaysCounts']: - return ScorePlaysCounts - - - class collections( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collections': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the score. [optional] # noqa: E501 + sharing_key (str): The private sharing key of the score (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 + title (str): The title of the score. [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + user (UserPublicSummary): [optional] # noqa: E501 + html_url (str): The url where the score can be viewed in a web browser. [optional] # noqa: E501 + subtitle (str): Subtitle of the score. [optional] # noqa: E501 + lyricist (str): Lyricist of the score. [optional] # noqa: E501 + arranger (str): Arranger of the score. [optional] # noqa: E501 + composer (str): Composer of the score. [optional] # noqa: E501 + description (str): Description of the creation. [optional] # noqa: E501 + tags ([str]): Tags describing the score. [optional] # noqa: E501 + creation_type (ScoreCreationType): [optional] # noqa: E501 + license (ScoreLicense): [optional] # noqa: E501 + license_text (str): Additional license text written on the exported/printed score. [optional] # noqa: E501 + duration_time (float): In seconds, an approximative duration of the score. [optional] # noqa: E501 + number_measures (int): The number of measures in the score. [optional] # noqa: E501 + main_tempo_qpm (float): The main tempo of the score (in QPM). [optional] # noqa: E501 + rights (ResourceRights): [optional] # noqa: E501 + collaborators ([ResourceCollaborator]): The list of the collaborators of the score. [optional] # noqa: E501 + creation_date (datetime): The date when the score was created. [optional] # noqa: E501 + modification_date (datetime): The date of the last revision of the score. [optional] # noqa: E501 + publication_date (datetime): The date when the score was published on Flat. [optional] # noqa: E501 + organization (str): If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. . [optional] # noqa: E501 + parent_score (str): If the score has been forked, the unique identifier of the parent score. . [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + samples ([str]): An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. . [optional] # noqa: E501 + google_drive_file_id (str): If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` . [optional] # noqa: E501 + likes (ScoreLikesCounts): [optional] # noqa: E501 + comments (ScoreCommentsCounts): [optional] # noqa: E501 + views (ScoreViewsCounts): [optional] # noqa: E501 + plays (ScorePlaysCounts): [optional] # noqa: E501 + collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "sharingKey": sharingKey, - "title": title, - "privacy": privacy, - "user": user, - "htmlUrl": htmlUrl, - "subtitle": subtitle, - "lyricist": lyricist, - "arranger": arranger, - "composer": composer, - "description": description, - "tags": tags, - "creationType": creationType, - "license": license, - "licenseText": licenseText, - "durationTime": durationTime, - "numberMeasures": numberMeasures, - "mainTempoQpm": mainTempoQpm, - "rights": rights, - "collaborators": collaborators, - "creationDate": creationDate, - "modificationDate": modificationDate, - "publicationDate": publicationDate, - "organization": organization, - "parentScore": parentScore, - "instruments": instruments, - "samples": samples, - "googleDriveFileId": googleDriveFileId, - "likes": likes, - "comments": comments, - "views": views, - "plays": plays, - "collections": collections, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["durationTime"]) -> MetaOapg.properties.durationTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["numberMeasures"]) -> MetaOapg.properties.numberMeasures: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mainTempoQpm"]) -> MetaOapg.properties.mainTempoQpm: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["publicationDate"]) -> MetaOapg.properties.publicationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentScore"]) -> MetaOapg.properties.parentScore: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["samples"]) -> MetaOapg.properties.samples: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likes"]) -> 'ScoreLikesCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comments"]) -> 'ScoreCommentsCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["views"]) -> 'ScoreViewsCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["plays"]) -> 'ScorePlaysCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["durationTime"]) -> typing.Union[MetaOapg.properties.durationTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["numberMeasures"]) -> typing.Union[MetaOapg.properties.numberMeasures, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mainTempoQpm"]) -> typing.Union[MetaOapg.properties.mainTempoQpm, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["publicationDate"]) -> typing.Union[MetaOapg.properties.publicationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentScore"]) -> typing.Union[MetaOapg.properties.parentScore, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["samples"]) -> typing.Union[MetaOapg.properties.samples, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likes"]) -> typing.Union['ScoreLikesCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union['ScoreCommentsCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["views"]) -> typing.Union['ScoreViewsCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["plays"]) -> typing.Union['ScorePlaysCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, - lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, - arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, - composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, - license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, - licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, - durationTime: typing.Union[MetaOapg.properties.durationTime, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - numberMeasures: typing.Union[MetaOapg.properties.numberMeasures, decimal.Decimal, int, schemas.Unset] = schemas.unset, - mainTempoQpm: typing.Union[MetaOapg.properties.mainTempoQpm, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - publicationDate: typing.Union[MetaOapg.properties.publicationDate, str, datetime, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - parentScore: typing.Union[MetaOapg.properties.parentScore, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - samples: typing.Union[MetaOapg.properties.samples, list, tuple, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - likes: typing.Union['ScoreLikesCounts', schemas.Unset] = schemas.unset, - comments: typing.Union['ScoreCommentsCounts', schemas.Unset] = schemas.unset, - views: typing.Union['ScoreViewsCounts', schemas.Unset] = schemas.unset, - plays: typing.Union['ScorePlaysCounts', schemas.Unset] = schemas.unset, - collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreDetails': - return super().__new__( - cls, - *_args, - id=id, - sharingKey=sharingKey, - title=title, - privacy=privacy, - user=user, - htmlUrl=htmlUrl, - subtitle=subtitle, - lyricist=lyricist, - arranger=arranger, - composer=composer, - description=description, - tags=tags, - creationType=creationType, - license=license, - licenseText=licenseText, - durationTime=durationTime, - numberMeasures=numberMeasures, - mainTempoQpm=mainTempoQpm, - rights=rights, - collaborators=collaborators, - creationDate=creationDate, - modificationDate=modificationDate, - publicationDate=publicationDate, - organization=organization, - parentScore=parentScore, - instruments=instruments, - samples=samples, - googleDriveFileId=googleDriveFileId, - likes=likes, - comments=comments, - views=views, - plays=plays, - collections=collections, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.score_comments_counts import ScoreCommentsCounts -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_likes_counts import ScoreLikesCounts -from flat_api.model.score_plays_counts import ScorePlaysCounts -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_views_counts import ScoreViewsCounts -from flat_api.model.user_public_summary import UserPublicSummary + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_details.pyi b/flat_api/model/score_details.pyi deleted file mode 100644 index b8daa87..0000000 --- a/flat_api/model/score_details.pyi +++ /dev/null @@ -1,555 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreDetails( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - sharingKey = schemas.StrSchema - title = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - - @staticmethod - def user() -> typing.Type['UserPublicSummary']: - return UserPublicSummary - htmlUrl = schemas.StrSchema - subtitle = schemas.StrSchema - lyricist = schemas.StrSchema - arranger = schemas.StrSchema - composer = schemas.StrSchema - description = schemas.StrSchema - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.StrSchema - ): - pass - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def creationType() -> typing.Type['ScoreCreationType']: - return ScoreCreationType - - @staticmethod - def license() -> typing.Type['ScoreLicense']: - return ScoreLicense - licenseText = schemas.StrSchema - durationTime = schemas.NumberSchema - numberMeasures = schemas.IntSchema - mainTempoQpm = schemas.NumberSchema - - @staticmethod - def rights() -> typing.Type['ResourceRights']: - return ResourceRights - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - publicationDate = schemas.DateTimeSchema - organization = schemas.StrSchema - parentScore = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class samples( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'samples': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - googleDriveFileId = schemas.StrSchema - - @staticmethod - def likes() -> typing.Type['ScoreLikesCounts']: - return ScoreLikesCounts - - @staticmethod - def comments() -> typing.Type['ScoreCommentsCounts']: - return ScoreCommentsCounts - - @staticmethod - def views() -> typing.Type['ScoreViewsCounts']: - return ScoreViewsCounts - - @staticmethod - def plays() -> typing.Type['ScorePlaysCounts']: - return ScorePlaysCounts - - - class collections( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collections': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "sharingKey": sharingKey, - "title": title, - "privacy": privacy, - "user": user, - "htmlUrl": htmlUrl, - "subtitle": subtitle, - "lyricist": lyricist, - "arranger": arranger, - "composer": composer, - "description": description, - "tags": tags, - "creationType": creationType, - "license": license, - "licenseText": licenseText, - "durationTime": durationTime, - "numberMeasures": numberMeasures, - "mainTempoQpm": mainTempoQpm, - "rights": rights, - "collaborators": collaborators, - "creationDate": creationDate, - "modificationDate": modificationDate, - "publicationDate": publicationDate, - "organization": organization, - "parentScore": parentScore, - "instruments": instruments, - "samples": samples, - "googleDriveFileId": googleDriveFileId, - "likes": likes, - "comments": comments, - "views": views, - "plays": plays, - "collections": collections, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'UserPublicSummary': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["durationTime"]) -> MetaOapg.properties.durationTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["numberMeasures"]) -> MetaOapg.properties.numberMeasures: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mainTempoQpm"]) -> MetaOapg.properties.mainTempoQpm: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["rights"]) -> 'ResourceRights': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["publicationDate"]) -> MetaOapg.properties.publicationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentScore"]) -> MetaOapg.properties.parentScore: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["samples"]) -> MetaOapg.properties.samples: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDriveFileId"]) -> MetaOapg.properties.googleDriveFileId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likes"]) -> 'ScoreLikesCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comments"]) -> 'ScoreCommentsCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["views"]) -> 'ScoreViewsCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["plays"]) -> 'ScorePlaysCounts': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collections"]) -> MetaOapg.properties.collections: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union['UserPublicSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["durationTime"]) -> typing.Union[MetaOapg.properties.durationTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["numberMeasures"]) -> typing.Union[MetaOapg.properties.numberMeasures, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mainTempoQpm"]) -> typing.Union[MetaOapg.properties.mainTempoQpm, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["rights"]) -> typing.Union['ResourceRights', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["publicationDate"]) -> typing.Union[MetaOapg.properties.publicationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentScore"]) -> typing.Union[MetaOapg.properties.parentScore, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["samples"]) -> typing.Union[MetaOapg.properties.samples, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDriveFileId"]) -> typing.Union[MetaOapg.properties.googleDriveFileId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likes"]) -> typing.Union['ScoreLikesCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comments"]) -> typing.Union['ScoreCommentsCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["views"]) -> typing.Union['ScoreViewsCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["plays"]) -> typing.Union['ScorePlaysCounts', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collections"]) -> typing.Union[MetaOapg.properties.collections, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - user: typing.Union['UserPublicSummary', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, - lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, - arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, - composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, - license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, - licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, - durationTime: typing.Union[MetaOapg.properties.durationTime, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - numberMeasures: typing.Union[MetaOapg.properties.numberMeasures, decimal.Decimal, int, schemas.Unset] = schemas.unset, - mainTempoQpm: typing.Union[MetaOapg.properties.mainTempoQpm, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - rights: typing.Union['ResourceRights', schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - publicationDate: typing.Union[MetaOapg.properties.publicationDate, str, datetime, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - parentScore: typing.Union[MetaOapg.properties.parentScore, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - samples: typing.Union[MetaOapg.properties.samples, list, tuple, schemas.Unset] = schemas.unset, - googleDriveFileId: typing.Union[MetaOapg.properties.googleDriveFileId, str, schemas.Unset] = schemas.unset, - likes: typing.Union['ScoreLikesCounts', schemas.Unset] = schemas.unset, - comments: typing.Union['ScoreCommentsCounts', schemas.Unset] = schemas.unset, - views: typing.Union['ScoreViewsCounts', schemas.Unset] = schemas.unset, - plays: typing.Union['ScorePlaysCounts', schemas.Unset] = schemas.unset, - collections: typing.Union[MetaOapg.properties.collections, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreDetails': - return super().__new__( - cls, - *_args, - id=id, - sharingKey=sharingKey, - title=title, - privacy=privacy, - user=user, - htmlUrl=htmlUrl, - subtitle=subtitle, - lyricist=lyricist, - arranger=arranger, - composer=composer, - description=description, - tags=tags, - creationType=creationType, - license=license, - licenseText=licenseText, - durationTime=durationTime, - numberMeasures=numberMeasures, - mainTempoQpm=mainTempoQpm, - rights=rights, - collaborators=collaborators, - creationDate=creationDate, - modificationDate=modificationDate, - publicationDate=publicationDate, - organization=organization, - parentScore=parentScore, - instruments=instruments, - samples=samples, - googleDriveFileId=googleDriveFileId, - likes=likes, - comments=comments, - views=views, - plays=plays, - collections=collections, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.score_comments_counts import ScoreCommentsCounts -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_likes_counts import ScoreLikesCounts -from flat_api.model.score_plays_counts import ScorePlaysCounts -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_views_counts import ScoreViewsCounts -from flat_api.model.user_public_summary import UserPublicSummary diff --git a/flat_api/model/score_fork.py b/flat_api/model/score_fork.py index c237dcd..c6becd8 100644 --- a/flat_api/model/score_fork.py +++ b/flat_api/model/score_fork.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,101 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreFork( - schemas.DictSchema -): +class ScoreFork(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Options to fork the score + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'collection': (str, none_type,), # noqa: E501 + 'keep_original_title': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'collection': 'collection', # noqa: E501 + 'keep_original_title': 'keepOriginalTitle', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreFork - a model defined in OpenAPI - class MetaOapg: - - class properties: - - - class collection( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collection': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + collection (str, none_type): Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections . [optional] if omitted the server will use the default value of "root" # noqa: E501 + keep_original_title (bool): Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - keepOriginalTitle = schemas.BoolSchema - __annotations__ = { - "collection": collection, - "keepOriginalTitle": keepOriginalTitle, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> MetaOapg.properties.keepOriginalTitle: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> typing.Union[MetaOapg.properties.keepOriginalTitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - collection: typing.Union[MetaOapg.properties.collection, None, str, schemas.Unset] = schemas.unset, - keepOriginalTitle: typing.Union[MetaOapg.properties.keepOriginalTitle, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreFork': - return super().__new__( - cls, - *_args, - collection=collection, - keepOriginalTitle=keepOriginalTitle, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreFork - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + collection (str, none_type): Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections . [optional] if omitted the server will use the default value of "root" # noqa: E501 + keep_original_title (bool): Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_fork.pyi b/flat_api/model/score_fork.pyi deleted file mode 100644 index c237dcd..0000000 --- a/flat_api/model/score_fork.pyi +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreFork( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Options to fork the score - """ - - - class MetaOapg: - - class properties: - - - class collection( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collection': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - keepOriginalTitle = schemas.BoolSchema - __annotations__ = { - "collection": collection, - "keepOriginalTitle": keepOriginalTitle, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collection"]) -> MetaOapg.properties.collection: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> MetaOapg.properties.keepOriginalTitle: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collection"]) -> typing.Union[MetaOapg.properties.collection, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keepOriginalTitle"]) -> typing.Union[MetaOapg.properties.keepOriginalTitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["collection", "keepOriginalTitle", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - collection: typing.Union[MetaOapg.properties.collection, None, str, schemas.Unset] = schemas.unset, - keepOriginalTitle: typing.Union[MetaOapg.properties.keepOriginalTitle, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreFork': - return super().__new__( - cls, - *_args, - collection=collection, - keepOriginalTitle=keepOriginalTitle, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_license.py b/flat_api/model/score_license.py index 697d33e..e08c783 100644 --- a/flat_api/model/score_license.py +++ b/flat_api/model/score_license.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,74 +8,290 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreLicense( - schemas.EnumBase, - schemas.StrSchema -): +class ScoreLicense(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'COPYRIGHT': "copyright", + 'CC0': "cc0", + 'CC-BY': "cc-by", + 'CC-BY-SA': "cc-by-sa", + 'CC-BY-ND': "cc-by-nd", + 'CC-BY-NC': "cc-by-nc", + 'CC-BY-NC-SA': "cc-by-nc-sa", + 'CC-BY-NC-ND': "cc-by-nc-nd", + }, + } + + validations = { + } - class MetaOapg: - enum_value_to_name = { - "copyright": "COPYRIGHT", - "cc0": "CC0", - "cc-by": "CCBY", - "cc-by-sa": "CCBYSA", - "cc-by-nd": "CCBYND", - "cc-by-nc": "CCBYNC", - "cc-by-nc-sa": "CCBYNCSA", - "cc-by-nc-nd": "CCBYNCND", + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def COPYRIGHT(cls): - return cls("copyright") - - @schemas.classproperty - def CC0(cls): - return cls("cc0") - - @schemas.classproperty - def CCBY(cls): - return cls("cc-by") - - @schemas.classproperty - def CCBYSA(cls): - return cls("cc-by-sa") - - @schemas.classproperty - def CCBYND(cls): - return cls("cc-by-nd") - - @schemas.classproperty - def CCBYNC(cls): - return cls("cc-by-nc") - - @schemas.classproperty - def CCBYNCSA(cls): - return cls("cc-by-nc-sa") - - @schemas.classproperty - def CCBYNCND(cls): - return cls("cc-by-nc-nd") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ScoreLicense - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 + + Keyword Args: + value (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScoreLicense - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 + + Keyword Args: + value (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/score_license.pyi b/flat_api/model/score_license.pyi deleted file mode 100644 index 3df3a5f..0000000 --- a/flat_api/model/score_license.pyi +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreLicense( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ - - """ - - @schemas.classproperty - def COPYRIGHT(cls): - return cls("copyright") - - @schemas.classproperty - def CC0(cls): - return cls("cc0") - - @schemas.classproperty - def CCBY(cls): - return cls("cc-by") - - @schemas.classproperty - def CCBYSA(cls): - return cls("cc-by-sa") - - @schemas.classproperty - def CCBYND(cls): - return cls("cc-by-nd") - - @schemas.classproperty - def CCBYNC(cls): - return cls("cc-by-nc") - - @schemas.classproperty - def CCBYNCSA(cls): - return cls("cc-by-nc-sa") - - @schemas.classproperty - def CCBYNCND(cls): - return cls("cc-by-nc-nd") diff --git a/flat_api/model/score_likes_counts.py b/flat_api/model/score_likes_counts.py index 23cceae..3cd6e97 100644 --- a/flat_api/model/score_likes_counts.py +++ b/flat_api/model/score_likes_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,94 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreLikesCounts( - schemas.DictSchema -): +class ScoreLikesCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A computed version of the weekly, monthly and total of number of likes -for a score - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'total': (float,), # noqa: E501 + 'weekly': (float,), # noqa: E501 + 'monthly': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'weekly': 'weekly', # noqa: E501 + 'monthly': 'monthly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreLikesCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of likes of the score. [optional] # noqa: E501 + weekly (float): The number of new likes during the last week. [optional] # noqa: E501 + monthly (float): The number of new likes during the last month. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreLikesCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of likes of the score. [optional] # noqa: E501 + weekly (float): The number of new likes during the last week. [optional] # noqa: E501 + monthly (float): The number of new likes during the last month. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreLikesCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_likes_counts.pyi b/flat_api/model/score_likes_counts.pyi deleted file mode 100644 index 23cceae..0000000 --- a/flat_api/model/score_likes_counts.pyi +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreLikesCounts( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A computed version of the weekly, monthly and total of number of likes -for a score - - """ - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreLikesCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_modification.py b/flat_api/model/score_modification.py index 8ca5710..a32f5dc 100644 --- a/flat_api/model/score_modification.py +++ b/flat_api/model/score_modification.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,235 +8,319 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_creation_type import ScoreCreationType + from flat_api.model.score_license import ScoreLicense + from flat_api.model.score_privacy import ScorePrivacy + globals()['ScoreCreationType'] = ScoreCreationType + globals()['ScoreLicense'] = ScoreLicense + globals()['ScorePrivacy'] = ScorePrivacy -class ScoreModification( - schemas.DictSchema -): + +class ScoreModification(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Edit the score metadata + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('sharing_key',): { + 'regex': { + 'pattern': r'^[a-f0-9]{128}$', # noqa: E501 + }, + }, + ('description',): { + 'max_length': 2000, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'subtitle': (str,), # noqa: E501 + 'composer': (str,), # noqa: E501 + 'lyricist': (str,), # noqa: E501 + 'arranger': (str,), # noqa: E501 + 'privacy': (ScorePrivacy,), # noqa: E501 + 'sharing_key': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'creation_type': (ScoreCreationType,), # noqa: E501 + 'license': (ScoreLicense,), # noqa: E501 + 'license_text': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'subtitle': 'subtitle', # noqa: E501 + 'composer': 'composer', # noqa: E501 + 'lyricist': 'lyricist', # noqa: E501 + 'arranger': 'arranger', # noqa: E501 + 'privacy': 'privacy', # noqa: E501 + 'sharing_key': 'sharingKey', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'creation_type': 'creationType', # noqa: E501 + 'license': 'license', # noqa: E501 + 'license_text': 'licenseText', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreModification - a model defined in OpenAPI - class MetaOapg: - - class properties: - title = schemas.StrSchema - subtitle = schemas.StrSchema - composer = schemas.StrSchema - lyricist = schemas.StrSchema - arranger = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - - - class sharingKey( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[a-f0-9]{128}$', # noqa: E501 - }] - - - class description( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 2000 - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the score. [optional] # noqa: E501 + subtitle (str): The subtitle of the score. [optional] # noqa: E501 + composer (str): The composer of the score. [optional] # noqa: E501 + lyricist (str): The lyricist of the score. [optional] # noqa: E501 + arranger (str): The arranger of the score. [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + sharing_key (str): When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.. [optional] # noqa: E501 + description (str): Description of the creation. [optional] # noqa: E501 + tags ([str]): Tags describing the score. [optional] # noqa: E501 + creation_type (ScoreCreationType): [optional] # noqa: E501 + license (ScoreLicense): [optional] # noqa: E501 + license_text (str): The rights info written on the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def creationType() -> typing.Type['ScoreCreationType']: - return ScoreCreationType - - @staticmethod - def license() -> typing.Type['ScoreLicense']: - return ScoreLicense - licenseText = schemas.StrSchema - __annotations__ = { - "title": title, - "subtitle": subtitle, - "composer": composer, - "lyricist": lyricist, - "arranger": arranger, - "privacy": privacy, - "sharingKey": sharingKey, - "description": description, - "tags": tags, - "creationType": creationType, - "license": license, - "licenseText": licenseText, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, - composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, - lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, - arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, - license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, - licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreModification': - return super().__new__( - cls, - *_args, - title=title, - subtitle=subtitle, - composer=composer, - lyricist=lyricist, - arranger=arranger, - privacy=privacy, - sharingKey=sharingKey, - description=description, - tags=tags, - creationType=creationType, - license=license, - licenseText=licenseText, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_privacy import ScorePrivacy + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreModification - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): The title of the score. [optional] # noqa: E501 + subtitle (str): The subtitle of the score. [optional] # noqa: E501 + composer (str): The composer of the score. [optional] # noqa: E501 + lyricist (str): The lyricist of the score. [optional] # noqa: E501 + arranger (str): The arranger of the score. [optional] # noqa: E501 + privacy (ScorePrivacy): [optional] # noqa: E501 + sharing_key (str): When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.. [optional] # noqa: E501 + description (str): Description of the creation. [optional] # noqa: E501 + tags ([str]): Tags describing the score. [optional] # noqa: E501 + creation_type (ScoreCreationType): [optional] # noqa: E501 + license (ScoreLicense): [optional] # noqa: E501 + license_text (str): The rights info written on the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_modification.pyi b/flat_api/model/score_modification.pyi deleted file mode 100644 index 35bd490..0000000 --- a/flat_api/model/score_modification.pyi +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreModification( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Edit the score metadata - """ - - - class MetaOapg: - - class properties: - title = schemas.StrSchema - subtitle = schemas.StrSchema - composer = schemas.StrSchema - lyricist = schemas.StrSchema - arranger = schemas.StrSchema - - @staticmethod - def privacy() -> typing.Type['ScorePrivacy']: - return ScorePrivacy - - - class sharingKey( - schemas.StrSchema - ): - pass - - - class description( - schemas.StrSchema - ): - pass - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def creationType() -> typing.Type['ScoreCreationType']: - return ScoreCreationType - - @staticmethod - def license() -> typing.Type['ScoreLicense']: - return ScoreLicense - licenseText = schemas.StrSchema - __annotations__ = { - "title": title, - "subtitle": subtitle, - "composer": composer, - "lyricist": lyricist, - "arranger": arranger, - "privacy": privacy, - "sharingKey": sharingKey, - "description": description, - "tags": tags, - "creationType": creationType, - "license": license, - "licenseText": licenseText, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["subtitle"]) -> MetaOapg.properties.subtitle: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["composer"]) -> MetaOapg.properties.composer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lyricist"]) -> MetaOapg.properties.lyricist: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arranger"]) -> MetaOapg.properties.arranger: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privacy"]) -> 'ScorePrivacy': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sharingKey"]) -> MetaOapg.properties.sharingKey: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationType"]) -> 'ScoreCreationType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> 'ScoreLicense': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["licenseText"]) -> MetaOapg.properties.licenseText: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["subtitle"]) -> typing.Union[MetaOapg.properties.subtitle, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["composer"]) -> typing.Union[MetaOapg.properties.composer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lyricist"]) -> typing.Union[MetaOapg.properties.lyricist, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arranger"]) -> typing.Union[MetaOapg.properties.arranger, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privacy"]) -> typing.Union['ScorePrivacy', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sharingKey"]) -> typing.Union[MetaOapg.properties.sharingKey, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationType"]) -> typing.Union['ScoreCreationType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union['ScoreLicense', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["licenseText"]) -> typing.Union[MetaOapg.properties.licenseText, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - subtitle: typing.Union[MetaOapg.properties.subtitle, str, schemas.Unset] = schemas.unset, - composer: typing.Union[MetaOapg.properties.composer, str, schemas.Unset] = schemas.unset, - lyricist: typing.Union[MetaOapg.properties.lyricist, str, schemas.Unset] = schemas.unset, - arranger: typing.Union[MetaOapg.properties.arranger, str, schemas.Unset] = schemas.unset, - privacy: typing.Union['ScorePrivacy', schemas.Unset] = schemas.unset, - sharingKey: typing.Union[MetaOapg.properties.sharingKey, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - creationType: typing.Union['ScoreCreationType', schemas.Unset] = schemas.unset, - license: typing.Union['ScoreLicense', schemas.Unset] = schemas.unset, - licenseText: typing.Union[MetaOapg.properties.licenseText, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreModification': - return super().__new__( - cls, - *_args, - title=title, - subtitle=subtitle, - composer=composer, - lyricist=lyricist, - arranger=arranger, - privacy=privacy, - sharingKey=sharingKey, - description=description, - tags=tags, - creationType=creationType, - license=license, - licenseText=licenseText, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_privacy import ScorePrivacy diff --git a/flat_api/model/score_plays_counts.py b/flat_api/model/score_plays_counts.py index 937a41b..7667e75 100644 --- a/flat_api/model/score_plays_counts.py +++ b/flat_api/model/score_plays_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,94 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScorePlaysCounts( - schemas.DictSchema -): +class ScorePlaysCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A computed version of the total, weekly, and monthly number of plays of -the score - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'total': (float,), # noqa: E501 + 'weekly': (float,), # noqa: E501 + 'monthly': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'weekly': 'weekly', # noqa: E501 + 'monthly': 'monthly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScorePlaysCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of plays of the score. [optional] # noqa: E501 + weekly (float): The weekly number of plays of the score. [optional] # noqa: E501 + monthly (float): The monthly number of plays of the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScorePlaysCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of plays of the score. [optional] # noqa: E501 + weekly (float): The weekly number of plays of the score. [optional] # noqa: E501 + monthly (float): The monthly number of plays of the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScorePlaysCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_plays_counts.pyi b/flat_api/model/score_plays_counts.pyi deleted file mode 100644 index 937a41b..0000000 --- a/flat_api/model/score_plays_counts.pyi +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScorePlaysCounts( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A computed version of the total, weekly, and monthly number of plays of -the score - - """ - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScorePlaysCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_privacy.py b/flat_api/model/score_privacy.py index 8ba59a9..7f5bc03 100644 --- a/flat_api/model/score_privacy.py +++ b/flat_api/model/score_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,65 +8,278 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScorePrivacy( - schemas.EnumBase, - schemas.StrSchema -): +class ScorePrivacy(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The score main privacy mode. - -- `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. -- `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. -- `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. -- `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ -The score can also be individually shared to a set of users or groups using the different collaborators API methods. + allowed_values = { + ('value',): { + 'PUBLIC': "public", + 'PRIVATE': "private", + 'ORGANIZATIONPUBLIC': "organizationPublic", + 'PRIVATELINK': "privateLink", + }, + } -When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. + validations = { + } -When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + additional_properties_type = None - """ + _nullable = False + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - enum_value_to_name = { - "public": "PUBLIC", - "private": "PRIVATE", - "organizationPublic": "ORGANIZATION_PUBLIC", - "privateLink": "PRIVATE_LINK", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def ORGANIZATION_PUBLIC(cls): - return cls("organizationPublic") - - @schemas.classproperty - def PRIVATE_LINK(cls): - return cls("privateLink") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ScorePrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 + + Keyword Args: + value (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScorePrivacy - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 + + Keyword Args: + value (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "private" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/score_privacy.pyi b/flat_api/model/score_privacy.pyi deleted file mode 100644 index f54a180..0000000 --- a/flat_api/model/score_privacy.pyi +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScorePrivacy( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The score main privacy mode. - -- `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. -- `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. -- `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. -- `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. - -The score can also be individually shared to a set of users or groups using the different collaborators API methods. - -When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. - -When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). - - """ - - @schemas.classproperty - def PUBLIC(cls): - return cls("public") - - @schemas.classproperty - def PRIVATE(cls): - return cls("private") - - @schemas.classproperty - def ORGANIZATION_PUBLIC(cls): - return cls("organizationPublic") - - @schemas.classproperty - def PRIVATE_LINK(cls): - return cls("privateLink") diff --git a/flat_api/model/score_revision.py b/flat_api/model/score_revision.py index f00e940..ee0b419 100644 --- a/flat_api/model/score_revision.py +++ b/flat_api/model/score_revision.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,169 +8,291 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_revision_statistics import ScoreRevisionStatistics + globals()['ScoreRevisionStatistics'] = ScoreRevisionStatistics -class ScoreRevision( - schemas.DictSchema -): + +class ScoreRevision(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A score revision metadata + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'user': (str,), # noqa: E501 + 'collaborators': ([str],), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'event': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'autosave': (bool,), # noqa: E501 + 'statistics': (ScoreRevisionStatistics,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'user': 'user', # noqa: E501 + 'collaborators': 'collaborators', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'event': 'event', # noqa: E501 + 'description': 'description', # noqa: E501 + 'autosave': 'autosave', # noqa: E501 + 'statistics': 'statistics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreRevision - a model defined in OpenAPI - class MetaOapg: - - class properties: - id = schemas.StrSchema - user = schemas.StrSchema - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the revision.. [optional] # noqa: E501 + user (str): The user identifier who created the revision. [optional] # noqa: E501 + collaborators ([str]): [optional] # noqa: E501 + creation_date (datetime): The date when this revision was created. [optional] # noqa: E501 + event (str): The last event (action id) of the revision. [optional] # noqa: E501 + description (str): A description associated to the revision. [optional] # noqa: E501 + autosave (bool): True if this revision was automatically generated by Flat and not on purpose by the user. . [optional] # noqa: E501 + statistics (ScoreRevisionStatistics): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - creationDate = schemas.DateTimeSchema - event = schemas.StrSchema - description = schemas.StrSchema - autosave = schemas.BoolSchema - - @staticmethod - def statistics() -> typing.Type['ScoreRevisionStatistics']: - return ScoreRevisionStatistics - __annotations__ = { - "id": id, - "user": user, - "collaborators": collaborators, - "creationDate": creationDate, - "event": event, - "description": description, - "autosave": autosave, - "statistics": statistics, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["event"]) -> MetaOapg.properties.event: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["statistics"]) -> 'ScoreRevisionStatistics': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["event"]) -> typing.Union[MetaOapg.properties.event, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["statistics"]) -> typing.Union['ScoreRevisionStatistics', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - event: typing.Union[MetaOapg.properties.event, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, - statistics: typing.Union['ScoreRevisionStatistics', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevision': - return super().__new__( - cls, - *_args, - id=id, - user=user, - collaborators=collaborators, - creationDate=creationDate, - event=event, - description=description, - autosave=autosave, - statistics=statistics, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_revision_statistics import ScoreRevisionStatistics + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreRevision - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the revision.. [optional] # noqa: E501 + user (str): The user identifier who created the revision. [optional] # noqa: E501 + collaborators ([str]): [optional] # noqa: E501 + creation_date (datetime): The date when this revision was created. [optional] # noqa: E501 + event (str): The last event (action id) of the revision. [optional] # noqa: E501 + description (str): A description associated to the revision. [optional] # noqa: E501 + autosave (bool): True if this revision was automatically generated by Flat and not on purpose by the user. . [optional] # noqa: E501 + statistics (ScoreRevisionStatistics): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_revision.pyi b/flat_api/model/score_revision.pyi deleted file mode 100644 index f00e940..0000000 --- a/flat_api/model/score_revision.pyi +++ /dev/null @@ -1,178 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreRevision( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A score revision metadata - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - user = schemas.StrSchema - - - class collaborators( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'collaborators': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - creationDate = schemas.DateTimeSchema - event = schemas.StrSchema - description = schemas.StrSchema - autosave = schemas.BoolSchema - - @staticmethod - def statistics() -> typing.Type['ScoreRevisionStatistics']: - return ScoreRevisionStatistics - __annotations__ = { - "id": id, - "user": user, - "collaborators": collaborators, - "creationDate": creationDate, - "event": event, - "description": description, - "autosave": autosave, - "statistics": statistics, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> MetaOapg.properties.user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["collaborators"]) -> MetaOapg.properties.collaborators: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["event"]) -> MetaOapg.properties.event: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["statistics"]) -> 'ScoreRevisionStatistics': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> typing.Union[MetaOapg.properties.user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["collaborators"]) -> typing.Union[MetaOapg.properties.collaborators, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["event"]) -> typing.Union[MetaOapg.properties.event, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["statistics"]) -> typing.Union['ScoreRevisionStatistics', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - user: typing.Union[MetaOapg.properties.user, str, schemas.Unset] = schemas.unset, - collaborators: typing.Union[MetaOapg.properties.collaborators, list, tuple, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - event: typing.Union[MetaOapg.properties.event, str, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, - statistics: typing.Union['ScoreRevisionStatistics', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevision': - return super().__new__( - cls, - *_args, - id=id, - user=user, - collaborators=collaborators, - creationDate=creationDate, - event=event, - description=description, - autosave=autosave, - statistics=statistics, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_revision_statistics import ScoreRevisionStatistics diff --git a/flat_api/model/score_revision_creation.py b/flat_api/model/score_revision_creation.py index 9a12cec..51dd147 100644 --- a/flat_api/model/score_revision_creation.py +++ b/flat_api/model/score_revision_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,122 +8,278 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreRevisionCreation( - schemas.DictSchema -): +class ScoreRevisionCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A new created revision + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('data_encoding',): { + 'BASE64': "base64", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "data", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'data': (str,), # noqa: E501 + 'data_encoding': (str,), # noqa: E501 + 'autosave': (bool,), # noqa: E501 + 'description': (str,), # noqa: E501 } - - class properties: - data = schemas.StrSchema - - - class dataEncoding( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "base64": "BASE64", - } - - @schemas.classproperty - def BASE64(cls): - return cls("base64") - autosave = schemas.BoolSchema - description = schemas.StrSchema - __annotations__ = { - "data": data, - "dataEncoding": dataEncoding, - "autosave": autosave, - "description": description, - } - - data: MetaOapg.properties.data - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - data: typing.Union[MetaOapg.properties.data, str, ], - dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, - autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevisionCreation': - return super().__new__( - cls, - *_args, - data=data, - dataEncoding=dataEncoding, - autosave=autosave, - description=description, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'data_encoding': 'dataEncoding', # noqa: E501 + 'autosave': 'autosave', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ScoreRevisionCreation - a model defined in OpenAPI + + Args: + data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 + autosave (bool): Must be set to `true` if the revision was created automatically. . [optional] # noqa: E501 + description (str): A description associated to the revision. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """ScoreRevisionCreation - a model defined in OpenAPI + + Args: + data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 + autosave (bool): Must be set to `true` if the revision was created automatically. . [optional] # noqa: E501 + description (str): A description associated to the revision. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_revision_creation.pyi b/flat_api/model/score_revision_creation.pyi deleted file mode 100644 index d58d283..0000000 --- a/flat_api/model/score_revision_creation.pyi +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreRevisionCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A new created revision - """ - - - class MetaOapg: - required = { - "data", - } - - class properties: - data = schemas.StrSchema - - - class dataEncoding( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def BASE64(cls): - return cls("base64") - autosave = schemas.BoolSchema - description = schemas.StrSchema - __annotations__ = { - "data": data, - "dataEncoding": dataEncoding, - "autosave": autosave, - "description": description, - } - - data: MetaOapg.properties.data - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataEncoding"]) -> MetaOapg.properties.dataEncoding: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["autosave"]) -> MetaOapg.properties.autosave: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataEncoding"]) -> typing.Union[MetaOapg.properties.dataEncoding, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["autosave"]) -> typing.Union[MetaOapg.properties.autosave, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "dataEncoding", "autosave", "description", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - data: typing.Union[MetaOapg.properties.data, str, ], - dataEncoding: typing.Union[MetaOapg.properties.dataEncoding, str, schemas.Unset] = schemas.unset, - autosave: typing.Union[MetaOapg.properties.autosave, bool, schemas.Unset] = schemas.unset, - description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevisionCreation': - return super().__new__( - cls, - *_args, - data=data, - dataEncoding=dataEncoding, - autosave=autosave, - description=description, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_revision_statistics.py b/flat_api/model/score_revision_statistics.py index a2fd3a9..ae848ee 100644 --- a/flat_api/model/score_revision_statistics.py +++ b/flat_api/model/score_revision_statistics.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,103 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreRevisionStatistics( - schemas.DictSchema -): +class ScoreRevisionStatistics(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The statistics related to the score revision (additions and deletions) - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'additions': (float,), # noqa: E501 + 'deletions': (float,), # noqa: E501 + 'start_date': (datetime,), # noqa: E501 + 'end_date': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'additions': 'additions', # noqa: E501 + 'deletions': 'deletions', # noqa: E501 + 'start_date': 'startDate', # noqa: E501 + 'end_date': 'endDate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreRevisionStatistics - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additions (float): The number of additions operations in the last revision. [optional] # noqa: E501 + deletions (float): The number of deletions operations in the last revision. [optional] # noqa: E501 + start_date (datetime): The date of the first action included in this revision. [optional] # noqa: E501 + end_date (datetime): The date of the latest action included in this revision. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreRevisionStatistics - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + additions (float): The number of additions operations in the last revision. [optional] # noqa: E501 + deletions (float): The number of deletions operations in the last revision. [optional] # noqa: E501 + start_date (datetime): The date of the first action included in this revision. [optional] # noqa: E501 + end_date (datetime): The date of the latest action included in this revision. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - additions = schemas.NumberSchema - deletions = schemas.NumberSchema - startDate = schemas.DateTimeSchema - endDate = schemas.DateTimeSchema - __annotations__ = { - "additions": additions, - "deletions": deletions, - "startDate": startDate, - "endDate": endDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additions"]) -> MetaOapg.properties.additions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deletions"]) -> MetaOapg.properties.deletions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startDate"]) -> MetaOapg.properties.startDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endDate"]) -> MetaOapg.properties.endDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additions"]) -> typing.Union[MetaOapg.properties.additions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deletions"]) -> typing.Union[MetaOapg.properties.deletions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startDate"]) -> typing.Union[MetaOapg.properties.startDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endDate"]) -> typing.Union[MetaOapg.properties.endDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - additions: typing.Union[MetaOapg.properties.additions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - deletions: typing.Union[MetaOapg.properties.deletions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - startDate: typing.Union[MetaOapg.properties.startDate, str, datetime, schemas.Unset] = schemas.unset, - endDate: typing.Union[MetaOapg.properties.endDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevisionStatistics': - return super().__new__( - cls, - *_args, - additions=additions, - deletions=deletions, - startDate=startDate, - endDate=endDate, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_revision_statistics.pyi b/flat_api/model/score_revision_statistics.pyi deleted file mode 100644 index a2fd3a9..0000000 --- a/flat_api/model/score_revision_statistics.pyi +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreRevisionStatistics( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The statistics related to the score revision (additions and deletions) - - """ - - - class MetaOapg: - - class properties: - additions = schemas.NumberSchema - deletions = schemas.NumberSchema - startDate = schemas.DateTimeSchema - endDate = schemas.DateTimeSchema - __annotations__ = { - "additions": additions, - "deletions": deletions, - "startDate": startDate, - "endDate": endDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additions"]) -> MetaOapg.properties.additions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deletions"]) -> MetaOapg.properties.deletions: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["startDate"]) -> MetaOapg.properties.startDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endDate"]) -> MetaOapg.properties.endDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additions"]) -> typing.Union[MetaOapg.properties.additions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deletions"]) -> typing.Union[MetaOapg.properties.deletions, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["startDate"]) -> typing.Union[MetaOapg.properties.startDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endDate"]) -> typing.Union[MetaOapg.properties.endDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additions", "deletions", "startDate", "endDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - additions: typing.Union[MetaOapg.properties.additions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - deletions: typing.Union[MetaOapg.properties.deletions, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - startDate: typing.Union[MetaOapg.properties.startDate, str, datetime, schemas.Unset] = schemas.unset, - endDate: typing.Union[MetaOapg.properties.endDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreRevisionStatistics': - return super().__new__( - cls, - *_args, - additions=additions, - deletions=deletions, - startDate=startDate, - endDate=endDate, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_source.py b/flat_api/model/score_source.py index ef8e8da..b1d3116 100644 --- a/flat_api/model/score_source.py +++ b/flat_api/model/score_source.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,70 +8,257 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreSource( - schemas.DictSchema -): +class ScoreSource(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'google_drive': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'google_drive': 'googleDrive', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreSource - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + google_drive (str): If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreSource - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + google_drive (str): If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - googleDrive = schemas.StrSchema - __annotations__ = { - "googleDrive": googleDrive, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - googleDrive: typing.Union[MetaOapg.properties.googleDrive, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreSource': - return super().__new__( - cls, - *_args, - googleDrive=googleDrive, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_source.pyi b/flat_api/model/score_source.pyi deleted file mode 100644 index ef8e8da..0000000 --- a/flat_api/model/score_source.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreSource( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - googleDrive = schemas.StrSchema - __annotations__ = { - "googleDrive": googleDrive, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["googleDrive"]) -> MetaOapg.properties.googleDrive: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["googleDrive"]) -> typing.Union[MetaOapg.properties.googleDrive, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["googleDrive", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - googleDrive: typing.Union[MetaOapg.properties.googleDrive, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreSource': - return super().__new__( - cls, - *_args, - googleDrive=googleDrive, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_track.py b/flat_api/model/score_track.py index 26e44e8..933525d 100644 --- a/flat_api/model/score_track.py +++ b/flat_api/model/score_track.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,217 +8,311 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_track_point import ScoreTrackPoint + from flat_api.model.score_track_state import ScoreTrackState + from flat_api.model.score_track_type import ScoreTrackType + globals()['ScoreTrackPoint'] = ScoreTrackPoint + globals()['ScoreTrackState'] = ScoreTrackState + globals()['ScoreTrackType'] = ScoreTrackType -class ScoreTrack( - schemas.DictSchema -): + +class ScoreTrack(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - An audio track for a score + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'creator': (str,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'default': (bool,), # noqa: E501 + 'state': (ScoreTrackState,), # noqa: E501 + 'type': (ScoreTrackType,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'media_id': (str,), # noqa: E501 + 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'score': 'score', # noqa: E501 + 'creator': 'creator', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'default': 'default', # noqa: E501 + 'state': 'state', # noqa: E501 + 'type': 'type', # noqa: E501 + 'url': 'url', # noqa: E501 + 'media_id': 'mediaId', # noqa: E501 + 'synchronization_points': 'synchronizationPoints', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreTrack - a model defined in OpenAPI - class MetaOapg: - - class properties: - id = schemas.StrSchema - title = schemas.StrSchema - score = schemas.StrSchema - creator = schemas.StrSchema - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - - @staticmethod - def type() -> typing.Type['ScoreTrackType']: - return ScoreTrackType - url = schemas.StrSchema - mediaId = schemas.StrSchema - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the score track. [optional] # noqa: E501 + title (str): Title of the track. [optional] # noqa: E501 + score (str): The unique identifier of the score. [optional] # noqa: E501 + creator (str): The unique identifier of the track creator. [optional] # noqa: E501 + creation_date (datetime): The creation date of the track. [optional] # noqa: E501 + modification_date (datetime): The modification date of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + type (ScoreTrackType): [optional] # noqa: E501 + url (str): The URL of the track. [optional] # noqa: E501 + media_id (str): The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` . [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "id": id, - "title": title, - "score": score, - "creator": creator, - "creationDate": creationDate, - "modificationDate": modificationDate, - "default": default, - "state": state, - "type": type, - "url": url, - "mediaId": mediaId, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'ScoreTrackType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mediaId"]) -> MetaOapg.properties.mediaId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['ScoreTrackType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mediaId"]) -> typing.Union[MetaOapg.properties.mediaId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - type: typing.Union['ScoreTrackType', schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - mediaId: typing.Union[MetaOapg.properties.mediaId, str, schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrack': - return super().__new__( - cls, - *_args, - id=id, - title=title, - score=score, - creator=creator, - creationDate=creationDate, - modificationDate=modificationDate, - default=default, - state=state, - type=type, - url=url, - mediaId=mediaId, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -from flat_api.model.score_track_type import ScoreTrackType + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreTrack - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The unique identifier of the score track. [optional] # noqa: E501 + title (str): Title of the track. [optional] # noqa: E501 + score (str): The unique identifier of the score. [optional] # noqa: E501 + creator (str): The unique identifier of the track creator. [optional] # noqa: E501 + creation_date (datetime): The creation date of the track. [optional] # noqa: E501 + modification_date (datetime): The modification date of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + type (ScoreTrackType): [optional] # noqa: E501 + url (str): The URL of the track. [optional] # noqa: E501 + media_id (str): The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` . [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_track.pyi b/flat_api/model/score_track.pyi deleted file mode 100644 index 26e44e8..0000000 --- a/flat_api/model/score_track.pyi +++ /dev/null @@ -1,226 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrack( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - An audio track for a score - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - title = schemas.StrSchema - score = schemas.StrSchema - creator = schemas.StrSchema - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - - @staticmethod - def type() -> typing.Type['ScoreTrackType']: - return ScoreTrackType - url = schemas.StrSchema - mediaId = schemas.StrSchema - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "id": id, - "title": title, - "score": score, - "creator": creator, - "creationDate": creationDate, - "modificationDate": modificationDate, - "default": default, - "state": state, - "type": type, - "url": url, - "mediaId": mediaId, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creator"]) -> MetaOapg.properties.creator: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'ScoreTrackType': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mediaId"]) -> MetaOapg.properties.mediaId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creator"]) -> typing.Union[MetaOapg.properties.creator, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union['ScoreTrackType', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mediaId"]) -> typing.Union[MetaOapg.properties.mediaId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "url", "mediaId", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - creator: typing.Union[MetaOapg.properties.creator, str, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - type: typing.Union['ScoreTrackType', schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - mediaId: typing.Union[MetaOapg.properties.mediaId, str, schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrack': - return super().__new__( - cls, - *_args, - id=id, - title=title, - score=score, - creator=creator, - creationDate=creationDate, - modificationDate=modificationDate, - default=default, - state=state, - type=type, - url=url, - mediaId=mediaId, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -from flat_api.model.score_track_type import ScoreTrackType diff --git a/flat_api/model/score_track_creation.py b/flat_api/model/score_track_creation.py index c90e517..7a572de 100644 --- a/flat_api/model/score_track_creation.py +++ b/flat_api/model/score_track_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,144 +8,281 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_track_point import ScoreTrackPoint + from flat_api.model.score_track_state import ScoreTrackState + globals()['ScoreTrackPoint'] = ScoreTrackPoint + globals()['ScoreTrackState'] = ScoreTrackState -class ScoreTrackCreation( - schemas.DictSchema -): + +class ScoreTrackCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Creation of a new track. This one must contain the URL of the track or the corresponding file - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'default': (bool,), # noqa: E501 + 'state': (ScoreTrackState,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'default': 'default', # noqa: E501 + 'state': 'state', # noqa: E501 + 'url': 'url', # noqa: E501 + 'synchronization_points': 'synchronizationPoints', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - title = schemas.StrSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - url = schemas.StrSchema - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreTrackCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + url (str): The URL of the track. [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreTrackCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + url (str): The URL of the track. [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "title": title, - "default": default, - "state": state, - "url": url, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackCreation': - return super().__new__( - cls, - *_args, - title=title, - default=default, - state=state, - url=url, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_track_creation.pyi b/flat_api/model/score_track_creation.pyi deleted file mode 100644 index c90e517..0000000 --- a/flat_api/model/score_track_creation.pyi +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrackCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Creation of a new track. This one must contain the URL of the track or the corresponding file - - """ - - - class MetaOapg: - - class properties: - title = schemas.StrSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - url = schemas.StrSchema - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "title": title, - "default": default, - "state": state, - "url": url, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "url", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackCreation': - return super().__new__( - cls, - *_args, - title=title, - default=default, - state=state, - url=url, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_track_point.py b/flat_api/model/score_track_point.py index a6e999e..3a1bb0f 100644 --- a/flat_api/model/score_track_point.py +++ b/flat_api/model/score_track_point.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,119 +8,277 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreTrackPoint( - schemas.DictSchema -): +class ScoreTrackPoint(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A track synchronization point + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'MEASURE': "measure", + 'END': "end", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "time", - "type", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'time': (float,), # noqa: E501 + 'measure_uuid': (str,), # noqa: E501 } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "measure": "MEASURE", - "end": "END", - } - - @schemas.classproperty - def MEASURE(cls): - return cls("measure") - - @schemas.classproperty - def END(cls): - return cls("end") - time = schemas.NumberSchema - measureUuid = schemas.UUIDSchema - __annotations__ = { - "type": type, - "time": time, - "measureUuid": measureUuid, - } - - time: MetaOapg.properties.time - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["measureUuid"]) -> MetaOapg.properties.measureUuid: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["measureUuid"]) -> typing.Union[MetaOapg.properties.measureUuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - time: typing.Union[MetaOapg.properties.time, decimal.Decimal, int, float, ], - type: typing.Union[MetaOapg.properties.type, str, ], - measureUuid: typing.Union[MetaOapg.properties.measureUuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackPoint': - return super().__new__( - cls, - *_args, - time=time, - type=type, - measureUuid=measureUuid, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'time': 'time', # noqa: E501 + 'measure_uuid': 'measureUuid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, time, *args, **kwargs): # noqa: E501 + """ScoreTrackPoint - a model defined in OpenAPI + + Args: + type (str): The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` + time (float): The corresponding time in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + measure_uuid (str): The measure unique identifier. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.time = time + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, time, *args, **kwargs): # noqa: E501 + """ScoreTrackPoint - a model defined in OpenAPI + + Args: + type (str): The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` + time (float): The corresponding time in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + measure_uuid (str): The measure unique identifier. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.time = time + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_track_point.pyi b/flat_api/model/score_track_point.pyi deleted file mode 100644 index aeb8163..0000000 --- a/flat_api/model/score_track_point.pyi +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrackPoint( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A track synchronization point - """ - - - class MetaOapg: - required = { - "time", - "type", - } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def MEASURE(cls): - return cls("measure") - - @schemas.classproperty - def END(cls): - return cls("end") - time = schemas.NumberSchema - measureUuid = schemas.UUIDSchema - __annotations__ = { - "type": type, - "time": time, - "measureUuid": measureUuid, - } - - time: MetaOapg.properties.time - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["measureUuid"]) -> MetaOapg.properties.measureUuid: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["measureUuid"]) -> typing.Union[MetaOapg.properties.measureUuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "time", "measureUuid", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - time: typing.Union[MetaOapg.properties.time, decimal.Decimal, int, float, ], - type: typing.Union[MetaOapg.properties.type, str, ], - measureUuid: typing.Union[MetaOapg.properties.measureUuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackPoint': - return super().__new__( - cls, - *_args, - time=time, - type=type, - measureUuid=measureUuid, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/score_track_state.py b/flat_api/model/score_track_state.py index dce4c25..08e0d9b 100644 --- a/flat_api/model/score_track_state.py +++ b/flat_api/model/score_track_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,48 +8,277 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreTrackState( - schemas.EnumBase, - schemas.StrSchema -): +class ScoreTrackState(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - State of the track + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'DRAFT': "draft", + 'COMPLETED': "completed", + 'DELETED': "deleted", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "draft": "DRAFT", - "completed": "COMPLETED", - "deleted": "DELETED", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - - @schemas.classproperty - def DELETED(cls): - return cls("deleted") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ScoreTrackState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 + + Keyword Args: + value (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "draft" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScoreTrackState - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 + + Keyword Args: + value (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "draft" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/score_track_state.pyi b/flat_api/model/score_track_state.pyi deleted file mode 100644 index 6fcccf6..0000000 --- a/flat_api/model/score_track_state.pyi +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrackState( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - State of the track - """ - - @schemas.classproperty - def DRAFT(cls): - return cls("draft") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - - @schemas.classproperty - def DELETED(cls): - return cls("deleted") diff --git a/flat_api/model/score_track_type.py b/flat_api/model/score_track_type.py index 9764800..6d098c5 100644 --- a/flat_api/model/score_track_type.py +++ b/flat_api/model/score_track_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,53 +8,286 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreTrackType( - schemas.EnumBase, - schemas.StrSchema -): +class ScoreTrackType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The type of an audio track + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('value',): { + 'AUDIO': "audio", + 'SOUNDCLOUD': "soundcloud", + 'YOUTUBE': "youtube", + 'VIMEO': "vimeo", + }, + } + + validations = { + } + + additional_properties_type = None - class MetaOapg: - enum_value_to_name = { - "audio": "AUDIO", - "soundcloud": "SOUNDCLOUD", - "youtube": "YOUTUBE", - "vimeo": "VIMEO", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), } - - @schemas.classproperty - def AUDIO(cls): - return cls("audio") - - @schemas.classproperty - def SOUNDCLOUD(cls): - return cls("soundcloud") - - @schemas.classproperty - def YOUTUBE(cls): - return cls("youtube") - - @schemas.classproperty - def VIMEO(cls): - return cls("vimeo") + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """ScoreTrackType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 + + Keyword Args: + value (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """ScoreTrackType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 + + Keyword Args: + value (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/flat_api/model/score_track_type.pyi b/flat_api/model/score_track_type.pyi deleted file mode 100644 index c0b6a4d..0000000 --- a/flat_api/model/score_track_type.pyi +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrackType( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The type of an audio track - """ - - @schemas.classproperty - def AUDIO(cls): - return cls("audio") - - @schemas.classproperty - def SOUNDCLOUD(cls): - return cls("soundcloud") - - @schemas.classproperty - def YOUTUBE(cls): - return cls("youtube") - - @schemas.classproperty - def VIMEO(cls): - return cls("vimeo") diff --git a/flat_api/model/score_track_update.py b/flat_api/model/score_track_update.py index f65cccd..1da643a 100644 --- a/flat_api/model/score_track_update.py +++ b/flat_api/model/score_track_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,134 +8,277 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.score_track_point import ScoreTrackPoint + from flat_api.model.score_track_state import ScoreTrackState + globals()['ScoreTrackPoint'] = ScoreTrackPoint + globals()['ScoreTrackState'] = ScoreTrackState -class ScoreTrackUpdate( - schemas.DictSchema -): + +class ScoreTrackUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Update an existing track. - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'title': (str,), # noqa: E501 + 'default': (bool,), # noqa: E501 + 'state': (ScoreTrackState,), # noqa: E501 + 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'default': 'default', # noqa: E501 + 'state': 'state', # noqa: E501 + 'synchronization_points': 'synchronizationPoints', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - title = schemas.StrSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreTrackUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreTrackUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): Title of the track. [optional] # noqa: E501 + default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 + state (ScoreTrackState): [optional] # noqa: E501 + synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "title": title, - "default": default, - "state": state, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackUpdate': - return super().__new__( - cls, - *_args, - title=title, - default=default, - state=state, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_track_update.pyi b/flat_api/model/score_track_update.pyi deleted file mode 100644 index f65cccd..0000000 --- a/flat_api/model/score_track_update.pyi +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreTrackUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Update an existing track. - - """ - - - class MetaOapg: - - class properties: - title = schemas.StrSchema - default = schemas.BoolSchema - - @staticmethod - def state() -> typing.Type['ScoreTrackState']: - return ScoreTrackState - - - class synchronizationPoints( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrackPoint']: - return ScoreTrackPoint - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrackPoint'], typing.List['ScoreTrackPoint']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'synchronizationPoints': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreTrackPoint': - return super().__getitem__(i) - __annotations__ = { - "title": title, - "default": default, - "state": state, - "synchronizationPoints": synchronizationPoints, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default"]) -> MetaOapg.properties.default: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> 'ScoreTrackState': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["synchronizationPoints"]) -> MetaOapg.properties.synchronizationPoints: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default"]) -> typing.Union[MetaOapg.properties.default, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union['ScoreTrackState', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["synchronizationPoints"]) -> typing.Union[MetaOapg.properties.synchronizationPoints, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["title", "default", "state", "synchronizationPoints", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset, - default: typing.Union[MetaOapg.properties.default, bool, schemas.Unset] = schemas.unset, - state: typing.Union['ScoreTrackState', schemas.Unset] = schemas.unset, - synchronizationPoints: typing.Union[MetaOapg.properties.synchronizationPoints, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreTrackUpdate': - return super().__new__( - cls, - *_args, - title=title, - default=default, - state=state, - synchronizationPoints=synchronizationPoints, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState diff --git a/flat_api/model/score_views_counts.py b/flat_api/model/score_views_counts.py index 6d1b175..682d724 100644 --- a/flat_api/model/score_views_counts.py +++ b/flat_api/model/score_views_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,94 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class ScoreViewsCounts( - schemas.DictSchema -): +class ScoreViewsCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - A computed version of the total, weekly, and monthly number of views of -the score - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'total': (float,), # noqa: E501 + 'weekly': (float,), # noqa: E501 + 'monthly': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'weekly': 'weekly', # noqa: E501 + 'monthly': 'monthly', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ScoreViewsCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of views of the score. [optional] # noqa: E501 + weekly (float): The weekly number of views of the score. [optional] # noqa: E501 + monthly (float): The monthly number of views of the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ScoreViewsCounts - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): The total number of views of the score. [optional] # noqa: E501 + weekly (float): The weekly number of views of the score. [optional] # noqa: E501 + monthly (float): The monthly number of views of the score. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreViewsCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/score_views_counts.pyi b/flat_api/model/score_views_counts.pyi deleted file mode 100644 index 6d1b175..0000000 --- a/flat_api/model/score_views_counts.pyi +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class ScoreViewsCounts( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A computed version of the total, weekly, and monthly number of views of -the score - - """ - - - class MetaOapg: - - class properties: - total = schemas.NumberSchema - weekly = schemas.NumberSchema - monthly = schemas.NumberSchema - __annotations__ = { - "total": total, - "weekly": weekly, - "monthly": monthly, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["weekly"]) -> MetaOapg.properties.weekly: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["monthly"]) -> MetaOapg.properties.monthly: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["weekly"]) -> typing.Union[MetaOapg.properties.weekly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["monthly"]) -> typing.Union[MetaOapg.properties.monthly, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", "weekly", "monthly", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - weekly: typing.Union[MetaOapg.properties.weekly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - monthly: typing.Union[MetaOapg.properties.monthly, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScoreViewsCounts': - return super().__new__( - cls, - *_args, - total=total, - weekly=weekly, - monthly=monthly, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/task.py b/flat_api/model/task.py index 409af65..b1d641b 100644 --- a/flat_api/model/task.py +++ b/flat_api/model/task.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,347 +8,312 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.task_progress import TaskProgress + from flat_api.model.task_result import TaskResult + globals()['TaskProgress'] = TaskProgress + globals()['TaskResult'] = TaskResult -class Task( - schemas.DictSchema -): + +class Task(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - An asynchronous task + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('state',): { + 'CREATED': "created", + 'DOING': "doing", + 'DONE': "done", + 'CANCELED': "canceled", + 'ERROR': "error", + }, + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - type = schemas.StrSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "created": "CREATED", - "doing": "DOING", - "done": "DONE", - "canceled": "CANCELED", - "error": "ERROR", - } - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def DOING(cls): - return cls("doing") - - @schemas.classproperty - def DONE(cls): - return cls("done") - - @schemas.classproperty - def CANCELED(cls): - return cls("canceled") - - @schemas.classproperty - def ERROR(cls): - return cls("error") - format = schemas.StrSchema - score = schemas.StrSchema - - - class progress( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - percent = schemas.NumberSchema - text = schemas.StrSchema - __annotations__ = { - "percent": percent, - "text": text, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["percent"]) -> MetaOapg.properties.percent: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["percent"]) -> typing.Union[MetaOapg.properties.percent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> typing.Union[MetaOapg.properties.text, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - percent: typing.Union[MetaOapg.properties.percent, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - text: typing.Union[MetaOapg.properties.text, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'progress': - return super().__new__( - cls, - *_args, - percent=percent, - text=text, - _configuration=_configuration, - **kwargs, - ) - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - doneDate = schemas.DateTimeSchema - - - class result( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - url = schemas.StrSchema - error = schemas.StrSchema - __annotations__ = { - "url": url, - "error": error, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["error"]) -> MetaOapg.properties.error: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["error"]) -> typing.Union[MetaOapg.properties.error, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - error: typing.Union[MetaOapg.properties.error, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'result': - return super().__new__( - cls, - *_args, - url=url, - error=error, - _configuration=_configuration, - **kwargs, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + 'format': (str,), # noqa: E501 + 'score': (str,), # noqa: E501 + 'progress': (TaskProgress,), # noqa: E501 + 'creation_date': (datetime,), # noqa: E501 + 'modification_date': (datetime,), # noqa: E501 + 'done_date': (datetime,), # noqa: E501 + 'result': (TaskResult,), # noqa: E501 + 'error_history': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'state': 'state', # noqa: E501 + 'format': 'format', # noqa: E501 + 'score': 'score', # noqa: E501 + 'progress': 'progress', # noqa: E501 + 'creation_date': 'creationDate', # noqa: E501 + 'modification_date': 'modificationDate', # noqa: E501 + 'done_date': 'doneDate', # noqa: E501 + 'result': 'result', # noqa: E501 + 'error_history': 'errorHistory', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Task - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the task. [optional] # noqa: E501 + type (str): Type of the task (e.g. audio-export). [optional] # noqa: E501 + state (str): State of the Task. [optional] # noqa: E501 + format (str): For files processing, the file format (e.g. `mp3`, `wav`). [optional] # noqa: E501 + score (str): The score unique identifier for tasks related to scores. [optional] # noqa: E501 + progress (TaskProgress): [optional] # noqa: E501 + creation_date (datetime): The creation date of the task. [optional] # noqa: E501 + modification_date (datetime): The last modification date of the task. [optional] # noqa: E501 + done_date (datetime): The date when the task has been completed. [optional] # noqa: E501 + result (TaskResult): [optional] # noqa: E501 + error_history ([str]): If any errors happened when processing this task, the list of errors identifiers. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class errorHistory( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'errorHistory': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Task - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier of the task. [optional] # noqa: E501 + type (str): Type of the task (e.g. audio-export). [optional] # noqa: E501 + state (str): State of the Task. [optional] # noqa: E501 + format (str): For files processing, the file format (e.g. `mp3`, `wav`). [optional] # noqa: E501 + score (str): The score unique identifier for tasks related to scores. [optional] # noqa: E501 + progress (TaskProgress): [optional] # noqa: E501 + creation_date (datetime): The creation date of the task. [optional] # noqa: E501 + modification_date (datetime): The last modification date of the task. [optional] # noqa: E501 + done_date (datetime): The date when the task has been completed. [optional] # noqa: E501 + result (TaskResult): [optional] # noqa: E501 + error_history ([str]): If any errors happened when processing this task, the list of errors identifiers. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "type": type, - "state": state, - "format": format, - "score": score, - "progress": progress, - "creationDate": creationDate, - "modificationDate": modificationDate, - "doneDate": doneDate, - "result": result, - "errorHistory": errorHistory, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["progress"]) -> MetaOapg.properties.progress: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["doneDate"]) -> MetaOapg.properties.doneDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["errorHistory"]) -> MetaOapg.properties.errorHistory: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["progress"]) -> typing.Union[MetaOapg.properties.progress, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["doneDate"]) -> typing.Union[MetaOapg.properties.doneDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["errorHistory"]) -> typing.Union[MetaOapg.properties.errorHistory, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - progress: typing.Union[MetaOapg.properties.progress, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - doneDate: typing.Union[MetaOapg.properties.doneDate, str, datetime, schemas.Unset] = schemas.unset, - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - errorHistory: typing.Union[MetaOapg.properties.errorHistory, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Task': - return super().__new__( - cls, - *_args, - id=id, - type=type, - state=state, - format=format, - score=score, - progress=progress, - creationDate=creationDate, - modificationDate=modificationDate, - doneDate=doneDate, - result=result, - errorHistory=errorHistory, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/task.pyi b/flat_api/model/task.pyi deleted file mode 100644 index 7559c54..0000000 --- a/flat_api/model/task.pyi +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class Task( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - An asynchronous task - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - type = schemas.StrSchema - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def DOING(cls): - return cls("doing") - - @schemas.classproperty - def DONE(cls): - return cls("done") - - @schemas.classproperty - def CANCELED(cls): - return cls("canceled") - - @schemas.classproperty - def ERROR(cls): - return cls("error") - format = schemas.StrSchema - score = schemas.StrSchema - - - class progress( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - percent = schemas.NumberSchema - text = schemas.StrSchema - __annotations__ = { - "percent": percent, - "text": text, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["percent"]) -> MetaOapg.properties.percent: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["text"]) -> MetaOapg.properties.text: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["percent"]) -> typing.Union[MetaOapg.properties.percent, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["text"]) -> typing.Union[MetaOapg.properties.text, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["percent", "text", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - percent: typing.Union[MetaOapg.properties.percent, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - text: typing.Union[MetaOapg.properties.text, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'progress': - return super().__new__( - cls, - *_args, - percent=percent, - text=text, - _configuration=_configuration, - **kwargs, - ) - creationDate = schemas.DateTimeSchema - modificationDate = schemas.DateTimeSchema - doneDate = schemas.DateTimeSchema - - - class result( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - url = schemas.StrSchema - error = schemas.StrSchema - __annotations__ = { - "url": url, - "error": error, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["error"]) -> MetaOapg.properties.error: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["error"]) -> typing.Union[MetaOapg.properties.error, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "error", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - error: typing.Union[MetaOapg.properties.error, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'result': - return super().__new__( - cls, - *_args, - url=url, - error=error, - _configuration=_configuration, - **kwargs, - ) - - - class errorHistory( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'errorHistory': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "type": type, - "state": state, - "format": format, - "score": score, - "progress": progress, - "creationDate": creationDate, - "modificationDate": modificationDate, - "doneDate": doneDate, - "result": result, - "errorHistory": errorHistory, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["score"]) -> MetaOapg.properties.score: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["progress"]) -> MetaOapg.properties.progress: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creationDate"]) -> MetaOapg.properties.creationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modificationDate"]) -> MetaOapg.properties.modificationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["doneDate"]) -> MetaOapg.properties.doneDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["errorHistory"]) -> MetaOapg.properties.errorHistory: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["score"]) -> typing.Union[MetaOapg.properties.score, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["progress"]) -> typing.Union[MetaOapg.properties.progress, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creationDate"]) -> typing.Union[MetaOapg.properties.creationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modificationDate"]) -> typing.Union[MetaOapg.properties.modificationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["doneDate"]) -> typing.Union[MetaOapg.properties.doneDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["errorHistory"]) -> typing.Union[MetaOapg.properties.errorHistory, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, - score: typing.Union[MetaOapg.properties.score, str, schemas.Unset] = schemas.unset, - progress: typing.Union[MetaOapg.properties.progress, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - creationDate: typing.Union[MetaOapg.properties.creationDate, str, datetime, schemas.Unset] = schemas.unset, - modificationDate: typing.Union[MetaOapg.properties.modificationDate, str, datetime, schemas.Unset] = schemas.unset, - doneDate: typing.Union[MetaOapg.properties.doneDate, str, datetime, schemas.Unset] = schemas.unset, - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - errorHistory: typing.Union[MetaOapg.properties.errorHistory, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Task': - return super().__new__( - cls, - *_args, - id=id, - type=type, - state=state, - format=format, - score=score, - progress=progress, - creationDate=creationDate, - modificationDate=modificationDate, - doneDate=doneDate, - result=result, - errorHistory=errorHistory, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/task_export_options.py b/flat_api/model/task_export_options.py index d039de9..5785550 100644 --- a/flat_api/model/task_export_options.py +++ b/flat_api/model/task_export_options.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,95 +8,257 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class TaskExportOptions( - schemas.DictSchema -): +class TaskExportOptions(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Options for the requested export - + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'parts': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'parts': 'parts', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TaskExportOptions - a model defined in OpenAPI - class MetaOapg: - - class properties: - - - class parts( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'parts': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parts ([str]): A list of parts to specifically export. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "parts": parts, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parts"]) -> MetaOapg.properties.parts: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parts"]) -> typing.Union[MetaOapg.properties.parts, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - parts: typing.Union[MetaOapg.properties.parts, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TaskExportOptions': - return super().__new__( - cls, - *_args, - parts=parts, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TaskExportOptions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parts ([str]): A list of parts to specifically export. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/task_export_options.pyi b/flat_api/model/task_export_options.pyi deleted file mode 100644 index d039de9..0000000 --- a/flat_api/model/task_export_options.pyi +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class TaskExportOptions( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Options for the requested export - - """ - - - class MetaOapg: - - class properties: - - - class parts( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'parts': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "parts": parts, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parts"]) -> MetaOapg.properties.parts: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parts"]) -> typing.Union[MetaOapg.properties.parts, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["parts", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - parts: typing.Union[MetaOapg.properties.parts, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TaskExportOptions': - return super().__new__( - cls, - *_args, - parts=parts, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/task_progress.py b/flat_api/model/task_progress.py new file mode 100644 index 0000000..0f27c87 --- /dev/null +++ b/flat_api/model/task_progress.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class TaskProgress(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'percent': (float,), # noqa: E501 + 'text': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'percent': 'percent', # noqa: E501 + 'text': 'text', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TaskProgress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + percent (float): Percent of the task progression. [optional] # noqa: E501 + text (str): Text details of the task progress. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TaskProgress - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + percent (float): Percent of the task progression. [optional] # noqa: E501 + text (str): Text details of the task progress. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/task_result.py b/flat_api/model/task_result.py new file mode 100644 index 0000000..7feef2b --- /dev/null +++ b/flat_api/model/task_result.py @@ -0,0 +1,268 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + + +class TaskResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'url': (str,), # noqa: E501 + 'error': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + 'error': 'error', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TaskResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + url (str): URL returned by the task worker. [optional] # noqa: E501 + error (str): Error returned by task worker. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """TaskResult - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + url (str): URL returned by the task worker. [optional] # noqa: E501 + error (str): Error returned by task worker. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_admin_update.py b/flat_api/model/user_admin_update.py index f7dc1e4..743b0df 100644 --- a/flat_api/model/user_admin_update.py +++ b/flat_api/model/user_admin_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,165 +8,300 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.organization_roles import OrganizationRoles + globals()['OrganizationRoles'] = OrganizationRoles -class UserAdminUpdate( - schemas.DictSchema -): + +class UserAdminUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - User update as an organization admin + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('password',): { + 'max_length': 1000, + 'min_length': 6, + }, + ('username',): { + 'max_length': 30, + 'min_length': 1, + 'regex': { + 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 + }, + }, + ('firstname',): { + 'max_length': 60, + }, + ('lastname',): { + 'max_length': 60, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'password': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'password': 'password', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'username': 'username', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'email': 'email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserAdminUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + password (str): Password of the account. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + username (str): Username of the account. [optional] # noqa: E501 + firstname (str): First name of the user. [optional] # noqa: E501 + lastname (str): Last name of the user. [optional] # noqa: E501 + email (str): Email of the account. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserAdminUpdate - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + password (str): Password of the account. [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + username (str): Username of the account. [optional] # noqa: E501 + firstname (str): First name of the user. [optional] # noqa: E501 + lastname (str): Last name of the user. [optional] # noqa: E501 + email (str): Email of the account. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class password( - schemas.StrSchema - ): - - - class MetaOapg: - format = 'password' - max_length = 1000 - min_length = 6 - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - - class username( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 30 - min_length = 1 - regex=[{ - 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 - }] - - - class firstname( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 60 - - - class lastname( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 60 - email = schemas.StrSchema - __annotations__ = { - "password": password, - "organizationRole": organizationRole, - "username": username, - "firstname": firstname, - "lastname": lastname, - "email": email, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserAdminUpdate': - return super().__new__( - cls, - *_args, - password=password, - organizationRole=organizationRole, - username=username, - firstname=firstname, - lastname=lastname, - email=email, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_admin_update.pyi b/flat_api/model/user_admin_update.pyi deleted file mode 100644 index 90df67d..0000000 --- a/flat_api/model/user_admin_update.pyi +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserAdminUpdate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - User update as an organization admin - """ - - - class MetaOapg: - - class properties: - - - class password( - schemas.StrSchema - ): - pass - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - - class username( - schemas.StrSchema - ): - pass - - - class firstname( - schemas.StrSchema - ): - pass - - - class lastname( - schemas.StrSchema - ): - pass - email = schemas.StrSchema - __annotations__ = { - "password": password, - "organizationRole": organizationRole, - "username": username, - "firstname": firstname, - "lastname": lastname, - "email": email, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["password", "organizationRole", "username", "firstname", "lastname", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserAdminUpdate': - return super().__new__( - cls, - *_args, - password=password, - organizationRole=organizationRole, - username=username, - firstname=firstname, - lastname=lastname, - email=email, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_azure_details.py b/flat_api/model/user_azure_details.py index e909057..4eec1bf 100644 --- a/flat_api/model/user_azure_details.py +++ b/flat_api/model/user_azure_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,90 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class UserAzureDetails( - schemas.DictSchema -): +class UserAzureDetails(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'oid': (str,), # noqa: E501 + 'hd': (str,), # noqa: E501 + 'preferred_username': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'oid': 'oid', # noqa: E501 + 'hd': 'hd', # noqa: E501 + 'preferred_username': 'preferredUsername', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserAzureDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + oid (str): User object identifier on Azure AD. [optional] # noqa: E501 + hd (str): User tenant (domain name). [optional] # noqa: E501 + preferred_username (str): User Preferred Username (UPN), i.e. the main email of the user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserAzureDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + oid (str): User object identifier on Azure AD. [optional] # noqa: E501 + hd (str): User tenant (domain name). [optional] # noqa: E501 + preferred_username (str): User Preferred Username (UPN), i.e. the main email of the user. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - oid = schemas.StrSchema - hd = schemas.StrSchema - preferredUsername = schemas.StrSchema - __annotations__ = { - "oid": oid, - "hd": hd, - "preferredUsername": preferredUsername, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["oid"]) -> MetaOapg.properties.oid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hd"]) -> MetaOapg.properties.hd: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["preferredUsername"]) -> MetaOapg.properties.preferredUsername: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["oid"]) -> typing.Union[MetaOapg.properties.oid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hd"]) -> typing.Union[MetaOapg.properties.hd, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["preferredUsername"]) -> typing.Union[MetaOapg.properties.preferredUsername, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - oid: typing.Union[MetaOapg.properties.oid, str, schemas.Unset] = schemas.unset, - hd: typing.Union[MetaOapg.properties.hd, str, schemas.Unset] = schemas.unset, - preferredUsername: typing.Union[MetaOapg.properties.preferredUsername, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserAzureDetails': - return super().__new__( - cls, - *_args, - oid=oid, - hd=hd, - preferredUsername=preferredUsername, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_azure_details.pyi b/flat_api/model/user_azure_details.pyi deleted file mode 100644 index e909057..0000000 --- a/flat_api/model/user_azure_details.pyi +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserAzureDetails( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - oid = schemas.StrSchema - hd = schemas.StrSchema - preferredUsername = schemas.StrSchema - __annotations__ = { - "oid": oid, - "hd": hd, - "preferredUsername": preferredUsername, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["oid"]) -> MetaOapg.properties.oid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hd"]) -> MetaOapg.properties.hd: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["preferredUsername"]) -> MetaOapg.properties.preferredUsername: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["oid"]) -> typing.Union[MetaOapg.properties.oid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hd"]) -> typing.Union[MetaOapg.properties.hd, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["preferredUsername"]) -> typing.Union[MetaOapg.properties.preferredUsername, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["oid", "hd", "preferredUsername", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - oid: typing.Union[MetaOapg.properties.oid, str, schemas.Unset] = schemas.unset, - hd: typing.Union[MetaOapg.properties.hd, str, schemas.Unset] = schemas.unset, - preferredUsername: typing.Union[MetaOapg.properties.preferredUsername, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserAzureDetails': - return super().__new__( - cls, - *_args, - oid=oid, - hd=hd, - preferredUsername=preferredUsername, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/user_community_profile_links.py b/flat_api/model/user_community_profile_links.py index fefac3d..c58d0bc 100644 --- a/flat_api/model/user_community_profile_links.py +++ b/flat_api/model/user_community_profile_links.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,236 +8,277 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class UserCommunityProfileLinks( - schemas.DictSchema -): +class UserCommunityProfileLinks(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - Social networks links + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } - class MetaOapg: - - class properties: - - - class spotifyUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'spotifyUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class youtubeUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'youtubeUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class soundcloudUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'soundcloudUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class tiktokUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tiktokUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class instagramUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instagramUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'spotify_url': (str, none_type,), # noqa: E501 + 'youtube_url': (str, none_type,), # noqa: E501 + 'soundcloud_url': (str, none_type,), # noqa: E501 + 'tiktok_url': (str, none_type,), # noqa: E501 + 'instagram_url': (str, none_type,), # noqa: E501 + 'website_url': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'spotify_url': 'spotifyUrl', # noqa: E501 + 'youtube_url': 'youtubeUrl', # noqa: E501 + 'soundcloud_url': 'soundcloudUrl', # noqa: E501 + 'tiktok_url': 'tiktokUrl', # noqa: E501 + 'instagram_url': 'instagramUrl', # noqa: E501 + 'website_url': 'websiteUrl', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserCommunityProfileLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + spotify_url (str, none_type): Spotify Profile URL. [optional] # noqa: E501 + youtube_url (str, none_type): YouTube channel URL. [optional] # noqa: E501 + soundcloud_url (str, none_type): SoundCloud Profile URL. [optional] # noqa: E501 + tiktok_url (str, none_type): TikTok profile URL. For updates, also accepts TikTok usernames. [optional] # noqa: E501 + instagram_url (str, none_type): Instagram profile URL. For updates, also accepts Instagram usernames. [optional] # noqa: E501 + website_url (str, none_type): Personnal website URL. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class websiteUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'websiteUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserCommunityProfileLinks - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + spotify_url (str, none_type): Spotify Profile URL. [optional] # noqa: E501 + youtube_url (str, none_type): YouTube channel URL. [optional] # noqa: E501 + soundcloud_url (str, none_type): SoundCloud Profile URL. [optional] # noqa: E501 + tiktok_url (str, none_type): TikTok profile URL. For updates, also accepts TikTok usernames. [optional] # noqa: E501 + instagram_url (str, none_type): Instagram profile URL. For updates, also accepts Instagram usernames. [optional] # noqa: E501 + website_url (str, none_type): Personnal website URL. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "spotifyUrl": spotifyUrl, - "youtubeUrl": youtubeUrl, - "soundcloudUrl": soundcloudUrl, - "tiktokUrl": tiktokUrl, - "instagramUrl": instagramUrl, - "websiteUrl": websiteUrl, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["spotifyUrl"]) -> MetaOapg.properties.spotifyUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["youtubeUrl"]) -> MetaOapg.properties.youtubeUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["soundcloudUrl"]) -> MetaOapg.properties.soundcloudUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tiktokUrl"]) -> MetaOapg.properties.tiktokUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instagramUrl"]) -> MetaOapg.properties.instagramUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["websiteUrl"]) -> MetaOapg.properties.websiteUrl: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["spotifyUrl"]) -> typing.Union[MetaOapg.properties.spotifyUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["youtubeUrl"]) -> typing.Union[MetaOapg.properties.youtubeUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["soundcloudUrl"]) -> typing.Union[MetaOapg.properties.soundcloudUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tiktokUrl"]) -> typing.Union[MetaOapg.properties.tiktokUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instagramUrl"]) -> typing.Union[MetaOapg.properties.instagramUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["websiteUrl"]) -> typing.Union[MetaOapg.properties.websiteUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - spotifyUrl: typing.Union[MetaOapg.properties.spotifyUrl, None, str, schemas.Unset] = schemas.unset, - youtubeUrl: typing.Union[MetaOapg.properties.youtubeUrl, None, str, schemas.Unset] = schemas.unset, - soundcloudUrl: typing.Union[MetaOapg.properties.soundcloudUrl, None, str, schemas.Unset] = schemas.unset, - tiktokUrl: typing.Union[MetaOapg.properties.tiktokUrl, None, str, schemas.Unset] = schemas.unset, - instagramUrl: typing.Union[MetaOapg.properties.instagramUrl, None, str, schemas.Unset] = schemas.unset, - websiteUrl: typing.Union[MetaOapg.properties.websiteUrl, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCommunityProfileLinks': - return super().__new__( - cls, - *_args, - spotifyUrl=spotifyUrl, - youtubeUrl=youtubeUrl, - soundcloudUrl=soundcloudUrl, - tiktokUrl=tiktokUrl, - instagramUrl=instagramUrl, - websiteUrl=websiteUrl, - _configuration=_configuration, - **kwargs, - ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_community_profile_links.pyi b/flat_api/model/user_community_profile_links.pyi deleted file mode 100644 index fefac3d..0000000 --- a/flat_api/model/user_community_profile_links.pyi +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserCommunityProfileLinks( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Social networks links - """ - - - class MetaOapg: - - class properties: - - - class spotifyUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'spotifyUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class youtubeUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'youtubeUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class soundcloudUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'soundcloudUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class tiktokUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tiktokUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class instagramUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instagramUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class websiteUrl( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'websiteUrl': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "spotifyUrl": spotifyUrl, - "youtubeUrl": youtubeUrl, - "soundcloudUrl": soundcloudUrl, - "tiktokUrl": tiktokUrl, - "instagramUrl": instagramUrl, - "websiteUrl": websiteUrl, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["spotifyUrl"]) -> MetaOapg.properties.spotifyUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["youtubeUrl"]) -> MetaOapg.properties.youtubeUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["soundcloudUrl"]) -> MetaOapg.properties.soundcloudUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tiktokUrl"]) -> MetaOapg.properties.tiktokUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instagramUrl"]) -> MetaOapg.properties.instagramUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["websiteUrl"]) -> MetaOapg.properties.websiteUrl: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["spotifyUrl"]) -> typing.Union[MetaOapg.properties.spotifyUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["youtubeUrl"]) -> typing.Union[MetaOapg.properties.youtubeUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["soundcloudUrl"]) -> typing.Union[MetaOapg.properties.soundcloudUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tiktokUrl"]) -> typing.Union[MetaOapg.properties.tiktokUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instagramUrl"]) -> typing.Union[MetaOapg.properties.instagramUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["websiteUrl"]) -> typing.Union[MetaOapg.properties.websiteUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - spotifyUrl: typing.Union[MetaOapg.properties.spotifyUrl, None, str, schemas.Unset] = schemas.unset, - youtubeUrl: typing.Union[MetaOapg.properties.youtubeUrl, None, str, schemas.Unset] = schemas.unset, - soundcloudUrl: typing.Union[MetaOapg.properties.soundcloudUrl, None, str, schemas.Unset] = schemas.unset, - tiktokUrl: typing.Union[MetaOapg.properties.tiktokUrl, None, str, schemas.Unset] = schemas.unset, - instagramUrl: typing.Union[MetaOapg.properties.instagramUrl, None, str, schemas.Unset] = schemas.unset, - websiteUrl: typing.Union[MetaOapg.properties.websiteUrl, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCommunityProfileLinks': - return super().__new__( - cls, - *_args, - spotifyUrl=spotifyUrl, - youtubeUrl=youtubeUrl, - soundcloudUrl=soundcloudUrl, - tiktokUrl=tiktokUrl, - instagramUrl=instagramUrl, - websiteUrl=websiteUrl, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/user_creation.py b/flat_api/model/user_creation.py index 562bfb9..a59938e 100644 --- a/flat_api/model/user_creation.py +++ b/flat_api/model/user_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,207 +8,317 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.flat_locales import FlatLocales + globals()['FlatLocales'] = FlatLocales -class UserCreation( - schemas.DictSchema -): + +class UserCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - User creation + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('role',): { + 'USER': "user", + 'TEACHER': "teacher", + 'ADMIN': "admin", + }, + } + + validations = { + ('username',): { + 'max_length': 30, + 'min_length': 1, + 'regex': { + 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 + }, + }, + ('password',): { + 'max_length': 1000, + 'min_length': 6, + }, + ('firstname',): { + 'max_length': 60, + }, + ('lastname',): { + 'max_length': 60, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "password", - "username", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'username': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'locale': (FlatLocales,), # noqa: E501 + 'role': (str,), # noqa: E501 } - - class properties: - - - class username( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 30 - min_length = 1 - regex=[{ - 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 - }] - - - class password( - schemas.StrSchema - ): - - - class MetaOapg: - format = 'password' - max_length = 1000 - min_length = 6 - - - class firstname( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 60 - - - class lastname( - schemas.StrSchema - ): - - - class MetaOapg: - max_length = 60 - email = schemas.StrSchema - - @staticmethod - def locale() -> typing.Type['FlatLocales']: - return FlatLocales - - - class role( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "teacher": "TEACHER", - "admin": "ADMIN", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - __annotations__ = { - "username": username, - "password": password, - "firstname": firstname, - "lastname": lastname, - "email": email, - "locale": locale, - "role": role, - } - - password: MetaOapg.properties.password - username: MetaOapg.properties.username - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["role"]) -> MetaOapg.properties.role: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["role"]) -> typing.Union[MetaOapg.properties.role, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, ], - username: typing.Union[MetaOapg.properties.username, str, ], - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, - role: typing.Union[MetaOapg.properties.role, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCreation': - return super().__new__( - cls, - *_args, - password=password, - username=username, - firstname=firstname, - lastname=lastname, - email=email, - locale=locale, - role=role, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.flat_locales import FlatLocales + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'username': 'username', # noqa: E501 + 'password': 'password', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'email': 'email', # noqa: E501 + 'locale': 'locale', # noqa: E501 + 'role': 'role', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, username, password, *args, **kwargs): # noqa: E501 + """UserCreation - a model defined in OpenAPI + + Args: + username (str): Username of the new account + password (str): Password of the new account + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + firstname (str): First name of the user. [optional] # noqa: E501 + lastname (str): Last name of the user. [optional] # noqa: E501 + email (str): Email of the new account. [optional] # noqa: E501 + locale (FlatLocales): [optional] # noqa: E501 + role (str): Role of the new account. [optional] if omitted the server will use the default value of "user" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.username = username + self.password = password + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, username, password, *args, **kwargs): # noqa: E501 + """UserCreation - a model defined in OpenAPI + + Args: + username (str): Username of the new account + password (str): Password of the new account + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + firstname (str): First name of the user. [optional] # noqa: E501 + lastname (str): Last name of the user. [optional] # noqa: E501 + email (str): Email of the new account. [optional] # noqa: E501 + locale (FlatLocales): [optional] # noqa: E501 + role (str): Role of the new account. [optional] if omitted the server will use the default value of "user" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.username = username + self.password = password + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_creation.pyi b/flat_api/model/user_creation.pyi deleted file mode 100644 index a443df8..0000000 --- a/flat_api/model/user_creation.pyi +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - User creation - """ - - - class MetaOapg: - required = { - "password", - "username", - } - - class properties: - - - class username( - schemas.StrSchema - ): - pass - - - class password( - schemas.StrSchema - ): - pass - - - class firstname( - schemas.StrSchema - ): - pass - - - class lastname( - schemas.StrSchema - ): - pass - email = schemas.StrSchema - - @staticmethod - def locale() -> typing.Type['FlatLocales']: - return FlatLocales - - - class role( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - __annotations__ = { - "username": username, - "password": password, - "firstname": firstname, - "lastname": lastname, - "email": email, - "locale": locale, - "role": role, - } - - password: MetaOapg.properties.password - username: MetaOapg.properties.username - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["role"]) -> MetaOapg.properties.role: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["role"]) -> typing.Union[MetaOapg.properties.role, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "password", "firstname", "lastname", "email", "locale", "role", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, ], - username: typing.Union[MetaOapg.properties.username, str, ], - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, - role: typing.Union[MetaOapg.properties.role, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCreation': - return super().__new__( - cls, - *_args, - password=password, - username=username, - firstname=firstname, - lastname=lastname, - email=email, - locale=locale, - role=role, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.flat_locales import FlatLocales diff --git a/flat_api/model/user_details.py b/flat_api/model/user_details.py index edda2e6..b9e00c4 100644 --- a/flat_api/model/user_details.py +++ b/flat_api/model/user_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,514 +8,387 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_roles import ClassRoles + from flat_api.model.flat_locales import FlatLocales + from flat_api.model.organization_roles import OrganizationRoles + from flat_api.model.user_azure_details import UserAzureDetails + from flat_api.model.user_community_profile_links import UserCommunityProfileLinks + globals()['ClassRoles'] = ClassRoles + globals()['FlatLocales'] = FlatLocales + globals()['OrganizationRoles'] = OrganizationRoles + globals()['UserAzureDetails'] = UserAzureDetails + globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks -class UserDetails( - schemas.DictSchema -): + +class UserDetails(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'USER': "user", + 'GUEST': "guest", + }, + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "guest": "GUEST", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - bio = schemas.StrSchema - registrationDate = schemas.DateTimeSchema - likedScoresCount = schemas.IntSchema - followersCount = schemas.IntSchema - followingCount = schemas.IntSchema - ownedPublicScoresCount = schemas.IntSchema - coverPicture = schemas.StrSchema - profileTheme = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def links() -> typing.Type['UserCommunityProfileLinks']: - return UserCommunityProfileLinks - - @staticmethod - def azureDetails() -> typing.Type['UserAzureDetails']: - return UserAzureDetails - privateProfile = schemas.BoolSchema - - @staticmethod - def locale() -> typing.Type['FlatLocales']: - return FlatLocales - - - class groups( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'groups': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class pictureFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'pictureFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'printable_name': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'picture': (str, none_type,), # noqa: E501 + 'badges': ([str],), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'class_role': (ClassRoles,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + 'bio': (str,), # noqa: E501 + 'registration_date': (datetime,), # noqa: E501 + 'liked_scores_count': (int,), # noqa: E501 + 'followers_count': (int,), # noqa: E501 + 'following_count': (int,), # noqa: E501 + 'owned_public_scores_count': (int,), # noqa: E501 + 'cover_picture': (str,), # noqa: E501 + 'profile_theme': (str,), # noqa: E501 + 'instruments': ([str],), # noqa: E501 + 'links': (UserCommunityProfileLinks,), # noqa: E501 + 'azure_details': (UserAzureDetails,), # noqa: E501 + 'private_profile': (bool,), # noqa: E501 + 'locale': (FlatLocales,), # noqa: E501 + 'groups': ([str],), # noqa: E501 + 'picture_file': (str, none_type,), # noqa: E501 + 'cover_picture_file': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'username': 'username', # noqa: E501 + 'printable_name': 'printableName', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'name': 'name', # noqa: E501 + 'picture': 'picture', # noqa: E501 + 'badges': 'badges', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'class_role': 'classRole', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + 'bio': 'bio', # noqa: E501 + 'registration_date': 'registrationDate', # noqa: E501 + 'liked_scores_count': 'likedScoresCount', # noqa: E501 + 'followers_count': 'followersCount', # noqa: E501 + 'following_count': 'followingCount', # noqa: E501 + 'owned_public_scores_count': 'ownedPublicScoresCount', # noqa: E501 + 'cover_picture': 'coverPicture', # noqa: E501 + 'profile_theme': 'profileTheme', # noqa: E501 + 'instruments': 'instruments', # noqa: E501 + 'links': 'links', # noqa: E501 + 'azure_details': 'azureDetails', # noqa: E501 + 'private_profile': 'privateProfile', # noqa: E501 + 'locale': 'locale', # noqa: E501 + 'groups': 'groups', # noqa: E501 + 'picture_file': 'pictureFile', # noqa: E501 + 'cover_picture_file': 'coverPictureFile', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the user. [optional] # noqa: E501 + type (str): The type of account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + bio (str): User's biography. [optional] # noqa: E501 + registration_date (datetime): Date the user signed up. [optional] # noqa: E501 + liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 + followers_count (int): Number of followers the user have. [optional] # noqa: E501 + following_count (int): Number of people the user follow. [optional] # noqa: E501 + owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 + cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 + profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + links (UserCommunityProfileLinks): [optional] # noqa: E501 + azure_details (UserAzureDetails): [optional] # noqa: E501 + private_profile (bool): Tell either this user profile is private or not (individual accounts only). [optional] # noqa: E501 + locale (FlatLocales): [optional] # noqa: E501 + groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 + picture_file (str, none_type): The ID of the user profile picture. [optional] # noqa: E501 + cover_picture_file (str, none_type): The ID of the user profile cover picture. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class coverPictureFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverPictureFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserDetails - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Identifier of the user. [optional] # noqa: E501 + type (str): The type of account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + bio (str): User's biography. [optional] # noqa: E501 + registration_date (datetime): Date the user signed up. [optional] # noqa: E501 + liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 + followers_count (int): Number of followers the user have. [optional] # noqa: E501 + following_count (int): Number of people the user follow. [optional] # noqa: E501 + owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 + cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 + profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + links (UserCommunityProfileLinks): [optional] # noqa: E501 + azure_details (UserAzureDetails): [optional] # noqa: E501 + private_profile (bool): Tell either this user profile is private or not (individual accounts only). [optional] # noqa: E501 + locale (FlatLocales): [optional] # noqa: E501 + groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 + picture_file (str, none_type): The ID of the user profile picture. [optional] # noqa: E501 + cover_picture_file (str, none_type): The ID of the user profile cover picture. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "bio": bio, - "registrationDate": registrationDate, - "likedScoresCount": likedScoresCount, - "followersCount": followersCount, - "followingCount": followingCount, - "ownedPublicScoresCount": ownedPublicScoresCount, - "coverPicture": coverPicture, - "profileTheme": profileTheme, - "instruments": instruments, - "links": links, - "azureDetails": azureDetails, - "privateProfile": privateProfile, - "locale": locale, - "groups": groups, - "pictureFile": pictureFile, - "coverPictureFile": coverPictureFile, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["azureDetails"]) -> 'UserAzureDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privateProfile"]) -> MetaOapg.properties.privateProfile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pictureFile"]) -> MetaOapg.properties.pictureFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPictureFile"]) -> MetaOapg.properties.coverPictureFile: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["azureDetails"]) -> typing.Union['UserAzureDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privateProfile"]) -> typing.Union[MetaOapg.properties.privateProfile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pictureFile"]) -> typing.Union[MetaOapg.properties.pictureFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPictureFile"]) -> typing.Union[MetaOapg.properties.coverPictureFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, - registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, - likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, - profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, - azureDetails: typing.Union['UserAzureDetails', schemas.Unset] = schemas.unset, - privateProfile: typing.Union[MetaOapg.properties.privateProfile, bool, schemas.Unset] = schemas.unset, - locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, - groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, - pictureFile: typing.Union[MetaOapg.properties.pictureFile, None, str, schemas.Unset] = schemas.unset, - coverPictureFile: typing.Union[MetaOapg.properties.coverPictureFile, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserDetails': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - bio=bio, - registrationDate=registrationDate, - likedScoresCount=likedScoresCount, - followersCount=followersCount, - followingCount=followingCount, - ownedPublicScoresCount=ownedPublicScoresCount, - coverPicture=coverPicture, - profileTheme=profileTheme, - instruments=instruments, - links=links, - azureDetails=azureDetails, - privateProfile=privateProfile, - locale=locale, - groups=groups, - pictureFile=pictureFile, - coverPictureFile=coverPictureFile, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.flat_locales import FlatLocales -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_azure_details import UserAzureDetails -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_details.pyi b/flat_api/model/user_details.pyi deleted file mode 100644 index 2fb3c39..0000000 --- a/flat_api/model/user_details.pyi +++ /dev/null @@ -1,516 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserDetails( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - bio = schemas.StrSchema - registrationDate = schemas.DateTimeSchema - likedScoresCount = schemas.IntSchema - followersCount = schemas.IntSchema - followingCount = schemas.IntSchema - ownedPublicScoresCount = schemas.IntSchema - coverPicture = schemas.StrSchema - profileTheme = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def links() -> typing.Type['UserCommunityProfileLinks']: - return UserCommunityProfileLinks - - @staticmethod - def azureDetails() -> typing.Type['UserAzureDetails']: - return UserAzureDetails - privateProfile = schemas.BoolSchema - - @staticmethod - def locale() -> typing.Type['FlatLocales']: - return FlatLocales - - - class groups( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'groups': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class pictureFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'pictureFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class coverPictureFile( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'coverPictureFile': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "bio": bio, - "registrationDate": registrationDate, - "likedScoresCount": likedScoresCount, - "followersCount": followersCount, - "followingCount": followingCount, - "ownedPublicScoresCount": ownedPublicScoresCount, - "coverPicture": coverPicture, - "profileTheme": profileTheme, - "instruments": instruments, - "links": links, - "azureDetails": azureDetails, - "privateProfile": privateProfile, - "locale": locale, - "groups": groups, - "pictureFile": pictureFile, - "coverPictureFile": coverPictureFile, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["azureDetails"]) -> 'UserAzureDetails': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["privateProfile"]) -> MetaOapg.properties.privateProfile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["locale"]) -> 'FlatLocales': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pictureFile"]) -> MetaOapg.properties.pictureFile: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPictureFile"]) -> MetaOapg.properties.coverPictureFile: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["azureDetails"]) -> typing.Union['UserAzureDetails', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["privateProfile"]) -> typing.Union[MetaOapg.properties.privateProfile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["locale"]) -> typing.Union['FlatLocales', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pictureFile"]) -> typing.Union[MetaOapg.properties.pictureFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPictureFile"]) -> typing.Union[MetaOapg.properties.coverPictureFile, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, - registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, - likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, - profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, - azureDetails: typing.Union['UserAzureDetails', schemas.Unset] = schemas.unset, - privateProfile: typing.Union[MetaOapg.properties.privateProfile, bool, schemas.Unset] = schemas.unset, - locale: typing.Union['FlatLocales', schemas.Unset] = schemas.unset, - groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, - pictureFile: typing.Union[MetaOapg.properties.pictureFile, None, str, schemas.Unset] = schemas.unset, - coverPictureFile: typing.Union[MetaOapg.properties.coverPictureFile, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserDetails': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - bio=bio, - registrationDate=registrationDate, - likedScoresCount=likedScoresCount, - followersCount=followersCount, - followingCount=followingCount, - ownedPublicScoresCount=ownedPublicScoresCount, - coverPicture=coverPicture, - profileTheme=profileTheme, - instruments=instruments, - links=links, - azureDetails=azureDetails, - privateProfile=privateProfile, - locale=locale, - groups=groups, - pictureFile=pictureFile, - coverPictureFile=coverPictureFile, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.flat_locales import FlatLocales -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_azure_details import UserAzureDetails -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_details_admin.py b/flat_api/model/user_details_admin.py index 7474fb5..cd73d03 100644 --- a/flat_api/model/user_details_admin.py +++ b/flat_api/model/user_details_admin.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,419 +8,335 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_roles import ClassRoles + from flat_api.model.organization_roles import OrganizationRoles + from flat_api.model.user_details_admin_license import UserDetailsAdminLicense + globals()['ClassRoles'] = ClassRoles + globals()['OrganizationRoles'] = OrganizationRoles + globals()['UserDetailsAdminLicense'] = UserDetailsAdminLicense -class UserDetailsAdmin( - schemas.DictSchema -): + +class UserDetailsAdmin(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'USER': "user", + 'GUEST': "guest", + }, + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "guest": "GUEST", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - email = schemas.StrSchema - lastActivityDate = schemas.DateTimeSchema - - - class license( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - expirationDate = schemas.DateTimeSchema - - @staticmethod - def source() -> typing.Type['LicenseSources']: - return LicenseSources - - @staticmethod - def mode() -> typing.Type['LicenseMode']: - return LicenseMode - active = schemas.BoolSchema - __annotations__ = { - "id": id, - "expirationDate": expirationDate, - "source": source, - "mode": mode, - "active": active, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'LicenseSources': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mode"]) -> 'LicenseMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['LicenseSources', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mode"]) -> typing.Union['LicenseMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["active"]) -> typing.Union[MetaOapg.properties.active, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - source: typing.Union['LicenseSources', schemas.Unset] = schemas.unset, - mode: typing.Union['LicenseMode', schemas.Unset] = schemas.unset, - active: typing.Union[MetaOapg.properties.active, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'license': - return super().__new__( - cls, - *_args, - id=id, - expirationDate=expirationDate, - source=source, - mode=mode, - active=active, - _configuration=_configuration, - **kwargs, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'printable_name': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'picture': (str, none_type,), # noqa: E501 + 'badges': ([str],), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'class_role': (ClassRoles,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'last_activity_date': (datetime,), # noqa: E501 + 'license': (UserDetailsAdminLicense,), # noqa: E501 + 'groups': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'username': 'username', # noqa: E501 + 'printable_name': 'printableName', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'name': 'name', # noqa: E501 + 'picture': 'picture', # noqa: E501 + 'badges': 'badges', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'class_role': 'classRole', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + 'email': 'email', # noqa: E501 + 'last_activity_date': 'lastActivityDate', # noqa: E501 + 'license': 'license', # noqa: E501 + 'groups': 'groups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserDetailsAdmin - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + email (str): Email of the user. [optional] # noqa: E501 + last_activity_date (datetime): Date of the last user activity. [optional] # noqa: E501 + license (UserDetailsAdminLicense): [optional] # noqa: E501 + groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class groups( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'groups': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserDetailsAdmin - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + email (str): Email of the user. [optional] # noqa: E501 + last_activity_date (datetime): Date of the last user activity. [optional] # noqa: E501 + license (UserDetailsAdminLicense): [optional] # noqa: E501 + groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "email": email, - "lastActivityDate": lastActivityDate, - "license": license, - "groups": groups, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastActivityDate"]) -> MetaOapg.properties.lastActivityDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> MetaOapg.properties.license: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastActivityDate"]) -> typing.Union[MetaOapg.properties.lastActivityDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union[MetaOapg.properties.license, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - lastActivityDate: typing.Union[MetaOapg.properties.lastActivityDate, str, datetime, schemas.Unset] = schemas.unset, - license: typing.Union[MetaOapg.properties.license, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserDetailsAdmin': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - email=email, - lastActivityDate=lastActivityDate, - license=license, - groups=groups, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.license_mode import LicenseMode -from flat_api.model.license_sources import LicenseSources -from flat_api.model.organization_roles import OrganizationRoles + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_details_admin.pyi b/flat_api/model/user_details_admin.pyi deleted file mode 100644 index 0c3c445..0000000 --- a/flat_api/model/user_details_admin.pyi +++ /dev/null @@ -1,421 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserDetailsAdmin( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - email = schemas.StrSchema - lastActivityDate = schemas.DateTimeSchema - - - class license( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - expirationDate = schemas.DateTimeSchema - - @staticmethod - def source() -> typing.Type['LicenseSources']: - return LicenseSources - - @staticmethod - def mode() -> typing.Type['LicenseMode']: - return LicenseMode - active = schemas.BoolSchema - __annotations__ = { - "id": id, - "expirationDate": expirationDate, - "source": source, - "mode": mode, - "active": active, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'LicenseSources': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mode"]) -> 'LicenseMode': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> typing.Union['LicenseSources', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mode"]) -> typing.Union['LicenseMode', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["active"]) -> typing.Union[MetaOapg.properties.active, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "expirationDate", "source", "mode", "active", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - source: typing.Union['LicenseSources', schemas.Unset] = schemas.unset, - mode: typing.Union['LicenseMode', schemas.Unset] = schemas.unset, - active: typing.Union[MetaOapg.properties.active, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'license': - return super().__new__( - cls, - *_args, - id=id, - expirationDate=expirationDate, - source=source, - mode=mode, - active=active, - _configuration=_configuration, - **kwargs, - ) - - - class groups( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'groups': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "email": email, - "lastActivityDate": lastActivityDate, - "license": license, - "groups": groups, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastActivityDate"]) -> MetaOapg.properties.lastActivityDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["license"]) -> MetaOapg.properties.license: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["groups"]) -> MetaOapg.properties.groups: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastActivityDate"]) -> typing.Union[MetaOapg.properties.lastActivityDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["license"]) -> typing.Union[MetaOapg.properties.license, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["groups"]) -> typing.Union[MetaOapg.properties.groups, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - lastActivityDate: typing.Union[MetaOapg.properties.lastActivityDate, str, datetime, schemas.Unset] = schemas.unset, - license: typing.Union[MetaOapg.properties.license, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - groups: typing.Union[MetaOapg.properties.groups, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserDetailsAdmin': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - email=email, - lastActivityDate=lastActivityDate, - license=license, - groups=groups, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.license_mode import LicenseMode -from flat_api.model.license_sources import LicenseSources -from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_details_admin_license.py b/flat_api/model/user_details_admin_license.py new file mode 100644 index 0000000..e83dc0e --- /dev/null +++ b/flat_api/model/user_details_admin_license.py @@ -0,0 +1,288 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError + + +def lazy_import(): + from flat_api.model.license_mode import LicenseMode + from flat_api.model.license_sources import LicenseSources + globals()['LicenseMode'] = LicenseMode + globals()['LicenseSources'] = LicenseSources + + +class UserDetailsAdminLicense(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'expiration_date': (datetime,), # noqa: E501 + 'source': (LicenseSources,), # noqa: E501 + 'mode': (LicenseMode,), # noqa: E501 + 'active': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'expiration_date': 'expirationDate', # noqa: E501 + 'source': 'source', # noqa: E501 + 'mode': 'mode', # noqa: E501 + 'active': 'active', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserDetailsAdminLicense - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the current license. [optional] # noqa: E501 + expiration_date (datetime): Date when the license expires. [optional] # noqa: E501 + source (LicenseSources): [optional] # noqa: E501 + mode (LicenseMode): [optional] # noqa: E501 + active (bool): ID of the current license. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserDetailsAdminLicense - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): ID of the current license. [optional] # noqa: E501 + expiration_date (datetime): Date when the license expires. [optional] # noqa: E501 + source (LicenseSources): [optional] # noqa: E501 + mode (LicenseMode): [optional] # noqa: E501 + active (bool): ID of the current license. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_public.py b/flat_api/model/user_public.py index fd9910b..79a8450 100644 --- a/flat_api/model/user_public.py +++ b/flat_api/model/user_public.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,386 +8,359 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_roles import ClassRoles + from flat_api.model.organization_roles import OrganizationRoles + from flat_api.model.user_community_profile_links import UserCommunityProfileLinks + globals()['ClassRoles'] = ClassRoles + globals()['OrganizationRoles'] = OrganizationRoles + globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks -class UserPublic( - schemas.DictSchema -): + +class UserPublic(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'USER': "user", + 'GUEST': "guest", + }, + } - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "guest": "GUEST", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'printable_name': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'picture': (str, none_type,), # noqa: E501 + 'badges': ([str],), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'class_role': (ClassRoles,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + 'bio': (str,), # noqa: E501 + 'registration_date': (datetime,), # noqa: E501 + 'liked_scores_count': (int,), # noqa: E501 + 'followers_count': (int,), # noqa: E501 + 'following_count': (int,), # noqa: E501 + 'owned_public_scores_count': (int,), # noqa: E501 + 'cover_picture': (str,), # noqa: E501 + 'profile_theme': (str,), # noqa: E501 + 'instruments': ([str],), # noqa: E501 + 'links': (UserCommunityProfileLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'username': 'username', # noqa: E501 + 'printable_name': 'printableName', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'name': 'name', # noqa: E501 + 'picture': 'picture', # noqa: E501 + 'badges': 'badges', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'class_role': 'classRole', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + 'bio': 'bio', # noqa: E501 + 'registration_date': 'registrationDate', # noqa: E501 + 'liked_scores_count': 'likedScoresCount', # noqa: E501 + 'followers_count': 'followersCount', # noqa: E501 + 'following_count': 'followingCount', # noqa: E501 + 'owned_public_scores_count': 'ownedPublicScoresCount', # noqa: E501 + 'cover_picture': 'coverPicture', # noqa: E501 + 'profile_theme': 'profileTheme', # noqa: E501 + 'instruments': 'instruments', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserPublic - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + bio (str): User's biography. [optional] # noqa: E501 + registration_date (datetime): Date the user signed up. [optional] # noqa: E501 + liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 + followers_count (int): Number of followers the user have. [optional] # noqa: E501 + following_count (int): Number of people the user follow. [optional] # noqa: E501 + owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 + cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 + profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + links (UserCommunityProfileLinks): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - bio = schemas.StrSchema - registrationDate = schemas.DateTimeSchema - likedScoresCount = schemas.IntSchema - followersCount = schemas.IntSchema - followingCount = schemas.IntSchema - ownedPublicScoresCount = schemas.IntSchema - coverPicture = schemas.StrSchema - profileTheme = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserPublic - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + bio (str): User's biography. [optional] # noqa: E501 + registration_date (datetime): Date the user signed up. [optional] # noqa: E501 + liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 + followers_count (int): Number of followers the user have. [optional] # noqa: E501 + following_count (int): Number of people the user follow. [optional] # noqa: E501 + owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 + cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 + profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 + instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 + links (UserCommunityProfileLinks): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def links() -> typing.Type['UserCommunityProfileLinks']: - return UserCommunityProfileLinks - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "bio": bio, - "registrationDate": registrationDate, - "likedScoresCount": likedScoresCount, - "followersCount": followersCount, - "followingCount": followingCount, - "ownedPublicScoresCount": ownedPublicScoresCount, - "coverPicture": coverPicture, - "profileTheme": profileTheme, - "instruments": instruments, - "links": links, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, - registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, - likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, - profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserPublic': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - bio=bio, - registrationDate=registrationDate, - likedScoresCount=likedScoresCount, - followersCount=followersCount, - followingCount=followingCount, - ownedPublicScoresCount=ownedPublicScoresCount, - coverPicture=coverPicture, - profileTheme=profileTheme, - instruments=instruments, - links=links, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_public.pyi b/flat_api/model/user_public.pyi deleted file mode 100644 index 1cf8e47..0000000 --- a/flat_api/model/user_public.pyi +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserPublic( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - bio = schemas.StrSchema - registrationDate = schemas.DateTimeSchema - likedScoresCount = schemas.IntSchema - followersCount = schemas.IntSchema - followingCount = schemas.IntSchema - ownedPublicScoresCount = schemas.IntSchema - coverPicture = schemas.StrSchema - profileTheme = schemas.StrSchema - - - class instruments( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'instruments': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - @staticmethod - def links() -> typing.Type['UserCommunityProfileLinks']: - return UserCommunityProfileLinks - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - "bio": bio, - "registrationDate": registrationDate, - "likedScoresCount": likedScoresCount, - "followersCount": followersCount, - "followingCount": followingCount, - "ownedPublicScoresCount": ownedPublicScoresCount, - "coverPicture": coverPicture, - "profileTheme": profileTheme, - "instruments": instruments, - "links": links, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bio"]) -> MetaOapg.properties.bio: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["registrationDate"]) -> MetaOapg.properties.registrationDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["likedScoresCount"]) -> MetaOapg.properties.likedScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followersCount"]) -> MetaOapg.properties.followersCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["followingCount"]) -> MetaOapg.properties.followingCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> MetaOapg.properties.ownedPublicScoresCount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["coverPicture"]) -> MetaOapg.properties.coverPicture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["profileTheme"]) -> MetaOapg.properties.profileTheme: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["instruments"]) -> MetaOapg.properties.instruments: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["links"]) -> 'UserCommunityProfileLinks': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bio"]) -> typing.Union[MetaOapg.properties.bio, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["registrationDate"]) -> typing.Union[MetaOapg.properties.registrationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["likedScoresCount"]) -> typing.Union[MetaOapg.properties.likedScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followersCount"]) -> typing.Union[MetaOapg.properties.followersCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["followingCount"]) -> typing.Union[MetaOapg.properties.followingCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ownedPublicScoresCount"]) -> typing.Union[MetaOapg.properties.ownedPublicScoresCount, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["coverPicture"]) -> typing.Union[MetaOapg.properties.coverPicture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["profileTheme"]) -> typing.Union[MetaOapg.properties.profileTheme, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["instruments"]) -> typing.Union[MetaOapg.properties.instruments, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["links"]) -> typing.Union['UserCommunityProfileLinks', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - bio: typing.Union[MetaOapg.properties.bio, str, schemas.Unset] = schemas.unset, - registrationDate: typing.Union[MetaOapg.properties.registrationDate, str, datetime, schemas.Unset] = schemas.unset, - likedScoresCount: typing.Union[MetaOapg.properties.likedScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followersCount: typing.Union[MetaOapg.properties.followersCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - followingCount: typing.Union[MetaOapg.properties.followingCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - ownedPublicScoresCount: typing.Union[MetaOapg.properties.ownedPublicScoresCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, - coverPicture: typing.Union[MetaOapg.properties.coverPicture, str, schemas.Unset] = schemas.unset, - profileTheme: typing.Union[MetaOapg.properties.profileTheme, str, schemas.Unset] = schemas.unset, - instruments: typing.Union[MetaOapg.properties.instruments, list, tuple, schemas.Unset] = schemas.unset, - links: typing.Union['UserCommunityProfileLinks', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserPublic': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - bio=bio, - registrationDate=registrationDate, - likedScoresCount=likedScoresCount, - followersCount=followersCount, - followingCount=followingCount, - ownedPublicScoresCount=ownedPublicScoresCount, - coverPicture=coverPicture, - profileTheme=profileTheme, - instruments=instruments, - links=links, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks diff --git a/flat_api/model/user_public_summary.py b/flat_api/model/user_public_summary.py index b1e9a5f..4aae952 100644 --- a/flat_api/model/user_public_summary.py +++ b/flat_api/model/user_public_summary.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,260 +8,317 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 +def lazy_import(): + from flat_api.model.class_roles import ClassRoles + from flat_api.model.organization_roles import OrganizationRoles + globals()['ClassRoles'] = ClassRoles + globals()['OrganizationRoles'] = OrganizationRoles -class UserPublicSummary( - schemas.DictSchema -): + +class UserPublicSummary(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'USER': "user", + 'GUEST': "guest", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'printable_name': (str,), # noqa: E501 + 'firstname': (str,), # noqa: E501 + 'lastname': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'picture': (str, none_type,), # noqa: E501 + 'badges': ([str],), # noqa: E501 + 'organization': (str,), # noqa: E501 + 'organization_role': (OrganizationRoles,), # noqa: E501 + 'class_role': (ClassRoles,), # noqa: E501 + 'html_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'username': 'username', # noqa: E501 + 'printable_name': 'printableName', # noqa: E501 + 'firstname': 'firstname', # noqa: E501 + 'lastname': 'lastname', # noqa: E501 + 'name': 'name', # noqa: E501 + 'picture': 'picture', # noqa: E501 + 'badges': 'badges', # noqa: E501 + 'organization': 'organization', # noqa: E501 + 'organization_role': 'organizationRole', # noqa: E501 + 'class_role': 'classRole', # noqa: E501 + 'html_url': 'htmlUrl', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "guest": "GUEST", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserPublicSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserPublicSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The user unique identifier. [optional] # noqa: E501 + type (str): The type of user account. [optional] # noqa: E501 + username (str): The user name (unique for the organization). [optional] # noqa: E501 + printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 + firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 + lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 + name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 + picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 + badges ([str]): List of badges for the user profile. [optional] # noqa: E501 + organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 + organization_role (OrganizationRoles): [optional] # noqa: E501 + class_role (ClassRoles): [optional] # noqa: E501 + html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserPublicSummary': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_public_summary.pyi b/flat_api/model/user_public_summary.pyi deleted file mode 100644 index 1dd6f60..0000000 --- a/flat_api/model/user_public_summary.pyi +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserPublicSummary( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def GUEST(cls): - return cls("guest") - username = schemas.StrSchema - printableName = schemas.StrSchema - firstname = schemas.StrSchema - lastname = schemas.StrSchema - name = schemas.StrSchema - - - class picture( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'picture': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class badges( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'badges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - organization = schemas.StrSchema - - @staticmethod - def organizationRole() -> typing.Type['OrganizationRoles']: - return OrganizationRoles - - @staticmethod - def classRole() -> typing.Type['ClassRoles']: - return ClassRoles - htmlUrl = schemas.StrSchema - __annotations__ = { - "id": id, - "type": type, - "username": username, - "printableName": printableName, - "firstname": firstname, - "lastname": lastname, - "name": name, - "picture": picture, - "badges": badges, - "organization": organization, - "organizationRole": organizationRole, - "classRole": classRole, - "htmlUrl": htmlUrl, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["printableName"]) -> MetaOapg.properties.printableName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["picture"]) -> MetaOapg.properties.picture: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["badges"]) -> MetaOapg.properties.badges: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["organizationRole"]) -> 'OrganizationRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["classRole"]) -> 'ClassRoles': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["htmlUrl"]) -> MetaOapg.properties.htmlUrl: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["printableName"]) -> typing.Union[MetaOapg.properties.printableName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["picture"]) -> typing.Union[MetaOapg.properties.picture, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["badges"]) -> typing.Union[MetaOapg.properties.badges, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> typing.Union[MetaOapg.properties.organization, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["organizationRole"]) -> typing.Union['OrganizationRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["classRole"]) -> typing.Union['ClassRoles', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["htmlUrl"]) -> typing.Union[MetaOapg.properties.htmlUrl, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - printableName: typing.Union[MetaOapg.properties.printableName, str, schemas.Unset] = schemas.unset, - firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset, - lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - picture: typing.Union[MetaOapg.properties.picture, None, str, schemas.Unset] = schemas.unset, - badges: typing.Union[MetaOapg.properties.badges, list, tuple, schemas.Unset] = schemas.unset, - organization: typing.Union[MetaOapg.properties.organization, str, schemas.Unset] = schemas.unset, - organizationRole: typing.Union['OrganizationRoles', schemas.Unset] = schemas.unset, - classRole: typing.Union['ClassRoles', schemas.Unset] = schemas.unset, - htmlUrl: typing.Union[MetaOapg.properties.htmlUrl, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserPublicSummary': - return super().__new__( - cls, - *_args, - id=id, - type=type, - username=username, - printableName=printableName, - firstname=firstname, - lastname=lastname, - name=name, - picture=picture, - badges=badges, - organization=organization, - organizationRole=organizationRole, - classRole=classRole, - htmlUrl=htmlUrl, - _configuration=_configuration, - **kwargs, - ) - -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles diff --git a/flat_api/model/user_signin_link.py b/flat_api/model/user_signin_link.py index f274ad8..963d914 100644 --- a/flat_api/model/user_signin_link.py +++ b/flat_api/model/user_signin_link.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,80 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class UserSigninLink( - schemas.DictSchema -): +class UserSigninLink(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'url': (str,), # noqa: E501 + 'expiration_date': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'url': 'url', # noqa: E501 + 'expiration_date': 'expirationDate', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserSigninLink - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + url (str): URL to use to sign in to this account. [optional] # noqa: E501 + expiration_date (datetime): Date when the link expires. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserSigninLink - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + url (str): URL to use to sign in to this account. [optional] # noqa: E501 + expiration_date (datetime): Date when the link expires. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - url = schemas.StrSchema - expirationDate = schemas.DateTimeSchema - __annotations__ = { - "url": url, - "expirationDate": expirationDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserSigninLink': - return super().__new__( - cls, - *_args, - url=url, - expirationDate=expirationDate, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_signin_link.pyi b/flat_api/model/user_signin_link.pyi deleted file mode 100644 index f274ad8..0000000 --- a/flat_api/model/user_signin_link.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserSigninLink( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - url = schemas.StrSchema - expirationDate = schemas.DateTimeSchema - __annotations__ = { - "url": url, - "expirationDate": expirationDate, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["expirationDate"]) -> MetaOapg.properties.expirationDate: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["expirationDate"]) -> typing.Union[MetaOapg.properties.expirationDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["url", "expirationDate", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, - expirationDate: typing.Union[MetaOapg.properties.expirationDate, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserSigninLink': - return super().__new__( - cls, - *_args, - url=url, - expirationDate=expirationDate, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model/user_signin_link_creation.py b/flat_api/model/user_signin_link_creation.py index b63a798..b79dd0d 100644 --- a/flat_api/model/user_signin_link_creation.py +++ b/flat_api/model/user_signin_link_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,70 +8,257 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from flat_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from flat_api.exceptions import ApiAttributeError -from flat_api import schemas # noqa: F401 -class UserSigninLinkCreation( - schemas.DictSchema -): +class UserSigninLinkCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'destination_path': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'destination_path': 'destinationPath', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UserSigninLinkCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + destination_path (str): Path to redirect to after signin. [optional] if omitted the server will use the default value of "/" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UserSigninLinkCreation - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + destination_path (str): Path to redirect to after signin. [optional] if omitted the server will use the default value of "/" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - destinationPath = schemas.StrSchema - __annotations__ = { - "destinationPath": destinationPath, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destinationPath"]) -> MetaOapg.properties.destinationPath: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destinationPath"]) -> typing.Union[MetaOapg.properties.destinationPath, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destinationPath: typing.Union[MetaOapg.properties.destinationPath, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserSigninLinkCreation': - return super().__new__( - cls, - *_args, - destinationPath=destinationPath, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/flat_api/model/user_signin_link_creation.pyi b/flat_api/model/user_signin_link_creation.pyi deleted file mode 100644 index b63a798..0000000 --- a/flat_api/model/user_signin_link_creation.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - - -class UserSigninLinkCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - destinationPath = schemas.StrSchema - __annotations__ = { - "destinationPath": destinationPath, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destinationPath"]) -> MetaOapg.properties.destinationPath: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destinationPath"]) -> typing.Union[MetaOapg.properties.destinationPath, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["destinationPath", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destinationPath: typing.Union[MetaOapg.properties.destinationPath, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserSigninLinkCreation': - return super().__new__( - cls, - *_args, - destinationPath=destinationPath, - _configuration=_configuration, - **kwargs, - ) diff --git a/flat_api/model_utils.py b/flat_api/model_utils.py new file mode 100644 index 0000000..7f5319d --- /dev/null +++ b/flat_api/model_utils.py @@ -0,0 +1,2057 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +from datetime import date, datetime # noqa: F401 +from copy import deepcopy +import inspect +import io +import os +import pprint +import re +import tempfile +import uuid + +from dateutil.parser import parse + +from flat_api.exceptions import ( + ApiKeyError, + ApiAttributeError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +file_type = io.IOBase + + +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python( + kwargs, _self if isinstance( + _self, type) else _self.__class__) + return fn(_self, *args, **kwargs) + return wrapped_init + + +class cached_property(object): + # this caches the result of the function call for fn with no inputs + # use this as a decorator on function methods that you want converted + # into cached properties + result_key = '_results' + + def __init__(self, fn): + self._fn = fn + + def __get__(self, instance, cls=None): + if self.result_key in vars(self): + return vars(self)[self.result_key] + else: + result = self._fn() + setattr(self, self.result_key, result) + return result + + +PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + + +def allows_single_value_input(cls): + """ + This function returns True if the input composed schema model or any + descendant model allows a value only input + This is true for cases where oneOf contains items like: + oneOf: + - float + - NumberWithValidation + - StringEnum + - ArrayModel + - null + TODO: lru_cache this + """ + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): + return True + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return False + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return False + + +def composed_model_input_classes(cls): + """ + This function returns a list of the possible models that can be accepted as + inputs. + TODO: lru_cache this + """ + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + return [cls] + elif issubclass(cls, ModelNormal): + if cls.discriminator is None: + return [cls] + else: + return get_discriminated_classes(cls) + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return [] + if cls.discriminator is None: + input_classes = [] + for c in cls._composed_schemas['oneOf']: + input_classes.extend(composed_model_input_classes(c)) + return input_classes + else: + return get_discriminated_classes(cls) + return [] + + +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + def set_attribute(self, name, value): + # this is only used to set properties on self + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other + + def __setattr__(self, attr, value): + """set the value of an attribute using dot notation: `instance.attr = val`""" + self[attr] = value + + def __getattr__(self, attr): + """get the value of an attribute using dot notation: `instance.attr`""" + return self.__getitem__(attr) + + def __copy__(self): + cls = self.__class__ + if self.get("_spec_property_naming", False): + return cls._new_from_openapi_data(**self.__dict__) + else: + return cls.__new__(cls, **self.__dict__) + + def __deepcopy__(self, memo): + cls = self.__class__ + + if self.get("_spec_property_naming", False): + new_inst = cls._new_from_openapi_data() + else: + new_inst = cls.__new__(cls) + + for k, v in self.__dict__.items(): + setattr(new_inst, k, deepcopy(v, memo)) + return new_inst + + + def __new__(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return super(OpenApiModel, cls).__new__(cls) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return super(OpenApiModel, cls).__new__(cls) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst.__init__(*args, **kwargs) + + if kwargs.get("_spec_property_naming", False): + # when true, implies new is from deserialization + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + else: + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + + return new_inst + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + return new_inst + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_str(self): + """Returns the string representation of the model""" + return str(self.value) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + return vals_equal + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +class ModelComposed(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi and have oneOf/allOf/anyOf + + When one sets a property we use var_name_to_model_instances to store the value in + the correct class instances + run any type checking + validation code. + When one gets a property we use var_name_to_model_instances to get the value + from the correct class instances. + This allows multiple composed schemas to contain the same property with additive + constraints on the value. + + _composed_schemas (dict) stores the anyOf/allOf/oneOf classes + key (str): allOf/oneOf/anyOf + value (list): the classes in the XOf definition. + Note: none_type can be included when the openapi document version >= 3.1.0 + _composed_instances (list): stores a list of instances of the composed schemas + defined in _composed_schemas. When properties are accessed in the self instance, + they are returned from the self._data_store or the data stores in the instances + in self._composed_schemas + _var_name_to_model_instances (dict): maps between a variable name on self and + the composed instances (self included) which contain that data + key (str): property name + value (list): list of class instances, self or instances in _composed_instances + which contain the value that the key is referring to. + """ + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None + + __unset_attribute_value__ = object() + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + # get the attribute from the correct instance + model_instances = self._var_name_to_model_instances.get(name) + values = [] + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + v = model_instance._data_store[name] + if v not in values: + values.append(v) + len_values = len(values) + if len_values == 0: + return default + elif len_values == 1: + return values[0] + elif len_values > 1: + raise ApiValueError( + "Values stored for property {0} in {1} differ when looking " + "at self and self's composed instances. All values must be " + "the same".format(name, type(self).__name__), + [e for e in [self._path_to_item, name] if e] + ) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + value = self.get(name, self.__unset_attribute_value__) + if value is self.__unset_attribute_value__: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + return value + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + + if name in self.required_properties: + return name in self.__dict__ + + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) + + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + return True + + return False + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +COERCION_INDEX_BY_TYPE = { + ModelComposed: 0, + ModelNormal: 1, + ModelSimple: 2, + none_type: 3, # The type of 'None'. + list: 4, + dict: 5, + float: 6, + int: 7, + bool: 8, + datetime: 9, + date: 10, + str: 11, + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (int, float), + (list, ModelComposed), + (dict, ModelComposed), + (str, ModelComposed), + (int, ModelComposed), + (float, ModelComposed), + (list, ModelComposed), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelComposed), + # (list, ModelComposed), + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelComposed), + (list, ModelComposed), + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): + """Raises an exception if the input_values are not allowed + + Args: + allowed_values (dict): the allowed_values dict + input_variable_path (tuple): the path to the input variable + input_values (list/str/int/float/date/datetime): the values that we + are checking to see if they are in allowed_values + """ + these_allowed_values = list(allowed_values[input_variable_path].values()) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), + raise ApiValueError( + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) + raise ApiValueError( + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): + raise ApiValueError( + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) + ) + + +def is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + +def check_validations( + validations, input_variable_path, input_values, + configuration=None): + """Raises an exception if the input_values are invalid + + Args: + validations (dict): the validation dictionary. + input_variable_path (tuple): the path to the input variable. + input_values (list/str/int/float/date/datetime): the values that we + are checking. + configuration (Configuration): the configuration class. + """ + + if input_values is None: + return + + current_validations = validations[input_variable_path] + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + raise ApiValueError( + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) + ) + + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) + ) + + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) + ) + + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): + raise ApiValueError( + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) + ) + + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): + raise ValueError( + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) + ) + + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) + ) + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): + err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + input_variable_path[0], + current_validations['regex']['pattern'] + ) + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + err_msg = r"%s with flags=`%s`" % (err_msg, flags) + raise ApiValueError(err_msg) + + +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with class information inside it. + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with class information inside it. + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): + return COERCION_INDEX_BY_TYPE[ModelComposed] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + elif class_or_instance in COERCION_INDEX_BY_TYPE: + return COERCION_INDEX_BY_TYPE[class_or_instance] + raise ApiValueError("Unsupported type: %s" % class_or_instance) + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types + + +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + current_item (any): the current item (input data) to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelComposed): + required_type_class_simplified = ModelComposed + elif issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + + +def get_discriminated_classes(cls): + """ + Returns all the classes that a discriminator converts to + TODO: lru_cache this + """ + possible_classes = [] + key = list(cls.discriminator.keys())[0] + if is_type_nullable(cls): + possible_classes.append(cls) + for discr_cls in cls.discriminator[key].values(): + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + possible_classes.extend(get_discriminated_classes(discr_cls)) + else: + possible_classes.append(discr_cls) + return possible_classes + + +def get_possible_classes(cls, from_server_context): + # TODO: lru_cache this + possible_classes = [cls] + if from_server_context: + return possible_classes + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + possible_classes = [] + possible_classes.extend(get_discriminated_classes(cls)) + elif issubclass(cls, ModelComposed): + possible_classes.extend(composed_model_input_classes(cls)) + return possible_classes + + +def get_required_type_classes(required_types_mixed, spec_property_naming): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + spec_property_naming (bool): if True these values came from the + server, and we use the data types in our endpoints. + If False, we are client side and we need to include + oneOf and discriminator classes inside the data types in our endpoints + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (dict): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class. + If the input_dict contains a key which does not declared in the model_class, + the key is added to the output dict as is. The assumption is the model_class + may have undeclared properties (additionalProperties attribute in the OAS + document). + """ + + if getattr(model_class, 'attribute_map', None) is None: + return input_dict + output_dict = {} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} + for javascript_key, value in input_dict.items(): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError) as ex: + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item + ) from ex + + +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): + """Returns the child class specified by the discriminator. + + Args: + model_class (OpenApiModel): the model class. + discr_name (string): the name of the discriminator property. + discr_value (any): the discriminator value. + cls_visited (list): list of model classes that have been visited. + Used to determine the discriminator class without + visiting circular references indefinitely. + + Returns: + used_model_class (class/None): the chosen child class that will be used + to deserialize the data, for example dog.Dog. + If a class is not found, None is returned. + """ + + if model_class in cls_visited: + # The class has already been visited and no suitable class was found. + return None + cls_visited.append(model_class) + used_model_class = None + if discr_name in model_class.discriminator: + class_name_to_discr_class = model_class.discriminator[discr_name] + used_model_class = class_name_to_discr_class.get(discr_value) + if used_model_class is None: + # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators + # The discriminator mapping may exist in a descendant (anyOf, oneOf) + # or ancestor (allOf). + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat + # hierarchy, the discriminator mappings may be defined at any level + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: + # Check if the schema has inherited discriminators. + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) + if used_model_class is not None: + return used_model_class + return used_model_class + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): + """Deserializes model_data to model instance. + + Args: + model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) + + if issubclass(model_class, ModelSimple): + return model_class._new_from_openapi_data(model_data, **kw_args) + elif isinstance(model_data, list): + return model_class._new_from_openapi_data(*model_data, **kw_args) + if isinstance(model_data, dict): + kw_args.update(model_data) + return model_class._new_from_openapi_data(**kw_args) + elif isinstance(model_data, PRIMITIVE_TYPES): + return model_class._new_from_openapi_data(model_data, **kw_args) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelComposed/ModelNormal/ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + if configuration is None or not configuration.discard_unknown_keys: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def is_type_nullable(input_type): + """ + Returns true if None is an allowed value for the specified input_type. + + A type is nullable if at least one of the following conditions is true: + 1. The OAS 'nullable' attribute has been specified, + 1. The type is the 'null' type, + 1. The type is a anyOf/oneOf composed schema, and a child schema is + the 'null' type. + Args: + input_type (type): the class of the input_value that we are + checking + Returns: + bool + """ + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True + if issubclass(input_type, ModelComposed): + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): + return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): + return True + return False + + +def is_valid_type(input_class_simple, valid_classes): + """ + Args: + input_class_simple (class): the class of the input_value that we are + checking + valid_classes (tuple): the valid classes that the current item + should be + Returns: + bool + """ + if issubclass(input_class_simple, OpenApiModel) and \ + valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + return True + valid_type = input_class_simple in valid_classes + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): + for valid_class in valid_classes: + if input_class_simple is none_type and is_type_nullable(valid_class): + # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. + return True + if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + continue + discr_propertyname_py = list(valid_class.discriminator.keys())[0] + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) + valid_type = is_valid_type(input_class_simple, discriminator_classes) + if valid_type: + return True + return valid_type + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed, spec_property_naming) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = is_valid_type(input_class_simple, valid_classes) + if not valid_type: + if (configuration + or (input_class_simple == dict + and dict not in valid_classes)): + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=True, + check_type=_check_type + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, spec_property_naming, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=_check_type + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in input_value.items(): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + def extract_item(item): return ( + item[0], model_to_dict( + item[1], serialize=serialize)) if hasattr( + item[1], '_data_store') else item + + model_instances = [model_instance] + if model_instance._composed_schemas: + model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} + for model_instance in model_instances: + for attr, value in model_instance._data_store.items(): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) + if isinstance(value, list): + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res + elif isinstance(value, dict): + result[attr] = dict(map( + extract_item, + value.items() + )) + elif isinstance(value, ModelSimple): + result[attr] = value.value + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + """ + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_allof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes + + Returns + composed_instances (list) + """ + composed_instances = [] + for allof_class in self._composed_schemas['allOf']: + + try: + if constant_args.get('_spec_property_naming'): + allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) + else: + allof_instance = allof_class(**model_args, **constant_args) + composed_instances.append(allof_instance) + except Exception as ex: + raise ApiValueError( + "Invalid inputs given to generate an instance of '%s'. The " + "input data was invalid for the allOf schema '%s' in the composed " + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) + ) from ex + return composed_instances + + +def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): + """ + Find the oneOf schema that matches the input data (e.g. payload). + If exactly one schema matches the input data, an instance of that schema + is returned. + If zero or more than one schema match the input data, an exception is raised. + In OAS 3.x, the payload MUST, by validation, match exactly one of the + schemas described by oneOf. + + Args: + cls: the class we are handling + model_kwargs (dict): var_name to var_value + The input data, e.g. the payload that must match a oneOf schema + in the OpenAPI document. + constant_kwargs (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Kwargs: + model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): + the value to assign to a primitive class or ModelSimple class + Notes: + - this is only passed in when oneOf includes types which are not object + - None is used to suppress handling of model_arg, nullable models are handled in __new__ + + Returns + oneof_instance (instance) + """ + if len(cls._composed_schemas['oneOf']) == 0: + return None + + oneof_instances = [] + # Iterate over each oneOf schema and determine if the input data + # matches the oneOf schemas. + for oneof_class in cls._composed_schemas['oneOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if oneof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + single_value_input = allows_single_value_input(oneof_class) + + try: + if not single_value_input: + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data( + **model_kwargs, **constant_kwargs) + else: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) + else: + if issubclass(oneof_class, ModelSimple): + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data( + model_arg, **constant_kwargs) + else: + oneof_instance = oneof_class(model_arg, **constant_kwargs) + elif oneof_class in PRIMITIVE_TYPES: + oneof_instance = validate_and_convert_types( + model_arg, + (oneof_class,), + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] + ) + oneof_instances.append(oneof_instance) + except Exception: + pass + if len(oneof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ + ) + elif len(oneof_instances) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. Multiple " + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ + ) + return oneof_instances[0] + + +def get_anyof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + The input data, e.g. the payload that must match at least one + anyOf child schema in the OpenAPI document. + constant_args (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Returns + anyof_instances (list) + """ + anyof_instances = [] + if len(self._composed_schemas['anyOf']) == 0: + return anyof_instances + + for anyof_class in self._composed_schemas['anyOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if anyof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + try: + if constant_args.get('_spec_property_naming'): + anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) + else: + anyof_instance = anyof_class(**model_args, **constant_args) + anyof_instances.append(anyof_instance) + except Exception: + pass + if len(anyof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ + ) + return anyof_instances + + +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names + # before __init__ was called + for instance in composed_instances: + if instance.__class__ in self._composed_schemas['allOf']: + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + else: + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args + + +def validate_get_composed_info(constant_args, model_args, self): + """ + For composed schemas, generate schema instances for + all schemas in the oneOf/anyOf/allOf definition. If additional + properties are allowed, also assign those properties on + all matched schemas that contain additionalProperties. + Openapi schemas are python classes. + + Exceptions are raised if: + - 0 or > 1 oneOf schema matches the model_args input data + - no anyOf schema matches the model_args input data + - any of the allOf schemas do not match the model_args input data + + Args: + constant_args (dict): these are the args that every model requires + model_args (dict): these are the required and optional spec args that + were passed in to make this model + self (class): the class that we are instantiating + This class contains self._composed_schemas + + Returns: + composed_info (list): length three + composed_instances (list): the composed instances which are not + self + var_name_to_model_instances (dict): a dict going from var_name + to the model_instance which holds that var_name + the model_instance may be self or an instance of one of the + classes in self.composed_instances() + additional_properties_model_instances (list): a list of the + model instances which have the property + additional_properties_type. This list can include self + """ + # create composed_instances + composed_instances = [] + allof_instances = get_allof_instances(self, model_args, constant_args) + composed_instances.extend(allof_instances) + oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) + if oneof_instance is not None: + composed_instances.append(oneof_instance) + anyof_instances = get_anyof_instances(self, model_args, constant_args) + composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] + + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) + + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + composed_instances + + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 924516b..3b2d33f 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -1,12 +1,10 @@ -# coding: utf-8 - # flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from flat_api.model.pet import Pet +# from from flat_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) @@ -16,36 +14,57 @@ from flat_api.model.assignment import Assignment from flat_api.model.assignment_copy import AssignmentCopy from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError from flat_api.model.assignment_submission import AssignmentSubmission from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState from flat_api.model.assignment_submission_state import AssignmentSubmissionState from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments from flat_api.model.assignment_type import AssignmentType from flat_api.model.assignment_update import AssignmentUpdate from flat_api.model.class_assignment import ClassAssignment +from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.model.class_assignment_lti import ClassAssignmentLti +from flat_api.model.class_assignment_mfc import ClassAssignmentMfc from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph from flat_api.model.class_attachment_creation import ClassAttachmentCreation from flat_api.model.class_creation import ClassCreation from flat_api.model.class_details import ClassDetails +from flat_api.model.class_details_canvas import ClassDetailsCanvas +from flat_api.model.class_details_clever import ClassDetailsClever +from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.model.class_details_issues import ClassDetailsIssues +from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from flat_api.model.class_details_lti import ClassDetailsLti +from flat_api.model.class_details_mfc import ClassDetailsMfc +from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph from flat_api.model.class_grade_level import ClassGradeLevel from flat_api.model.class_roles import ClassRoles from flat_api.model.class_state import ClassState from flat_api.model.class_update import ClassUpdate from flat_api.model.collection import Collection from flat_api.model.collection_app import CollectionApp +from flat_api.model.collection_capabilities import CollectionCapabilities from flat_api.model.collection_creation import CollectionCreation from flat_api.model.collection_modification import CollectionModification from flat_api.model.collection_privacy import CollectionPrivacy from flat_api.model.collection_type import CollectionType from flat_api.model.edu_library import EduLibrary from flat_api.model.edu_resource import EduResource +from flat_api.model.edu_resource_capabilities import EduResourceCapabilities from flat_api.model.edu_resource_copy import EduResourceCopy from flat_api.model.edu_resource_creation import EduResourceCreation from flat_api.model.edu_resource_move import EduResourceMove from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api.model.edu_resource_resource import EduResourceResource from flat_api.model.edu_resource_type import EduResourceType from flat_api.model.edu_resource_update import EduResourceUpdate from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass @@ -76,9 +95,14 @@ from flat_api.model.score_comment import ScoreComment from flat_api.model.score_comment_context import ScoreCommentContext from flat_api.model.score_comment_creation import ScoreCommentCreation +from flat_api.model.score_comment_moderation import ScoreCommentModeration from flat_api.model.score_comment_update import ScoreCommentUpdate from flat_api.model.score_comments_counts import ScoreCommentsCounts from flat_api.model.score_creation import ScoreCreation +from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner from flat_api.model.score_creation_type import ScoreCreationType from flat_api.model.score_details import ScoreDetails from flat_api.model.score_fork import ScoreFork @@ -100,12 +124,15 @@ from flat_api.model.score_views_counts import ScoreViewsCounts from flat_api.model.task import Task from flat_api.model.task_export_options import TaskExportOptions +from flat_api.model.task_progress import TaskProgress +from flat_api.model.task_result import TaskResult from flat_api.model.user_admin_update import UserAdminUpdate from flat_api.model.user_azure_details import UserAzureDetails from flat_api.model.user_community_profile_links import UserCommunityProfileLinks from flat_api.model.user_creation import UserCreation from flat_api.model.user_details import UserDetails from flat_api.model.user_details_admin import UserDetailsAdmin +from flat_api.model.user_details_admin_license import UserDetailsAdminLicense from flat_api.model.user_public import UserPublic from flat_api.model.user_public_summary import UserPublicSummary from flat_api.model.user_signin_link import UserSigninLink diff --git a/flat_api/paths/__init__.py b/flat_api/paths/__init__.py deleted file mode 100644 index 0efe72e..0000000 --- a/flat_api/paths/__init__.py +++ /dev/null @@ -1,72 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.apis.path_to_api import path_to_api - -import enum - - -class PathValues(str, enum.Enum): - ME = "/me" - SCORES = "/scores" - SCORES_SCORE = "/scores/{score}" - SCORES_SCORE_UNTRASH = "/scores/{score}/untrash" - SCORES_SCORE_SUBMISSIONS = "/scores/{score}/submissions" - SCORES_SCORE_FORK = "/scores/{score}/fork" - SCORES_SCORE_COLLABORATORS = "/scores/{score}/collaborators" - SCORES_SCORE_COLLABORATORS_COLLABORATOR = "/scores/{score}/collaborators/{collaborator}" - SCORES_SCORE_TRACKS = "/scores/{score}/tracks" - SCORES_SCORE_TRACKS_TRACK = "/scores/{score}/tracks/{track}" - SCORES_SCORE_COMMENTS = "/scores/{score}/comments" - SCORES_SCORE_COMMENTS_COMMENT = "/scores/{score}/comments/{comment}" - SCORES_SCORE_COMMENTS_COMMENT_RESOLVED = "/scores/{score}/comments/{comment}/resolved" - SCORES_SCORE_REVISIONS = "/scores/{score}/revisions" - SCORES_SCORE_REVISIONS_REVISION = "/scores/{score}/revisions/{revision}" - SCORES_SCORE_REVISIONS_REVISION_FORMAT = "/scores/{score}/revisions/{revision}/{format}" - SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK = "/scores/{score}/revisions/{revision}/{format}/task" - COLLECTIONS = "/collections" - COLLECTIONS_COLLECTION = "/collections/{collection}" - COLLECTIONS_COLLECTION_UNTRASH = "/collections/{collection}/untrash" - COLLECTIONS_COLLECTION_SCORES = "/collections/{collection}/scores" - COLLECTIONS_COLLECTION_SCORES_SCORE = "/collections/{collection}/scores/{score}" - TASKS_TASK = "/tasks/{task}" - USERS_USER = "/users/{user}" - USERS_USER_LIKES = "/users/{user}/likes" - USERS_USER_SCORES = "/users/{user}/scores" - ORGANIZATIONS_USERS = "/organizations/users" - ORGANIZATIONS_USERS_COUNT = "/organizations/users/count" - ORGANIZATIONS_USERS_USER = "/organizations/users/{user}" - ORGANIZATIONS_USERS_USER_SIGNIN_LINK = "/organizations/users/{user}/signinLink" - ORGANIZATIONS_USERS_USER_ACCESS_TOKEN = "/organizations/users/{user}/accessToken" - ORGANIZATIONS_INVITATIONS = "/organizations/invitations" - ORGANIZATIONS_INVITATIONS_INVITATION = "/organizations/invitations/{invitation}" - ORGANIZATIONS_LTI_CREDENTIALS = "/organizations/lti/credentials" - ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS = "/organizations/lti/credentials/{credentials}" - CLASSES = "/classes" - CLASSES_CLASS = "/classes/{class}" - CLASSES_CLASS_ARCHIVE = "/classes/{class}/archive" - CLASSES_CLASS_ACTIVATE = "/classes/{class}/activate" - CLASSES_CLASS_USERS_USER = "/classes/{class}/users/{user}" - CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS = "/classes/{class}/students/{user}/submissions" - CLASSES_CLASS_ASSIGNMENTS = "/classes/{class}/assignments" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY = "/classes/{class}/assignments/{assignment}/copy" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE = "/classes/{class}/assignments/{assignment}/archive" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS = "/classes/{class}/assignments/{assignment}/submissions" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV = "/classes/{class}/assignments/{assignment}/submissions/csv" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL = "/classes/{class}/assignments/{assignment}/submissions/excel" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION = "/classes/{class}/assignments/{assignment}/submissions/{submission}" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY = "/classes/{class}/assignments/{assignment}/submissions/{submission}/history" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS = "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments" - CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT = "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}" - CLASSES_CLASS_TEST_STUDENT = "/classes/{class}/testStudent" - CLASSES_ENROLL_ENROLLMENT_CODE = "/classes/enroll/{enrollmentCode}" - GROUPS_GROUP = "/groups/{group}" - GROUPS_GROUP_USERS = "/groups/{group}/users" - GROUPS_GROUP_SCORES = "/groups/{group}/scores" - EDU_RESOURCES = "/eduResources" - EDU_RESOURCES_LIBRARIES = "/eduResources/libraries" - EDU_RESOURCES_RESOURCE = "/eduResources/{resource}" - EDU_RESOURCES_RESOURCE_MOVE = "/eduResources/{resource}/move" - EDU_RESOURCES_RESOURCE_COPY = "/eduResources/{resource}/copy" - EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS = "/eduResources/{resource}/copyToDemoClass" - EDU_RESOURCES_RESOURCE_USE_IN_CLASS = "/eduResources/{resource}/useInClass" - EDU_RESOURCES_RESOURCE_ASSIGNMENT = "/eduResources/{resource}/assignment" diff --git a/flat_api/paths/classes/__init__.py b/flat_api/paths/classes/__init__.py deleted file mode 100644 index 2c5f637..0000000 --- a/flat_api/paths/classes/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES \ No newline at end of file diff --git a/flat_api/paths/classes/get.py b/flat_api/paths/classes/get.py deleted file mode 100644 index 7b45f81..0000000 --- a/flat_api/paths/classes/get.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params - - -class StateSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "active": "ACTIVE", - "inactive": "INACTIVE", - "archived": "ARCHIVED", - } - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def INACTIVE(cls): - return cls("inactive") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'state': typing.Union[StateSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_state = api_client.QueryParameter( - name="state", - style=api_client.ParameterStyle.FORM, - schema=StateSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassDetails']: - return ClassDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassDetails'], typing.List['ClassDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_classes_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the classes available for the current user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_state, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListClasses(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_classes( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_classes_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_classes_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes/get.pyi b/flat_api/paths/classes/get.pyi deleted file mode 100644 index 00b9c33..0000000 --- a/flat_api/paths/classes/get.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params - - -class StateSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ACTIVE(cls): - return cls("active") - - @schemas.classproperty - def INACTIVE(cls): - return cls("inactive") - - @schemas.classproperty - def ARCHIVED(cls): - return cls("archived") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'state': typing.Union[StateSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_state = api_client.QueryParameter( - name="state", - style=api_client.ParameterStyle.FORM, - schema=StateSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassDetails']: - return ClassDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassDetails'], typing.List['ClassDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_classes_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_classes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the classes available for the current user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_state, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListClasses(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_classes( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_classes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_classes_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_classes_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes/post.py b/flat_api/paths/classes/post.py deleted file mode 100644 index 93664a2..0000000 --- a/flat_api/paths/classes/post.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_creation import ClassCreation -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ClassCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes/post.pyi b/flat_api/paths/classes/post.pyi deleted file mode 100644 index 81b666c..0000000 --- a/flat_api/paths/classes/post.pyi +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_creation import ClassCreation -from flat_api.model.flat_error_response import FlatErrorResponse - -# body param -SchemaForRequestBodyApplicationJson = ClassCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class/__init__.py b/flat_api/paths/classes_class/__init__.py deleted file mode 100644 index 6713e05..0000000 --- a/flat_api/paths/classes_class/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS \ No newline at end of file diff --git a/flat_api/paths/classes_class/get.py b/flat_api/paths/classes_class/get.py deleted file mode 100644 index 7b3075e..0000000 --- a/flat_api/paths/classes_class/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get the details of a single class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class/get.pyi b/flat_api/paths/classes_class/get.pyi deleted file mode 100644 index b4a776b..0000000 --- a/flat_api/paths/classes_class/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get the details of a single class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class/put.py b/flat_api/paths/classes_class/put.py deleted file mode 100644 index b7de864..0000000 --- a/flat_api/paths/classes_class/put.py +++ /dev/null @@ -1,426 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_update import ClassUpdate - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ClassUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_class_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_class_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_class_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_class_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_class( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_class( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_class( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_class( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_class( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class/put.pyi b/flat_api/paths/classes_class/put.pyi deleted file mode 100644 index c1ff6f8..0000000 --- a/flat_api/paths/classes_class/put.pyi +++ /dev/null @@ -1,417 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_update import ClassUpdate - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ClassUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_class_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_class_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_class_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_class_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_class( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_class( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_class( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_class( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_class( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_activate/__init__.py b/flat_api/paths/classes_class_activate/__init__.py deleted file mode 100644 index c3f5c7a..0000000 --- a/flat_api/paths/classes_class_activate/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_activate import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ACTIVATE \ No newline at end of file diff --git a/flat_api/paths/classes_class_activate/post.py b/flat_api/paths/classes_class_activate/post.py deleted file mode 100644 index f9355a6..0000000 --- a/flat_api/paths/classes_class_activate/post.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _activate_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Activate the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ActivateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def activate_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._activate_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._activate_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_activate/post.pyi b/flat_api/paths/classes_class_activate/post.pyi deleted file mode 100644 index 1214736..0000000 --- a/flat_api/paths/classes_class_activate/post.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _activate_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _activate_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Activate the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ActivateClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def activate_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def activate_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._activate_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._activate_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_archive/__init__.py b/flat_api/paths/classes_class_archive/__init__.py deleted file mode 100644 index 77c3b5e..0000000 --- a/flat_api/paths/classes_class_archive/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_archive import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ARCHIVE \ No newline at end of file diff --git a/flat_api/paths/classes_class_archive/delete.py b/flat_api/paths/classes_class_archive/delete.py deleted file mode 100644 index 2417458..0000000 --- a/flat_api/paths/classes_class_archive/delete.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _unarchive_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Unarchive the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UnarchiveClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def unarchive_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_archive/delete.pyi b/flat_api/paths/classes_class_archive/delete.pyi deleted file mode 100644 index a777fa7..0000000 --- a/flat_api/paths/classes_class_archive/delete.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _unarchive_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _unarchive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Unarchive the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UnarchiveClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def unarchive_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def unarchive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_archive/post.py b/flat_api/paths/classes_class_archive/post.py deleted file mode 100644 index 7845d28..0000000 --- a/flat_api/paths/classes_class_archive/post.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _archive_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Archive the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArchiveClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def archive_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_archive/post.pyi b/flat_api/paths/classes_class_archive/post.pyi deleted file mode 100644 index f1ff8b1..0000000 --- a/flat_api/paths/classes_class_archive/post.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _archive_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _archive_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Archive the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArchiveClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def archive_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def archive_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments/__init__.py b/flat_api/paths/classes_class_assignments/__init__.py deleted file mode 100644 index 727701a..0000000 --- a/flat_api/paths/classes_class_assignments/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments/get.py b/flat_api/paths/classes_class_assignments/get.py deleted file mode 100644 index 9da7549..0000000 --- a/flat_api/paths/classes_class_assignments/get.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAssignment']: - return ClassAssignment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAssignment'], typing.List['ClassAssignment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAssignment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_assignments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Assignments listing - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListAssignments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_assignments( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_assignments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_assignments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments/get.pyi b/flat_api/paths/classes_class_assignments/get.pyi deleted file mode 100644 index 48bf456..0000000 --- a/flat_api/paths/classes_class_assignments/get.pyi +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ClassAssignment']: - return ClassAssignment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ClassAssignment'], typing.List['ClassAssignment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ClassAssignment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_assignments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_assignments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Assignments listing - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListAssignments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_assignments( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_assignments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_assignments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_assignments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments/post.py b/flat_api/paths/classes_class_assignments/post.py deleted file mode 100644 index a93ccb8..0000000 --- a/flat_api/paths/classes_class_assignments/post.py +++ /dev/null @@ -1,426 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_assignment_update import ClassAssignmentUpdate - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ClassAssignmentUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_class_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_class_assignment_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Assignment creation - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateClassAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_class_assignment( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_class_assignment( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_class_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_class_assignment( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_class_assignment( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments/post.pyi b/flat_api/paths/classes_class_assignments/post.pyi deleted file mode 100644 index b723d9a..0000000 --- a/flat_api/paths/classes_class_assignments/post.pyi +++ /dev/null @@ -1,417 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_assignment_update import ClassAssignmentUpdate - -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ClassAssignmentUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_class_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_class_assignment_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_class_assignment_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Assignment creation - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateClassAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_class_assignment( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_class_assignment( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_class_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_class_assignment( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_class_assignment( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_class_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py b/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py deleted file mode 100644 index fcd5d36..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_archive/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_archive import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_ARCHIVE \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/delete.py b/flat_api/paths/classes_class_assignments_assignment_archive/delete.py deleted file mode 100644 index 8c30345..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_archive/delete.py +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _unarchive_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Unarchive the assignment. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UnarchiveAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def unarchive_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi deleted file mode 100644 index 44161ac..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_archive/delete.pyi +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _unarchive_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _unarchive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Unarchive the assignment. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UnarchiveAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def unarchive_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def unarchive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._unarchive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/post.py b/flat_api/paths/classes_class_assignments_assignment_archive/post.py deleted file mode 100644 index e853b62..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_archive/post.py +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _archive_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Archive the assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArchiveAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def archive_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi b/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi deleted file mode 100644 index b3d7172..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_archive/post.pyi +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _archive_assignment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _archive_assignment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Archive the assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArchiveAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def archive_assignment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def archive_assignment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._archive_assignment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py b/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py deleted file mode 100644 index cb9bac9..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_copy/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_copy import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_COPY \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/post.py b/flat_api/paths/classes_class_assignments_assignment_copy/post.py deleted file mode 100644 index 7747adc..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_copy/post.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_copy_response import AssignmentCopyResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentCopy - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentCopyResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi b/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi deleted file mode 100644 index 8263148..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_copy/post.pyi +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_copy_response import AssignmentCopyResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentCopy - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentCopyResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py deleted file mode 100644 index dad510d..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions/get.py deleted file mode 100644 index 274c134..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions/get.py +++ /dev/null @@ -1,362 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the students' submissions - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi deleted file mode 100644 index 50ce8de..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions/get.pyi +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the students' submissions - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions/put.py deleted file mode 100644 index 74ef0d9..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions/put.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create or edit a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi deleted file mode 100644 index 4440cf6..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions/put.pyi +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create or edit a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py deleted file mode 100644 index 98479ab..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_csv import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_CSV \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py deleted file mode 100644 index c0795cb..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.py +++ /dev/null @@ -1,336 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyTextCsv = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyTextCsv, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'text/csv': api_client.MediaType( - schema=SchemaFor200ResponseBodyTextCsv), - }, -) -SchemaFor0ResponseBodyTextCsv = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyTextCsv, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'text/csv': api_client.MediaType( - schema=SchemaFor0ResponseBodyTextCsv), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'text/csv', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - CSV Grades exports - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExportSubmissionsReviewsAsCsv(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def export_submissions_reviews_as_csv( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_csv_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_csv_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi deleted file mode 100644 index eac3b44..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_csv/get.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -SchemaFor200ResponseBodyTextCsv = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyTextCsv, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'text/csv': api_client.MediaType( - schema=SchemaFor200ResponseBodyTextCsv), - }, -) -SchemaFor0ResponseBodyTextCsv = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyTextCsv, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'text/csv': api_client.MediaType( - schema=SchemaFor0ResponseBodyTextCsv), - }, -) -_all_accept_content_types = ( - 'text/csv', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _export_submissions_reviews_as_csv_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - CSV Grades exports - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExportSubmissionsReviewsAsCsv(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def export_submissions_reviews_as_csv( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_submissions_reviews_as_csv( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_csv_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_csv_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py deleted file mode 100644 index e734f50..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_excel import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_EXCEL \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py deleted file mode 100644 index 893bc2b..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.py +++ /dev/null @@ -1,336 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), - }, -) -SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Excel Grades exports - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExportSubmissionsReviewsAsExcel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def export_submissions_reviews_as_excel( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_excel_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_excel_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi deleted file mode 100644 index 3a67d07..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_excel/get.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), - }, -) -SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet), - }, -) -_all_accept_content_types = ( - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _export_submissions_reviews_as_excel_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Excel Grades exports - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExportSubmissionsReviewsAsExcel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def export_submissions_reviews_as_excel( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_submissions_reviews_as_excel( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_excel_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_submissions_reviews_as_excel_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py deleted file mode 100644 index 2950a2d..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_submission import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py deleted file mode 100644 index 2495126..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.py +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_submission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Reset a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_submission( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi deleted file mode 100644 index c2c37bd..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/delete.pyi +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_submission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Reset a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_submission( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py deleted file mode 100644 index df375fa..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.py +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a student submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi deleted file mode 100644 index 722fe40..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/get.pyi +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a student submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py deleted file mode 100644 index 8a78812..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.py +++ /dev/null @@ -1,447 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Edit a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi deleted file mode 100644 index cb0d76c..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission/put.pyi +++ /dev/null @@ -1,438 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmission - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_submission_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Edit a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditSubmission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_submission( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_submission_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py deleted file mode 100644 index 059bb24..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py deleted file mode 100644 index 14e3b5b..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.py +++ /dev/null @@ -1,411 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmissionComment']: - return AssignmentSubmissionComment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmissionComment'], typing.List['AssignmentSubmissionComment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmissionComment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_comments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the feedback comments of a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissionComments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission_comments( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_comments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_comments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi deleted file mode 100644 index a665ff5..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/get.pyi +++ /dev/null @@ -1,400 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmissionComment']: - return AssignmentSubmissionComment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmissionComment'], typing.List['AssignmentSubmissionComment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmissionComment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_comments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_comments_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the feedback comments of a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissionComments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission_comments( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission_comments( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_comments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_comments_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py deleted file mode 100644 index 9a06ea0..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.py +++ /dev/null @@ -1,487 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation - - -request_body_assignment_submission_comment_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi deleted file mode 100644 index f3b0420..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments/post.pyi +++ /dev/null @@ -1,476 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation - - -request_body_assignment_submission_comment_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py deleted file mode 100644 index ae4c8aa..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_COMMENTS_COMMENT \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py deleted file mode 100644 index ff92404..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_submission_comment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_submission_comment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_comment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_comment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi deleted file mode 100644 index 7cc867b..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/delete.pyi +++ /dev/null @@ -1,338 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_submission_comment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_submission_comment_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_submission_comment( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_submission_comment( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_comment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_submission_comment_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py deleted file mode 100644 index 48df497..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.py +++ /dev/null @@ -1,496 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation - - -request_body_assignment_submission_comment_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi deleted file mode 100644 index 1670a09..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_comments_comment/put.pyi +++ /dev/null @@ -1,485 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentSubmissionCommentCreation - - -request_body_assignment_submission_comment_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = AssignmentSubmissionComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_submission_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update a feedback comment to a submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_submission_comment_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateSubmissionComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_submission_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_submission_comment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py deleted file mode 100644 index cb83063..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_ASSIGNMENTS_ASSIGNMENT_SUBMISSIONS_SUBMISSION_HISTORY \ No newline at end of file diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py deleted file mode 100644 index 8bc07e4..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.py +++ /dev/null @@ -1,411 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmissionHistory']: - return AssignmentSubmissionHistory - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmissionHistory'], typing.List['AssignmentSubmissionHistory']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmissionHistory': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_history_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get the history of the submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissionHistory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission_history( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_history_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_history_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi b/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi deleted file mode 100644 index 3603702..0000000 --- a/flat_api/paths/classes_class_assignments_assignment_submissions_submission_history/get.pyi +++ /dev/null @@ -1,400 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -SubmissionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'submission': typing.Union[SubmissionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_assignment = api_client.PathParameter( - name="assignment", - style=api_client.ParameterStyle.SIMPLE, - schema=AssignmentSchema, - required=True, -) -request_path_submission = api_client.PathParameter( - name="submission", - style=api_client.ParameterStyle.SIMPLE, - schema=SubmissionSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmissionHistory']: - return AssignmentSubmissionHistory - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmissionHistory'], typing.List['AssignmentSubmissionHistory']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmissionHistory': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_submission_history_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_submission_history_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get the history of the submission - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_assignment, - request_path_submission, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSubmissionHistory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_submission_history( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_submission_history( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_history_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_submission_history_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_students_user_submissions/__init__.py b/flat_api/paths/classes_class_students_user_submissions/__init__.py deleted file mode 100644 index 4da5998..0000000 --- a/flat_api/paths/classes_class_students_user_submissions/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_students_user_submissions import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_STUDENTS_USER_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/classes_class_students_user_submissions/get.py b/flat_api/paths/classes_class_students_user_submissions/get.py deleted file mode 100644 index c7902cd..0000000 --- a/flat_api/paths/classes_class_students_user_submissions/get.py +++ /dev/null @@ -1,362 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_class_student_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the submissions for a student - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListClassStudentSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_class_student_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_class_student_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_class_student_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_students_user_submissions/get.pyi b/flat_api/paths/classes_class_students_user_submissions/get.pyi deleted file mode 100644 index 5bb2553..0000000 --- a/flat_api/paths/classes_class_students_user_submissions/get.pyi +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_class_student_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_class_student_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the submissions for a student - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListClassStudentSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_class_student_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_class_student_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_class_student_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_class_student_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_test_student/__init__.py b/flat_api/paths/classes_class_test_student/__init__.py deleted file mode 100644 index f15114e..0000000 --- a/flat_api/paths/classes_class_test_student/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_test_student import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_TEST_STUDENT \ No newline at end of file diff --git a/flat_api/paths/classes_class_test_student/post.py b/flat_api/paths/classes_class_test_student/post.py deleted file mode 100644 index 83a5a90..0000000 --- a/flat_api/paths/classes_class_test_student/post.py +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -ResetSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'reset': typing.Union[ResetSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_reset = api_client.QueryParameter( - name="reset", - style=api_client.ParameterStyle.FORM, - schema=ResetSchema, - explode=True, -) -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_test_student_account_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a test student account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_reset, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateTestStudentAccount(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_test_student_account( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_test_student_account_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_test_student_account_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_test_student/post.pyi b/flat_api/paths/classes_class_test_student/post.pyi deleted file mode 100644 index b5b7202..0000000 --- a/flat_api/paths/classes_class_test_student/post.pyi +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -ResetSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'reset': typing.Union[ResetSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_reset = api_client.QueryParameter( - name="reset", - style=api_client.ParameterStyle.FORM, - schema=ResetSchema, - explode=True, -) -# Path params -ModelClassSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = UserDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_test_student_account_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_test_student_account_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a test student account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_reset, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateTestStudentAccount(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_test_student_account( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_test_student_account( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_test_student_account_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_test_student_account_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_users_user/__init__.py b/flat_api/paths/classes_class_users_user/__init__.py deleted file mode 100644 index 1b5dc44..0000000 --- a/flat_api/paths/classes_class_users_user/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_class_users_user import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_CLASS_USERS_USER \ No newline at end of file diff --git a/flat_api/paths/classes_class_users_user/delete.py b/flat_api/paths/classes_class_users_user/delete.py deleted file mode 100644 index 6240555..0000000 --- a/flat_api/paths/classes_class_users_user/delete.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_class_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove a user from the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteClassUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_class_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_users_user/delete.pyi b/flat_api/paths/classes_class_users_user/delete.pyi deleted file mode 100644 index 1199501..0000000 --- a/flat_api/paths/classes_class_users_user/delete.pyi +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_class_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove a user from the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteClassUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_class_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_users_user/put.py b/flat_api/paths/classes_class_users_user/put.py deleted file mode 100644 index cda334c..0000000 --- a/flat_api/paths/classes_class_users_user/put.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_class_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a user to the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddClassUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_class_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_class_users_user/put.pyi b/flat_api/paths/classes_class_users_user/put.pyi deleted file mode 100644 index 390e171..0000000 --- a/flat_api/paths/classes_class_users_user/put.pyi +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ModelClassSchema = schemas.StrSchema -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'class': typing.Union[ModelClassSchema, str, ], - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__class = api_client.PathParameter( - name="class", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelClassSchema, - required=True, -) -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_class_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_class_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a user to the class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__class, - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddClassUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_class_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_class_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_class_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_enroll_enrollment_code/__init__.py b/flat_api/paths/classes_enroll_enrollment_code/__init__.py deleted file mode 100644 index fd5efa8..0000000 --- a/flat_api/paths/classes_enroll_enrollment_code/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.classes_enroll_enrollment_code import Api - -from flat_api.paths import PathValues - -path = PathValues.CLASSES_ENROLL_ENROLLMENT_CODE \ No newline at end of file diff --git a/flat_api/paths/classes_enroll_enrollment_code/post.py b/flat_api/paths/classes_enroll_enrollment_code/post.py deleted file mode 100644 index 7d29927..0000000 --- a/flat_api/paths/classes_enroll_enrollment_code/post.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -EnrollmentCodeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'enrollmentCode': typing.Union[EnrollmentCodeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_enrollment_code = api_client.PathParameter( - name="enrollmentCode", - style=api_client.ParameterStyle.SIMPLE, - schema=EnrollmentCodeSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _enroll_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Join a class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_enrollment_code, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EnrollClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def enroll_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enroll_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enroll_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/classes_enroll_enrollment_code/post.pyi b/flat_api/paths/classes_enroll_enrollment_code/post.pyi deleted file mode 100644 index 0108465..0000000 --- a/flat_api/paths/classes_enroll_enrollment_code/post.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -EnrollmentCodeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'enrollmentCode': typing.Union[EnrollmentCodeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_enrollment_code = api_client.PathParameter( - name="enrollmentCode", - style=api_client.ParameterStyle.SIMPLE, - schema=EnrollmentCodeSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _enroll_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enroll_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Join a class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_enrollment_code, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EnrollClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def enroll_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enroll_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enroll_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enroll_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections/__init__.py b/flat_api/paths/collections/__init__.py deleted file mode 100644 index 7ccadf0..0000000 --- a/flat_api/paths/collections/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.collections import Api - -from flat_api.paths import PathValues - -path = PathValues.COLLECTIONS \ No newline at end of file diff --git a/flat_api/paths/collections/get.py b/flat_api/paths/collections/get.py deleted file mode 100644 index f9eedae..0000000 --- a/flat_api/paths/collections/get.py +++ /dev/null @@ -1,447 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -ParentSchema = schemas.StrSchema - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "creationDate": "CREATION_DATE", - "title": "TITLE", - } - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "asc": "ASC", - "desc": "DESC", - } - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 1 -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Collection']: - return Collection - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Collection'], typing.List['Collection']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Collection': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_collections_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the collections - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListCollections(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_collections( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collections_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collections_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections/get.pyi b/flat_api/paths/collections/get.pyi deleted file mode 100644 index 0945d1a..0000000 --- a/flat_api/paths/collections/get.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -ParentSchema = schemas.StrSchema - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - pass -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Collection']: - return Collection - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Collection'], typing.List['Collection']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Collection': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_collections_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_collections_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the collections - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListCollections(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_collections( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_collections( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collections_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collections_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections/post.py b/flat_api/paths/collections/post.py deleted file mode 100644 index 3b613ed..0000000 --- a/flat_api/paths/collections/post.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = CollectionCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_collection_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_collection_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections/post.pyi b/flat_api/paths/collections/post.pyi deleted file mode 100644 index e56fc5d..0000000 --- a/flat_api/paths/collections/post.pyi +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -# body param -SchemaForRequestBodyApplicationJson = CollectionCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_collection_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_collection( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_collection_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_collection_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/__init__.py b/flat_api/paths/collections_collection/__init__.py deleted file mode 100644 index 0985c1e..0000000 --- a/flat_api/paths/collections_collection/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.collections_collection import Api - -from flat_api.paths import PathValues - -path = PathValues.COLLECTIONS_COLLECTION \ No newline at end of file diff --git a/flat_api/paths/collections_collection/delete.py b/flat_api/paths/collections_collection/delete.py deleted file mode 100644 index 853c4b3..0000000 --- a/flat_api/paths/collections_collection/delete.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/delete.pyi b/flat_api/paths/collections_collection/delete.pyi deleted file mode 100644 index d92f221..0000000 --- a/flat_api/paths/collections_collection/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/get.py b/flat_api/paths/collections_collection/get.py deleted file mode 100644 index 34395e7..0000000 --- a/flat_api/paths/collections_collection/get.py +++ /dev/null @@ -1,422 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get collection details - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/get.pyi b/flat_api/paths/collections_collection/get.pyi deleted file mode 100644 index 979ccfa..0000000 --- a/flat_api/paths/collections_collection/get.pyi +++ /dev/null @@ -1,411 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get collection details - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/put.py b/flat_api/paths/collections_collection/put.py deleted file mode 100644 index d696c30..0000000 --- a/flat_api/paths/collections_collection/put.py +++ /dev/null @@ -1,466 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.collection_modification import CollectionModification - -from . import path - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CollectionModification - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_collection_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_collection_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_collection_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_collection_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update a collection's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_collection( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_collection( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_collection( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_collection( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_collection_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_collection_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection/put.pyi b/flat_api/paths/collections_collection/put.pyi deleted file mode 100644 index d1ff137..0000000 --- a/flat_api/paths/collections_collection/put.pyi +++ /dev/null @@ -1,455 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.collection_modification import CollectionModification - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CollectionModification - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = Collection - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_collection_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_collection_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_collection_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_collection_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update a collection's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_collection( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_collection( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_collection( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_collection( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_collection_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_collection_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores/__init__.py b/flat_api/paths/collections_collection_scores/__init__.py deleted file mode 100644 index 7f4d22f..0000000 --- a/flat_api/paths/collections_collection_scores/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.collections_collection_scores import Api - -from flat_api.paths import PathValues - -path = PathValues.COLLECTIONS_COLLECTION_SCORES \ No newline at end of file diff --git a/flat_api/paths/collections_collection_scores/get.py b/flat_api/paths/collections_collection_scores/get.py deleted file mode 100644 index d3e80c3..0000000 --- a/flat_api/paths/collections_collection_scores/get.py +++ /dev/null @@ -1,506 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "creationDate": "CREATION_DATE", - "modificationDate": "MODIFICATION_DATE", - "title": "TITLE", - } - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def MODIFICATION_DATE(cls): - return cls("modificationDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "asc": "ASC", - "desc": "DESC", - } - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 1 -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_collection_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the scores contained in a collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListCollectionScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_collection_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collection_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collection_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores/get.pyi b/flat_api/paths/collections_collection_scores/get.pyi deleted file mode 100644 index b6c13be..0000000 --- a/flat_api/paths/collections_collection_scores/get.pyi +++ /dev/null @@ -1,478 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def MODIFICATION_DATE(cls): - return cls("modificationDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - pass -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_collection_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_collection_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the scores contained in a collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListCollectionScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_collection_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_collection_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collection_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_collection_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores_score/__init__.py b/flat_api/paths/collections_collection_scores_score/__init__.py deleted file mode 100644 index 76a998e..0000000 --- a/flat_api/paths/collections_collection_scores_score/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.collections_collection_scores_score import Api - -from flat_api.paths import PathValues - -path = PathValues.COLLECTIONS_COLLECTION_SCORES_SCORE \ No newline at end of file diff --git a/flat_api/paths/collections_collection_scores_score/delete.py b/flat_api/paths/collections_collection_scores_score/delete.py deleted file mode 100644 index fe93d3a..0000000 --- a/flat_api/paths/collections_collection_scores_score/delete.py +++ /dev/null @@ -1,423 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_from_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a score from the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreFromCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_from_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_from_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_from_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores_score/delete.pyi b/flat_api/paths/collections_collection_scores_score/delete.pyi deleted file mode 100644 index 5821f06..0000000 --- a/flat_api/paths/collections_collection_scores_score/delete.pyi +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_from_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_from_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a score from the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreFromCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_from_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_from_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_from_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_from_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores_score/put.py b/flat_api/paths/collections_collection_scores_score/put.py deleted file mode 100644 index 2d665e3..0000000 --- a/flat_api/paths/collections_collection_scores_score/put.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_to_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a score to the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreToCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_to_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_to_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_to_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_scores_score/put.pyi b/flat_api/paths/collections_collection_scores_score/put.pyi deleted file mode 100644 index 935c5f5..0000000 --- a/flat_api/paths/collections_collection_scores_score/put.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -CollectionSchema = schemas.StrSchema -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_to_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_to_collection_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a score to the collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreToCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_to_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_to_collection( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_to_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_to_collection_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_untrash/__init__.py b/flat_api/paths/collections_collection_untrash/__init__.py deleted file mode 100644 index ac0efdf..0000000 --- a/flat_api/paths/collections_collection_untrash/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.collections_collection_untrash import Api - -from flat_api.paths import PathValues - -path = PathValues.COLLECTIONS_COLLECTION_UNTRASH \ No newline at end of file diff --git a/flat_api/paths/collections_collection_untrash/post.py b/flat_api/paths/collections_collection_untrash/post.py deleted file mode 100644 index e61d5c7..0000000 --- a/flat_api/paths/collections_collection_untrash/post.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _untrash_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Untrash a collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UntrashCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def untrash_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/collections_collection_untrash/post.pyi b/flat_api/paths/collections_collection_untrash/post.pyi deleted file mode 100644 index 1dd293a..0000000 --- a/flat_api/paths/collections_collection_untrash/post.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -CollectionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'collection': typing.Union[CollectionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_collection = api_client.PathParameter( - name="collection", - style=api_client.ParameterStyle.SIMPLE, - schema=CollectionSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _untrash_collection_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _untrash_collection_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Untrash a collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_collection, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UntrashCollection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def untrash_collection( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def untrash_collection( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_collection_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources/__init__.py b/flat_api/paths/edu_resources/__init__.py deleted file mode 100644 index c2a6b98..0000000 --- a/flat_api/paths/edu_resources/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES \ No newline at end of file diff --git a/flat_api/paths/edu_resources/get.py b/flat_api/paths/edu_resources/get.py deleted file mode 100644 index ed50edb..0000000 --- a/flat_api/paths/edu_resources/get.py +++ /dev/null @@ -1,481 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -from . import path - -# Query params -ParentSchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "assignment": "ASSIGNMENT", - "folder": "FOLDER", - } - - @schemas.classproperty - def ASSIGNMENT(cls): - return cls("assignment") - - @schemas.classproperty - def FOLDER(cls): - return cls("folder") - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "creationDate": "CREATION_DATE", - "updateDate": "UPDATE_DATE", - "title": "TITLE", - } - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def UPDATE_DATE(cls): - return cls("updateDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "asc": "ASC", - "desc": "DESC", - } - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 1 -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EduResource']: - return EduResource - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EduResource'], typing.List['EduResource']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EduResource': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_edu_resources_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List education resources in a library or folder - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - request_query_type, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListEduResources(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_edu_resources( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_resources_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_resources_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources/get.pyi b/flat_api/paths/edu_resources/get.pyi deleted file mode 100644 index 65917f2..0000000 --- a/flat_api/paths/edu_resources/get.pyi +++ /dev/null @@ -1,446 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -# Query params -ParentSchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASSIGNMENT(cls): - return cls("assignment") - - @schemas.classproperty - def FOLDER(cls): - return cls("folder") - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def CREATION_DATE(cls): - return cls("creationDate") - - @schemas.classproperty - def UPDATE_DATE(cls): - return cls("updateDate") - - @schemas.classproperty - def TITLE(cls): - return cls("title") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") - - -class LimitSchema( - schemas.IntSchema -): - pass -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EduResource']: - return EduResource - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EduResource'], typing.List['EduResource']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EduResource': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_edu_resources_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_edu_resources_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List education resources in a library or folder - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - request_query_type, - request_query_sort, - request_query_direction, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListEduResources(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_edu_resources( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_edu_resources( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_resources_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_resources_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources/post.py b/flat_api/paths/edu_resources/post.py deleted file mode 100644 index b8492c9..0000000 --- a/flat_api/paths/edu_resources/post.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EduResourceCreation - - -request_body_edu_resource_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_edu_resource_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_edu_resource_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources/post.pyi b/flat_api/paths/edu_resources/post.pyi deleted file mode 100644 index 9cbcb4d..0000000 --- a/flat_api/paths/edu_resources/post.pyi +++ /dev/null @@ -1,363 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -# body param -SchemaForRequestBodyApplicationJson = EduResourceCreation - - -request_body_edu_resource_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_edu_resource_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_edu_resource_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_libraries/__init__.py b/flat_api/paths/edu_resources_libraries/__init__.py deleted file mode 100644 index 535a29d..0000000 --- a/flat_api/paths/edu_resources_libraries/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_libraries import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_LIBRARIES \ No newline at end of file diff --git a/flat_api/paths/edu_resources_libraries/get.py b/flat_api/paths/edu_resources_libraries/get.py deleted file mode 100644 index ef6c640..0000000 --- a/flat_api/paths/edu_resources_libraries/get.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_library import EduLibrary -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EduLibrary']: - return EduLibrary - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EduLibrary'], typing.List['EduLibrary']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EduLibrary': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_edu_libraries_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the education libraries - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListEduLibraries(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_edu_libraries( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_libraries_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_libraries_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_libraries/get.pyi b/flat_api/paths/edu_resources_libraries/get.pyi deleted file mode 100644 index b7aa3e9..0000000 --- a/flat_api/paths/edu_resources_libraries/get.pyi +++ /dev/null @@ -1,290 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_library import EduLibrary -from flat_api.model.flat_error_response import FlatErrorResponse - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EduLibrary']: - return EduLibrary - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EduLibrary'], typing.List['EduLibrary']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EduLibrary': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_edu_libraries_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_edu_libraries_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the education libraries - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListEduLibraries(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_edu_libraries( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_edu_libraries( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_libraries_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_edu_libraries_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/__init__.py b/flat_api/paths/edu_resources_resource/__init__.py deleted file mode 100644 index 0c97acc..0000000 --- a/flat_api/paths/edu_resources_resource/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource/delete.py b/flat_api/paths/edu_resources_resource/delete.py deleted file mode 100644 index 53e7831..0000000 --- a/flat_api/paths/edu_resources_resource/delete.py +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_edu_resource_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_edu_resource( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/delete.pyi b/flat_api/paths/edu_resources_resource/delete.pyi deleted file mode 100644 index faeb624..0000000 --- a/flat_api/paths/edu_resources_resource/delete.pyi +++ /dev/null @@ -1,311 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_edu_resource_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_edu_resource( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/get.py b/flat_api/paths/edu_resources_resource/get.py deleted file mode 100644 index 3331736..0000000 --- a/flat_api/paths/edu_resources_resource/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_edu_resource_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_edu_resource( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/get.pyi b/flat_api/paths/edu_resources_resource/get.pyi deleted file mode 100644 index 63ce59f..0000000 --- a/flat_api/paths/edu_resources_resource/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_edu_resource_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_edu_resource_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_edu_resource( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_edu_resource( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_edu_resource_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/put.py b/flat_api/paths/edu_resources_resource/put.py deleted file mode 100644 index ddd4672..0000000 --- a/flat_api/paths/edu_resources_resource/put.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_update import EduResourceUpdate - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceUpdate - - -request_body_edu_resource_update = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an education resource metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_update.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource/put.pyi b/flat_api/paths/edu_resources_resource/put.pyi deleted file mode 100644 index bdf97d2..0000000 --- a/flat_api/paths/edu_resources_resource/put.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_update import EduResourceUpdate - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceUpdate - - -request_body_edu_resource_update = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an education resource metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_update.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_assignment/__init__.py b/flat_api/paths/edu_resources_resource_assignment/__init__.py deleted file mode 100644 index 1bcda00..0000000 --- a/flat_api/paths/edu_resources_resource_assignment/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource_assignment import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE_ASSIGNMENT \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_assignment/put.py b/flat_api/paths/edu_resources_resource_assignment/put.py deleted file mode 100644 index c72cad1..0000000 --- a/flat_api/paths/edu_resources_resource_assignment/put.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentUpdate - - -request_body_assignment_update = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an education resource assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_update.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateEduResourceAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_assignment/put.pyi b/flat_api/paths/edu_resources_resource_assignment/put.pyi deleted file mode 100644 index 08f782f..0000000 --- a/flat_api/paths/edu_resources_resource_assignment/put.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = AssignmentUpdate - - -request_body_assignment_update = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Assignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_edu_resource_assignment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an education resource assignment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_assignment_update.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateEduResourceAssignment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_edu_resource_assignment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_edu_resource_assignment_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_copy/__init__.py b/flat_api/paths/edu_resources_resource_copy/__init__.py deleted file mode 100644 index 6711136..0000000 --- a/flat_api/paths/edu_resources_resource_copy/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource_copy import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE_COPY \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_copy/post.py b/flat_api/paths/edu_resources_resource_copy/post.py deleted file mode 100644 index 65eed0d..0000000 --- a/flat_api/paths/edu_resources_resource_copy/post.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceCopy - - -request_body_edu_resource_copy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an education resource to a Resource Library - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_copy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_copy/post.pyi b/flat_api/paths/edu_resources_resource_copy/post.pyi deleted file mode 100644 index 76f8bb5..0000000 --- a/flat_api/paths/edu_resources_resource_copy/post.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceCopy - - -request_body_edu_resource_copy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an education resource to a Resource Library - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_copy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py b/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py deleted file mode 100644 index 698f292..0000000 --- a/flat_api/paths/edu_resources_resource_copy_to_demo_class/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource_copy_to_demo_class import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE_COPY_TO_DEMO_CLASS \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py deleted file mode 100644 index 22e0bd6..0000000 --- a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassAssignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an education assignment to a teacher demo class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyEduResourceToDemoClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_to_demo_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_to_demo_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi b/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi deleted file mode 100644 index 3173b58..0000000 --- a/flat_api/paths/edu_resources_resource_copy_to_demo_class/post.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassAssignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_edu_resource_to_demo_class_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Copy an education assignment to a teacher demo class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyEduResourceToDemoClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_edu_resource_to_demo_class( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_to_demo_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_edu_resource_to_demo_class_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_move/__init__.py b/flat_api/paths/edu_resources_resource_move/__init__.py deleted file mode 100644 index 8fa833a..0000000 --- a/flat_api/paths/edu_resources_resource_move/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource_move import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE_MOVE \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_move/post.py b/flat_api/paths/edu_resources_resource_move/post.py deleted file mode 100644 index bb0ead3..0000000 --- a/flat_api/paths/edu_resources_resource_move/post.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceMove - - -request_body_edu_resource_move = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Move an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_move.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MoveEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._move_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._move_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_move/post.pyi b/flat_api/paths/edu_resources_resource_move/post.pyi deleted file mode 100644 index 6b0b2ff..0000000 --- a/flat_api/paths/edu_resources_resource_move/post.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceMove - - -request_body_edu_resource_move = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = EduResource - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _move_edu_resource_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Move an education resource - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_move.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MoveEduResource(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def move_edu_resource( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._move_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._move_edu_resource_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_use_in_class/__init__.py b/flat_api/paths/edu_resources_resource_use_in_class/__init__.py deleted file mode 100644 index 0929dd3..0000000 --- a/flat_api/paths/edu_resources_resource_use_in_class/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.edu_resources_resource_use_in_class import Api - -from flat_api.paths import PathValues - -path = PathValues.EDU_RESOURCES_RESOURCE_USE_IN_CLASS \ No newline at end of file diff --git a/flat_api/paths/edu_resources_resource_use_in_class/post.py b/flat_api/paths/edu_resources_resource_use_in_class/post.py deleted file mode 100644 index 8d9543b..0000000 --- a/flat_api/paths/edu_resources_resource_use_in_class/post.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceUseInClass - - -request_body_edu_resource_use_in_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ClassAssignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use an education resource in a class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_use_in_class.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UseEduResourceInClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._use_edu_resource_in_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._use_edu_resource_in_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/edu_resources_resource_use_in_class/post.pyi b/flat_api/paths/edu_resources_resource_use_in_class/post.pyi deleted file mode 100644 index e940ed3..0000000 --- a/flat_api/paths/edu_resources_resource_use_in_class/post.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ResourceSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'resource': typing.Union[ResourceSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_resource = api_client.PathParameter( - name="resource", - style=api_client.ParameterStyle.SIMPLE, - schema=ResourceSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = EduResourceUseInClass - - -request_body_edu_resource_use_in_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ClassAssignment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _use_edu_resource_in_class_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use an education resource in a class - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_resource, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_edu_resource_use_in_class.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UseEduResourceInClass(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def use_edu_resource_in_class( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._use_edu_resource_in_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._use_edu_resource_in_class_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group/__init__.py b/flat_api/paths/groups_group/__init__.py deleted file mode 100644 index fdb0834..0000000 --- a/flat_api/paths/groups_group/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.groups_group import Api - -from flat_api.paths import PathValues - -path = PathValues.GROUPS_GROUP \ No newline at end of file diff --git a/flat_api/paths/groups_group/get.py b/flat_api/paths/groups_group/get.py deleted file mode 100644 index 5bec249..0000000 --- a/flat_api/paths/groups_group/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.group_details import GroupDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = GroupDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_details_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get group information - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroupDetails(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group_details( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_details_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_details_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group/get.pyi b/flat_api/paths/groups_group/get.pyi deleted file mode 100644 index 1fd8474..0000000 --- a/flat_api/paths/groups_group/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.group_details import GroupDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = GroupDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_details_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_details_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get group information - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroupDetails(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group_details( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group_details( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_details_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_details_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group_scores/__init__.py b/flat_api/paths/groups_group_scores/__init__.py deleted file mode 100644 index 1004a37..0000000 --- a/flat_api/paths/groups_group_scores/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.groups_group_scores import Api - -from flat_api.paths import PathValues - -path = PathValues.GROUPS_GROUP_SCORES \ No newline at end of file diff --git a/flat_api/paths/groups_group_scores/get.py b/flat_api/paths/groups_group_scores/get.py deleted file mode 100644 index de3b4b8..0000000 --- a/flat_api/paths/groups_group_scores/get.py +++ /dev/null @@ -1,407 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -ParentSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List group's scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroupScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group_scores/get.pyi b/flat_api/paths/groups_group_scores/get.pyi deleted file mode 100644 index 05e2fc4..0000000 --- a/flat_api/paths/groups_group_scores/get.pyi +++ /dev/null @@ -1,398 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -ParentSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List group's scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroupScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group_users/__init__.py b/flat_api/paths/groups_group_users/__init__.py deleted file mode 100644 index 0dbfa3e..0000000 --- a/flat_api/paths/groups_group_users/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.groups_group_users import Api - -from flat_api.paths import PathValues - -path = PathValues.GROUPS_GROUP_USERS \ No newline at end of file diff --git a/flat_api/paths/groups_group_users/get.py b/flat_api/paths/groups_group_users/get.py deleted file mode 100644 index c43ca2f..0000000 --- a/flat_api/paths/groups_group_users/get.py +++ /dev/null @@ -1,432 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params - - -class SourceSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "googleClassroom": "GOOGLE_CLASSROOM", - "microsoftGraph": "MICROSOFT_GRAPH", - "clever": "CLEVER", - } - - @schemas.classproperty - def GOOGLE_CLASSROOM(cls): - return cls("googleClassroom") - - @schemas.classproperty - def MICROSOFT_GRAPH(cls): - return cls("microsoftGraph") - - @schemas.classproperty - def CLEVER(cls): - return cls("clever") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'source': typing.Union[SourceSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_source = api_client.QueryParameter( - name="source", - style=api_client.ParameterStyle.FORM, - schema=SourceSchema, - explode=True, -) -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserPublic']: - return UserPublic - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserPublic'], typing.List['UserPublic']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserPublic': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List group's users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_source, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_users_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_users_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/groups_group_users/get.pyi b/flat_api/paths/groups_group_users/get.pyi deleted file mode 100644 index b274bf1..0000000 --- a/flat_api/paths/groups_group_users/get.pyi +++ /dev/null @@ -1,415 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params - - -class SourceSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def GOOGLE_CLASSROOM(cls): - return cls("googleClassroom") - - @schemas.classproperty - def MICROSOFT_GRAPH(cls): - return cls("microsoftGraph") - - @schemas.classproperty - def CLEVER(cls): - return cls("clever") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'source': typing.Union[SourceSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_source = api_client.QueryParameter( - name="source", - style=api_client.ParameterStyle.FORM, - schema=SourceSchema, - explode=True, -) -# Path params -GroupSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'group': typing.Union[GroupSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group = api_client.PathParameter( - name="group", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserPublic']: - return UserPublic - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserPublic'], typing.List['UserPublic']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserPublic': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List group's users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_source, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_users_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_users_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/me/__init__.py b/flat_api/paths/me/__init__.py deleted file mode 100644 index 7fd558b..0000000 --- a/flat_api/paths/me/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.me import Api - -from flat_api.paths import PathValues - -path = PathValues.ME \ No newline at end of file diff --git a/flat_api/paths/me/get.py b/flat_api/paths/me/get.py deleted file mode 100644 index 8986e4a..0000000 --- a/flat_api/paths/me/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -OnlyIdSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'onlyId': typing.Union[OnlyIdSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_only_id = api_client.QueryParameter( - name="onlyId", - style=api_client.ParameterStyle.FORM, - schema=OnlyIdSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_authenticated_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get current user account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_only_id, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetAuthenticatedUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_authenticated_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_authenticated_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_authenticated_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/me/get.pyi b/flat_api/paths/me/get.pyi deleted file mode 100644 index 962ac33..0000000 --- a/flat_api/paths/me/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -OnlyIdSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'onlyId': typing.Union[OnlyIdSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_only_id = api_client.QueryParameter( - name="onlyId", - style=api_client.ParameterStyle.FORM, - schema=OnlyIdSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = UserDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_authenticated_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_authenticated_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get current user account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_only_id, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetAuthenticatedUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_authenticated_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_authenticated_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_authenticated_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_authenticated_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations/__init__.py b/flat_api/paths/organizations_invitations/__init__.py deleted file mode 100644 index 6cf4b69..0000000 --- a/flat_api/paths/organizations_invitations/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_invitations import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_INVITATIONS \ No newline at end of file diff --git a/flat_api/paths/organizations_invitations/get.py b/flat_api/paths/organizations_invitations/get.py deleted file mode 100644 index 75858d2..0000000 --- a/flat_api/paths/organizations_invitations/get.py +++ /dev/null @@ -1,414 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation import OrganizationInvitation - -from . import path - -# Query params - - -class RoleSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "teacher": "TEACHER", - "admin": "ADMIN", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = 1 -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'role': typing.Union[RoleSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OrganizationInvitation']: - return OrganizationInvitation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OrganizationInvitation'], typing.List['OrganizationInvitation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OrganizationInvitation': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_organization_invitations_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the organization invitations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_role, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListOrganizationInvitations(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_organization_invitations( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_invitations_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_invitations_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations/get.pyi b/flat_api/paths/organizations_invitations/get.pyi deleted file mode 100644 index a674a70..0000000 --- a/flat_api/paths/organizations_invitations/get.pyi +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation import OrganizationInvitation - -# Query params - - -class RoleSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - -class LimitSchema( - schemas.IntSchema -): - pass -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'role': typing.Union[RoleSchema, str, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OrganizationInvitation']: - return OrganizationInvitation - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OrganizationInvitation'], typing.List['OrganizationInvitation']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OrganizationInvitation': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_organization_invitations_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_organization_invitations_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the organization invitations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_role, - request_query_limit, - request_query_next, - request_query_previous, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListOrganizationInvitations(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_organization_invitations( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_organization_invitations( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_invitations_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_invitations_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations/post.py b/flat_api/paths/organizations_invitations/post.py deleted file mode 100644 index a8c082f..0000000 --- a/flat_api/paths/organizations_invitations/post.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_invitation import OrganizationInvitation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = OrganizationInvitationCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = OrganizationInvitation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_invitation_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_invitation_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new invitation to join the organization - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationInvitation(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_invitation( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_invitation( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_invitation( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_invitation( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_invitation( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_invitation_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_invitation_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations/post.pyi b/flat_api/paths/organizations_invitations/post.pyi deleted file mode 100644 index 639cc79..0000000 --- a/flat_api/paths/organizations_invitations/post.pyi +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_invitation import OrganizationInvitation - -# body param -SchemaForRequestBodyApplicationJson = OrganizationInvitationCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = OrganizationInvitation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_invitation_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_invitation_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_invitation_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new invitation to join the organization - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationInvitation(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_invitation( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_invitation( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_invitation( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_invitation( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_invitation( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_invitation_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_invitation_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations_invitation/__init__.py b/flat_api/paths/organizations_invitations_invitation/__init__.py deleted file mode 100644 index 86df851..0000000 --- a/flat_api/paths/organizations_invitations_invitation/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_invitations_invitation import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_INVITATIONS_INVITATION \ No newline at end of file diff --git a/flat_api/paths/organizations_invitations_invitation/delete.py b/flat_api/paths/organizations_invitations_invitation/delete.py deleted file mode 100644 index be4f5eb..0000000 --- a/flat_api/paths/organizations_invitations_invitation/delete.py +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -InvitationSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'invitation': typing.Union[InvitationSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_invitation = api_client.PathParameter( - name="invitation", - style=api_client.ParameterStyle.SIMPLE, - schema=InvitationSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_organization_invitation_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an organization invitation - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_invitation, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveOrganizationInvitation(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_organization_invitation( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_invitation_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_invitation_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_invitations_invitation/delete.pyi b/flat_api/paths/organizations_invitations_invitation/delete.pyi deleted file mode 100644 index 93dd11e..0000000 --- a/flat_api/paths/organizations_invitations_invitation/delete.pyi +++ /dev/null @@ -1,311 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -InvitationSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'invitation': typing.Union[InvitationSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_invitation = api_client.PathParameter( - name="invitation", - style=api_client.ParameterStyle.SIMPLE, - schema=InvitationSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_organization_invitation_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_organization_invitation_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an organization invitation - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_invitation, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveOrganizationInvitation(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_organization_invitation( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_organization_invitation( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_invitation_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_invitation_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials/__init__.py b/flat_api/paths/organizations_lti_credentials/__init__.py deleted file mode 100644 index 839ca88..0000000 --- a/flat_api/paths/organizations_lti_credentials/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_lti_credentials import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_LTI_CREDENTIALS \ No newline at end of file diff --git a/flat_api/paths/organizations_lti_credentials/get.py b/flat_api/paths/organizations_lti_credentials/get.py deleted file mode 100644 index e4c534a..0000000 --- a/flat_api/paths/organizations_lti_credentials/get.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['LtiCredentials']: - return LtiCredentials - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['LtiCredentials'], typing.List['LtiCredentials']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'LtiCredentials': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_lti_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_lti_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_lti_credentials_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_lti_credentials_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials/get.pyi b/flat_api/paths/organizations_lti_credentials/get.pyi deleted file mode 100644 index 52121e4..0000000 --- a/flat_api/paths/organizations_lti_credentials/get.pyi +++ /dev/null @@ -1,309 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['LtiCredentials']: - return LtiCredentials - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['LtiCredentials'], typing.List['LtiCredentials']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'LtiCredentials': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_lti_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_lti_credentials_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_lti_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_lti_credentials( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_lti_credentials_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_lti_credentials_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials/post.py b/flat_api/paths/organizations_lti_credentials/post.py deleted file mode 100644 index 84e44ff..0000000 --- a/flat_api/paths/organizations_lti_credentials/post.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = LtiCredentialsCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = LtiCredentials - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new couple of LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_lti_credentials_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_lti_credentials_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials/post.pyi b/flat_api/paths/organizations_lti_credentials/post.pyi deleted file mode 100644 index 240fae7..0000000 --- a/flat_api/paths/organizations_lti_credentials/post.pyi +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation - -# body param -SchemaForRequestBodyApplicationJson = LtiCredentialsCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = LtiCredentials - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_lti_credentials_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new couple of LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_lti_credentials( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_lti_credentials_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_lti_credentials_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials_credentials/__init__.py b/flat_api/paths/organizations_lti_credentials_credentials/__init__.py deleted file mode 100644 index 7f2a7c2..0000000 --- a/flat_api/paths/organizations_lti_credentials_credentials/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_lti_credentials_credentials import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_LTI_CREDENTIALS_CREDENTIALS \ No newline at end of file diff --git a/flat_api/paths/organizations_lti_credentials_credentials/delete.py b/flat_api/paths/organizations_lti_credentials_credentials/delete.py deleted file mode 100644 index a01febb..0000000 --- a/flat_api/paths/organizations_lti_credentials_credentials/delete.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -CredentialsSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'credentials': typing.Union[CredentialsSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_credentials = api_client.PathParameter( - name="credentials", - style=api_client.ParameterStyle.SIMPLE, - schema=CredentialsSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _revoke_lti_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Revoke LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_credentials, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RevokeLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def revoke_lti_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revoke_lti_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revoke_lti_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi b/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi deleted file mode 100644 index 643b673..0000000 --- a/flat_api/paths/organizations_lti_credentials_credentials/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -CredentialsSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'credentials': typing.Union[CredentialsSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_credentials = api_client.PathParameter( - name="credentials", - style=api_client.ParameterStyle.SIMPLE, - schema=CredentialsSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _revoke_lti_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _revoke_lti_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Revoke LTI 1.x credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_credentials, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RevokeLtiCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def revoke_lti_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def revoke_lti_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revoke_lti_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revoke_lti_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users/__init__.py b/flat_api/paths/organizations_users/__init__.py deleted file mode 100644 index ce19f14..0000000 --- a/flat_api/paths/organizations_users/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_users import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_USERS \ No newline at end of file diff --git a/flat_api/paths/organizations_users/get.py b/flat_api/paths/organizations_users/get.py deleted file mode 100644 index 64c8a6e..0000000 --- a/flat_api/paths/organizations_users/get.py +++ /dev/null @@ -1,615 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params - - -class SortSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "firstname": "FIRSTNAME", - "lastname": "LASTNAME", - "lastActivityDate": "LAST_ACTIVITY_DATE", - "licenseExpirationDate": "LICENSE_EXPIRATION_DATE", - } - - @schemas.classproperty - def FIRSTNAME(cls): - return cls("firstname") - - @schemas.classproperty - def LASTNAME(cls): - return cls("lastname") - - @schemas.classproperty - def LAST_ACTIVITY_DATE(cls): - return cls("lastActivityDate") - - @schemas.classproperty - def LICENSE_EXPIRATION_DATE(cls): - return cls("licenseExpirationDate") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SortSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "asc": "ASC", - "desc": "DESC", - } - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema - - -class RoleSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "teacher": "TEACHER", - "admin": "ADMIN", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RoleSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -QSchema = schemas.StrSchema - - -class GroupSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'GroupSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -NoActiveLicenseSchema = schemas.BoolSchema - - -class LicenseExpirationDateSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'LicenseExpirationDateSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -OnlyIdsSchema = schemas.BoolSchema - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = 1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sort': typing.Union[SortSchema, list, tuple, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - 'role': typing.Union[RoleSchema, list, tuple, ], - 'q': typing.Union[QSchema, str, ], - 'group': typing.Union[GroupSchema, list, tuple, ], - 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], - 'licenseExpirationDate': typing.Union[LicenseExpirationDateSchema, list, tuple, ], - 'onlyIds': typing.Union[OnlyIdsSchema, bool, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_q = api_client.QueryParameter( - name="q", - style=api_client.ParameterStyle.FORM, - schema=QSchema, - explode=True, -) -request_query_group = api_client.QueryParameter( - name="group", - style=api_client.ParameterStyle.FORM, - schema=GroupSchema, - explode=True, -) -request_query_no_active_license = api_client.QueryParameter( - name="noActiveLicense", - style=api_client.ParameterStyle.FORM, - schema=NoActiveLicenseSchema, - explode=True, -) -request_query_license_expiration_date = api_client.QueryParameter( - name="licenseExpirationDate", - style=api_client.ParameterStyle.FORM, - schema=LicenseExpirationDateSchema, - explode=True, -) -request_query_only_ids = api_client.QueryParameter( - name="onlyIds", - style=api_client.ParameterStyle.FORM, - schema=OnlyIdsSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserDetailsAdmin']: - return UserDetailsAdmin - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserDetailsAdmin': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_organization_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the organization users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_sort, - request_query_direction, - request_query_next, - request_query_previous, - request_query_role, - request_query_q, - request_query_group, - request_query_no_active_license, - request_query_license_expiration_date, - request_query_only_ids, - request_query_limit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListOrganizationUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_organization_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users/get.pyi b/flat_api/paths/organizations_users/get.pyi deleted file mode 100644 index 580a751..0000000 --- a/flat_api/paths/organizations_users/get.pyi +++ /dev/null @@ -1,578 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params - - -class SortSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def FIRSTNAME(cls): - return cls("firstname") - - @schemas.classproperty - def LASTNAME(cls): - return cls("lastname") - - @schemas.classproperty - def LAST_ACTIVITY_DATE(cls): - return cls("lastActivityDate") - - @schemas.classproperty - def LICENSE_EXPIRATION_DATE(cls): - return cls("licenseExpirationDate") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SortSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") -NextSchema = schemas.StrSchema -PreviousSchema = schemas.StrSchema - - -class RoleSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RoleSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -QSchema = schemas.StrSchema - - -class GroupSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'GroupSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -NoActiveLicenseSchema = schemas.BoolSchema - - -class LicenseExpirationDateSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'LicenseExpirationDateSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -OnlyIdsSchema = schemas.BoolSchema - - -class LimitSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sort': typing.Union[SortSchema, list, tuple, ], - 'direction': typing.Union[DirectionSchema, str, ], - 'next': typing.Union[NextSchema, str, ], - 'previous': typing.Union[PreviousSchema, str, ], - 'role': typing.Union[RoleSchema, list, tuple, ], - 'q': typing.Union[QSchema, str, ], - 'group': typing.Union[GroupSchema, list, tuple, ], - 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], - 'licenseExpirationDate': typing.Union[LicenseExpirationDateSchema, list, tuple, ], - 'onlyIds': typing.Union[OnlyIdsSchema, bool, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -request_query_next = api_client.QueryParameter( - name="next", - style=api_client.ParameterStyle.FORM, - schema=NextSchema, - explode=True, -) -request_query_previous = api_client.QueryParameter( - name="previous", - style=api_client.ParameterStyle.FORM, - schema=PreviousSchema, - explode=True, -) -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_q = api_client.QueryParameter( - name="q", - style=api_client.ParameterStyle.FORM, - schema=QSchema, - explode=True, -) -request_query_group = api_client.QueryParameter( - name="group", - style=api_client.ParameterStyle.FORM, - schema=GroupSchema, - explode=True, -) -request_query_no_active_license = api_client.QueryParameter( - name="noActiveLicense", - style=api_client.ParameterStyle.FORM, - schema=NoActiveLicenseSchema, - explode=True, -) -request_query_license_expiration_date = api_client.QueryParameter( - name="licenseExpirationDate", - style=api_client.ParameterStyle.FORM, - schema=LicenseExpirationDateSchema, - explode=True, -) -request_query_only_ids = api_client.QueryParameter( - name="onlyIds", - style=api_client.ParameterStyle.FORM, - schema=OnlyIdsSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserDetailsAdmin']: - return UserDetailsAdmin - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserDetailsAdmin': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_organization_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_organization_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the organization users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_sort, - request_query_direction, - request_query_next, - request_query_previous, - request_query_role, - request_query_q, - request_query_group, - request_query_no_active_license, - request_query_license_expiration_date, - request_query_only_ids, - request_query_limit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListOrganizationUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_organization_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_organization_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_organization_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users/post.py b/flat_api/paths/organizations_users/post.py deleted file mode 100644 index acc58ec..0000000 --- a/flat_api/paths/organizations_users/post.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = UserCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new user account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users/post.pyi b/flat_api/paths/organizations_users/post.pyi deleted file mode 100644 index d1593ec..0000000 --- a/flat_api/paths/organizations_users/post.pyi +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -# body param -SchemaForRequestBodyApplicationJson = UserCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new user account - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_count/__init__.py b/flat_api/paths/organizations_users_count/__init__.py deleted file mode 100644 index 7440323..0000000 --- a/flat_api/paths/organizations_users_count/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_users_count import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_USERS_COUNT \ No newline at end of file diff --git a/flat_api/paths/organizations_users_count/get.py b/flat_api/paths/organizations_users_count/get.py deleted file mode 100644 index 6007e3c..0000000 --- a/flat_api/paths/organizations_users_count/get.py +++ /dev/null @@ -1,449 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params - - -class RoleSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "user": "USER", - "teacher": "TEACHER", - "admin": "ADMIN", - } - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RoleSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -QSchema = schemas.StrSchema - - -class GroupSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'GroupSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -NoActiveLicenseSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'role': typing.Union[RoleSchema, list, tuple, ], - 'q': typing.Union[QSchema, str, ], - 'group': typing.Union[GroupSchema, list, tuple, ], - 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_q = api_client.QueryParameter( - name="q", - style=api_client.ParameterStyle.FORM, - schema=QSchema, - explode=True, -) -request_query_group = api_client.QueryParameter( - name="group", - style=api_client.ParameterStyle.FORM, - schema=GroupSchema, - explode=True, -) -request_query_no_active_license = api_client.QueryParameter( - name="noActiveLicense", - style=api_client.ParameterStyle.FORM, - schema=NoActiveLicenseSchema, - explode=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserDetailsAdmin']: - return UserDetailsAdmin - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserDetailsAdmin': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _count_orga_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Count the organization users using the provided filters - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_role, - request_query_q, - request_query_group, - request_query_no_active_license, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CountOrgaUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def count_orga_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._count_orga_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._count_orga_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_count/get.pyi b/flat_api/paths/organizations_users_count/get.pyi deleted file mode 100644 index ef2ce04..0000000 --- a/flat_api/paths/organizations_users_count/get.pyi +++ /dev/null @@ -1,432 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params - - -class RoleSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def USER(cls): - return cls("user") - - @schemas.classproperty - def TEACHER(cls): - return cls("teacher") - - @schemas.classproperty - def ADMIN(cls): - return cls("admin") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RoleSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -QSchema = schemas.StrSchema - - -class GroupSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'GroupSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -NoActiveLicenseSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'role': typing.Union[RoleSchema, list, tuple, ], - 'q': typing.Union[QSchema, str, ], - 'group': typing.Union[GroupSchema, list, tuple, ], - 'noActiveLicense': typing.Union[NoActiveLicenseSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_role = api_client.QueryParameter( - name="role", - style=api_client.ParameterStyle.FORM, - schema=RoleSchema, - explode=True, -) -request_query_q = api_client.QueryParameter( - name="q", - style=api_client.ParameterStyle.FORM, - schema=QSchema, - explode=True, -) -request_query_group = api_client.QueryParameter( - name="group", - style=api_client.ParameterStyle.FORM, - schema=GroupSchema, - explode=True, -) -request_query_no_active_license = api_client.QueryParameter( - name="noActiveLicense", - style=api_client.ParameterStyle.FORM, - schema=NoActiveLicenseSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['UserDetailsAdmin']: - return UserDetailsAdmin - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['UserDetailsAdmin'], typing.List['UserDetailsAdmin']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'UserDetailsAdmin': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _count_orga_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _count_orga_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Count the organization users using the provided filters - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_role, - request_query_q, - request_query_group, - request_query_no_active_license, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CountOrgaUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def count_orga_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def count_orga_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._count_orga_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._count_orga_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user/__init__.py b/flat_api/paths/organizations_users_user/__init__.py deleted file mode 100644 index 5fc758f..0000000 --- a/flat_api/paths/organizations_users_user/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_users_user import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_USERS_USER \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user/delete.py b/flat_api/paths/organizations_users_user/delete.py deleted file mode 100644 index ba47e42..0000000 --- a/flat_api/paths/organizations_users_user/delete.py +++ /dev/null @@ -1,374 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -ConvertToIndividualSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'convertToIndividual': typing.Union[ConvertToIndividualSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_convert_to_individual = api_client.QueryParameter( - name="convertToIndividual", - style=api_client.ParameterStyle.FORM, - schema=ConvertToIndividualSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_organization_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an account from Flat - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_convert_to_individual, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_organization_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_user_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_user_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user/delete.pyi b/flat_api/paths/organizations_users_user/delete.pyi deleted file mode 100644 index 7ef40b9..0000000 --- a/flat_api/paths/organizations_users_user/delete.pyi +++ /dev/null @@ -1,365 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -ConvertToIndividualSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'convertToIndividual': typing.Union[ConvertToIndividualSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_convert_to_individual = api_client.QueryParameter( - name="convertToIndividual", - style=api_client.ParameterStyle.FORM, - schema=ConvertToIndividualSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_organization_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_organization_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an account from Flat - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_convert_to_individual, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_organization_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_organization_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_user_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_organization_user_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user/put.py b/flat_api/paths/organizations_users_user/put.py deleted file mode 100644 index 6c5b688..0000000 --- a/flat_api/paths/organizations_users_user/put.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_admin_update import UserAdminUpdate - -from . import path - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = UserAdminUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update account information - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_organization_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_organization_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user/put.pyi b/flat_api/paths/organizations_users_user/put.pyi deleted file mode 100644 index 3a26f85..0000000 --- a/flat_api/paths/organizations_users_user/put.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_admin_update import UserAdminUpdate - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = UserAdminUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = UserDetailsAdmin - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_organization_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update account information - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateOrganizationUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_organization_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_organization_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_organization_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user_access_token/__init__.py b/flat_api/paths/organizations_users_user_access_token/__init__.py deleted file mode 100644 index 5ca6071..0000000 --- a/flat_api/paths/organizations_users_user_access_token/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_users_user_access_token import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_USERS_USER_ACCESS_TOKEN \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user_access_token/post.py b/flat_api/paths/organizations_users_user_access_token/post.py deleted file mode 100644 index 498cc0e..0000000 --- a/flat_api/paths/organizations_users_user_access_token/post.py +++ /dev/null @@ -1,426 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = OrganizationUserAccessTokenCreation - - -request_body_organization_user_access_token_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ApiAccessToken - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_access_token_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a delegated API access token for an organization user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_organization_user_access_token_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUserAccessToken(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user_access_token( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user_access_token( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user_access_token( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user_access_token( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user_access_token( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_access_token_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_access_token_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user_access_token/post.pyi b/flat_api/paths/organizations_users_user_access_token/post.pyi deleted file mode 100644 index b84f3ed..0000000 --- a/flat_api/paths/organizations_users_user_access_token/post.pyi +++ /dev/null @@ -1,417 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = OrganizationUserAccessTokenCreation - - -request_body_organization_user_access_token_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiAccessToken - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_access_token_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_access_token_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a delegated API access token for an organization user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_organization_user_access_token_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUserAccessToken(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user_access_token( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user_access_token( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user_access_token( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user_access_token( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user_access_token( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_access_token_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_access_token_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user_signin_link/__init__.py b/flat_api/paths/organizations_users_user_signin_link/__init__.py deleted file mode 100644 index 2e40a4e..0000000 --- a/flat_api/paths/organizations_users_user_signin_link/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.organizations_users_user_signin_link import Api - -from flat_api.paths import PathValues - -path = PathValues.ORGANIZATIONS_USERS_USER_SIGNIN_LINK \ No newline at end of file diff --git a/flat_api/paths/organizations_users_user_signin_link/post.py b/flat_api/paths/organizations_users_user_signin_link/post.py deleted file mode 100644 index e60ea76..0000000 --- a/flat_api/paths/organizations_users_user_signin_link/post.py +++ /dev/null @@ -1,426 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_signin_link import UserSigninLink - -from . import path - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = UserSigninLinkCreation - - -request_body_user_signin_link_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserSigninLink - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_signin_link_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a sign in link for an organization user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_user_signin_link_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUserSigninLink(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user_signin_link( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user_signin_link( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_signin_link_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_signin_link_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/organizations_users_user_signin_link/post.pyi b/flat_api/paths/organizations_users_user_signin_link/post.pyi deleted file mode 100644 index 6da6db5..0000000 --- a/flat_api/paths/organizations_users_user_signin_link/post.pyi +++ /dev/null @@ -1,417 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_signin_link import UserSigninLink - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = UserSigninLinkCreation - - -request_body_user_signin_link_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = UserSigninLink - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_organization_user_signin_link_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_organization_user_signin_link_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a sign in link for an organization user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_user_signin_link_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateOrganizationUserSigninLink(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_organization_user_signin_link( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_organization_user_signin_link( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_organization_user_signin_link( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_signin_link_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_organization_user_signin_link_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores/__init__.py b/flat_api/paths/scores/__init__.py deleted file mode 100644 index ff486ae..0000000 --- a/flat_api/paths/scores/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES \ No newline at end of file diff --git a/flat_api/paths/scores/post.py b/flat_api/paths/scores/post.py deleted file mode 100644 index b30b752..0000000 --- a/flat_api/paths/scores/post.py +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ScoreCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '402': _response_for_402, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores/post.pyi b/flat_api/paths/scores/post.pyi deleted file mode 100644 index 71d41e6..0000000 --- a/flat_api/paths/scores/post.pyi +++ /dev/null @@ -1,401 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# body param -SchemaForRequestBodyApplicationJson = ScoreCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/__init__.py b/flat_api/paths/scores_score/__init__.py deleted file mode 100644 index 081d458..0000000 --- a/flat_api/paths/scores_score/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE \ No newline at end of file diff --git a/flat_api/paths/scores_score/delete.py b/flat_api/paths/scores_score/delete.py deleted file mode 100644 index c552441..0000000 --- a/flat_api/paths/scores_score/delete.py +++ /dev/null @@ -1,414 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -NowSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'now': typing.Union[NowSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_now = api_client.QueryParameter( - name="now", - style=api_client.ParameterStyle.FORM, - schema=NowSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_now, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/delete.pyi b/flat_api/paths/scores_score/delete.pyi deleted file mode 100644 index 5ccd681..0000000 --- a/flat_api/paths/scores_score/delete.pyi +++ /dev/null @@ -1,403 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -NowSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'now': typing.Union[NowSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_now = api_client.QueryParameter( - name="now", - style=api_client.ParameterStyle.FORM, - schema=NowSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_now, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/get.py b/flat_api/paths/scores_score/get.py deleted file mode 100644 index 60d82e5..0000000 --- a/flat_api/paths/scores_score/get.py +++ /dev/null @@ -1,442 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/get.pyi b/flat_api/paths/scores_score/get.pyi deleted file mode 100644 index 64886b4..0000000 --- a/flat_api/paths/scores_score/get.pyi +++ /dev/null @@ -1,430 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/put.py b/flat_api/paths/scores_score/put.py deleted file mode 100644 index abe9b2d..0000000 --- a/flat_api/paths/scores_score/put.py +++ /dev/null @@ -1,486 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreModification - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_score_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_score_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_score_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_score_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Edit a score's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_score( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_score( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_score( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_score( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_score( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_score_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_score_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score/put.pyi b/flat_api/paths/scores_score/put.pyi deleted file mode 100644 index a2ef7ac..0000000 --- a/flat_api/paths/scores_score/put.pyi +++ /dev/null @@ -1,474 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreModification - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _edit_score_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _edit_score_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _edit_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _edit_score_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _edit_score_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Edit a score's metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EditScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def edit_score( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def edit_score( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def edit_score( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def edit_score( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def edit_score( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_score_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._edit_score_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators/__init__.py b/flat_api/paths/scores_score_collaborators/__init__.py deleted file mode 100644 index d08788d..0000000 --- a/flat_api/paths/scores_score_collaborators/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_collaborators import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_COLLABORATORS \ No newline at end of file diff --git a/flat_api/paths/scores_score_collaborators/get.py b/flat_api/paths/scores_score_collaborators/get.py deleted file mode 100644 index 646ea67..0000000 --- a/flat_api/paths/scores_score_collaborators/get.py +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_collaborators_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the collaborators - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreCollaborators(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_collaborators( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborators_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborators_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators/get.pyi b/flat_api/paths/scores_score_collaborators/get.pyi deleted file mode 100644 index 67cbb3d..0000000 --- a/flat_api/paths/scores_score_collaborators/get.pyi +++ /dev/null @@ -1,455 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ResourceCollaborator']: - return ResourceCollaborator - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ResourceCollaborator'], typing.List['ResourceCollaborator']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ResourceCollaborator': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_collaborators_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_collaborators_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the collaborators - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreCollaborators(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_collaborators( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_collaborators( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborators_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborators_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators/post.py b/flat_api/paths/scores_score_collaborators/post.py deleted file mode 100644 index b85a106..0000000 --- a/flat_api/paths/scores_score_collaborators/post.py +++ /dev/null @@ -1,489 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ResourceCollaboratorCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_collaborator_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_collaborator_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators/post.pyi b/flat_api/paths/scores_score_collaborators/post.pyi deleted file mode 100644 index 0a3721d..0000000 --- a/flat_api/paths/scores_score_collaborators/post.pyi +++ /dev/null @@ -1,477 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ResourceCollaboratorCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_collaborator_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_collaborator( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_collaborator_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_collaborator_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators_collaborator/__init__.py b/flat_api/paths/scores_score_collaborators_collaborator/__init__.py deleted file mode 100644 index b0a54e1..0000000 --- a/flat_api/paths/scores_score_collaborators_collaborator/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_collaborators_collaborator import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_COLLABORATORS_COLLABORATOR \ No newline at end of file diff --git a/flat_api/paths/scores_score_collaborators_collaborator/delete.py b/flat_api/paths/scores_score_collaborators_collaborator/delete.py deleted file mode 100644 index ebe51d2..0000000 --- a/flat_api/paths/scores_score_collaborators_collaborator/delete.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -CollaboratorSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'collaborator': typing.Union[CollaboratorSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_collaborator = api_client.PathParameter( - name="collaborator", - style=api_client.ParameterStyle.SIMPLE, - schema=CollaboratorSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_score_collaborator_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_collaborator, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_score_collaborator( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_score_collaborator_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_score_collaborator_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi b/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi deleted file mode 100644 index 664d7a9..0000000 --- a/flat_api/paths/scores_score_collaborators_collaborator/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -CollaboratorSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'collaborator': typing.Union[CollaboratorSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_collaborator = api_client.PathParameter( - name="collaborator", - style=api_client.ParameterStyle.SIMPLE, - schema=CollaboratorSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _remove_score_collaborator_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_score_collaborator_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_collaborator, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RemoveScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def remove_score_collaborator( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_score_collaborator( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_score_collaborator_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_score_collaborator_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators_collaborator/get.py b/flat_api/paths/scores_score_collaborators_collaborator/get.py deleted file mode 100644 index d7c78dc..0000000 --- a/flat_api/paths/scores_score_collaborators_collaborator/get.py +++ /dev/null @@ -1,451 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CollaboratorSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'collaborator': typing.Union[CollaboratorSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_collaborator = api_client.PathParameter( - name="collaborator", - style=api_client.ParameterStyle.SIMPLE, - schema=CollaboratorSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_collaborator_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_collaborator, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_collaborator( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborator_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborator_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_collaborators_collaborator/get.pyi b/flat_api/paths/scores_score_collaborators_collaborator/get.pyi deleted file mode 100644 index c61872f..0000000 --- a/flat_api/paths/scores_score_collaborators_collaborator/get.pyi +++ /dev/null @@ -1,439 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CollaboratorSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'collaborator': typing.Union[CollaboratorSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_collaborator = api_client.PathParameter( - name="collaborator", - style=api_client.ParameterStyle.SIMPLE, - schema=CollaboratorSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ResourceCollaborator - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_collaborator_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_collaborator_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a collaborator - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_collaborator, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreCollaborator(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_collaborator( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_collaborator( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborator_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_collaborator_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments/__init__.py b/flat_api/paths/scores_score_comments/__init__.py deleted file mode 100644 index 4cfd54f..0000000 --- a/flat_api/paths/scores_score_comments/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_comments import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_COMMENTS \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments/get.py b/flat_api/paths/scores_score_comments/get.py deleted file mode 100644 index b8340a6..0000000 --- a/flat_api/paths/scores_score_comments/get.py +++ /dev/null @@ -1,549 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "document": "DOCUMENT", - "inline": "INLINE", - } - - @schemas.classproperty - def DOCUMENT(cls): - return cls("document") - - @schemas.classproperty - def INLINE(cls): - return cls("inline") - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "date": "DATE", - } - - @schemas.classproperty - def DATE(cls): - return cls("date") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "asc": "ASC", - "desc": "DESC", - } - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreComment']: - return ScoreComment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreComment'], typing.List['ScoreComment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreComment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_comments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List comments - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_type, - request_query_sort, - request_query_direction, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreComments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_comments( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_comments_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_comments_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments/get.pyi b/flat_api/paths/scores_score_comments/get.pyi deleted file mode 100644 index e8fd3a6..0000000 --- a/flat_api/paths/scores_score_comments/get.pyi +++ /dev/null @@ -1,517 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def DOCUMENT(cls): - return cls("document") - - @schemas.classproperty - def INLINE(cls): - return cls("inline") - - -class SortSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def DATE(cls): - return cls("date") - - -class DirectionSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def ASC(cls): - return cls("asc") - - @schemas.classproperty - def DESC(cls): - return cls("desc") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - 'sort': typing.Union[SortSchema, str, ], - 'direction': typing.Union[DirectionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -request_query_sort = api_client.QueryParameter( - name="sort", - style=api_client.ParameterStyle.FORM, - schema=SortSchema, - explode=True, -) -request_query_direction = api_client.QueryParameter( - name="direction", - style=api_client.ParameterStyle.FORM, - schema=DirectionSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreComment']: - return ScoreComment - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreComment'], typing.List['ScoreComment']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreComment': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_comments_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_comments_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List comments - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_type, - request_query_sort, - request_query_direction, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreComments(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_comments( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_comments( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_comments_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_comments_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments/post.py b/flat_api/paths/scores_score_comments/post.py deleted file mode 100644 index 2513d25..0000000 --- a/flat_api/paths/scores_score_comments/post.py +++ /dev/null @@ -1,546 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreCommentCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Post a new comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments/post.pyi b/flat_api/paths/scores_score_comments/post.pyi deleted file mode 100644 index e0fa72f..0000000 --- a/flat_api/paths/scores_score_comments/post.pyi +++ /dev/null @@ -1,534 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreCommentCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Post a new comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment/__init__.py b/flat_api/paths/scores_score_comments_comment/__init__.py deleted file mode 100644 index b5fa623..0000000 --- a/flat_api/paths/scores_score_comments_comment/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_comments_comment import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_COMMENTS_COMMENT \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments_comment/delete.py b/flat_api/paths/scores_score_comments_comment/delete.py deleted file mode 100644 index 3e66f11..0000000 --- a/flat_api/paths/scores_score_comments_comment/delete.py +++ /dev/null @@ -1,423 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_comment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_comment( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_comment_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_comment_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment/delete.pyi b/flat_api/paths/scores_score_comments_comment/delete.pyi deleted file mode 100644 index 2d83e90..0000000 --- a/flat_api/paths/scores_score_comments_comment/delete.pyi +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_comment_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_comment_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete a comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_comment( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_comment( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_comment_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_comment_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment/put.py b/flat_api/paths/scores_score_comments_comment/put.py deleted file mode 100644 index d0a96d1..0000000 --- a/flat_api/paths/scores_score_comments_comment/put.py +++ /dev/null @@ -1,555 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_comment_update import ScoreCommentUpdate - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreCommentUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an existing comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment/put.pyi b/flat_api/paths/scores_score_comments_comment/put.pyi deleted file mode 100644 index a796372..0000000 --- a/flat_api/paths/scores_score_comments_comment/put.pyi +++ /dev/null @@ -1,543 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_comment_update import ScoreCommentUpdate - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreCommentUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreComment - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_score_comment_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an existing comment - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateScoreComment(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_score_comment( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_comment_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment_resolved/__init__.py b/flat_api/paths/scores_score_comments_comment_resolved/__init__.py deleted file mode 100644 index 16ddf75..0000000 --- a/flat_api/paths/scores_score_comments_comment_resolved/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_comments_comment_resolved import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_COMMENTS_COMMENT_RESOLVED \ No newline at end of file diff --git a/flat_api/paths/scores_score_comments_comment_resolved/delete.py b/flat_api/paths/scores_score_comments_comment_resolved/delete.py deleted file mode 100644 index dfce28c..0000000 --- a/flat_api/paths/scores_score_comments_comment_resolved/delete.py +++ /dev/null @@ -1,423 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Mark the comment as unresolved - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MarkScoreCommentUnresolved(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def mark_score_comment_unresolved( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_unresolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_unresolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi b/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi deleted file mode 100644 index 6aeacad..0000000 --- a/flat_api/paths/scores_score_comments_comment_resolved/delete.pyi +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mark_score_comment_unresolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Mark the comment as unresolved - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MarkScoreCommentUnresolved(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def mark_score_comment_unresolved( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mark_score_comment_unresolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_unresolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_unresolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment_resolved/put.py b/flat_api/paths/scores_score_comments_comment_resolved/put.py deleted file mode 100644 index 4f25635..0000000 --- a/flat_api/paths/scores_score_comments_comment_resolved/put.py +++ /dev/null @@ -1,423 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Mark the comment as resolved - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MarkScoreCommentResolved(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def mark_score_comment_resolved( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_resolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_resolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_comments_comment_resolved/put.pyi b/flat_api/paths/scores_score_comments_comment_resolved/put.pyi deleted file mode 100644 index d1bc6ed..0000000 --- a/flat_api/paths/scores_score_comments_comment_resolved/put.pyi +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -CommentSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'comment': typing.Union[CommentSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_comment = api_client.PathParameter( - name="comment", - style=api_client.ParameterStyle.SIMPLE, - schema=CommentSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mark_score_comment_resolved_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Mark the comment as resolved - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_comment, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MarkScoreCommentResolved(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def mark_score_comment_resolved( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mark_score_comment_resolved( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_resolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mark_score_comment_resolved_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_fork/__init__.py b/flat_api/paths/scores_score_fork/__init__.py deleted file mode 100644 index a950e4f..0000000 --- a/flat_api/paths/scores_score_fork/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_fork import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_FORK \ No newline at end of file diff --git a/flat_api/paths/scores_score_fork/post.py b/flat_api/paths/scores_score_fork/post.py deleted file mode 100644 index 7fca558..0000000 --- a/flat_api/paths/scores_score_fork/post.py +++ /dev/null @@ -1,546 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_fork import ScoreFork - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreFork - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fork a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ForkScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fork_score_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fork_score_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_fork/post.pyi b/flat_api/paths/scores_score_fork/post.pyi deleted file mode 100644 index 39dcdf3..0000000 --- a/flat_api/paths/scores_score_fork/post.pyi +++ /dev/null @@ -1,534 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_fork import ScoreFork - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreFork - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreDetails - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _fork_score_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fork a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ForkScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def fork_score( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fork_score_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fork_score_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions/__init__.py b/flat_api/paths/scores_score_revisions/__init__.py deleted file mode 100644 index d0ff480..0000000 --- a/flat_api/paths/scores_score_revisions/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_revisions import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_REVISIONS \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions/get.py b/flat_api/paths/scores_score_revisions/get.py deleted file mode 100644 index 49c89a8..0000000 --- a/flat_api/paths/scores_score_revisions/get.py +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreRevision']: - return ScoreRevision - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreRevision'], typing.List['ScoreRevision']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreRevision': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revisions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the revisions - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevisions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revisions( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revisions_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revisions_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions/get.pyi b/flat_api/paths/scores_score_revisions/get.pyi deleted file mode 100644 index 48d8f80..0000000 --- a/flat_api/paths/scores_score_revisions/get.pyi +++ /dev/null @@ -1,455 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreRevision']: - return ScoreRevision - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreRevision'], typing.List['ScoreRevision']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreRevision': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revisions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revisions_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the revisions - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevisions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revisions( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revisions( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revisions_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revisions_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions/post.py b/flat_api/paths/scores_score_revisions/post.py deleted file mode 100644 index 145b784..0000000 --- a/flat_api/paths/scores_score_revisions/post.py +++ /dev/null @@ -1,489 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreRevisionCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreRevision - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new revision - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateScoreRevision(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_revision_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_revision_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions/post.pyi b/flat_api/paths/scores_score_revisions/post.pyi deleted file mode 100644 index 66c77ea..0000000 --- a/flat_api/paths/scores_score_revisions/post.pyi +++ /dev/null @@ -1,477 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreRevisionCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreRevision - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_score_revision_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new revision - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateScoreRevision(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_score_revision( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_revision_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_score_revision_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision/__init__.py b/flat_api/paths/scores_score_revisions_revision/__init__.py deleted file mode 100644 index 283c7fe..0000000 --- a/flat_api/paths/scores_score_revisions_revision/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_revisions_revision import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_REVISIONS_REVISION \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision/get.py b/flat_api/paths/scores_score_revisions_revision/get.py deleted file mode 100644 index 85150a0..0000000 --- a/flat_api/paths/scores_score_revisions_revision/get.py +++ /dev/null @@ -1,451 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreRevision - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revision_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score revision - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevision(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revision( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision/get.pyi b/flat_api/paths/scores_score_revisions_revision/get.pyi deleted file mode 100644 index 1f362c7..0000000 --- a/flat_api/paths/scores_score_revisions_revision/get.pyi +++ /dev/null @@ -1,439 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreRevision - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revision_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revision_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score revision - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevision(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revision( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revision( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision_format/__init__.py b/flat_api/paths/scores_score_revisions_revision_format/__init__.py deleted file mode 100644 index 3cd4d0f..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_revisions_revision_format import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision_format/get.py b/flat_api/paths/scores_score_revisions_revision_format/get.py deleted file mode 100644 index cc2398b..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format/get.py +++ /dev/null @@ -1,566 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -PartsSchema = schemas.StrSchema -DefaultTrackSchema = schemas.BoolSchema -UrlSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'parts': typing.Union[PartsSchema, str, ], - 'defaultTrack': typing.Union[DefaultTrackSchema, bool, ], - 'url': typing.Union[UrlSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_parts = api_client.QueryParameter( - name="parts", - style=api_client.ParameterStyle.FORM, - schema=PartsSchema, - explode=True, -) -request_query_default_track = api_client.QueryParameter( - name="defaultTrack", - style=api_client.ParameterStyle.FORM, - schema=DefaultTrackSchema, - explode=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema - - -class FormatSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "json": "JSON", - "mxl": "MXL", - "xml": "XML", - "mp3": "MP3", - "wav": "WAV", - "midi": "MIDI", - "thumbnail.png": "THUMBNAIL_PNG", - "synchronizationPoints": "SYNCHRONIZATION_POINTS", - } - - @schemas.classproperty - def JSON(cls): - return cls("json") - - @schemas.classproperty - def MXL(cls): - return cls("mxl") - - @schemas.classproperty - def XML(cls): - return cls("xml") - - @schemas.classproperty - def MP3(cls): - return cls("mp3") - - @schemas.classproperty - def WAV(cls): - return cls("wav") - - @schemas.classproperty - def MIDI(cls): - return cls("midi") - - @schemas.classproperty - def THUMBNAIL_PNG(cls): - return cls("thumbnail.png") - - @schemas.classproperty - def SYNCHRONIZATION_POINTS(cls): - return cls("synchronizationPoints") -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - 'format': typing.Union[FormatSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -request_path_format = api_client.PathParameter( - name="format", - style=api_client.ParameterStyle.SIMPLE, - schema=FormatSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = schemas.BinarySchema -SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml = schemas.BinarySchema -SchemaFor200ResponseBodyApplicationVndRecordareMusicxml = schemas.BinarySchema -SchemaFor200ResponseBodyAudioMp3 = schemas.BinarySchema -SchemaFor200ResponseBodyAudioWav = schemas.BinarySchema -SchemaFor200ResponseBodyAudioMidi = schemas.BinarySchema -SchemaFor200ResponseBodyImagePng = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, - SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, - SchemaFor200ResponseBodyAudioMp3, - SchemaFor200ResponseBodyAudioWav, - SchemaFor200ResponseBodyAudioMidi, - SchemaFor200ResponseBodyImagePng, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - 'application/vnd.recordare.musicxml+xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml), - 'application/vnd.recordare.musicxml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxml), - 'audio/mp3': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioMp3), - 'audio/wav': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioWav), - 'audio/midi': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioMidi), - 'image/png': api_client.MediaType( - schema=SchemaFor200ResponseBodyImagePng), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', - 'application/vnd.recordare.musicxml+xml', - 'application/vnd.recordare.musicxml', - 'audio/mp3', - 'audio/wav', - 'audio/midi', - 'image/png', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revision_data_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score revision data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - request_path_format, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_parts, - request_query_default_track, - request_query_url, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevisionData(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revision_data( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_data_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_data_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision_format/get.pyi b/flat_api/paths/scores_score_revisions_revision_format/get.pyi deleted file mode 100644 index b0c1334..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format/get.pyi +++ /dev/null @@ -1,541 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -PartsSchema = schemas.StrSchema -DefaultTrackSchema = schemas.BoolSchema -UrlSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'parts': typing.Union[PartsSchema, str, ], - 'defaultTrack': typing.Union[DefaultTrackSchema, bool, ], - 'url': typing.Union[UrlSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_parts = api_client.QueryParameter( - name="parts", - style=api_client.ParameterStyle.FORM, - schema=PartsSchema, - explode=True, -) -request_query_default_track = api_client.QueryParameter( - name="defaultTrack", - style=api_client.ParameterStyle.FORM, - schema=DefaultTrackSchema, - explode=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema - - -class FormatSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def JSON(cls): - return cls("json") - - @schemas.classproperty - def MXL(cls): - return cls("mxl") - - @schemas.classproperty - def XML(cls): - return cls("xml") - - @schemas.classproperty - def MP3(cls): - return cls("mp3") - - @schemas.classproperty - def WAV(cls): - return cls("wav") - - @schemas.classproperty - def MIDI(cls): - return cls("midi") - - @schemas.classproperty - def THUMBNAIL_PNG(cls): - return cls("thumbnail.png") - - @schemas.classproperty - def SYNCHRONIZATION_POINTS(cls): - return cls("synchronizationPoints") -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - 'format': typing.Union[FormatSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -request_path_format = api_client.PathParameter( - name="format", - style=api_client.ParameterStyle.SIMPLE, - schema=FormatSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.BinarySchema -SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml = schemas.BinarySchema -SchemaFor200ResponseBodyApplicationVndRecordareMusicxml = schemas.BinarySchema -SchemaFor200ResponseBodyAudioMp3 = schemas.BinarySchema -SchemaFor200ResponseBodyAudioWav = schemas.BinarySchema -SchemaFor200ResponseBodyAudioMidi = schemas.BinarySchema -SchemaFor200ResponseBodyImagePng = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml, - SchemaFor200ResponseBodyApplicationVndRecordareMusicxml, - SchemaFor200ResponseBodyAudioMp3, - SchemaFor200ResponseBodyAudioWav, - SchemaFor200ResponseBodyAudioMidi, - SchemaFor200ResponseBodyImagePng, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - 'application/vnd.recordare.musicxml+xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxmlxml), - 'application/vnd.recordare.musicxml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationVndRecordareMusicxml), - 'audio/mp3': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioMp3), - 'audio/wav': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioWav), - 'audio/midi': api_client.MediaType( - schema=SchemaFor200ResponseBodyAudioMidi), - 'image/png': api_client.MediaType( - schema=SchemaFor200ResponseBodyImagePng), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', - 'application/vnd.recordare.musicxml+xml', - 'application/vnd.recordare.musicxml', - 'audio/mp3', - 'audio/wav', - 'audio/midi', - 'image/png', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_revision_data_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_revision_data_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a score revision data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - request_path_format, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_parts, - request_query_default_track, - request_query_url, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreRevisionData(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_revision_data( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_revision_data( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_data_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_revision_data_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py b/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py deleted file mode 100644 index 55cf3cf..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format_task/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_revisions_revision_format_task import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_REVISIONS_REVISION_FORMAT_TASK \ No newline at end of file diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/post.py b/flat_api/paths/scores_score_revisions_revision_format_task/post.py deleted file mode 100644 index bca65a0..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format_task/post.py +++ /dev/null @@ -1,586 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.task_export_options import TaskExportOptions -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema - - -class FormatSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "mp3": "MP3", - "wav": "WAV", - "practicefirst": "PRACTICEFIRST", - } - - @schemas.classproperty - def MP3(cls): - return cls("mp3") - - @schemas.classproperty - def WAV(cls): - return cls("wav") - - @schemas.classproperty - def PRACTICEFIRST(cls): - return cls("practicefirst") -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - 'format': typing.Union[FormatSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -request_path_format = api_client.PathParameter( - name="format", - style=api_client.ParameterStyle.SIMPLE, - schema=FormatSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = TaskExportOptions - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Task - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '402': _response_for_402, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_export_task_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_export_task_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_export_task_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_export_task_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_export_task_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new score export task - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - request_path_format, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateExportTask(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_export_task( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_export_task( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_export_task( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_export_task( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_export_task( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_export_task_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_export_task_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi b/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi deleted file mode 100644 index eedc116..0000000 --- a/flat_api/paths/scores_score_revisions_revision_format_task/post.pyi +++ /dev/null @@ -1,566 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.task_export_options import TaskExportOptions -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RevisionSchema = schemas.StrSchema - - -class FormatSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def MP3(cls): - return cls("mp3") - - @schemas.classproperty - def WAV(cls): - return cls("wav") - - @schemas.classproperty - def PRACTICEFIRST(cls): - return cls("practicefirst") -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'revision': typing.Union[RevisionSchema, str, ], - 'format': typing.Union[FormatSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_revision = api_client.PathParameter( - name="revision", - style=api_client.ParameterStyle.SIMPLE, - schema=RevisionSchema, - required=True, -) -request_path_format = api_client.PathParameter( - name="format", - style=api_client.ParameterStyle.SIMPLE, - schema=FormatSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = TaskExportOptions - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = Task - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor402ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor402(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor402ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_402 = api_client.OpenApiResponse( - response_cls=ApiResponseFor402, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor402ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_export_task_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_export_task_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_export_task_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_export_task_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_export_task_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create a new score export task - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_revision, - request_path_format, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateExportTask(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_export_task( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_export_task( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_export_task( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_export_task( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_export_task( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_export_task_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_export_task_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_submissions/__init__.py b/flat_api/paths/scores_score_submissions/__init__.py deleted file mode 100644 index aa347bf..0000000 --- a/flat_api/paths/scores_score_submissions/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_submissions import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_SUBMISSIONS \ No newline at end of file diff --git a/flat_api/paths/scores_score_submissions/get.py b/flat_api/paths/scores_score_submissions/get.py deleted file mode 100644 index 7734a63..0000000 --- a/flat_api/paths/scores_score_submissions/get.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List submissions related to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_submissions/get.pyi b/flat_api/paths/scores_score_submissions/get.pyi deleted file mode 100644 index 9129673..0000000 --- a/flat_api/paths/scores_score_submissions/get.pyi +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['AssignmentSubmission']: - return AssignmentSubmission - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['AssignmentSubmission'], typing.List['AssignmentSubmission']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'AssignmentSubmission': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_submissions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_submissions_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List submissions related to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreSubmissions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_submissions( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_submissions( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_submissions_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks/__init__.py b/flat_api/paths/scores_score_tracks/__init__.py deleted file mode 100644 index c230f3b..0000000 --- a/flat_api/paths/scores_score_tracks/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_tracks import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_TRACKS \ No newline at end of file diff --git a/flat_api/paths/scores_score_tracks/get.py b/flat_api/paths/scores_score_tracks/get.py deleted file mode 100644 index c4cc5ab..0000000 --- a/flat_api/paths/scores_score_tracks/get.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -ListAutoTrackSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'listAutoTrack': typing.Union[ListAutoTrackSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_assignment = api_client.QueryParameter( - name="assignment", - style=api_client.ParameterStyle.FORM, - schema=AssignmentSchema, - explode=True, -) -request_query_list_auto_track = api_client.QueryParameter( - name="listAutoTrack", - style=api_client.ParameterStyle.FORM, - schema=ListAutoTrackSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrack']: - return ScoreTrack - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrack'], typing.List['ScoreTrack']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreTrack': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_score_tracks_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the audio or video tracks linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_assignment, - request_query_list_auto_track, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListScoreTracks(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_score_tracks( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_score_tracks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_score_tracks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks/get.pyi b/flat_api/paths/scores_score_tracks/get.pyi deleted file mode 100644 index c8cee34..0000000 --- a/flat_api/paths/scores_score_tracks/get.pyi +++ /dev/null @@ -1,454 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -AssignmentSchema = schemas.StrSchema -ListAutoTrackSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - 'assignment': typing.Union[AssignmentSchema, str, ], - 'listAutoTrack': typing.Union[ListAutoTrackSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -request_query_assignment = api_client.QueryParameter( - name="assignment", - style=api_client.ParameterStyle.FORM, - schema=AssignmentSchema, - explode=True, -) -request_query_list_auto_track = api_client.QueryParameter( - name="listAutoTrack", - style=api_client.ParameterStyle.FORM, - schema=ListAutoTrackSchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreTrack']: - return ScoreTrack - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreTrack'], typing.List['ScoreTrack']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreTrack': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_score_tracks_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_score_tracks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List the audio or video tracks linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - request_query_assignment, - request_query_list_auto_track, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListScoreTracks(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_score_tracks( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_score_tracks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_score_tracks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_score_tracks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks/post.py b/flat_api/paths/scores_score_tracks/post.py deleted file mode 100644 index 60a2f21..0000000 --- a/flat_api/paths/scores_score_tracks/post.py +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_creation import ScoreTrackCreation - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreTrackCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new video or audio track to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks/post.pyi b/flat_api/paths/scores_score_tracks/post.pyi deleted file mode 100644 index 7bdda68..0000000 --- a/flat_api/paths/scores_score_tracks/post.pyi +++ /dev/null @@ -1,458 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_creation import ScoreTrackCreation - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreTrackCreation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new video or audio track to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/__init__.py b/flat_api/paths/scores_score_tracks_track/__init__.py deleted file mode 100644 index 13dbb87..0000000 --- a/flat_api/paths/scores_score_tracks_track/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_tracks_track import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_TRACKS_TRACK \ No newline at end of file diff --git a/flat_api/paths/scores_score_tracks_track/delete.py b/flat_api/paths/scores_score_tracks_track/delete.py deleted file mode 100644 index 8873760..0000000 --- a/flat_api/paths/scores_score_tracks_track/delete.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_track_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an audio or video track linked to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_track( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_track_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_track_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/delete.pyi b/flat_api/paths/scores_score_tracks_track/delete.pyi deleted file mode 100644 index 147822f..0000000 --- a/flat_api/paths/scores_score_tracks_track/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_score_track_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_score_track_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Remove an audio or video track linked to the score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_score_track( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_score_track( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_track_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_score_track_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/get.py b/flat_api/paths/scores_score_tracks_track/get.py deleted file mode 100644 index 3454cbe..0000000 --- a/flat_api/paths/scores_score_tracks_track/get.py +++ /dev/null @@ -1,431 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_track_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Retrieve the details of an audio or video track linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_track( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_track_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_track_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/get.pyi b/flat_api/paths/scores_score_tracks_track/get.pyi deleted file mode 100644 index 404ddf9..0000000 --- a/flat_api/paths/scores_score_tracks_track/get.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -SharingKeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'sharingKey': typing.Union[SharingKeySchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_sharing_key = api_client.QueryParameter( - name="sharingKey", - style=api_client.ParameterStyle.FORM, - schema=SharingKeySchema, - explode=True, -) -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_score_track_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_score_track_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Retrieve the details of an audio or video track linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_sharing_key, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_score_track( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_score_track( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_track_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_score_track_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/put.py b/flat_api/paths/scores_score_tracks_track/put.py deleted file mode 100644 index c9a83d0..0000000 --- a/flat_api/paths/scores_score_tracks_track/put.py +++ /dev/null @@ -1,478 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_update import ScoreTrackUpdate - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreTrackUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an audio or video track linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_tracks_track/put.pyi b/flat_api/paths/scores_score_tracks_track/put.pyi deleted file mode 100644 index d740425..0000000 --- a/flat_api/paths/scores_score_tracks_track/put.pyi +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_update import ScoreTrackUpdate - -# Path params -ScoreSchema = schemas.StrSchema -TrackSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - 'track': typing.Union[TrackSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -request_path_track = api_client.PathParameter( - name="track", - style=api_client.ParameterStyle.SIMPLE, - schema=TrackSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ScoreTrackUpdate - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ScoreTrack - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_score_track_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an audio or video track linked to a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - request_path_track, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateScoreTrack(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_score_track( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_score_track_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_untrash/__init__.py b/flat_api/paths/scores_score_untrash/__init__.py deleted file mode 100644 index 22f1094..0000000 --- a/flat_api/paths/scores_score_untrash/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.scores_score_untrash import Api - -from flat_api.paths import PathValues - -path = PathValues.SCORES_SCORE_UNTRASH \ No newline at end of file diff --git a/flat_api/paths/scores_score_untrash/post.py b/flat_api/paths/scores_score_untrash/post.py deleted file mode 100644 index 3cc1c86..0000000 --- a/flat_api/paths/scores_score_untrash/post.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _untrash_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Untrash a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UntrashScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def untrash_score( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_score_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_score_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/scores_score_untrash/post.pyi b/flat_api/paths/scores_score_untrash/post.pyi deleted file mode 100644 index 4847063..0000000 --- a/flat_api/paths/scores_score_untrash/post.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -ScoreSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'score': typing.Union[ScoreSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_score = api_client.PathParameter( - name="score", - style=api_client.ParameterStyle.SIMPLE, - schema=ScoreSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor403ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _untrash_score_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _untrash_score_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Untrash a score - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_score, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UntrashScore(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def untrash_score( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def untrash_score( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_score_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._untrash_score_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/tasks_task/__init__.py b/flat_api/paths/tasks_task/__init__.py deleted file mode 100644 index 2e6f8e8..0000000 --- a/flat_api/paths/tasks_task/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.tasks_task import Api - -from flat_api.paths import PathValues - -path = PathValues.TASKS_TASK \ No newline at end of file diff --git a/flat_api/paths/tasks_task/get.py b/flat_api/paths/tasks_task/get.py deleted file mode 100644 index 1c6b2d9..0000000 --- a/flat_api/paths/tasks_task/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task - -from . import path - -# Path params -TaskSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'task': typing.Union[TaskSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_task = api_client.PathParameter( - name="task", - style=api_client.ParameterStyle.SIMPLE, - schema=TaskSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = Task - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_task_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a task details - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_task, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetTask(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_task( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_task_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_task_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/tasks_task/get.pyi b/flat_api/paths/tasks_task/get.pyi deleted file mode 100644 index 5de5c96..0000000 --- a/flat_api/paths/tasks_task/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task - -# Path params -TaskSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'task': typing.Union[TaskSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_task = api_client.PathParameter( - name="task", - style=api_client.ParameterStyle.SIMPLE, - schema=TaskSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Task - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_task_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_task_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a task details - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_task, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetTask(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_task( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_task( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_task_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_task_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user/__init__.py b/flat_api/paths/users_user/__init__.py deleted file mode 100644 index d8f63de..0000000 --- a/flat_api/paths/users_user/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.users_user import Api - -from flat_api.paths import PathValues - -path = PathValues.USERS_USER \ No newline at end of file diff --git a/flat_api/paths/users_user/get.py b/flat_api/paths/users_user/get.py deleted file mode 100644 index 30bb270..0000000 --- a/flat_api/paths/users_user/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] -SchemaFor200ResponseBodyApplicationJson = UserPublic - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a public user profile - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user/get.pyi b/flat_api/paths/users_user/get.pyi deleted file mode 100644 index a925d5c..0000000 --- a/flat_api/paths/users_user/get.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse - -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = UserPublic - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get a public user profile - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user_likes/__init__.py b/flat_api/paths/users_user_likes/__init__.py deleted file mode 100644 index e7f02aa..0000000 --- a/flat_api/paths/users_user_likes/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.users_user_likes import Api - -from flat_api.paths import PathValues - -path = PathValues.USERS_USER_LIKES \ No newline at end of file diff --git a/flat_api/paths/users_user_likes/get.py b/flat_api/paths/users_user_likes/get.py deleted file mode 100644 index 94e3c29..0000000 --- a/flat_api/paths/users_user_likes/get.py +++ /dev/null @@ -1,407 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -IdsSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'ids': typing.Union[IdsSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_ids = api_client.QueryParameter( - name="ids", - style=api_client.ParameterStyle.FORM, - schema=IdsSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _ger_user_likes_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List liked scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_ids, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GerUserLikes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def ger_user_likes( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ger_user_likes_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ger_user_likes_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user_likes/get.pyi b/flat_api/paths/users_user_likes/get.pyi deleted file mode 100644 index 5e1b23b..0000000 --- a/flat_api/paths/users_user_likes/get.pyi +++ /dev/null @@ -1,398 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -IdsSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'ids': typing.Union[IdsSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_ids = api_client.QueryParameter( - name="ids", - style=api_client.ParameterStyle.FORM, - schema=IdsSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _ger_user_likes_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ger_user_likes_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List liked scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_ids, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GerUserLikes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def ger_user_likes( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ger_user_likes( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ger_user_likes_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ger_user_likes_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user_scores/__init__.py b/flat_api/paths/users_user_scores/__init__.py deleted file mode 100644 index 0cda8cf..0000000 --- a/flat_api/paths/users_user_scores/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from flat_api.paths.users_user_scores import Api - -from flat_api.paths import PathValues - -path = PathValues.USERS_USER_SCORES \ No newline at end of file diff --git a/flat_api/paths/users_user_scores/get.py b/flat_api/paths/users_user_scores/get.py deleted file mode 100644 index 0206fb3..0000000 --- a/flat_api/paths/users_user_scores/get.py +++ /dev/null @@ -1,407 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -from . import path - -# Query params -ParentSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) -_auth = [ - 'OAuth2', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List user's scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUserScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/paths/users_user_scores/get.pyi b/flat_api/paths/users_user_scores/get.pyi deleted file mode 100644 index bafcad6..0000000 --- a/flat_api/paths/users_user_scores/get.pyi +++ /dev/null @@ -1,398 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from flat_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from flat_api import schemas # noqa: F401 - -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse - -# Query params -ParentSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'parent': typing.Union[ParentSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_parent = api_client.QueryParameter( - name="parent", - style=api_client.ParameterStyle.FORM, - schema=ParentSchema, - explode=True, -) -# Path params -UserSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'user': typing.Union[UserSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user = api_client.PathParameter( - name="user", - style=api_client.ParameterStyle.SIMPLE, - schema=UserSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ScoreDetails']: - return ScoreDetails - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ScoreDetails'], typing.List['ScoreDetails']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ScoreDetails': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = FlatErrorResponse - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_scores_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_scores_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - List user's scores - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_parent, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUserScores(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user_scores( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user_scores( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_scores_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/flat_api/rest.py b/flat_api/rest.py index af5a8d6..67ed4c9 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,21 +8,41 @@ Generated by: https://openapi-generator.tech """ + +import io +import json import logging +import re import ssl from urllib.parse import urlencode -import typing - -import certifi +from urllib.parse import urlparse +from urllib.request import proxy_bypass_environment import urllib3 -from urllib3._collections import HTTPHeaderDict +import ipaddress -from flat_api.exceptions import ApiException, ApiValueError +from flat_api.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + class RESTClientObject(object): def __init__(self, configuration, pools_size=4, maxsize=None): @@ -40,13 +58,6 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - addition_pool_args = {} if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 @@ -54,9 +65,6 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if configuration.retries is not None: addition_pool_args['retries'] = configuration.retries - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - if configuration.socket_options is not None: addition_pool_args['socket_options'] = configuration.socket_options @@ -67,12 +75,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy: + if configuration.proxy and not should_bypass_proxies( + configuration.host, no_proxy=configuration.no_proxy or ''): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, @@ -84,76 +93,79 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, **addition_pool_args ) - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url + :param query_params: query parameters in the url :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] - if fields and body: + if post_params and body: raise ApiValueError( - "body parameter cannot be used with fields parameter." + "body parameter cannot be used with post_params parameter." ) - fields = fields or {} + post_params = post_params or {} headers = headers or {} - if timeout: - if isinstance(timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' + if query_params: + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', + headers['Content-Type'], re.IGNORECASE)): + request_body = None + if body is not None: + request_body = json.dumps(body) r = self.pool_manager.request( - method, - url, - preload_content=not stream, + method, url, + body=request_body, + preload_content=_preload_content, timeout=timeout, - headers=headers - ) + headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, - body=body, - fields=fields, + fields=post_params, encode_multipart=False, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': @@ -163,9 +175,9 @@ def request( del headers['Content-Type'] r = self.pool_manager.request( method, url, - fields=fields, + fields=post_params, encode_multipart=True, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support @@ -176,7 +188,7 @@ def request( r = self.pool_manager.request( method, url, body=request_body, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) else: @@ -188,71 +200,154 @@ def request( # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, - preload_content=not stream, + fields=query_params, + preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) - if not stream: + if _preload_content: + r = RESTResponse(r) + # log response body logger.debug("response body: %s", r.data) + if not 200 <= r.status <= 299: + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + return r - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("GET", url, headers=headers, - stream=stream, - timeout=timeout, - fields=fields) + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("HEAD", url, headers=headers, - stream=stream, - timeout=timeout, - fields=fields) + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("OPTIONS", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): return self.request("DELETE", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("POST", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PUT", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PATCH", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + +# end of class RESTClientObject + + +def is_ipv4(target): + """ Test if IPv4 address or not + """ + try: + chk = ipaddress.IPv4Address(target) + return True + except ipaddress.AddressValueError: + return False + + +def in_ipv4net(target, net): + """ Test if target belongs to given IPv4 network + """ + try: + nw = ipaddress.IPv4Network(net) + ip = ipaddress.IPv4Address(target) + if ip in nw: + return True + return False + except ipaddress.AddressValueError: + return False + except ipaddress.NetmaskValueError: + return False + + +def should_bypass_proxies(url, no_proxy=None): + """ Yet another requests.should_bypass_proxies + Test if proxies should not be used for a particular url. + """ + + parsed = urlparse(url) + + # special cases + if parsed.hostname in [None, '']: + return True + + # special cases + if no_proxy in [None, '']: + return False + if no_proxy == '*': + return True + + no_proxy = no_proxy.lower().replace(' ', ''); + entries = ( + host for host in no_proxy.split(',') if host + ) + + if is_ipv4(parsed.hostname): + for item in entries: + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) diff --git a/flat_api/schemas.py b/flat_api/schemas.py deleted file mode 100644 index 4d7a32d..0000000 --- a/flat_api/schemas.py +++ /dev/null @@ -1,2476 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools -import decimal -import io -import re -import types -import typing -import uuid - -from dateutil.parser.isoparser import isoparser, _takes_ascii -import frozendict - -from flat_api.exceptions import ( - ApiTypeError, - ApiValueError, -) -from flat_api.configuration import ( - Configuration, -) - - -class Unset(object): - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset = Unset() - -none_type = type(None) -file_type = io.IOBase - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(_arg, (io.FileIO, io.BufferedReader)): - if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') - _arg.close() - inst = super(FileIO, cls).__new__(cls, _arg.name) - super(FileIO, inst).__init__(_arg.name) - return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') - - def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): - pass - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is defaultdict(set) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k] = d[k] | v - - -class ValidationMetadata(frozendict.frozendict): - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - def __new__( - cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), - from_server: bool = False, - configuration: typing.Optional[Configuration] = None, - seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() - ): - """ - Args: - path_to_item: the path to the current data being instantiated. - For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) - This changes from location to location - from_server: whether or not this data came form the server - True when receiving server data - False when instantiating model with client side data not form the server - This does not change from location to location - configuration: the Configuration instance to use - This is needed because in Configuration: - - one can disable validation checking - This does not change from location to location - seen_classes: when deserializing data that matches multiple schemas, this is used to store - the schemas that have been traversed. This is used to stop processing when a cycle is seen. - This changes from location to location - validated_path_to_schemas: stores the already validated schema classes for a given path location - This does not change from location to location - """ - return super().__new__( - cls, - path_to_item=path_to_item, - from_server=from_server, - configuration=configuration, - seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas - ) - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) - validation_ran_earlier = validated_schemas and cls in validated_schemas - if validation_ran_earlier: - return True - if cls in self.seen_classes: - return True - return False - - @property - def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') - - @property - def from_server(self) -> bool: - return self.get('from_server') - - @property - def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') - - @property - def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') - - @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -class Singleton: - """ - Enums and singletons are the same - The same instance is returned for a given key of (cls, _arg) - """ - _instances = {} - - def __new__(cls, _arg: typing.Any, **kwargs): - """ - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, _arg, str(_arg)) - if key not in cls._instances: - if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): - inst = super().__new__(cls) - cls._instances[key] = inst - else: - cls._instances[key] = super().__new__(cls, _arg) - return cls._instances[key] - - def __repr__(self): - if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' - elif isinstance(self, BoolClass): - if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' - - -class classproperty: - - def __init__(self, fget): - self.fget = fget - - def __get__(self, owner_self, owner_cls): - return self.fget(owner_cls) - - -class NoneClass(Singleton): - @classproperty - def NONE(cls): - return cls(None) - - def __bool__(self) -> bool: - return False - - -class BoolClass(Singleton): - @classproperty - def TRUE(cls): - return cls(True) - - @classproperty - def FALSE(cls): - return cls(False) - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -class MetaOapgTyped: - exclusive_maximum: typing.Union[int, float] - inclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - max_items: int - min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - - - class properties: - # to hold object properties - pass - - additional_properties: typing.Optional[typing.Type['Schema']] - max_properties: int - min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] - max_length: int - min_length: int - items: typing.Type['Schema'] - - -class Schema: - """ - the base class of all swagger/openapi schemas/models - """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} - _types: typing.Set[typing.Type] - MetaOapg = MetaOapgTyped - - @staticmethod - def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: - if isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - return item_cls - - @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - @classmethod - def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): - error_msg = cls.__type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - Schema _validate_oapg - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - - Returns: - path_to_schemas: a map of path to schemas - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - base_class = type(arg) - if base_class not in cls._types: - raise cls.__get_type_error( - arg, - validation_metadata.path_to_item, - cls._types, - key_type=False, - ) - - path_to_schemas = {validation_metadata.path_to_item: set()} - path_to_schemas[validation_metadata.path_to_item].add(cls) - path_to_schemas[validation_metadata.path_to_item].add(base_class) - return path_to_schemas - - @staticmethod - def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] - ): - """ - Processes and mutates schema_classes - If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included - """ - if len(schema_classes) < 2: - return - if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: - schema_classes.remove(UnsetAnyTypeSchema) - x_schema = schema_type_classes & schema_classes - if not x_schema: - return - x_schema = x_schema.pop() - if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): - # needed to not have a mro error in get_new_class - schema_classes.remove(x_schema) - - @classmethod - def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: - """ - Make a new dynamic class and return an instance of that class - We are making an instance of cls, but instead of making cls - make a new class, new_cls - which includes dynamic bases including cls - return an instance of that new class - - Dict property + List Item Assignment Use cases: - 1. value is NOT an instance of the required schema class - the value is validated by _validate_oapg - _validate_oapg returns a key value pair - where the key is the path to the item, and the value will be the required manufactured class - made out of the matching schemas - 2. value is an instance of the correct schema type - the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type - for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas - and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned - because value is of the correct type, and validation was run earlier when the instance was created - """ - _path_to_schemas = {} - if validation_metadata.validation_ran_earlier(cls): - add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas = {} - for path, schema_classes in _path_to_schemas.items(): - """ - Use cases - 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - needs Singleton added - 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass - Singleton already added - 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - """ - cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) - inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) - chosen_schema_classes = schema_classes - inheritable_primitive_type - suffix = tuple(inheritable_primitive_type) - if enum_schema and suffix[0] not in {NoneClass, BoolClass}: - suffix = (Singleton,) + suffix - - used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) - path_to_schemas[path] = mfg_cls - - return path_to_schemas - - @classmethod - def _get_new_instance_without_conversion_oapg( - cls, - arg: typing.Any, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - # We have a Dynamic class and we are making an instance of it - if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): - properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, properties) - elif issubclass(cls, tuple) and issubclass(cls, ListBase): - items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, items) - """ - str = openapi str, date, and datetime - decimal.Decimal = openapi int and float - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return super(Schema, cls).__new__(cls, arg) - - @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Union[ - str, - date, - datetime, - int, - float, - decimal.Decimal, - bool, - None, - 'Schema', - dict, - frozendict.frozendict, - tuple, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - _configuration: typing.Optional[Configuration] - ): - """ - Schema from_openapi_data_oapg - """ - from_server = True - validated_path_to_schemas = {} - arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) - validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) - path_to_schemas = cls.__get_new_cls(arg, validation_metadata) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - - @staticmethod - def __remove_unsets(kwargs): - return {key: val for key, val in kwargs.items() if val is not unset} - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): - """ - Schema __new__ - - Args: - _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - _configuration: contains the Configuration that enables json schema validation keywords - like minItems, minLength etc - - Note: double underscores are used here because pycharm thinks that these variables - are instance properties if they are named normally :( - """ - __kwargs = cls.__remove_unsets(kwargs) - if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and _args and not isinstance(_args[0], dict): - __arg = _args[0] - else: - __arg = cls.__get_input_dict(*_args, **__kwargs) - __from_server = False - __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) - __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) - __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) - __new_cls = __path_to_schemas[__validation_metadata.path_to_item] - return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas - ) - - def __init__( - self, - *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] - ): - """ - this is needed to fix 'Unexpected argument' warning in pycharm - this code does nothing because all Schema instances are immutable - this means that all input data is passed into and used in new, and after the new instance is made - no new attributes are assigned and init is not used - """ - pass - -""" -import itertools -data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') -type_to_cls = { - 'None': 'NoneClass', - 'FrozenDict': 'frozendict.frozendict', - 'Tuple': 'tuple', - 'Str': 'str', - 'Decimal': 'decimal.Decimal', - 'Bool': 'BoolClass' -} -cls_tuples = [v for v in itertools.combinations(data_types, 5)] -typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] -for cls in typed_classes: - print(cls) -object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] -for cls in object_classes: - print(cls) -""" -if typing.TYPE_CHECKING: - # qty 1 - NoneMixin = NoneClass - FrozenDictMixin = frozendict.frozendict - TupleMixin = tuple - StrMixin = str - DecimalMixin = decimal.Decimal - BoolMixin = BoolClass - BytesMixin = bytes - FileMixin = FileIO - # qty 2 - class BinaryMixin(bytes, FileIO): - pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): - pass - class NoneTupleMixin(NoneClass, tuple): - pass - class NoneStrMixin(NoneClass, str): - pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): - pass - class NoneBoolMixin(NoneClass, BoolClass): - pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): - pass - class FrozenDictStrMixin(frozendict.frozendict, str): - pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): - pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): - pass - class TupleStrMixin(tuple, str): - pass - class TupleDecimalMixin(tuple, decimal.Decimal): - pass - class TupleBoolMixin(tuple, BoolClass): - pass - class StrDecimalMixin(str, decimal.Decimal): - pass - class StrBoolMixin(str, BoolClass): - pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): - pass - # qty 3 - class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): - pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): - pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): - pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): - pass - class NoneTupleStrMixin(NoneClass, tuple, str): - pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): - pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): - pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): - pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): - pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): - pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): - pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): - pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): - pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): - pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): - pass - class TupleStrBoolMixin(tuple, str, BoolClass): - pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): - pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): - pass - # qty 4 - class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): - pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): - pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): - pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): - pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): - pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): - pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): - pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): - pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): - pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): - pass - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): - pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): - pass -else: - # qty 1 - class NoneMixin: - _types = {NoneClass} - class FrozenDictMixin: - _types = {frozendict.frozendict} - class TupleMixin: - _types = {tuple} - class StrMixin: - _types = {str} - class DecimalMixin: - _types = {decimal.Decimal} - class BoolMixin: - _types = {BoolClass} - class BytesMixin: - _types = {bytes} - class FileMixin: - _types = {FileIO} - # qty 2 - class BinaryMixin: - _types = {bytes, FileIO} - class NoneFrozenDictMixin: - _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: - _types = {NoneClass, tuple} - class NoneStrMixin: - _types = {NoneClass, str} - class NoneDecimalMixin: - _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: - _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: - _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: - _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: - _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: - _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: - _types = {tuple, str} - class TupleDecimalMixin: - _types = {tuple, decimal.Decimal} - class TupleBoolMixin: - _types = {tuple, BoolClass} - class StrDecimalMixin: - _types = {str, decimal.Decimal} - class StrBoolMixin: - _types = {str, BoolClass} - class DecimalBoolMixin: - _types = {decimal.Decimal, BoolClass} - # qty 3 - class NoneFrozenDictTupleMixin: - _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: - _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: - _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: - _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: - _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: - _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: - _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: - _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: - _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: - _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: - _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: - _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: - _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: - _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: - _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: - _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: - _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: - _types = {str, decimal.Decimal, BoolClass} - # qty 4 - class NoneFrozenDictTupleStrMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: - _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: - _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: - _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: - _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: - _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: - _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: - _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: - _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} - - -class ValidatorBase: - @staticmethod - def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - Note: the suffix _oapg stands for openapi python (experimental) generator and - it has been added to prevent collisions with other methods and properties - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - @staticmethod - def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class EnumBase: - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - EnumBase _validate_oapg - Validates that arg is in the enum's allowed values - """ - try: - cls.MetaOapg.enum_value_to_name[arg] - except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class BoolBase: - def is_true_oapg(self) -> bool: - """ - A replacement for x is True - True if the instance is a BoolClass True Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) - - def is_false_oapg(self) -> bool: - """ - A replacement for x is False - True if the instance is a BoolClass False Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) is False - - -class NoneBase: - def is_none_oapg(self) -> bool: - """ - A replacement for x is None - True if the instance is a NoneClass None Singleton - """ - if issubclass(self.__class__, NoneClass): - return True - return False - - -class StrBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_str_oapg(self) -> str: - return self - - @property - def as_date_oapg(self) -> date: - raise Exception('not implemented') - - @property - def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') - - @property - def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') - - @property - def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') - - @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): - for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - StrBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, str): - cls.__check_str_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class UUIDBase: - @property - @functools.lru_cache() - def as_uuid_oapg(self) -> uuid.UUID: - return uuid.UUID(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - uuid.UUID(arg) - return True - except ValueError: - raise ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - UUIDBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class CustomIsoparser(isoparser): - - @_takes_ascii - def parse_isodatetime(self, dt_str): - components, pos = self._parse_isodate(dt_str) - if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) - else: - raise ValueError('String contains unknown ISO components') - - if len(components) > 3 and components[3] == 24: - components[3] = 0 - return datetime(*components) + timedelta(days=1) - - if len(components) <= 3: - raise ValueError('Value is not a datetime') - - return datetime(*components) - - @_takes_ascii - def parse_isodate(self, datestr): - components, pos = self._parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return date(*components) - - -DEFAULT_ISOPARSER = CustomIsoparser() - - -class DateBase: - @property - @functools.lru_cache() - def as_date_oapg(self) -> date: - return DEFAULT_ISOPARSER.parse_isodate(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodate(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - DateBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DateTimeBase: - @property - @functools.lru_cache() - def as_datetime_oapg(self) -> datetime: - return DEFAULT_ISOPARSER.parse_isodatetime(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodatetime(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DateTimeBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DecimalBase: - """ - A class for storing decimals that are sent over the wire as strings - These schemas must remain based on StrBase rather than NumberBase - because picking base classes must be deterministic - """ - - @property - @functools.lru_cache() - def as_decimal_oapg(self) -> decimal.Decimal: - return decimal.Decimal(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - decimal.Decimal(arg) - return True - except decimal.InvalidOperation: - raise ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DecimalBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class NumberBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - """ - Note: for some numbers like 9.0 they could be represented as an - integer but our code chooses to store them as - >>> Decimal('9.0').as_tuple() - DecimalTuple(sign=0, digits=(9, 0), exponent=-1) - so we can tell that the value came from a float and convert it back to a float - during later serialization - """ - if self.as_tuple().exponent < 0: - # this could be represented as an integer but should be represented as a float - # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') - self._as_int = int(self) - return self._as_int - - @property - def as_float_oapg(self) -> float: - try: - return self._as_float - except AttributeError: - if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') - self._as_float = float(self) - return self._as_float - - @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): - multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item - ) - - checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', - } - ) - if not checking_max_or_min_values: - return - - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - NumberBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, decimal.Decimal): - cls.__check_numeric_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class ListBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @classmethod - def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for items are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - list_items: the input list of items - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - - # if we have definitions for an items schema, use it - # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) - item_cls = cls._get_class_oapg(item_cls) - path_to_schemas = {} - for i, value in enumerate(list_items): - item_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): - unique_items = set(arg) - if len(arg) > len(unique_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - ListBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, tuple): - cls.__check_tuple_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, tuple): - return _path_to_schemas - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_items_oapg( - cls: 'Schema', - arg: typing.List[typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - ''' - ListBase _get_items_oapg - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return cast_items - - -class Discriminable: - MetaOapg: MetaOapgTyped - - @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): - if not args or args and disc_property_name not in args[0]: - # The input data does not contain the discriminator property - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - @classmethod - def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - if not hasattr(cls.MetaOapg, 'discriminator'): - return None - disc = cls.MetaOapg.discriminator() - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not hasattr(cls, 'MetaOapg'): - return None - elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): - for allof_cls in cls.MetaOapg.all_of(): - discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): - for oneof_cls in cls.MetaOapg.one_of(): - discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): - for anyof_cls in cls.MetaOapg.any_of(): - discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -class DictBase(Discriminable, ValidatorBase): - - @classmethod - def __validate_arg_presence(cls, arg): - """ - Ensures that: - - all required arguments are passed in - - the input variable names are valid - - present in properties or - - accepted because additionalProperties exists - Exceptions will be raised if: - - invalid arguments were passed in - - a var_name is invalid if additional_properties == NotAnyTypeSchema - and var_name not in properties.__annotations__ - - required properties were not passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - seen_required_properties = set() - invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name in arg: - if property_name in required_property_names: - seen_required_properties.add(property_name) - elif property_name in property_annotations: - continue - elif additional_properties is not NotAnyTypeSchema: - continue - else: - invalid_arguments.append(property_name) - missing_required_arguments = list(required_property_names - seen_required_properties) - if missing_required_arguments: - missing_required_arguments.sort() - raise ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - if invalid_arguments: - invalid_arguments.sort() - raise ApiTypeError( - "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments - ) - ) - - @classmethod - def __validate_args(cls, arg, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for properties are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) - if property_name in property_annotations: - schema = property_annotations[property_name] - elif additional_properties is not NotAnyTypeSchema: - if additional_properties is UnsetAnyTypeSchema: - """ - If additionalProperties is unset and this path_to_item does not yet have - any validations on it, validate it. - If it already has validations on it, skip this validation. - """ - if path_to_item in path_to_schemas: - continue - schema = additional_properties - else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) - schema = cls._get_class_oapg(schema) - arg_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DictBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, frozendict.frozendict): - cls.__check_dict_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, frozendict.frozendict): - return _path_to_schemas - cls.__validate_arg_presence(arg) - other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - try: - discriminator = cls.MetaOapg.discriminator() - except AttributeError: - return _path_to_schemas - # discriminator exists - disc_prop_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if updated_vm.validation_ran_earlier(discriminated_cls): - add_deeper_validated_schemas(updated_vm, _path_to_schemas) - return _path_to_schemas - other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_properties_oapg( - cls, - arg: typing.Dict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - """ - DictBase _get_properties_oapg, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return dict_items - - def __setattr__(self, name: str, value: typing.Any): - if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') - - def __getattr__(self, name: str): - """ - for instance.name access - Properties are only type hinted for required properties - so that hasattr(instance, 'optionalProp') is False when that key is not present - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - if name not in self.__class__.__annotations__: - raise AttributeError(f"{self} has no attribute '{name}'") - try: - value = self[name] - return value - except KeyError as ex: - raise AttributeError(str(ex)) - - def __getitem__(self, name: str): - """ - dict_instance[name] accessor - key errors thrown - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - return super().__getitem__(name) - - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: - # dict_instance[name] accessor - if not isinstance(self, frozendict.frozendict): - raise NotImplementedError() - try: - return super().__getitem__(name) - except KeyError: - return unset - - -def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), -) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - if isinstance(arg, Schema): - # store the already run validations - schema_classes = set() - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) - validated_path_to_schemas[path_to_item] = schema_classes - - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - return str(arg) - elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) - elif isinstance(arg, (bool, BoolClass)): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - if arg: - return BoolClass.TRUE - return BoolClass.FALSE - elif isinstance(arg, int): - return decimal.Decimal(arg) - elif isinstance(arg, float): - decimal_from_float = decimal.Decimal(arg) - if decimal_from_float.as_integer_ratio()[1] == 1: - # 9.0 -> Decimal('9.0') - # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') - return decimal_from_float - elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) - elif isinstance(arg, (none_type, NoneClass)): - return NoneClass.NONE - elif isinstance(arg, (date, datetime)): - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, decimal.Decimal): - return decimal.Decimal(arg) - elif isinstance(arg, bytes): - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class ComposedBase(Discriminable): - - @classmethod - def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): - path_to_schemas = defaultdict(set) - for allof_cls in cls.MetaOapg.all_of(): - if validation_metadata.validation_ran_earlier(allof_cls): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __get_oneof_class( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata, - ): - oneof_classes = [] - path_to_schemas = defaultdict(set) - for oneof_cls in cls.MetaOapg.one_of(): - if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(oneof_cls) - continue - if validation_metadata.validation_ran_earlier(oneof_cls): - oneof_classes.append(oneof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and oneof_cls is discriminated_cls: - raise ex - continue - oneof_classes.append(oneof_cls) - if not oneof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the oneOf schemas matched the input data.".format(cls) - ) - elif len(oneof_classes) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. Multiple " - "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) - ) - # exactly one class matches - return path_to_schemas - - @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): - anyof_classes = [] - path_to_schemas = defaultdict(set) - for anyof_cls in cls.MetaOapg.any_of(): - if validation_metadata.validation_ran_earlier(anyof_cls): - anyof_classes.append(anyof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and anyof_cls is discriminated_cls: - raise ex - continue - anyof_classes.append(anyof_cls) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - ComposedBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - # validation checking on types, validations, and enums - path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - - # process composed schema - discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): - discriminator = cls.MetaOapg.discriminator() - discriminated_cls = None - if discriminator and arg and isinstance(arg, frozendict.frozendict): - disc_property_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) - # get discriminated_cls by looking at the dict in the current class - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( - arg[disc_property_name], - cls.__name__, - disc_property_name, - list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) - ) - ) - - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): - other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): - other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): - other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): - not_cls = cls.MetaOapg.not_schema - not_cls = cls._get_class_oapg(not_cls) - if not_cls: - other_path_to_schemas = None - not_exception = ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_cls.__name__, - ) - ) - if updated_vm.validation_ran_earlier(not_cls): - raise not_exception - - try: - other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) - except (ApiValueError, ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - - if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): - # TODO use an exception from this package here - add_deeper_validated_schemas(updated_vm, path_to_schemas) - assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] - return path_to_schemas - - -# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase -class ComposedSchema( - ComposedBase, - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolMixin -): - @classmethod - def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): - if not args: - if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) - return super().from_openapi_data_oapg(args[0], _configuration=_configuration) - - -class ListSchema( - ListBase, - Schema, - TupleMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: None, **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class IntBase: - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - self._as_int = int(self) - return self._as_int - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - - denominator = arg.as_integer_ratio()[-1] - if denominator != 1: - raise ApiValueError( - "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - IntBase _validate_oapg - TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class IntSchema(IntBase, NumberSchema): - - @classmethod - def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class Int32Base: - __inclusive_minimum = decimal.Decimal(-2147483648) - __inclusive_maximum = decimal.Decimal(2147483647) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int32Schema( - Int32Base, - IntSchema -): - pass - - -class Int64Base: - __inclusive_minimum = decimal.Decimal(-9223372036854775808) - __inclusive_maximum = decimal.Decimal(9223372036854775807) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int64Schema( - Int64Base, - IntSchema -): - pass - - -class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Float32Schema( - Float32Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - -class Float64Schema( - Float64Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - # todo check format - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class StrSchema( - StrBase, - Schema, - StrMixin -): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class UUIDSchema(UUIDBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateSchema(DateBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateTimeSchema(DateTimeBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DecimalSchema(DecimalBase, StrSchema): - - def __new__(cls, _arg: str, **kwargs: Configuration): - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().__new__(cls, _arg, **kwargs) - - -class BytesSchema( - Schema, - BytesMixin -): - """ - this class will subclass bytes and is immutable - """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class FileSchema( - Schema, - FileMixin -): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class BinaryBase: - pass - - -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): - class MetaOapg: - @staticmethod - def one_of(): - return [ - BytesSchema, - FileSchema, - ] - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, _arg) - - -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, _arg, **kwargs) - - -class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin -): - # Python representation of a schema defined as true or {} - pass - - -class UnsetAnyTypeSchema(AnyTypeSchema): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - - -class NotAnyTypeSchema( - ComposedSchema, -): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - - class MetaOapg: - not_schema = AnyTypeSchema - - def __new__( - cls, - *_args, - _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *_args, **kwargs) - - -schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} - - -@functools.lru_cache() -def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] -) -> typing.Type[Schema]: - """ - Returns a new class that is made with the subclass bases - """ - new_cls: typing.Type[Schema] = type(class_name, bases, {}) - return new_cls - - -LOG_CACHE_USAGE = False - - -def log_cache_usage(cache_fn): - if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ce73ca9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[tool.poetry] +name = "flat_api" +version = "0.9.0" +description = "Flat API" +authors = ["Flat "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/FlatIO/api-client-python" +keywords = ["OpenAPI", "OpenAPI-Generator", "Flat API"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = "^1.10.5, <2" +aenum = ">=3.1.11" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" diff --git a/requirements.txt b/requirements.txt index 3cb6612..96947f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 +python_dateutil >= 2.5.3 setuptools >= 21.0.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 1.26.7 +urllib3 >= 1.25.3 diff --git a/test-requirements.txt b/test-requirements.txt index 2d88b03..bb4f22b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1 @@ -pytest~=4.6.7 # needed for python 3.4 pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/test/test_models/test_class_assignment.py b/test/test_account_api.py similarity index 82% rename from test/test_models/test_class_assignment.py rename to test/test_account_api.py index b6ae17b..ae49575 100644 --- a/test/test_models/test_class_assignment.py +++ b/test/test_account_api.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + import unittest import flat_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api import configuration +from flat_api.api.account_api import AccountApi # noqa: E501 + + +class TestAccountApi(unittest.TestCase): + """AccountApi unit test stubs""" + + def setUp(self): + self.api = AccountApi() # noqa: E501 + + def tearDown(self): + pass + def test_get_authenticated_user(self): + """Test case for get_authenticated_user -class TestClassAssignment(unittest.TestCase): - """ClassAssignment unit test stubs""" - _configuration = configuration.Configuration() + Get current user account # noqa: E501 + """ + pass if __name__ == '__main__': diff --git a/test/test_models/test_api_access_token.py b/test/test_api_access_token.py similarity index 84% rename from test/test_models/test_api_access_token.py rename to test/test_api_access_token.py index 62cf657..44e108c 100644 --- a/test/test_models/test_api_access_token.py +++ b/test/test_api_access_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.app_scopes import AppScopes +globals()['AppScopes'] = AppScopes from flat_api.model.api_access_token import ApiAccessToken -from flat_api import configuration class TestApiAccessToken(unittest.TestCase): """ApiAccessToken unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiAccessToken(self): + """Test ApiAccessToken""" + # FIXME: construct object with mandatory attributes with example values + # model = ApiAccessToken() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_app_scopes.py b/test/test_app_scopes.py similarity index 87% rename from test/test_models/test_app_scopes.py rename to test/test_app_scopes.py index d186875..1fca795 100644 --- a/test/test_models/test_app_scopes.py +++ b/test/test_app_scopes.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.app_scopes import AppScopes -from flat_api import configuration class TestAppScopes(unittest.TestCase): """AppScopes unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAppScopes(self): + """Test AppScopes""" + # FIXME: construct object with mandatory attributes with example values + # model = AppScopes() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment.py b/test/test_assignment.py similarity index 75% rename from test/test_models/test_assignment.py rename to test/test_assignment.py index 4b237ac..105f3e5 100644 --- a/test/test_models/test_assignment.py +++ b/test/test_assignment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment +globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities +globals()['AssignmentType'] = AssignmentType +globals()['MediaAttachment'] = MediaAttachment from flat_api.model.assignment import Assignment -from flat_api import configuration class TestAssignment(unittest.TestCase): """Assignment unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignment(self): + """Test Assignment""" + # FIXME: construct object with mandatory attributes with example values + # model = Assignment() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_copy.py b/test/test_assignment_copy.py similarity index 87% rename from test/test_models/test_assignment_copy.py rename to test/test_assignment_copy.py index 65d6630..44c06d0 100644 --- a/test/test_models/test_assignment_copy.py +++ b/test/test_assignment_copy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_copy import AssignmentCopy -from flat_api import configuration class TestAssignmentCopy(unittest.TestCase): """AssignmentCopy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCopy(self): + """Test AssignmentCopy""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentCopy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_assignment_copy_response.py b/test/test_assignment_copy_response.py new file mode 100644 index 0000000..d9ddfad --- /dev/null +++ b/test/test_assignment_copy_response.py @@ -0,0 +1,42 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment +globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities +globals()['AssignmentType'] = AssignmentType +globals()['MediaAttachment'] = MediaAttachment +from flat_api.model.assignment_copy_response import AssignmentCopyResponse + + +class TestAssignmentCopyResponse(unittest.TestCase): + """AssignmentCopyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCopyResponse(self): + """Test AssignmentCopyResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentCopyResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_copy_response_capabilities.py b/test/test_assignment_copy_response_capabilities.py new file mode 100644 index 0000000..ffec44f --- /dev/null +++ b/test/test_assignment_copy_response_capabilities.py @@ -0,0 +1,38 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +globals()['AssignmentCopyResponseCapabilitiesCanPublishInClassError'] = AssignmentCopyResponseCapabilitiesCanPublishInClassError +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + + +class TestAssignmentCopyResponseCapabilities(unittest.TestCase): + """AssignmentCopyResponseCapabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCopyResponseCapabilities(self): + """Test AssignmentCopyResponseCapabilities""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentCopyResponseCapabilities() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py b/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py new file mode 100644 index 0000000..0c7ff8d --- /dev/null +++ b/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError + + +class TestAssignmentCopyResponseCapabilitiesCanPublishInClassError(unittest.TestCase): + """AssignmentCopyResponseCapabilitiesCanPublishInClassError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentCopyResponseCapabilitiesCanPublishInClassError(self): + """Test AssignmentCopyResponseCapabilitiesCanPublishInClassError""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentCopyResponseCapabilitiesCanPublishInClassError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission.py b/test/test_assignment_submission.py new file mode 100644 index 0000000..f733126 --- /dev/null +++ b/test/test_assignment_submission.py @@ -0,0 +1,44 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_submission_state import AssignmentSubmissionState +from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission +globals()['AssignmentSubmissionState'] = AssignmentSubmissionState +globals()['GoogleClassroomSubmission'] = GoogleClassroomSubmission +globals()['MediaAttachment'] = MediaAttachment +globals()['MicrosoftGraphSubmission'] = MicrosoftGraphSubmission +from flat_api.model.assignment_submission import AssignmentSubmission + + +class TestAssignmentSubmission(unittest.TestCase): + """AssignmentSubmission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmission(self): + """Test AssignmentSubmission""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_assignment_submission_comment.py b/test/test_assignment_submission_comment.py similarity index 86% rename from test/test_models/test_assignment_submission_comment.py rename to test/test_assignment_submission_comment.py index cb33e7c..f530c18 100644 --- a/test/test_models/test_assignment_submission_comment.py +++ b/test/test_assignment_submission_comment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api import configuration class TestAssignmentSubmissionComment(unittest.TestCase): """AssignmentSubmissionComment unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionComment(self): + """Test AssignmentSubmissionComment""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionComment() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_submission_comment_creation.py b/test/test_assignment_submission_comment_creation.py similarity index 85% rename from test/test_models/test_assignment_submission_comment_creation.py rename to test/test_assignment_submission_comment_creation.py index 3c3c414..b43cd49 100644 --- a/test/test_models/test_assignment_submission_comment_creation.py +++ b/test/test_assignment_submission_comment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api import configuration class TestAssignmentSubmissionCommentCreation(unittest.TestCase): """AssignmentSubmissionCommentCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionCommentCreation(self): + """Test AssignmentSubmissionCommentCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionCommentCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_assignment_submission_history.py b/test/test_assignment_submission_history.py new file mode 100644 index 0000000..3b97769 --- /dev/null +++ b/test/test_assignment_submission_history.py @@ -0,0 +1,40 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState +globals()['AssignmentSubmissionHistoryAttachment'] = AssignmentSubmissionHistoryAttachment +globals()['AssignmentSubmissionHistoryState'] = AssignmentSubmissionHistoryState +from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory + + +class TestAssignmentSubmissionHistory(unittest.TestCase): + """AssignmentSubmissionHistory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionHistory(self): + """Test AssignmentSubmissionHistory""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionHistory() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_history_attachment.py b/test/test_assignment_submission_history_attachment.py new file mode 100644 index 0000000..d1d87dc --- /dev/null +++ b/test/test_assignment_submission_history_attachment.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment + + +class TestAssignmentSubmissionHistoryAttachment(unittest.TestCase): + """AssignmentSubmissionHistoryAttachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionHistoryAttachment(self): + """Test AssignmentSubmissionHistoryAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionHistoryAttachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_assignment_submission_history_state.py b/test/test_assignment_submission_history_state.py similarity index 85% rename from test/test_models/test_assignment_submission_history_state.py rename to test/test_assignment_submission_history_state.py index ae3bca5..172331f 100644 --- a/test/test_models/test_assignment_submission_history_state.py +++ b/test/test_assignment_submission_history_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState -from flat_api import configuration class TestAssignmentSubmissionHistoryState(unittest.TestCase): """AssignmentSubmissionHistoryState unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionHistoryState(self): + """Test AssignmentSubmissionHistoryState""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionHistoryState() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_submission_state.py b/test/test_assignment_submission_state.py similarity index 86% rename from test/test_models/test_assignment_submission_state.py rename to test/test_assignment_submission_state.py index 71b8758..f75b1c1 100644 --- a/test/test_models/test_assignment_submission_state.py +++ b/test/test_assignment_submission_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_submission_state import AssignmentSubmissionState -from flat_api import configuration class TestAssignmentSubmissionState(unittest.TestCase): """AssignmentSubmissionState unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionState(self): + """Test AssignmentSubmissionState""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionState() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_submission_update.py b/test/test_assignment_submission_update.py similarity index 76% rename from test/test_models/test_assignment_submission_update.py rename to test/test_assignment_submission_update.py index 20f8804..fc471de 100644 --- a/test/test_models/test_assignment_submission_update.py +++ b/test/test_assignment_submission_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments +from flat_api.model.class_attachment_creation import ClassAttachmentCreation +globals()['AssignmentSubmissionUpdateComments'] = AssignmentSubmissionUpdateComments +globals()['ClassAttachmentCreation'] = ClassAttachmentCreation from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api import configuration class TestAssignmentSubmissionUpdate(unittest.TestCase): """AssignmentSubmissionUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionUpdate(self): + """Test AssignmentSubmissionUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_assignment_submission_update_comments.py b/test/test_assignment_submission_update_comments.py new file mode 100644 index 0000000..d5d280d --- /dev/null +++ b/test/test_assignment_submission_update_comments.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments + + +class TestAssignmentSubmissionUpdateComments(unittest.TestCase): + """AssignmentSubmissionUpdateComments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentSubmissionUpdateComments(self): + """Test AssignmentSubmissionUpdateComments""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentSubmissionUpdateComments() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_assignment_type.py b/test/test_assignment_type.py similarity index 87% rename from test/test_models/test_assignment_type.py rename to test/test_assignment_type.py index dbb3b9d..4502497 100644 --- a/test/test_models/test_assignment_type.py +++ b/test/test_assignment_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.assignment_type import AssignmentType -from flat_api import configuration class TestAssignmentType(unittest.TestCase): """AssignmentType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentType(self): + """Test AssignmentType""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_update.py b/test/test_assignment_update.py similarity index 79% rename from test/test_models/test_assignment_update.py rename to test/test_assignment_update.py index 957c467..68a2b00 100644 --- a/test/test_models/test_assignment_update.py +++ b/test/test_assignment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_attachment_creation import ClassAttachmentCreation +globals()['AssignmentType'] = AssignmentType +globals()['ClassAttachmentCreation'] = ClassAttachmentCreation from flat_api.model.assignment_update import AssignmentUpdate -from flat_api import configuration class TestAssignmentUpdate(unittest.TestCase): """AssignmentUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentUpdate(self): + """Test AssignmentUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = AssignmentUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_class_api.py b/test/test_class_api.py new file mode 100644 index 0000000..d7a7fac --- /dev/null +++ b/test/test_class_api.py @@ -0,0 +1,239 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.class_api import ClassApi # noqa: E501 + + +class TestClassApi(unittest.TestCase): + """ClassApi unit test stubs""" + + def setUp(self): + self.api = ClassApi() # noqa: E501 + + def tearDown(self): + pass + + def test_activate_class(self): + """Test case for activate_class + + Activate the class # noqa: E501 + """ + pass + + def test_add_class_user(self): + """Test case for add_class_user + + Add a user to the class # noqa: E501 + """ + pass + + def test_archive_assignment(self): + """Test case for archive_assignment + + Archive the assignment # noqa: E501 + """ + pass + + def test_archive_class(self): + """Test case for archive_class + + Archive the class # noqa: E501 + """ + pass + + def test_copy_assignment(self): + """Test case for copy_assignment + + Copy an assignment # noqa: E501 + """ + pass + + def test_create_class(self): + """Test case for create_class + + Create a new class # noqa: E501 + """ + pass + + def test_create_class_assignment(self): + """Test case for create_class_assignment + + Assignment creation # noqa: E501 + """ + pass + + def test_create_submission(self): + """Test case for create_submission + + Create or edit a submission # noqa: E501 + """ + pass + + def test_create_test_student_account(self): + """Test case for create_test_student_account + + Create a test student account # noqa: E501 + """ + pass + + def test_delete_class_user(self): + """Test case for delete_class_user + + Remove a user from the class # noqa: E501 + """ + pass + + def test_delete_submission(self): + """Test case for delete_submission + + Reset a submission # noqa: E501 + """ + pass + + def test_delete_submission_comment(self): + """Test case for delete_submission_comment + + Delete a feedback comment to a submission # noqa: E501 + """ + pass + + def test_edit_submission(self): + """Test case for edit_submission + + Edit a submission # noqa: E501 + """ + pass + + def test_enroll_class(self): + """Test case for enroll_class + + Join a class # noqa: E501 + """ + pass + + def test_export_submissions_reviews_as_csv(self): + """Test case for export_submissions_reviews_as_csv + + CSV Grades exports # noqa: E501 + """ + pass + + def test_export_submissions_reviews_as_excel(self): + """Test case for export_submissions_reviews_as_excel + + Excel Grades exports # noqa: E501 + """ + pass + + def test_get_class(self): + """Test case for get_class + + Get the details of a single class # noqa: E501 + """ + pass + + def test_get_score_submissions(self): + """Test case for get_score_submissions + + List submissions related to the score # noqa: E501 + """ + pass + + def test_get_submission(self): + """Test case for get_submission + + Get a student submission # noqa: E501 + """ + pass + + def test_get_submission_comments(self): + """Test case for get_submission_comments + + List the feedback comments of a submission # noqa: E501 + """ + pass + + def test_get_submission_history(self): + """Test case for get_submission_history + + Get the history of the submission # noqa: E501 + """ + pass + + def test_get_submissions(self): + """Test case for get_submissions + + List the students' submissions # noqa: E501 + """ + pass + + def test_list_assignments(self): + """Test case for list_assignments + + Assignments listing # noqa: E501 + """ + pass + + def test_list_class_student_submissions(self): + """Test case for list_class_student_submissions + + List the submissions for a student # noqa: E501 + """ + pass + + def test_list_classes(self): + """Test case for list_classes + + List the classes available for the current user # noqa: E501 + """ + pass + + def test_post_submission_comment(self): + """Test case for post_submission_comment + + Add a feedback comment to a submission # noqa: E501 + """ + pass + + def test_unarchive_assignment(self): + """Test case for unarchive_assignment + + Unarchive the assignment. # noqa: E501 + """ + pass + + def test_unarchive_class(self): + """Test case for unarchive_class + + Unarchive the class # noqa: E501 + """ + pass + + def test_update_class(self): + """Test case for update_class + + Update the class # noqa: E501 + """ + pass + + def test_update_submission_comment(self): + """Test case for update_submission_comment + + Update a feedback comment to a submission # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_assignment.py b/test/test_class_assignment.py new file mode 100644 index 0000000..0e10d38 --- /dev/null +++ b/test/test_class_assignment.py @@ -0,0 +1,54 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.model.assignment_submission import AssignmentSubmission +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.model.class_assignment_lti import ClassAssignmentLti +from flat_api.model.class_assignment_mfc import ClassAssignmentMfc +from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.model.media_attachment import MediaAttachment +from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment +globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities +globals()['AssignmentSubmission'] = AssignmentSubmission +globals()['AssignmentType'] = AssignmentType +globals()['ClassAssignmentCanvas'] = ClassAssignmentCanvas +globals()['ClassAssignmentLti'] = ClassAssignmentLti +globals()['ClassAssignmentMfc'] = ClassAssignmentMfc +globals()['GoogleClassroomCoursework'] = GoogleClassroomCoursework +globals()['MediaAttachment'] = MediaAttachment +globals()['MicrosoftGraphAssignment'] = MicrosoftGraphAssignment +from flat_api.model.class_assignment import ClassAssignment + + +class TestClassAssignment(unittest.TestCase): + """ClassAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignment(self): + """Test ClassAssignment""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_assignment_canvas.py b/test/test_class_assignment_canvas.py new file mode 100644 index 0000000..4c0098c --- /dev/null +++ b/test/test_class_assignment_canvas.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas + + +class TestClassAssignmentCanvas(unittest.TestCase): + """ClassAssignmentCanvas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentCanvas(self): + """Test ClassAssignmentCanvas""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentCanvas() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_assignment_lti.py b/test/test_class_assignment_lti.py new file mode 100644 index 0000000..0b26665 --- /dev/null +++ b/test/test_class_assignment_lti.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_assignment_lti import ClassAssignmentLti + + +class TestClassAssignmentLti(unittest.TestCase): + """ClassAssignmentLti unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentLti(self): + """Test ClassAssignmentLti""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentLti() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_assignment_mfc.py b/test/test_class_assignment_mfc.py new file mode 100644 index 0000000..7eb04f3 --- /dev/null +++ b/test/test_class_assignment_mfc.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_assignment_mfc import ClassAssignmentMfc + + +class TestClassAssignmentMfc(unittest.TestCase): + """ClassAssignmentMfc unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentMfc(self): + """Test ClassAssignmentMfc""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentMfc() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_class_assignment_update.py b/test/test_class_assignment_update.py similarity index 68% rename from test/test_models/test_class_assignment_update.py rename to test/test_class_assignment_update.py index a0ccf95..a3751d0 100644 --- a/test/test_models/test_class_assignment_update.py +++ b/test/test_class_assignment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,36 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.model.class_attachment_creation import ClassAttachmentCreation +globals()['AssignmentType'] = AssignmentType +globals()['ClassAssignmentUpdateGoogleClassroom'] = ClassAssignmentUpdateGoogleClassroom +globals()['ClassAssignmentUpdateMicrosoftGraph'] = ClassAssignmentUpdateMicrosoftGraph +globals()['ClassAttachmentCreation'] = ClassAttachmentCreation from flat_api.model.class_assignment_update import ClassAssignmentUpdate -from flat_api import configuration class TestClassAssignmentUpdate(unittest.TestCase): """ClassAssignmentUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentUpdate(self): + """Test ClassAssignmentUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_class_assignment_update_google_classroom.py b/test/test_class_assignment_update_google_classroom.py new file mode 100644 index 0000000..fff3c13 --- /dev/null +++ b/test/test_class_assignment_update_google_classroom.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom + + +class TestClassAssignmentUpdateGoogleClassroom(unittest.TestCase): + """ClassAssignmentUpdateGoogleClassroom unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentUpdateGoogleClassroom(self): + """Test ClassAssignmentUpdateGoogleClassroom""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentUpdateGoogleClassroom() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_assignment_update_microsoft_graph.py b/test/test_class_assignment_update_microsoft_graph.py new file mode 100644 index 0000000..b3a7d7d --- /dev/null +++ b/test/test_class_assignment_update_microsoft_graph.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph + + +class TestClassAssignmentUpdateMicrosoftGraph(unittest.TestCase): + """ClassAssignmentUpdateMicrosoftGraph unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAssignmentUpdateMicrosoftGraph(self): + """Test ClassAssignmentUpdateMicrosoftGraph""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAssignmentUpdateMicrosoftGraph() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_class_attachment_creation.py b/test/test_class_attachment_creation.py similarity index 82% rename from test/test_models/test_class_attachment_creation.py rename to test/test_class_attachment_creation.py index 68eec23..52fbeba 100644 --- a/test/test_models/test_class_attachment_creation.py +++ b/test/test_class_attachment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode +globals()['MediaScoreSharingMode'] = MediaScoreSharingMode from flat_api.model.class_attachment_creation import ClassAttachmentCreation -from flat_api import configuration class TestClassAttachmentCreation(unittest.TestCase): """ClassAttachmentCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassAttachmentCreation(self): + """Test ClassAttachmentCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassAttachmentCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_class_creation.py b/test/test_class_creation.py similarity index 80% rename from test/test_models/test_class_creation.py rename to test/test_class_creation.py index 1aef906..3851aae 100644 --- a/test/test_models/test_class_creation.py +++ b/test/test_class_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused +globals()['ClassGradeLevel'] = ClassGradeLevel +globals()['EduSkillsFocused'] = EduSkillsFocused from flat_api.model.class_creation import ClassCreation -from flat_api import configuration class TestClassCreation(unittest.TestCase): """ClassCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassCreation(self): + """Test ClassCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_class_details.py b/test/test_class_details.py similarity index 54% rename from test/test_models/test_class_details.py rename to test/test_class_details.py index 47a0d2c..bf98afa 100644 --- a/test/test_models/test_class_details.py +++ b/test/test_class_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,52 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_details_canvas import ClassDetailsCanvas +from flat_api.model.class_details_clever import ClassDetailsClever +from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.model.class_details_issues import ClassDetailsIssues +from flat_api.model.class_details_lti import ClassDetailsLti +from flat_api.model.class_details_mfc import ClassDetailsMfc +from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.class_state import ClassState +from flat_api.model.edu_skills_focused import EduSkillsFocused +from flat_api.model.group_details import GroupDetails +globals()['ClassDetailsCanvas'] = ClassDetailsCanvas +globals()['ClassDetailsClever'] = ClassDetailsClever +globals()['ClassDetailsGoogleClassroom'] = ClassDetailsGoogleClassroom +globals()['ClassDetailsGoogleDrive'] = ClassDetailsGoogleDrive +globals()['ClassDetailsIssues'] = ClassDetailsIssues +globals()['ClassDetailsLti'] = ClassDetailsLti +globals()['ClassDetailsMfc'] = ClassDetailsMfc +globals()['ClassDetailsMicrosoftGraph'] = ClassDetailsMicrosoftGraph +globals()['ClassGradeLevel'] = ClassGradeLevel +globals()['ClassState'] = ClassState +globals()['EduSkillsFocused'] = EduSkillsFocused +globals()['GroupDetails'] = GroupDetails from flat_api.model.class_details import ClassDetails -from flat_api import configuration class TestClassDetails(unittest.TestCase): """ClassDetails unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetails(self): + """Test ClassDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetails() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py new file mode 100644 index 0000000..bbadfbf --- /dev/null +++ b/test/test_class_details_canvas.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_canvas import ClassDetailsCanvas + + +class TestClassDetailsCanvas(unittest.TestCase): + """ClassDetailsCanvas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsCanvas(self): + """Test ClassDetailsCanvas""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsCanvas() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py new file mode 100644 index 0000000..f11a383 --- /dev/null +++ b/test/test_class_details_clever.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_clever import ClassDetailsClever + + +class TestClassDetailsClever(unittest.TestCase): + """ClassDetailsClever unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsClever(self): + """Test ClassDetailsClever""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsClever() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py new file mode 100644 index 0000000..b069fba --- /dev/null +++ b/test/test_class_details_google_classroom.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom + + +class TestClassDetailsGoogleClassroom(unittest.TestCase): + """ClassDetailsGoogleClassroom unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsGoogleClassroom(self): + """Test ClassDetailsGoogleClassroom""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsGoogleClassroom() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py new file mode 100644 index 0000000..65f5f05 --- /dev/null +++ b/test/test_class_details_google_drive.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive + + +class TestClassDetailsGoogleDrive(unittest.TestCase): + """ClassDetailsGoogleDrive unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsGoogleDrive(self): + """Test ClassDetailsGoogleDrive""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsGoogleDrive() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_issues.py b/test/test_class_details_issues.py new file mode 100644 index 0000000..d9dd609 --- /dev/null +++ b/test/test_class_details_issues.py @@ -0,0 +1,38 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +globals()['ClassDetailsIssuesSyncInner'] = ClassDetailsIssuesSyncInner +from flat_api.model.class_details_issues import ClassDetailsIssues + + +class TestClassDetailsIssues(unittest.TestCase): + """ClassDetailsIssues unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsIssues(self): + """Test ClassDetailsIssues""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsIssues() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_issues_sync_inner.py b/test/test_class_details_issues_sync_inner.py new file mode 100644 index 0000000..fc158b0 --- /dev/null +++ b/test/test_class_details_issues_sync_inner.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner + + +class TestClassDetailsIssuesSyncInner(unittest.TestCase): + """ClassDetailsIssuesSyncInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsIssuesSyncInner(self): + """Test ClassDetailsIssuesSyncInner""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsIssuesSyncInner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py new file mode 100644 index 0000000..1757419 --- /dev/null +++ b/test/test_class_details_lti.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_lti import ClassDetailsLti + + +class TestClassDetailsLti(unittest.TestCase): + """ClassDetailsLti unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsLti(self): + """Test ClassDetailsLti""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsLti() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_mfc.py b/test/test_class_details_mfc.py new file mode 100644 index 0000000..1382fd1 --- /dev/null +++ b/test/test_class_details_mfc.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_mfc import ClassDetailsMfc + + +class TestClassDetailsMfc(unittest.TestCase): + """ClassDetailsMfc unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsMfc(self): + """Test ClassDetailsMfc""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsMfc() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_class_details_microsoft_graph.py b/test/test_class_details_microsoft_graph.py new file mode 100644 index 0000000..8e9e3a4 --- /dev/null +++ b/test/test_class_details_microsoft_graph.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph + + +class TestClassDetailsMicrosoftGraph(unittest.TestCase): + """ClassDetailsMicrosoftGraph unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassDetailsMicrosoftGraph(self): + """Test ClassDetailsMicrosoftGraph""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassDetailsMicrosoftGraph() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_class_grade_level.py b/test/test_class_grade_level.py similarity index 87% rename from test/test_models/test_class_grade_level.py rename to test/test_class_grade_level.py index 8b0f7d5..4e15569 100644 --- a/test/test_models/test_class_grade_level.py +++ b/test/test_class_grade_level.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api import configuration class TestClassGradeLevel(unittest.TestCase): """ClassGradeLevel unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassGradeLevel(self): + """Test ClassGradeLevel""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassGradeLevel() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_class_roles.py b/test/test_class_roles.py similarity index 87% rename from test/test_models/test_class_roles.py rename to test/test_class_roles.py index 78bd927..93d613c 100644 --- a/test/test_models/test_class_roles.py +++ b/test/test_class_roles.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.class_roles import ClassRoles -from flat_api import configuration class TestClassRoles(unittest.TestCase): """ClassRoles unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassRoles(self): + """Test ClassRoles""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassRoles() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_class_state.py b/test/test_class_state.py similarity index 87% rename from test/test_models/test_class_state.py rename to test/test_class_state.py index 25113d8..c599c4d 100644 --- a/test/test_models/test_class_state.py +++ b/test/test_class_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.class_state import ClassState -from flat_api import configuration class TestClassState(unittest.TestCase): """ClassState unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassState(self): + """Test ClassState""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassState() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_class_update.py b/test/test_class_update.py similarity index 80% rename from test/test_models/test_class_update.py rename to test/test_class_update.py index 1115950..af1062f 100644 --- a/test/test_models/test_class_update.py +++ b/test/test_class_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_grade_level import ClassGradeLevel +from flat_api.model.edu_skills_focused import EduSkillsFocused +globals()['ClassGradeLevel'] = ClassGradeLevel +globals()['EduSkillsFocused'] = EduSkillsFocused from flat_api.model.class_update import ClassUpdate -from flat_api import configuration class TestClassUpdate(unittest.TestCase): """ClassUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClassUpdate(self): + """Test ClassUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = ClassUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_collection.py b/test/test_collection.py similarity index 65% rename from test/test_models/test_collection.py rename to test/test_collection.py index e2c6f16..1239d29 100644 --- a/test/test_models/test_collection.py +++ b/test/test_collection.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,42 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.collection_app import CollectionApp +from flat_api.model.collection_capabilities import CollectionCapabilities +from flat_api.model.collection_privacy import CollectionPrivacy +from flat_api.model.collection_type import CollectionType +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.user_public_summary import UserPublicSummary +globals()['CollectionApp'] = CollectionApp +globals()['CollectionCapabilities'] = CollectionCapabilities +globals()['CollectionPrivacy'] = CollectionPrivacy +globals()['CollectionType'] = CollectionType +globals()['ResourceCollaborator'] = ResourceCollaborator +globals()['ResourceRights'] = ResourceRights +globals()['UserPublicSummary'] = UserPublicSummary from flat_api.model.collection import Collection -from flat_api import configuration class TestCollection(unittest.TestCase): """Collection unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollection(self): + """Test Collection""" + # FIXME: construct object with mandatory attributes with example values + # model = Collection() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_collection_api.py b/test/test_collection_api.py new file mode 100644 index 0000000..6323c73 --- /dev/null +++ b/test/test_collection_api.py @@ -0,0 +1,92 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.collection_api import CollectionApi # noqa: E501 + + +class TestCollectionApi(unittest.TestCase): + """CollectionApi unit test stubs""" + + def setUp(self): + self.api = CollectionApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_score_to_collection(self): + """Test case for add_score_to_collection + + Add a score to the collection # noqa: E501 + """ + pass + + def test_create_collection(self): + """Test case for create_collection + + Create a new collection # noqa: E501 + """ + pass + + def test_delete_collection(self): + """Test case for delete_collection + + Delete the collection # noqa: E501 + """ + pass + + def test_delete_score_from_collection(self): + """Test case for delete_score_from_collection + + Delete a score from the collection # noqa: E501 + """ + pass + + def test_edit_collection(self): + """Test case for edit_collection + + Update a collection's metadata # noqa: E501 + """ + pass + + def test_get_collection(self): + """Test case for get_collection + + Get collection details # noqa: E501 + """ + pass + + def test_list_collection_scores(self): + """Test case for list_collection_scores + + List the scores contained in a collection # noqa: E501 + """ + pass + + def test_list_collections(self): + """Test case for list_collections + + List the collections # noqa: E501 + """ + pass + + def test_untrash_collection(self): + """Test case for untrash_collection + + Untrash a collection # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_collection_app.py b/test/test_collection_app.py similarity index 87% rename from test/test_models/test_collection_app.py rename to test/test_collection_app.py index 5335027..a7fd8f9 100644 --- a/test/test_models/test_collection_app.py +++ b/test/test_collection_app.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.collection_app import CollectionApp -from flat_api import configuration class TestCollectionApp(unittest.TestCase): """CollectionApp unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionApp(self): + """Test CollectionApp""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionApp() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py new file mode 100644 index 0000000..46295d3 --- /dev/null +++ b/test/test_collection_capabilities.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.collection_capabilities import CollectionCapabilities + + +class TestCollectionCapabilities(unittest.TestCase): + """CollectionCapabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionCapabilities(self): + """Test CollectionCapabilities""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionCapabilities() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_collection_creation.py b/test/test_collection_creation.py similarity index 83% rename from test/test_models/test_collection_creation.py rename to test/test_collection_creation.py index 5607229..9af0553 100644 --- a/test/test_models/test_collection_creation.py +++ b/test/test_collection_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.collection_privacy import CollectionPrivacy +globals()['CollectionPrivacy'] = CollectionPrivacy from flat_api.model.collection_creation import CollectionCreation -from flat_api import configuration class TestCollectionCreation(unittest.TestCase): """CollectionCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionCreation(self): + """Test CollectionCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_collection_modification.py b/test/test_collection_modification.py similarity index 82% rename from test/test_models/test_collection_modification.py rename to test/test_collection_modification.py index a85723c..11eb488 100644 --- a/test/test_models/test_collection_modification.py +++ b/test/test_collection_modification.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.collection_privacy import CollectionPrivacy +globals()['CollectionPrivacy'] = CollectionPrivacy from flat_api.model.collection_modification import CollectionModification -from flat_api import configuration class TestCollectionModification(unittest.TestCase): """CollectionModification unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionModification(self): + """Test CollectionModification""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionModification() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_collection_privacy.py b/test/test_collection_privacy.py similarity index 87% rename from test/test_models/test_collection_privacy.py rename to test/test_collection_privacy.py index 75d348e..35619f7 100644 --- a/test/test_models/test_collection_privacy.py +++ b/test/test_collection_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.collection_privacy import CollectionPrivacy -from flat_api import configuration class TestCollectionPrivacy(unittest.TestCase): """CollectionPrivacy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionPrivacy(self): + """Test CollectionPrivacy""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionPrivacy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_collection_type.py b/test/test_collection_type.py similarity index 87% rename from test/test_models/test_collection_type.py rename to test/test_collection_type.py index f500456..3ec4bba 100644 --- a/test/test_models/test_collection_type.py +++ b/test/test_collection_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.collection_type import CollectionType -from flat_api import configuration class TestCollectionType(unittest.TestCase): """CollectionType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCollectionType(self): + """Test CollectionType""" + # FIXME: construct object with mandatory attributes with example values + # model = CollectionType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_library.py b/test/test_edu_library.py similarity index 87% rename from test/test_models/test_edu_library.py rename to test/test_edu_library.py index 8af2bf5..258afdf 100644 --- a/test/test_models/test_edu_library.py +++ b/test/test_edu_library.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_library import EduLibrary -from flat_api import configuration class TestEduLibrary(unittest.TestCase): """EduLibrary unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduLibrary(self): + """Test EduLibrary""" + # FIXME: construct object with mandatory attributes with example values + # model = EduLibrary() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource.py b/test/test_edu_resource.py similarity index 72% rename from test/test_models/test_edu_resource.py rename to test/test_edu_resource.py index a2d4248..6e0e7cc 100644 --- a/test/test_models/test_edu_resource.py +++ b/test/test_edu_resource.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,36 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.edu_resource_capabilities import EduResourceCapabilities +from flat_api.model.edu_resource_privacy import EduResourcePrivacy +from flat_api.model.edu_resource_resource import EduResourceResource +from flat_api.model.edu_resource_type import EduResourceType +globals()['EduResourceCapabilities'] = EduResourceCapabilities +globals()['EduResourcePrivacy'] = EduResourcePrivacy +globals()['EduResourceResource'] = EduResourceResource +globals()['EduResourceType'] = EduResourceType from flat_api.model.edu_resource import EduResource -from flat_api import configuration class TestEduResource(unittest.TestCase): """EduResource unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResource(self): + """Test EduResource""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResource() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_edu_resource_capabilities.py b/test/test_edu_resource_capabilities.py new file mode 100644 index 0000000..339b154 --- /dev/null +++ b/test/test_edu_resource_capabilities.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.edu_resource_capabilities import EduResourceCapabilities + + +class TestEduResourceCapabilities(unittest.TestCase): + """EduResourceCapabilities unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceCapabilities(self): + """Test EduResourceCapabilities""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceCapabilities() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_copy.py b/test/test_edu_resource_copy.py similarity index 87% rename from test/test_models/test_edu_resource_copy.py rename to test/test_edu_resource_copy.py index 0f6b259..eca3a45 100644 --- a/test/test_models/test_edu_resource_copy.py +++ b/test/test_edu_resource_copy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api import configuration class TestEduResourceCopy(unittest.TestCase): """EduResourceCopy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceCopy(self): + """Test EduResourceCopy""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceCopy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource_creation.py b/test/test_edu_resource_creation.py similarity index 83% rename from test/test_models/test_edu_resource_creation.py rename to test/test_edu_resource_creation.py index 01498b7..e91a713 100644 --- a/test/test_models/test_edu_resource_creation.py +++ b/test/test_edu_resource_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.edu_resource_type import EduResourceType +globals()['EduResourceType'] = EduResourceType from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api import configuration class TestEduResourceCreation(unittest.TestCase): """EduResourceCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceCreation(self): + """Test EduResourceCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource_move.py b/test/test_edu_resource_move.py similarity index 87% rename from test/test_models/test_edu_resource_move.py rename to test/test_edu_resource_move.py index 0fac466..ec39331 100644 --- a/test/test_models/test_edu_resource_move.py +++ b/test/test_edu_resource_move.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_move import EduResourceMove -from flat_api import configuration class TestEduResourceMove(unittest.TestCase): """EduResourceMove unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceMove(self): + """Test EduResourceMove""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceMove() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource_privacy.py b/test/test_edu_resource_privacy.py similarity index 87% rename from test/test_models/test_edu_resource_privacy.py rename to test/test_edu_resource_privacy.py index f0957fc..7387269 100644 --- a/test/test_models/test_edu_resource_privacy.py +++ b/test/test_edu_resource_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_privacy import EduResourcePrivacy -from flat_api import configuration class TestEduResourcePrivacy(unittest.TestCase): """EduResourcePrivacy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourcePrivacy(self): + """Test EduResourcePrivacy""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourcePrivacy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_edu_resource_resource.py b/test/test_edu_resource_resource.py new file mode 100644 index 0000000..1017a85 --- /dev/null +++ b/test/test_edu_resource_resource.py @@ -0,0 +1,42 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.model.assignment_type import AssignmentType +from flat_api.model.media_attachment import MediaAttachment +globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities +globals()['AssignmentType'] = AssignmentType +globals()['MediaAttachment'] = MediaAttachment +from flat_api.model.edu_resource_resource import EduResourceResource + + +class TestEduResourceResource(unittest.TestCase): + """EduResourceResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceResource(self): + """Test EduResourceResource""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_resource_type.py b/test/test_edu_resource_type.py similarity index 87% rename from test/test_models/test_edu_resource_type.py rename to test/test_edu_resource_type.py index 7d3e9cf..4038ca5 100644 --- a/test/test_models/test_edu_resource_type.py +++ b/test/test_edu_resource_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_type import EduResourceType -from flat_api import configuration class TestEduResourceType(unittest.TestCase): """EduResourceType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceType(self): + """Test EduResourceType""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource_update.py b/test/test_edu_resource_update.py similarity index 87% rename from test/test_models/test_edu_resource_update.py rename to test/test_edu_resource_update.py index 72cc104..e4f3914 100644 --- a/test/test_models/test_edu_resource_update.py +++ b/test/test_edu_resource_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_update import EduResourceUpdate -from flat_api import configuration class TestEduResourceUpdate(unittest.TestCase): """EduResourceUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceUpdate(self): + """Test EduResourceUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_edu_resource_use_in_class.py b/test/test_edu_resource_use_in_class.py similarity index 86% rename from test/test_models/test_edu_resource_use_in_class.py rename to test/test_edu_resource_use_in_class.py index 5950aaa..00459f3 100644 --- a/test/test_models/test_edu_resource_use_in_class.py +++ b/test/test_edu_resource_use_in_class.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api import configuration class TestEduResourceUseInClass(unittest.TestCase): """EduResourceUseInClass unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduResourceUseInClass(self): + """Test EduResourceUseInClass""" + # FIXME: construct object with mandatory attributes with example values + # model = EduResourceUseInClass() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_edu_resources_api.py b/test/test_edu_resources_api.py new file mode 100644 index 0000000..8ac337d --- /dev/null +++ b/test/test_edu_resources_api.py @@ -0,0 +1,106 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.edu_resources_api import EduResourcesApi # noqa: E501 + + +class TestEduResourcesApi(unittest.TestCase): + """EduResourcesApi unit test stubs""" + + def setUp(self): + self.api = EduResourcesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_copy_edu_resource(self): + """Test case for copy_edu_resource + + Copy an education resource to a Resource Library # noqa: E501 + """ + pass + + def test_copy_edu_resource_to_demo_class(self): + """Test case for copy_edu_resource_to_demo_class + + Copy an education assignment to a teacher demo class # noqa: E501 + """ + pass + + def test_create_edu_resource(self): + """Test case for create_edu_resource + + Create a new education resource # noqa: E501 + """ + pass + + def test_delete_edu_resource(self): + """Test case for delete_edu_resource + + Delete an education resource # noqa: E501 + """ + pass + + def test_get_edu_resource(self): + """Test case for get_edu_resource + + Get an education resource # noqa: E501 + """ + pass + + def test_list_edu_libraries(self): + """Test case for list_edu_libraries + + List the education libraries # noqa: E501 + """ + pass + + def test_list_edu_resources(self): + """Test case for list_edu_resources + + List education resources in a library or folder # noqa: E501 + """ + pass + + def test_move_edu_resource(self): + """Test case for move_edu_resource + + Move an education resource # noqa: E501 + """ + pass + + def test_update_edu_resource(self): + """Test case for update_edu_resource + + Update an education resource metadata # noqa: E501 + """ + pass + + def test_update_edu_resource_assignment(self): + """Test case for update_edu_resource_assignment + + Update an education resource assignment # noqa: E501 + """ + pass + + def test_use_edu_resource_in_class(self): + """Test case for use_edu_resource_in_class + + Use an education resource in a class # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_edu_skills_focused.py b/test/test_edu_skills_focused.py similarity index 87% rename from test/test_models/test_edu_skills_focused.py rename to test/test_edu_skills_focused.py index ad2af1b..82f9cc5 100644 --- a/test/test_models/test_edu_skills_focused.py +++ b/test/test_edu_skills_focused.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.edu_skills_focused import EduSkillsFocused -from flat_api import configuration class TestEduSkillsFocused(unittest.TestCase): """EduSkillsFocused unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEduSkillsFocused(self): + """Test EduSkillsFocused""" + # FIXME: construct object with mandatory attributes with example values + # model = EduSkillsFocused() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_flat_error_response.py b/test/test_flat_error_response.py similarity index 87% rename from test/test_models/test_flat_error_response.py rename to test/test_flat_error_response.py index 2fb538b..b18af07 100644 --- a/test/test_models/test_flat_error_response.py +++ b/test/test_flat_error_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api import configuration class TestFlatErrorResponse(unittest.TestCase): """FlatErrorResponse unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFlatErrorResponse(self): + """Test FlatErrorResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = FlatErrorResponse() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_flat_locales.py b/test/test_flat_locales.py similarity index 87% rename from test/test_models/test_flat_locales.py rename to test/test_flat_locales.py index 697d28d..02d14dd 100644 --- a/test/test_models/test_flat_locales.py +++ b/test/test_flat_locales.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.flat_locales import FlatLocales -from flat_api import configuration class TestFlatLocales(unittest.TestCase): """FlatLocales unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFlatLocales(self): + """Test FlatLocales""" + # FIXME: construct object with mandatory attributes with example values + # model = FlatLocales() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_google_classroom_coursework.py b/test/test_google_classroom_coursework.py similarity index 86% rename from test/test_models/test_google_classroom_coursework.py rename to test/test_google_classroom_coursework.py index 088a4d0..892310f 100644 --- a/test/test_models/test_google_classroom_coursework.py +++ b/test/test_google_classroom_coursework.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework -from flat_api import configuration class TestGoogleClassroomCoursework(unittest.TestCase): """GoogleClassroomCoursework unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGoogleClassroomCoursework(self): + """Test GoogleClassroomCoursework""" + # FIXME: construct object with mandatory attributes with example values + # model = GoogleClassroomCoursework() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_google_classroom_submission.py b/test/test_google_classroom_submission.py similarity index 86% rename from test/test_models/test_google_classroom_submission.py rename to test/test_google_classroom_submission.py index a762538..cb25004 100644 --- a/test/test_models/test_google_classroom_submission.py +++ b/test/test_google_classroom_submission.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.google_classroom_submission import GoogleClassroomSubmission -from flat_api import configuration class TestGoogleClassroomSubmission(unittest.TestCase): """GoogleClassroomSubmission unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGoogleClassroomSubmission(self): + """Test GoogleClassroomSubmission""" + # FIXME: construct object with mandatory attributes with example values + # model = GoogleClassroomSubmission() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_group.py b/test/test_group.py similarity index 88% rename from test/test_models/test_group.py rename to test/test_group.py index a87a9ce..1c6fe72 100644 --- a/test/test_models/test_group.py +++ b/test/test_group.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.group import Group -from flat_api import configuration class TestGroup(unittest.TestCase): """Group unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroup(self): + """Test Group""" + # FIXME: construct object with mandatory attributes with example values + # model = Group() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_group_api.py b/test/test_group_api.py new file mode 100644 index 0000000..0d8d72c --- /dev/null +++ b/test/test_group_api.py @@ -0,0 +1,50 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.group_api import GroupApi # noqa: E501 + + +class TestGroupApi(unittest.TestCase): + """GroupApi unit test stubs""" + + def setUp(self): + self.api = GroupApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_group_details(self): + """Test case for get_group_details + + Get group information # noqa: E501 + """ + pass + + def test_get_group_scores(self): + """Test case for get_group_scores + + List group's scores # noqa: E501 + """ + pass + + def test_list_group_users(self): + """Test case for list_group_users + + List group's users # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_group_details.py b/test/test_group_details.py similarity index 84% rename from test/test_models/test_group_details.py rename to test/test_group_details.py index d13f230..8ade346 100644 --- a/test/test_models/test_group_details.py +++ b/test/test_group_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.group_type import GroupType +globals()['GroupType'] = GroupType from flat_api.model.group_details import GroupDetails -from flat_api import configuration class TestGroupDetails(unittest.TestCase): """GroupDetails unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroupDetails(self): + """Test GroupDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = GroupDetails() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_group_type.py b/test/test_group_type.py similarity index 87% rename from test/test_models/test_group_type.py rename to test/test_group_type.py index 52e34cf..febdcbd 100644 --- a/test/test_models/test_group_type.py +++ b/test/test_group_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.group_type import GroupType -from flat_api import configuration class TestGroupType(unittest.TestCase): """GroupType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroupType(self): + """Test GroupType""" + # FIXME: construct object with mandatory attributes with example values + # model = GroupType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_license_mode.py b/test/test_license_mode.py similarity index 87% rename from test/test_models/test_license_mode.py rename to test/test_license_mode.py index 76b0a97..332c8ba 100644 --- a/test/test_models/test_license_mode.py +++ b/test/test_license_mode.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.license_mode import LicenseMode -from flat_api import configuration class TestLicenseMode(unittest.TestCase): """LicenseMode unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicenseMode(self): + """Test LicenseMode""" + # FIXME: construct object with mandatory attributes with example values + # model = LicenseMode() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_license_sources.py b/test/test_license_sources.py similarity index 87% rename from test/test_models/test_license_sources.py rename to test/test_license_sources.py index ad38fc6..0a3af68 100644 --- a/test/test_models/test_license_sources.py +++ b/test/test_license_sources.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.license_sources import LicenseSources -from flat_api import configuration class TestLicenseSources(unittest.TestCase): """LicenseSources unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicenseSources(self): + """Test LicenseSources""" + # FIXME: construct object with mandatory attributes with example values + # model = LicenseSources() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_lms_name.py b/test/test_lms_name.py similarity index 88% rename from test/test_models/test_lms_name.py rename to test/test_lms_name.py index 5efca34..d8675f3 100644 --- a/test/test_models/test_lms_name.py +++ b/test/test_lms_name.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.lms_name import LmsName -from flat_api import configuration class TestLmsName(unittest.TestCase): """LmsName unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLmsName(self): + """Test LmsName""" + # FIXME: construct object with mandatory attributes with example values + # model = LmsName() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_lti_credentials.py b/test/test_lti_credentials.py similarity index 84% rename from test/test_models/test_lti_credentials.py rename to test/test_lti_credentials.py index 780d4a9..23cd902 100644 --- a/test/test_models/test_lti_credentials.py +++ b/test/test_lti_credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.lms_name import LmsName +globals()['LmsName'] = LmsName from flat_api.model.lti_credentials import LtiCredentials -from flat_api import configuration class TestLtiCredentials(unittest.TestCase): """LtiCredentials unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLtiCredentials(self): + """Test LtiCredentials""" + # FIXME: construct object with mandatory attributes with example values + # model = LtiCredentials() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_lti_credentials_creation.py b/test/test_lti_credentials_creation.py similarity index 84% rename from test/test_models/test_lti_credentials_creation.py rename to test/test_lti_credentials_creation.py index 37d5fe6..75835a7 100644 --- a/test/test_models/test_lti_credentials_creation.py +++ b/test/test_lti_credentials_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.lms_name import LmsName +globals()['LmsName'] = LmsName from flat_api.model.lti_credentials_creation import LtiCredentialsCreation -from flat_api import configuration class TestLtiCredentialsCreation(unittest.TestCase): """LtiCredentialsCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLtiCredentialsCreation(self): + """Test LtiCredentialsCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = LtiCredentialsCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_media_attachment.py b/test/test_media_attachment.py similarity index 82% rename from test/test_models/test_media_attachment.py rename to test/test_media_attachment.py index 8b1ab1c..2f848cd 100644 --- a/test/test_models/test_media_attachment.py +++ b/test/test_media_attachment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode +globals()['MediaScoreSharingMode'] = MediaScoreSharingMode from flat_api.model.media_attachment import MediaAttachment -from flat_api import configuration class TestMediaAttachment(unittest.TestCase): """MediaAttachment unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMediaAttachment(self): + """Test MediaAttachment""" + # FIXME: construct object with mandatory attributes with example values + # model = MediaAttachment() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_media_score_sharing_mode.py b/test/test_media_score_sharing_mode.py similarity index 86% rename from test/test_models/test_media_score_sharing_mode.py rename to test/test_media_score_sharing_mode.py index 15a98ee..354754a 100644 --- a/test/test_models/test_media_score_sharing_mode.py +++ b/test/test_media_score_sharing_mode.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode -from flat_api import configuration class TestMediaScoreSharingMode(unittest.TestCase): """MediaScoreSharingMode unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMediaScoreSharingMode(self): + """Test MediaScoreSharingMode""" + # FIXME: construct object with mandatory attributes with example values + # model = MediaScoreSharingMode() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_microsoft_graph_assignment.py b/test/test_microsoft_graph_assignment.py similarity index 86% rename from test/test_models/test_microsoft_graph_assignment.py rename to test/test_microsoft_graph_assignment.py index 7e710fc..1ada9fb 100644 --- a/test/test_models/test_microsoft_graph_assignment.py +++ b/test/test_microsoft_graph_assignment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment -from flat_api import configuration class TestMicrosoftGraphAssignment(unittest.TestCase): """MicrosoftGraphAssignment unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMicrosoftGraphAssignment(self): + """Test MicrosoftGraphAssignment""" + # FIXME: construct object with mandatory attributes with example values + # model = MicrosoftGraphAssignment() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_microsoft_graph_submission.py b/test/test_microsoft_graph_submission.py similarity index 86% rename from test/test_models/test_microsoft_graph_submission.py rename to test/test_microsoft_graph_submission.py index 8267eb9..dca9ec5 100644 --- a/test/test_models/test_microsoft_graph_submission.py +++ b/test/test_microsoft_graph_submission.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission -from flat_api import configuration class TestMicrosoftGraphSubmission(unittest.TestCase): """MicrosoftGraphSubmission unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMicrosoftGraphSubmission(self): + """Test MicrosoftGraphSubmission""" + # FIXME: construct object with mandatory attributes with example values + # model = MicrosoftGraphSubmission() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/__init__.py b/test/test_models/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_organization_api.py b/test/test_organization_api.py new file mode 100644 index 0000000..77e9b17 --- /dev/null +++ b/test/test_organization_api.py @@ -0,0 +1,120 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.organization_api import OrganizationApi # noqa: E501 + + +class TestOrganizationApi(unittest.TestCase): + """OrganizationApi unit test stubs""" + + def setUp(self): + self.api = OrganizationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_count_orga_users(self): + """Test case for count_orga_users + + Count the organization users using the provided filters # noqa: E501 + """ + pass + + def test_create_lti_credentials(self): + """Test case for create_lti_credentials + + Create a new couple of LTI 1.x credentials # noqa: E501 + """ + pass + + def test_create_organization_invitation(self): + """Test case for create_organization_invitation + + Create a new invitation to join the organization # noqa: E501 + """ + pass + + def test_create_organization_user(self): + """Test case for create_organization_user + + Create a new user account # noqa: E501 + """ + pass + + def test_create_organization_user_access_token(self): + """Test case for create_organization_user_access_token + + Create a delegated API access token for an organization user # noqa: E501 + """ + pass + + def test_create_organization_user_signin_link(self): + """Test case for create_organization_user_signin_link + + Create a sign in link for an organization user # noqa: E501 + """ + pass + + def test_list_lti_credentials(self): + """Test case for list_lti_credentials + + List LTI 1.x credentials # noqa: E501 + """ + pass + + def test_list_organization_invitations(self): + """Test case for list_organization_invitations + + List the organization invitations # noqa: E501 + """ + pass + + def test_list_organization_users(self): + """Test case for list_organization_users + + List the organization users # noqa: E501 + """ + pass + + def test_remove_organization_invitation(self): + """Test case for remove_organization_invitation + + Remove an organization invitation # noqa: E501 + """ + pass + + def test_remove_organization_user(self): + """Test case for remove_organization_user + + Remove an account from Flat # noqa: E501 + """ + pass + + def test_revoke_lti_credentials(self): + """Test case for revoke_lti_credentials + + Revoke LTI 1.x credentials # noqa: E501 + """ + pass + + def test_update_organization_user(self): + """Test case for update_organization_user + + Update account information # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_organization_invitation.py b/test/test_organization_invitation.py similarity index 82% rename from test/test_models/test_organization_invitation.py rename to test/test_organization_invitation.py index 6b84b13..f3f3621 100644 --- a/test/test_models/test_organization_invitation.py +++ b/test/test_organization_invitation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.organization_roles import OrganizationRoles +globals()['OrganizationRoles'] = OrganizationRoles from flat_api.model.organization_invitation import OrganizationInvitation -from flat_api import configuration class TestOrganizationInvitation(unittest.TestCase): """OrganizationInvitation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationInvitation(self): + """Test OrganizationInvitation""" + # FIXME: construct object with mandatory attributes with example values + # model = OrganizationInvitation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_organization_invitation_creation.py b/test/test_organization_invitation_creation.py similarity index 82% rename from test/test_models/test_organization_invitation_creation.py rename to test/test_organization_invitation_creation.py index 28c34c7..7e77ce2 100644 --- a/test/test_models/test_organization_invitation_creation.py +++ b/test/test_organization_invitation_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.organization_roles import OrganizationRoles +globals()['OrganizationRoles'] = OrganizationRoles from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api import configuration class TestOrganizationInvitationCreation(unittest.TestCase): """OrganizationInvitationCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationInvitationCreation(self): + """Test OrganizationInvitationCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = OrganizationInvitationCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_organization_roles.py b/test/test_organization_roles.py similarity index 87% rename from test/test_models/test_organization_roles.py rename to test/test_organization_roles.py index afd476d..a504dbf 100644 --- a/test/test_models/test_organization_roles.py +++ b/test/test_organization_roles.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.organization_roles import OrganizationRoles -from flat_api import configuration class TestOrganizationRoles(unittest.TestCase): """OrganizationRoles unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationRoles(self): + """Test OrganizationRoles""" + # FIXME: construct object with mandatory attributes with example values + # model = OrganizationRoles() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_organization_user_access_token_creation.py b/test/test_organization_user_access_token_creation.py similarity index 83% rename from test/test_models/test_organization_user_access_token_creation.py rename to test/test_organization_user_access_token_creation.py index cb27c7a..cf85974 100644 --- a/test/test_models/test_organization_user_access_token_creation.py +++ b/test/test_organization_user_access_token_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.app_scopes import AppScopes +globals()['AppScopes'] = AppScopes from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api import configuration class TestOrganizationUserAccessTokenCreation(unittest.TestCase): """OrganizationUserAccessTokenCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationUserAccessTokenCreation(self): + """Test OrganizationUserAccessTokenCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = OrganizationUserAccessTokenCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_paths/__init__.py b/test/test_paths/__init__.py deleted file mode 100644 index 1309632..0000000 --- a/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -import json -import typing - -import urllib3 -from urllib3._collections import HTTPHeaderDict - - -class ApiTestMixin: - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = None, - accept_content_type: typing.Optional[str] = None, - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/test/test_paths/test_classes/__init__.py b/test/test_paths/test_classes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes/test_get.py b/test/test_paths/test_classes/test_get.py deleted file mode 100644 index b1e317d..0000000 --- a/test/test_paths/test_classes/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClasses(ApiTestMixin, unittest.TestCase): - """ - Classes unit test stubs - List the classes available for the current user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes/test_post.py b/test/test_paths/test_classes/test_post.py deleted file mode 100644 index b787a65..0000000 --- a/test/test_paths/test_classes/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClasses(ApiTestMixin, unittest.TestCase): - """ - Classes unit test stubs - Create a new class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class/__init__.py b/test/test_paths/test_classes_class/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class/test_get.py b/test/test_paths/test_classes_class/test_get.py deleted file mode 100644 index 37ad65c..0000000 --- a/test/test_paths/test_classes_class/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClass(ApiTestMixin, unittest.TestCase): - """ - ClassesClass unit test stubs - Get the details of a single class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class/test_put.py b/test/test_paths/test_classes_class/test_put.py deleted file mode 100644 index 7a15582..0000000 --- a/test/test_paths/test_classes_class/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClass(ApiTestMixin, unittest.TestCase): - """ - ClassesClass unit test stubs - Update the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_activate/__init__.py b/test/test_paths/test_classes_class_activate/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_activate/test_post.py b/test/test_paths/test_classes_class_activate/test_post.py deleted file mode 100644 index 380d148..0000000 --- a/test/test_paths/test_classes_class_activate/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_activate import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassActivate(ApiTestMixin, unittest.TestCase): - """ - ClassesClassActivate unit test stubs - Activate the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_archive/__init__.py b/test/test_paths/test_classes_class_archive/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_archive/test_delete.py b/test/test_paths/test_classes_class_archive/test_delete.py deleted file mode 100644 index 735ac0e..0000000 --- a/test/test_paths/test_classes_class_archive/test_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_archive import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassArchive(ApiTestMixin, unittest.TestCase): - """ - ClassesClassArchive unit test stubs - Unarchive the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_archive/test_post.py b/test/test_paths/test_classes_class_archive/test_post.py deleted file mode 100644 index 1c14c1d..0000000 --- a/test/test_paths/test_classes_class_archive/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_archive import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassArchive(ApiTestMixin, unittest.TestCase): - """ - ClassesClassArchive unit test stubs - Archive the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments/__init__.py b/test/test_paths/test_classes_class_assignments/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments/test_get.py b/test/test_paths/test_classes_class_assignments/test_get.py deleted file mode 100644 index b5eb029..0000000 --- a/test/test_paths/test_classes_class_assignments/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignments(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignments unit test stubs - Assignments listing # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments/test_post.py b/test/test_paths/test_classes_class_assignments/test_post.py deleted file mode 100644 index 3c4f97d..0000000 --- a/test/test_paths/test_classes_class_assignments/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignments(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignments unit test stubs - Assignment creation # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_archive/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py deleted file mode 100644 index 9200d7e..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_archive/test_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_archive import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentArchive(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentArchive unit test stubs - Unarchive the assignment. # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py deleted file mode 100644 index 2ecfb35..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_archive/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_archive import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentArchive(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentArchive unit test stubs - Archive the assignment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_copy/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py deleted file mode 100644 index db494be..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_copy/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_copy import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentCopy(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentCopy unit test stubs - Copy an assignment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py deleted file mode 100644 index 1266caa..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissions(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissions unit test stubs - List the students' submissions # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py deleted file mode 100644 index b8f0d88..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissions(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissions unit test stubs - Create or edit a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py deleted file mode 100644 index 804b55e..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_csv/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_csv import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsCsv(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsCsv unit test stubs - CSV Grades exports # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py deleted file mode 100644 index baa454a..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_excel/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_excel import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsExcel(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsExcel unit test stubs - Excel Grades exports # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py deleted file mode 100644 index 81af3c5..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs - Reset a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py deleted file mode 100644 index a26df52..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs - Get a student submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py deleted file mode 100644 index eca6b62..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmission(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmission unit test stubs - Edit a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py deleted file mode 100644 index 9baac86..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionComments(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments unit test stubs - List the feedback comments of a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py deleted file mode 100644 index ed9f858..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionComments(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmissionComments unit test stubs - Add a feedback comment to a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py deleted file mode 100644 index 215bf64..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment unit test stubs - Delete a feedback comment to a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py deleted file mode 100644 index 9f5d910..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_comments_comment/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_comments_comment import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmissionCommentsComment unit test stubs - Update a feedback comment to a submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py b/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py deleted file mode 100644 index 39267bd..0000000 --- a/test/test_paths/test_classes_class_assignments_assignment_submissions_submission_history/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_assignments_assignment_submissions_submission_history import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory(ApiTestMixin, unittest.TestCase): - """ - ClassesClassAssignmentsAssignmentSubmissionsSubmissionHistory unit test stubs - Get the history of the submission # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_students_user_submissions/__init__.py b/test/test_paths/test_classes_class_students_user_submissions/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_students_user_submissions/test_get.py b/test/test_paths/test_classes_class_students_user_submissions/test_get.py deleted file mode 100644 index 4772822..0000000 --- a/test/test_paths/test_classes_class_students_user_submissions/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_students_user_submissions import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassStudentsUserSubmissions(ApiTestMixin, unittest.TestCase): - """ - ClassesClassStudentsUserSubmissions unit test stubs - List the submissions for a student # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_test_student/__init__.py b/test/test_paths/test_classes_class_test_student/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_test_student/test_post.py b/test/test_paths/test_classes_class_test_student/test_post.py deleted file mode 100644 index c5e951e..0000000 --- a/test/test_paths/test_classes_class_test_student/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_test_student import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassTestStudent(ApiTestMixin, unittest.TestCase): - """ - ClassesClassTestStudent unit test stubs - Create a test student account # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_users_user/__init__.py b/test/test_paths/test_classes_class_users_user/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_class_users_user/test_delete.py b/test/test_paths/test_classes_class_users_user/test_delete.py deleted file mode 100644 index 7b3bc01..0000000 --- a/test/test_paths/test_classes_class_users_user/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_users_user import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassUsersUser(ApiTestMixin, unittest.TestCase): - """ - ClassesClassUsersUser unit test stubs - Remove a user from the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_class_users_user/test_put.py b/test/test_paths/test_classes_class_users_user/test_put.py deleted file mode 100644 index e5e351d..0000000 --- a/test/test_paths/test_classes_class_users_user/test_put.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_class_users_user import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesClassUsersUser(ApiTestMixin, unittest.TestCase): - """ - ClassesClassUsersUser unit test stubs - Add a user to the class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_classes_enroll_enrollment_code/__init__.py b/test/test_paths/test_classes_enroll_enrollment_code/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_classes_enroll_enrollment_code/test_post.py b/test/test_paths/test_classes_enroll_enrollment_code/test_post.py deleted file mode 100644 index ed5785a..0000000 --- a/test/test_paths/test_classes_enroll_enrollment_code/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.classes_enroll_enrollment_code import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestClassesEnrollEnrollmentCode(ApiTestMixin, unittest.TestCase): - """ - ClassesEnrollEnrollmentCode unit test stubs - Join a class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections/__init__.py b/test/test_paths/test_collections/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_collections/test_get.py b/test/test_paths/test_collections/test_get.py deleted file mode 100644 index 540cb7e..0000000 --- a/test/test_paths/test_collections/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollections(ApiTestMixin, unittest.TestCase): - """ - Collections unit test stubs - List the collections # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections/test_post.py b/test/test_paths/test_collections/test_post.py deleted file mode 100644 index 7bf829a..0000000 --- a/test/test_paths/test_collections/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollections(ApiTestMixin, unittest.TestCase): - """ - Collections unit test stubs - Create a new collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection/__init__.py b/test/test_paths/test_collections_collection/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_collections_collection/test_delete.py b/test/test_paths/test_collections_collection/test_delete.py deleted file mode 100644 index 61cab77..0000000 --- a/test/test_paths/test_collections_collection/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollection unit test stubs - Delete the collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection/test_get.py b/test/test_paths/test_collections_collection/test_get.py deleted file mode 100644 index 2ef7ed5..0000000 --- a/test/test_paths/test_collections_collection/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollection unit test stubs - Get collection details # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection/test_put.py b/test/test_paths/test_collections_collection/test_put.py deleted file mode 100644 index 78f24db..0000000 --- a/test/test_paths/test_collections_collection/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollection(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollection unit test stubs - Update a collection's metadata # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection_scores/__init__.py b/test/test_paths/test_collections_collection_scores/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_collections_collection_scores/test_get.py b/test/test_paths/test_collections_collection_scores/test_get.py deleted file mode 100644 index eeaeac1..0000000 --- a/test/test_paths/test_collections_collection_scores/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection_scores import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollectionScores(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollectionScores unit test stubs - List the scores contained in a collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection_scores_score/__init__.py b/test/test_paths/test_collections_collection_scores_score/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_collections_collection_scores_score/test_delete.py b/test/test_paths/test_collections_collection_scores_score/test_delete.py deleted file mode 100644 index 5debfce..0000000 --- a/test/test_paths/test_collections_collection_scores_score/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection_scores_score import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollectionScoresScore(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollectionScoresScore unit test stubs - Delete a score from the collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection_scores_score/test_put.py b/test/test_paths/test_collections_collection_scores_score/test_put.py deleted file mode 100644 index e89cdba..0000000 --- a/test/test_paths/test_collections_collection_scores_score/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection_scores_score import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollectionScoresScore(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollectionScoresScore unit test stubs - Add a score to the collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_collections_collection_untrash/__init__.py b/test/test_paths/test_collections_collection_untrash/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_collections_collection_untrash/test_post.py b/test/test_paths/test_collections_collection_untrash/test_post.py deleted file mode 100644 index 77c5e46..0000000 --- a/test/test_paths/test_collections_collection_untrash/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.collections_collection_untrash import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCollectionsCollectionUntrash(ApiTestMixin, unittest.TestCase): - """ - CollectionsCollectionUntrash unit test stubs - Untrash a collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources/__init__.py b/test/test_paths/test_edu_resources/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources/test_get.py b/test/test_paths/test_edu_resources/test_get.py deleted file mode 100644 index 83d9349..0000000 --- a/test/test_paths/test_edu_resources/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResources(ApiTestMixin, unittest.TestCase): - """ - EduResources unit test stubs - List education resources in a library or folder # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources/test_post.py b/test/test_paths/test_edu_resources/test_post.py deleted file mode 100644 index 0be4cbd..0000000 --- a/test/test_paths/test_edu_resources/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResources(ApiTestMixin, unittest.TestCase): - """ - EduResources unit test stubs - Create a new education resource # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_libraries/__init__.py b/test/test_paths/test_edu_resources_libraries/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_libraries/test_get.py b/test/test_paths/test_edu_resources_libraries/test_get.py deleted file mode 100644 index 76d675d..0000000 --- a/test/test_paths/test_edu_resources_libraries/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_libraries import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesLibraries(ApiTestMixin, unittest.TestCase): - """ - EduResourcesLibraries unit test stubs - List the education libraries # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/__init__.py b/test/test_paths/test_edu_resources_resource/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource/test_delete.py b/test/test_paths/test_edu_resources_resource/test_delete.py deleted file mode 100644 index 6528af9..0000000 --- a/test/test_paths/test_edu_resources_resource/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResource unit test stubs - Delete an education resource # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/test_get.py b/test/test_paths/test_edu_resources_resource/test_get.py deleted file mode 100644 index ac7437a..0000000 --- a/test/test_paths/test_edu_resources_resource/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResource unit test stubs - Get an education resource # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource/test_put.py b/test/test_paths/test_edu_resources_resource/test_put.py deleted file mode 100644 index fd59f4e..0000000 --- a/test/test_paths/test_edu_resources_resource/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResource(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResource unit test stubs - Update an education resource metadata # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_assignment/__init__.py b/test/test_paths/test_edu_resources_resource_assignment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource_assignment/test_put.py b/test/test_paths/test_edu_resources_resource_assignment/test_put.py deleted file mode 100644 index 9b713f1..0000000 --- a/test/test_paths/test_edu_resources_resource_assignment/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource_assignment import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResourceAssignment(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResourceAssignment unit test stubs - Update an education resource assignment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_copy/__init__.py b/test/test_paths/test_edu_resources_resource_copy/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource_copy/test_post.py b/test/test_paths/test_edu_resources_resource_copy/test_post.py deleted file mode 100644 index 0f287be..0000000 --- a/test/test_paths/test_edu_resources_resource_copy/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource_copy import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResourceCopy(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResourceCopy unit test stubs - Copy an education resource to a Resource Library # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py b/test/test_paths/test_edu_resources_resource_copy_to_demo_class/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py b/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py deleted file mode 100644 index d692ee1..0000000 --- a/test/test_paths/test_edu_resources_resource_copy_to_demo_class/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource_copy_to_demo_class import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResourceCopyToDemoClass(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResourceCopyToDemoClass unit test stubs - Copy an education assignment to a teacher demo class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_move/__init__.py b/test/test_paths/test_edu_resources_resource_move/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource_move/test_post.py b/test/test_paths/test_edu_resources_resource_move/test_post.py deleted file mode 100644 index b3c0e01..0000000 --- a/test/test_paths/test_edu_resources_resource_move/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource_move import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResourceMove(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResourceMove unit test stubs - Move an education resource # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_edu_resources_resource_use_in_class/__init__.py b/test/test_paths/test_edu_resources_resource_use_in_class/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py b/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py deleted file mode 100644 index 0b160a9..0000000 --- a/test/test_paths/test_edu_resources_resource_use_in_class/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.edu_resources_resource_use_in_class import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestEduResourcesResourceUseInClass(ApiTestMixin, unittest.TestCase): - """ - EduResourcesResourceUseInClass unit test stubs - Use an education resource in a class # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_groups_group/__init__.py b/test/test_paths/test_groups_group/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_groups_group/test_get.py b/test/test_paths/test_groups_group/test_get.py deleted file mode 100644 index 21689db..0000000 --- a/test/test_paths/test_groups_group/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.groups_group import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestGroupsGroup(ApiTestMixin, unittest.TestCase): - """ - GroupsGroup unit test stubs - Get group information # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_groups_group_scores/__init__.py b/test/test_paths/test_groups_group_scores/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_groups_group_scores/test_get.py b/test/test_paths/test_groups_group_scores/test_get.py deleted file mode 100644 index 351fda0..0000000 --- a/test/test_paths/test_groups_group_scores/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.groups_group_scores import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestGroupsGroupScores(ApiTestMixin, unittest.TestCase): - """ - GroupsGroupScores unit test stubs - List group's scores # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_groups_group_users/__init__.py b/test/test_paths/test_groups_group_users/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_groups_group_users/test_get.py b/test/test_paths/test_groups_group_users/test_get.py deleted file mode 100644 index 8e2faf9..0000000 --- a/test/test_paths/test_groups_group_users/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.groups_group_users import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestGroupsGroupUsers(ApiTestMixin, unittest.TestCase): - """ - GroupsGroupUsers unit test stubs - List group's users # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_me/__init__.py b/test/test_paths/test_me/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_me/test_get.py b/test/test_paths/test_me/test_get.py deleted file mode 100644 index 9548e8a..0000000 --- a/test/test_paths/test_me/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.me import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestMe(ApiTestMixin, unittest.TestCase): - """ - Me unit test stubs - Get current user account # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_invitations/__init__.py b/test/test_paths/test_organizations_invitations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_invitations/test_get.py b/test/test_paths/test_organizations_invitations/test_get.py deleted file mode 100644 index 64e06b9..0000000 --- a/test/test_paths/test_organizations_invitations/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_invitations import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsInvitations(ApiTestMixin, unittest.TestCase): - """ - OrganizationsInvitations unit test stubs - List the organization invitations # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_invitations/test_post.py b/test/test_paths/test_organizations_invitations/test_post.py deleted file mode 100644 index 7c91a11..0000000 --- a/test/test_paths/test_organizations_invitations/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_invitations import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsInvitations(ApiTestMixin, unittest.TestCase): - """ - OrganizationsInvitations unit test stubs - Create a new invitation to join the organization # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_invitations_invitation/__init__.py b/test/test_paths/test_organizations_invitations_invitation/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_invitations_invitation/test_delete.py b/test/test_paths/test_organizations_invitations_invitation/test_delete.py deleted file mode 100644 index cfa005d..0000000 --- a/test/test_paths/test_organizations_invitations_invitation/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_invitations_invitation import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsInvitationsInvitation(ApiTestMixin, unittest.TestCase): - """ - OrganizationsInvitationsInvitation unit test stubs - Remove an organization invitation # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials/__init__.py b/test/test_paths/test_organizations_lti_credentials/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_lti_credentials/test_get.py b/test/test_paths/test_organizations_lti_credentials/test_get.py deleted file mode 100644 index edd0514..0000000 --- a/test/test_paths/test_organizations_lti_credentials/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_lti_credentials import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsLtiCredentials(ApiTestMixin, unittest.TestCase): - """ - OrganizationsLtiCredentials unit test stubs - List LTI 1.x credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials/test_post.py b/test/test_paths/test_organizations_lti_credentials/test_post.py deleted file mode 100644 index 640374d..0000000 --- a/test/test_paths/test_organizations_lti_credentials/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_lti_credentials import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsLtiCredentials(ApiTestMixin, unittest.TestCase): - """ - OrganizationsLtiCredentials unit test stubs - Create a new couple of LTI 1.x credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_lti_credentials_credentials/__init__.py b/test/test_paths/test_organizations_lti_credentials_credentials/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py b/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py deleted file mode 100644 index 9ba2831..0000000 --- a/test/test_paths/test_organizations_lti_credentials_credentials/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_lti_credentials_credentials import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsLtiCredentialsCredentials(ApiTestMixin, unittest.TestCase): - """ - OrganizationsLtiCredentialsCredentials unit test stubs - Revoke LTI 1.x credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users/__init__.py b/test/test_paths/test_organizations_users/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_users/test_get.py b/test/test_paths/test_organizations_users/test_get.py deleted file mode 100644 index 6dad7cb..0000000 --- a/test/test_paths/test_organizations_users/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsers(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsers unit test stubs - List the organization users # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users/test_post.py b/test/test_paths/test_organizations_users/test_post.py deleted file mode 100644 index 69d069c..0000000 --- a/test/test_paths/test_organizations_users/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsers(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsers unit test stubs - Create a new user account # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users_count/__init__.py b/test/test_paths/test_organizations_users_count/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_users_count/test_get.py b/test/test_paths/test_organizations_users_count/test_get.py deleted file mode 100644 index 58bba1c..0000000 --- a/test/test_paths/test_organizations_users_count/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users_count import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsersCount(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsersCount unit test stubs - Count the organization users using the provided filters # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users_user/__init__.py b/test/test_paths/test_organizations_users_user/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_users_user/test_delete.py b/test/test_paths/test_organizations_users_user/test_delete.py deleted file mode 100644 index 891ca54..0000000 --- a/test/test_paths/test_organizations_users_user/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users_user import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsersUser(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsersUser unit test stubs - Remove an account from Flat # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users_user/test_put.py b/test/test_paths/test_organizations_users_user/test_put.py deleted file mode 100644 index 2d987cd..0000000 --- a/test/test_paths/test_organizations_users_user/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users_user import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsersUser(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsersUser unit test stubs - Update account information # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users_user_access_token/__init__.py b/test/test_paths/test_organizations_users_user_access_token/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_users_user_access_token/test_post.py b/test/test_paths/test_organizations_users_user_access_token/test_post.py deleted file mode 100644 index ce66a6a..0000000 --- a/test/test_paths/test_organizations_users_user_access_token/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users_user_access_token import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsersUserAccessToken(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsersUserAccessToken unit test stubs - Create a delegated API access token for an organization user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_organizations_users_user_signin_link/__init__.py b/test/test_paths/test_organizations_users_user_signin_link/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_organizations_users_user_signin_link/test_post.py b/test/test_paths/test_organizations_users_user_signin_link/test_post.py deleted file mode 100644 index 7b631f7..0000000 --- a/test/test_paths/test_organizations_users_user_signin_link/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.organizations_users_user_signin_link import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOrganizationsUsersUserSigninLink(ApiTestMixin, unittest.TestCase): - """ - OrganizationsUsersUserSigninLink unit test stubs - Create a sign in link for an organization user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores/__init__.py b/test/test_paths/test_scores/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores/test_post.py b/test/test_paths/test_scores/test_post.py deleted file mode 100644 index e47f111..0000000 --- a/test/test_paths/test_scores/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScores(ApiTestMixin, unittest.TestCase): - """ - Scores unit test stubs - Create a new score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score/__init__.py b/test/test_paths/test_scores_score/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score/test_delete.py b/test/test_paths/test_scores_score/test_delete.py deleted file mode 100644 index 0288e68..0000000 --- a/test/test_paths/test_scores_score/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScore(ApiTestMixin, unittest.TestCase): - """ - ScoresScore unit test stubs - Delete a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score/test_get.py b/test/test_paths/test_scores_score/test_get.py deleted file mode 100644 index 7073fdc..0000000 --- a/test/test_paths/test_scores_score/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScore(ApiTestMixin, unittest.TestCase): - """ - ScoresScore unit test stubs - Get a score's metadata # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score/test_put.py b/test/test_paths/test_scores_score/test_put.py deleted file mode 100644 index 8894fba..0000000 --- a/test/test_paths/test_scores_score/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScore(ApiTestMixin, unittest.TestCase): - """ - ScoresScore unit test stubs - Edit a score's metadata # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators/__init__.py b/test/test_paths/test_scores_score_collaborators/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_collaborators/test_get.py b/test/test_paths/test_scores_score_collaborators/test_get.py deleted file mode 100644 index 5cfc7e1..0000000 --- a/test/test_paths/test_scores_score_collaborators/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_collaborators import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCollaborators(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCollaborators unit test stubs - List the collaborators # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators/test_post.py b/test/test_paths/test_scores_score_collaborators/test_post.py deleted file mode 100644 index 1f8937e..0000000 --- a/test/test_paths/test_scores_score_collaborators/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_collaborators import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCollaborators(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCollaborators unit test stubs - Add a new collaborator # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/__init__.py b/test/test_paths/test_scores_score_collaborators_collaborator/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py b/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py deleted file mode 100644 index 40dab5a..0000000 --- a/test/test_paths/test_scores_score_collaborators_collaborator/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_collaborators_collaborator import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCollaboratorsCollaborator(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCollaboratorsCollaborator unit test stubs - Delete a collaborator # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py b/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py deleted file mode 100644 index c292928..0000000 --- a/test/test_paths/test_scores_score_collaborators_collaborator/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_collaborators_collaborator import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCollaboratorsCollaborator(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCollaboratorsCollaborator unit test stubs - Get a collaborator # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments/__init__.py b/test/test_paths/test_scores_score_comments/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_comments/test_get.py b/test/test_paths/test_scores_score_comments/test_get.py deleted file mode 100644 index abc3133..0000000 --- a/test/test_paths/test_scores_score_comments/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreComments(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreComments unit test stubs - List comments # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments/test_post.py b/test/test_paths/test_scores_score_comments/test_post.py deleted file mode 100644 index c63ae0f..0000000 --- a/test/test_paths/test_scores_score_comments/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreComments(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreComments unit test stubs - Post a new comment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment/__init__.py b/test/test_paths/test_scores_score_comments_comment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_comments_comment/test_delete.py b/test/test_paths/test_scores_score_comments_comment/test_delete.py deleted file mode 100644 index eeb3b42..0000000 --- a/test/test_paths/test_scores_score_comments_comment/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments_comment import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCommentsComment(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCommentsComment unit test stubs - Delete a comment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment/test_put.py b/test/test_paths/test_scores_score_comments_comment/test_put.py deleted file mode 100644 index d89258f..0000000 --- a/test/test_paths/test_scores_score_comments_comment/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments_comment import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCommentsComment(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCommentsComment unit test stubs - Update an existing comment # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/__init__.py b/test/test_paths/test_scores_score_comments_comment_resolved/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py b/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py deleted file mode 100644 index dcb124b..0000000 --- a/test/test_paths/test_scores_score_comments_comment_resolved/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments_comment_resolved import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCommentsCommentResolved(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCommentsCommentResolved unit test stubs - Mark the comment as unresolved # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py b/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py deleted file mode 100644 index e6b2a1b..0000000 --- a/test/test_paths/test_scores_score_comments_comment_resolved/test_put.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_comments_comment_resolved import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreCommentsCommentResolved(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreCommentsCommentResolved unit test stubs - Mark the comment as resolved # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_fork/__init__.py b/test/test_paths/test_scores_score_fork/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_fork/test_post.py b/test/test_paths/test_scores_score_fork/test_post.py deleted file mode 100644 index 578caef..0000000 --- a/test/test_paths/test_scores_score_fork/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_fork import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreFork(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreFork unit test stubs - Fork a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_revisions/__init__.py b/test/test_paths/test_scores_score_revisions/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_revisions/test_get.py b/test/test_paths/test_scores_score_revisions/test_get.py deleted file mode 100644 index c538dca..0000000 --- a/test/test_paths/test_scores_score_revisions/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_revisions import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreRevisions(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreRevisions unit test stubs - List the revisions # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_revisions/test_post.py b/test/test_paths/test_scores_score_revisions/test_post.py deleted file mode 100644 index 666ad5e..0000000 --- a/test/test_paths/test_scores_score_revisions/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_revisions import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreRevisions(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreRevisions unit test stubs - Create a new revision # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision/__init__.py b/test/test_paths/test_scores_score_revisions_revision/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_revisions_revision/test_get.py b/test/test_paths/test_scores_score_revisions_revision/test_get.py deleted file mode 100644 index 55ef03f..0000000 --- a/test/test_paths/test_scores_score_revisions_revision/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_revisions_revision import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreRevisionsRevision(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreRevisionsRevision unit test stubs - Get a score revision # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision_format/__init__.py b/test/test_paths/test_scores_score_revisions_revision_format/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_revisions_revision_format/test_get.py b/test/test_paths/test_scores_score_revisions_revision_format/test_get.py deleted file mode 100644 index dda41d5..0000000 --- a/test/test_paths/test_scores_score_revisions_revision_format/test_get.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_revisions_revision_format import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreRevisionsRevisionFormat(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreRevisionsRevisionFormat unit test stubs - Get a score revision data # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - - - - - - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py b/test/test_paths/test_scores_score_revisions_revision_format_task/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py b/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py deleted file mode 100644 index 9974936..0000000 --- a/test/test_paths/test_scores_score_revisions_revision_format_task/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_revisions_revision_format_task import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreRevisionsRevisionFormatTask(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreRevisionsRevisionFormatTask unit test stubs - Create a new score export task # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_submissions/__init__.py b/test/test_paths/test_scores_score_submissions/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_submissions/test_get.py b/test/test_paths/test_scores_score_submissions/test_get.py deleted file mode 100644 index 6b07ff3..0000000 --- a/test/test_paths/test_scores_score_submissions/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_submissions import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreSubmissions(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreSubmissions unit test stubs - List submissions related to the score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_tracks/__init__.py b/test/test_paths/test_scores_score_tracks/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_tracks/test_get.py b/test/test_paths/test_scores_score_tracks/test_get.py deleted file mode 100644 index 0e7ef65..0000000 --- a/test/test_paths/test_scores_score_tracks/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_tracks import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreTracks(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreTracks unit test stubs - List the audio or video tracks linked to a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_tracks/test_post.py b/test/test_paths/test_scores_score_tracks/test_post.py deleted file mode 100644 index 5e1449c..0000000 --- a/test/test_paths/test_scores_score_tracks/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_tracks import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreTracks(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreTracks unit test stubs - Add a new video or audio track to the score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/__init__.py b/test/test_paths/test_scores_score_tracks_track/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_tracks_track/test_delete.py b/test/test_paths/test_scores_score_tracks_track/test_delete.py deleted file mode 100644 index 9559c8e..0000000 --- a/test/test_paths/test_scores_score_tracks_track/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_tracks_track import delete # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreTracksTrack unit test stubs - Remove an audio or video track linked to the score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/test_get.py b/test/test_paths/test_scores_score_tracks_track/test_get.py deleted file mode 100644 index add853b..0000000 --- a/test/test_paths/test_scores_score_tracks_track/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_tracks_track import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreTracksTrack unit test stubs - Retrieve the details of an audio or video track linked to a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_tracks_track/test_put.py b/test/test_paths/test_scores_score_tracks_track/test_put.py deleted file mode 100644 index 17e3d94..0000000 --- a/test/test_paths/test_scores_score_tracks_track/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_tracks_track import put # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreTracksTrack(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreTracksTrack unit test stubs - Update an audio or video track linked to a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_scores_score_untrash/__init__.py b/test/test_paths/test_scores_score_untrash/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_scores_score_untrash/test_post.py b/test/test_paths/test_scores_score_untrash/test_post.py deleted file mode 100644 index 8308fe2..0000000 --- a/test/test_paths/test_scores_score_untrash/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.scores_score_untrash import post # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestScoresScoreUntrash(ApiTestMixin, unittest.TestCase): - """ - ScoresScoreUntrash unit test stubs - Untrash a score # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_tasks_task/__init__.py b/test/test_paths/test_tasks_task/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_tasks_task/test_get.py b/test/test_paths/test_tasks_task/test_get.py deleted file mode 100644 index 9c0686e..0000000 --- a/test/test_paths/test_tasks_task/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.tasks_task import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestTasksTask(ApiTestMixin, unittest.TestCase): - """ - TasksTask unit test stubs - Get a task details # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_users_user/__init__.py b/test/test_paths/test_users_user/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_users_user/test_get.py b/test/test_paths/test_users_user/test_get.py deleted file mode 100644 index 53e2960..0000000 --- a/test/test_paths/test_users_user/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.users_user import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUsersUser(ApiTestMixin, unittest.TestCase): - """ - UsersUser unit test stubs - Get a public user profile # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_users_user_likes/__init__.py b/test/test_paths/test_users_user_likes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_users_user_likes/test_get.py b/test/test_paths/test_users_user_likes/test_get.py deleted file mode 100644 index a89a7ae..0000000 --- a/test/test_paths/test_users_user_likes/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.users_user_likes import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUsersUserLikes(ApiTestMixin, unittest.TestCase): - """ - UsersUserLikes unit test stubs - List liked scores # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paths/test_users_user_scores/__init__.py b/test/test_paths/test_users_user_scores/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_paths/test_users_user_scores/test_get.py b/test/test_paths/test_users_user_scores/test_get.py deleted file mode 100644 index 8ae4107..0000000 --- a/test/test_paths/test_users_user_scores/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import flat_api -from flat_api.paths.users_user_scores import get # noqa: E501 -from flat_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUsersUserScores(ApiTestMixin, unittest.TestCase): - """ - UsersUserScores unit test stubs - List user's scores # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_models/test_resource_collaborator.py b/test/test_resource_collaborator.py similarity index 81% rename from test/test_models/test_resource_collaborator.py rename to test/test_resource_collaborator.py index fa35dbd..0d1f20d 100644 --- a/test/test_models/test_resource_collaborator.py +++ b/test/test_resource_collaborator.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.group import Group +from flat_api.model.user_public import UserPublic +globals()['Group'] = Group +globals()['UserPublic'] = UserPublic from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api import configuration class TestResourceCollaborator(unittest.TestCase): """ResourceCollaborator unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResourceCollaborator(self): + """Test ResourceCollaborator""" + # FIXME: construct object with mandatory attributes with example values + # model = ResourceCollaborator() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_resource_collaborator_creation.py b/test/test_resource_collaborator_creation.py similarity index 86% rename from test/test_models/test_resource_collaborator_creation.py rename to test/test_resource_collaborator_creation.py index 916b80b..1295668 100644 --- a/test/test_models/test_resource_collaborator_creation.py +++ b/test/test_resource_collaborator_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api import configuration class TestResourceCollaboratorCreation(unittest.TestCase): """ResourceCollaboratorCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResourceCollaboratorCreation(self): + """Test ResourceCollaboratorCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ResourceCollaboratorCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_resource_rights.py b/test/test_resource_rights.py similarity index 87% rename from test/test_models/test_resource_rights.py rename to test/test_resource_rights.py index f366596..192bf66 100644 --- a/test/test_models/test_resource_rights.py +++ b/test/test_resource_rights.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.resource_rights import ResourceRights -from flat_api import configuration class TestResourceRights(unittest.TestCase): """ResourceRights unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResourceRights(self): + """Test ResourceRights""" + # FIXME: construct object with mandatory attributes with example values + # model = ResourceRights() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_score_api.py b/test/test_score_api.py new file mode 100644 index 0000000..211ff88 --- /dev/null +++ b/test/test_score_api.py @@ -0,0 +1,239 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.score_api import ScoreApi # noqa: E501 + + +class TestScoreApi(unittest.TestCase): + """ScoreApi unit test stubs""" + + def setUp(self): + self.api = ScoreApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_score_collaborator(self): + """Test case for add_score_collaborator + + Add a new collaborator # noqa: E501 + """ + pass + + def test_add_score_track(self): + """Test case for add_score_track + + Add a new video or audio track to the score # noqa: E501 + """ + pass + + def test_create_export_task(self): + """Test case for create_export_task + + Create a new score export task # noqa: E501 + """ + pass + + def test_create_score(self): + """Test case for create_score + + Create a new score # noqa: E501 + """ + pass + + def test_create_score_revision(self): + """Test case for create_score_revision + + Create a new revision # noqa: E501 + """ + pass + + def test_delete_score(self): + """Test case for delete_score + + Delete a score # noqa: E501 + """ + pass + + def test_delete_score_comment(self): + """Test case for delete_score_comment + + Delete a comment # noqa: E501 + """ + pass + + def test_delete_score_track(self): + """Test case for delete_score_track + + Remove an audio or video track linked to the score # noqa: E501 + """ + pass + + def test_edit_score(self): + """Test case for edit_score + + Edit a score's metadata # noqa: E501 + """ + pass + + def test_fork_score(self): + """Test case for fork_score + + Fork a score # noqa: E501 + """ + pass + + def test_ger_user_likes(self): + """Test case for ger_user_likes + + List liked scores # noqa: E501 + """ + pass + + def test_get_group_scores(self): + """Test case for get_group_scores + + List group's scores # noqa: E501 + """ + pass + + def test_get_score(self): + """Test case for get_score + + Get a score's metadata # noqa: E501 + """ + pass + + def test_get_score_collaborator(self): + """Test case for get_score_collaborator + + Get a collaborator # noqa: E501 + """ + pass + + def test_get_score_collaborators(self): + """Test case for get_score_collaborators + + List the collaborators # noqa: E501 + """ + pass + + def test_get_score_comments(self): + """Test case for get_score_comments + + List comments # noqa: E501 + """ + pass + + def test_get_score_revision(self): + """Test case for get_score_revision + + Get a score revision # noqa: E501 + """ + pass + + def test_get_score_revision_data(self): + """Test case for get_score_revision_data + + Get a score revision data # noqa: E501 + """ + pass + + def test_get_score_revisions(self): + """Test case for get_score_revisions + + List the revisions # noqa: E501 + """ + pass + + def test_get_score_submissions(self): + """Test case for get_score_submissions + + List submissions related to the score # noqa: E501 + """ + pass + + def test_get_score_track(self): + """Test case for get_score_track + + Retrieve the details of an audio or video track linked to a score # noqa: E501 + """ + pass + + def test_get_user_scores(self): + """Test case for get_user_scores + + List user's scores # noqa: E501 + """ + pass + + def test_list_score_tracks(self): + """Test case for list_score_tracks + + List the audio or video tracks linked to a score # noqa: E501 + """ + pass + + def test_mark_score_comment_resolved(self): + """Test case for mark_score_comment_resolved + + Mark the comment as resolved # noqa: E501 + """ + pass + + def test_mark_score_comment_unresolved(self): + """Test case for mark_score_comment_unresolved + + Mark the comment as unresolved # noqa: E501 + """ + pass + + def test_post_score_comment(self): + """Test case for post_score_comment + + Post a new comment # noqa: E501 + """ + pass + + def test_remove_score_collaborator(self): + """Test case for remove_score_collaborator + + Delete a collaborator # noqa: E501 + """ + pass + + def test_untrash_score(self): + """Test case for untrash_score + + Untrash a score # noqa: E501 + """ + pass + + def test_update_score_comment(self): + """Test case for update_score_comment + + Update an existing comment # noqa: E501 + """ + pass + + def test_update_score_track(self): + """Test case for update_score_track + + Update an audio or video track linked to a score # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_score_comment.py b/test/test_score_comment.py similarity index 78% rename from test/test_models/test_score_comment.py rename to test/test_score_comment.py index fc89095..6afe49a 100644 --- a/test/test_models/test_score_comment.py +++ b/test/test_score_comment.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_comment_context import ScoreCommentContext +from flat_api.model.score_comment_moderation import ScoreCommentModeration +globals()['ScoreCommentContext'] = ScoreCommentContext +globals()['ScoreCommentModeration'] = ScoreCommentModeration from flat_api.model.score_comment import ScoreComment -from flat_api import configuration class TestScoreComment(unittest.TestCase): """ScoreComment unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreComment(self): + """Test ScoreComment""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreComment() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_comment_context.py b/test/test_score_comment_context.py similarity index 87% rename from test/test_models/test_score_comment_context.py rename to test/test_score_comment_context.py index 405918a..8ac29bb 100644 --- a/test/test_models/test_score_comment_context.py +++ b/test/test_score_comment_context.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_comment_context import ScoreCommentContext -from flat_api import configuration class TestScoreCommentContext(unittest.TestCase): """ScoreCommentContext unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentContext(self): + """Test ScoreCommentContext""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCommentContext() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_comment_creation.py b/test/test_score_comment_creation.py similarity index 82% rename from test/test_models/test_score_comment_creation.py rename to test/test_score_comment_creation.py index 445ce63..d064bd8 100644 --- a/test/test_models/test_score_comment_creation.py +++ b/test/test_score_comment_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_comment_context import ScoreCommentContext +globals()['ScoreCommentContext'] = ScoreCommentContext from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api import configuration class TestScoreCommentCreation(unittest.TestCase): """ScoreCommentCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentCreation(self): + """Test ScoreCommentCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCommentCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_score_comment_moderation.py b/test/test_score_comment_moderation.py new file mode 100644 index 0000000..48644d3 --- /dev/null +++ b/test/test_score_comment_moderation.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.score_comment_moderation import ScoreCommentModeration + + +class TestScoreCommentModeration(unittest.TestCase): + """ScoreCommentModeration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentModeration(self): + """Test ScoreCommentModeration""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCommentModeration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_score_comment_update.py b/test/test_score_comment_update.py similarity index 82% rename from test/test_models/test_score_comment_update.py rename to test/test_score_comment_update.py index 8c18a27..b45cabb 100644 --- a/test/test_models/test_score_comment_update.py +++ b/test/test_score_comment_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_comment_context import ScoreCommentContext +globals()['ScoreCommentContext'] = ScoreCommentContext from flat_api.model.score_comment_update import ScoreCommentUpdate -from flat_api import configuration class TestScoreCommentUpdate(unittest.TestCase): """ScoreCommentUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentUpdate(self): + """Test ScoreCommentUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCommentUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_comments_counts.py b/test/test_score_comments_counts.py similarity index 87% rename from test/test_models/test_score_comments_counts.py rename to test/test_score_comments_counts.py index f2be2df..7697cdf 100644 --- a/test/test_models/test_score_comments_counts.py +++ b/test/test_score_comments_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_comments_counts import ScoreCommentsCounts -from flat_api import configuration class TestScoreCommentsCounts(unittest.TestCase): """ScoreCommentsCounts unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCommentsCounts(self): + """Test ScoreCommentsCounts""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCommentsCounts() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_creation.py b/test/test_score_creation.py similarity index 76% rename from test/test_models/test_score_creation.py rename to test/test_score_creation.py index 2cb21c7..15de76b 100644 --- a/test/test_models/test_score_creation.py +++ b/test/test_score_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_source import ScoreSource +globals()['ScoreCreationBuilderData'] = ScoreCreationBuilderData +globals()['ScorePrivacy'] = ScorePrivacy +globals()['ScoreSource'] = ScoreSource from flat_api.model.score_creation import ScoreCreation -from flat_api import configuration class TestScoreCreation(unittest.TestCase): """ScoreCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreation(self): + """Test ScoreCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_score_creation_builder_data.py b/test/test_score_creation_builder_data.py new file mode 100644 index 0000000..65320eb --- /dev/null +++ b/test/test_score_creation_builder_data.py @@ -0,0 +1,40 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +globals()['ScoreCreationBuilderDataLayoutData'] = ScoreCreationBuilderDataLayoutData +globals()['ScoreCreationBuilderDataScoreData'] = ScoreCreationBuilderDataScoreData +from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData + + +class TestScoreCreationBuilderData(unittest.TestCase): + """ScoreCreationBuilderData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderData(self): + """Test ScoreCreationBuilderData""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreationBuilderData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_layout_data.py b/test/test_score_creation_builder_data_layout_data.py new file mode 100644 index 0000000..c476990 --- /dev/null +++ b/test/test_score_creation_builder_data_layout_data.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData + + +class TestScoreCreationBuilderDataLayoutData(unittest.TestCase): + """ScoreCreationBuilderDataLayoutData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataLayoutData(self): + """Test ScoreCreationBuilderDataLayoutData""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreationBuilderDataLayoutData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_score_data.py b/test/test_score_creation_builder_data_score_data.py new file mode 100644 index 0000000..4875062 --- /dev/null +++ b/test/test_score_creation_builder_data_score_data.py @@ -0,0 +1,38 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +globals()['ScoreCreationBuilderDataScoreDataInstrumentsInner'] = ScoreCreationBuilderDataScoreDataInstrumentsInner +from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData + + +class TestScoreCreationBuilderDataScoreData(unittest.TestCase): + """ScoreCreationBuilderDataScoreData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataScoreData(self): + """Test ScoreCreationBuilderDataScoreData""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreationBuilderDataScoreData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_score_creation_builder_data_score_data_instruments_inner.py b/test/test_score_creation_builder_data_score_data_instruments_inner.py new file mode 100644 index 0000000..064172b --- /dev/null +++ b/test/test_score_creation_builder_data_score_data_instruments_inner.py @@ -0,0 +1,36 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner + + +class TestScoreCreationBuilderDataScoreDataInstrumentsInner(unittest.TestCase): + """ScoreCreationBuilderDataScoreDataInstrumentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationBuilderDataScoreDataInstrumentsInner(self): + """Test ScoreCreationBuilderDataScoreDataInstrumentsInner""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreationBuilderDataScoreDataInstrumentsInner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_score_creation_type.py b/test/test_score_creation_type.py similarity index 87% rename from test/test_models/test_score_creation_type.py rename to test/test_score_creation_type.py index 78530b9..83d3229 100644 --- a/test/test_models/test_score_creation_type.py +++ b/test/test_score_creation_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_creation_type import ScoreCreationType -from flat_api import configuration class TestScoreCreationType(unittest.TestCase): """ScoreCreationType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreCreationType(self): + """Test ScoreCreationType""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreCreationType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_details.py b/test/test_score_details.py similarity index 59% rename from test/test_models/test_score_details.py rename to test/test_score_details.py index e75b842..1bbb47c 100644 --- a/test/test_models/test_score_details.py +++ b/test/test_score_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,48 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.resource_collaborator import ResourceCollaborator +from flat_api.model.resource_rights import ResourceRights +from flat_api.model.score_comments_counts import ScoreCommentsCounts +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_likes_counts import ScoreLikesCounts +from flat_api.model.score_plays_counts import ScorePlaysCounts +from flat_api.model.score_privacy import ScorePrivacy +from flat_api.model.score_views_counts import ScoreViewsCounts +from flat_api.model.user_public_summary import UserPublicSummary +globals()['ResourceCollaborator'] = ResourceCollaborator +globals()['ResourceRights'] = ResourceRights +globals()['ScoreCommentsCounts'] = ScoreCommentsCounts +globals()['ScoreCreationType'] = ScoreCreationType +globals()['ScoreLicense'] = ScoreLicense +globals()['ScoreLikesCounts'] = ScoreLikesCounts +globals()['ScorePlaysCounts'] = ScorePlaysCounts +globals()['ScorePrivacy'] = ScorePrivacy +globals()['ScoreViewsCounts'] = ScoreViewsCounts +globals()['UserPublicSummary'] = UserPublicSummary from flat_api.model.score_details import ScoreDetails -from flat_api import configuration class TestScoreDetails(unittest.TestCase): """ScoreDetails unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreDetails(self): + """Test ScoreDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreDetails() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_fork.py b/test/test_score_fork.py similarity index 87% rename from test/test_models/test_score_fork.py rename to test/test_score_fork.py index fc0fdd1..be0abf2 100644 --- a/test/test_models/test_score_fork.py +++ b/test/test_score_fork.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_fork import ScoreFork -from flat_api import configuration class TestScoreFork(unittest.TestCase): """ScoreFork unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreFork(self): + """Test ScoreFork""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreFork() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_license.py b/test/test_score_license.py similarity index 87% rename from test/test_models/test_score_license.py rename to test/test_score_license.py index a5d8631..cd194d4 100644 --- a/test/test_models/test_score_license.py +++ b/test/test_score_license.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_license import ScoreLicense -from flat_api import configuration class TestScoreLicense(unittest.TestCase): """ScoreLicense unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreLicense(self): + """Test ScoreLicense""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreLicense() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_likes_counts.py b/test/test_score_likes_counts.py similarity index 87% rename from test/test_models/test_score_likes_counts.py rename to test/test_score_likes_counts.py index 4f13c03..f0ca1cb 100644 --- a/test/test_models/test_score_likes_counts.py +++ b/test/test_score_likes_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_likes_counts import ScoreLikesCounts -from flat_api import configuration class TestScoreLikesCounts(unittest.TestCase): """ScoreLikesCounts unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreLikesCounts(self): + """Test ScoreLikesCounts""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreLikesCounts() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_modification.py b/test/test_score_modification.py similarity index 77% rename from test/test_models/test_score_modification.py rename to test/test_score_modification.py index cbb84b0..53f8c71 100644 --- a/test/test_models/test_score_modification.py +++ b/test/test_score_modification.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_creation_type import ScoreCreationType +from flat_api.model.score_license import ScoreLicense +from flat_api.model.score_privacy import ScorePrivacy +globals()['ScoreCreationType'] = ScoreCreationType +globals()['ScoreLicense'] = ScoreLicense +globals()['ScorePrivacy'] = ScorePrivacy from flat_api.model.score_modification import ScoreModification -from flat_api import configuration class TestScoreModification(unittest.TestCase): """ScoreModification unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreModification(self): + """Test ScoreModification""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreModification() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_plays_counts.py b/test/test_score_plays_counts.py similarity index 87% rename from test/test_models/test_score_plays_counts.py rename to test/test_score_plays_counts.py index 0f5631c..abaffcd 100644 --- a/test/test_models/test_score_plays_counts.py +++ b/test/test_score_plays_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_plays_counts import ScorePlaysCounts -from flat_api import configuration class TestScorePlaysCounts(unittest.TestCase): """ScorePlaysCounts unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScorePlaysCounts(self): + """Test ScorePlaysCounts""" + # FIXME: construct object with mandatory attributes with example values + # model = ScorePlaysCounts() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_privacy.py b/test/test_score_privacy.py similarity index 87% rename from test/test_models/test_score_privacy.py rename to test/test_score_privacy.py index b506edc..d3ee952 100644 --- a/test/test_models/test_score_privacy.py +++ b/test/test_score_privacy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_privacy import ScorePrivacy -from flat_api import configuration class TestScorePrivacy(unittest.TestCase): """ScorePrivacy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScorePrivacy(self): + """Test ScorePrivacy""" + # FIXME: construct object with mandatory attributes with example values + # model = ScorePrivacy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_revision.py b/test/test_score_revision.py similarity index 82% rename from test/test_models/test_score_revision.py rename to test/test_score_revision.py index cf5c25f..1f12689 100644 --- a/test/test_models/test_score_revision.py +++ b/test/test_score_revision.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_revision_statistics import ScoreRevisionStatistics +globals()['ScoreRevisionStatistics'] = ScoreRevisionStatistics from flat_api.model.score_revision import ScoreRevision -from flat_api import configuration class TestScoreRevision(unittest.TestCase): """ScoreRevision unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreRevision(self): + """Test ScoreRevision""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreRevision() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_revision_creation.py b/test/test_score_revision_creation.py similarity index 86% rename from test/test_models/test_score_revision_creation.py rename to test/test_score_revision_creation.py index 6473f6a..d6fb564 100644 --- a/test/test_models/test_score_revision_creation.py +++ b/test/test_score_revision_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api import configuration class TestScoreRevisionCreation(unittest.TestCase): """ScoreRevisionCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreRevisionCreation(self): + """Test ScoreRevisionCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreRevisionCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_revision_statistics.py b/test/test_score_revision_statistics.py similarity index 86% rename from test/test_models/test_score_revision_statistics.py rename to test/test_score_revision_statistics.py index fe9ceda..4d94cdd 100644 --- a/test/test_models/test_score_revision_statistics.py +++ b/test/test_score_revision_statistics.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_revision_statistics import ScoreRevisionStatistics -from flat_api import configuration class TestScoreRevisionStatistics(unittest.TestCase): """ScoreRevisionStatistics unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreRevisionStatistics(self): + """Test ScoreRevisionStatistics""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreRevisionStatistics() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_source.py b/test/test_score_source.py similarity index 87% rename from test/test_models/test_score_source.py rename to test/test_score_source.py index b85ae06..0c305a9 100644 --- a/test/test_models/test_score_source.py +++ b/test/test_score_source.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_source import ScoreSource -from flat_api import configuration class TestScoreSource(unittest.TestCase): """ScoreSource unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreSource(self): + """Test ScoreSource""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreSource() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track.py b/test/test_score_track.py similarity index 77% rename from test/test_models/test_score_track.py rename to test/test_score_track.py index f9ca2de..19cd2b2 100644 --- a/test/test_models/test_score_track.py +++ b/test/test_score_track.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +from flat_api.model.score_track_type import ScoreTrackType +globals()['ScoreTrackPoint'] = ScoreTrackPoint +globals()['ScoreTrackState'] = ScoreTrackState +globals()['ScoreTrackType'] = ScoreTrackType from flat_api.model.score_track import ScoreTrack -from flat_api import configuration class TestScoreTrack(unittest.TestCase): """ScoreTrack unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrack(self): + """Test ScoreTrack""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrack() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track_creation.py b/test/test_score_track_creation.py similarity index 79% rename from test/test_models/test_score_track_creation.py rename to test/test_score_track_creation.py index 74d436e..b35e722 100644 --- a/test/test_models/test_score_track_creation.py +++ b/test/test_score_track_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +globals()['ScoreTrackPoint'] = ScoreTrackPoint +globals()['ScoreTrackState'] = ScoreTrackState from flat_api.model.score_track_creation import ScoreTrackCreation -from flat_api import configuration class TestScoreTrackCreation(unittest.TestCase): """ScoreTrackCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrackCreation(self): + """Test ScoreTrackCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrackCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track_point.py b/test/test_score_track_point.py similarity index 87% rename from test/test_models/test_score_track_point.py rename to test/test_score_track_point.py index 07407cb..3d6dac5 100644 --- a/test/test_models/test_score_track_point.py +++ b/test/test_score_track_point.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api import configuration class TestScoreTrackPoint(unittest.TestCase): """ScoreTrackPoint unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrackPoint(self): + """Test ScoreTrackPoint""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrackPoint() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track_state.py b/test/test_score_track_state.py similarity index 87% rename from test/test_models/test_score_track_state.py rename to test/test_score_track_state.py index 00a2626..b7b58b2 100644 --- a/test/test_models/test_score_track_state.py +++ b/test/test_score_track_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_track_state import ScoreTrackState -from flat_api import configuration class TestScoreTrackState(unittest.TestCase): """ScoreTrackState unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrackState(self): + """Test ScoreTrackState""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrackState() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track_type.py b/test/test_score_track_type.py similarity index 87% rename from test/test_models/test_score_track_type.py rename to test/test_score_track_type.py index 99f9431..e5a69cd 100644 --- a/test/test_models/test_score_track_type.py +++ b/test/test_score_track_type.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_track_type import ScoreTrackType -from flat_api import configuration class TestScoreTrackType(unittest.TestCase): """ScoreTrackType unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrackType(self): + """Test ScoreTrackType""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrackType() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_track_update.py b/test/test_score_track_update.py similarity index 80% rename from test/test_models/test_score_track_update.py rename to test/test_score_track_update.py index 7d13c38..0ae18e3 100644 --- a/test/test_models/test_score_track_update.py +++ b/test/test_score_track_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.score_track_point import ScoreTrackPoint +from flat_api.model.score_track_state import ScoreTrackState +globals()['ScoreTrackPoint'] = ScoreTrackPoint +globals()['ScoreTrackState'] = ScoreTrackState from flat_api.model.score_track_update import ScoreTrackUpdate -from flat_api import configuration class TestScoreTrackUpdate(unittest.TestCase): """ScoreTrackUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreTrackUpdate(self): + """Test ScoreTrackUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreTrackUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_score_views_counts.py b/test/test_score_views_counts.py similarity index 87% rename from test/test_models/test_score_views_counts.py rename to test/test_score_views_counts.py index 20b5de4..ce806b3 100644 --- a/test/test_models/test_score_views_counts.py +++ b/test/test_score_views_counts.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.score_views_counts import ScoreViewsCounts -from flat_api import configuration class TestScoreViewsCounts(unittest.TestCase): """ScoreViewsCounts unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScoreViewsCounts(self): + """Test ScoreViewsCounts""" + # FIXME: construct object with mandatory attributes with example values + # model = ScoreViewsCounts() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_task.py b/test/test_task.py similarity index 81% rename from test/test_models/test_task.py rename to test/test_task.py index 58a78ae..fcdbb13 100644 --- a/test/test_models/test_task.py +++ b/test/test_task.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.task_progress import TaskProgress +from flat_api.model.task_result import TaskResult +globals()['TaskProgress'] = TaskProgress +globals()['TaskResult'] = TaskResult from flat_api.model.task import Task -from flat_api import configuration class TestTask(unittest.TestCase): """Task unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTask(self): + """Test Task""" + # FIXME: construct object with mandatory attributes with example values + # model = Task() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_copy_response.py b/test/test_task_api.py similarity index 84% rename from test/test_models/test_assignment_copy_response.py rename to test/test_task_api.py index 57cade7..fef75db 100644 --- a/test/test_models/test_assignment_copy_response.py +++ b/test/test_task_api.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + import unittest import flat_api -from flat_api.model.assignment_copy_response import AssignmentCopyResponse -from flat_api import configuration +from flat_api.api.task_api import TaskApi # noqa: E501 + + +class TestTaskApi(unittest.TestCase): + """TaskApi unit test stubs""" + + def setUp(self): + self.api = TaskApi() # noqa: E501 + + def tearDown(self): + pass + def test_get_task(self): + """Test case for get_task -class TestAssignmentCopyResponse(unittest.TestCase): - """AssignmentCopyResponse unit test stubs""" - _configuration = configuration.Configuration() + Get a task details # noqa: E501 + """ + pass if __name__ == '__main__': diff --git a/test/test_models/test_task_export_options.py b/test/test_task_export_options.py similarity index 87% rename from test/test_models/test_task_export_options.py rename to test/test_task_export_options.py index 8b106f2..19fe3c0 100644 --- a/test/test_models/test_task_export_options.py +++ b/test/test_task_export_options.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.task_export_options import TaskExportOptions -from flat_api import configuration class TestTaskExportOptions(unittest.TestCase): """TaskExportOptions unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaskExportOptions(self): + """Test TaskExportOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = TaskExportOptions() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_submission_history.py b/test/test_task_progress.py similarity index 81% rename from test/test_models/test_assignment_submission_history.py rename to test/test_task_progress.py index 9b9c3d8..89a2ab9 100644 --- a/test/test_models/test_assignment_submission_history.py +++ b/test/test_task_progress.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api import configuration +from flat_api.model.task_progress import TaskProgress + + +class TestTaskProgress(unittest.TestCase): + """TaskProgress unit test stubs""" + + def setUp(self): + pass + def tearDown(self): + pass -class TestAssignmentSubmissionHistory(unittest.TestCase): - """AssignmentSubmissionHistory unit test stubs""" - _configuration = configuration.Configuration() + def testTaskProgress(self): + """Test TaskProgress""" + # FIXME: construct object with mandatory attributes with example values + # model = TaskProgress() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_assignment_submission.py b/test/test_task_result.py similarity index 82% rename from test/test_models/test_assignment_submission.py rename to test/test_task_result.py index 6d88d0f..35950a8 100644 --- a/test/test_models/test_assignment_submission.py +++ b/test/test_task_result.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api import configuration +from flat_api.model.task_result import TaskResult + + +class TestTaskResult(unittest.TestCase): + """TaskResult unit test stubs""" + + def setUp(self): + pass + def tearDown(self): + pass -class TestAssignmentSubmission(unittest.TestCase): - """AssignmentSubmission unit test stubs""" - _configuration = configuration.Configuration() + def testTaskResult(self): + """Test TaskResult""" + # FIXME: construct object with mandatory attributes with example values + # model = TaskResult() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_admin_update.py b/test/test_user_admin_update.py similarity index 83% rename from test/test_models/test_user_admin_update.py rename to test/test_user_admin_update.py index b012b91..4bf63d7 100644 --- a/test/test_models/test_user_admin_update.py +++ b/test/test_user_admin_update.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.organization_roles import OrganizationRoles +globals()['OrganizationRoles'] = OrganizationRoles from flat_api.model.user_admin_update import UserAdminUpdate -from flat_api import configuration class TestUserAdminUpdate(unittest.TestCase): """UserAdminUpdate unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserAdminUpdate(self): + """Test UserAdminUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = UserAdminUpdate() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_user_api.py b/test/test_user_api.py new file mode 100644 index 0000000..d6a0065 --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,50 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import flat_api +from flat_api.api.user_api import UserApi # noqa: E501 + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_ger_user_likes(self): + """Test case for ger_user_likes + + List liked scores # noqa: E501 + """ + pass + + def test_get_user(self): + """Test case for get_user + + Get a public user profile # noqa: E501 + """ + pass + + def test_get_user_scores(self): + """Test case for get_user_scores + + List user's scores # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_user_azure_details.py b/test/test_user_azure_details.py similarity index 87% rename from test/test_models/test_user_azure_details.py rename to test/test_user_azure_details.py index fa34557..5e8dee2 100644 --- a/test/test_models/test_user_azure_details.py +++ b/test/test_user_azure_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.user_azure_details import UserAzureDetails -from flat_api import configuration class TestUserAzureDetails(unittest.TestCase): """UserAzureDetails unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserAzureDetails(self): + """Test UserAzureDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = UserAzureDetails() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_community_profile_links.py b/test/test_user_community_profile_links.py similarity index 86% rename from test/test_models/test_user_community_profile_links.py rename to test/test_user_community_profile_links.py index 4b7fa94..af6cb46 100644 --- a/test/test_models/test_user_community_profile_links.py +++ b/test/test_user_community_profile_links.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.user_community_profile_links import UserCommunityProfileLinks -from flat_api import configuration class TestUserCommunityProfileLinks(unittest.TestCase): """UserCommunityProfileLinks unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserCommunityProfileLinks(self): + """Test UserCommunityProfileLinks""" + # FIXME: construct object with mandatory attributes with example values + # model = UserCommunityProfileLinks() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_creation.py b/test/test_user_creation.py similarity index 84% rename from test/test_models/test_user_creation.py rename to test/test_user_creation.py index 59104f6..99cbfdf 100644 --- a/test/test_models/test_user_creation.py +++ b/test/test_user_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.flat_locales import FlatLocales +globals()['FlatLocales'] = FlatLocales from flat_api.model.user_creation import UserCreation -from flat_api import configuration class TestUserCreation(unittest.TestCase): """UserCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserCreation(self): + """Test UserCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = UserCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_details.py b/test/test_user_details.py similarity index 70% rename from test/test_models/test_user_details.py rename to test/test_user_details.py index 3c3b786..94d21fc 100644 --- a/test/test_models/test_user_details.py +++ b/test/test_user_details.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,38 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_roles import ClassRoles +from flat_api.model.flat_locales import FlatLocales +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_azure_details import UserAzureDetails +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks +globals()['ClassRoles'] = ClassRoles +globals()['FlatLocales'] = FlatLocales +globals()['OrganizationRoles'] = OrganizationRoles +globals()['UserAzureDetails'] = UserAzureDetails +globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks from flat_api.model.user_details import UserDetails -from flat_api import configuration class TestUserDetails(unittest.TestCase): """UserDetails unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserDetails(self): + """Test UserDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = UserDetails() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_details_admin.py b/test/test_user_details_admin.py similarity index 76% rename from test/test_models/test_user_details_admin.py rename to test/test_user_details_admin.py index fb3d560..64dba7d 100644 --- a/test/test_models/test_user_details_admin.py +++ b/test/test_user_details_admin.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_details_admin_license import UserDetailsAdminLicense +globals()['ClassRoles'] = ClassRoles +globals()['OrganizationRoles'] = OrganizationRoles +globals()['UserDetailsAdminLicense'] = UserDetailsAdminLicense from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api import configuration class TestUserDetailsAdmin(unittest.TestCase): """UserDetailsAdmin unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserDetailsAdmin(self): + """Test UserDetailsAdmin""" + # FIXME: construct object with mandatory attributes with example values + # model = UserDetailsAdmin() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py new file mode 100644 index 0000000..69788a4 --- /dev/null +++ b/test/test_user_details_admin_license.py @@ -0,0 +1,40 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + + The version of the OpenAPI document: 2.18.0 + Contact: developers@flat.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import flat_api +from flat_api.model.license_mode import LicenseMode +from flat_api.model.license_sources import LicenseSources +globals()['LicenseMode'] = LicenseMode +globals()['LicenseSources'] = LicenseSources +from flat_api.model.user_details_admin_license import UserDetailsAdminLicense + + +class TestUserDetailsAdminLicense(unittest.TestCase): + """UserDetailsAdminLicense unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserDetailsAdminLicense(self): + """Test UserDetailsAdminLicense""" + # FIXME: construct object with mandatory attributes with example values + # model = UserDetailsAdminLicense() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_user_public.py b/test/test_user_public.py similarity index 76% rename from test/test_models/test_user_public.py rename to test/test_user_public.py index 1b53b35..8563c5d 100644 --- a/test/test_models/test_user_public.py +++ b/test/test_user_public.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,34 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles +from flat_api.model.user_community_profile_links import UserCommunityProfileLinks +globals()['ClassRoles'] = ClassRoles +globals()['OrganizationRoles'] = OrganizationRoles +globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks from flat_api.model.user_public import UserPublic -from flat_api import configuration class TestUserPublic(unittest.TestCase): """UserPublic unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserPublic(self): + """Test UserPublic""" + # FIXME: construct object with mandatory attributes with example values + # model = UserPublic() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_public_summary.py b/test/test_user_public_summary.py similarity index 80% rename from test/test_models/test_user_public_summary.py rename to test/test_user_public_summary.py index 887a993..9a74243 100644 --- a/test/test_models/test_user_public_summary.py +++ b/test/test_user_public_summary.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,32 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api +from flat_api.model.class_roles import ClassRoles +from flat_api.model.organization_roles import OrganizationRoles +globals()['ClassRoles'] = ClassRoles +globals()['OrganizationRoles'] = OrganizationRoles from flat_api.model.user_public_summary import UserPublicSummary -from flat_api import configuration class TestUserPublicSummary(unittest.TestCase): """UserPublicSummary unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserPublicSummary(self): + """Test UserPublicSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = UserPublicSummary() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_signin_link.py b/test/test_user_signin_link.py similarity index 87% rename from test/test_models/test_user_signin_link.py rename to test/test_user_signin_link.py index 5397aa0..73bdcaf 100644 --- a/test/test_models/test_user_signin_link.py +++ b/test/test_user_signin_link.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.user_signin_link import UserSigninLink -from flat_api import configuration class TestUserSigninLink(unittest.TestCase): """UserSigninLink unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSigninLink(self): + """Test UserSigninLink""" + # FIXME: construct object with mandatory attributes with example values + # model = UserSigninLink() # noqa: E501 + pass if __name__ == '__main__': diff --git a/test/test_models/test_user_signin_link_creation.py b/test/test_user_signin_link_creation.py similarity index 86% rename from test/test_models/test_user_signin_link_creation.py rename to test/test_user_signin_link_creation.py index c20d29f..0e10dea 100644 --- a/test/test_models/test_user_signin_link_creation.py +++ b/test/test_user_signin_link_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ Flat API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import flat_api from flat_api.model.user_signin_link_creation import UserSigninLinkCreation -from flat_api import configuration class TestUserSigninLinkCreation(unittest.TestCase): """UserSigninLinkCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSigninLinkCreation(self): + """Test UserSigninLinkCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = UserSigninLinkCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 0b4e252..791458b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,7 @@ [tox] -envlist = py37 +envlist = py3 [testenv] -passenv = PYTHON_VERSION deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt From 64ab1551c4cd3890148aa7bed0a1e569ffbde0ed Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 15:17:36 +0200 Subject: [PATCH 17/46] chore: bump version to 1.0.0 --- .openapi-generator/FILES | 137 -------------------------------------- flat_api/__init__.py | 2 +- flat_api/configuration.py | 2 +- 3 files changed, 2 insertions(+), 139 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9f9563b..53d0625 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -288,141 +288,4 @@ requirements.txt setup.cfg test-requirements.txt test/__init__.py -test/test_account_api.py -test/test_api_access_token.py -test/test_app_scopes.py -test/test_assignment.py -test/test_assignment_copy.py -test/test_assignment_copy_response.py -test/test_assignment_copy_response_capabilities.py -test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py -test/test_assignment_submission.py -test/test_assignment_submission_comment.py -test/test_assignment_submission_comment_creation.py -test/test_assignment_submission_history.py -test/test_assignment_submission_history_attachment.py -test/test_assignment_submission_history_state.py -test/test_assignment_submission_state.py -test/test_assignment_submission_update.py -test/test_assignment_submission_update_comments.py -test/test_assignment_type.py -test/test_assignment_update.py -test/test_class_api.py -test/test_class_assignment.py -test/test_class_assignment_canvas.py -test/test_class_assignment_lti.py -test/test_class_assignment_mfc.py -test/test_class_assignment_update.py -test/test_class_assignment_update_google_classroom.py -test/test_class_assignment_update_microsoft_graph.py -test/test_class_attachment_creation.py -test/test_class_creation.py -test/test_class_details.py -test/test_class_details_canvas.py -test/test_class_details_clever.py -test/test_class_details_google_classroom.py -test/test_class_details_google_drive.py -test/test_class_details_issues.py -test/test_class_details_issues_sync_inner.py -test/test_class_details_lti.py -test/test_class_details_mfc.py -test/test_class_details_microsoft_graph.py -test/test_class_grade_level.py -test/test_class_roles.py -test/test_class_state.py -test/test_class_update.py -test/test_collection.py -test/test_collection_api.py -test/test_collection_app.py -test/test_collection_capabilities.py -test/test_collection_creation.py -test/test_collection_modification.py -test/test_collection_privacy.py -test/test_collection_type.py -test/test_edu_library.py -test/test_edu_resource.py -test/test_edu_resource_capabilities.py -test/test_edu_resource_copy.py -test/test_edu_resource_creation.py -test/test_edu_resource_move.py -test/test_edu_resource_privacy.py -test/test_edu_resource_resource.py -test/test_edu_resource_type.py -test/test_edu_resource_update.py -test/test_edu_resource_use_in_class.py -test/test_edu_resources_api.py -test/test_edu_skills_focused.py -test/test_flat_error_response.py -test/test_flat_locales.py -test/test_google_classroom_coursework.py -test/test_google_classroom_submission.py -test/test_group.py -test/test_group_api.py -test/test_group_details.py -test/test_group_type.py -test/test_license_mode.py -test/test_license_sources.py -test/test_lms_name.py -test/test_lti_credentials.py -test/test_lti_credentials_creation.py -test/test_media_attachment.py -test/test_media_score_sharing_mode.py -test/test_microsoft_graph_assignment.py -test/test_microsoft_graph_submission.py -test/test_organization_api.py -test/test_organization_invitation.py -test/test_organization_invitation_creation.py -test/test_organization_roles.py -test/test_organization_user_access_token_creation.py -test/test_resource_collaborator.py -test/test_resource_collaborator_creation.py -test/test_resource_rights.py -test/test_score_api.py -test/test_score_comment.py -test/test_score_comment_context.py -test/test_score_comment_creation.py -test/test_score_comment_moderation.py -test/test_score_comment_update.py -test/test_score_comments_counts.py -test/test_score_creation.py -test/test_score_creation_builder_data.py -test/test_score_creation_builder_data_layout_data.py -test/test_score_creation_builder_data_score_data.py -test/test_score_creation_builder_data_score_data_instruments_inner.py -test/test_score_creation_type.py -test/test_score_details.py -test/test_score_fork.py -test/test_score_license.py -test/test_score_likes_counts.py -test/test_score_modification.py -test/test_score_plays_counts.py -test/test_score_privacy.py -test/test_score_revision.py -test/test_score_revision_creation.py -test/test_score_revision_statistics.py -test/test_score_source.py -test/test_score_track.py -test/test_score_track_creation.py -test/test_score_track_point.py -test/test_score_track_state.py -test/test_score_track_type.py -test/test_score_track_update.py -test/test_score_views_counts.py -test/test_task.py -test/test_task_api.py -test/test_task_export_options.py -test/test_task_progress.py -test/test_task_result.py -test/test_user_admin_update.py -test/test_user_api.py -test/test_user_azure_details.py -test/test_user_community_profile_links.py -test/test_user_creation.py -test/test_user_details.py -test/test_user_details_admin.py -test/test_user_details_admin_license.py -test/test_user_public.py -test/test_user_public_summary.py -test/test_user_signin_link.py -test/test_user_signin_link_creation.py tox.ini diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 80c8be8..d86e044 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "0.9.0" +__version__ = "1.0.0" # import ApiClient from flat_api.api_client import ApiClient diff --git a/flat_api/configuration.py b/flat_api/configuration.py index d3afa29..e92e1a1 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -389,7 +389,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.18.0\n"\ - "SDK Package Version: 0.9.0".\ + "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): From 09225d43dd936d5438eb3d6e7276ec7dc64ead2b Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 15:18:58 +0200 Subject: [PATCH 18/46] chore: gh action badge url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74f7c53..05207fd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python Client for the Flat REST API -[![Python package](https://github.com/FlatIO/api-client-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/FlatIO/api-client-python/actions/workflows/python-package.yml) +[![Python package](https://github.com/FlatIO/api-client-python/actions/workflows/python.yml/badge.svg)](https://github.com/FlatIO/api-client-python/actions/workflows/python.yml) The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: - Creating and importing new music scores using MusicXML or MIDI files From 19ea310813b7c5af39373aad344da6ac4211314c Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 18:59:08 +0200 Subject: [PATCH 19/46] chore: simplify code sample --- README.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 05207fd..6ab684f 100644 --- a/README.md +++ b/README.md @@ -52,40 +52,22 @@ import flat_api Please follow the [installation procedure](#installation--usage) and then run the following: ```python - -import time -import flat_api from pprint import pprint +import flat_api from flat_api.api import account_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_details import UserDetails -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = account_api.AccountApi(api_client) - only_id = False # bool | Only return the user id (optional) (default to False) try: # Get current user account - api_response = api_instance.get_authenticated_user(only_id=only_id) + api_response = api_instance.get_authenticated_user() pprint(api_response) except flat_api.ApiException as e: print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) From f57d00f8d95bd72a169608a6dc80418f049e3bc2 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 19:09:07 +0200 Subject: [PATCH 20/46] chore(publish): ignore tests --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f2ffaf5..8321881 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ long_description=LONG_DESCRIPTION, long_description_content_type="text/markdown", install_requires=REQUIRES, - packages=find_packages(exclude=['test']), + packages=find_packages(exclude=["*test.*", "*test"]), include_package_data=True, license="Apache", classifiers=[ From 96857780bc8d18057c194987c8c20eb48cd785f2 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 19:15:00 +0200 Subject: [PATCH 21/46] chore: bump version to 1.0.0 --- flat_api/api_client.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 2e977c3..070d9f7 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'flat_api/0.9.0' + self.user_agent = 'flat_api/1.0.0' def __enter__(self): return self diff --git a/setup.py b/setup.py index 8321881..93033ec 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages NAME = "flat_api" -VERSION = "0.8.1" +VERSION = "1.0.0" # To install the library, run the following # # python setup.py install From 225c2cceaff762c88efd5cf0e64737df82ec6b27 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Mon, 5 Jun 2023 19:17:53 +0200 Subject: [PATCH 22/46] chore: add changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4dcc9..35a73da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.0 (API v2.18.0) + +* Updated API from v2.17.0 to v2.18.0 +* Generated with OpenAPI Generator Python 7.0.0-20220526.055920-1 + ## 0.8.1 (API v2.17.0) * Fixes binary responses for MIDI export From 770ff9d0c6f22294b6b5c3d8f0bff248a8cbc160 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 25 Aug 2023 09:14:26 +0200 Subject: [PATCH 23/46] docs: Update ScoreApi.md --- docs/ScoreApi.md | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index daf1765..66b3df4 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -349,6 +349,7 @@ import flat_api from flat_api.api import score_api from flat_api.model.score_creation import ScoreCreation from flat_api.model.score_details import ScoreDetails +from flat_api.model.score_privacy import ScorePrivacy from flat_api.model.flat_error_response import FlatErrorResponse from pprint import pprint # Defining the host is optional and defaults to https://api.flat.io/v2 @@ -375,42 +376,9 @@ with flat_api.ApiClient(configuration) as api_client: body = ScoreCreation( title="title_example", privacy=ScorePrivacy("private"), - collection="collection_example", - google_drive_folder="google_drive_folder_example", - builder_data=ScoreCreationBuilderData( - score_data=ScoreCreationBuilderDataScoreData( - use_tab_staff=True, - use_chord_grid=True, - fifths=3.14, - nb_beats=3.14, - beat_type=3.14, - instruments=[ - ScoreCreationBuilderDataScoreDataInstrumentsInner( - group="group_example", - instrument="instrument_example", - long_name="long_name_example", - short_name="short_name_example", - has_quarter_tone=True, - ), - ], - ), - layout_data=ScoreCreationBuilderDataLayoutData( - notes_spacing_coeff=3.14, - length_unit="cm", - page_height=3.14, - page_width=3.14, - page_margin_top=3.14, - page_margin_bottom=3.14, - page_margin_left=3.14, - page_margin_right=3.14, - ), - ), filename="filename_example", data="data_example", - data_encoding="base64", - source=ScoreSource( - google_drive="google_drive_example", - ), + data_encoding="base64" ) # ScoreCreation | # example passing only required values which don't have defaults set @@ -822,6 +790,7 @@ import flat_api from flat_api.api import score_api from flat_api.model.score_modification import ScoreModification from flat_api.model.score_details import ScoreDetails +from flat_api.model.score_privacy import ScorePrivacy from flat_api.model.flat_error_response import FlatErrorResponse from pprint import pprint # Defining the host is optional and defaults to https://api.flat.io/v2 From 5f82d16517bdcda447721026124fa8c2b6f6e077 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:02:03 +0100 Subject: [PATCH 24/46] feat: API 2.20.0 --- .github/workflows/python.yml | 13 +- .gitlab-ci.yml | 27 +- .openapi-generator/FILES | 416 +- .openapi-generator/VERSION | 2 +- docs/AccountApi.md | 29 +- docs/ApiAccessToken.md | 21 +- docs/AppScopes.md | 2 +- docs/Assignment.md | 21 +- docs/AssignmentCopy.md | 24 +- docs/AssignmentCopyResponse.md | 29 +- docs/AssignmentCopyResponseCapabilities.md | 21 +- ...ponseCapabilitiesCanPublishInClassError.md | 19 +- docs/AssignmentSubmission.md | 32 +- docs/AssignmentSubmissionComment.md | 21 +- docs/AssignmentSubmissionCommentCreation.md | 19 +- docs/AssignmentSubmissionComments.md | 30 + docs/AssignmentSubmissionHistory.md | 26 +- docs/AssignmentSubmissionHistoryAttachment.md | 19 +- docs/AssignmentSubmissionHistoryState.md | 2 +- docs/AssignmentSubmissionLti.md | 29 + docs/AssignmentSubmissionPlaybackInner.md | 31 + docs/AssignmentSubmissionState.md | 2 +- docs/AssignmentSubmissionUpdate.md | 30 +- docs/AssignmentSubmissionUpdateComments.md | 13 - docs/AssignmentType.md | 2 +- docs/AssignmentUpdate.md | 31 +- docs/ClassApi.md | 1199 +- docs/ClassAssignment.md | 33 +- docs/ClassAssignmentCanvas.md | 19 +- docs/ClassAssignmentLti.md | 19 +- docs/ClassAssignmentMfc.md | 19 +- docs/ClassAssignmentUpdate.md | 37 +- docs/ClassAssignmentUpdateGoogleClassroom.md | 21 +- docs/ClassAssignmentUpdateMicrosoftGraph.md | 21 +- docs/ClassAttachmentCreation.md | 19 +- docs/ClassCreation.md | 23 +- docs/ClassDetails.md | 25 +- docs/ClassDetailsCanvas.md | 19 +- docs/ClassDetailsClever.md | 19 +- docs/ClassDetailsGoogleClassroom.md | 19 +- docs/ClassDetailsGoogleDrive.md | 19 +- docs/ClassDetailsIssues.md | 21 +- docs/ClassDetailsIssuesSyncInner.md | 19 +- docs/ClassDetailsLti.md | 19 +- docs/ClassDetailsMfc.md | 19 +- docs/ClassDetailsMicrosoftGraph.md | 19 +- docs/ClassGradeLevel.md | 2 +- docs/ClassRoles.md | 2 +- docs/ClassState.md | 2 +- docs/ClassUpdate.md | 23 +- docs/Collection.md | 26 +- docs/CollectionApi.md | 368 +- docs/CollectionApp.md | 19 +- docs/CollectionCapabilities.md | 29 +- docs/CollectionCreation.md | 19 +- docs/CollectionModification.md | 19 +- docs/CollectionPrivacy.md | 2 +- docs/CollectionType.md | 2 +- docs/EduLibrary.md | 19 +- docs/EduResource.md | 27 +- docs/EduResourceCapabilities.md | 19 +- docs/EduResourceCopy.md | 19 +- docs/EduResourceCreation.md | 21 +- docs/EduResourceLtiLink.md | 30 + docs/EduResourceMove.md | 19 +- docs/EduResourcePrivacy.md | 2 +- docs/EduResourceResource.md | 29 +- docs/EduResourceType.md | 2 +- docs/EduResourceUpdate.md | 20 +- docs/EduResourceUseInClass.md | 19 +- docs/EduResourcesApi.md | 464 +- docs/FlatErrorResponse.md | 19 +- docs/FlatLocales.md | 2 +- docs/GoogleClassroomCoursework.md | 21 +- docs/GoogleClassroomSubmission.md | 25 +- docs/Group.md | 19 +- docs/GroupApi.md | 112 +- docs/GroupDetails.md | 19 +- docs/GroupType.md | 2 +- docs/LicenseMode.md | 2 +- docs/LicenseSources.md | 2 +- docs/LmsName.md | 2 +- docs/LtiCredentials.md | 19 +- docs/LtiCredentialsCreation.md | 19 +- docs/MediaAttachment.md | 19 +- docs/MediaScoreSharingMode.md | 2 +- docs/MicrosoftGraphAssignment.md | 21 +- docs/MicrosoftGraphSubmission.md | 24 +- docs/OrganizationApi.md | 521 +- docs/OrganizationInvitation.md | 29 +- docs/OrganizationInvitationCreation.md | 21 +- docs/OrganizationRoles.md | 2 +- docs/OrganizationUserAccessTokenCreation.md | 21 +- docs/ResourceCollaborator.md | 29 +- docs/ResourceCollaboratorCreation.md | 25 +- docs/ResourceRights.md | 28 +- docs/ScoreApi.md | 1466 +- docs/ScoreComment.md | 23 +- docs/ScoreCommentContext.md | 25 +- docs/ScoreCommentCreation.md | 23 +- docs/ScoreCommentModeration.md | 19 +- docs/ScoreCommentUpdate.md | 19 +- docs/ScoreCommentsCounts.md | 19 +- docs/ScoreCreation.md | 21 +- docs/ScoreCreationBuilderData.md | 19 +- docs/ScoreCreationBuilderDataLayoutData.md | 21 +- docs/ScoreCreationBuilderDataScoreData.md | 21 +- ...ionBuilderDataScoreDataInstrumentsInner.md | 19 +- docs/ScoreCreationType.md | 2 +- docs/ScoreDetails.md | 41 +- docs/ScoreFork.md | 22 +- docs/ScoreLicense.md | 2 +- docs/ScoreLikesCounts.md | 25 +- docs/ScoreModification.md | 21 +- docs/ScorePlaysCounts.md | 19 +- docs/ScorePrivacy.md | 2 +- docs/ScoreRevision.md | 21 +- docs/ScoreRevisionCreation.md | 21 +- docs/ScoreRevisionStatistics.md | 19 +- docs/ScoreSource.md | 19 +- docs/ScoreTrack.md | 38 +- docs/ScoreTrackCreation.md | 22 +- docs/ScoreTrackPoint.md | 21 +- ...uSkillsFocused.md => ScoreTrackPurpose.md} | 6 +- docs/ScoreTrackState.md | 2 +- docs/ScoreTrackType.md | 2 +- docs/ScoreTrackUpdate.md | 21 +- docs/ScoreViewsCounts.md | 19 +- docs/Task.md | 25 +- docs/TaskApi.md | 26 +- docs/TaskExportOptions.md | 21 +- docs/TaskProgress.md | 19 +- docs/TaskResult.md | 19 +- docs/TutteoProduct.md | 12 + docs/UserAdminUpdate.md | 19 +- docs/UserApi.md | 152 +- docs/UserAzureDetails.md | 19 +- docs/UserCommunityProfileLinks.md | 31 +- docs/UserCreation.md | 23 +- docs/UserDetails.md | 38 +- docs/UserDetailsAdmin.md | 32 +- docs/UserDetailsAdminLicense.md | 19 +- docs/UserPublic.md | 32 +- docs/UserPublicSummary.md | 30 +- docs/UserSigninLink.md | 19 +- docs/UserSigninLinkCreation.md | 21 +- flat_api/__init__.py | 166 +- flat_api/api/__init__.py | 16 +- flat_api/api/account_api.py | 410 +- flat_api/api/class_api.py | 12598 ++++++++++----- flat_api/api/collection_api.py | 4001 +++-- flat_api/api/edu_resources_api.py | 4864 ++++-- flat_api/api/group_api.py | 1205 +- flat_api/api/organization_api.py | 5616 ++++--- flat_api/api/score_api.py | 13228 +++++++++++----- flat_api/api/task_api.py | 413 +- flat_api/api/user_api.py | 1253 +- flat_api/api_client.py | 1178 +- flat_api/api_response.py | 21 + flat_api/apis/__init__.py | 25 - flat_api/configuration.py | 138 +- flat_api/exceptions.py | 105 +- flat_api/model/__init__.py | 5 - flat_api/model/api_access_token.py | 290 - flat_api/model/app_scopes.py | 310 - flat_api/model/assignment.py | 344 - flat_api/model/assignment_copy.py | 276 - flat_api/model/assignment_copy_response.py | 334 - .../assignment_copy_response_capabilities.py | 298 - ...capabilities_can_publish_in_class_error.py | 276 - flat_api/model/assignment_submission.py | 352 - .../model/assignment_submission_comment.py | 288 - .../assignment_submission_comment_creation.py | 270 - .../model/assignment_submission_history.py | 313 - ...ssignment_submission_history_attachment.py | 272 - .../assignment_submission_history_state.py | 293 - flat_api/model/assignment_submission_state.py | 292 - .../model/assignment_submission_update.py | 304 - .../assignment_submission_update_comments.py | 268 - flat_api/model/assignment_type.py | 295 - flat_api/model/assignment_update.py | 324 - flat_api/model/class_assignment.py | 411 - flat_api/model/class_assignment_canvas.py | 268 - flat_api/model/class_assignment_lti.py | 264 - flat_api/model/class_assignment_mfc.py | 268 - flat_api/model/class_assignment_update.py | 364 - ...lass_assignment_update_google_classroom.py | 264 - ...class_assignment_update_microsoft_graph.py | 264 - flat_api/model/class_attachment_creation.py | 304 - flat_api/model/class_creation.py | 303 - flat_api/model/class_details.py | 384 - flat_api/model/class_details_canvas.py | 268 - flat_api/model/class_details_clever.py | 301 - .../model/class_details_google_classroom.py | 268 - flat_api/model/class_details_google_drive.py | 268 - flat_api/model/class_details_issues.py | 270 - .../model/class_details_issues_sync_inner.py | 276 - flat_api/model/class_details_lti.py | 272 - flat_api/model/class_details_mfc.py | 268 - .../model/class_details_microsoft_graph.py | 264 - flat_api/model/class_grade_level.py | 294 - flat_api/model/class_roles.py | 291 - flat_api/model/class_state.py | 292 - flat_api/model/class_update.py | 297 - flat_api/model/collection.py | 330 - flat_api/model/collection_app.py | 272 - flat_api/model/collection_capabilities.py | 280 - flat_api/model/collection_creation.py | 286 - flat_api/model/collection_modification.py | 278 - flat_api/model/collection_privacy.py | 282 - flat_api/model/collection_type.py | 295 - flat_api/model/edu_library.py | 285 - flat_api/model/edu_resource.py | 328 - flat_api/model/edu_resource_capabilities.py | 272 - flat_api/model/edu_resource_copy.py | 270 - flat_api/model/edu_resource_creation.py | 290 - flat_api/model/edu_resource_move.py | 270 - flat_api/model/edu_resource_privacy.py | 283 - flat_api/model/edu_resource_resource.py | 330 - flat_api/model/edu_resource_type.py | 291 - flat_api/model/edu_resource_update.py | 268 - flat_api/model/edu_resource_use_in_class.py | 274 - flat_api/model/edu_skills_focused.py | 287 - flat_api/model/flat_error_response.py | 284 - flat_api/model/flat_locales.py | 299 - flat_api/model/google_classroom_coursework.py | 276 - flat_api/model/google_classroom_submission.py | 272 - flat_api/model/group.py | 293 - flat_api/model/group_details.py | 294 - flat_api/model/group_type.py | 292 - flat_api/model/license_mode.py | 291 - flat_api/model/license_sources.py | 289 - flat_api/model/lms_name.py | 297 - flat_api/model/lti_credentials.py | 302 - flat_api/model/lti_credentials_creation.py | 285 - flat_api/model/media_attachment.py | 370 - flat_api/model/media_score_sharing_mode.py | 285 - flat_api/model/microsoft_graph_assignment.py | 276 - flat_api/model/microsoft_graph_submission.py | 272 - flat_api/model/organization_invitation.py | 294 - .../model/organization_invitation_creation.py | 274 - flat_api/model/organization_roles.py | 293 - ...organization_user_access_token_creation.py | 276 - flat_api/model/resource_collaborator.py | 312 - .../model/resource_collaborator_creation.py | 288 - flat_api/model/resource_rights.py | 276 - flat_api/model/score_comment.py | 336 - flat_api/model/score_comment_context.py | 308 - flat_api/model/score_comment_creation.py | 296 - flat_api/model/score_comment_moderation.py | 272 - flat_api/model/score_comment_update.py | 290 - flat_api/model/score_comments_counts.py | 276 - flat_api/model/score_creation.py | 309 - flat_api/model/score_creation_builder_data.py | 282 - ...score_creation_builder_data_layout_data.py | 296 - .../score_creation_builder_data_score_data.py | 296 - ...ilder_data_score_data_instruments_inner.py | 288 - flat_api/model/score_creation_type.py | 292 - flat_api/model/score_details.py | 416 - flat_api/model/score_fork.py | 268 - flat_api/model/score_license.py | 297 - flat_api/model/score_likes_counts.py | 272 - flat_api/model/score_modification.py | 326 - flat_api/model/score_plays_counts.py | 272 - flat_api/model/score_privacy.py | 285 - flat_api/model/score_revision.py | 298 - flat_api/model/score_revision_creation.py | 285 - flat_api/model/score_revision_statistics.py | 276 - flat_api/model/score_source.py | 264 - flat_api/model/score_track.py | 318 - flat_api/model/score_track_creation.py | 288 - flat_api/model/score_track_point.py | 284 - flat_api/model/score_track_state.py | 284 - flat_api/model/score_track_type.py | 293 - flat_api/model/score_track_update.py | 284 - flat_api/model/score_views_counts.py | 272 - flat_api/model/task.py | 319 - flat_api/model/task_export_options.py | 264 - flat_api/model/task_progress.py | 268 - flat_api/model/task_result.py | 268 - flat_api/model/user_admin_update.py | 307 - flat_api/model/user_azure_details.py | 272 - .../model/user_community_profile_links.py | 284 - flat_api/model/user_creation.py | 324 - flat_api/model/user_details.py | 394 - flat_api/model/user_details_admin.py | 342 - flat_api/model/user_details_admin_license.py | 288 - flat_api/model/user_public.py | 366 - flat_api/model/user_public_summary.py | 324 - flat_api/model/user_signin_link.py | 268 - flat_api/model/user_signin_link_creation.py | 264 - flat_api/model_utils.py | 2057 --- flat_api/models/__init__.py | 282 +- flat_api/models/api_access_token.py | 100 + flat_api/models/app_scopes.py | 57 + flat_api/models/assignment.py | 137 + flat_api/models/assignment_copy.py | 97 + flat_api/models/assignment_copy_response.py | 139 + .../assignment_copy_response_capabilities.py | 100 + ...capabilities_can_publish_in_class_error.py | 90 + flat_api/models/assignment_submission.py | 167 + .../models/assignment_submission_comment.py | 101 + .../assignment_submission_comment_creation.py | 88 + .../models/assignment_submission_comments.py | 90 + .../models/assignment_submission_history.py | 128 + ...ssignment_submission_history_attachment.py | 92 + .../assignment_submission_history_state.py | 41 + flat_api/models/assignment_submission_lti.py | 88 + .../assignment_submission_playback_inner.py | 90 + .../models/assignment_submission_state.py | 40 + .../models/assignment_submission_update.py | 122 + flat_api/models/assignment_type.py | 42 + flat_api/models/assignment_update.py | 153 + flat_api/models/class_assignment.py | 216 + flat_api/models/class_assignment_canvas.py | 90 + flat_api/models/class_assignment_lti.py | 88 + flat_api/models/class_assignment_mfc.py | 90 + flat_api/models/class_assignment_update.py | 206 + ...lass_assignment_update_google_classroom.py | 93 + ...class_assignment_update_microsoft_graph.py | 93 + flat_api/models/class_attachment_creation.py | 111 + flat_api/models/class_creation.py | 114 + flat_api/models/class_details.py | 192 + flat_api/models/class_details_canvas.py | 90 + flat_api/models/class_details_clever.py | 111 + .../models/class_details_google_classroom.py | 90 + flat_api/models/class_details_google_drive.py | 90 + flat_api/models/class_details_issues.py | 96 + .../models/class_details_issues_sync_inner.py | 102 + flat_api/models/class_details_lti.py | 92 + flat_api/models/class_details_mfc.py | 90 + .../models/class_details_microsoft_graph.py | 88 + flat_api/models/class_grade_level.py | 41 + flat_api/models/class_roles.py | 38 + flat_api/models/class_state.py | 39 + flat_api/models/class_update.py | 114 + flat_api/models/collection.py | 141 + flat_api/models/collection_app.py | 92 + flat_api/models/collection_capabilities.py | 96 + flat_api/models/collection_creation.py | 92 + flat_api/models/collection_modification.py | 92 + flat_api/models/collection_privacy.py | 37 + flat_api/models/collection_type.py | 42 + flat_api/models/edu_library.py | 114 + flat_api/models/edu_resource.py | 119 + flat_api/models/edu_resource_capabilities.py | 92 + flat_api/models/edu_resource_copy.py | 88 + flat_api/models/edu_resource_creation.py | 94 + flat_api/models/edu_resource_lti_link.py | 88 + flat_api/models/edu_resource_move.py | 88 + flat_api/models/edu_resource_privacy.py | 39 + flat_api/models/edu_resource_resource.py | 137 + flat_api/models/edu_resource_type.py | 38 + flat_api/models/edu_resource_update.py | 92 + flat_api/models/edu_resource_use_in_class.py | 90 + flat_api/models/flat_error_response.py | 94 + flat_api/models/flat_locales.py | 54 + .../models/google_classroom_coursework.py | 99 + .../models/google_classroom_submission.py | 92 + flat_api/models/group.py | 111 + flat_api/models/group_details.py | 102 + flat_api/models/group_type.py | 39 + flat_api/models/license_mode.py | 38 + flat_api/models/license_sources.py | 44 + flat_api/models/lms_name.py | 44 + flat_api/models/lti_credentials.py | 106 + flat_api/models/lti_credentials_creation.py | 92 + flat_api/models/media_attachment.py | 138 + flat_api/models/media_score_sharing_mode.py | 40 + flat_api/models/microsoft_graph_assignment.py | 94 + flat_api/models/microsoft_graph_submission.py | 90 + flat_api/models/organization_invitation.py | 111 + .../organization_invitation_creation.py | 100 + flat_api/models/organization_roles.py | 40 + ...organization_user_access_token_creation.py | 89 + flat_api/models/resource_collaborator.py | 131 + .../models/resource_collaborator_creation.py | 100 + flat_api/models/resource_rights.py | 106 + flat_api/models/score_comment.py | 137 + flat_api/models/score_comment_context.py | 102 + flat_api/models/score_comment_creation.py | 102 + flat_api/models/score_comment_moderation.py | 100 + flat_api/models/score_comment_update.py | 99 + flat_api/models/score_comments_counts.py | 94 + flat_api/models/score_creation.py | 123 + .../models/score_creation_builder_data.py | 98 + ...score_creation_builder_data_layout_data.py | 112 + .../score_creation_builder_data_score_data.py | 106 + ...ilder_data_score_data_instruments_inner.py | 96 + flat_api/models/score_creation_type.py | 40 + flat_api/models/score_details.py | 203 + flat_api/models/score_fork.py | 97 + flat_api/models/score_license.py | 45 + flat_api/models/score_likes_counts.py | 92 + flat_api/models/score_modification.py | 164 + flat_api/models/score_plays_counts.py | 92 + flat_api/models/score_privacy.py | 40 + flat_api/models/score_revision.py | 107 + flat_api/models/score_revision_creation.py | 104 + flat_api/models/score_revision_statistics.py | 95 + flat_api/models/score_source.py | 88 + flat_api/models/score_track.py | 124 + flat_api/models/score_track_creation.py | 108 + flat_api/models/score_track_point.py | 99 + flat_api/models/score_track_purpose.py | 38 + flat_api/models/score_track_state.py | 39 + flat_api/models/score_track_type.py | 40 + flat_api/models/score_track_update.py | 103 + flat_api/models/score_views_counts.py | 92 + flat_api/models/task.py | 124 + flat_api/models/task_export_options.py | 88 + flat_api/models/task_progress.py | 90 + flat_api/models/task_result.py | 90 + flat_api/models/tutteo_product.py | 40 + flat_api/models/user_admin_update.py | 110 + flat_api/models/user_azure_details.py | 92 + .../models/user_community_profile_links.py | 128 + flat_api/models/user_creation.py | 119 + flat_api/models/user_details.py | 186 + flat_api/models/user_details_admin.py | 142 + flat_api/models/user_details_admin_license.py | 99 + flat_api/models/user_public.py | 159 + flat_api/models/user_public_summary.py | 129 + flat_api/models/user_signin_link.py | 91 + flat_api/models/user_signin_link_creation.py | 88 + flat_api/py.typed | 0 flat_api/rest.py | 375 +- pyproject.toml | 48 +- requirements.txt | 4 +- test-requirements.txt | 4 + test/test_account_api.py | 25 +- test/test_api_access_token.py | 49 +- test/test_app_scopes.py | 22 +- test/test_assignment.py | 82 +- test/test_assignment_copy.py | 46 +- test/test_assignment_copy_response.py | 83 +- ...t_assignment_copy_response_capabilities.py | 52 +- ...capabilities_can_publish_in_class_error.py | 43 +- test/test_assignment_submission.py | 94 +- test/test_assignment_submission_comment.py | 46 +- ..._assignment_submission_comment_creation.py | 41 +- test/test_assignment_submission_comments.py | 53 + test/test_assignment_submission_history.py | 65 +- ...ssignment_submission_history_attachment.py | 42 +- ...est_assignment_submission_history_state.py | 22 +- test/test_assignment_submission_lti.py | 53 + ...st_assignment_submission_playback_inner.py | 55 + test/test_assignment_submission_state.py | 22 +- test/test_assignment_submission_update.py | 53 +- test/test_assignment_type.py | 22 +- test/test_assignment_update.py | 56 +- test/test_class_api.py | 141 +- test/test_class_assignment.py | 118 +- test/test_class_assignment_canvas.py | 41 +- test/test_class_assignment_lti.py | 40 +- test/test_class_assignment_mfc.py | 41 +- test/test_class_assignment_update.py | 73 +- ...lass_assignment_update_google_classroom.py | 40 +- ...class_assignment_update_microsoft_graph.py | 42 +- test/test_class_attachment_creation.py | 48 +- test/test_class_creation.py | 51 +- test/test_class_details.py | 115 +- test/test_class_details_canvas.py | 41 +- test/test_class_details_clever.py | 46 +- test/test_class_details_google_classroom.py | 41 +- test/test_class_details_google_drive.py | 41 +- test/test_class_details_issues.py | 47 +- test/test_class_details_issues_sync_inner.py | 42 +- test/test_class_details_lti.py | 42 +- test/test_class_details_mfc.py | 41 +- test/test_class_details_microsoft_graph.py | 40 +- test/test_class_grade_level.py | 22 +- test/test_class_roles.py | 22 +- test/test_class_state.py | 22 +- test/test_class_update.py | 50 +- test/test_collection.py | 148 +- test/test_collection_api.py | 57 +- test/test_collection_app.py | 42 +- test/test_collection_capabilities.py | 49 +- test/test_collection_creation.py | 45 +- test/test_collection_modification.py | 43 +- test/test_collection_privacy.py | 22 +- test/test_collection_type.py | 22 +- test/test_edu_library.py | 43 +- test/test_edu_resource.py | 93 +- test/test_edu_resource_capabilities.py | 42 +- test/test_edu_resource_copy.py | 41 +- test/test_edu_resource_creation.py | 46 +- test/test_edu_resource_lti_link.py | 53 + test/test_edu_resource_move.py | 41 +- test/test_edu_resource_privacy.py | 22 +- test/test_edu_resource_resource.py | 82 +- test/test_edu_resource_type.py | 22 +- test/test_edu_resource_update.py | 41 +- test/test_edu_resource_use_in_class.py | 42 +- test/test_edu_resources_api.py | 72 +- test/test_flat_error_response.py | 45 +- test/test_flat_locales.py | 22 +- test/test_google_classroom_coursework.py | 43 +- test/test_google_classroom_submission.py | 45 +- test/test_group.py | 46 +- test/test_group_api.py | 33 +- test/test_group_details.py | 48 +- test/test_group_type.py | 22 +- test/test_license_mode.py | 22 +- test/test_license_sources.py | 22 +- test/test_lms_name.py | 22 +- test/test_lti_credentials.py | 50 +- test/test_lti_credentials_creation.py | 45 +- test/test_media_attachment.py | 64 +- test/test_media_score_sharing_mode.py | 22 +- test/test_microsoft_graph_assignment.py | 45 +- test/test_microsoft_graph_submission.py | 43 +- test/test_organization_api.py | 73 +- test/test_organization_invitation.py | 56 +- test/test_organization_invitation_creation.py | 43 +- test/test_organization_roles.py | 22 +- ...organization_user_access_token_creation.py | 47 +- test/test_resource_collaborator.py | 94 +- test/test_resource_collaborator_creation.py | 46 +- test/test_resource_rights.py | 48 +- test/test_score_api.py | 151 +- test/test_score_comment.py | 63 +- test/test_score_comment_context.py | 57 +- test/test_score_comment_creation.py | 50 +- test/test_score_comment_moderation.py | 41 +- test/test_score_comment_update.py | 45 +- test/test_score_comments_counts.py | 43 +- test/test_score_creation.py | 77 +- test/test_score_creation_builder_data.py | 80 +- ...score_creation_builder_data_layout_data.py | 47 +- ..._score_creation_builder_data_score_data.py | 62 +- ...ilder_data_score_data_instruments_inner.py | 46 +- test/test_score_creation_type.py | 22 +- test/test_score_details.py | 224 +- test/test_score_fork.py | 42 +- test/test_score_license.py | 22 +- test/test_score_likes_counts.py | 45 +- test/test_score_modification.py | 59 +- test/test_score_plays_counts.py | 42 +- test/test_score_privacy.py | 22 +- test/test_score_revision.py | 51 +- test/test_score_revision_creation.py | 44 +- test/test_score_revision_statistics.py | 43 +- test/test_score_source.py | 40 +- test/test_score_track.py | 69 +- test/test_score_track_creation.py | 51 +- test/test_score_track_point.py | 44 +- ...focused.py => test_score_track_purpose.py} | 30 +- test/test_score_track_state.py | 22 +- test/test_score_track_type.py | 22 +- test/test_score_track_update.py | 49 +- test/test_score_views_counts.py | 42 +- test/test_task.py | 62 +- test/test_task_api.py | 25 +- test/test_task_export_options.py | 42 +- test/test_task_progress.py | 41 +- test/test_task_result.py | 41 +- ...ate_comments.py => test_tutteo_product.py} | 30 +- test/test_user_admin_update.py | 47 +- test/test_user_api.py | 37 +- test/test_user_azure_details.py | 42 +- test/test_user_community_profile_links.py | 45 +- test/test_user_creation.py | 50 +- test/test_user_details.py | 99 +- test/test_user_details_admin.py | 77 +- test/test_user_details_admin_license.py | 48 +- test/test_user_public.py | 84 +- test/test_user_public_summary.py | 64 +- test/test_user_signin_link.py | 41 +- test/test_user_signin_link_creation.py | 40 +- 571 files changed, 52147 insertions(+), 60633 deletions(-) create mode 100644 docs/AssignmentSubmissionComments.md create mode 100644 docs/AssignmentSubmissionLti.md create mode 100644 docs/AssignmentSubmissionPlaybackInner.md delete mode 100644 docs/AssignmentSubmissionUpdateComments.md create mode 100644 docs/EduResourceLtiLink.md rename docs/{EduSkillsFocused.md => ScoreTrackPurpose.md} (65%) create mode 100644 docs/TutteoProduct.md create mode 100644 flat_api/api_response.py delete mode 100644 flat_api/apis/__init__.py delete mode 100644 flat_api/model/__init__.py delete mode 100644 flat_api/model/api_access_token.py delete mode 100644 flat_api/model/app_scopes.py delete mode 100644 flat_api/model/assignment.py delete mode 100644 flat_api/model/assignment_copy.py delete mode 100644 flat_api/model/assignment_copy_response.py delete mode 100644 flat_api/model/assignment_copy_response_capabilities.py delete mode 100644 flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py delete mode 100644 flat_api/model/assignment_submission.py delete mode 100644 flat_api/model/assignment_submission_comment.py delete mode 100644 flat_api/model/assignment_submission_comment_creation.py delete mode 100644 flat_api/model/assignment_submission_history.py delete mode 100644 flat_api/model/assignment_submission_history_attachment.py delete mode 100644 flat_api/model/assignment_submission_history_state.py delete mode 100644 flat_api/model/assignment_submission_state.py delete mode 100644 flat_api/model/assignment_submission_update.py delete mode 100644 flat_api/model/assignment_submission_update_comments.py delete mode 100644 flat_api/model/assignment_type.py delete mode 100644 flat_api/model/assignment_update.py delete mode 100644 flat_api/model/class_assignment.py delete mode 100644 flat_api/model/class_assignment_canvas.py delete mode 100644 flat_api/model/class_assignment_lti.py delete mode 100644 flat_api/model/class_assignment_mfc.py delete mode 100644 flat_api/model/class_assignment_update.py delete mode 100644 flat_api/model/class_assignment_update_google_classroom.py delete mode 100644 flat_api/model/class_assignment_update_microsoft_graph.py delete mode 100644 flat_api/model/class_attachment_creation.py delete mode 100644 flat_api/model/class_creation.py delete mode 100644 flat_api/model/class_details.py delete mode 100644 flat_api/model/class_details_canvas.py delete mode 100644 flat_api/model/class_details_clever.py delete mode 100644 flat_api/model/class_details_google_classroom.py delete mode 100644 flat_api/model/class_details_google_drive.py delete mode 100644 flat_api/model/class_details_issues.py delete mode 100644 flat_api/model/class_details_issues_sync_inner.py delete mode 100644 flat_api/model/class_details_lti.py delete mode 100644 flat_api/model/class_details_mfc.py delete mode 100644 flat_api/model/class_details_microsoft_graph.py delete mode 100644 flat_api/model/class_grade_level.py delete mode 100644 flat_api/model/class_roles.py delete mode 100644 flat_api/model/class_state.py delete mode 100644 flat_api/model/class_update.py delete mode 100644 flat_api/model/collection.py delete mode 100644 flat_api/model/collection_app.py delete mode 100644 flat_api/model/collection_capabilities.py delete mode 100644 flat_api/model/collection_creation.py delete mode 100644 flat_api/model/collection_modification.py delete mode 100644 flat_api/model/collection_privacy.py delete mode 100644 flat_api/model/collection_type.py delete mode 100644 flat_api/model/edu_library.py delete mode 100644 flat_api/model/edu_resource.py delete mode 100644 flat_api/model/edu_resource_capabilities.py delete mode 100644 flat_api/model/edu_resource_copy.py delete mode 100644 flat_api/model/edu_resource_creation.py delete mode 100644 flat_api/model/edu_resource_move.py delete mode 100644 flat_api/model/edu_resource_privacy.py delete mode 100644 flat_api/model/edu_resource_resource.py delete mode 100644 flat_api/model/edu_resource_type.py delete mode 100644 flat_api/model/edu_resource_update.py delete mode 100644 flat_api/model/edu_resource_use_in_class.py delete mode 100644 flat_api/model/edu_skills_focused.py delete mode 100644 flat_api/model/flat_error_response.py delete mode 100644 flat_api/model/flat_locales.py delete mode 100644 flat_api/model/google_classroom_coursework.py delete mode 100644 flat_api/model/google_classroom_submission.py delete mode 100644 flat_api/model/group.py delete mode 100644 flat_api/model/group_details.py delete mode 100644 flat_api/model/group_type.py delete mode 100644 flat_api/model/license_mode.py delete mode 100644 flat_api/model/license_sources.py delete mode 100644 flat_api/model/lms_name.py delete mode 100644 flat_api/model/lti_credentials.py delete mode 100644 flat_api/model/lti_credentials_creation.py delete mode 100644 flat_api/model/media_attachment.py delete mode 100644 flat_api/model/media_score_sharing_mode.py delete mode 100644 flat_api/model/microsoft_graph_assignment.py delete mode 100644 flat_api/model/microsoft_graph_submission.py delete mode 100644 flat_api/model/organization_invitation.py delete mode 100644 flat_api/model/organization_invitation_creation.py delete mode 100644 flat_api/model/organization_roles.py delete mode 100644 flat_api/model/organization_user_access_token_creation.py delete mode 100644 flat_api/model/resource_collaborator.py delete mode 100644 flat_api/model/resource_collaborator_creation.py delete mode 100644 flat_api/model/resource_rights.py delete mode 100644 flat_api/model/score_comment.py delete mode 100644 flat_api/model/score_comment_context.py delete mode 100644 flat_api/model/score_comment_creation.py delete mode 100644 flat_api/model/score_comment_moderation.py delete mode 100644 flat_api/model/score_comment_update.py delete mode 100644 flat_api/model/score_comments_counts.py delete mode 100644 flat_api/model/score_creation.py delete mode 100644 flat_api/model/score_creation_builder_data.py delete mode 100644 flat_api/model/score_creation_builder_data_layout_data.py delete mode 100644 flat_api/model/score_creation_builder_data_score_data.py delete mode 100644 flat_api/model/score_creation_builder_data_score_data_instruments_inner.py delete mode 100644 flat_api/model/score_creation_type.py delete mode 100644 flat_api/model/score_details.py delete mode 100644 flat_api/model/score_fork.py delete mode 100644 flat_api/model/score_license.py delete mode 100644 flat_api/model/score_likes_counts.py delete mode 100644 flat_api/model/score_modification.py delete mode 100644 flat_api/model/score_plays_counts.py delete mode 100644 flat_api/model/score_privacy.py delete mode 100644 flat_api/model/score_revision.py delete mode 100644 flat_api/model/score_revision_creation.py delete mode 100644 flat_api/model/score_revision_statistics.py delete mode 100644 flat_api/model/score_source.py delete mode 100644 flat_api/model/score_track.py delete mode 100644 flat_api/model/score_track_creation.py delete mode 100644 flat_api/model/score_track_point.py delete mode 100644 flat_api/model/score_track_state.py delete mode 100644 flat_api/model/score_track_type.py delete mode 100644 flat_api/model/score_track_update.py delete mode 100644 flat_api/model/score_views_counts.py delete mode 100644 flat_api/model/task.py delete mode 100644 flat_api/model/task_export_options.py delete mode 100644 flat_api/model/task_progress.py delete mode 100644 flat_api/model/task_result.py delete mode 100644 flat_api/model/user_admin_update.py delete mode 100644 flat_api/model/user_azure_details.py delete mode 100644 flat_api/model/user_community_profile_links.py delete mode 100644 flat_api/model/user_creation.py delete mode 100644 flat_api/model/user_details.py delete mode 100644 flat_api/model/user_details_admin.py delete mode 100644 flat_api/model/user_details_admin_license.py delete mode 100644 flat_api/model/user_public.py delete mode 100644 flat_api/model/user_public_summary.py delete mode 100644 flat_api/model/user_signin_link.py delete mode 100644 flat_api/model/user_signin_link_creation.py delete mode 100644 flat_api/model_utils.py create mode 100644 flat_api/models/api_access_token.py create mode 100644 flat_api/models/app_scopes.py create mode 100644 flat_api/models/assignment.py create mode 100644 flat_api/models/assignment_copy.py create mode 100644 flat_api/models/assignment_copy_response.py create mode 100644 flat_api/models/assignment_copy_response_capabilities.py create mode 100644 flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py create mode 100644 flat_api/models/assignment_submission.py create mode 100644 flat_api/models/assignment_submission_comment.py create mode 100644 flat_api/models/assignment_submission_comment_creation.py create mode 100644 flat_api/models/assignment_submission_comments.py create mode 100644 flat_api/models/assignment_submission_history.py create mode 100644 flat_api/models/assignment_submission_history_attachment.py create mode 100644 flat_api/models/assignment_submission_history_state.py create mode 100644 flat_api/models/assignment_submission_lti.py create mode 100644 flat_api/models/assignment_submission_playback_inner.py create mode 100644 flat_api/models/assignment_submission_state.py create mode 100644 flat_api/models/assignment_submission_update.py create mode 100644 flat_api/models/assignment_type.py create mode 100644 flat_api/models/assignment_update.py create mode 100644 flat_api/models/class_assignment.py create mode 100644 flat_api/models/class_assignment_canvas.py create mode 100644 flat_api/models/class_assignment_lti.py create mode 100644 flat_api/models/class_assignment_mfc.py create mode 100644 flat_api/models/class_assignment_update.py create mode 100644 flat_api/models/class_assignment_update_google_classroom.py create mode 100644 flat_api/models/class_assignment_update_microsoft_graph.py create mode 100644 flat_api/models/class_attachment_creation.py create mode 100644 flat_api/models/class_creation.py create mode 100644 flat_api/models/class_details.py create mode 100644 flat_api/models/class_details_canvas.py create mode 100644 flat_api/models/class_details_clever.py create mode 100644 flat_api/models/class_details_google_classroom.py create mode 100644 flat_api/models/class_details_google_drive.py create mode 100644 flat_api/models/class_details_issues.py create mode 100644 flat_api/models/class_details_issues_sync_inner.py create mode 100644 flat_api/models/class_details_lti.py create mode 100644 flat_api/models/class_details_mfc.py create mode 100644 flat_api/models/class_details_microsoft_graph.py create mode 100644 flat_api/models/class_grade_level.py create mode 100644 flat_api/models/class_roles.py create mode 100644 flat_api/models/class_state.py create mode 100644 flat_api/models/class_update.py create mode 100644 flat_api/models/collection.py create mode 100644 flat_api/models/collection_app.py create mode 100644 flat_api/models/collection_capabilities.py create mode 100644 flat_api/models/collection_creation.py create mode 100644 flat_api/models/collection_modification.py create mode 100644 flat_api/models/collection_privacy.py create mode 100644 flat_api/models/collection_type.py create mode 100644 flat_api/models/edu_library.py create mode 100644 flat_api/models/edu_resource.py create mode 100644 flat_api/models/edu_resource_capabilities.py create mode 100644 flat_api/models/edu_resource_copy.py create mode 100644 flat_api/models/edu_resource_creation.py create mode 100644 flat_api/models/edu_resource_lti_link.py create mode 100644 flat_api/models/edu_resource_move.py create mode 100644 flat_api/models/edu_resource_privacy.py create mode 100644 flat_api/models/edu_resource_resource.py create mode 100644 flat_api/models/edu_resource_type.py create mode 100644 flat_api/models/edu_resource_update.py create mode 100644 flat_api/models/edu_resource_use_in_class.py create mode 100644 flat_api/models/flat_error_response.py create mode 100644 flat_api/models/flat_locales.py create mode 100644 flat_api/models/google_classroom_coursework.py create mode 100644 flat_api/models/google_classroom_submission.py create mode 100644 flat_api/models/group.py create mode 100644 flat_api/models/group_details.py create mode 100644 flat_api/models/group_type.py create mode 100644 flat_api/models/license_mode.py create mode 100644 flat_api/models/license_sources.py create mode 100644 flat_api/models/lms_name.py create mode 100644 flat_api/models/lti_credentials.py create mode 100644 flat_api/models/lti_credentials_creation.py create mode 100644 flat_api/models/media_attachment.py create mode 100644 flat_api/models/media_score_sharing_mode.py create mode 100644 flat_api/models/microsoft_graph_assignment.py create mode 100644 flat_api/models/microsoft_graph_submission.py create mode 100644 flat_api/models/organization_invitation.py create mode 100644 flat_api/models/organization_invitation_creation.py create mode 100644 flat_api/models/organization_roles.py create mode 100644 flat_api/models/organization_user_access_token_creation.py create mode 100644 flat_api/models/resource_collaborator.py create mode 100644 flat_api/models/resource_collaborator_creation.py create mode 100644 flat_api/models/resource_rights.py create mode 100644 flat_api/models/score_comment.py create mode 100644 flat_api/models/score_comment_context.py create mode 100644 flat_api/models/score_comment_creation.py create mode 100644 flat_api/models/score_comment_moderation.py create mode 100644 flat_api/models/score_comment_update.py create mode 100644 flat_api/models/score_comments_counts.py create mode 100644 flat_api/models/score_creation.py create mode 100644 flat_api/models/score_creation_builder_data.py create mode 100644 flat_api/models/score_creation_builder_data_layout_data.py create mode 100644 flat_api/models/score_creation_builder_data_score_data.py create mode 100644 flat_api/models/score_creation_builder_data_score_data_instruments_inner.py create mode 100644 flat_api/models/score_creation_type.py create mode 100644 flat_api/models/score_details.py create mode 100644 flat_api/models/score_fork.py create mode 100644 flat_api/models/score_license.py create mode 100644 flat_api/models/score_likes_counts.py create mode 100644 flat_api/models/score_modification.py create mode 100644 flat_api/models/score_plays_counts.py create mode 100644 flat_api/models/score_privacy.py create mode 100644 flat_api/models/score_revision.py create mode 100644 flat_api/models/score_revision_creation.py create mode 100644 flat_api/models/score_revision_statistics.py create mode 100644 flat_api/models/score_source.py create mode 100644 flat_api/models/score_track.py create mode 100644 flat_api/models/score_track_creation.py create mode 100644 flat_api/models/score_track_point.py create mode 100644 flat_api/models/score_track_purpose.py create mode 100644 flat_api/models/score_track_state.py create mode 100644 flat_api/models/score_track_type.py create mode 100644 flat_api/models/score_track_update.py create mode 100644 flat_api/models/score_views_counts.py create mode 100644 flat_api/models/task.py create mode 100644 flat_api/models/task_export_options.py create mode 100644 flat_api/models/task_progress.py create mode 100644 flat_api/models/task_result.py create mode 100644 flat_api/models/tutteo_product.py create mode 100644 flat_api/models/user_admin_update.py create mode 100644 flat_api/models/user_azure_details.py create mode 100644 flat_api/models/user_community_profile_links.py create mode 100644 flat_api/models/user_creation.py create mode 100644 flat_api/models/user_details.py create mode 100644 flat_api/models/user_details_admin.py create mode 100644 flat_api/models/user_details_admin_license.py create mode 100644 flat_api/models/user_public.py create mode 100644 flat_api/models/user_public_summary.py create mode 100644 flat_api/models/user_signin_link.py create mode 100644 flat_api/models/user_signin_link_creation.py create mode 100644 flat_api/py.typed create mode 100644 test/test_assignment_submission_comments.py create mode 100644 test/test_assignment_submission_lti.py create mode 100644 test/test_assignment_submission_playback_inner.py create mode 100644 test/test_edu_resource_lti_link.py rename test/{test_edu_skills_focused.py => test_score_track_purpose.py} (78%) rename test/{test_assignment_submission_update_comments.py => test_tutteo_product.py} (74%) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index bf7d8a6..3db3c3f 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -26,12 +26,13 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - #- name: Lint with flake8 - # run: | - # # stop the build if there are Python syntax errors or undefined names - # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 666cfae..de7090f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# # ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.tests: +.pytest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=flat_api -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests +pytest-3.7: + extends: .pytest image: python:3.7-alpine -test-3.8: - extends: .tests +pytest-3.8: + extends: .pytest image: python:3.8-alpine -test-3.9: - extends: .tests +pytest-3.9: + extends: .pytest image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 53d0625..0844651 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,3 +1,4 @@ +.github/workflows/python.yml .gitlab-ci.yml README.md docs/AccountApi.md @@ -11,12 +12,14 @@ docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md docs/AssignmentSubmission.md docs/AssignmentSubmissionComment.md docs/AssignmentSubmissionCommentCreation.md +docs/AssignmentSubmissionComments.md docs/AssignmentSubmissionHistory.md docs/AssignmentSubmissionHistoryAttachment.md docs/AssignmentSubmissionHistoryState.md +docs/AssignmentSubmissionLti.md +docs/AssignmentSubmissionPlaybackInner.md docs/AssignmentSubmissionState.md docs/AssignmentSubmissionUpdate.md -docs/AssignmentSubmissionUpdateComments.md docs/AssignmentType.md docs/AssignmentUpdate.md docs/ClassApi.md @@ -56,6 +59,7 @@ docs/EduResource.md docs/EduResourceCapabilities.md docs/EduResourceCopy.md docs/EduResourceCreation.md +docs/EduResourceLtiLink.md docs/EduResourceMove.md docs/EduResourcePrivacy.md docs/EduResourceResource.md @@ -63,7 +67,6 @@ docs/EduResourceType.md docs/EduResourceUpdate.md docs/EduResourceUseInClass.md docs/EduResourcesApi.md -docs/EduSkillsFocused.md docs/FlatErrorResponse.md docs/FlatLocales.md docs/GoogleClassroomCoursework.md @@ -116,6 +119,7 @@ docs/ScoreSource.md docs/ScoreTrack.md docs/ScoreTrackCreation.md docs/ScoreTrackPoint.md +docs/ScoreTrackPurpose.md docs/ScoreTrackState.md docs/ScoreTrackType.md docs/ScoreTrackUpdate.md @@ -125,6 +129,7 @@ docs/TaskApi.md docs/TaskExportOptions.md docs/TaskProgress.md docs/TaskResult.md +docs/TutteoProduct.md docs/UserAdminUpdate.md docs/UserApi.md docs/UserAzureDetails.md @@ -149,143 +154,288 @@ flat_api/api/score_api.py flat_api/api/task_api.py flat_api/api/user_api.py flat_api/api_client.py -flat_api/apis/__init__.py +flat_api/api_response.py flat_api/configuration.py flat_api/exceptions.py -flat_api/model/__init__.py -flat_api/model/api_access_token.py -flat_api/model/app_scopes.py -flat_api/model/assignment.py -flat_api/model/assignment_copy.py -flat_api/model/assignment_copy_response.py -flat_api/model/assignment_copy_response_capabilities.py -flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py -flat_api/model/assignment_submission.py -flat_api/model/assignment_submission_comment.py -flat_api/model/assignment_submission_comment_creation.py -flat_api/model/assignment_submission_history.py -flat_api/model/assignment_submission_history_attachment.py -flat_api/model/assignment_submission_history_state.py -flat_api/model/assignment_submission_state.py -flat_api/model/assignment_submission_update.py -flat_api/model/assignment_submission_update_comments.py -flat_api/model/assignment_type.py -flat_api/model/assignment_update.py -flat_api/model/class_assignment.py -flat_api/model/class_assignment_canvas.py -flat_api/model/class_assignment_lti.py -flat_api/model/class_assignment_mfc.py -flat_api/model/class_assignment_update.py -flat_api/model/class_assignment_update_google_classroom.py -flat_api/model/class_assignment_update_microsoft_graph.py -flat_api/model/class_attachment_creation.py -flat_api/model/class_creation.py -flat_api/model/class_details.py -flat_api/model/class_details_canvas.py -flat_api/model/class_details_clever.py -flat_api/model/class_details_google_classroom.py -flat_api/model/class_details_google_drive.py -flat_api/model/class_details_issues.py -flat_api/model/class_details_issues_sync_inner.py -flat_api/model/class_details_lti.py -flat_api/model/class_details_mfc.py -flat_api/model/class_details_microsoft_graph.py -flat_api/model/class_grade_level.py -flat_api/model/class_roles.py -flat_api/model/class_state.py -flat_api/model/class_update.py -flat_api/model/collection.py -flat_api/model/collection_app.py -flat_api/model/collection_capabilities.py -flat_api/model/collection_creation.py -flat_api/model/collection_modification.py -flat_api/model/collection_privacy.py -flat_api/model/collection_type.py -flat_api/model/edu_library.py -flat_api/model/edu_resource.py -flat_api/model/edu_resource_capabilities.py -flat_api/model/edu_resource_copy.py -flat_api/model/edu_resource_creation.py -flat_api/model/edu_resource_move.py -flat_api/model/edu_resource_privacy.py -flat_api/model/edu_resource_resource.py -flat_api/model/edu_resource_type.py -flat_api/model/edu_resource_update.py -flat_api/model/edu_resource_use_in_class.py -flat_api/model/edu_skills_focused.py -flat_api/model/flat_error_response.py -flat_api/model/flat_locales.py -flat_api/model/google_classroom_coursework.py -flat_api/model/google_classroom_submission.py -flat_api/model/group.py -flat_api/model/group_details.py -flat_api/model/group_type.py -flat_api/model/license_mode.py -flat_api/model/license_sources.py -flat_api/model/lms_name.py -flat_api/model/lti_credentials.py -flat_api/model/lti_credentials_creation.py -flat_api/model/media_attachment.py -flat_api/model/media_score_sharing_mode.py -flat_api/model/microsoft_graph_assignment.py -flat_api/model/microsoft_graph_submission.py -flat_api/model/organization_invitation.py -flat_api/model/organization_invitation_creation.py -flat_api/model/organization_roles.py -flat_api/model/organization_user_access_token_creation.py -flat_api/model/resource_collaborator.py -flat_api/model/resource_collaborator_creation.py -flat_api/model/resource_rights.py -flat_api/model/score_comment.py -flat_api/model/score_comment_context.py -flat_api/model/score_comment_creation.py -flat_api/model/score_comment_moderation.py -flat_api/model/score_comment_update.py -flat_api/model/score_comments_counts.py -flat_api/model/score_creation.py -flat_api/model/score_creation_builder_data.py -flat_api/model/score_creation_builder_data_layout_data.py -flat_api/model/score_creation_builder_data_score_data.py -flat_api/model/score_creation_builder_data_score_data_instruments_inner.py -flat_api/model/score_creation_type.py -flat_api/model/score_details.py -flat_api/model/score_fork.py -flat_api/model/score_license.py -flat_api/model/score_likes_counts.py -flat_api/model/score_modification.py -flat_api/model/score_plays_counts.py -flat_api/model/score_privacy.py -flat_api/model/score_revision.py -flat_api/model/score_revision_creation.py -flat_api/model/score_revision_statistics.py -flat_api/model/score_source.py -flat_api/model/score_track.py -flat_api/model/score_track_creation.py -flat_api/model/score_track_point.py -flat_api/model/score_track_state.py -flat_api/model/score_track_type.py -flat_api/model/score_track_update.py -flat_api/model/score_views_counts.py -flat_api/model/task.py -flat_api/model/task_export_options.py -flat_api/model/task_progress.py -flat_api/model/task_result.py -flat_api/model/user_admin_update.py -flat_api/model/user_azure_details.py -flat_api/model/user_community_profile_links.py -flat_api/model/user_creation.py -flat_api/model/user_details.py -flat_api/model/user_details_admin.py -flat_api/model/user_details_admin_license.py -flat_api/model/user_public.py -flat_api/model/user_public_summary.py -flat_api/model/user_signin_link.py -flat_api/model/user_signin_link_creation.py -flat_api/model_utils.py flat_api/models/__init__.py +flat_api/models/api_access_token.py +flat_api/models/app_scopes.py +flat_api/models/assignment.py +flat_api/models/assignment_copy.py +flat_api/models/assignment_copy_response.py +flat_api/models/assignment_copy_response_capabilities.py +flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py +flat_api/models/assignment_submission.py +flat_api/models/assignment_submission_comment.py +flat_api/models/assignment_submission_comment_creation.py +flat_api/models/assignment_submission_comments.py +flat_api/models/assignment_submission_history.py +flat_api/models/assignment_submission_history_attachment.py +flat_api/models/assignment_submission_history_state.py +flat_api/models/assignment_submission_lti.py +flat_api/models/assignment_submission_playback_inner.py +flat_api/models/assignment_submission_state.py +flat_api/models/assignment_submission_update.py +flat_api/models/assignment_type.py +flat_api/models/assignment_update.py +flat_api/models/class_assignment.py +flat_api/models/class_assignment_canvas.py +flat_api/models/class_assignment_lti.py +flat_api/models/class_assignment_mfc.py +flat_api/models/class_assignment_update.py +flat_api/models/class_assignment_update_google_classroom.py +flat_api/models/class_assignment_update_microsoft_graph.py +flat_api/models/class_attachment_creation.py +flat_api/models/class_creation.py +flat_api/models/class_details.py +flat_api/models/class_details_canvas.py +flat_api/models/class_details_clever.py +flat_api/models/class_details_google_classroom.py +flat_api/models/class_details_google_drive.py +flat_api/models/class_details_issues.py +flat_api/models/class_details_issues_sync_inner.py +flat_api/models/class_details_lti.py +flat_api/models/class_details_mfc.py +flat_api/models/class_details_microsoft_graph.py +flat_api/models/class_grade_level.py +flat_api/models/class_roles.py +flat_api/models/class_state.py +flat_api/models/class_update.py +flat_api/models/collection.py +flat_api/models/collection_app.py +flat_api/models/collection_capabilities.py +flat_api/models/collection_creation.py +flat_api/models/collection_modification.py +flat_api/models/collection_privacy.py +flat_api/models/collection_type.py +flat_api/models/edu_library.py +flat_api/models/edu_resource.py +flat_api/models/edu_resource_capabilities.py +flat_api/models/edu_resource_copy.py +flat_api/models/edu_resource_creation.py +flat_api/models/edu_resource_lti_link.py +flat_api/models/edu_resource_move.py +flat_api/models/edu_resource_privacy.py +flat_api/models/edu_resource_resource.py +flat_api/models/edu_resource_type.py +flat_api/models/edu_resource_update.py +flat_api/models/edu_resource_use_in_class.py +flat_api/models/flat_error_response.py +flat_api/models/flat_locales.py +flat_api/models/google_classroom_coursework.py +flat_api/models/google_classroom_submission.py +flat_api/models/group.py +flat_api/models/group_details.py +flat_api/models/group_type.py +flat_api/models/license_mode.py +flat_api/models/license_sources.py +flat_api/models/lms_name.py +flat_api/models/lti_credentials.py +flat_api/models/lti_credentials_creation.py +flat_api/models/media_attachment.py +flat_api/models/media_score_sharing_mode.py +flat_api/models/microsoft_graph_assignment.py +flat_api/models/microsoft_graph_submission.py +flat_api/models/organization_invitation.py +flat_api/models/organization_invitation_creation.py +flat_api/models/organization_roles.py +flat_api/models/organization_user_access_token_creation.py +flat_api/models/resource_collaborator.py +flat_api/models/resource_collaborator_creation.py +flat_api/models/resource_rights.py +flat_api/models/score_comment.py +flat_api/models/score_comment_context.py +flat_api/models/score_comment_creation.py +flat_api/models/score_comment_moderation.py +flat_api/models/score_comment_update.py +flat_api/models/score_comments_counts.py +flat_api/models/score_creation.py +flat_api/models/score_creation_builder_data.py +flat_api/models/score_creation_builder_data_layout_data.py +flat_api/models/score_creation_builder_data_score_data.py +flat_api/models/score_creation_builder_data_score_data_instruments_inner.py +flat_api/models/score_creation_type.py +flat_api/models/score_details.py +flat_api/models/score_fork.py +flat_api/models/score_license.py +flat_api/models/score_likes_counts.py +flat_api/models/score_modification.py +flat_api/models/score_plays_counts.py +flat_api/models/score_privacy.py +flat_api/models/score_revision.py +flat_api/models/score_revision_creation.py +flat_api/models/score_revision_statistics.py +flat_api/models/score_source.py +flat_api/models/score_track.py +flat_api/models/score_track_creation.py +flat_api/models/score_track_point.py +flat_api/models/score_track_purpose.py +flat_api/models/score_track_state.py +flat_api/models/score_track_type.py +flat_api/models/score_track_update.py +flat_api/models/score_views_counts.py +flat_api/models/task.py +flat_api/models/task_export_options.py +flat_api/models/task_progress.py +flat_api/models/task_result.py +flat_api/models/tutteo_product.py +flat_api/models/user_admin_update.py +flat_api/models/user_azure_details.py +flat_api/models/user_community_profile_links.py +flat_api/models/user_creation.py +flat_api/models/user_details.py +flat_api/models/user_details_admin.py +flat_api/models/user_details_admin_license.py +flat_api/models/user_public.py +flat_api/models/user_public_summary.py +flat_api/models/user_signin_link.py +flat_api/models/user_signin_link_creation.py +flat_api/py.typed flat_api/rest.py +pyproject.toml requirements.txt setup.cfg test-requirements.txt test/__init__.py +test/test_account_api.py +test/test_api_access_token.py +test/test_app_scopes.py +test/test_assignment.py +test/test_assignment_copy.py +test/test_assignment_copy_response.py +test/test_assignment_copy_response_capabilities.py +test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py +test/test_assignment_submission.py +test/test_assignment_submission_comment.py +test/test_assignment_submission_comment_creation.py +test/test_assignment_submission_comments.py +test/test_assignment_submission_history.py +test/test_assignment_submission_history_attachment.py +test/test_assignment_submission_history_state.py +test/test_assignment_submission_lti.py +test/test_assignment_submission_playback_inner.py +test/test_assignment_submission_state.py +test/test_assignment_submission_update.py +test/test_assignment_type.py +test/test_assignment_update.py +test/test_class_api.py +test/test_class_assignment.py +test/test_class_assignment_canvas.py +test/test_class_assignment_lti.py +test/test_class_assignment_mfc.py +test/test_class_assignment_update.py +test/test_class_assignment_update_google_classroom.py +test/test_class_assignment_update_microsoft_graph.py +test/test_class_attachment_creation.py +test/test_class_creation.py +test/test_class_details.py +test/test_class_details_canvas.py +test/test_class_details_clever.py +test/test_class_details_google_classroom.py +test/test_class_details_google_drive.py +test/test_class_details_issues.py +test/test_class_details_issues_sync_inner.py +test/test_class_details_lti.py +test/test_class_details_mfc.py +test/test_class_details_microsoft_graph.py +test/test_class_grade_level.py +test/test_class_roles.py +test/test_class_state.py +test/test_class_update.py +test/test_collection.py +test/test_collection_api.py +test/test_collection_app.py +test/test_collection_capabilities.py +test/test_collection_creation.py +test/test_collection_modification.py +test/test_collection_privacy.py +test/test_collection_type.py +test/test_edu_library.py +test/test_edu_resource.py +test/test_edu_resource_capabilities.py +test/test_edu_resource_copy.py +test/test_edu_resource_creation.py +test/test_edu_resource_lti_link.py +test/test_edu_resource_move.py +test/test_edu_resource_privacy.py +test/test_edu_resource_resource.py +test/test_edu_resource_type.py +test/test_edu_resource_update.py +test/test_edu_resource_use_in_class.py +test/test_edu_resources_api.py +test/test_flat_error_response.py +test/test_flat_locales.py +test/test_google_classroom_coursework.py +test/test_google_classroom_submission.py +test/test_group.py +test/test_group_api.py +test/test_group_details.py +test/test_group_type.py +test/test_license_mode.py +test/test_license_sources.py +test/test_lms_name.py +test/test_lti_credentials.py +test/test_lti_credentials_creation.py +test/test_media_attachment.py +test/test_media_score_sharing_mode.py +test/test_microsoft_graph_assignment.py +test/test_microsoft_graph_submission.py +test/test_organization_api.py +test/test_organization_invitation.py +test/test_organization_invitation_creation.py +test/test_organization_roles.py +test/test_organization_user_access_token_creation.py +test/test_resource_collaborator.py +test/test_resource_collaborator_creation.py +test/test_resource_rights.py +test/test_score_api.py +test/test_score_comment.py +test/test_score_comment_context.py +test/test_score_comment_creation.py +test/test_score_comment_moderation.py +test/test_score_comment_update.py +test/test_score_comments_counts.py +test/test_score_creation.py +test/test_score_creation_builder_data.py +test/test_score_creation_builder_data_layout_data.py +test/test_score_creation_builder_data_score_data.py +test/test_score_creation_builder_data_score_data_instruments_inner.py +test/test_score_creation_type.py +test/test_score_details.py +test/test_score_fork.py +test/test_score_license.py +test/test_score_likes_counts.py +test/test_score_modification.py +test/test_score_plays_counts.py +test/test_score_privacy.py +test/test_score_revision.py +test/test_score_revision_creation.py +test/test_score_revision_statistics.py +test/test_score_source.py +test/test_score_track.py +test/test_score_track_creation.py +test/test_score_track_point.py +test/test_score_track_purpose.py +test/test_score_track_state.py +test/test_score_track_type.py +test/test_score_track_update.py +test/test_score_views_counts.py +test/test_task.py +test/test_task_api.py +test/test_task_export_options.py +test/test_task_progress.py +test/test_task_result.py +test/test_tutteo_product.py +test/test_user_admin_update.py +test/test_user_api.py +test/test_user_azure_details.py +test/test_user_community_profile_links.py +test/test_user_creation.py +test/test_user_details.py +test/test_user_details_admin.py +test/test_user_details_admin_license.py +test/test_user_public.py +test/test_user_public_summary.py +test/test_user_signin_link.py +test/test_user_signin_link_creation.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 757e674..8b23b8d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0-SNAPSHOT \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 37db87e..91f225c 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_authenticated_user** -> UserDetails get_authenticated_user() +> UserDetails get_authenticated_user(only_id=only_id) Get current user account @@ -19,12 +19,11 @@ Get details about the current authenticated User. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import account_api -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_details import UserDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -36,34 +35,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = account_api.AccountApi(api_client) - only_id = False # bool | Only return the user id (optional) if omitted the server will use the default value of False + api_instance = flat_api.AccountApi(api_client) + only_id = False # bool | Only return the user id (optional) (default to False) - # example passing only required values which don't have defaults set - # and optional values try: # Get current user account api_response = api_instance.get_authenticated_user(only_id=only_id) + print("The response of AccountApi->get_authenticated_user:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **only_id** | **bool**| Only return the user id | [optional] if omitted the server will use the default value of False + **only_id** | **bool**| Only return the user id | [optional] [default to False] ### Return type @@ -78,7 +74,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/ApiAccessToken.md b/docs/ApiAccessToken.md index 1f00ed1..5689596 100644 --- a/docs/ApiAccessToken.md +++ b/docs/ApiAccessToken.md @@ -3,6 +3,7 @@ An API access token ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of this private token | [optional] @@ -10,9 +11,25 @@ Name | Type | Description | Notes **token** | **str** | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] **issued_date** | **datetime** | The date then this token was issued | [optional] **expiration_date** | **datetime** | The date then this token will expire | [optional] -**scopes** | [**[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**scopes** | [**List[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] + +## Example + +```python +from flat_api.models.api_access_token import ApiAccessToken + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiAccessToken from a JSON string +api_access_token_instance = ApiAccessToken.from_json(json) +# print the JSON string representation of the object +print ApiAccessToken.to_json() +# convert the object into a dict +api_access_token_dict = api_access_token_instance.to_dict() +# create an instance of ApiAccessToken from a dict +api_access_token_form_dict = api_access_token.from_dict(api_access_token_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AppScopes.md b/docs/AppScopes.md index ea30b63..0f80a9a 100644 --- a/docs/AppScopes.md +++ b/docs/AppScopes.md @@ -3,9 +3,9 @@ Available scopes ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Available scopes | must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Assignment.md b/docs/Assignment.md index 9a58449..3d984e9 100644 --- a/docs/Assignment.md +++ b/docs/Assignment.md @@ -3,24 +3,41 @@ Assignment details ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the assignment | **type** | [**AssignmentType**](AssignmentType.md) | | **capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | **title** | **str** | Title of the assignment | -**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | **description** | **str** | Description and content of the assignment | [optional] **cover** | **str** | The URL of the cover to display | [optional] **cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] **max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] **shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] **nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment import Assignment + +# TODO update the JSON string below +json = "{}" +# create an instance of Assignment from a JSON string +assignment_instance = Assignment.from_json(json) +# print the JSON string representation of the object +print Assignment.to_json() + +# convert the object into a dict +assignment_dict = assignment_instance.to_dict() +# create an instance of Assignment from a dict +assignment_form_dict = assignment.from_dict(assignment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCopy.md b/docs/AssignmentCopy.md index 6d59a0c..6dae1a9 100644 --- a/docs/AssignmentCopy.md +++ b/docs/AssignmentCopy.md @@ -2,14 +2,32 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classroom** | **str** | The destination classroom where the assignment will be copied | [optional] +**classroom** | **str** | The destination classroom where the assignment will be copied | **assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] -**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | +**verify_if_not_already_in_resource_library** | **bool** | Option to check if the assignment is already in Resource Library | [optional] + +## Example + +```python +from flat_api.models.assignment_copy import AssignmentCopy + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopy from a JSON string +assignment_copy_instance = AssignmentCopy.from_json(json) +# print the JSON string representation of the object +print AssignmentCopy.to_json() +# convert the object into a dict +assignment_copy_dict = assignment_copy_instance.to_dict() +# create an instance of AssignmentCopy from a dict +assignment_copy_form_dict = assignment_copy.from_dict(assignment_copy_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCopyResponse.md b/docs/AssignmentCopyResponse.md index 2908195..61c427f 100644 --- a/docs/AssignmentCopyResponse.md +++ b/docs/AssignmentCopyResponse.md @@ -2,16 +2,17 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] -**title** | **str** | Title of the assignment | [optional] +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | +**title** | **str** | Title of the assignment | **description** | **str** | Description and content of the assignment | [optional] **cover** | **str** | The URL of the cover to display | [optional] **cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] **max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] @@ -19,8 +20,24 @@ Name | Type | Description | Notes **toolset** | **str** | The id of the associated toolset | [optional] **nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] **resource** | **str** | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_copy_response import AssignmentCopyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyResponse from a JSON string +assignment_copy_response_instance = AssignmentCopyResponse.from_json(json) +# print the JSON string representation of the object +print AssignmentCopyResponse.to_json() + +# convert the object into a dict +assignment_copy_response_dict = assignment_copy_response_instance.to_dict() +# create an instance of AssignmentCopyResponse from a dict +assignment_copy_response_form_dict = assignment_copy_response.from_dict(assignment_copy_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCopyResponseCapabilities.md b/docs/AssignmentCopyResponseCapabilities.md index 1dffc9d..803c171 100644 --- a/docs/AssignmentCopyResponseCapabilities.md +++ b/docs/AssignmentCopyResponseCapabilities.md @@ -3,15 +3,32 @@ Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **can_edit** | **bool** | Whether the current user can edit the assignment | **can_publish_in_class** | **bool** | Whether this assignment can be published in a class | +**can_publish_in_class_error** | [**AssignmentCopyResponseCapabilitiesCanPublishInClassError**](AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) | | [optional] **can_archive** | **bool** | Whether the current user can archive the assignment | **can_unarchive** | **bool** | Whether the current user can unarchive the assignment | -**can_publish_in_class_error** | [**AssignmentCopyResponseCapabilitiesCanPublishInClassError**](AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyResponseCapabilities from a JSON string +assignment_copy_response_capabilities_instance = AssignmentCopyResponseCapabilities.from_json(json) +# print the JSON string representation of the object +print AssignmentCopyResponseCapabilities.to_json() + +# convert the object into a dict +assignment_copy_response_capabilities_dict = assignment_copy_response_capabilities_instance.to_dict() +# create an instance of AssignmentCopyResponseCapabilities from a dict +assignment_copy_response_capabilities_form_dict = assignment_copy_response_capabilities.from_dict(assignment_copy_response_capabilities_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md b/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md index 16f3b02..b9b420b 100644 --- a/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md +++ b/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md @@ -3,12 +3,29 @@ If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | A corresponding code for this error | **message** | **str** | A printable and localized message for this error | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a JSON string +assignment_copy_response_capabilities_can_publish_in_class_error_instance = AssignmentCopyResponseCapabilitiesCanPublishInClassError.from_json(json) +# print the JSON string representation of the object +print AssignmentCopyResponseCapabilitiesCanPublishInClassError.to_json() + +# convert the object into a dict +assignment_copy_response_capabilities_can_publish_in_class_error_dict = assignment_copy_response_capabilities_can_publish_in_class_error_instance.to_dict() +# create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a dict +assignment_copy_response_capabilities_can_publish_in_class_error_form_dict = assignment_copy_response_capabilities_can_publish_in_class_error.from_dict(assignment_copy_response_capabilities_can_publish_in_class_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmission.md b/docs/AssignmentSubmission.md index 5043b6b..046a326 100644 --- a/docs/AssignmentSubmission.md +++ b/docs/AssignmentSubmission.md @@ -3,6 +3,7 @@ Assignment Submission ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the submission | @@ -10,19 +11,38 @@ Name | Type | Description | Notes **classroom** | **str** | Unique identifier of the classroom where the assignment was posted | **assignment** | **str** | Unique identifier of the assignment | **creator** | **str** | The User identifier of the student who created the submission | -**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | -**creation_date** | **str** | The date when the submission was created | [optional] +**creation_date** | **str** | The date when the submission was created | +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | **submission_date** | **str** | The date when the student submitted their work | [optional] **return_date** | **str** | The date when the teacher returned the work | [optional] **return_creator** | **str** | The User unique identifier of the teacher who returned the submission | [optional] -**grade** | **float, none_type** | Optional grade. If unset, no grade was set. | [optional] -**draft_grade** | **float, none_type** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] **max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] -**exercises_ids** | **[str], none_type** | The ids of exercises when they need to be in a specific order | [optional] +**exercises_ids** | **List[str]** | The ids of exercises when they need to be in a specific order | [optional] +**playback** | [**List[AssignmentSubmissionPlaybackInner]**](AssignmentSubmissionPlaybackInner.md) | | +**comments** | [**AssignmentSubmissionComments**](AssignmentSubmissionComments.md) | | **google_classroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] **microsoft_graph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**lti** | [**AssignmentSubmissionLti**](AssignmentSubmissionLti.md) | | [optional] + +## Example + +```python +from flat_api.models.assignment_submission import AssignmentSubmission + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmission from a JSON string +assignment_submission_instance = AssignmentSubmission.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmission.to_json() +# convert the object into a dict +assignment_submission_dict = assignment_submission_instance.to_dict() +# create an instance of AssignmentSubmission from a dict +assignment_submission_form_dict = assignment_submission.from_dict(assignment_submission_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionComment.md b/docs/AssignmentSubmissionComment.md index bd96c0d..ee903be 100644 --- a/docs/AssignmentSubmissionComment.md +++ b/docs/AssignmentSubmissionComment.md @@ -3,17 +3,34 @@ Feedback comment added to an assignment submission ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The comment unique identifier | [optional] **user** | **str** | The author unique identifier | [optional] **submission** | **str** | The submission unique identifier | [optional] -**date** | **datetime** | The date when the comment was posted | [optional] +**var_date** | **datetime** | The date when the comment was posted | [optional] **modification_date** | **datetime** | The date of the last comment modification | [optional] **comment** | **str** | The comment text | [optional] **unread** | **bool** | True if the comment is unread by the current user | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionComment from a JSON string +assignment_submission_comment_instance = AssignmentSubmissionComment.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionComment.to_json() + +# convert the object into a dict +assignment_submission_comment_dict = assignment_submission_comment_instance.to_dict() +# create an instance of AssignmentSubmissionComment from a dict +assignment_submission_comment_form_dict = assignment_submission_comment.from_dict(assignment_submission_comment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/AssignmentSubmissionCommentCreation.md index 174be70..68a7471 100644 --- a/docs/AssignmentSubmissionCommentCreation.md +++ b/docs/AssignmentSubmissionCommentCreation.md @@ -3,11 +3,28 @@ Creation of a assignment submission comment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **comment** | **str** | The comment text | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionCommentCreation from a JSON string +assignment_submission_comment_creation_instance = AssignmentSubmissionCommentCreation.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionCommentCreation.to_json() + +# convert the object into a dict +assignment_submission_comment_creation_dict = assignment_submission_comment_creation_instance.to_dict() +# create an instance of AssignmentSubmissionCommentCreation from a dict +assignment_submission_comment_creation_form_dict = assignment_submission_comment_creation.from_dict(assignment_submission_comment_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionComments.md b/docs/AssignmentSubmissionComments.md new file mode 100644 index 0000000..900dc34 --- /dev/null +++ b/docs/AssignmentSubmissionComments.md @@ -0,0 +1,30 @@ +# AssignmentSubmissionComments + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | The total number of comments added to the submission | [optional] +**unread** | **float** | The number of unread comments for the current user | [optional] + +## Example + +```python +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionComments from a JSON string +assignment_submission_comments_instance = AssignmentSubmissionComments.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionComments.to_json() + +# convert the object into a dict +assignment_submission_comments_dict = assignment_submission_comments_instance.to_dict() +# create an instance of AssignmentSubmissionComments from a dict +assignment_submission_comments_form_dict = assignment_submission_comments.from_dict(assignment_submission_comments_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionHistory.md b/docs/AssignmentSubmissionHistory.md index 3cf7436..d3a3b57 100644 --- a/docs/AssignmentSubmissionHistory.md +++ b/docs/AssignmentSubmissionHistory.md @@ -3,10 +3,14 @@ History item of the submission ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **datetime** | The date when the submission was changed | [optional] -**users** | **[str]** | The user(s) unique identifier(s) who made the change | [optional] +**var_date** | **datetime** | The date when the submission was changed | +**classroom** | **str** | The classroom unique identifier where the submission was changed | [optional] +**assignment** | **str** | The assignment unique identifier where the submission was changed | [optional] +**submission** | **str** | The submission unique identifier | [optional] +**users** | **List[str]** | The user(s) unique identifier(s) who made the change | **source** | **str** | The source of the change if the change was made by a third-party software | [optional] **state** | [**AssignmentSubmissionHistoryState**](AssignmentSubmissionHistoryState.md) | | [optional] **draft_grade** | **float** | The numerator of the grade at this time in the submission grade history | [optional] @@ -15,8 +19,24 @@ Name | Type | Description | Notes **comment** | **str** | The comment that is made to this submission | [optional] **due_date** | **datetime** | The due date of this assignment | [optional] **attachment** | [**AssignmentSubmissionHistoryAttachment**](AssignmentSubmissionHistoryAttachment.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionHistory from a JSON string +assignment_submission_history_instance = AssignmentSubmissionHistory.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionHistory.to_json() + +# convert the object into a dict +assignment_submission_history_dict = assignment_submission_history_instance.to_dict() +# create an instance of AssignmentSubmissionHistory from a dict +assignment_submission_history_form_dict = assignment_submission_history.from_dict(assignment_submission_history_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionHistoryAttachment.md b/docs/AssignmentSubmissionHistoryAttachment.md index d27a227..047e17f 100644 --- a/docs/AssignmentSubmissionHistoryAttachment.md +++ b/docs/AssignmentSubmissionHistoryAttachment.md @@ -2,13 +2,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **score** | **str** | The score identifier that changed | [optional] **revision** | **str** | The revision identifier that changed | [optional] **title** | **str** | The title of the score that changed | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionHistoryAttachment from a JSON string +assignment_submission_history_attachment_instance = AssignmentSubmissionHistoryAttachment.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionHistoryAttachment.to_json() + +# convert the object into a dict +assignment_submission_history_attachment_dict = assignment_submission_history_attachment_instance.to_dict() +# create an instance of AssignmentSubmissionHistoryAttachment from a dict +assignment_submission_history_attachment_form_dict = assignment_submission_history_attachment.from_dict(assignment_submission_history_attachment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionHistoryState.md b/docs/AssignmentSubmissionHistoryState.md index 9a7b017..93bd1c7 100644 --- a/docs/AssignmentSubmissionHistoryState.md +++ b/docs/AssignmentSubmissionHistoryState.md @@ -3,9 +3,9 @@ State of the submission history ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | State of the submission history | must be one of ["created", "turnedIn", "returned", "reset", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionLti.md b/docs/AssignmentSubmissionLti.md new file mode 100644 index 0000000..a7068d6 --- /dev/null +++ b/docs/AssignmentSubmissionLti.md @@ -0,0 +1,29 @@ +# AssignmentSubmissionLti + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourcedid** | **str** | The sourcedid of the LTI submission when using LTI Outcomes | + +## Example + +```python +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionLti from a JSON string +assignment_submission_lti_instance = AssignmentSubmissionLti.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionLti.to_json() + +# convert the object into a dict +assignment_submission_lti_dict = assignment_submission_lti_instance.to_dict() +# create an instance of AssignmentSubmissionLti from a dict +assignment_submission_lti_form_dict = assignment_submission_lti.from_dict(assignment_submission_lti_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionPlaybackInner.md b/docs/AssignmentSubmissionPlaybackInner.md new file mode 100644 index 0000000..ad92cd1 --- /dev/null +++ b/docs/AssignmentSubmissionPlaybackInner.md @@ -0,0 +1,31 @@ +# AssignmentSubmissionPlaybackInner + +Playback used by student in this submission (used to limit the playback for the assignment) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **str** | The score unique identifier | +**nb_play_attempt** | **float** | The number of playback used by the student | + +## Example + +```python +from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionPlaybackInner from a JSON string +assignment_submission_playback_inner_instance = AssignmentSubmissionPlaybackInner.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionPlaybackInner.to_json() + +# convert the object into a dict +assignment_submission_playback_inner_dict = assignment_submission_playback_inner_instance.to_dict() +# create an instance of AssignmentSubmissionPlaybackInner from a dict +assignment_submission_playback_inner_form_dict = assignment_submission_playback_inner.from_dict(assignment_submission_playback_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionState.md b/docs/AssignmentSubmissionState.md index dc685c7..950f780 100644 --- a/docs/AssignmentSubmissionState.md +++ b/docs/AssignmentSubmissionState.md @@ -3,9 +3,9 @@ State of the submission ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | State of the submission | must be one of ["created", "turnedIn", "returned", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/AssignmentSubmissionUpdate.md index 7ae284b..71c8c69 100644 --- a/docs/AssignmentSubmissionUpdate.md +++ b/docs/AssignmentSubmissionUpdate.md @@ -3,17 +3,33 @@ Assignment Submission creation ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] **submit** | **bool** | If `true`, the submission will be marked as done | [optional] -**draft_grade** | **float, none_type** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] -**grade** | **float, none_type** | Optional grade. If unset, no grade was set. | [optional] -**exercises_ids** | **[str], none_type** | The ids of exercises when they need to be in a specific order | [optional] -**_return** | **bool** | If `true`, the submission will be marked as done | [optional] -**comments** | [**AssignmentSubmissionUpdateComments**](AssignmentSubmissionUpdateComments.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**grade** | **float** | Optional grade. If unset, no grade was set. | [optional] +**exercises_ids** | **List[str]** | The ids of exercises when they need to be in a specific order | [optional] +**var_return** | **bool** | If `true`, the submission will be marked as done | [optional] + +## Example + +```python +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionUpdate from a JSON string +assignment_submission_update_instance = AssignmentSubmissionUpdate.from_json(json) +# print the JSON string representation of the object +print AssignmentSubmissionUpdate.to_json() +# convert the object into a dict +assignment_submission_update_dict = assignment_submission_update_instance.to_dict() +# create an instance of AssignmentSubmissionUpdate from a dict +assignment_submission_update_form_dict = assignment_submission_update.from_dict(assignment_submission_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionUpdateComments.md b/docs/AssignmentSubmissionUpdateComments.md deleted file mode 100644 index de2a78e..0000000 --- a/docs/AssignmentSubmissionUpdateComments.md +++ /dev/null @@ -1,13 +0,0 @@ -# AssignmentSubmissionUpdateComments - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | The total number of comments added to the submission | [optional] -**unread** | **float** | The number of unread comments for the current user | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentType.md b/docs/AssignmentType.md index 1e1b0ae..83e5742 100644 --- a/docs/AssignmentType.md +++ b/docs/AssignmentType.md @@ -3,9 +3,9 @@ Type of the assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Type of the assignment | must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentUpdate.md b/docs/AssignmentUpdate.md index 06b0c37..560191c 100644 --- a/docs/AssignmentUpdate.md +++ b/docs/AssignmentUpdate.md @@ -3,21 +3,38 @@ Assignment Resource Editing ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**AssignmentType**](AssignmentType.md) | | [optional] **title** | **str** | Title of the assignment | [optional] **description** | **str** | Description and content of the assignment | [optional] -**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**nb_playback_authorized** | **float, none_type** | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | **str, none_type** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**cover_file** | **str, none_type** | The id of the cover to display | [optional] -**cover** | **str, none_type** | The URL of the cover to display | [optional] -**max_points** | **float, none_type** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] **shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.assignment_update import AssignmentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentUpdate from a JSON string +assignment_update_instance = AssignmentUpdate.from_json(json) +# print the JSON string representation of the object +print AssignmentUpdate.to_json() + +# convert the object into a dict +assignment_update_dict = assignment_update_instance.to_dict() +# create an instance of AssignmentUpdate from a dict +assignment_update_form_dict = assignment_update.from_dict(assignment_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassApi.md b/docs/ClassApi.md index 8b2a1c7..b9eaabe 100644 --- a/docs/ClassApi.md +++ b/docs/ClassApi.md @@ -37,7 +37,7 @@ Method | HTTP request | Description # **activate_class** -> ClassDetails activate_class(_class) +> ClassDetails activate_class(var_class) Activate the class @@ -48,12 +48,11 @@ Mark the class as `active`. This is mainly used for classes synchronized from Cl * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -65,33 +64,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class - # example passing only required values which don't have defaults set try: # Activate the class - api_response = api_instance.activate_class(_class) + api_response = api_instance.activate_class(var_class) + print("The response of ClassApi->activate_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->activate_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | + **var_class** | **str**| Unique identifier of the class | ### Return type @@ -106,7 +103,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -117,7 +113,7 @@ Name | Type | Description | Notes [[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) # **add_class_user** -> add_class_user(_class, user) +> add_class_user(var_class, user) Add a user to the class @@ -128,11 +124,10 @@ This method can be used by a teacher of the class to enroll another Flat user in * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -144,34 +139,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - user = "user_example" # str | Unique identifier of the user + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + user = 'user_example' # str | Unique identifier of the user - # example passing only required values which don't have defaults set try: # Add a user to the class - api_instance.add_class_user(_class, user) - except flat_api.ApiException as e: + api_instance.add_class_user(var_class, user) + except Exception as e: print("Exception when calling ClassApi->add_class_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | + **var_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | ### Return type @@ -186,7 +178,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -197,7 +188,7 @@ void (empty response body) [[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) # **archive_assignment** -> Assignment archive_assignment(_class, assignment) +> Assignment archive_assignment(var_class, assignment) Archive the assignment @@ -208,12 +199,11 @@ Archive the assignment * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment import Assignment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -225,35 +215,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment - # example passing only required values which don't have defaults set try: # Archive the assignment - api_response = api_instance.archive_assignment(_class, assignment) + api_response = api_instance.archive_assignment(var_class, assignment) + print("The response of ClassApi->archive_assignment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->archive_assignment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | ### Return type @@ -268,7 +256,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -279,7 +266,7 @@ Name | Type | Description | Notes [[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) # **archive_class** -> ClassDetails archive_class(_class) +> ClassDetails archive_class(var_class) Archive the class @@ -290,12 +277,11 @@ Mark the class as `archived`. When this course is synchronized with another app, * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -307,33 +293,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class - # example passing only required values which don't have defaults set try: # Archive the class - api_response = api_instance.archive_class(_class) + api_response = api_instance.archive_class(var_class) + print("The response of ClassApi->archive_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->archive_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | + **var_class** | **str**| Unique identifier of the class | ### Return type @@ -348,7 +332,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -359,7 +342,7 @@ Name | Type | Description | Notes [[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) # **copy_assignment** -> AssignmentCopyResponse copy_assignment(_class, assignment, body) +> AssignmentCopyResponse copy_assignment(var_class, assignment, body) Copy an assignment @@ -370,13 +353,12 @@ Copy an assignment to a specified class or the resource library For class assig * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_copy_response import AssignmentCopyResponse +from flat_api.models.assignment_copy import AssignmentCopy +from flat_api.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -388,42 +370,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - body = AssignmentCopy( - classroom="classroom_example", - assignment="assignment_example", - scheduled_date=dateutil_parser('1970-01-01T00:00:00.00Z'), - library_parent="library_parent_example", - ) # AssignmentCopy | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + body = flat_api.AssignmentCopy() # AssignmentCopy | + try: # Copy an assignment - api_response = api_instance.copy_assignment(_class, assignment, body) + api_response = api_instance.copy_assignment(var_class, assignment, body) + print("The response of ClassApi->copy_assignment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->copy_assignment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentCopy**](AssignmentCopy.md)| | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **body** | [**AssignmentCopy**](AssignmentCopy.md)| | ### Return type @@ -438,7 +413,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -460,13 +434,12 @@ Classrooms on Flat allow you to create activities with assignments and post cont * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_creation import ClassCreation -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_creation import ClassCreation +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -478,41 +451,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - body = ClassCreation( - name="name_example", - section="section_example", - level=ClassGradeLevel("elementary"), - skills_focused=EduSkillsFocused([ - "notation", - ]), - size=0, - ) # ClassCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + body = flat_api.ClassCreation() # ClassCreation | + try: # Create a new class api_response = api_instance.create_class(body) + print("The response of ClassApi->create_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->create_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ClassCreation**](ClassCreation.md)| | + **body** | [**ClassCreation**](ClassCreation.md)| | ### Return type @@ -527,7 +490,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -539,7 +501,7 @@ Name | Type | Description | Notes [[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) # **create_class_assignment** -> Assignment create_class_assignment(_class) +> Assignment create_class_assignment(var_class, body) Assignment creation @@ -550,13 +512,12 @@ Use this method as a teacher to create and post a new assignment to a class. If * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_assignment_update import ClassAssignmentUpdate +from flat_api.models.assignment import Assignment +from flat_api.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -568,81 +529,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - body = ClassAssignmentUpdate( - type=AssignmentType("none"), - title="title_example", - description="description_example", - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ), - ], - nb_playback_authorized=3.14, - toolset="toolset_example", - cover_file="cover_file_example", - cover="cover_example", - max_points=0, - release_grades="auto", - shuffle_exercises=True, - state="draft", - due_date=dateutil_parser('1970-01-01T00:00:00.00Z'), - scheduled_date=dateutil_parser('1970-01-01T00:00:00.00Z'), - google_classroom=ClassAssignmentUpdateGoogleClassroom( - topic_id="topic_id_example", - ), - microsoft_graph=ClassAssignmentUpdateMicrosoftGraph( - categories=[ - "categories_example", - ], - ), - assignee_mode="everyone", - assigned_students=[ - "assigned_students_example", - ], - ) # ClassAssignmentUpdate | (optional) - - # example passing only required values which don't have defaults set - try: - # Assignment creation - api_response = api_instance.create_class_assignment(_class) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ClassApi->create_class_assignment: %s\n" % e) + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + body = flat_api.ClassAssignmentUpdate() # ClassAssignmentUpdate | - # example passing only required values which don't have defaults set - # and optional values try: # Assignment creation - api_response = api_instance.create_class_assignment(_class, body=body) + api_response = api_instance.create_class_assignment(var_class, body) + print("The response of ClassApi->create_class_assignment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->create_class_assignment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **body** | [**ClassAssignmentUpdate**](ClassAssignmentUpdate.md)| | [optional] + **var_class** | **str**| Unique identifier of the class | + **body** | [**ClassAssignmentUpdate**](ClassAssignmentUpdate.md)| | ### Return type @@ -657,7 +570,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -668,7 +580,7 @@ Name | Type | Description | Notes [[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) # **create_submission** -> AssignmentSubmission create_submission(_class, assignment, body) +> AssignmentSubmission create_submission(var_class, assignment, body) Create or edit a submission @@ -679,13 +591,12 @@ Use this method as a student to create, update and submit a submission related t * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -697,60 +608,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - body = AssignmentSubmissionUpdate( - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ), - ], - submit=True, - draft_grade=0, - grade=0, - exercises_ids=[ - "exercises_ids_example", - ], - _return=True, - comments=AssignmentSubmissionUpdateComments( - total=3.14, - unread=3.14, - ), - ) # AssignmentSubmissionUpdate | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | + try: # Create or edit a submission - api_response = api_instance.create_submission(_class, assignment, body) + api_response = api_instance.create_submission(var_class, assignment, body) + print("The response of ClassApi->create_submission:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->create_submission: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type @@ -765,7 +651,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -776,7 +661,7 @@ Name | Type | Description | Notes [[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) # **create_test_student_account** -> UserDetails create_test_student_account(_class) +> UserDetails create_test_student_account(var_class, reset=reset) Create a test student account @@ -787,12 +672,11 @@ Test students account can be created by teachers an admin and be used to experim * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.user_details import UserDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_details import UserDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -804,44 +688,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class reset = True # bool | If true, the testing account will be re-created. (optional) - # example passing only required values which don't have defaults set try: # Create a test student account - api_response = api_instance.create_test_student_account(_class) + api_response = api_instance.create_test_student_account(var_class, reset=reset) + print("The response of ClassApi->create_test_student_account:\n") pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ClassApi->create_test_student_account: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Create a test student account - api_response = api_instance.create_test_student_account(_class, reset=reset) - pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->create_test_student_account: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **reset** | **bool**| If true, the testing account will be re-created. | [optional] + **var_class** | **str**| Unique identifier of the class | + **reset** | **bool**| If true, the testing account will be re-created. | [optional] ### Return type @@ -856,7 +729,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -867,7 +739,7 @@ Name | Type | Description | Notes [[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) # **delete_class_user** -> delete_class_user(_class, user) +> delete_class_user(var_class, user) Remove a user from the class @@ -878,11 +750,10 @@ This method can be used by a teacher to remove a user from the class, or by a st * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -894,34 +765,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - user = "user_example" # str | Unique identifier of the user + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + user = 'user_example' # str | Unique identifier of the user - # example passing only required values which don't have defaults set try: # Remove a user from the class - api_instance.delete_class_user(_class, user) - except flat_api.ApiException as e: + api_instance.delete_class_user(var_class, user) + except Exception as e: print("Exception when calling ClassApi->delete_class_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | + **var_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | ### Return type @@ -936,7 +804,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -947,7 +814,7 @@ void (empty response body) [[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) # **delete_submission** -> AssignmentSubmission delete_submission(_class, assignment, submission) +> AssignmentSubmission delete_submission(var_class, assignment, submission) Reset a submission @@ -958,12 +825,11 @@ Use this method as a teacher to reset a submission and allow student to start ov * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -975,37 +841,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission - # example passing only required values which don't have defaults set try: # Reset a submission - api_response = api_instance.delete_submission(_class, assignment, submission) + api_response = api_instance.delete_submission(var_class, assignment, submission) + print("The response of ClassApi->delete_submission:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->delete_submission: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type @@ -1020,7 +884,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1031,7 +894,7 @@ Name | Type | Description | Notes [[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) # **delete_submission_comment** -> delete_submission_comment(_class, assignment, submission, comment) +> delete_submission_comment(var_class, assignment, submission, comment) Delete a feedback comment to a submission @@ -1040,11 +903,10 @@ Delete a feedback comment to a submission * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1056,38 +918,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission - comment = "comment_example" # str | Unique identifier of the comment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission + comment = 'comment_example' # str | Unique identifier of the comment - # example passing only required values which don't have defaults set try: # Delete a feedback comment to a submission - api_instance.delete_submission_comment(_class, assignment, submission, comment) - except flat_api.ApiException as e: + api_instance.delete_submission_comment(var_class, assignment, submission, comment) + except Exception as e: print("Exception when calling ClassApi->delete_submission_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **comment** | **str**| Unique identifier of the comment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | ### Return type @@ -1102,7 +961,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1113,7 +971,7 @@ void (empty response body) [[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) # **edit_submission** -> AssignmentSubmission edit_submission(_class, assignment, submission, body) +> AssignmentSubmission edit_submission(var_class, assignment, submission, body) Edit a submission @@ -1124,13 +982,12 @@ Use this method as a teacher to update the different submission and give feedbac * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1142,62 +999,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission - body = AssignmentSubmissionUpdate( - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ), - ], - submit=True, - draft_grade=0, - grade=0, - exercises_ids=[ - "exercises_ids_example", - ], - _return=True, - comments=AssignmentSubmissionUpdateComments( - total=3.14, - unread=3.14, - ), - ) # AssignmentSubmissionUpdate | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission + body = flat_api.AssignmentSubmissionUpdate() # AssignmentSubmissionUpdate | + try: # Edit a submission - api_response = api_instance.edit_submission(_class, assignment, submission, body) + api_response = api_instance.edit_submission(var_class, assignment, submission, body) + print("The response of ClassApi->edit_submission:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->edit_submission: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **body** | [**AssignmentSubmissionUpdate**](AssignmentSubmissionUpdate.md)| | ### Return type @@ -1212,7 +1044,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1234,12 +1065,11 @@ Use this method to join a class using an enrollment code given one of the teache * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1251,33 +1081,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - enrollment_code = "enrollmentCode_example" # str | The enrollment code, available to the teacher in `ClassDetails` + api_instance = flat_api.ClassApi(api_client) + enrollment_code = 'enrollment_code_example' # str | The enrollment code, available to the teacher in `ClassDetails` - # example passing only required values which don't have defaults set try: # Join a class api_response = api_instance.enroll_class(enrollment_code) + print("The response of ClassApi->enroll_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->enroll_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | + **enrollment_code** | **str**| The enrollment code, available to the teacher in `ClassDetails` | ### Return type @@ -1292,7 +1120,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1303,7 +1130,7 @@ Name | Type | Description | Notes [[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) # **export_submissions_reviews_as_csv** -> file_type export_submissions_reviews_as_csv(_class, assignment) +> bytearray export_submissions_reviews_as_csv(var_class, assignment) CSV Grades exports @@ -1314,11 +1141,10 @@ Export list of submissions grades to a CSV file * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1330,39 +1156,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment - # example passing only required values which don't have defaults set try: # CSV Grades exports - api_response = api_instance.export_submissions_reviews_as_csv(_class, assignment) + api_response = api_instance.export_submissions_reviews_as_csv(var_class, assignment) + print("The response of ClassApi->export_submissions_reviews_as_csv:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->export_submissions_reviews_as_csv: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | ### Return type -**file_type** +**bytearray** ### Authorization @@ -1373,7 +1197,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: text/csv - ### HTTP response details | Status code | Description | Response headers | @@ -1384,7 +1207,7 @@ Name | Type | Description | Notes [[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) # **export_submissions_reviews_as_excel** -> file_type export_submissions_reviews_as_excel(_class, assignment) +> bytearray export_submissions_reviews_as_excel(var_class, assignment) Excel Grades exports @@ -1395,11 +1218,10 @@ Export list of submissions grades to an Excel file * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1411,39 +1233,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment - # example passing only required values which don't have defaults set try: # Excel Grades exports - api_response = api_instance.export_submissions_reviews_as_excel(_class, assignment) + api_response = api_instance.export_submissions_reviews_as_excel(var_class, assignment) + print("The response of ClassApi->export_submissions_reviews_as_excel:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->export_submissions_reviews_as_excel: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | ### Return type -**file_type** +**bytearray** ### Authorization @@ -1454,7 +1274,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - ### HTTP response details | Status code | Description | Response headers | @@ -1465,7 +1284,7 @@ Name | Type | Description | Notes [[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) # **get_class** -> ClassDetails get_class(_class) +> ClassDetails get_class(var_class) Get the details of a single class @@ -1474,12 +1293,11 @@ Get the details of a single class * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1491,33 +1309,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class - # example passing only required values which don't have defaults set try: # Get the details of a single class - api_response = api_instance.get_class(_class) + api_response = api_instance.get_class(var_class) + print("The response of ClassApi->get_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | + **var_class** | **str**| Unique identifier of the class | ### Return type @@ -1532,7 +1348,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1543,7 +1358,7 @@ Name | Type | Description | Notes [[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) # **get_score_submissions** -> [AssignmentSubmission] get_score_submissions(score) +> List[AssignmentSubmission] get_score_submissions(score) List submissions related to the score @@ -1554,12 +1369,11 @@ This API call will list the different assignments submissions where the score is * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1571,37 +1385,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - score = "score_example" # str | 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`). + api_instance = flat_api.ClassApi(api_client) + score = 'score_example' # str | 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`). - # example passing only required values which don't have defaults set try: # List submissions related to the score api_response = api_instance.get_score_submissions(score) + print("The response of ClassApi->get_score_submissions:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_score_submissions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | + **score** | **str**| 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`). | ### Return type -[**[AssignmentSubmission]**](AssignmentSubmission.md) +[**List[AssignmentSubmission]**](AssignmentSubmission.md) ### Authorization @@ -1612,7 +1424,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1623,7 +1434,7 @@ Name | Type | Description | Notes [[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) # **get_submission** -> AssignmentSubmission get_submission(_class, assignment, submission) +> AssignmentSubmission get_submission(var_class, assignment, submission) Get a student submission @@ -1632,12 +1443,11 @@ Get a student submission * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1649,37 +1459,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission - # example passing only required values which don't have defaults set try: # Get a student submission - api_response = api_instance.get_submission(_class, assignment, submission) + api_response = api_instance.get_submission(var_class, assignment, submission) + print("The response of ClassApi->get_submission:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_submission: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type @@ -1694,7 +1502,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1705,7 +1512,7 @@ Name | Type | Description | Notes [[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) # **get_submission_comments** -> [AssignmentSubmissionComment] get_submission_comments(_class, assignment, submission) +> List[AssignmentSubmissionComment] get_submission_comments(var_class, assignment, submission) List the feedback comments of a submission @@ -1714,12 +1521,11 @@ List the feedback comments of a submission * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1731,41 +1537,39 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission - # example passing only required values which don't have defaults set try: # List the feedback comments of a submission - api_response = api_instance.get_submission_comments(_class, assignment, submission) + api_response = api_instance.get_submission_comments(var_class, assignment, submission) + print("The response of ClassApi->get_submission_comments:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_submission_comments: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type -[**[AssignmentSubmissionComment]**](AssignmentSubmissionComment.md) +[**List[AssignmentSubmissionComment]**](AssignmentSubmissionComment.md) ### Authorization @@ -1776,7 +1580,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1789,7 +1592,7 @@ Name | Type | Description | Notes [[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) # **get_submission_history** -> [AssignmentSubmissionHistory] get_submission_history(_class, assignment, submission) +> List[AssignmentSubmissionHistory] get_submission_history(var_class, assignment, submission) Get the history of the submission @@ -1800,12 +1603,11 @@ For teachers only. Returns a detailed history of the submission. This currently * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1817,41 +1619,39 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission - # example passing only required values which don't have defaults set try: # Get the history of the submission - api_response = api_instance.get_submission_history(_class, assignment, submission) + api_response = api_instance.get_submission_history(var_class, assignment, submission) + print("The response of ClassApi->get_submission_history:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_submission_history: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | ### Return type -[**[AssignmentSubmissionHistory]**](AssignmentSubmissionHistory.md) +[**List[AssignmentSubmissionHistory]**](AssignmentSubmissionHistory.md) ### Authorization @@ -1862,7 +1662,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1875,7 +1674,7 @@ Name | Type | Description | Notes [[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) # **get_submissions** -> [AssignmentSubmission] get_submissions(_class, assignment) +> List[AssignmentSubmission] get_submissions(var_class, assignment) List the students' submissions @@ -1884,12 +1683,11 @@ List the students' submissions * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1901,39 +1699,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment - # example passing only required values which don't have defaults set try: # List the students' submissions - api_response = api_instance.get_submissions(_class, assignment) + api_response = api_instance.get_submissions(var_class, assignment) + print("The response of ClassApi->get_submissions:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->get_submissions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | ### Return type -[**[AssignmentSubmission]**](AssignmentSubmission.md) +[**List[AssignmentSubmission]**](AssignmentSubmission.md) ### Authorization @@ -1944,7 +1740,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1955,7 +1750,7 @@ Name | Type | Description | Notes [[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) # **list_assignments** -> [ClassAssignment] list_assignments(_class) +> List[ClassAssignment] list_assignments(var_class) Assignments listing @@ -1964,12 +1759,11 @@ Assignments listing * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_assignment import ClassAssignment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1981,37 +1775,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class - # example passing only required values which don't have defaults set try: # Assignments listing - api_response = api_instance.list_assignments(_class) + api_response = api_instance.list_assignments(var_class) + print("The response of ClassApi->list_assignments:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->list_assignments: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | + **var_class** | **str**| Unique identifier of the class | ### Return type -[**[ClassAssignment]**](ClassAssignment.md) +[**List[ClassAssignment]**](ClassAssignment.md) ### Authorization @@ -2022,7 +1814,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2033,7 +1824,7 @@ Name | Type | Description | Notes [[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) # **list_class_student_submissions** -> [AssignmentSubmission] list_class_student_submissions(_class, user) +> List[AssignmentSubmission] list_class_student_submissions(var_class, user) List the submissions for a student @@ -2044,12 +1835,11 @@ Use this method as a teacher to list all the assignment submissions sent by a st * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2061,39 +1851,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - user = "user_example" # str | Unique identifier of the user + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + user = 'user_example' # str | Unique identifier of the user - # example passing only required values which don't have defaults set try: # List the submissions for a student - api_response = api_instance.list_class_student_submissions(_class, user) + api_response = api_instance.list_class_student_submissions(var_class, user) + print("The response of ClassApi->list_class_student_submissions:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->list_class_student_submissions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **user** | **str**| Unique identifier of the user | + **var_class** | **str**| Unique identifier of the class | + **user** | **str**| Unique identifier of the user | ### Return type -[**[AssignmentSubmission]**](AssignmentSubmission.md) +[**List[AssignmentSubmission]**](AssignmentSubmission.md) ### Authorization @@ -2104,7 +1892,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2115,7 +1902,7 @@ Name | Type | Description | Notes [[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) # **list_classes** -> [ClassDetails] list_classes() +> List[ClassDetails] list_classes(state=state) List the classes available for the current user @@ -2124,12 +1911,11 @@ List the classes available for the current user * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2141,38 +1927,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - state = "active" # str | Filter the classes by state (optional) if omitted the server will use the default value of "active" + api_instance = flat_api.ClassApi(api_client) + state = 'active' # str | Filter the classes by state (optional) (default to 'active') - # example passing only required values which don't have defaults set - # and optional values try: # List the classes available for the current user api_response = api_instance.list_classes(state=state) + print("The response of ClassApi->list_classes:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->list_classes: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **state** | **str**| Filter the classes by state | [optional] if omitted the server will use the default value of "active" + **state** | **str**| Filter the classes by state | [optional] [default to 'active'] ### Return type -[**[ClassDetails]**](ClassDetails.md) +[**List[ClassDetails]**](ClassDetails.md) ### Authorization @@ -2183,7 +1966,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2194,7 +1976,7 @@ Name | Type | Description | Notes [[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) # **post_submission_comment** -> AssignmentSubmissionComment post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) +> AssignmentSubmissionComment post_submission_comment(var_class, assignment, submission, assignment_submission_comment_creation) Add a feedback comment to a submission @@ -2203,13 +1985,12 @@ Add a feedback comment to a submission * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2221,41 +2002,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission - assignment_submission_comment_creation = AssignmentSubmissionCommentCreation( - comment="comment_example", - ) # AssignmentSubmissionCommentCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission + assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | + try: # Add a feedback comment to a submission - api_response = api_instance.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation) + api_response = api_instance.post_submission_comment(var_class, assignment, submission, assignment_submission_comment_creation) + print("The response of ClassApi->post_submission_comment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->post_submission_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | ### Return type @@ -2270,7 +2047,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2283,7 +2059,7 @@ Name | Type | Description | Notes [[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) # **unarchive_assignment** -> Assignment unarchive_assignment(_class, assignment) +> Assignment unarchive_assignment(var_class, assignment) Unarchive the assignment. @@ -2294,12 +2070,11 @@ Mark the assignment as `active`. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment import Assignment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2311,35 +2086,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment - # example passing only required values which don't have defaults set try: # Unarchive the assignment. - api_response = api_instance.unarchive_assignment(_class, assignment) + api_response = api_instance.unarchive_assignment(var_class, assignment) + print("The response of ClassApi->unarchive_assignment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->unarchive_assignment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | ### Return type @@ -2354,7 +2127,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2365,7 +2137,7 @@ Name | Type | Description | Notes [[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) # **unarchive_class** -> ClassDetails unarchive_class(_class) +> ClassDetails unarchive_class(var_class) Unarchive the class @@ -2376,12 +2148,11 @@ Mark the class as `active`. When this course is synchronized with another app, l * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_details import ClassDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2393,33 +2164,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class - # example passing only required values which don't have defaults set try: # Unarchive the class - api_response = api_instance.unarchive_class(_class) + api_response = api_instance.unarchive_class(var_class) + print("The response of ClassApi->unarchive_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->unarchive_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | + **var_class** | **str**| Unique identifier of the class | ### Return type @@ -2434,7 +2203,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2445,7 +2213,7 @@ Name | Type | Description | Notes [[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) # **update_class** -> ClassDetails update_class(_class) +> ClassDetails update_class(var_class, body) Update the class @@ -2456,13 +2224,12 @@ Update the meta information of the class * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.class_details import ClassDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.class_update import ClassUpdate +from flat_api.models.class_details import ClassDetails +from flat_api.models.class_update import ClassUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2474,52 +2241,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - body = ClassUpdate( - name="name_example", - section="section_example", - level=ClassGradeLevel("elementary"), - skills_focused=EduSkillsFocused([ - "notation", - ]), - size=0, - ) # ClassUpdate | Details of the Class (optional) - - # example passing only required values which don't have defaults set - try: - # Update the class - api_response = api_instance.update_class(_class) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ClassApi->update_class: %s\n" % e) + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + body = flat_api.ClassUpdate() # ClassUpdate | Details of the Class - # example passing only required values which don't have defaults set - # and optional values try: # Update the class - api_response = api_instance.update_class(_class, body=body) + api_response = api_instance.update_class(var_class, body) + print("The response of ClassApi->update_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->update_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | [optional] + **var_class** | **str**| Unique identifier of the class | + **body** | [**ClassUpdate**](ClassUpdate.md)| Details of the Class | ### Return type @@ -2534,7 +2282,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2545,7 +2292,7 @@ Name | Type | Description | Notes [[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) # **update_submission_comment** -> AssignmentSubmissionComment update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) +> AssignmentSubmissionComment update_submission_comment(var_class, assignment, submission, comment, assignment_submission_comment_creation) Update a feedback comment to a submission @@ -2554,13 +2301,12 @@ Update a feedback comment to a submission * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import class_api -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2572,43 +2318,39 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = class_api.ClassApi(api_client) - _class = "class_example" # str | Unique identifier of the class - assignment = "assignment_example" # str | Unique identifier of the assignment - submission = "submission_example" # str | Unique identifier of the submission - comment = "comment_example" # str | Unique identifier of the comment - assignment_submission_comment_creation = AssignmentSubmissionCommentCreation( - comment="comment_example", - ) # AssignmentSubmissionCommentCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + submission = 'submission_example' # str | Unique identifier of the submission + comment = 'comment_example' # str | Unique identifier of the comment + assignment_submission_comment_creation = flat_api.AssignmentSubmissionCommentCreation() # AssignmentSubmissionCommentCreation | + try: # Update a feedback comment to a submission - api_response = api_instance.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation) + api_response = api_instance.update_submission_comment(var_class, assignment, submission, comment, assignment_submission_comment_creation) + print("The response of ClassApi->update_submission_comment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ClassApi->update_submission_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **_class** | **str**| Unique identifier of the class | - **assignment** | **str**| Unique identifier of the assignment | - **submission** | **str**| Unique identifier of the submission | - **comment** | **str**| Unique identifier of the comment | - **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **submission** | **str**| Unique identifier of the submission | + **comment** | **str**| Unique identifier of the comment | + **assignment_submission_comment_creation** | [**AssignmentSubmissionCommentCreation**](AssignmentSubmissionCommentCreation.md)| | ### Return type @@ -2623,7 +2365,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/ClassAssignment.md b/docs/ClassAssignment.md index 176cbc5..1fe39f6 100644 --- a/docs/ClassAssignment.md +++ b/docs/ClassAssignment.md @@ -2,16 +2,17 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] -**title** | **str** | Title of the assignment | [optional] +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | +**title** | **str** | Title of the assignment | **description** | **str** | Description and content of the assignment | [optional] **cover** | **str** | The URL of the cover to display | [optional] **cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] **max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] @@ -25,16 +26,32 @@ Name | Type | Description | Notes **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] **due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] **assignee_mode** | **str** | Possible modes of assigning assignments | [optional] -**assigned_students** | **[str]** | Identifiers for the students that have access to the assignment | [optional] -**submissions** | [**[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] +**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] +**submissions** | [**List[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] **google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] **microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] **mfc** | [**ClassAssignmentMfc**](ClassAssignmentMfc.md) | | [optional] **canvas** | [**ClassAssignmentCanvas**](ClassAssignmentCanvas.md) | | [optional] **lti** | [**ClassAssignmentLti**](ClassAssignmentLti.md) | | [optional] **issue** | **str** | Detected issue for this assignment | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_assignment import ClassAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignment from a JSON string +class_assignment_instance = ClassAssignment.from_json(json) +# print the JSON string representation of the object +print ClassAssignment.to_json() + +# convert the object into a dict +class_assignment_dict = class_assignment_instance.to_dict() +# create an instance of ClassAssignment from a dict +class_assignment_form_dict = class_assignment.from_dict(class_assignment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentCanvas.md b/docs/ClassAssignmentCanvas.md index b874646..f659c0d 100644 --- a/docs/ClassAssignmentCanvas.md +++ b/docs/ClassAssignmentCanvas.md @@ -3,12 +3,29 @@ A Canvas LMS assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the course on Canvas assignment | [optional] **alternate_link** | **str** | Link to Canvas assignment | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentCanvas from a JSON string +class_assignment_canvas_instance = ClassAssignmentCanvas.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentCanvas.to_json() + +# convert the object into a dict +class_assignment_canvas_dict = class_assignment_canvas_instance.to_dict() +# create an instance of ClassAssignmentCanvas from a dict +class_assignment_canvas_form_dict = class_assignment_canvas.from_dict(class_assignment_canvas_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentLti.md b/docs/ClassAssignmentLti.md index 101a092..908aad6 100644 --- a/docs/ClassAssignmentLti.md +++ b/docs/ClassAssignmentLti.md @@ -3,11 +3,28 @@ An LTI assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Resource ID in the LMS | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_assignment_lti import ClassAssignmentLti + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentLti from a JSON string +class_assignment_lti_instance = ClassAssignmentLti.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentLti.to_json() + +# convert the object into a dict +class_assignment_lti_dict = class_assignment_lti_instance.to_dict() +# create an instance of ClassAssignmentLti from a dict +class_assignment_lti_form_dict = class_assignment_lti.from_dict(class_assignment_lti_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentMfc.md b/docs/ClassAssignmentMfc.md index 03916e5..b7aef23 100644 --- a/docs/ClassAssignmentMfc.md +++ b/docs/ClassAssignmentMfc.md @@ -3,12 +3,29 @@ A MusicFirst Classroom assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the course on MusicFirst Task | [optional] **alternate_link** | **str** | Link to MusicFirst Classroom task | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_assignment_mfc import ClassAssignmentMfc + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentMfc from a JSON string +class_assignment_mfc_instance = ClassAssignmentMfc.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentMfc.to_json() + +# convert the object into a dict +class_assignment_mfc_dict = class_assignment_mfc_instance.to_dict() +# create an instance of ClassAssignmentMfc from a dict +class_assignment_mfc_form_dict = class_assignment_mfc.from_dict(class_assignment_mfc_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentUpdate.md b/docs/ClassAssignmentUpdate.md index 35bbdc1..3860e0f 100644 --- a/docs/ClassAssignmentUpdate.md +++ b/docs/ClassAssignmentUpdate.md @@ -2,28 +2,45 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**AssignmentType**](AssignmentType.md) | | [optional] **title** | **str** | Title of the assignment | [optional] **description** | **str** | Description and content of the assignment | [optional] -**attachments** | [**[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**nb_playback_authorized** | **float, none_type** | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | **str, none_type** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**cover_file** | **str, none_type** | The id of the cover to display | [optional] -**cover** | **str, none_type** | The URL of the cover to display | [optional] -**max_points** | **float, none_type** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] **shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] **state** | **str** | State of the assignment | [optional] -**due_date** | **datetime, none_type** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] -**scheduled_date** | **datetime, none_type** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] **google_classroom** | [**ClassAssignmentUpdateGoogleClassroom**](ClassAssignmentUpdateGoogleClassroom.md) | | [optional] **microsoft_graph** | [**ClassAssignmentUpdateMicrosoftGraph**](ClassAssignmentUpdateMicrosoftGraph.md) | | [optional] **assignee_mode** | **str** | Possible modes of assigning assignments | [optional] -**assigned_students** | **[str]** | Identifiers for the students that have access to the assignment | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update import ClassAssignmentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdate from a JSON string +class_assignment_update_instance = ClassAssignmentUpdate.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentUpdate.to_json() +# convert the object into a dict +class_assignment_update_dict = class_assignment_update_instance.to_dict() +# create an instance of ClassAssignmentUpdate from a dict +class_assignment_update_form_dict = class_assignment_update.from_dict(class_assignment_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentUpdateGoogleClassroom.md b/docs/ClassAssignmentUpdateGoogleClassroom.md index 780cad2..456dcc9 100644 --- a/docs/ClassAssignmentUpdateGoogleClassroom.md +++ b/docs/ClassAssignmentUpdateGoogleClassroom.md @@ -3,11 +3,28 @@ Google Classroom options for this assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**topic_id** | **str, none_type** | Identifier of the topic where the assignment is created | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdateGoogleClassroom from a JSON string +class_assignment_update_google_classroom_instance = ClassAssignmentUpdateGoogleClassroom.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentUpdateGoogleClassroom.to_json() +# convert the object into a dict +class_assignment_update_google_classroom_dict = class_assignment_update_google_classroom_instance.to_dict() +# create an instance of ClassAssignmentUpdateGoogleClassroom from a dict +class_assignment_update_google_classroom_form_dict = class_assignment_update_google_classroom.from_dict(class_assignment_update_google_classroom_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAssignmentUpdateMicrosoftGraph.md b/docs/ClassAssignmentUpdateMicrosoftGraph.md index ee62c93..2d88948 100644 --- a/docs/ClassAssignmentUpdateMicrosoftGraph.md +++ b/docs/ClassAssignmentUpdateMicrosoftGraph.md @@ -3,11 +3,28 @@ Microsoft Graph options for this assignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**categories** | **[str], none_type** | List of categories this assignment belongs to | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**categories** | **List[str]** | List of categories this assignment belongs to | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdateMicrosoftGraph from a JSON string +class_assignment_update_microsoft_graph_instance = ClassAssignmentUpdateMicrosoftGraph.from_json(json) +# print the JSON string representation of the object +print ClassAssignmentUpdateMicrosoftGraph.to_json() +# convert the object into a dict +class_assignment_update_microsoft_graph_dict = class_assignment_update_microsoft_graph_instance.to_dict() +# create an instance of ClassAssignmentUpdateMicrosoftGraph from a dict +class_assignment_update_microsoft_graph_form_dict = class_assignment_update_microsoft_graph.from_dict(class_assignment_update_microsoft_graph_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassAttachmentCreation.md b/docs/ClassAttachmentCreation.md index 9fb1132..311b0d3 100644 --- a/docs/ClassAttachmentCreation.md +++ b/docs/ClassAttachmentCreation.md @@ -3,6 +3,7 @@ Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the attachment posted: * `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] @@ -12,8 +13,24 @@ Name | Type | Description | Notes **lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] **url** | **str** | The URL of the attachment. | [optional] **google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_attachment_creation import ClassAttachmentCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAttachmentCreation from a JSON string +class_attachment_creation_instance = ClassAttachmentCreation.from_json(json) +# print the JSON string representation of the object +print ClassAttachmentCreation.to_json() + +# convert the object into a dict +class_attachment_creation_dict = class_attachment_creation_instance.to_dict() +# create an instance of ClassAttachmentCreation from a dict +class_attachment_creation_form_dict = class_attachment_creation.from_dict(class_attachment_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassCreation.md b/docs/ClassCreation.md index 6e80257..e3e1c6b 100644 --- a/docs/ClassCreation.md +++ b/docs/ClassCreation.md @@ -3,15 +3,32 @@ Creation of a classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the new class | **section** | **str** | The section of the new class | [optional] **level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | **float, none_type** | Number of students in the classroom | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**skills_focused** | **List[str]** | Specific skills that will be focused in classroom | [optional] +**size** | **float** | Number of students in the classroom | [optional] + +## Example + +```python +from flat_api.models.class_creation import ClassCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassCreation from a JSON string +class_creation_instance = ClassCreation.from_json(json) +# print the JSON string representation of the object +print ClassCreation.to_json() +# convert the object into a dict +class_creation_dict = class_creation_instance.to_dict() +# create an instance of ClassCreation from a dict +class_creation_form_dict = class_creation.from_dict(class_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetails.md b/docs/ClassDetails.md index 53e3c54..cc2886a 100644 --- a/docs/ClassDetails.md +++ b/docs/ClassDetails.md @@ -3,9 +3,10 @@ A classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the class | [optional] +**id** | **str** | The unique identifier of the class | **state** | [**ClassState**](ClassState.md) | | [optional] **name** | **str** | The name of the class | [optional] **section** | **str** | The section of the class | [optional] @@ -27,10 +28,26 @@ Name | Type | Description | Notes **mfc** | [**ClassDetailsMfc**](ClassDetailsMfc.md) | | [optional] **clever** | [**ClassDetailsClever**](ClassDetailsClever.md) | | [optional] **level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | **float, none_type** | Number of students in the classroom | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**skills_focused** | **List[str]** | Specific skills that will be focused in classroom | [optional] +**size** | **float** | Number of students in the classroom | [optional] + +## Example + +```python +from flat_api.models.class_details import ClassDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetails from a JSON string +class_details_instance = ClassDetails.from_json(json) +# print the JSON string representation of the object +print ClassDetails.to_json() +# convert the object into a dict +class_details_dict = class_details_instance.to_dict() +# create an instance of ClassDetails from a dict +class_details_form_dict = class_details.from_dict(class_details_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsCanvas.md b/docs/ClassDetailsCanvas.md index 43e134c..a7bbe6e 100644 --- a/docs/ClassDetailsCanvas.md +++ b/docs/ClassDetailsCanvas.md @@ -3,12 +3,29 @@ Meta information provided by Canvs LMS ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the course on Canvas | [optional] **domain** | **str** | Canvas instance domain (e.g. \"canvas.instructure.com\") | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_canvas import ClassDetailsCanvas + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsCanvas from a JSON string +class_details_canvas_instance = ClassDetailsCanvas.from_json(json) +# print the JSON string representation of the object +print ClassDetailsCanvas.to_json() + +# convert the object into a dict +class_details_canvas_dict = class_details_canvas_instance.to_dict() +# create an instance of ClassDetailsCanvas from a dict +class_details_canvas_form_dict = class_details_canvas.from_dict(class_details_canvas_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsClever.md b/docs/ClassDetailsClever.md index 2bd671e..54bd20f 100644 --- a/docs/ClassDetailsClever.md +++ b/docs/ClassDetailsClever.md @@ -3,6 +3,7 @@ Clever.com section-related information ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Clever section unique identifier | [optional] @@ -12,8 +13,24 @@ Name | Type | Description | Notes **term_name** | **str** | Name of the term when this course happens | [optional] **term_start_date** | **datetime** | Beginning date of the term | [optional] **term_end_date** | **datetime** | End date of the term | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_clever import ClassDetailsClever + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsClever from a JSON string +class_details_clever_instance = ClassDetailsClever.from_json(json) +# print the JSON string representation of the object +print ClassDetailsClever.to_json() + +# convert the object into a dict +class_details_clever_dict = class_details_clever_instance.to_dict() +# create an instance of ClassDetailsClever from a dict +class_details_clever_form_dict = class_details_clever.from_dict(class_details_clever_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/ClassDetailsGoogleClassroom.md index 6fec601..5fd4657 100644 --- a/docs/ClassDetailsGoogleClassroom.md +++ b/docs/ClassDetailsGoogleClassroom.md @@ -3,12 +3,29 @@ Google Classroom course-related information ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The course identifier on Google Classroom | [optional] **alternate_link** | **str** | Absolute link to this course in the Classroom web UI | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsGoogleClassroom from a JSON string +class_details_google_classroom_instance = ClassDetailsGoogleClassroom.from_json(json) +# print the JSON string representation of the object +print ClassDetailsGoogleClassroom.to_json() + +# convert the object into a dict +class_details_google_classroom_dict = class_details_google_classroom_instance.to_dict() +# create an instance of ClassDetailsGoogleClassroom from a dict +class_details_google_classroom_form_dict = class_details_google_classroom.from_dict(class_details_google_classroom_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleDrive.md b/docs/ClassDetailsGoogleDrive.md index ecb553a..8f14e17 100644 --- a/docs/ClassDetailsGoogleDrive.md +++ b/docs/ClassDetailsGoogleDrive.md @@ -3,12 +3,29 @@ Google Drive course-related information provided by Google Classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **teacher_folder_id** | **str** | [Teachers only] The Drive directory identifier of the teachers' folder | [optional] **teacher_folder_alternate_link** | **str** | [Teachers only] The Drive URL of the teachers' folder | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsGoogleDrive from a JSON string +class_details_google_drive_instance = ClassDetailsGoogleDrive.from_json(json) +# print the JSON string representation of the object +print ClassDetailsGoogleDrive.to_json() + +# convert the object into a dict +class_details_google_drive_dict = class_details_google_drive_instance.to_dict() +# create an instance of ClassDetailsGoogleDrive from a dict +class_details_google_drive_form_dict = class_details_google_drive.from_dict(class_details_google_drive_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsIssues.md b/docs/ClassDetailsIssues.md index cd93258..9e9e7b9 100644 --- a/docs/ClassDetailsIssues.md +++ b/docs/ClassDetailsIssues.md @@ -3,11 +3,28 @@ Detected issues for this class ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sync** | [**[ClassDetailsIssuesSyncInner]**](ClassDetailsIssuesSyncInner.md) | Synchronization issues for the class | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**sync** | [**List[ClassDetailsIssuesSyncInner]**](ClassDetailsIssuesSyncInner.md) | Synchronization issues for the class | [optional] + +## Example + +```python +from flat_api.models.class_details_issues import ClassDetailsIssues + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsIssues from a JSON string +class_details_issues_instance = ClassDetailsIssues.from_json(json) +# print the JSON string representation of the object +print ClassDetailsIssues.to_json() +# convert the object into a dict +class_details_issues_dict = class_details_issues_instance.to_dict() +# create an instance of ClassDetailsIssues from a dict +class_details_issues_form_dict = class_details_issues.from_dict(class_details_issues_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsIssuesSyncInner.md b/docs/ClassDetailsIssuesSyncInner.md index a69deab..e171491 100644 --- a/docs/ClassDetailsIssuesSyncInner.md +++ b/docs/ClassDetailsIssuesSyncInner.md @@ -3,13 +3,30 @@ A sync issue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The account user identifier | [optional] **email** | **str** | The email address of the user concerned by this sync issue | [optional] **reason** | **str** | The reason why the account cannot be synced | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsIssuesSyncInner from a JSON string +class_details_issues_sync_inner_instance = ClassDetailsIssuesSyncInner.from_json(json) +# print the JSON string representation of the object +print ClassDetailsIssuesSyncInner.to_json() + +# convert the object into a dict +class_details_issues_sync_inner_dict = class_details_issues_sync_inner_instance.to_dict() +# create an instance of ClassDetailsIssuesSyncInner from a dict +class_details_issues_sync_inner_form_dict = class_details_issues_sync_inner.from_dict(class_details_issues_sync_inner_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsLti.md b/docs/ClassDetailsLti.md index 24f866b..ddf6c0a 100644 --- a/docs/ClassDetailsLti.md +++ b/docs/ClassDetailsLti.md @@ -3,13 +3,30 @@ Meta information provided by the LTI consumer ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **context_id** | **str** | Unique context identifier provided | [optional] **context_title** | **str** | Context title | [optional] **context_label** | **str** | Context label | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_lti import ClassDetailsLti + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsLti from a JSON string +class_details_lti_instance = ClassDetailsLti.from_json(json) +# print the JSON string representation of the object +print ClassDetailsLti.to_json() + +# convert the object into a dict +class_details_lti_dict = class_details_lti_instance.to_dict() +# create an instance of ClassDetailsLti from a dict +class_details_lti_form_dict = class_details_lti.from_dict(class_details_lti_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsMfc.md b/docs/ClassDetailsMfc.md index b5c606c..ff9f8ef 100644 --- a/docs/ClassDetailsMfc.md +++ b/docs/ClassDetailsMfc.md @@ -3,12 +3,29 @@ Meta information provided by Canvs LMS ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the course on MusicFirst Classroom | [optional] **alternate_link** | **str** | Link to MusicFirst Classroom class | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_mfc import ClassDetailsMfc + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsMfc from a JSON string +class_details_mfc_instance = ClassDetailsMfc.from_json(json) +# print the JSON string representation of the object +print ClassDetailsMfc.to_json() + +# convert the object into a dict +class_details_mfc_dict = class_details_mfc_instance.to_dict() +# create an instance of ClassDetailsMfc from a dict +class_details_mfc_form_dict = class_details_mfc.from_dict(class_details_mfc_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsMicrosoftGraph.md b/docs/ClassDetailsMicrosoftGraph.md index 57ea912..67ec4c6 100644 --- a/docs/ClassDetailsMicrosoftGraph.md +++ b/docs/ClassDetailsMicrosoftGraph.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The course identifier on Microsoft Graph | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassDetailsMicrosoftGraph from a JSON string +class_details_microsoft_graph_instance = ClassDetailsMicrosoftGraph.from_json(json) +# print the JSON string representation of the object +print ClassDetailsMicrosoftGraph.to_json() + +# convert the object into a dict +class_details_microsoft_graph_dict = class_details_microsoft_graph_instance.to_dict() +# create an instance of ClassDetailsMicrosoftGraph from a dict +class_details_microsoft_graph_form_dict = class_details_microsoft_graph.from_dict(class_details_microsoft_graph_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassGradeLevel.md b/docs/ClassGradeLevel.md index 57c07b9..f421f03 100644 --- a/docs/ClassGradeLevel.md +++ b/docs/ClassGradeLevel.md @@ -3,9 +3,9 @@ Class grade level ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Class grade level | must be one of ["elementary", "middle", "high", "university", "other", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassRoles.md b/docs/ClassRoles.md index 79155fa..d98de6b 100644 --- a/docs/ClassRoles.md +++ b/docs/ClassRoles.md @@ -3,9 +3,9 @@ User's Class Role (for Edu users only) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | User's Class Role (for Edu users only) | must be one of ["teacher", "student", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassState.md b/docs/ClassState.md index d319788..b7a0e58 100644 --- a/docs/ClassState.md +++ b/docs/ClassState.md @@ -3,9 +3,9 @@ The state of a classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The state of a classroom | must be one of ["active", "inactive", "archived", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassUpdate.md b/docs/ClassUpdate.md index 7194df5..9f0a8b0 100644 --- a/docs/ClassUpdate.md +++ b/docs/ClassUpdate.md @@ -3,15 +3,32 @@ Update of a classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the class | [optional] **section** | **str** | The section of the class | [optional] **level** | [**ClassGradeLevel**](ClassGradeLevel.md) | | [optional] -**skills_focused** | [**EduSkillsFocused**](EduSkillsFocused.md) | | [optional] -**size** | **float, none_type** | Number of students in the classroom | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**skills_focused** | **List[str]** | Specific skills that will be focused in classroom | [optional] +**size** | **float** | Number of students in the classroom | [optional] + +## Example + +```python +from flat_api.models.class_update import ClassUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassUpdate from a JSON string +class_update_instance = ClassUpdate.from_json(json) +# print the JSON string representation of the object +print ClassUpdate.to_json() +# convert the object into a dict +class_update_dict = class_update_instance.to_dict() +# create an instance of ClassUpdate from a dict +class_update_form_dict = class_update.from_dict(class_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Collection.md b/docs/Collection.md index 669c0a1..9c29fab 100644 --- a/docs/Collection.md +++ b/docs/Collection.md @@ -3,6 +3,7 @@ Collection of scores ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the collection | [optional] @@ -14,12 +15,29 @@ Name | Type | Description | Notes **app** | [**CollectionApp**](CollectionApp.md) | | [optional] **creation_date** | **datetime** | The date when the collection was created | [optional] **user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] +**organization** | **str** | If the score has been created in an organization, the identifier of this organization. | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**collaborators** | [**[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] -**capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | [optional] -**collections** | **[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**collaborators** | [**List[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] +**capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | +**collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] + +## Example + +```python +from flat_api.models.collection import Collection + +# TODO update the JSON string below +json = "{}" +# create an instance of Collection from a JSON string +collection_instance = Collection.from_json(json) +# print the JSON string representation of the object +print Collection.to_json() +# convert the object into a dict +collection_dict = collection_instance.to_dict() +# create an instance of Collection from a dict +collection_form_dict = collection.from_dict(collection_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md index 5fabe24..6deb8e8 100644 --- a/docs/CollectionApi.md +++ b/docs/CollectionApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **add_score_to_collection** -> ScoreDetails add_score_to_collection(collection, score) +> ScoreDetails add_score_to_collection(collection, score, sharing_key=sharing_key) Add a score to the collection @@ -27,12 +27,11 @@ This operation will add a score to a collection. The default behavior will make * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -44,46 +43,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Add a score to the collection - api_response = api_instance.add_score_to_collection(collection, score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Add a score to the collection api_response = api_instance.add_score_to_collection(collection, score, sharing_key=sharing_key) + print("The response of CollectionApi->add_score_to_collection:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->add_score_to_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type @@ -98,7 +86,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -122,13 +109,12 @@ This method will create a new collection and add it to your `root` collection. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.collection import Collection +from flat_api.models.collection_creation import CollectionCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -140,36 +126,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - body = CollectionCreation( - title="title_example", - privacy=CollectionPrivacy("private"), - ) # CollectionCreation | + api_instance = flat_api.CollectionApi(api_client) + body = flat_api.CollectionCreation() # CollectionCreation | - # example passing only required values which don't have defaults set try: # Create a new collection api_response = api_instance.create_collection(body) + print("The response of CollectionApi->create_collection:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->create_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**CollectionCreation**](CollectionCreation.md)| | + **body** | [**CollectionCreation**](CollectionCreation.md)| | ### Return type @@ -184,7 +165,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -207,11 +187,10 @@ This method will schedule the deletion of the collection. Until deleted, the col * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -223,32 +202,29 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - # example passing only required values which don't have defaults set try: # Delete the collection api_instance.delete_collection(collection) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->delete_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | ### Return type @@ -263,7 +239,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -276,7 +251,7 @@ void (empty response body) [[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) # **delete_score_from_collection** -> delete_score_from_collection(collection, score) +> delete_score_from_collection(collection, score, sharing_key=sharing_key) Delete a score from the collection @@ -287,11 +262,10 @@ This method will delete a score from the collection. Unlike [`DELETE /scores/{sc * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -303,44 +277,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Delete a score from the collection - api_instance.delete_score_from_collection(collection, score) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Delete a score from the collection api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type @@ -355,7 +318,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -368,7 +330,7 @@ void (empty response body) [[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) # **edit_collection** -> Collection edit_collection(collection) +> Collection edit_collection(collection, body) Update a collection's metadata @@ -377,13 +339,12 @@ Update a collection's metadata * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.collection_modification import CollectionModification +from flat_api.models.collection import Collection +from flat_api.models.collection_modification import CollectionModification +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -395,47 +356,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - body = CollectionModification( - title="title_example", - privacy=CollectionPrivacy("private"), - ) # CollectionModification | (optional) - - # example passing only required values which don't have defaults set - try: - # Update a collection's metadata - api_response = api_instance.edit_collection(collection) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->edit_collection: %s\n" % e) + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + body = flat_api.CollectionModification() # CollectionModification | - # example passing only required values which don't have defaults set - # and optional values try: # Update a collection's metadata - api_response = api_instance.edit_collection(collection, body=body) + api_response = api_instance.edit_collection(collection, body) + print("The response of CollectionApi->edit_collection:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->edit_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **body** | [**CollectionModification**](CollectionModification.md)| | [optional] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **body** | [**CollectionModification**](CollectionModification.md)| | ### Return type @@ -450,7 +397,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -463,7 +409,7 @@ Name | Type | Description | Notes [[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) # **get_collection** -> Collection get_collection(collection) +> Collection get_collection(collection, sharing_key=sharing_key) Get collection details @@ -472,12 +418,11 @@ Get collection details * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.collection import Collection +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -489,44 +434,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Get collection details - api_response = api_instance.get_collection(collection) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->get_collection: %s\n" % e) + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Get collection details api_response = api_instance.get_collection(collection, sharing_key=sharing_key) + print("The response of CollectionApi->get_collection:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->get_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **sharing_key** | **str**| 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] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **sharing_key** | **str**| 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] ### Return type @@ -541,7 +475,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -554,7 +487,7 @@ Name | Type | Description | Notes [[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) # **list_collection_scores** -> [ScoreDetails] list_collection_scores(collection) +> List[ScoreDetails] list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List the scores contained in a collection @@ -565,12 +498,11 @@ Use this method to list the scores contained in a collection. If no sort option * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -582,58 +514,47 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - sharing_key = "sharingKey_example" # str | 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) - sort = "creationDate" # str | Sort (optional) - direction = "asc" # str | Sort direction (optional) - limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 - next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - # example passing only required values which don't have defaults set - try: - # List the scores contained in a collection - api_response = api_instance.list_collection_scores(collection) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + sharing_key = 'sharing_key_example' # str | 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) + sort = 'sort_example' # str | Sort (optional) + direction = 'direction_example' # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List the scores contained in a collection api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + print("The response of CollectionApi->list_collection_scores:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->list_collection_scores: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **sharing_key** | **str**| 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] - **sort** | **str**| Sort | [optional] - **direction** | **str**| Sort direction | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **sharing_key** | **str**| 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] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -644,7 +565,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -655,7 +575,7 @@ Name | Type | Description | Notes [[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) # **list_collections** -> [Collection] list_collections() +> List[Collection] list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List the collections @@ -666,12 +586,11 @@ Use this method to list the user's collections contained in `parent` (by default * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.collection import Collection -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.collection import Collection +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -683,48 +602,45 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - parent = "root" # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) if omitted the server will use the default value of "root" - sort = "creationDate" # str | Sort (optional) - direction = "asc" # str | Sort direction (optional) - limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 - next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = flat_api.CollectionApi(api_client) + parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') + sort = 'sort_example' # str | Sort (optional) + direction = 'direction_example' # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + try: # List the collections api_response = api_instance.list_collections(parent=parent, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + print("The response of CollectionApi->list_collections:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->list_collections: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] if omitted the server will use the default value of "root" - **sort** | **str**| Sort | [optional] - **direction** | **str**| Sort direction | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] [default to 'root'] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type -[**[Collection]**](Collection.md) +[**List[Collection]**](Collection.md) ### Authorization @@ -735,7 +651,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -757,11 +672,10 @@ This method will restore the collection by removing it from the `trash` and add * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import collection_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -773,32 +687,29 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = collection_api.CollectionApi(api_client) - collection = "collection_example" # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + api_instance = flat_api.CollectionApi(api_client) + collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - # example passing only required values which don't have defaults set try: # Untrash a collection api_instance.untrash_collection(collection) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | ### Return type @@ -813,7 +724,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/CollectionApp.md b/docs/CollectionApp.md index 76aaf44..d6ce65e 100644 --- a/docs/CollectionApp.md +++ b/docs/CollectionApp.md @@ -3,13 +3,30 @@ For App collections, the details of the app that created the collection ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The app unique identifier | [optional] **name** | **str** | The name of the app | [optional] **logo** | **str** | The app logo url | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.collection_app import CollectionApp + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionApp from a JSON string +collection_app_instance = CollectionApp.from_json(json) +# print the JSON string representation of the object +print CollectionApp.to_json() + +# convert the object into a dict +collection_app_dict = collection_app_instance.to_dict() +# create an instance of CollectionApp from a dict +collection_app_form_dict = collection_app.from_dict(collection_app_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionCapabilities.md b/docs/CollectionCapabilities.md index 04fd28f..9e05b64 100644 --- a/docs/CollectionCapabilities.md +++ b/docs/CollectionCapabilities.md @@ -3,15 +3,32 @@ Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**can_edit** | **bool** | Whether the current user can modify the metadata for the collection | [optional] -**can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | [optional] -**can_delete** | **bool** | Whether the current user can delete the collection | [optional] -**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | [optional] -**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**can_edit** | **bool** | Whether the current user can modify the metadata for the collection | +**can_share** | **bool** | Whether the current user can modify the sharing settings for the collection | +**can_delete** | **bool** | Whether the current user can delete the collection | +**can_add_scores** | **bool** | Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. | +**can_delete_scores** | **bool** | Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. | + +## Example + +```python +from flat_api.models.collection_capabilities import CollectionCapabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionCapabilities from a JSON string +collection_capabilities_instance = CollectionCapabilities.from_json(json) +# print the JSON string representation of the object +print CollectionCapabilities.to_json() +# convert the object into a dict +collection_capabilities_dict = collection_capabilities_instance.to_dict() +# create an instance of CollectionCapabilities from a dict +collection_capabilities_form_dict = collection_capabilities.from_dict(collection_capabilities_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionCreation.md b/docs/CollectionCreation.md index 8c9950a..c482f21 100644 --- a/docs/CollectionCreation.md +++ b/docs/CollectionCreation.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the collection | **privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.collection_creation import CollectionCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionCreation from a JSON string +collection_creation_instance = CollectionCreation.from_json(json) +# print the JSON string representation of the object +print CollectionCreation.to_json() + +# convert the object into a dict +collection_creation_dict = collection_creation_instance.to_dict() +# create an instance of CollectionCreation from a dict +collection_creation_form_dict = collection_creation.from_dict(collection_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionModification.md b/docs/CollectionModification.md index 01c09f8..4b8891f 100644 --- a/docs/CollectionModification.md +++ b/docs/CollectionModification.md @@ -3,12 +3,29 @@ Edit the collection metadata ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the collection | [optional] **privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.collection_modification import CollectionModification + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionModification from a JSON string +collection_modification_instance = CollectionModification.from_json(json) +# print the JSON string representation of the object +print CollectionModification.to_json() + +# convert the object into a dict +collection_modification_dict = collection_modification_instance.to_dict() +# create an instance of CollectionModification from a dict +collection_modification_form_dict = collection_modification.from_dict(collection_modification_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionPrivacy.md b/docs/CollectionPrivacy.md index e72cbd2..827a33f 100644 --- a/docs/CollectionPrivacy.md +++ b/docs/CollectionPrivacy.md @@ -3,9 +3,9 @@ The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. | defaults to "private", must be one of ["private", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionType.md b/docs/CollectionType.md index 9ea4989..9b14a6e 100644 --- a/docs/CollectionType.md +++ b/docs/CollectionType.md @@ -3,9 +3,9 @@ Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. | must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduLibrary.md b/docs/EduLibrary.md index da5808b..77929d2 100644 --- a/docs/EduLibrary.md +++ b/docs/EduLibrary.md @@ -3,14 +3,31 @@ A Flat for Education Library ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | [optional] **name** | **str** | Name of the lirbary | [optional] **type** | **str** | Type of the library | [optional] **visibility** | **str** | Visibility of the library | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_library import EduLibrary + +# TODO update the JSON string below +json = "{}" +# create an instance of EduLibrary from a JSON string +edu_library_instance = EduLibrary.from_json(json) +# print the JSON string representation of the object +print EduLibrary.to_json() + +# convert the object into a dict +edu_library_dict = edu_library_instance.to_dict() +# create an instance of EduLibrary from a dict +edu_library_form_dict = edu_library.from_dict(edu_library_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResource.md b/docs/EduResource.md index ccf80d5..95eefb0 100644 --- a/docs/EduResource.md +++ b/docs/EduResource.md @@ -3,21 +3,38 @@ A Flat for Education resource contained in a resources library ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Resource unique identifier | -**type** | [**EduResourceType**](EduResourceType.md) | | -**title** | **str** | Title of the resource | -**capabilities** | [**EduResourceCapabilities**](EduResourceCapabilities.md) | | **creator** | **str** | The User identifier of the resource creator | [optional] +**type** | [**EduResourceType**](EduResourceType.md) | | **privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] -**tags** | **[str]** | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] +**tags** | **List[str]** | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] **parent** | **str** | Identifier of the parent resource, e.g. a folder or root | [optional] +**title** | **str** | Title of the resource | **creation_date** | **datetime** | The date when the resource was created | [optional] **update_date** | **datetime** | The date when the resource was updated | [optional] **resource** | [**EduResourceResource**](EduResourceResource.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**capabilities** | [**EduResourceCapabilities**](EduResourceCapabilities.md) | | + +## Example + +```python +from flat_api.models.edu_resource import EduResource + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResource from a JSON string +edu_resource_instance = EduResource.from_json(json) +# print the JSON string representation of the object +print EduResource.to_json() +# convert the object into a dict +edu_resource_dict = edu_resource_instance.to_dict() +# create an instance of EduResource from a dict +edu_resource_form_dict = edu_resource.from_dict(edu_resource_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceCapabilities.md b/docs/EduResourceCapabilities.md index 43ea614..87ae32f 100644 --- a/docs/EduResourceCapabilities.md +++ b/docs/EduResourceCapabilities.md @@ -3,13 +3,30 @@ Capabilities available for this resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **can_edit** | **bool** | Whether the current user can modify this resource | [optional] **can_add_resources** | **bool** | Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) | [optional] **can_add_folders** | **bool** | Whether the current user can add folders within this resource (e.g. `folder` inside `root`) | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceCapabilities from a JSON string +edu_resource_capabilities_instance = EduResourceCapabilities.from_json(json) +# print the JSON string representation of the object +print EduResourceCapabilities.to_json() + +# convert the object into a dict +edu_resource_capabilities_dict = edu_resource_capabilities_instance.to_dict() +# create an instance of EduResourceCapabilities from a dict +edu_resource_capabilities_form_dict = edu_resource_capabilities.from_dict(edu_resource_capabilities_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceCopy.md b/docs/EduResourceCopy.md index 0bd4d0b..3360bd3 100644 --- a/docs/EduResourceCopy.md +++ b/docs/EduResourceCopy.md @@ -3,11 +3,28 @@ Copy an education resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **destination** | **str** | Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_resource_copy import EduResourceCopy + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceCopy from a JSON string +edu_resource_copy_instance = EduResourceCopy.from_json(json) +# print the JSON string representation of the object +print EduResourceCopy.to_json() + +# convert the object into a dict +edu_resource_copy_dict = edu_resource_copy_instance.to_dict() +# create an instance of EduResourceCopy from a dict +edu_resource_copy_form_dict = edu_resource_copy.from_dict(edu_resource_copy_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceCreation.md b/docs/EduResourceCreation.md index 245b724..ee25f7e 100644 --- a/docs/EduResourceCreation.md +++ b/docs/EduResourceCreation.md @@ -3,13 +3,30 @@ Creation of an education resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**EduResourceType**](EduResourceType.md) | | **title** | **str** | Title of the resource | -**parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] if omitted the server will use the default value of "root" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] [default to 'root'] + +## Example + +```python +from flat_api.models.edu_resource_creation import EduResourceCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceCreation from a JSON string +edu_resource_creation_instance = EduResourceCreation.from_json(json) +# print the JSON string representation of the object +print EduResourceCreation.to_json() +# convert the object into a dict +edu_resource_creation_dict = edu_resource_creation_instance.to_dict() +# create an instance of EduResourceCreation from a dict +edu_resource_creation_form_dict = edu_resource_creation.from_dict(edu_resource_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceLtiLink.md b/docs/EduResourceLtiLink.md new file mode 100644 index 0000000..2150036 --- /dev/null +++ b/docs/EduResourceLtiLink.md @@ -0,0 +1,30 @@ +# EduResourceLtiLink + +LTI Link details for the class + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lti_url** | **str** | An URL that can be used to launch LTI with this resource in a classroom. | + +## Example + +```python +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceLtiLink from a JSON string +edu_resource_lti_link_instance = EduResourceLtiLink.from_json(json) +# print the JSON string representation of the object +print EduResourceLtiLink.to_json() + +# convert the object into a dict +edu_resource_lti_link_dict = edu_resource_lti_link_instance.to_dict() +# create an instance of EduResourceLtiLink from a dict +edu_resource_lti_link_form_dict = edu_resource_lti_link.from_dict(edu_resource_lti_link_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceMove.md b/docs/EduResourceMove.md index ee201c5..aec4e89 100644 --- a/docs/EduResourceMove.md +++ b/docs/EduResourceMove.md @@ -3,11 +3,28 @@ Move an education resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **destination** | **str** | Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_resource_move import EduResourceMove + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceMove from a JSON string +edu_resource_move_instance = EduResourceMove.from_json(json) +# print the JSON string representation of the object +print EduResourceMove.to_json() + +# convert the object into a dict +edu_resource_move_dict = edu_resource_move_instance.to_dict() +# create an instance of EduResourceMove from a dict +edu_resource_move_form_dict = edu_resource_move.from_dict(edu_resource_move_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourcePrivacy.md b/docs/EduResourcePrivacy.md index 69b4280..7cb4d0e 100644 --- a/docs/EduResourcePrivacy.md +++ b/docs/EduResourcePrivacy.md @@ -3,9 +3,9 @@ The Education resource privacy mode. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The Education resource privacy mode. | defaults to "private", must be one of ["private", "public", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceResource.md b/docs/EduResourceResource.md index 8ab90e1..a245757 100644 --- a/docs/EduResourceResource.md +++ b/docs/EduResourceResource.md @@ -2,24 +2,41 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | [optional] -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | [optional] -**title** | **str** | Title of the folder | [optional] +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | +**title** | **str** | Title of the folder | **description** | **str** | Description and content of the assignment | [optional] **cover** | **str** | The URL of the cover to display | [optional] **cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**[MediaAttachment]**](MediaAttachment.md) | | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] **max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] **shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] **nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_resource_resource import EduResourceResource + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceResource from a JSON string +edu_resource_resource_instance = EduResourceResource.from_json(json) +# print the JSON string representation of the object +print EduResourceResource.to_json() + +# convert the object into a dict +edu_resource_resource_dict = edu_resource_resource_instance.to_dict() +# create an instance of EduResourceResource from a dict +edu_resource_resource_form_dict = edu_resource_resource.from_dict(edu_resource_resource_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceType.md b/docs/EduResourceType.md index dadb93c..054007f 100644 --- a/docs/EduResourceType.md +++ b/docs/EduResourceType.md @@ -3,9 +3,9 @@ Type of an education resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Type of an education resource | must be one of ["assignment", "folder", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceUpdate.md b/docs/EduResourceUpdate.md index b99f69a..c32c521 100644 --- a/docs/EduResourceUpdate.md +++ b/docs/EduResourceUpdate.md @@ -3,11 +3,29 @@ Update of an education resource ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the resource | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] + +## Example + +```python +from flat_api.models.edu_resource_update import EduResourceUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceUpdate from a JSON string +edu_resource_update_instance = EduResourceUpdate.from_json(json) +# print the JSON string representation of the object +print EduResourceUpdate.to_json() +# convert the object into a dict +edu_resource_update_dict = edu_resource_update_instance.to_dict() +# create an instance of EduResourceUpdate from a dict +edu_resource_update_form_dict = edu_resource_update.from_dict(edu_resource_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceUseInClass.md b/docs/EduResourceUseInClass.md index b384157..a5adf64 100644 --- a/docs/EduResourceUseInClass.md +++ b/docs/EduResourceUseInClass.md @@ -3,12 +3,29 @@ Use an education resource in class ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **classroom** | **str** | The destination classroom where the resource will be copied. | **assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceUseInClass from a JSON string +edu_resource_use_in_class_instance = EduResourceUseInClass.from_json(json) +# print the JSON string representation of the object +print EduResourceUseInClass.to_json() + +# convert the object into a dict +edu_resource_use_in_class_dict = edu_resource_use_in_class_instance.to_dict() +# create an instance of EduResourceUseInClass from a dict +edu_resource_use_in_class_form_dict = edu_resource_use_in_class.from_dict(edu_resource_use_in_class_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourcesApi.md b/docs/EduResourcesApi.md index b75ff17..caf6a3b 100644 --- a/docs/EduResourcesApi.md +++ b/docs/EduResourcesApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**copy_edu_resource**](EduResourcesApi.md#copy_edu_resource) | **POST** /eduResources/{resource}/copy | Copy an education resource to a Resource Library [**copy_edu_resource_to_demo_class**](EduResourcesApi.md#copy_edu_resource_to_demo_class) | **POST** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class [**create_edu_resource**](EduResourcesApi.md#create_edu_resource) | **POST** /eduResources | Create a new education resource +[**create_edu_resource_lti_link**](EduResourcesApi.md#create_edu_resource_lti_link) | **POST** /eduResources/{resource}/createLtiLink | Create an LTI link for an education resource [**delete_edu_resource**](EduResourcesApi.md#delete_edu_resource) | **DELETE** /eduResources/{resource} | Delete an education resource [**get_edu_resource**](EduResourcesApi.md#get_edu_resource) | **GET** /eduResources/{resource} | Get an education resource [**list_edu_libraries**](EduResourcesApi.md#list_edu_libraries) | **GET** /eduResources/libraries | List the education libraries @@ -27,13 +28,12 @@ Copy an education resource to a Resource Library * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_copy import EduResourceCopy +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -45,37 +45,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource - edu_resource_copy = EduResourceCopy( - destination="destination_example", - ) # EduResourceCopy | + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + edu_resource_copy = flat_api.EduResourceCopy() # EduResourceCopy | - # example passing only required values which don't have defaults set try: # Copy an education resource to a Resource Library api_response = api_instance.copy_edu_resource(resource, edu_resource_copy) + print("The response of EduResourcesApi->copy_edu_resource:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->copy_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | - **edu_resource_copy** | [**EduResourceCopy**](EduResourceCopy.md)| | + **resource** | **str**| Unique identifier of the resource | + **edu_resource_copy** | [**EduResourceCopy**](EduResourceCopy.md)| | ### Return type @@ -90,7 +86,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -112,12 +107,11 @@ Once a resource library can be published to a class (`Assignment.capabilities.ca * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_assignment import ClassAssignment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -129,33 +123,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource - # example passing only required values which don't have defaults set try: # Copy an education assignment to a teacher demo class api_response = api_instance.copy_edu_resource_to_demo_class(resource) + print("The response of EduResourcesApi->copy_edu_resource_to_demo_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->copy_edu_resource_to_demo_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | + **resource** | **str**| Unique identifier of the resource | ### Return type @@ -170,7 +162,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -190,13 +181,12 @@ Create a new education resource * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_creation import EduResourceCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -208,37 +198,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - edu_resource_creation = EduResourceCreation( - type=EduResourceType("assignment"), - title="title_example", - parent="root", - ) # EduResourceCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.EduResourcesApi(api_client) + edu_resource_creation = flat_api.EduResourceCreation() # EduResourceCreation | + try: # Create a new education resource api_response = api_instance.create_edu_resource(edu_resource_creation) + print("The response of EduResourcesApi->create_edu_resource:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->create_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **edu_resource_creation** | [**EduResourceCreation**](EduResourceCreation.md)| | + **edu_resource_creation** | [**EduResourceCreation**](EduResourceCreation.md)| | ### Return type @@ -253,7 +237,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -263,21 +246,23 @@ Name | Type | Description | Notes [[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) -# **delete_edu_resource** -> delete_edu_resource(resource) +# **create_edu_resource_lti_link** +> EduResourceLtiLink create_edu_resource_lti_link(resource) -Delete an education resource +Create an LTI link for an education resource + +This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. ### Example * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -289,32 +274,102 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + + try: + # Create an LTI link for an education resource + api_response = api_instance.create_edu_resource_lti_link(resource) + print("The response of EduResourcesApi->create_edu_resource_lti_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EduResourcesApi->create_edu_resource_lti_link: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | **str**| Unique identifier of the resource | + +### Return type + +[**EduResourceLtiLink**](EduResourceLtiLink.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created LTI Link | - | +**0** | Error | - | + +[[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) + +# **delete_edu_resource** +> delete_edu_resource(resource) + +Delete an education resource + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( host = "https://api.flat.io/v2" ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource - # example passing only required values which don't have defaults set try: # Delete an education resource api_instance.delete_edu_resource(resource) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->delete_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | + **resource** | **str**| Unique identifier of the resource | ### Return type @@ -329,7 +384,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -349,12 +403,11 @@ Get an education resource * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource +from flat_api.models.edu_resource import EduResource +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -366,33 +419,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource - # example passing only required values which don't have defaults set try: # Get an education resource api_response = api_instance.get_edu_resource(resource) + print("The response of EduResourcesApi->get_edu_resource:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->get_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | + **resource** | **str**| Unique identifier of the resource | ### Return type @@ -407,7 +458,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -418,7 +468,7 @@ Name | Type | Description | Notes [[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) # **list_edu_libraries** -> [EduLibrary] list_edu_libraries() +> List[EduLibrary] list_edu_libraries() List the education libraries @@ -427,12 +477,11 @@ List the education libraries * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.edu_library import EduLibrary -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.edu_library import EduLibrary +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -444,33 +493,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) + api_instance = flat_api.EduResourcesApi(api_client) - # example, this endpoint has no required or optional parameters try: # List the education libraries api_response = api_instance.list_edu_libraries() + print("The response of EduResourcesApi->list_edu_libraries:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->list_edu_libraries: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type -[**[EduLibrary]**](EduLibrary.md) +[**List[EduLibrary]**](EduLibrary.md) ### Authorization @@ -481,7 +528,6 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -492,7 +538,7 @@ This endpoint does not need any parameter. [[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) # **list_edu_resources** -> [EduResource] list_edu_resources() +> List[EduResource] list_edu_resources(parent=parent, type=type, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List education resources in a library or folder @@ -501,12 +547,11 @@ List education resources in a library or folder * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource +from flat_api.models.edu_resource import EduResource +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -518,50 +563,47 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - parent = "root" # str | List the resources contained in this `parent` library or folder (optional) if omitted the server will use the default value of "root" - type = "assignment" # str | Filter the returned resources by type (optional) - sort = "creationDate" # str | Sort (optional) if omitted the server will use the default value of "creationDate" - direction = "asc" # str | Sort direction (optional) - limit = 25 # int | This is the maximum number of resources that may be returned (optional) if omitted the server will use the default value of 25 - next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = flat_api.EduResourcesApi(api_client) + parent = 'root' # str | List the resources contained in this `parent` library or folder (optional) (default to 'root') + type = 'type_example' # str | Filter the returned resources by type (optional) + sort = 'creationDate' # str | Sort (optional) (default to 'creationDate') + direction = 'direction_example' # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of resources that may be returned (optional) (default to 25) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + try: # List education resources in a library or folder api_response = api_instance.list_edu_resources(parent=parent, type=type, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + print("The response of EduResourcesApi->list_edu_resources:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->list_edu_resources: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the resources contained in this `parent` library or folder | [optional] if omitted the server will use the default value of "root" - **type** | **str**| Filter the returned resources by type | [optional] - **sort** | **str**| Sort | [optional] if omitted the server will use the default value of "creationDate" - **direction** | **str**| Sort direction | [optional] - **limit** | **int**| This is the maximum number of resources that may be returned | [optional] if omitted the server will use the default value of 25 - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **parent** | **str**| List the resources contained in this `parent` library or folder | [optional] [default to 'root'] + **type** | **str**| Filter the returned resources by type | [optional] + **sort** | **str**| Sort | [optional] [default to 'creationDate'] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of resources that may be returned | [optional] [default to 25] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type -[**[EduResource]**](EduResource.md) +[**List[EduResource]**](EduResource.md) ### Authorization @@ -572,7 +614,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -592,13 +633,12 @@ Move an education resource * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_move import EduResourceMove +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -610,37 +650,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource - edu_resource_move = EduResourceMove( - destination="destination_example", - ) # EduResourceMove | + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + edu_resource_move = flat_api.EduResourceMove() # EduResourceMove | - # example passing only required values which don't have defaults set try: # Move an education resource api_response = api_instance.move_edu_resource(resource, edu_resource_move) + print("The response of EduResourcesApi->move_edu_resource:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->move_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | - **edu_resource_move** | [**EduResourceMove**](EduResourceMove.md)| | + **resource** | **str**| Unique identifier of the resource | + **edu_resource_move** | [**EduResourceMove**](EduResourceMove.md)| | ### Return type @@ -655,7 +691,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -677,13 +712,12 @@ Update any resources metadata (e.g. title). Use this method to rename education * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_update import EduResourceUpdate +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_update import EduResourceUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -695,37 +729,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource - edu_resource_update = EduResourceUpdate( - title="title_example", - ) # EduResourceUpdate | + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + edu_resource_update = flat_api.EduResourceUpdate() # EduResourceUpdate | - # example passing only required values which don't have defaults set try: # Update an education resource metadata api_response = api_instance.update_edu_resource(resource, edu_resource_update) + print("The response of EduResourcesApi->update_edu_resource:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->update_edu_resource: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | - **edu_resource_update** | [**EduResourceUpdate**](EduResourceUpdate.md)| | + **resource** | **str**| Unique identifier of the resource | + **edu_resource_update** | [**EduResourceUpdate**](EduResourceUpdate.md)| | ### Return type @@ -740,7 +770,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -760,13 +789,12 @@ Update an education resource assignment * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.assignment import Assignment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment import Assignment +from flat_api.models.assignment_update import AssignmentUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -778,57 +806,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource - assignment_update = AssignmentUpdate( - type=AssignmentType("none"), - title="title_example", - description="description_example", - attachments=[ - ClassAttachmentCreation( - type="rich", - score="score_example", - worksheet="worksheet_example", - sharing_mode=MediaScoreSharingMode("read"), - lock_score_template=True, - url="url_example", - google_drive_file_id="google_drive_file_id_example", - ), - ], - nb_playback_authorized=3.14, - toolset="toolset_example", - cover_file="cover_file_example", - cover="cover_example", - max_points=0, - release_grades="auto", - shuffle_exercises=True, - ) # AssignmentUpdate | - - # example passing only required values which don't have defaults set + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + assignment_update = flat_api.AssignmentUpdate() # AssignmentUpdate | + try: # Update an education resource assignment api_response = api_instance.update_edu_resource_assignment(resource, assignment_update) + print("The response of EduResourcesApi->update_edu_resource_assignment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->update_edu_resource_assignment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | - **assignment_update** | [**AssignmentUpdate**](AssignmentUpdate.md)| | + **resource** | **str**| Unique identifier of the resource | + **assignment_update** | [**AssignmentUpdate**](AssignmentUpdate.md)| | ### Return type @@ -843,7 +847,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -865,13 +868,12 @@ This endpoint will copy a resource and the underlying resources. The assignment * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import edu_resources_api -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.class_assignment import ClassAssignment +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -883,38 +885,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = edu_resources_api.EduResourcesApi(api_client) - resource = "resource_example" # str | Unique identifier of the resource - edu_resource_use_in_class = EduResourceUseInClass( - classroom="classroom_example", - assignment="assignment_example", - ) # EduResourceUseInClass | - - # example passing only required values which don't have defaults set + api_instance = flat_api.EduResourcesApi(api_client) + resource = 'resource_example' # str | Unique identifier of the resource + edu_resource_use_in_class = flat_api.EduResourceUseInClass() # EduResourceUseInClass | + try: # Use an education resource in a class api_response = api_instance.use_edu_resource_in_class(resource, edu_resource_use_in_class) + print("The response of EduResourcesApi->use_edu_resource_in_class:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling EduResourcesApi->use_edu_resource_in_class: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **resource** | **str**| Unique identifier of the resource | - **edu_resource_use_in_class** | [**EduResourceUseInClass**](EduResourceUseInClass.md)| | + **resource** | **str**| Unique identifier of the resource | + **edu_resource_use_in_class** | [**EduResourceUseInClass**](EduResourceUseInClass.md)| | ### Return type @@ -929,7 +926,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/FlatErrorResponse.md b/docs/FlatErrorResponse.md index dedd1ae..948005b 100644 --- a/docs/FlatErrorResponse.md +++ b/docs/FlatErrorResponse.md @@ -3,14 +3,31 @@ An API Error response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | A corresponding code for this error | **message** | **str** | A printable message for this error | **id** | **str** | An unique error identifier generated for the request | [optional] **param** | **str** | The related parameter that caused the error | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.flat_error_response import FlatErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlatErrorResponse from a JSON string +flat_error_response_instance = FlatErrorResponse.from_json(json) +# print the JSON string representation of the object +print FlatErrorResponse.to_json() + +# convert the object into a dict +flat_error_response_dict = flat_error_response_instance.to_dict() +# create an instance of FlatErrorResponse from a dict +flat_error_response_form_dict = flat_error_response.from_dict(flat_error_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FlatLocales.md b/docs/FlatLocales.md index 3f854cf..19b9340 100644 --- a/docs/FlatLocales.md +++ b/docs/FlatLocales.md @@ -3,9 +3,9 @@ The user language ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The user language | defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GoogleClassroomCoursework.md b/docs/GoogleClassroomCoursework.md index 027e686..d3a8377 100644 --- a/docs/GoogleClassroomCoursework.md +++ b/docs/GoogleClassroomCoursework.md @@ -3,14 +3,31 @@ A coursework on Google Classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Identifier of the coursework assigned by Classroom | [optional] **state** | **str** | State of the coursework | [optional] **alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] -**topic_id** | **str, none_type** | Identifier of the topic where the assignment is created | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] + +## Example + +```python +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework + +# TODO update the JSON string below +json = "{}" +# create an instance of GoogleClassroomCoursework from a JSON string +google_classroom_coursework_instance = GoogleClassroomCoursework.from_json(json) +# print the JSON string representation of the object +print GoogleClassroomCoursework.to_json() +# convert the object into a dict +google_classroom_coursework_dict = google_classroom_coursework_instance.to_dict() +# create an instance of GoogleClassroomCoursework from a dict +google_classroom_coursework_form_dict = google_classroom_coursework.from_dict(google_classroom_coursework_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GoogleClassroomSubmission.md b/docs/GoogleClassroomSubmission.md index 15cf3a0..c7920ed 100644 --- a/docs/GoogleClassroomSubmission.md +++ b/docs/GoogleClassroomSubmission.md @@ -3,13 +3,30 @@ A coursework submission on Google Classroom ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the coursework submission assigned by Classroom | [optional] -**state** | **str** | State of the submission on Google Classroom | [optional] -**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**id** | **str** | Identifier of the coursework submission assigned by Classroom | +**state** | **str** | State of the submission on Google Classroom | +**alternate_link** | **str** | Absolute link to this coursework in the Classroom web UI | + +## Example + +```python +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission + +# TODO update the JSON string below +json = "{}" +# create an instance of GoogleClassroomSubmission from a JSON string +google_classroom_submission_instance = GoogleClassroomSubmission.from_json(json) +# print the JSON string representation of the object +print GoogleClassroomSubmission.to_json() +# convert the object into a dict +google_classroom_submission_dict = google_classroom_submission_instance.to_dict() +# create an instance of GoogleClassroomSubmission from a dict +google_classroom_submission_form_dict = google_classroom_submission.from_dict(google_classroom_submission_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Group.md b/docs/Group.md index b56e61c..48aa80c 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -3,6 +3,7 @@ A group of users ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the group | [optional] @@ -12,8 +13,24 @@ Name | Type | Description | Notes **read_only** | **bool** | `True` if the group is set in read-only | [optional] **organization** | **str** | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] **creation_date** | **datetime** | The creation date of the group | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.group import Group + +# TODO update the JSON string below +json = "{}" +# create an instance of Group from a JSON string +group_instance = Group.from_json(json) +# print the JSON string representation of the object +print Group.to_json() + +# convert the object into a dict +group_dict = group_instance.to_dict() +# create an instance of Group from a dict +group_form_dict = group.from_dict(group_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupApi.md b/docs/GroupApi.md index 52a481c..3af3f5e 100644 --- a/docs/GroupApi.md +++ b/docs/GroupApi.md @@ -19,12 +19,11 @@ Get group information * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import group_api -from flat_api.model.group_details import GroupDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.group_details import GroupDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -36,33 +35,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - group = "group_example" # str | Unique identifier of a Flat group + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group - # example passing only required values which don't have defaults set try: # Get group information api_response = api_instance.get_group_details(group) + print("The response of GroupApi->get_group_details:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling GroupApi->get_group_details: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | + **group** | **str**| Unique identifier of a Flat group | ### Return type @@ -77,7 +74,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -88,7 +84,7 @@ Name | Type | Description | Notes [[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) # **get_group_scores** -> [ScoreDetails] get_group_scores(group) +> List[ScoreDetails] get_group_scores(group, parent=parent) List group's scores @@ -99,12 +95,11 @@ Get the list of scores shared with a group. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import group_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -116,48 +111,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - group = "group_example" # str | Unique identifier of a Flat group - parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) - - # example passing only required values which don't have defaults set - try: - # List group's scores - api_response = api_instance.get_group_scores(group) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List group's scores api_response = api_instance.get_group_scores(group, parent=parent) + print("The response of GroupApi->get_group_scores:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling GroupApi->get_group_scores: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **group** | **str**| Unique identifier of a Flat group | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -168,7 +152,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -179,7 +162,7 @@ Name | Type | Description | Notes [[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) # **list_group_users** -> [UserPublic] list_group_users(group) +> List[UserPublic] list_group_users(group, source=source) List group's users @@ -188,12 +171,11 @@ List group's users * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import group_api -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_public import UserPublic +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -205,48 +187,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = group_api.GroupApi(api_client) - group = "group_example" # str | Unique identifier of a Flat group - source = "googleClassroom" # str | Filter the users by their source (optional) + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + source = 'source_example' # str | Filter the users by their source (optional) - # example passing only required values which don't have defaults set - try: - # List group's users - api_response = api_instance.list_group_users(group) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List group's users api_response = api_instance.list_group_users(group, source=source) + print("The response of GroupApi->list_group_users:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling GroupApi->list_group_users: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **source** | **str**| Filter the users by their source | [optional] + **group** | **str**| Unique identifier of a Flat group | + **source** | **str**| Filter the users by their source | [optional] ### Return type -[**[UserPublic]**](UserPublic.md) +[**List[UserPublic]**](UserPublic.md) ### Authorization @@ -257,7 +228,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/GroupDetails.md b/docs/GroupDetails.md index 5ccc9fa..ddb4f0e 100644 --- a/docs/GroupDetails.md +++ b/docs/GroupDetails.md @@ -3,6 +3,7 @@ The details of a group ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the group | [optional] @@ -12,8 +13,24 @@ Name | Type | Description | Notes **creation_date** | **datetime** | The date when the group was create | [optional] **users_count** | **float** | The number of students in this group | [optional] **read_only** | **bool** | `true` if the properties and members of this group are in in read-only | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.group_details import GroupDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupDetails from a JSON string +group_details_instance = GroupDetails.from_json(json) +# print the JSON string representation of the object +print GroupDetails.to_json() + +# convert the object into a dict +group_details_dict = group_details_instance.to_dict() +# create an instance of GroupDetails from a dict +group_details_form_dict = group_details.from_dict(group_details_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupType.md b/docs/GroupType.md index 289644d..dcc0f2c 100644 --- a/docs/GroupType.md +++ b/docs/GroupType.md @@ -3,9 +3,9 @@ The type of the group ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The type of the group | must be one of ["generic", "classTeachers", "classStudents", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LicenseMode.md b/docs/LicenseMode.md index bc6a562..2bd237c 100644 --- a/docs/LicenseMode.md +++ b/docs/LicenseMode.md @@ -3,9 +3,9 @@ Mode of the license ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Mode of the license | must be one of ["credit", "site", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LicenseSources.md b/docs/LicenseSources.md index b53c555..300e50f 100644 --- a/docs/LicenseSources.md +++ b/docs/LicenseSources.md @@ -3,9 +3,9 @@ Source of the license ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Source of the license | defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LmsName.md b/docs/LmsName.md index fe13e2e..c5390ae 100644 --- a/docs/LmsName.md +++ b/docs/LmsName.md @@ -3,9 +3,9 @@ LMS name ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | LMS name | must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LtiCredentials.md b/docs/LtiCredentials.md index 12a4390..8429659 100644 --- a/docs/LtiCredentials.md +++ b/docs/LtiCredentials.md @@ -3,6 +3,7 @@ A couple of LTI 1.x OAuth credentials ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of this couple of credentials | [optional] @@ -14,8 +15,24 @@ Name | Type | Description | Notes **last_usage** | **datetime** | The last time these credentials were used | [optional] **consumer_key** | **str** | OAuth 1 Consumer Key | [optional] **consumer_secret** | **str** | OAuth 1 Consumer Secret | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.lti_credentials import LtiCredentials + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiCredentials from a JSON string +lti_credentials_instance = LtiCredentials.from_json(json) +# print the JSON string representation of the object +print LtiCredentials.to_json() + +# convert the object into a dict +lti_credentials_dict = lti_credentials_instance.to_dict() +# create an instance of LtiCredentials from a dict +lti_credentials_form_dict = lti_credentials.from_dict(lti_credentials_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LtiCredentialsCreation.md b/docs/LtiCredentialsCreation.md index 96f50f8..894f13c 100644 --- a/docs/LtiCredentialsCreation.md +++ b/docs/LtiCredentialsCreation.md @@ -3,12 +3,29 @@ Creation of a couple of LTI 1.x OAuth credentials ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the couple of credentials | **lms** | [**LmsName**](LmsName.md) | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiCredentialsCreation from a JSON string +lti_credentials_creation_instance = LtiCredentialsCreation.from_json(json) +# print the JSON string representation of the object +print LtiCredentialsCreation.to_json() + +# convert the object into a dict +lti_credentials_creation_dict = lti_credentials_creation_instance.to_dict() +# create an instance of LtiCredentialsCreation from a dict +lti_credentials_creation_form_dict = lti_credentials_creation.from_dict(lti_credentials_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MediaAttachment.md b/docs/MediaAttachment.md index df78867..5397355 100644 --- a/docs/MediaAttachment.md +++ b/docs/MediaAttachment.md @@ -3,6 +3,7 @@ Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | @@ -27,8 +28,24 @@ Name | Type | Description | Notes **icon_url** | **str** | The URL of the icon | [optional] **mime_type** | **str** | The mine type of the file | [optional] **google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.media_attachment import MediaAttachment + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaAttachment from a JSON string +media_attachment_instance = MediaAttachment.from_json(json) +# print the JSON string representation of the object +print MediaAttachment.to_json() + +# convert the object into a dict +media_attachment_dict = media_attachment_instance.to_dict() +# create an instance of MediaAttachment from a dict +media_attachment_form_dict = media_attachment.from_dict(media_attachment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MediaScoreSharingMode.md b/docs/MediaScoreSharingMode.md index becf510..3d64f8f 100644 --- a/docs/MediaScoreSharingMode.md +++ b/docs/MediaScoreSharingMode.md @@ -3,9 +3,9 @@ The sharing mode of the score for classes post and assignments ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The sharing mode of the score for classes post and assignments | defaults to "read", must be one of ["read", "write", "copy", "performance", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md index 133d8c4..b9b2ca3 100644 --- a/docs/MicrosoftGraphAssignment.md +++ b/docs/MicrosoftGraphAssignment.md @@ -3,14 +3,31 @@ A Microsoft Teams asignment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Identifier of the assignement assigned by Microsoft Teams | [optional] **state** | **str** | State of the assignment | [optional] **alternate_link** | **str** | Absolute link to this assignement in the Microsoft Teams web UI | [optional] -**categories** | **[str]** | List of categories where this assignment is published under | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**categories** | **List[str]** | List of categories where this assignment is published under | [optional] + +## Example + +```python +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of MicrosoftGraphAssignment from a JSON string +microsoft_graph_assignment_instance = MicrosoftGraphAssignment.from_json(json) +# print the JSON string representation of the object +print MicrosoftGraphAssignment.to_json() +# convert the object into a dict +microsoft_graph_assignment_dict = microsoft_graph_assignment_instance.to_dict() +# create an instance of MicrosoftGraphAssignment from a dict +microsoft_graph_assignment_form_dict = microsoft_graph_assignment.from_dict(microsoft_graph_assignment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MicrosoftGraphSubmission.md b/docs/MicrosoftGraphSubmission.md index 5cec94d..78dbe27 100644 --- a/docs/MicrosoftGraphSubmission.md +++ b/docs/MicrosoftGraphSubmission.md @@ -3,13 +3,29 @@ A Microsoft Teams submission ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the submission assigned by Microsoft Teams | [optional] -**state** | **str** | State of the submission | [optional] -**alternate_link** | **str** | Absolute link to this submission in the Microsoft Teams web UI | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**id** | **str** | Identifier of the submission assigned by Microsoft Teams | +**state** | **str** | State of the submission | + +## Example + +```python +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission + +# TODO update the JSON string below +json = "{}" +# create an instance of MicrosoftGraphSubmission from a JSON string +microsoft_graph_submission_instance = MicrosoftGraphSubmission.from_json(json) +# print the JSON string representation of the object +print MicrosoftGraphSubmission.to_json() +# convert the object into a dict +microsoft_graph_submission_dict = microsoft_graph_submission_instance.to_dict() +# create an instance of MicrosoftGraphSubmission from a dict +microsoft_graph_submission_form_dict = microsoft_graph_submission.from_dict(microsoft_graph_submission_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 87b03a0..da7c65b 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **count_orga_users** -> [UserDetailsAdmin] count_orga_users() +> List[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) Count the organization users using the provided filters @@ -29,12 +29,11 @@ Count the organization users using the provided filters * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -46,48 +45,41 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - role = [ - "user", - ] # [str] | Filter users by role (optional) - q = "q_example" # str | The query to search (optional) - group = [ - "group_example", - ] # [str] | Filter users by group (optional) + api_instance = flat_api.OrganizationApi(api_client) + role = ['role_example'] # List[str] | Filter users by role (optional) + q = 'q_example' # str | The query to search (optional) + group = ['group_example'] # List[str] | Filter users by group (optional) no_active_license = True # bool | Filter users who don't have an active license (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Count the organization users using the provided filters api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + print("The response of OrganizationApi->count_orga_users:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **role** | **[str]**| Filter users by role | [optional] - **q** | **str**| The query to search | [optional] - **group** | **[str]**| Filter users by group | [optional] - **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **role** | [**List[str]**](str.md)| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | [**List[str]**](str.md)| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] ### Return type -[**[UserDetailsAdmin]**](UserDetailsAdmin.md) +[**List[UserDetailsAdmin]**](UserDetailsAdmin.md) ### Authorization @@ -98,7 +90,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -120,13 +111,12 @@ Flat for Education is a Certified LTI Provider. You can use these API methods to * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +from flat_api.models.lti_credentials import LtiCredentials +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -138,36 +128,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - body = LtiCredentialsCreation( - name="name_example", - lms=LmsName("canvas"), - ) # LtiCredentialsCreation | + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | - # example passing only required values which don't have defaults set try: # Create a new couple of LTI 1.x credentials api_response = api_instance.create_lti_credentials(body) + print("The response of OrganizationApi->create_lti_credentials:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | + **body** | [**LtiCredentialsCreation**](LtiCredentialsCreation.md)| | ### Return type @@ -182,7 +167,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -194,7 +178,7 @@ Name | Type | Description | Notes [[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) # **create_organization_invitation** -> OrganizationInvitation create_organization_invitation() +> OrganizationInvitation create_organization_invitation(body) Create a new invitation to join the organization @@ -205,13 +189,12 @@ This method creates and sends invitation for teachers and admins. Invitations c * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -223,37 +206,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - body = OrganizationInvitationCreation( - email="email_example", - organization_role=OrganizationRoles("admin"), - ) # OrganizationInvitationCreation | (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation | + try: # Create a new invitation to join the organization - api_response = api_instance.create_organization_invitation(body=body) + api_response = api_instance.create_organization_invitation(body) + print("The response of OrganizationApi->create_organization_invitation:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | [optional] + **body** | [**OrganizationInvitationCreation**](OrganizationInvitationCreation.md)| | ### Return type @@ -268,7 +245,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -279,7 +255,7 @@ Name | Type | Description | Notes [[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) # **create_organization_user** -> UserDetailsAdmin create_organization_user() +> UserDetailsAdmin create_organization_user(body) Create a new user account @@ -288,13 +264,12 @@ Create a new user account * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_creation import UserCreation +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -306,42 +281,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - body = UserCreation( - username="2", - firstname="firstname_example", - lastname="lastname_example", - email="email_example", - password="password_example", - locale=FlatLocales("en"), - role="user", - ) # UserCreation | (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = flat_api.OrganizationApi(api_client) + body = flat_api.UserCreation() # UserCreation | + try: # Create a new user account - api_response = api_instance.create_organization_user(body=body) + api_response = api_instance.create_organization_user(body) + print("The response of OrganizationApi->create_organization_user:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**UserCreation**](UserCreation.md)| | [optional] + **body** | [**UserCreation**](UserCreation.md)| | ### Return type @@ -356,7 +320,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -367,7 +330,7 @@ Name | Type | Description | Notes [[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) # **create_organization_user_access_token** -> ApiAccessToken create_organization_user_access_token(user) +> ApiAccessToken create_organization_user_access_token(user, organization_user_access_token_creation) Create a delegated API access token for an organization user @@ -378,13 +341,12 @@ This operation will create an API access token for a chosen organization user. T * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -396,48 +358,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - user = "user_example" # str | Unique identifier of the Flat account - organization_user_access_token_creation = OrganizationUserAccessTokenCreation( - scopes=[ - AppScopes("account.public_profile"), - ], - ) # OrganizationUserAccessTokenCreation | (optional) - - # example passing only required values which don't have defaults set - try: - # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token(user) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account + organization_user_access_token_creation = flat_api.OrganizationUserAccessTokenCreation() # OrganizationUserAccessTokenCreation | - # example passing only required values which don't have defaults set - # and optional values try: # Create a delegated API access token for an organization user - api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation=organization_user_access_token_creation) + api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation) + print("The response of OrganizationApi->create_organization_user_access_token:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **organization_user_access_token_creation** | [**OrganizationUserAccessTokenCreation**](OrganizationUserAccessTokenCreation.md)| | [optional] + **user** | **str**| Unique identifier of the Flat account | + **organization_user_access_token_creation** | [**OrganizationUserAccessTokenCreation**](OrganizationUserAccessTokenCreation.md)| | ### Return type @@ -452,7 +399,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -463,7 +409,7 @@ Name | Type | Description | Notes [[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) # **create_organization_user_signin_link** -> UserSigninLink create_organization_user_signin_link(user) +> UserSigninLink create_organization_user_signin_link(user, user_signin_link_creation) Create a sign in link for an organization user @@ -472,13 +418,12 @@ Create a sign in link for an organization user * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_signin_link import UserSigninLink +from flat_api.models.user_signin_link import UserSigninLink +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -490,46 +435,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - user = "user_example" # str | Unique identifier of the Flat account - user_signin_link_creation = UserSigninLinkCreation( - destination_path="/", - ) # UserSigninLinkCreation | (optional) + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account + user_signin_link_creation = flat_api.UserSigninLinkCreation() # UserSigninLinkCreation | - # example passing only required values which don't have defaults set try: # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link(user) + api_response = api_instance.create_organization_user_signin_link(user, user_signin_link_creation) + print("The response of OrganizationApi->create_organization_user_signin_link:\n") pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Create a sign in link for an organization user - api_response = api_instance.create_organization_user_signin_link(user, user_signin_link_creation=user_signin_link_creation) - pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **user_signin_link_creation** | [**UserSigninLinkCreation**](UserSigninLinkCreation.md)| | [optional] + **user** | **str**| Unique identifier of the Flat account | + **user_signin_link_creation** | [**UserSigninLinkCreation**](UserSigninLinkCreation.md)| | ### Return type @@ -544,7 +476,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -555,7 +486,7 @@ Name | Type | Description | Notes [[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) # **list_lti_credentials** -> [LtiCredentials] list_lti_credentials() +> List[LtiCredentials] list_lti_credentials() List LTI 1.x credentials @@ -564,12 +495,11 @@ List LTI 1.x credentials * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.lti_credentials import LtiCredentials +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -581,33 +511,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) + api_instance = flat_api.OrganizationApi(api_client) - # example, this endpoint has no required or optional parameters try: # List LTI 1.x credentials api_response = api_instance.list_lti_credentials() + print("The response of OrganizationApi->list_lti_credentials:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e) ``` + ### Parameters + This endpoint does not need any parameter. ### Return type -[**[LtiCredentials]**](LtiCredentials.md) +[**List[LtiCredentials]**](LtiCredentials.md) ### Authorization @@ -618,7 +546,6 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -630,7 +557,7 @@ This endpoint does not need any parameter. [[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) # **list_organization_invitations** -> [OrganizationInvitation] list_organization_invitations() +> List[OrganizationInvitation] list_organization_invitations(role=role, limit=limit, next=next, previous=previous) List the organization invitations @@ -639,12 +566,11 @@ List the organization invitations * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation import OrganizationInvitation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -656,44 +582,41 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - role = "user" # str | Filter users by role (optional) - limit = 50 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 50 - next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - - # example passing only required values which don't have defaults set - # and optional values + api_instance = flat_api.OrganizationApi(api_client) + role = 'role_example' # str | Filter users by role (optional) + limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + try: # List the organization invitations api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous) + print("The response of OrganizationApi->list_organization_invitations:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **role** | **str**| Filter users by role | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 50 - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **role** | **str**| Filter users by role | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 50] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type -[**[OrganizationInvitation]**](OrganizationInvitation.md) +[**List[OrganizationInvitation]**](OrganizationInvitation.md) ### Authorization @@ -704,7 +627,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -715,7 +637,7 @@ Name | Type | Description | Notes [[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) # **list_organization_users** -> [UserDetailsAdmin] list_organization_users() +> List[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) List the organization users @@ -724,12 +646,11 @@ List the organization users * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -741,66 +662,55 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - sort = [ - "firstname", - ] # [str] | The order to sort the user list (optional) - direction = "asc" # str | Sort direction (optional) - next = "next_example" # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - previous = "previous_example" # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) - role = [ - "user", - ] # [str] | Filter users by role (optional) - q = "q_example" # str | The query to search (optional) - group = [ - "group_example", - ] # [str] | Filter users by group (optional) + api_instance = flat_api.OrganizationApi(api_client) + sort = ['sort_example'] # List[str] | The order to sort the user list (optional) + direction = 'direction_example' # str | Sort direction (optional) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + role = ['role_example'] # List[str] | Filter users by role (optional) + q = 'q_example' # str | The query to search (optional) + group = ['group_example'] # List[str] | Filter users by group (optional) no_active_license = True # bool | Filter users who don't have an active license (optional) - license_expiration_date = [ - "licenseExpirationDate_example", - ] # [str] | Filter users by license expiration date or `active` / `notActive` (optional) + license_expiration_date = ['license_expiration_date_example'] # List[str] | Filter users by license expiration date or `active` / `notActive` (optional) only_ids = True # bool | Return only user ids (optional) - limit = 25 # int | This is the maximum number of objects that may be returned (optional) if omitted the server will use the default value of 25 + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) - # example passing only required values which don't have defaults set - # and optional values try: # List the organization users api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) + print("The response of OrganizationApi->list_organization_users:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sort** | **[str]**| The order to sort the user list | [optional] - **direction** | **str**| Sort direction | [optional] - **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] - **role** | **[str]**| Filter users by role | [optional] - **q** | **str**| The query to search | [optional] - **group** | **[str]**| Filter users by group | [optional] - **no_active_license** | **bool**| Filter users who don't have an active license | [optional] - **license_expiration_date** | **[str]**| Filter users by license expiration date or `active` / `notActive` | [optional] - **only_ids** | **bool**| Return only user ids | [optional] - **limit** | **int**| This is the maximum number of objects that may be returned | [optional] if omitted the server will use the default value of 25 + **sort** | [**List[str]**](str.md)| The order to sort the user list | [optional] + **direction** | **str**| Sort direction | [optional] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **role** | [**List[str]**](str.md)| Filter users by role | [optional] + **q** | **str**| The query to search | [optional] + **group** | [**List[str]**](str.md)| Filter users by group | [optional] + **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **license_expiration_date** | [**List[str]**](str.md)| Filter users by license expiration date or `active` / `notActive` | [optional] + **only_ids** | **bool**| Return only user ids | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] ### Return type -[**[UserDetailsAdmin]**](UserDetailsAdmin.md) +[**List[UserDetailsAdmin]**](UserDetailsAdmin.md) ### Authorization @@ -811,7 +721,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -831,11 +740,10 @@ Remove an organization invitation * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -847,32 +755,29 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - invitation = "invitation_example" # str | Unique identifier of the invitation + api_instance = flat_api.OrganizationApi(api_client) + invitation = 'invitation_example' # str | Unique identifier of the invitation - # example passing only required values which don't have defaults set try: # Remove an organization invitation api_instance.remove_organization_invitation(invitation) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **invitation** | **str**| Unique identifier of the invitation | + **invitation** | **str**| Unique identifier of the invitation | ### Return type @@ -887,7 +792,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -898,7 +802,7 @@ void (empty response body) [[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) # **remove_organization_user** -> remove_organization_user(user) +> remove_organization_user(user, convert_to_individual=convert_to_individual) Remove an account from Flat @@ -909,11 +813,10 @@ This operation removes an account from Flat and its data, including: * The music * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -925,42 +828,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - user = "user_example" # str | Unique identifier of the Flat account + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) - # example passing only required values which don't have defaults set - try: - # Remove an account from Flat - api_instance.remove_organization_user(user) - except flat_api.ApiException as e: - print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Remove an account from Flat api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] + **user** | **str**| Unique identifier of the Flat account | + **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] ### Return type @@ -975,7 +867,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -995,11 +886,10 @@ Revoke LTI 1.x credentials * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1011,32 +901,29 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - credentials = "credentials_example" # str | Credentials unique identifier + api_instance = flat_api.OrganizationApi(api_client) + credentials = 'credentials_example' # str | Credentials unique identifier - # example passing only required values which don't have defaults set try: # Revoke LTI 1.x credentials api_instance.revoke_lti_credentials(credentials) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **credentials** | **str**| Credentials unique identifier | + **credentials** | **str**| Credentials unique identifier | ### Return type @@ -1051,7 +938,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1073,13 +959,12 @@ Update account information * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import organization_api -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_admin_update import UserAdminUpdate +from flat_api.models.user_admin_update import UserAdminUpdate +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1091,42 +976,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = organization_api.OrganizationApi(api_client) - user = "user_example" # str | Unique identifier of the Flat account - body = UserAdminUpdate( - password="password_example", - organization_role=OrganizationRoles("admin"), - username="2", - firstname="firstname_example", - lastname="lastname_example", - email="email_example", - ) # UserAdminUpdate | - - # example passing only required values which don't have defaults set + api_instance = flat_api.OrganizationApi(api_client) + user = 'user_example' # str | Unique identifier of the Flat account + body = flat_api.UserAdminUpdate() # UserAdminUpdate | + try: # Update account information api_response = api_instance.update_organization_user(user, body) + print("The response of OrganizationApi->update_organization_user:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of the Flat account | - **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | + **user** | **str**| Unique identifier of the Flat account | + **body** | [**UserAdminUpdate**](UserAdminUpdate.md)| | ### Return type @@ -1141,7 +1017,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/OrganizationInvitation.md b/docs/OrganizationInvitation.md index f0d4d26..142e227 100644 --- a/docs/OrganizationInvitation.md +++ b/docs/OrganizationInvitation.md @@ -3,17 +3,36 @@ Details of an invitation to join an organization ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The invitation unique identifier | [optional] -**organization** | **str** | The unique identifier of the Organization owning this class | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**custom_code** | **str** | Enrollment code to use when joining this organization | [optional] +**creation_date** | **datetime** | The creation date of the invitation | [optional] +**organization** | **str** | The unique identifier of the Organization owning this class | +**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | +**custom_code** | **str** | Enrollment code to use when joining this organization | **email** | **str** | The email address this invitation was sent to | [optional] **invited_by** | **str** | The unique identifier of the User who created this invitation | [optional] -**used_by** | **str** | The unique identifier of the User who used this invitation | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**allow_multiple_use** | **bool** | If true, the invitation can be used multiple times. If false, the invitation can only be used once. | +**used_by** | **List[str]** | List of users who used this invitation | [optional] + +## Example + +```python +from flat_api.models.organization_invitation import OrganizationInvitation + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationInvitation from a JSON string +organization_invitation_instance = OrganizationInvitation.from_json(json) +# print the JSON string representation of the object +print OrganizationInvitation.to_json() +# convert the object into a dict +organization_invitation_dict = organization_invitation_instance.to_dict() +# create an instance of OrganizationInvitation from a dict +organization_invitation_form_dict = organization_invitation.from_dict(organization_invitation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationInvitationCreation.md b/docs/OrganizationInvitationCreation.md index a801112..74b2d6e 100644 --- a/docs/OrganizationInvitationCreation.md +++ b/docs/OrganizationInvitationCreation.md @@ -3,12 +3,29 @@ The parameters to create an organization invitation ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | The email address you want to send the invitation to | [optional] -**organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**organization_role** | **str** | User's Organization Role | [optional] [default to 'teacher'] + +## Example + +```python +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationInvitationCreation from a JSON string +organization_invitation_creation_instance = OrganizationInvitationCreation.from_json(json) +# print the JSON string representation of the object +print OrganizationInvitationCreation.to_json() +# convert the object into a dict +organization_invitation_creation_dict = organization_invitation_creation_instance.to_dict() +# create an instance of OrganizationInvitationCreation from a dict +organization_invitation_creation_form_dict = organization_invitation_creation.from_dict(organization_invitation_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationRoles.md b/docs/OrganizationRoles.md index f01979f..0f91a74 100644 --- a/docs/OrganizationRoles.md +++ b/docs/OrganizationRoles.md @@ -3,9 +3,9 @@ User's Organization Role (for Edu users only) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | User's Organization Role (for Edu users only) | must be one of ["admin", "billing", "teacher", "user", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/OrganizationUserAccessTokenCreation.md index e64b690..86a142f 100644 --- a/docs/OrganizationUserAccessTokenCreation.md +++ b/docs/OrganizationUserAccessTokenCreation.md @@ -3,11 +3,28 @@ Creation of a delegated API access token for an organization user ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**scopes** | [**[AppScopes]**](AppScopes.md) | List of requested scopes for this credential | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**scopes** | [**List[AppScopes]**](AppScopes.md) | List of requested scopes for this credential | + +## Example + +```python +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationUserAccessTokenCreation from a JSON string +organization_user_access_token_creation_instance = OrganizationUserAccessTokenCreation.from_json(json) +# print the JSON string representation of the object +print OrganizationUserAccessTokenCreation.to_json() +# convert the object into a dict +organization_user_access_token_creation_dict = organization_user_access_token_creation_instance.to_dict() +# create an instance of OrganizationUserAccessTokenCreation from a dict +organization_user_access_token_creation_form_dict = organization_user_access_token_creation.from_dict(organization_user_access_token_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceCollaborator.md b/docs/ResourceCollaborator.md index bfa1662..1fda2b8 100644 --- a/docs/ResourceCollaborator.md +++ b/docs/ResourceCollaborator.md @@ -2,21 +2,40 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acl_read** | **bool** | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False -**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False +**acl_read** | **bool** | `True` if the current user can read the current document | [default to False] +**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] +**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [default to False] +**collaborator_type** | **str** | The type of the collaborator for the resource | [optional] **id** | **str** | The unique identifier of the permission | [optional] +**var_date** | **datetime** | The date when the permission was added | [optional] **score** | **str** | If this object is a permission of a score, this property will contain the unique identifier of the score | [optional] **collection** | **str** | If this object is a permission of a collection, this property will contain the unique identifier of the collection | [optional] **user** | [**UserPublic**](UserPublic.md) | | [optional] **group** | [**Group**](Group.md) | | [optional] **user_email** | **str** | If the collaborator is not a user of Flat yet, this field will contain their email. | [optional] **invited** | **bool** | If this property is `true`, this is still a pending invitation | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.resource_collaborator import ResourceCollaborator + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceCollaborator from a JSON string +resource_collaborator_instance = ResourceCollaborator.from_json(json) +# print the JSON string representation of the object +print ResourceCollaborator.to_json() + +# convert the object into a dict +resource_collaborator_dict = resource_collaborator_instance.to_dict() +# create an instance of ResourceCollaborator from a dict +resource_collaborator_form_dict = resource_collaborator.from_dict(resource_collaborator_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceCollaboratorCreation.md b/docs/ResourceCollaboratorCreation.md index 99b934c..e44aa3a 100644 --- a/docs/ResourceCollaboratorCreation.md +++ b/docs/ResourceCollaboratorCreation.md @@ -3,17 +3,34 @@ Add a collaborator to a resource. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user** | **str** | The unique identifier of a Flat user | [optional] **group** | **str** | The unique identifier of a Flat group | [optional] **user_email** | **str** | Fill this field to invite an individual user by email. | [optional] **user_token** | **str** | Token received in an invitation to join the score. | [optional] -**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] if omitted the server will use the default value of True -**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] if omitted the server will use the default value of False -**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] if omitted the server will use the default value of False -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] [default to True] +**acl_write** | **bool** | `True` if the related user can modify the score. | [optional] [default to False] +**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] + +## Example + +```python +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceCollaboratorCreation from a JSON string +resource_collaborator_creation_instance = ResourceCollaboratorCreation.from_json(json) +# print the JSON string representation of the object +print ResourceCollaboratorCreation.to_json() +# convert the object into a dict +resource_collaborator_creation_dict = resource_collaborator_creation_instance.to_dict() +# create an instance of ResourceCollaboratorCreation from a dict +resource_collaborator_creation_form_dict = resource_collaborator_creation.from_dict(resource_collaborator_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRights.md b/docs/ResourceRights.md index abbebac..ff93d65 100644 --- a/docs/ResourceRights.md +++ b/docs/ResourceRights.md @@ -3,14 +3,32 @@ The rights of the current user on a score or collection ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acl_read** | **bool** | `True` if the current user can read the current document | [optional] if omitted the server will use the default value of False -**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [optional] if omitted the server will use the default value of False -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] if omitted the server will use the default value of False -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**acl_read** | **bool** | `True` if the current user can read the current document | [default to False] +**acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] +**acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [default to False] +**collaborator_type** | **str** | The type of the collaborator for the resource | [optional] + +## Example + +```python +from flat_api.models.resource_rights import ResourceRights + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRights from a JSON string +resource_rights_instance = ResourceRights.from_json(json) +# print the JSON string representation of the object +print ResourceRights.to_json() +# convert the object into a dict +resource_rights_dict = resource_rights_instance.to_dict() +# create an instance of ResourceRights from a dict +resource_rights_form_dict = resource_rights.from_dict(resource_rights_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreApi.md b/docs/ScoreApi.md index 66b3df4..85b9f2c 100644 --- a/docs/ScoreApi.md +++ b/docs/ScoreApi.md @@ -14,7 +14,6 @@ Method | HTTP request | Description [**delete_score_track**](ScoreApi.md#delete_score_track) | **DELETE** /scores/{score}/tracks/{track} | Remove an audio or video track linked to the score [**edit_score**](ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata [**fork_score**](ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -[**ger_user_likes**](ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores [**get_group_scores**](ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores [**get_score**](ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata [**get_score_collaborator**](ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator @@ -25,6 +24,7 @@ Method | HTTP request | Description [**get_score_revisions**](ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions [**get_score_submissions**](ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score [**get_score_track**](ScoreApi.md#get_score_track) | **GET** /scores/{score}/tracks/{track} | Retrieve the details of an audio or video track linked to a score +[**get_user_likes**](ScoreApi.md#get_user_likes) | **GET** /users/{user}/likes | List liked scores [**get_user_scores**](ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores [**list_score_tracks**](ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score [**mark_score_comment_resolved**](ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved @@ -48,13 +48,12 @@ Share a score with a single user or a group. This API call allows to add, invite * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -66,43 +65,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ResourceCollaboratorCreation( - user="user_example", - group="group_example", - user_email="user_email_example", - user_token="user_token_example", - acl_read=True, - acl_write=False, - acl_admin=False, - ) # ResourceCollaboratorCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ResourceCollaboratorCreation() # ResourceCollaboratorCreation | + try: # Add a new collaborator api_response = api_instance.add_score_collaborator(score, body) + print("The response of ScoreApi->add_score_collaborator:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->add_score_collaborator: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | + **score** | **str**| 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** | [**ResourceCollaboratorCreation**](ResourceCollaboratorCreation.md)| | ### Return type @@ -117,7 +106,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -142,13 +130,12 @@ Use this method to add new track to the score. This track can then be played on * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track import ScoreTrack +from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -160,47 +147,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ScoreTrackCreation( - title="title_example", - default=True, - state=ScoreTrackState("draft"), - url="url_example", - synchronization_points=[ - ScoreTrackPoint( - type="measure", - measure_uuid="measure_uuid_example", - time=3.14, - ), - ], - ) # ScoreTrackCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreTrackCreation() # ScoreTrackCreation | + try: # Add a new video or audio track to the score api_response = api_instance.add_score_track(score, body) + print("The response of ScoreApi->add_score_track:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->add_score_track: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | + **score** | **str**| 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** | [**ScoreTrackCreation**](ScoreTrackCreation.md)| | ### Return type @@ -215,7 +188,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -228,7 +200,7 @@ Name | Type | Description | Notes [[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) # **create_export_task** -> Task create_export_task(score, revision, format) +> Task create_export_task(score, revision, format, sharing_key=sharing_key, body=body) Create a new score export task @@ -239,13 +211,12 @@ Some of the exports of a score takes are longer to process than a simple API req * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.task_export_options import TaskExportOptions -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -257,54 +228,39 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - format = "mp3" # str | The format of the file that will be generated or the target service name where the file will be exported - sharing_key = "sharingKey_example" # str | 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) - body = TaskExportOptions( - parts=[ - "parts_example", - ], - ) # TaskExportOptions | (optional) - - # example passing only required values which don't have defaults set - try: - # Create a new score export task - api_response = api_instance.create_export_task(score, revision, format) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->create_export_task: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format = 'format_example' # str | The format of the file that will be generated or the target service name where the file will be exported + sharing_key = 'sharing_key_example' # str | 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) + body = flat_api.TaskExportOptions() # TaskExportOptions | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Create a new score export task api_response = api_instance.create_export_task(score, revision, format, sharing_key=sharing_key, body=body) + print("The response of ScoreApi->create_export_task:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->create_export_task: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **format** | **str**| The format of the file that will be generated or the target service name where the file will be exported | - **sharing_key** | **str**| 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] - **body** | [**TaskExportOptions**](TaskExportOptions.md)| | [optional] + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **format** | **str**| The format of the file that will be generated or the target service name where the file will be exported | + **sharing_key** | **str**| 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] + **body** | [**TaskExportOptions**](TaskExportOptions.md)| | [optional] ### Return type @@ -319,7 +275,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -344,14 +299,12 @@ Use this API method to **create a new music score in the current User account**. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_details import ScoreDetails -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -363,39 +316,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - body = ScoreCreation( - title="title_example", - privacy=ScorePrivacy("private"), - filename="filename_example", - data="data_example", - data_encoding="base64" - ) # ScoreCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ScoreApi(api_client) + body = flat_api.ScoreCreation() # ScoreCreation | + try: # Create a new score api_response = api_instance.create_score(body) + print("The response of ScoreApi->create_score:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->create_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ScoreCreation**](ScoreCreation.md)| | + **body** | [**ScoreCreation**](ScoreCreation.md)| | ### Return type @@ -410,7 +355,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -434,13 +378,12 @@ Update a score by uploading a new revision for this one. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_revision import ScoreRevision +from flat_api.models.score_revision_creation import ScoreRevisionCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -452,40 +395,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ScoreRevisionCreation( - data="", - data_encoding="base64", - autosave=True, - description="description_example", - ) # ScoreRevisionCreation | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreRevisionCreation() # ScoreRevisionCreation | + try: # Create a new revision api_response = api_instance.create_score_revision(score, body) + print("The response of ScoreApi->create_score_revision:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->create_score_revision: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | + **score** | **str**| 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** | [**ScoreRevisionCreation**](ScoreRevisionCreation.md)| | ### Return type @@ -500,7 +436,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -514,7 +449,7 @@ Name | Type | Description | Notes [[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) # **delete_score** -> delete_score(score) +> delete_score(score, now=now) Delete a score @@ -525,11 +460,10 @@ This method can be used by the owner/admin (`aclAdmin` rights) of a score as wel * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -541,42 +475,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) if omitted the server will use the default value of False + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) (default to False) - # example passing only required values which don't have defaults set - try: - # Delete a score - api_instance.delete_score(score) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Delete a score api_instance.delete_score(score, now=now) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->delete_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] if omitted the server will use the default value of False + **score** | **str**| 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`). | + **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] [default to False] ### Return type @@ -591,7 +514,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -604,7 +526,7 @@ void (empty response body) [[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) # **delete_score_comment** -> delete_score_comment(score, comment) +> delete_score_comment(score, comment, sharing_key=sharing_key) Delete a comment @@ -613,11 +535,10 @@ Delete a comment * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -629,44 +550,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Delete a comment - api_instance.delete_score_comment(score, comment) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Delete a comment api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] ### Return type @@ -681,7 +591,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -703,11 +612,10 @@ Remove an audio or video track linked to the score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -719,34 +627,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score audio track + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track - # example passing only required values which don't have defaults set try: # Remove an audio or video track linked to the score api_instance.delete_score_track(score, track) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->delete_score_track: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | ### Return type @@ -761,7 +666,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -774,7 +678,7 @@ void (empty response body) [[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) # **edit_score** -> ScoreDetails edit_score(score) +> ScoreDetails edit_score(score, body) Edit a score's metadata @@ -785,14 +689,12 @@ This API method allows you to change the metadata of a score document (e.g. its * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_details import ScoreDetails -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_modification import ScoreModification +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -804,59 +706,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ScoreModification( - title="title_example", - subtitle="subtitle_example", - composer="composer_example", - lyricist="lyricist_example", - arranger="arranger_example", - privacy=ScorePrivacy("private"), - sharing_key="bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3", - description="description_example", - tags=[ - "tags_example", - ], - creation_type=ScoreCreationType("original"), - license=ScoreLicense("copyright"), - license_text="license_text_example", - ) # ScoreModification | (optional) - - # example passing only required values which don't have defaults set - try: - # Edit a score's metadata - api_response = api_instance.edit_score(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->edit_score: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreModification() # ScoreModification | - # example passing only required values which don't have defaults set - # and optional values try: # Edit a score's metadata - api_response = api_instance.edit_score(score, body=body) + api_response = api_instance.edit_score(score, body) + print("The response of ScoreApi->edit_score:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->edit_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreModification**](ScoreModification.md)| | [optional] + **score** | **str**| 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** | [**ScoreModification**](ScoreModification.md)| | ### Return type @@ -871,7 +747,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -885,7 +760,7 @@ Name | Type | Description | Notes [[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) # **fork_score** -> ScoreDetails fork_score(score, body) +> ScoreDetails fork_score(score, body, sharing_key=sharing_key) Fork a score @@ -896,13 +771,12 @@ This API call will make a copy of the last revision of the specified score and c * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_fork import ScoreFork +from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_fork import ScoreFork +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -914,49 +788,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ScoreFork( - collection="root", - keep_original_title=True, - ) # ScoreFork | - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Fork a score - api_response = api_instance.fork_score(score, body) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->fork_score: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreFork() # ScoreFork | + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Fork a score api_response = api_instance.fork_score(score, body, sharing_key=sharing_key) + print("The response of ScoreApi->fork_score:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->fork_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | [**ScoreFork**](ScoreFork.md)| | + **sharing_key** | **str**| 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] ### Return type @@ -971,7 +831,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -984,97 +843,8 @@ Name | Type | Description | Notes [[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) -# **ger_user_likes** -> [ScoreDetails] ger_user_likes(user) - -List liked scores - -### Example - -* OAuth Authentication (OAuth2): - -```python -import time -import flat_api -from flat_api.api import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse -from pprint import pprint -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - user = "user_example" # str | 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 (optional) - - # example passing only required values which don't have defaults set - try: - # List liked scores - api_response = api_instance.ger_user_likes(user) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->ger_user_likes: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | **str**| 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] - -### Return type - -[**[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of liked scores | - | -**0** | Error | - | - -[[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) - # **get_group_scores** -> [ScoreDetails] get_group_scores(group) +> List[ScoreDetails] get_group_scores(group, parent=parent) List group's scores @@ -1085,12 +855,11 @@ Get the list of scores shared with a group. * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1102,48 +871,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - group = "group_example" # str | Unique identifier of a Flat group - parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) - - # example passing only required values which don't have defaults set - try: - # List group's scores - api_response = api_instance.get_group_scores(group) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List group's scores api_response = api_instance.get_group_scores(group, parent=parent) + print("The response of ScoreApi->get_group_scores:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_group_scores: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **group** | **str**| Unique identifier of a Flat group | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -1154,7 +912,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1165,7 +922,7 @@ Name | Type | Description | Notes [[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) # **get_score** -> ScoreDetails get_score(score) +> ScoreDetails get_score(score, sharing_key=sharing_key) Get a score's metadata @@ -1176,12 +933,11 @@ Get the details of a score identified by the `score` parameter in the URL. The c * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1193,44 +949,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Get a score's metadata - api_response = api_instance.get_score(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Get a score's metadata api_response = api_instance.get_score(score, sharing_key=sharing_key) + print("The response of ScoreApi->get_score:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type @@ -1245,7 +990,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1259,7 +1003,7 @@ Name | Type | Description | Notes [[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) # **get_score_collaborator** -> ResourceCollaborator get_score_collaborator(score, collaborator) +> ResourceCollaborator get_score_collaborator(score, collaborator, sharing_key=sharing_key) Get a collaborator @@ -1270,12 +1014,11 @@ Get the information about a collaborator (User or Group). * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1287,46 +1030,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Get a collaborator - api_response = api_instance.get_score_collaborator(score, collaborator) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Get a collaborator api_response = api_instance.get_score_collaborator(score, collaborator, sharing_key=sharing_key) + print("The response of ScoreApi->get_score_collaborator:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_collaborator: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | + **sharing_key** | **str**| 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] ### Return type @@ -1341,7 +1073,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1355,7 +1086,7 @@ Name | Type | Description | Notes [[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) # **get_score_collaborators** -> [ResourceCollaborator] get_score_collaborators(score) +> List[ResourceCollaborator] get_score_collaborators(score, sharing_key=sharing_key) List the collaborators @@ -1366,12 +1097,11 @@ This API call will list the different collaborators of a score and their rights * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1383,48 +1113,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # List the collaborators - api_response = api_instance.get_score_collaborators(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List the collaborators api_response = api_instance.get_score_collaborators(score, sharing_key=sharing_key) + print("The response of ScoreApi->get_score_collaborators:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_collaborators: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type -[**[ResourceCollaborator]**](ResourceCollaborator.md) +[**List[ResourceCollaborator]**](ResourceCollaborator.md) ### Authorization @@ -1435,7 +1154,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1449,7 +1167,7 @@ Name | Type | Description | Notes [[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) # **get_score_comments** -> [ScoreComment] get_score_comments(score) +> List[ScoreComment] get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) List comments @@ -1460,12 +1178,11 @@ This method lists the different comments added on a music score (documents and i * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_comment import ScoreComment +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1477,54 +1194,43 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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 = "document" # str | Filter the comments by type (optional) - sort = "date" # str | Sort (optional) if omitted the server will use the default value of "date" - direction = "asc" # str | Sort direction (optional) - - # example passing only required values which don't have defaults set - try: - # List comments - api_response = api_instance.get_score_comments(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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 = 'type_example' # str | Filter the comments by type (optional) + sort = 'sort_example' # str | Sort (optional) + direction = 'direction_example' # str | Sort direction (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List comments api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) + print("The response of ScoreApi->get_score_comments:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_comments: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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** | **str**| Filter the comments by type | [optional] - **sort** | **str**| Sort | [optional] if omitted the server will use the default value of "date" - **direction** | **str**| Sort direction | [optional] + **score** | **str**| 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`). | + **sharing_key** | **str**| 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** | **str**| Filter the comments by type | [optional] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] ### Return type -[**[ScoreComment]**](ScoreComment.md) +[**List[ScoreComment]**](ScoreComment.md) ### Authorization @@ -1535,7 +1241,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1549,7 +1254,7 @@ Name | Type | Description | Notes [[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) # **get_score_revision** -> ScoreRevision get_score_revision(score, revision) +> ScoreRevision get_score_revision(score, revision, sharing_key=sharing_key) Get a score revision @@ -1560,12 +1265,11 @@ When creating a score or saving a new version of a score, a revision is created * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_revision import ScoreRevision +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1577,46 +1281,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Get a score revision - api_response = api_instance.get_score_revision(score, revision) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Get a score revision api_response = api_instance.get_score_revision(score, revision, sharing_key=sharing_key) + print("The response of ScoreApi->get_score_revision:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_revision: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **sharing_key** | **str**| 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] ### Return type @@ -1631,7 +1324,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1645,7 +1337,7 @@ Name | Type | Description | Notes [[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) # **get_score_revision_data** -> file_type get_score_revision_data(score, revision, format) +> bytearray get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) Get a score revision data @@ -1656,11 +1348,10 @@ Retrieve the file corresponding to a score revision (the following formats are a * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1672,58 +1363,47 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - format = "json" # str | The format of the file you will retrieve - sharing_key = "sharingKey_example" # str | 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 = "parts_example" # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. + format = 'format_example' # str | The format of the file you will retrieve + sharing_key = 'sharing_key_example' # str | 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 = 'parts_example' # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) - # example passing only required values which don't have defaults set - try: - # Get a score revision data - api_response = api_instance.get_score_revision_data(score, revision, format) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Get a score revision data api_response = api_instance.get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) + print("The response of ScoreApi->get_score_revision_data:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_revision_data: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | - **format** | **str**| The format of the file you will retrieve | - **sharing_key** | **str**| 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** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] - **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] - **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] + **score** | **str**| 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** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | + **format** | **str**| The format of the file you will retrieve | + **sharing_key** | **str**| 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** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] + **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] + **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] ### Return type -**file_type** +**bytearray** ### Authorization @@ -1734,7 +1414,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png - ### HTTP response details | Status code | Description | Response headers | @@ -1748,7 +1427,7 @@ Name | Type | Description | Notes [[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) # **get_score_revisions** -> [ScoreRevision] get_score_revisions(score) +> List[ScoreRevision] get_score_revisions(score, sharing_key=sharing_key) List the revisions @@ -1759,12 +1438,11 @@ When creating a score or saving a new version of a score, a revision is created * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_revision import ScoreRevision +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1776,48 +1454,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # List the revisions - api_response = api_instance.get_score_revisions(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List the revisions api_response = api_instance.get_score_revisions(score, sharing_key=sharing_key) + print("The response of ScoreApi->get_score_revisions:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_revisions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] ### Return type -[**[ScoreRevision]**](ScoreRevision.md) +[**List[ScoreRevision]**](ScoreRevision.md) ### Authorization @@ -1828,7 +1495,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1842,7 +1508,7 @@ Name | Type | Description | Notes [[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) # **get_score_submissions** -> [AssignmentSubmission] get_score_submissions(score) +> List[AssignmentSubmission] get_score_submissions(score) List submissions related to the score @@ -1853,12 +1519,11 @@ This API call will list the different assignments submissions where the score is * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1870,37 +1535,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). - # example passing only required values which don't have defaults set try: # List submissions related to the score api_response = api_instance.get_score_submissions(score) + print("The response of ScoreApi->get_score_submissions:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_submissions: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | + **score** | **str**| 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`). | ### Return type -[**[AssignmentSubmission]**](AssignmentSubmission.md) +[**List[AssignmentSubmission]**](AssignmentSubmission.md) ### Authorization @@ -1911,7 +1574,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1922,7 +1584,7 @@ Name | Type | Description | Notes [[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) # **get_score_track** -> ScoreTrack get_score_track(score, track) +> ScoreTrack get_score_track(score, track, sharing_key=sharing_key) Retrieve the details of an audio or video track linked to a score @@ -1931,12 +1593,11 @@ Retrieve the details of an audio or video track linked to a score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_track import ScoreTrack +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -1948,46 +1609,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score audio track - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Retrieve the details of an audio or video track linked to a score - api_response = api_instance.get_score_track(score, track) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_score_track: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Retrieve the details of an audio or video track linked to a score api_response = api_instance.get_score_track(score, track, sharing_key=sharing_key) + print("The response of ScoreApi->get_score_track:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_score_track: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + **sharing_key** | **str**| 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] ### Return type @@ -2002,7 +1652,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2014,8 +1663,90 @@ Name | Type | Description | Notes [[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) +# **get_user_likes** +> List[ScoreDetails] get_user_likes(user, next=next, previous=previous, limit=limit, ids=ids) + +List liked scores + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ScoreApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + ids = True # bool | Return only the identifiers of the scores (optional) + + try: + # List liked scores + api_response = api_instance.get_user_likes(user, next=next, previous=previous, limit=limit, ids=ids) + print("The response of ScoreApi->get_user_likes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScoreApi->get_user_likes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **ids** | **bool**| Return only the identifiers of the scores | [optional] + +### Return type + +[**List[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of liked scores | - | +**0** | Error | - | + +[[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) + # **get_user_scores** -> [ScoreDetails] get_user_scores(user) +> List[ScoreDetails] get_user_scores(user, parent=parent) List user's scores @@ -2026,12 +1757,11 @@ Get the list of public scores owned by a User. **DEPRECATED**: Please note that * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2043,48 +1773,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - user = "user_example" # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) + api_instance = flat_api.ScoreApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - # example passing only required values which don't have defaults set - try: - # List user's scores - api_response = api_instance.get_user_scores(user) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List user's scores api_response = api_instance.get_user_scores(user, parent=parent) + print("The response of ScoreApi->get_user_scores:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->get_user_scores: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -2095,7 +1814,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2106,7 +1824,7 @@ Name | Type | Description | Notes [[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) # **list_score_tracks** -> [ScoreTrack] list_score_tracks(score) +> List[ScoreTrack] list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) List the audio or video tracks linked to a score @@ -2115,12 +1833,11 @@ List the audio or video tracks linked to a score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_track import ScoreTrack +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2132,52 +1849,41 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). - sharing_key = "sharingKey_example" # str | 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) - assignment = "assignment_example" # str | An assignment id with which all the tracks returned will be related to (optional) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). + sharing_key = 'sharing_key_example' # str | 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) + assignment = 'assignment_example' # str | An assignment id with which all the tracks returned will be related to (optional) list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) - # example passing only required values which don't have defaults set - try: - # List the audio or video tracks linked to a score - api_response = api_instance.list_score_tracks(score) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List the audio or video tracks linked to a score api_response = api_instance.list_score_tracks(score, sharing_key=sharing_key, assignment=assignment, list_auto_track=list_auto_track) + print("The response of ScoreApi->list_score_tracks:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->list_score_tracks: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | - **sharing_key** | **str**| 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] - **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] - **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] + **score** | **str**| 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`). | + **sharing_key** | **str**| 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] + **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] + **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] ### Return type -[**[ScoreTrack]**](ScoreTrack.md) +[**List[ScoreTrack]**](ScoreTrack.md) ### Authorization @@ -2188,7 +1894,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2201,7 +1906,7 @@ Name | Type | Description | Notes [[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) # **mark_score_comment_resolved** -> mark_score_comment_resolved(score, comment) +> mark_score_comment_resolved(score, comment, sharing_key=sharing_key) Mark the comment as resolved @@ -2210,11 +1915,10 @@ Mark the comment as resolved * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2226,44 +1930,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Mark the comment as resolved - api_instance.mark_score_comment_resolved(score, comment) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Mark the comment as resolved api_instance.mark_score_comment_resolved(score, comment, sharing_key=sharing_key) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->mark_score_comment_resolved: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] ### Return type @@ -2278,7 +1971,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2291,7 +1983,7 @@ void (empty response body) [[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) # **mark_score_comment_unresolved** -> mark_score_comment_unresolved(score, comment) +> mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) Mark the comment as unresolved @@ -2300,11 +1992,10 @@ Mark the comment as unresolved * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2316,44 +2007,33 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment - sharing_key = "sharingKey_example" # str | 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) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - try: - # Mark the comment as unresolved - api_instance.mark_score_comment_unresolved(score, comment) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # Mark the comment as unresolved api_instance.mark_score_comment_unresolved(score, comment, sharing_key=sharing_key) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->mark_score_comment_unresolved: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **sharing_key** | **str**| 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] ### Return type @@ -2368,7 +2048,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2381,7 +2060,7 @@ void (empty response body) [[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) # **post_score_comment** -> ScoreComment post_score_comment(score, body) +> ScoreComment post_score_comment(score, body, sharing_key=sharing_key) Post a new comment @@ -2392,13 +2071,12 @@ Post a document or a contextualized comment on a document. Please note that thi * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_comment import ScoreComment +from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2410,66 +2088,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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 = ScoreCommentCreation( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - mentions=[ - "mentions_example", - ], - reply_to="reply_to_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example", - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) # ScoreCommentCreation | - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Post a new comment - api_response = api_instance.post_score_comment(score, body) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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_api.ScoreCommentCreation() # ScoreCommentCreation | + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Post a new comment api_response = api_instance.post_score_comment(score, body, sharing_key=sharing_key) + print("The response of ScoreApi->post_score_comment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->post_score_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | [**ScoreCommentCreation**](ScoreCommentCreation.md)| | + **sharing_key** | **str**| 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] ### Return type @@ -2484,7 +2131,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2509,11 +2155,10 @@ Remove the specified collaborator from the score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2525,34 +2170,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - # example passing only required values which don't have defaults set try: # Delete a collaborator api_instance.remove_score_collaborator(score, collaborator) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | + **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | ### Return type @@ -2567,7 +2209,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2591,11 +2232,10 @@ This method will remove the score from the `trash` collection and from the delet * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2607,32 +2247,29 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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`). + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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`). - # example passing only required values which don't have defaults set try: # Untrash a score api_instance.untrash_score(score) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->untrash_score: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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`). | + **score** | **str**| 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`). | ### Return type @@ -2647,7 +2284,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2660,7 +2296,7 @@ void (empty response body) [[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) # **update_score_comment** -> ScoreComment update_score_comment(score, comment, body) +> ScoreComment update_score_comment(score, comment, body, sharing_key=sharing_key) Update an existing comment @@ -2669,13 +2305,12 @@ Update an existing comment * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_comment import ScoreComment -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_comment_update import ScoreCommentUpdate +from flat_api.models.score_comment import ScoreComment +from flat_api.models.score_comment_update import ScoreCommentUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2687,64 +2322,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a sheet music comment - body = ScoreCommentUpdate( - revision="revision_example", - comment="comment_example", - raw_comment="raw_comment_example", - context=ScoreCommentContext( - part_uuid="part_uuid_example", - staff_idx=3.14, - staff_uuid="staff_uuid_example", - measure_uuids=[ - "measure_uuids_example", - ], - start_time_pos=3.14, - stop_time_pos=3.14, - start_dpq=3.14, - stop_dpq=3.14, - ), - ) # ScoreCommentUpdate | - sharing_key = "sharingKey_example" # str | 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) - - # example passing only required values which don't have defaults set - try: - # Update an existing comment - api_response = api_instance.update_score_comment(score, comment, body) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment + body = flat_api.ScoreCommentUpdate() # ScoreCommentUpdate | + sharing_key = 'sharing_key_example' # str | 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) - # example passing only required values which don't have defaults set - # and optional values try: # Update an existing comment api_response = api_instance.update_score_comment(score, comment, body, sharing_key=sharing_key) + print("The response of ScoreApi->update_score_comment:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->update_score_comment: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | - **sharing_key** | **str**| 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] + **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **body** | [**ScoreCommentUpdate**](ScoreCommentUpdate.md)| | + **sharing_key** | **str**| 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] ### Return type @@ -2759,7 +2367,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2782,13 +2389,12 @@ Update an audio or video track linked to a score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import score_api -from flat_api.model.score_track import ScoreTrack -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_track_update import ScoreTrackUpdate +from flat_api.models.score_track import ScoreTrack +from flat_api.models.score_track_update import ScoreTrackUpdate +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -2800,48 +2406,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = score_api.ScoreApi(api_client) - score = "score_example" # str | 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" # str | Unique identifier of a score audio track - body = ScoreTrackUpdate( - title="title_example", - default=True, - state=ScoreTrackState("draft"), - synchronization_points=[ - ScoreTrackPoint( - type="measure", - measure_uuid="measure_uuid_example", - time=3.14, - ), - ], - ) # ScoreTrackUpdate | - - # example passing only required values which don't have defaults set + api_instance = flat_api.ScoreApi(api_client) + score = 'score_example' # str | 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' # str | Unique identifier of a score audio track + body = flat_api.ScoreTrackUpdate() # ScoreTrackUpdate | + try: # Update an audio or video track linked to a score api_response = api_instance.update_score_track(score, track, body) + print("The response of ScoreApi->update_score_track:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling ScoreApi->update_score_track: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **score** | **str**| 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** | **str**| Unique identifier of a score audio track | - **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | + **score** | **str**| 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** | **str**| Unique identifier of a score audio track | + **body** | [**ScoreTrackUpdate**](ScoreTrackUpdate.md)| | ### Return type @@ -2856,7 +2449,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/ScoreComment.md b/docs/ScoreComment.md index 68e3025..eeb7d29 100644 --- a/docs/ScoreComment.md +++ b/docs/ScoreComment.md @@ -3,6 +3,7 @@ Comment added on a sheet music ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The comment unique identifier | [optional] @@ -11,18 +12,34 @@ Name | Type | Description | Notes **score** | **str** | The unique identifier of the score where the comment was posted | [optional] **revision** | **str** | The unique identifier of revision the comment was posted | [optional] **reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**date** | **datetime** | The date when the comment was posted | [optional] +**var_date** | **datetime** | The date when the comment was posted | [optional] **modification_date** | **datetime** | The date of the last comment modification | [optional] **comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] **raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**mentions** | **[str]** | The list of user identifier mentioned on the score | [optional] +**mentions** | **List[str]** | The list of user identifier mentioned on the score | [optional] **resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] **resolved_by** | **str** | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] **moderation** | [**ScoreCommentModeration**](ScoreCommentModeration.md) | | [optional] **spam** | **bool** | `true if the message has been detected as spam and hidden from other users | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comment import ScoreComment + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreComment from a JSON string +score_comment_instance = ScoreComment.from_json(json) +# print the JSON string representation of the object +print ScoreComment.to_json() + +# convert the object into a dict +score_comment_dict = score_comment_instance.to_dict() +# create an instance of ScoreComment from a dict +score_comment_form_dict = score_comment.from_dict(score_comment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentContext.md b/docs/ScoreCommentContext.md index 59ecc15..db3aed3 100644 --- a/docs/ScoreCommentContext.md +++ b/docs/ScoreCommentContext.md @@ -3,18 +3,35 @@ The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **part_uuid** | **str** | The unique identifier (UUID) of the score part | -**measure_uuids** | **[str]** | The list of measure UUIds | +**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] +**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] +**measure_uuids** | **List[str]** | The list of measure UUIds | **start_time_pos** | **float** | | **stop_time_pos** | **float** | | **start_dpq** | **float** | | **stop_dpq** | **float** | | -**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] -**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comment_context import ScoreCommentContext + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCommentContext from a JSON string +score_comment_context_instance = ScoreCommentContext.from_json(json) +# print the JSON string representation of the object +print ScoreCommentContext.to_json() + +# convert the object into a dict +score_comment_context_dict = score_comment_context_instance.to_dict() +# create an instance of ScoreCommentContext from a dict +score_comment_context_form_dict = score_comment_context.from_dict(score_comment_context_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentCreation.md b/docs/ScoreCommentCreation.md index e1e893a..f9133da 100644 --- a/docs/ScoreCommentCreation.md +++ b/docs/ScoreCommentCreation.md @@ -3,16 +3,33 @@ Creation of a comment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | **revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] -**mentions** | **[str]** | The list of user identifiers mentioned in this comment | [optional] +**mentions** | **List[str]** | The list of user identifiers mentioned in this comment | [optional] **reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comment_creation import ScoreCommentCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCommentCreation from a JSON string +score_comment_creation_instance = ScoreCommentCreation.from_json(json) +# print the JSON string representation of the object +print ScoreCommentCreation.to_json() + +# convert the object into a dict +score_comment_creation_dict = score_comment_creation_instance.to_dict() +# create an instance of ScoreCommentCreation from a dict +score_comment_creation_form_dict = score_comment_creation.from_dict(score_comment_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentModeration.md b/docs/ScoreCommentModeration.md index b73a7a6..279922b 100644 --- a/docs/ScoreCommentModeration.md +++ b/docs/ScoreCommentModeration.md @@ -3,12 +3,29 @@ Information about the comment being moderated ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hidden** | **bool** | If true, this comment will be hidden from other users | [optional] **reason** | **str** | If the comment is hidden, the reason why this one has been moderated | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comment_moderation import ScoreCommentModeration + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCommentModeration from a JSON string +score_comment_moderation_instance = ScoreCommentModeration.from_json(json) +# print the JSON string representation of the object +print ScoreCommentModeration.to_json() + +# convert the object into a dict +score_comment_moderation_dict = score_comment_moderation_instance.to_dict() +# create an instance of ScoreCommentModeration from a dict +score_comment_moderation_form_dict = score_comment_moderation.from_dict(score_comment_moderation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentUpdate.md b/docs/ScoreCommentUpdate.md index e999440..87f4673 100644 --- a/docs/ScoreCommentUpdate.md +++ b/docs/ScoreCommentUpdate.md @@ -3,14 +3,31 @@ Update of a comment ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] **comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comment_update import ScoreCommentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCommentUpdate from a JSON string +score_comment_update_instance = ScoreCommentUpdate.from_json(json) +# print the JSON string representation of the object +print ScoreCommentUpdate.to_json() + +# convert the object into a dict +score_comment_update_dict = score_comment_update_instance.to_dict() +# create an instance of ScoreCommentUpdate from a dict +score_comment_update_form_dict = score_comment_update.from_dict(score_comment_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentsCounts.md b/docs/ScoreCommentsCounts.md index 6460e81..6c8117f 100644 --- a/docs/ScoreCommentsCounts.md +++ b/docs/ScoreCommentsCounts.md @@ -3,14 +3,31 @@ A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **float** | The total number of comments added to the score | [optional] **unique** | **float** | The unique (1/user) number of comments added to the score | [optional] **weekly** | **float** | The weekly unique number of comments added to the score | [optional] **monthly** | **float** | The monthly unique number of comments added to the score | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_comments_counts import ScoreCommentsCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCommentsCounts from a JSON string +score_comments_counts_instance = ScoreCommentsCounts.from_json(json) +# print the JSON string representation of the object +print ScoreCommentsCounts.to_json() + +# convert the object into a dict +score_comments_counts_dict = score_comments_counts_instance.to_dict() +# create an instance of ScoreCommentsCounts from a dict +score_comments_counts_form_dict = score_comments_counts.from_dict(score_comments_counts_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreation.md b/docs/ScoreCreation.md index 4eb4915..1760f2c 100644 --- a/docs/ScoreCreation.md +++ b/docs/ScoreCreation.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] @@ -11,10 +12,26 @@ Name | Type | Description | Notes **builder_data** | [**ScoreCreationBuilderData**](ScoreCreationBuilderData.md) | | [optional] **filename** | **str** | If this is an imported file, its filename | [optional] **data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] -**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] if omitted the server will use the default value of "base64" +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] **source** | [**ScoreSource**](ScoreSource.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_creation import ScoreCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreation from a JSON string +score_creation_instance = ScoreCreation.from_json(json) +# print the JSON string representation of the object +print ScoreCreation.to_json() + +# convert the object into a dict +score_creation_dict = score_creation_instance.to_dict() +# create an instance of ScoreCreation from a dict +score_creation_form_dict = score_creation.from_dict(score_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md index 6d62a06..865b4f2 100644 --- a/docs/ScoreCreationBuilderData.md +++ b/docs/ScoreCreationBuilderData.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | **layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderData from a JSON string +score_creation_builder_data_instance = ScoreCreationBuilderData.from_json(json) +# print the JSON string representation of the object +print ScoreCreationBuilderData.to_json() + +# convert the object into a dict +score_creation_builder_data_dict = score_creation_builder_data_instance.to_dict() +# create an instance of ScoreCreationBuilderData from a dict +score_creation_builder_data_form_dict = score_creation_builder_data.from_dict(score_creation_builder_data_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/ScoreCreationBuilderDataLayoutData.md index 48c6dda..a67db30 100644 --- a/docs/ScoreCreationBuilderDataLayoutData.md +++ b/docs/ScoreCreationBuilderDataLayoutData.md @@ -3,18 +3,35 @@ Control the appearance of the score. If missing, default values are used. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **notes_spacing_coeff** | **float** | A float value >= 1 that controls the spacing between notes. | [optional] -**length_unit** | **str** | The unit to use for layout customizations | [optional] if omitted the server will use the default value of "cm" +**length_unit** | **str** | The unit to use for layout customizations | [optional] [default to 'cm'] **page_height** | **float** | The height of the page in chosen unit (`lengthUnit`). | [optional] **page_width** | **float** | The width of the page in chosen unit (`lengthUnit`). | [optional] **page_margin_top** | **float** | The top margin of the page in chosen unit (`lengthUnit`). | [optional] **page_margin_bottom** | **float** | The bottom margin of the page in chosen unit (`lengthUnit`). | [optional] **page_margin_left** | **float** | The left margin of the page in chosen unit (`lengthUnit`). | [optional] **page_margin_right** | **float** | The right margin of the page in chosen unit (`lengthUnit`). | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataLayoutData from a JSON string +score_creation_builder_data_layout_data_instance = ScoreCreationBuilderDataLayoutData.from_json(json) +# print the JSON string representation of the object +print ScoreCreationBuilderDataLayoutData.to_json() + +# convert the object into a dict +score_creation_builder_data_layout_data_dict = score_creation_builder_data_layout_data_instance.to_dict() +# create an instance of ScoreCreationBuilderDataLayoutData from a dict +score_creation_builder_data_layout_data_form_dict = score_creation_builder_data_layout_data.from_dict(score_creation_builder_data_layout_data_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md index 16eb3de..b027f63 100644 --- a/docs/ScoreCreationBuilderDataScoreData.md +++ b/docs/ScoreCreationBuilderDataScoreData.md @@ -2,16 +2,33 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**instruments** | [**[ScoreCreationBuilderDataScoreDataInstrumentsInner]**](ScoreCreationBuilderDataScoreDataInstrumentsInner.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | **use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] **use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] **fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] **nb_beats** | **float** | The number of beats in the measure | [optional] **beat_type** | **float** | The duration of a beat in the measure | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**instruments** | [**List[ScoreCreationBuilderDataScoreDataInstrumentsInner]**](ScoreCreationBuilderDataScoreDataInstrumentsInner.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | + +## Example + +```python +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataScoreData from a JSON string +score_creation_builder_data_score_data_instance = ScoreCreationBuilderDataScoreData.from_json(json) +# print the JSON string representation of the object +print ScoreCreationBuilderDataScoreData.to_json() +# convert the object into a dict +score_creation_builder_data_score_data_dict = score_creation_builder_data_score_data_instance.to_dict() +# create an instance of ScoreCreationBuilderDataScoreData from a dict +score_creation_builder_data_score_data_form_dict = score_creation_builder_data_score_data.from_dict(score_creation_builder_data_score_data_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md b/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md index 8c1ed32..7d0e25c 100644 --- a/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md +++ b/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | @@ -9,8 +10,24 @@ Name | Type | Description | Notes **long_name** | **str** | The full name of the instrument | [optional] **short_name** | **str** | The abbreviation of the name of the instrument | [optional] **has_quarter_tone** | **bool** | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a JSON string +score_creation_builder_data_score_data_instruments_inner_instance = ScoreCreationBuilderDataScoreDataInstrumentsInner.from_json(json) +# print the JSON string representation of the object +print ScoreCreationBuilderDataScoreDataInstrumentsInner.to_json() + +# convert the object into a dict +score_creation_builder_data_score_data_instruments_inner_dict = score_creation_builder_data_score_data_instruments_inner_instance.to_dict() +# create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a dict +score_creation_builder_data_score_data_instruments_inner_form_dict = score_creation_builder_data_score_data_instruments_inner.from_dict(score_creation_builder_data_score_data_instruments_inner_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreationType.md b/docs/ScoreCreationType.md index 97cdd97..62ce471 100644 --- a/docs/ScoreCreationType.md +++ b/docs/ScoreCreationType.md @@ -3,9 +3,9 @@ The type of creation (an orginal, an arrangement) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The type of creation (an orginal, an arrangement) | must be one of ["original", "arrangement", "other", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreDetails.md b/docs/ScoreDetails.md index 0a44bcd..dc11ce5 100644 --- a/docs/ScoreDetails.md +++ b/docs/ScoreDetails.md @@ -2,43 +2,62 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score | [optional] +**id** | **str** | The unique identifier of the score | **sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] -**title** | **str** | The title of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] -**html_url** | **str** | The url where the score can be viewed in a web browser | [optional] +**title** | **str** | The title of the score | +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | +**user** | [**UserPublic**](UserPublic.md) | | +**html_url** | **str** | The url where the score can be viewed in a web browser | **subtitle** | **str** | Subtitle of the score | [optional] **lyricist** | **str** | Lyricist of the score | [optional] **arranger** | **str** | Arranger of the score | [optional] **composer** | **str** | Composer of the score | [optional] **description** | **str** | Description of the creation | [optional] -**tags** | **[str]** | Tags describing the score | [optional] +**tags** | **List[str]** | Tags describing the score | [optional] **creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] **license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] **license_text** | **str** | Additional license text written on the exported/printed score | [optional] **duration_time** | **float** | In seconds, an approximative duration of the score | [optional] **number_measures** | **int** | The number of measures in the score | [optional] **main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] +**main_key_signature** | **float** | The main key signature of the score (expressed between -7 and 7). | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**collaborators** | [**[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] +**collaborators** | [**List[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] **creation_date** | **datetime** | The date when the score was created | [optional] **modification_date** | **datetime** | The date of the last revision of the score | [optional] **publication_date** | **datetime** | The date when the score was published on Flat | [optional] +**highlighted_date** | **datetime** | The date when the score was highlighted (featured) on our community | [optional] **organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] **parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] -**instruments** | **[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**samples** | **[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] +**instruments** | **List[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**samples** | **List[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] **google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] **likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] **comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] **views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] **plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] -**collections** | **[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] + +## Example + +```python +from flat_api.models.score_details import ScoreDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreDetails from a JSON string +score_details_instance = ScoreDetails.from_json(json) +# print the JSON string representation of the object +print ScoreDetails.to_json() +# convert the object into a dict +score_details_dict = score_details_instance.to_dict() +# create an instance of ScoreDetails from a dict +score_details_form_dict = score_details.from_dict(score_details_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreFork.md b/docs/ScoreFork.md index b4d68e3..da7055f 100644 --- a/docs/ScoreFork.md +++ b/docs/ScoreFork.md @@ -3,12 +3,30 @@ Options to fork the score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collection** | **str, none_type** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] if omitted the server will use the default value of "root" +**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] [default to 'root'] +**google_drive_disabled** | **bool** | If set to `true`, the API won't create the score on Google Drive | [optional] [default to False] **keep_original_title** | **bool** | Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_fork import ScoreFork + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreFork from a JSON string +score_fork_instance = ScoreFork.from_json(json) +# print the JSON string representation of the object +print ScoreFork.to_json() + +# convert the object into a dict +score_fork_dict = score_fork_instance.to_dict() +# create an instance of ScoreFork from a dict +score_fork_form_dict = score_fork.from_dict(score_fork_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreLicense.md b/docs/ScoreLicense.md index f90ab0a..4e42188 100644 --- a/docs/ScoreLicense.md +++ b/docs/ScoreLicense.md @@ -3,9 +3,9 @@ License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ | must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreLikesCounts.md b/docs/ScoreLikesCounts.md index 7841287..40aad8e 100644 --- a/docs/ScoreLikesCounts.md +++ b/docs/ScoreLikesCounts.md @@ -3,13 +3,30 @@ A computed version of the weekly, monthly and total of number of likes for a score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **float** | The total number of likes of the score | [optional] -**weekly** | **float** | The number of new likes during the last week | [optional] -**monthly** | **float** | The number of new likes during the last month | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**total** | **float** | The total number of likes of the score | [default to 0] +**weekly** | **float** | The number of new likes during the last week | [default to 0] +**monthly** | **float** | The number of new likes during the last month | [default to 0] + +## Example + +```python +from flat_api.models.score_likes_counts import ScoreLikesCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreLikesCounts from a JSON string +score_likes_counts_instance = ScoreLikesCounts.from_json(json) +# print the JSON string representation of the object +print ScoreLikesCounts.to_json() +# convert the object into a dict +score_likes_counts_dict = score_likes_counts_instance.to_dict() +# create an instance of ScoreLikesCounts from a dict +score_likes_counts_form_dict = score_likes_counts.from_dict(score_likes_counts_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreModification.md b/docs/ScoreModification.md index cac81cd..ec46914 100644 --- a/docs/ScoreModification.md +++ b/docs/ScoreModification.md @@ -3,6 +3,7 @@ Edit the score metadata ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the score | [optional] @@ -13,12 +14,28 @@ Name | Type | Description | Notes **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] **sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] **description** | **str** | Description of the creation | [optional] -**tags** | **[str]** | Tags describing the score | [optional] +**tags** | **List[str]** | Tags describing the score | [optional] **creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] **license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] **license_text** | **str** | The rights info written on the score | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_modification import ScoreModification + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreModification from a JSON string +score_modification_instance = ScoreModification.from_json(json) +# print the JSON string representation of the object +print ScoreModification.to_json() + +# convert the object into a dict +score_modification_dict = score_modification_instance.to_dict() +# create an instance of ScoreModification from a dict +score_modification_form_dict = score_modification.from_dict(score_modification_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorePlaysCounts.md b/docs/ScorePlaysCounts.md index 7ae8ac7..f05b4a8 100644 --- a/docs/ScorePlaysCounts.md +++ b/docs/ScorePlaysCounts.md @@ -3,13 +3,30 @@ A computed version of the total, weekly, and monthly number of plays of the score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **float** | The total number of plays of the score | [optional] **weekly** | **float** | The weekly number of plays of the score | [optional] **monthly** | **float** | The monthly number of plays of the score | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_plays_counts import ScorePlaysCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of ScorePlaysCounts from a JSON string +score_plays_counts_instance = ScorePlaysCounts.from_json(json) +# print the JSON string representation of the object +print ScorePlaysCounts.to_json() + +# convert the object into a dict +score_plays_counts_dict = score_plays_counts_instance.to_dict() +# create an instance of ScorePlaysCounts from a dict +score_plays_counts_form_dict = score_plays_counts.from_dict(score_plays_counts_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorePrivacy.md b/docs/ScorePrivacy.md index 6334998..7eed374 100644 --- a/docs/ScorePrivacy.md +++ b/docs/ScorePrivacy.md @@ -3,9 +3,9 @@ The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). | defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevision.md b/docs/ScoreRevision.md index aae6257..faa9878 100644 --- a/docs/ScoreRevision.md +++ b/docs/ScoreRevision.md @@ -3,18 +3,35 @@ A score revision metadata ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the revision. | [optional] **user** | **str** | The user identifier who created the revision | [optional] -**collaborators** | **[str]** | | [optional] +**collaborators** | **List[str]** | | [optional] **creation_date** | **datetime** | The date when this revision was created | [optional] **event** | **str** | The last event (action id) of the revision | [optional] **description** | **str** | A description associated to the revision | [optional] **autosave** | **bool** | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] **statistics** | [**ScoreRevisionStatistics**](ScoreRevisionStatistics.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_revision import ScoreRevision + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreRevision from a JSON string +score_revision_instance = ScoreRevision.from_json(json) +# print the JSON string representation of the object +print ScoreRevision.to_json() + +# convert the object into a dict +score_revision_dict = score_revision_instance.to_dict() +# create an instance of ScoreRevision from a dict +score_revision_form_dict = score_revision.from_dict(score_revision_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevisionCreation.md b/docs/ScoreRevisionCreation.md index 2b112d4..05b9b6e 100644 --- a/docs/ScoreRevisionCreation.md +++ b/docs/ScoreRevisionCreation.md @@ -3,14 +3,31 @@ A new created revision ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | -**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] if omitted the server will use the default value of "base64" +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] **autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] **description** | **str** | A description associated to the revision | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_revision_creation import ScoreRevisionCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreRevisionCreation from a JSON string +score_revision_creation_instance = ScoreRevisionCreation.from_json(json) +# print the JSON string representation of the object +print ScoreRevisionCreation.to_json() + +# convert the object into a dict +score_revision_creation_dict = score_revision_creation_instance.to_dict() +# create an instance of ScoreRevisionCreation from a dict +score_revision_creation_form_dict = score_revision_creation.from_dict(score_revision_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevisionStatistics.md b/docs/ScoreRevisionStatistics.md index c3e7224..aec7fc7 100644 --- a/docs/ScoreRevisionStatistics.md +++ b/docs/ScoreRevisionStatistics.md @@ -3,14 +3,31 @@ The statistics related to the score revision (additions and deletions) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **additions** | **float** | The number of additions operations in the last revision | [optional] **deletions** | **float** | The number of deletions operations in the last revision | [optional] **start_date** | **datetime** | The date of the first action included in this revision | [optional] **end_date** | **datetime** | The date of the latest action included in this revision | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreRevisionStatistics from a JSON string +score_revision_statistics_instance = ScoreRevisionStatistics.from_json(json) +# print the JSON string representation of the object +print ScoreRevisionStatistics.to_json() + +# convert the object into a dict +score_revision_statistics_dict = score_revision_statistics_instance.to_dict() +# create an instance of ScoreRevisionStatistics from a dict +score_revision_statistics_form_dict = score_revision_statistics.from_dict(score_revision_statistics_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreSource.md b/docs/ScoreSource.md index bdee9f6..794a423 100644 --- a/docs/ScoreSource.md +++ b/docs/ScoreSource.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **google_drive** | **str** | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_source import ScoreSource + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreSource from a JSON string +score_source_instance = ScoreSource.from_json(json) +# print the JSON string representation of the object +print ScoreSource.to_json() + +# convert the object into a dict +score_source_dict = score_source_instance.to_dict() +# create an instance of ScoreSource from a dict +score_source_form_dict = score_source.from_dict(score_source_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrack.md b/docs/ScoreTrack.md index ef739fc..7113f3e 100644 --- a/docs/ScoreTrack.md +++ b/docs/ScoreTrack.md @@ -3,22 +3,40 @@ An audio track for a score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the score track | [optional] +**id** | **str** | The unique identifier of the score track | **title** | **str** | Title of the track | [optional] -**score** | **str** | The unique identifier of the score | [optional] -**creator** | **str** | The unique identifier of the track creator | [optional] -**creation_date** | **datetime** | The creation date of the track | [optional] -**modification_date** | **datetime** | The modification date of the track | [optional] -**default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**type** | [**ScoreTrackType**](ScoreTrackType.md) | | [optional] +**score** | **str** | The unique identifier of the score | +**creator** | **str** | The unique identifier of the track creator | +**creation_date** | **datetime** | The creation date of the track | +**modification_date** | **datetime** | The modification date of the track | +**default** | **bool** | True if the track should be used as default audio source | +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | +**type** | [**ScoreTrackType**](ScoreTrackType.md) | | +**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | **url** | **str** | The URL of the track | [optional] **media_id** | **str** | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] -**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] + +## Example + +```python +from flat_api.models.score_track import ScoreTrack + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreTrack from a JSON string +score_track_instance = ScoreTrack.from_json(json) +# print the JSON string representation of the object +print ScoreTrack.to_json() +# convert the object into a dict +score_track_dict = score_track_instance.to_dict() +# create an instance of ScoreTrack from a dict +score_track_form_dict = score_track.from_dict(score_track_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackCreation.md b/docs/ScoreTrackCreation.md index fbe0978..f07feb4 100644 --- a/docs/ScoreTrackCreation.md +++ b/docs/ScoreTrackCreation.md @@ -3,15 +3,33 @@ Creation of a new track. This one must contain the URL of the track or the corresponding file ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the track | [optional] **default** | **bool** | True if the track should be used as default audio source | [optional] **state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | [optional] **url** | **str** | The URL of the track | [optional] -**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] + +## Example + +```python +from flat_api.models.score_track_creation import ScoreTrackCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreTrackCreation from a JSON string +score_track_creation_instance = ScoreTrackCreation.from_json(json) +# print the JSON string representation of the object +print ScoreTrackCreation.to_json() +# convert the object into a dict +score_track_creation_dict = score_track_creation_instance.to_dict() +# create an instance of ScoreTrackCreation from a dict +score_track_creation_form_dict = score_track_creation.from_dict(score_track_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackPoint.md b/docs/ScoreTrackPoint.md index 722ee33..b817616 100644 --- a/docs/ScoreTrackPoint.md +++ b/docs/ScoreTrackPoint.md @@ -3,13 +3,30 @@ A track synchronization point ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | -**time** | **float** | The corresponding time in seconds | **measure_uuid** | **str** | The measure unique identifier | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**time** | **float** | The corresponding time in seconds | + +## Example + +```python +from flat_api.models.score_track_point import ScoreTrackPoint + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreTrackPoint from a JSON string +score_track_point_instance = ScoreTrackPoint.from_json(json) +# print the JSON string representation of the object +print ScoreTrackPoint.to_json() +# convert the object into a dict +score_track_point_dict = score_track_point_instance.to_dict() +# create an instance of ScoreTrackPoint from a dict +score_track_point_form_dict = score_track_point.from_dict(score_track_point_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduSkillsFocused.md b/docs/ScoreTrackPurpose.md similarity index 65% rename from docs/EduSkillsFocused.md rename to docs/ScoreTrackPurpose.md index 1caa654..f7747e0 100644 --- a/docs/EduSkillsFocused.md +++ b/docs/ScoreTrackPurpose.md @@ -1,11 +1,11 @@ -# EduSkillsFocused +# ScoreTrackPurpose -Specific skills that will be focused in classroom +The purpose of the audio track ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **[str]** | Specific skills that will be focused in classroom | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackState.md b/docs/ScoreTrackState.md index df39241..8aa8259 100644 --- a/docs/ScoreTrackState.md +++ b/docs/ScoreTrackState.md @@ -3,9 +3,9 @@ State of the track ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | State of the track | defaults to "draft", must be one of ["draft", "completed", "deleted", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackType.md b/docs/ScoreTrackType.md index e4f2298..a975b2c 100644 --- a/docs/ScoreTrackType.md +++ b/docs/ScoreTrackType.md @@ -3,9 +3,9 @@ The type of an audio track ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | The type of an audio track | must be one of ["audio", "soundcloud", "youtube", "vimeo", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackUpdate.md b/docs/ScoreTrackUpdate.md index 62d9c95..d734275 100644 --- a/docs/ScoreTrackUpdate.md +++ b/docs/ScoreTrackUpdate.md @@ -3,14 +3,31 @@ Update an existing track. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the track | [optional] **default** | **bool** | True if the track should be used as default audio source | [optional] **state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**synchronization_points** | [**[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] + +## Example + +```python +from flat_api.models.score_track_update import ScoreTrackUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreTrackUpdate from a JSON string +score_track_update_instance = ScoreTrackUpdate.from_json(json) +# print the JSON string representation of the object +print ScoreTrackUpdate.to_json() +# convert the object into a dict +score_track_update_dict = score_track_update_instance.to_dict() +# create an instance of ScoreTrackUpdate from a dict +score_track_update_form_dict = score_track_update.from_dict(score_track_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreViewsCounts.md b/docs/ScoreViewsCounts.md index 48b3403..5988f15 100644 --- a/docs/ScoreViewsCounts.md +++ b/docs/ScoreViewsCounts.md @@ -3,13 +3,30 @@ A computed version of the total, weekly, and monthly number of views of the score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **float** | The total number of views of the score | [optional] **weekly** | **float** | The weekly number of views of the score | [optional] **monthly** | **float** | The monthly number of views of the score | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.score_views_counts import ScoreViewsCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreViewsCounts from a JSON string +score_views_counts_instance = ScoreViewsCounts.from_json(json) +# print the JSON string representation of the object +print ScoreViewsCounts.to_json() + +# convert the object into a dict +score_views_counts_dict = score_views_counts_instance.to_dict() +# create an instance of ScoreViewsCounts from a dict +score_views_counts_form_dict = score_views_counts.from_dict(score_views_counts_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Task.md b/docs/Task.md index 9ba61fa..c156d1c 100644 --- a/docs/Task.md +++ b/docs/Task.md @@ -3,11 +3,12 @@ An asynchronous task ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the task | [optional] +**id** | **str** | Unique identifier of the task | **type** | **str** | Type of the task (e.g. audio-export) | [optional] -**state** | **str** | State of the Task | [optional] +**state** | **str** | State of the Task | **format** | **str** | For files processing, the file format (e.g. `mp3`, `wav`) | [optional] **score** | **str** | The score unique identifier for tasks related to scores | [optional] **progress** | [**TaskProgress**](TaskProgress.md) | | [optional] @@ -15,9 +16,25 @@ Name | Type | Description | Notes **modification_date** | **datetime** | The last modification date of the task | [optional] **done_date** | **datetime** | The date when the task has been completed | [optional] **result** | [**TaskResult**](TaskResult.md) | | [optional] -**error_history** | **[str]** | If any errors happened when processing this task, the list of errors identifiers | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**error_history** | **List[str]** | If any errors happened when processing this task, the list of errors identifiers | [optional] + +## Example + +```python +from flat_api.models.task import Task + +# TODO update the JSON string below +json = "{}" +# create an instance of Task from a JSON string +task_instance = Task.from_json(json) +# print the JSON string representation of the object +print Task.to_json() +# convert the object into a dict +task_dict = task_instance.to_dict() +# create an instance of Task from a dict +task_form_dict = task.from_dict(task_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskApi.md b/docs/TaskApi.md index 75b52e5..29bdcf5 100644 --- a/docs/TaskApi.md +++ b/docs/TaskApi.md @@ -19,12 +19,11 @@ This method can be used to follow a task progression, for example while a score * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import task_api -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task +from flat_api.models.task import Task +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -36,33 +35,31 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = task_api.TaskApi(api_client) - task = "task_example" # str | Unique identifier for the task + api_instance = flat_api.TaskApi(api_client) + task = 'task_example' # str | Unique identifier for the task - # example passing only required values which don't have defaults set try: # Get a task details api_response = api_instance.get_task(task) + print("The response of TaskApi->get_task:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling TaskApi->get_task: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **task** | **str**| Unique identifier for the task | + **task** | **str**| Unique identifier for the task | ### Return type @@ -77,7 +74,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/TaskExportOptions.md b/docs/TaskExportOptions.md index 990ab94..1c60b2f 100644 --- a/docs/TaskExportOptions.md +++ b/docs/TaskExportOptions.md @@ -3,11 +3,28 @@ Options for the requested export ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**parts** | **[str]** | A list of parts to specifically export | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**parts** | **List[str]** | A list of parts to specifically export | [optional] + +## Example + +```python +from flat_api.models.task_export_options import TaskExportOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskExportOptions from a JSON string +task_export_options_instance = TaskExportOptions.from_json(json) +# print the JSON string representation of the object +print TaskExportOptions.to_json() +# convert the object into a dict +task_export_options_dict = task_export_options_instance.to_dict() +# create an instance of TaskExportOptions from a dict +task_export_options_form_dict = task_export_options.from_dict(task_export_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskProgress.md b/docs/TaskProgress.md index eadbe1d..2846d7e 100644 --- a/docs/TaskProgress.md +++ b/docs/TaskProgress.md @@ -3,12 +3,29 @@ Details about the task progression ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **percent** | **float** | Percent of the task progression | [optional] **text** | **str** | Text details of the task progress | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.task_progress import TaskProgress + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskProgress from a JSON string +task_progress_instance = TaskProgress.from_json(json) +# print the JSON string representation of the object +print TaskProgress.to_json() + +# convert the object into a dict +task_progress_dict = task_progress_instance.to_dict() +# create an instance of TaskProgress from a dict +task_progress_form_dict = task_progress.from_dict(task_progress_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskResult.md b/docs/TaskResult.md index 95505a8..bc2cebd 100644 --- a/docs/TaskResult.md +++ b/docs/TaskResult.md @@ -3,12 +3,29 @@ Optional result information about this task ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | URL returned by the task worker | [optional] **error** | **str** | Error returned by task worker | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.task_result import TaskResult + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskResult from a JSON string +task_result_instance = TaskResult.from_json(json) +# print the JSON string representation of the object +print TaskResult.to_json() + +# convert the object into a dict +task_result_dict = task_result_instance.to_dict() +# create an instance of TaskResult from a dict +task_result_form_dict = task_result.from_dict(task_result_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TutteoProduct.md b/docs/TutteoProduct.md new file mode 100644 index 0000000..355771f --- /dev/null +++ b/docs/TutteoProduct.md @@ -0,0 +1,12 @@ +# TutteoProduct + +The Tutteo product used by the user account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAdminUpdate.md b/docs/UserAdminUpdate.md index 75c06f7..c754b5b 100644 --- a/docs/UserAdminUpdate.md +++ b/docs/UserAdminUpdate.md @@ -3,6 +3,7 @@ User update as an organization admin ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **password** | **str** | Password of the account | [optional] @@ -11,8 +12,24 @@ Name | Type | Description | Notes **firstname** | **str** | First name of the user | [optional] **lastname** | **str** | Last name of the user | [optional] **email** | **str** | Email of the account | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_admin_update import UserAdminUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAdminUpdate from a JSON string +user_admin_update_instance = UserAdminUpdate.from_json(json) +# print the JSON string representation of the object +print UserAdminUpdate.to_json() + +# convert the object into a dict +user_admin_update_dict = user_admin_update_instance.to_dict() +# create an instance of UserAdminUpdate from a dict +user_admin_update_form_dict = user_admin_update.from_dict(user_admin_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/UserApi.md index d9496cb..b0897be 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -4,27 +4,28 @@ All URIs are relative to *https://api.flat.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ger_user_likes**](UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores [**get_user**](UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile +[**get_user_likes**](UserApi.md#get_user_likes) | **GET** /users/{user}/likes | List liked scores [**get_user_scores**](UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores -# **ger_user_likes** -> [ScoreDetails] ger_user_likes(user) +# **get_user** +> UserPublic get_user(user) -List liked scores +Get a public user profile + +Get a profile of a Flat or Flat for Education User. ### Example * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import user_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.user_public import UserPublic +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -36,48 +37,35 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - user = "user_example" # str | 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 (optional) - - # example passing only required values which don't have defaults set - try: - # List liked scores - api_response = api_instance.ger_user_likes(user) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. - # example passing only required values which don't have defaults set - # and optional values try: - # List liked scores - api_response = api_instance.ger_user_likes(user, ids=ids) + # Get a public user profile + api_response = api_instance.get_user(user) + print("The response of UserApi->get_user:\n") pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->ger_user_likes: %s\n" % e) + except Exception as e: + print("Exception when calling UserApi->get_user: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| 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] + **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**UserPublic**](UserPublic.md) ### Authorization @@ -88,34 +76,30 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List of liked scores | - | +**200** | The user public details | - | **0** | Error | - | [[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) -# **get_user** -> UserPublic get_user(user) - -Get a public user profile +# **get_user_likes** +> List[ScoreDetails] get_user_likes(user, next=next, previous=previous, limit=limit, ids=ids) -Get a profile of a Flat or Flat for Education User. +List liked scores ### Example * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import user_api -from flat_api.model.user_public import UserPublic -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -127,37 +111,43 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - user = "user_example" # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + ids = True # bool | Return only the identifiers of the scores (optional) - # example passing only required values which don't have defaults set try: - # Get a public user profile - api_response = api_instance.get_user(user) + # List liked scores + api_response = api_instance.get_user_likes(user, next=next, previous=previous, limit=limit, ids=ids) + print("The response of UserApi->get_user_likes:\n") pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->get_user: %s\n" % e) + except Exception as e: + print("Exception when calling UserApi->get_user_likes: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **ids** | **bool**| Return only the identifiers of the scores | [optional] ### Return type -[**UserPublic**](UserPublic.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -168,18 +158,17 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The user public details | - | +**200** | List of liked scores | - | **0** | Error | - | [[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) # **get_user_scores** -> [ScoreDetails] get_user_scores(user) +> List[ScoreDetails] get_user_scores(user, parent=parent) List user's scores @@ -190,12 +179,11 @@ Get the list of public scores owned by a User. **DEPRECATED**: Please note that * OAuth Authentication (OAuth2): ```python -import time import flat_api -from flat_api.api import user_api -from flat_api.model.score_details import ScoreDetails -from flat_api.model.flat_error_response import FlatErrorResponse +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://api.flat.io/v2 # See configuration.py for a list of all supported configuration parameters. configuration = flat_api.Configuration( @@ -207,48 +195,37 @@ configuration = flat_api.Configuration( # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure OAuth2 access token for authorization: OAuth2 -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' +configuration.access_token = os.environ["ACCESS_TOKEN"] # Enter a context with an instance of the API client with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - user = "user_example" # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - parent = "parent_example" # str | Filter the score forked from the score id `parent` (optional) - - # example passing only required values which don't have defaults set - try: - # List user's scores - api_response = api_instance.get_user_scores(user) - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling UserApi->get_user_scores: %s\n" % e) + api_instance = flat_api.UserApi(api_client) + user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. + parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List user's scores api_response = api_instance.get_user_scores(user, parent=parent) + print("The response of UserApi->get_user_scores:\n") pprint(api_response) - except flat_api.ApiException as e: + except Exception as e: print("Exception when calling UserApi->get_user_scores: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] ### Return type -[**[ScoreDetails]**](ScoreDetails.md) +[**List[ScoreDetails]**](ScoreDetails.md) ### Authorization @@ -259,7 +236,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | diff --git a/docs/UserAzureDetails.md b/docs/UserAzureDetails.md index 9d2cf4e..d3dc906 100644 --- a/docs/UserAzureDetails.md +++ b/docs/UserAzureDetails.md @@ -2,13 +2,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **oid** | **str** | User object identifier on Azure AD | [optional] **hd** | **str** | User tenant (domain name) | [optional] **preferred_username** | **str** | User Preferred Username (UPN), i.e. the main email of the user | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_azure_details import UserAzureDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAzureDetails from a JSON string +user_azure_details_instance = UserAzureDetails.from_json(json) +# print the JSON string representation of the object +print UserAzureDetails.to_json() + +# convert the object into a dict +user_azure_details_dict = user_azure_details_instance.to_dict() +# create an instance of UserAzureDetails from a dict +user_azure_details_form_dict = user_azure_details.from_dict(user_azure_details_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCommunityProfileLinks.md b/docs/UserCommunityProfileLinks.md index deb19d9..52f79a8 100644 --- a/docs/UserCommunityProfileLinks.md +++ b/docs/UserCommunityProfileLinks.md @@ -3,16 +3,33 @@ Social networks links ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spotify_url** | **str, none_type** | Spotify Profile URL | [optional] -**youtube_url** | **str, none_type** | YouTube channel URL | [optional] -**soundcloud_url** | **str, none_type** | SoundCloud Profile URL | [optional] -**tiktok_url** | **str, none_type** | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] -**instagram_url** | **str, none_type** | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] -**website_url** | **str, none_type** | Personnal website URL | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**spotify_url** | **str** | Spotify Profile URL | [optional] +**youtube_url** | **str** | YouTube channel URL | [optional] +**soundcloud_url** | **str** | SoundCloud Profile URL | [optional] +**tiktok_url** | **str** | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] +**instagram_url** | **str** | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] +**website_url** | **str** | Personnal website URL | [optional] + +## Example + +```python +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCommunityProfileLinks from a JSON string +user_community_profile_links_instance = UserCommunityProfileLinks.from_json(json) +# print the JSON string representation of the object +print UserCommunityProfileLinks.to_json() +# convert the object into a dict +user_community_profile_links_dict = user_community_profile_links_instance.to_dict() +# create an instance of UserCommunityProfileLinks from a dict +user_community_profile_links_form_dict = user_community_profile_links.from_dict(user_community_profile_links_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCreation.md b/docs/UserCreation.md index 773b5c1..62a38b8 100644 --- a/docs/UserCreation.md +++ b/docs/UserCreation.md @@ -3,17 +3,34 @@ User creation ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **str** | Username of the new account | -**password** | **str** | Password of the new account | **firstname** | **str** | First name of the user | [optional] **lastname** | **str** | Last name of the user | [optional] **email** | **str** | Email of the new account | [optional] +**password** | **str** | Password of the new account | **locale** | [**FlatLocales**](FlatLocales.md) | | [optional] -**role** | **str** | Role of the new account | [optional] if omitted the server will use the default value of "user" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**role** | **str** | Role of the new account | [optional] [default to 'user'] + +## Example + +```python +from flat_api.models.user_creation import UserCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCreation from a JSON string +user_creation_instance = UserCreation.from_json(json) +# print the JSON string representation of the object +print UserCreation.to_json() +# convert the object into a dict +user_creation_dict = user_creation_instance.to_dict() +# create an instance of UserCreation from a dict +user_creation_form_dict = user_creation.from_dict(user_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetails.md b/docs/UserDetails.md index ad073dd..393c52e 100644 --- a/docs/UserDetails.md +++ b/docs/UserDetails.md @@ -2,17 +2,19 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the user | [optional] -**type** | **str** | The type of account | [optional] -**username** | **str** | The user name (unique for the organization) | [optional] +**id** | **str** | The user unique identifier | +**type** | **str** | The type of user account | +**product** | [**TutteoProduct**](TutteoProduct.md) | | +**username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] **lastname** | **str** | Lastname of the user (for education users) | [optional] **name** | **str** | A displayable name for the user (for consumer users) | [optional] -**picture** | **str, none_type** | The URL of the picture to display | [optional] -**badges** | **[str]** | List of badges for the user profile | [optional] +**picture** | **str** | The URL of the picture to display | +**badges** | **List[str]** | List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` | [optional] **organization** | **str** | Organization ID (for Edu users only) | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] @@ -25,16 +27,32 @@ Name | Type | Description | Notes **owned_public_scores_count** | **int** | Number of public scores the user have | [optional] **cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] -**instruments** | **[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**instruments** | **List[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] **azure_details** | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] **private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] **locale** | [**FlatLocales**](FlatLocales.md) | | [optional] -**groups** | **[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] -**picture_file** | **str, none_type** | The ID of the user profile picture | [optional] -**cover_picture_file** | **str, none_type** | The ID of the user profile cover picture | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**groups** | **List[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**picture_file** | **str** | The ID of the user profile picture | [optional] +**cover_picture_file** | **str** | The ID of the user profile cover picture | [optional] + +## Example + +```python +from flat_api.models.user_details import UserDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDetails from a JSON string +user_details_instance = UserDetails.from_json(json) +# print the JSON string representation of the object +print UserDetails.to_json() +# convert the object into a dict +user_details_dict = user_details_instance.to_dict() +# create an instance of UserDetails from a dict +user_details_form_dict = user_details.from_dict(user_details_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdmin.md b/docs/UserDetailsAdmin.md index 15bc762..7939a9d 100644 --- a/docs/UserDetailsAdmin.md +++ b/docs/UserDetailsAdmin.md @@ -2,17 +2,19 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The user unique identifier | [optional] -**type** | **str** | The type of user account | [optional] -**username** | **str** | The user name (unique for the organization) | [optional] +**id** | **str** | The user unique identifier | +**type** | **str** | The type of user account | +**product** | [**TutteoProduct**](TutteoProduct.md) | | +**username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] **lastname** | **str** | Lastname of the user (for education users) | [optional] **name** | **str** | A displayable name for the user (for consumer users) | [optional] -**picture** | **str, none_type** | The URL of the picture to display | [optional] -**badges** | **[str]** | List of badges for the user profile | [optional] +**picture** | **str** | The URL of the picture to display | +**badges** | **List[str]** | List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` | [optional] **organization** | **str** | Organization ID (for Edu users only) | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] @@ -20,9 +22,25 @@ Name | Type | Description | Notes **email** | **str** | Email of the user | [optional] **last_activity_date** | **datetime** | Date of the last user activity | [optional] **license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] -**groups** | **[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**groups** | **List[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] + +## Example + +```python +from flat_api.models.user_details_admin import UserDetailsAdmin + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDetailsAdmin from a JSON string +user_details_admin_instance = UserDetailsAdmin.from_json(json) +# print the JSON string representation of the object +print UserDetailsAdmin.to_json() +# convert the object into a dict +user_details_admin_dict = user_details_admin_instance.to_dict() +# create an instance of UserDetailsAdmin from a dict +user_details_admin_form_dict = user_details_admin.from_dict(user_details_admin_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdminLicense.md b/docs/UserDetailsAdminLicense.md index 2e7c6c6..7c08b34 100644 --- a/docs/UserDetailsAdminLicense.md +++ b/docs/UserDetailsAdminLicense.md @@ -3,6 +3,7 @@ Current active license of the user ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | ID of the current license | [optional] @@ -10,8 +11,24 @@ Name | Type | Description | Notes **source** | [**LicenseSources**](LicenseSources.md) | | [optional] **mode** | [**LicenseMode**](LicenseMode.md) | | [optional] **active** | **bool** | ID of the current license | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDetailsAdminLicense from a JSON string +user_details_admin_license_instance = UserDetailsAdminLicense.from_json(json) +# print the JSON string representation of the object +print UserDetailsAdminLicense.to_json() + +# convert the object into a dict +user_details_admin_license_dict = user_details_admin_license_instance.to_dict() +# create an instance of UserDetailsAdminLicense from a dict +user_details_admin_license_form_dict = user_details_admin_license.from_dict(user_details_admin_license_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserPublic.md b/docs/UserPublic.md index 87a8f7d..8a068e3 100644 --- a/docs/UserPublic.md +++ b/docs/UserPublic.md @@ -2,17 +2,19 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The user unique identifier | [optional] -**type** | **str** | The type of user account | [optional] -**username** | **str** | The user name (unique for the organization) | [optional] +**id** | **str** | The user unique identifier | +**type** | **str** | The type of user account | +**product** | [**TutteoProduct**](TutteoProduct.md) | | +**username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] **lastname** | **str** | Lastname of the user (for education users) | [optional] **name** | **str** | A displayable name for the user (for consumer users) | [optional] -**picture** | **str, none_type** | The URL of the picture to display | [optional] -**badges** | **[str]** | List of badges for the user profile | [optional] +**picture** | **str** | The URL of the picture to display | +**badges** | **List[str]** | List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` | [optional] **organization** | **str** | Organization ID (for Edu users only) | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] @@ -25,10 +27,26 @@ Name | Type | Description | Notes **owned_public_scores_count** | **int** | Number of public scores the user have | [optional] **cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] -**instruments** | **[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] +**instruments** | **List[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_public import UserPublic + +# TODO update the JSON string below +json = "{}" +# create an instance of UserPublic from a JSON string +user_public_instance = UserPublic.from_json(json) +# print the JSON string representation of the object +print UserPublic.to_json() + +# convert the object into a dict +user_public_dict = user_public_instance.to_dict() +# create an instance of UserPublic from a dict +user_public_form_dict = user_public.from_dict(user_public_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserPublicSummary.md b/docs/UserPublicSummary.md index 33aab44..1e35c1b 100644 --- a/docs/UserPublicSummary.md +++ b/docs/UserPublicSummary.md @@ -2,23 +2,41 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The user unique identifier | [optional] -**type** | **str** | The type of user account | [optional] -**username** | **str** | The user name (unique for the organization) | [optional] +**id** | **str** | The user unique identifier | +**type** | **str** | The type of user account | +**product** | [**TutteoProduct**](TutteoProduct.md) | | +**username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] **lastname** | **str** | Lastname of the user (for education users) | [optional] **name** | **str** | A displayable name for the user (for consumer users) | [optional] -**picture** | **str, none_type** | The URL of the picture to display | [optional] -**badges** | **[str]** | List of badges for the user profile | [optional] +**picture** | **str** | The URL of the picture to display | +**badges** | **List[str]** | List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` | [optional] **organization** | **str** | Organization ID (for Edu users only) | [optional] **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] **class_role** | [**ClassRoles**](ClassRoles.md) | | [optional] **html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_public_summary import UserPublicSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of UserPublicSummary from a JSON string +user_public_summary_instance = UserPublicSummary.from_json(json) +# print the JSON string representation of the object +print UserPublicSummary.to_json() + +# convert the object into a dict +user_public_summary_dict = user_public_summary_instance.to_dict() +# create an instance of UserPublicSummary from a dict +user_public_summary_form_dict = user_public_summary.from_dict(user_public_summary_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSigninLink.md b/docs/UserSigninLink.md index 5116ad6..0c10014 100644 --- a/docs/UserSigninLink.md +++ b/docs/UserSigninLink.md @@ -2,12 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | URL to use to sign in to this account | [optional] **expiration_date** | **datetime** | Date when the link expires | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +## Example + +```python +from flat_api.models.user_signin_link import UserSigninLink + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSigninLink from a JSON string +user_signin_link_instance = UserSigninLink.from_json(json) +# print the JSON string representation of the object +print UserSigninLink.to_json() + +# convert the object into a dict +user_signin_link_dict = user_signin_link_instance.to_dict() +# create an instance of UserSigninLink from a dict +user_signin_link_form_dict = user_signin_link.from_dict(user_signin_link_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSigninLinkCreation.md b/docs/UserSigninLinkCreation.md index b56ec21..ca0ec5a 100644 --- a/docs/UserSigninLinkCreation.md +++ b/docs/UserSigninLinkCreation.md @@ -2,11 +2,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**destination_path** | **str** | Path to redirect to after signin | [optional] if omitted the server will use the default value of "/" -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**destination_path** | **str** | Path to redirect to after signin | [optional] [default to '/'] + +## Example + +```python +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSigninLinkCreation from a JSON string +user_signin_link_creation_instance = UserSigninLinkCreation.from_json(json) +# print the JSON string representation of the object +print UserSigninLinkCreation.to_json() +# convert the object into a dict +user_signin_link_creation_dict = user_signin_link_creation_instance.to_dict() +# create an instance of UserSigninLinkCreation from a dict +user_signin_link_creation_form_dict = user_signin_link_creation.from_dict(user_signin_link_creation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index d86e044..dad1454 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -1,28 +1,174 @@ +# coding: utf-8 + # flake8: noqa """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -__version__ = "1.0.0" +__version__ = "1.1.0" + +# import apis into sdk package +from flat_api.api.account_api import AccountApi +from flat_api.api.class_api import ClassApi +from flat_api.api.collection_api import CollectionApi +from flat_api.api.edu_resources_api import EduResourcesApi +from flat_api.api.group_api import GroupApi +from flat_api.api.organization_api import OrganizationApi +from flat_api.api.score_api import ScoreApi +from flat_api.api.task_api import TaskApi +from flat_api.api.user_api import UserApi # import ApiClient +from flat_api.api_response import ApiResponse from flat_api.api_client import ApiClient - -# import Configuration from flat_api.configuration import Configuration - -# import exceptions from flat_api.exceptions import OpenApiException -from flat_api.exceptions import ApiAttributeError from flat_api.exceptions import ApiTypeError from flat_api.exceptions import ApiValueError from flat_api.exceptions import ApiKeyError +from flat_api.exceptions import ApiAttributeError from flat_api.exceptions import ApiException + +# import models into sdk package +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.app_scopes import AppScopes +from flat_api.models.assignment import Assignment +from flat_api.models.assignment_copy import AssignmentCopy +from flat_api.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti +from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner +from flat_api.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.assignment_update import AssignmentUpdate +from flat_api.models.class_assignment import ClassAssignment +from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.models.class_assignment_lti import ClassAssignmentLti +from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.models.class_attachment_creation import ClassAttachmentCreation +from flat_api.models.class_creation import ClassCreation +from flat_api.models.class_details import ClassDetails +from flat_api.models.class_details_canvas import ClassDetailsCanvas +from flat_api.models.class_details_clever import ClassDetailsClever +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from flat_api.models.class_details_lti import ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.models.class_grade_level import ClassGradeLevel +from flat_api.models.class_roles import ClassRoles +from flat_api.models.class_state import ClassState +from flat_api.models.class_update import ClassUpdate +from flat_api.models.collection import Collection +from flat_api.models.collection_app import CollectionApp +from flat_api.models.collection_capabilities import CollectionCapabilities +from flat_api.models.collection_creation import CollectionCreation +from flat_api.models.collection_modification import CollectionModification +from flat_api.models.collection_privacy import CollectionPrivacy +from flat_api.models.collection_type import CollectionType +from flat_api.models.edu_library import EduLibrary +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities +from flat_api.models.edu_resource_copy import EduResourceCopy +from flat_api.models.edu_resource_creation import EduResourceCreation +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.models.edu_resource_move import EduResourceMove +from flat_api.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.models.edu_resource_resource import EduResourceResource +from flat_api.models.edu_resource_type import EduResourceType +from flat_api.models.edu_resource_update import EduResourceUpdate +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.models.flat_error_response import FlatErrorResponse +from flat_api.models.flat_locales import FlatLocales +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.models.group import Group +from flat_api.models.group_details import GroupDetails +from flat_api.models.group_type import GroupType +from flat_api.models.license_mode import LicenseMode +from flat_api.models.license_sources import LicenseSources +from flat_api.models.lms_name import LmsName +from flat_api.models.lti_credentials import LtiCredentials +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.models.media_attachment import MediaAttachment +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api.models.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.models.resource_rights import ResourceRights +from flat_api.models.score_comment import ScoreComment +from flat_api.models.score_comment_context import ScoreCommentContext +from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.models.score_comment_moderation import ScoreCommentModeration +from flat_api.models.score_comment_update import ScoreCommentUpdate +from flat_api.models.score_comments_counts import ScoreCommentsCounts +from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +from flat_api.models.score_creation_type import ScoreCreationType +from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_fork import ScoreFork +from flat_api.models.score_license import ScoreLicense +from flat_api.models.score_likes_counts import ScoreLikesCounts +from flat_api.models.score_modification import ScoreModification +from flat_api.models.score_plays_counts import ScorePlaysCounts +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.score_revision import ScoreRevision +from flat_api.models.score_revision_creation import ScoreRevisionCreation +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics +from flat_api.models.score_source import ScoreSource +from flat_api.models.score_track import ScoreTrack +from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose +from flat_api.models.score_track_state import ScoreTrackState +from flat_api.models.score_track_type import ScoreTrackType +from flat_api.models.score_track_update import ScoreTrackUpdate +from flat_api.models.score_views_counts import ScoreViewsCounts +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions +from flat_api.models.task_progress import TaskProgress +from flat_api.models.task_result import TaskResult +from flat_api.models.tutteo_product import TutteoProduct +from flat_api.models.user_admin_update import UserAdminUpdate +from flat_api.models.user_azure_details import UserAzureDetails +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks +from flat_api.models.user_creation import UserCreation +from flat_api.models.user_details import UserDetails +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from flat_api.models.user_public import UserPublic +from flat_api.models.user_public_summary import UserPublicSummary +from flat_api.models.user_signin_link import UserSigninLink +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation diff --git a/flat_api/api/__init__.py b/flat_api/api/__init__.py index c5b7882..7255250 100644 --- a/flat_api/api/__init__.py +++ b/flat_api/api/__init__.py @@ -1,3 +1,13 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from flat_api.apis import AccountApi +# flake8: noqa + +# import apis into api package +from flat_api.api.account_api import AccountApi +from flat_api.api.class_api import ClassApi +from flat_api.api.collection_api import CollectionApi +from flat_api.api.edu_resources_api import EduResourcesApi +from flat_api.api.group_api import GroupApi +from flat_api.api.organization_api import OrganizationApi +from flat_api.api.score_api import ScoreApi +from flat_api.api.task_api import TaskApi +from flat_api.api.user_api import UserApi + diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index de01ee2..e7219d7 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -1,168 +1,300 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import re # noqa: F401 -import sys # noqa: F401 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_details import UserDetails +from pydantic import Field, StrictBool +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.user_details import UserDetails +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType -class AccountApi(object): + +class AccountApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.get_authenticated_user_endpoint = _Endpoint( - settings={ - 'response_type': (UserDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/me', - 'operation_id': 'get_authenticated_user', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'only_id', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'only_id': - (bool,), - }, - 'attribute_map': { - 'only_id': 'onlyId', - }, - 'location_map': { - 'only_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def get_authenticated_user( self, - **kwargs - ): - """Get current user account # noqa: E501 - - Get details about the current authenticated User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_authenticated_user(async_req=True) - >>> result = thread.get() - - - Keyword Args: - only_id (bool): Only return the user id. [optional] if omitted the server will use the default value of False - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetails: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_authenticated_user_with_http_info( + self, + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetails]: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def get_authenticated_user_without_preload_content( + self, + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_authenticated_user_endpoint.call_with_http_info(**kwargs) + return response_data.response + + + def _get_authenticated_user_serialize( + self, + only_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if only_id is not None: + + _query_params.append(('onlyId', only_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index bc954e2..b8cc018 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -1,4421 +1,8441 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.assignment import Assignment -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.assignment_copy_response import AssignmentCopyResponse -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.class_assignment_update import ClassAssignmentUpdate -from flat_api.model.class_creation import ClassCreation -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_update import ClassUpdate -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.user_details import UserDetails - - -class ClassApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.assignment import Assignment +from flat_api.models.assignment_copy import AssignmentCopy +from flat_api.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.class_assignment import ClassAssignment +from flat_api.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.models.class_creation import ClassCreation +from flat_api.models.class_details import ClassDetails +from flat_api.models.class_update import ClassUpdate +from flat_api.models.user_details import UserDetails + +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType + + +class ClassApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.activate_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/activate', - 'operation_id': 'activate_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.add_class_user_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/users/{user}', - 'operation_id': 'add_class_user', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'user', - ], - 'required': [ - '_class', - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'user': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'user': 'user', - }, - 'location_map': { - '_class': 'path', - 'user': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.archive_assignment_endpoint = _Endpoint( - settings={ - 'response_type': (Assignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/archive', - 'operation_id': 'archive_assignment', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - ], - 'required': [ - '_class', - 'assignment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.archive_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/archive', - 'operation_id': 'archive_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.copy_assignment_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentCopyResponse,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/copy', - 'operation_id': 'copy_assignment', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'body', - ], - 'required': [ - '_class', - 'assignment', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'body': - (AssignmentCopy,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes', - 'operation_id': 'create_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [ - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (ClassCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_class_assignment_endpoint = _Endpoint( - settings={ - 'response_type': (Assignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments', - 'operation_id': 'create_class_assignment', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'body', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'body': - (ClassAssignmentUpdate,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_submission_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmission,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions', - 'operation_id': 'create_submission', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'body', - ], - 'required': [ - '_class', - 'assignment', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'body': - (AssignmentSubmissionUpdate,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_test_student_account_endpoint = _Endpoint( - settings={ - 'response_type': (UserDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/testStudent', - 'operation_id': 'create_test_student_account', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'reset', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'reset': - (bool,), - }, - 'attribute_map': { - '_class': 'class', - 'reset': 'reset', - }, - 'location_map': { - '_class': 'path', - 'reset': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_class_user_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/users/{user}', - 'operation_id': 'delete_class_user', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'user', - ], - 'required': [ - '_class', - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'user': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'user': 'user', - }, - 'location_map': { - '_class': 'path', - 'user': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_submission_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmission,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', - 'operation_id': 'delete_submission', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_submission_comment_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', - 'operation_id': 'delete_submission_comment', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - 'comment', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - 'comment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - 'comment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - 'comment': 'comment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - 'comment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.edit_submission_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmission,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', - 'operation_id': 'edit_submission', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - 'body', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - 'body': - (AssignmentSubmissionUpdate,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.enroll_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/enroll/{enrollmentCode}', - 'operation_id': 'enroll_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'enrollment_code', - ], - 'required': [ - 'enrollment_code', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'enrollment_code': - (str,), - }, - 'attribute_map': { - 'enrollment_code': 'enrollmentCode', - }, - 'location_map': { - 'enrollment_code': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.export_submissions_reviews_as_csv_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/csv', - 'operation_id': 'export_submissions_reviews_as_csv', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - ], - 'required': [ - '_class', - 'assignment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'text/csv' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.export_submissions_reviews_as_excel_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/excel', - 'operation_id': 'export_submissions_reviews_as_excel', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - ], - 'required': [ - '_class', - 'assignment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}', - 'operation_id': 'get_class', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_submissions_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmission],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/submissions', - 'operation_id': 'get_score_submissions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_submission_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmission,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}', - 'operation_id': 'get_submission', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_submission_comments_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmissionComment],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', - 'operation_id': 'get_submission_comments', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_submission_history_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmissionHistory],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/history', - 'operation_id': 'get_submission_history', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_submissions_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmission],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions', - 'operation_id': 'get_submissions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - ], - 'required': [ - '_class', - 'assignment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_assignments_endpoint = _Endpoint( - settings={ - 'response_type': ([ClassAssignment],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments', - 'operation_id': 'list_assignments', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_class_student_submissions_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmission],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/students/{user}/submissions', - 'operation_id': 'list_class_student_submissions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'user', - ], - 'required': [ - '_class', - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'user': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'user': 'user', - }, - 'location_map': { - '_class': 'path', - 'user': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_classes_endpoint = _Endpoint( - settings={ - 'response_type': ([ClassDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes', - 'operation_id': 'list_classes', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'state', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'state', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('state',): { - - "ACTIVE": "active", - "INACTIVE": "inactive", - "ARCHIVED": "archived" - }, - }, - 'openapi_types': { - 'state': - (str,), - }, - 'attribute_map': { - 'state': 'state', - }, - 'location_map': { - 'state': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.post_submission_comment_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmissionComment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', - 'operation_id': 'post_submission_comment', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - 'assignment_submission_comment_creation', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - 'assignment_submission_comment_creation', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - 'assignment_submission_comment_creation': - (AssignmentSubmissionCommentCreation,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - 'assignment_submission_comment_creation': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.unarchive_assignment_endpoint = _Endpoint( - settings={ - 'response_type': (Assignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/archive', - 'operation_id': 'unarchive_assignment', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - ], - 'required': [ - '_class', - 'assignment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.unarchive_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/archive', - 'operation_id': 'unarchive_class', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}', - 'operation_id': 'update_class', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'body', - ], - 'required': [ - '_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'body': - (ClassUpdate,), - }, - 'attribute_map': { - '_class': 'class', - }, - 'location_map': { - '_class': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_submission_comment_endpoint = _Endpoint( - settings={ - 'response_type': (AssignmentSubmissionComment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', - 'operation_id': 'update_submission_comment', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - '_class', - 'assignment', - 'submission', - 'comment', - 'assignment_submission_comment_creation', - ], - 'required': [ - '_class', - 'assignment', - 'submission', - 'comment', - 'assignment_submission_comment_creation', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - '_class': - (str,), - 'assignment': - (str,), - 'submission': - (str,), - 'comment': - (str,), - 'assignment_submission_comment_creation': - (AssignmentSubmissionCommentCreation,), - }, - 'attribute_map': { - '_class': 'class', - 'assignment': 'assignment', - 'submission': 'submission', - 'comment': 'comment', - }, - 'location_map': { - '_class': 'path', - 'assignment': 'path', - 'submission': 'path', - 'comment': 'path', - 'assignment_submission_comment_creation': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def activate_class( self, - _class, - **kwargs - ): - """Activate the class # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.activate_class(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.activate_class_endpoint.call_with_http_info(**kwargs) + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def activate_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def activate_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _activate_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/activate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def add_class_user( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_class_user_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_class_user_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_class_user_serialize( + self, + var_class, user, - **kwargs - ): - """Add a user to the class # noqa: E501 - - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_class_user(_class, user, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - user (str): Unique identifier of the user - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['user'] = \ - user - return self.add_class_user_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def archive_assignment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def archive_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def archive_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _archive_assignment_serialize( + self, + var_class, assignment, - **kwargs - ): - """Archive the assignment # noqa: E501 - - Archive the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.archive_assignment(_class, assignment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Assignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - return self.archive_assignment_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def archive_class( self, - _class, - **kwargs - ): - """Archive the class # noqa: E501 - - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.archive_class(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.archive_class_endpoint.call_with_http_info(**kwargs) + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def archive_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def archive_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _archive_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def copy_assignment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentCopyResponse: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def copy_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentCopyResponse]: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def copy_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_assignment_serialize( + self, + var_class, assignment, body, - **kwargs - ): - """Copy an assignment # noqa: E501 - - Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.copy_assignment(_class, assignment, body, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - body (AssignmentCopy): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentCopyResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['body'] = \ - body - return self.copy_assignment_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_class( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_class_with_http_info( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_class_without_preload_content( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_class_serialize( self, body, - **kwargs - ): - """Create a new class # noqa: E501 - - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_class(body, async_req=True) - >>> result = thread.get() - - Args: - body (ClassCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['body'] = \ - body - return self.create_class_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_class_assignment( self, - _class, - **kwargs - ): - """Assignment creation # noqa: E501 - - Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_class_assignment(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - body (ClassAssignmentUpdate): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Assignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.create_class_assignment_endpoint.call_with_http_info(**kwargs) - + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_class_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_class_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_class_assignment_serialize( + self, + var_class, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_submission( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_submission_serialize( + self, + var_class, assignment, body, - **kwargs - ): - """Create or edit a submission # noqa: E501 - - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_submission(_class, assignment, body, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - body (AssignmentSubmissionUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmission - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['body'] = \ - body - return self.create_submission_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_test_student_account( self, - _class, - **kwargs - ): - """Create a test student account # noqa: E501 - - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_test_student_account(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - reset (bool): If true, the testing account will be re-created. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.create_test_student_account_endpoint.call_with_http_info(**kwargs) - + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetails: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_test_student_account_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetails]: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_test_student_account_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_test_student_account_serialize( + self, + var_class, + reset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + if reset is not None: + + _query_params.append(('reset', reset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/testStudent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_class_user( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_class_user_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_class_user_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_class_user_serialize( + self, + var_class, user, - **kwargs - ): - """Remove a user from the class # noqa: E501 - - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_class_user(_class, user, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - user (str): Unique identifier of the user - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['user'] = \ - user - return self.delete_class_user_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_submission( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_submission_serialize( + self, + var_class, assignment, submission, - **kwargs - ): - """Reset a submission # noqa: E501 - - Use this method as a teacher to reset a submission and allow student to start over the assignment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_submission(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmission - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - return self.delete_submission_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_submission_comment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_submission_comment_serialize( + self, + var_class, assignment, submission, comment, - **kwargs - ): - """Delete a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_submission_comment(_class, assignment, submission, comment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - comment (str): Unique identifier of the comment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - kwargs['comment'] = \ - comment - return self.delete_submission_comment_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def edit_submission( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def edit_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def edit_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_submission_serialize( + self, + var_class, assignment, submission, body, - **kwargs - ): - """Edit a submission # noqa: E501 - - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.edit_submission(_class, assignment, submission, body, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - body (AssignmentSubmissionUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmission - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - kwargs['body'] = \ - body - return self.edit_submission_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def enroll_class( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def enroll_class_with_http_info( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def enroll_class_without_preload_content( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enroll_class_serialize( self, enrollment_code, - **kwargs - ): - """Join a class # noqa: E501 - - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.enroll_class(enrollment_code, async_req=True) - >>> result = thread.get() - - Args: - enrollment_code (str): The enrollment code, available to the teacher in `ClassDetails` - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['enrollment_code'] = \ - enrollment_code - return self.enroll_class_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if enrollment_code is not None: + _path_params['enrollmentCode'] = enrollment_code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/enroll/{enrollmentCode}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def export_submissions_reviews_as_csv( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_submissions_reviews_as_csv_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def export_submissions_reviews_as_csv_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_submissions_reviews_as_csv_serialize( + self, + var_class, assignment, - **kwargs - ): - """CSV Grades exports # noqa: E501 - - Export list of submissions grades to a CSV file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.export_submissions_reviews_as_csv(_class, assignment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - file_type - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - return self.export_submissions_reviews_as_csv_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/csv' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/csv', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def export_submissions_reviews_as_excel( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_submissions_reviews_as_excel_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def export_submissions_reviews_as_excel_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_submissions_reviews_as_excel_serialize( + self, + var_class, assignment, - **kwargs - ): - """Excel Grades exports # noqa: E501 - - Export list of submissions grades to an Excel file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.export_submissions_reviews_as_excel(_class, assignment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - file_type - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - return self.export_submissions_reviews_as_excel_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/excel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_class( self, - _class, - **kwargs - ): - """Get the details of a single class # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_class(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.get_class_endpoint.call_with_http_info(**kwargs) + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_submissions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_submissions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_submissions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List submissions related to the score + + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_submissions_serialize( self, score, - **kwargs - ): - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_submissions(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmission] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_submissions_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_submission( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_serialize( + self, + var_class, assignment, submission, - **kwargs - ): - """Get a student submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_submission(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmission - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - return self.get_submission_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_submission_comments( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmissionComment]: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_submission_comments_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmissionComment]]: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_submission_comments_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_comments_serialize( + self, + var_class, assignment, submission, - **kwargs - ): - """List the feedback comments of a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_submission_comments(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmissionComment] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - return self.get_submission_comments_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_submission_history( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmissionHistory]: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_submission_history_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmissionHistory]]: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_submission_history_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_history_serialize( + self, + var_class, assignment, submission, - **kwargs - ): - """Get the history of the submission # noqa: E501 - - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_submission_history(_class, assignment, submission, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmissionHistory] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - return self.get_submission_history_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_submissions( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmission]: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_submissions_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_submissions_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submissions_serialize( + self, + var_class, assignment, - **kwargs - ): - """List the students' submissions # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_submissions(_class, assignment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmission] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - return self.get_submissions_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_assignments( self, - _class, - **kwargs - ): - """Assignments listing # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_assignments(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ClassAssignment] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.list_assignments_endpoint.call_with_http_info(**kwargs) + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ClassAssignment]: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_assignments_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ClassAssignment]]: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_assignments_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_assignments_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_class_student_submissions( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmission]: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_class_student_submissions_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_class_student_submissions_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_class_student_submissions_serialize( + self, + var_class, user, - **kwargs - ): - """List the submissions for a student # noqa: E501 - - Use this method as a teacher to list all the assignment submissions sent by a student of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_class_student_submissions(_class, user, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - user (str): Unique identifier of the user - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmission] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['user'] = \ - user - return self.list_class_student_submissions_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/students/{user}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_classes( self, - **kwargs - ): - """List the classes available for the current user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_classes(async_req=True) - >>> result = thread.get() - - - Keyword Args: - state (str): Filter the classes by state. [optional] if omitted the server will use the default value of "active" - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ClassDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_classes_endpoint.call_with_http_info(**kwargs) + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ClassDetails]: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_classes_with_http_info( + self, + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ClassDetails]]: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_classes_without_preload_content( + self, + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_classes_serialize( + self, + state, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if state is not None: + + _query_params.append(('state', state)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def post_submission_comment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmissionComment: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmissionComment]: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_submission_comment_serialize( + self, + var_class, assignment, submission, assignment_submission_comment_creation, - **kwargs - ): - """Add a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.post_submission_comment(_class, assignment, submission, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - assignment_submission_comment_creation (AssignmentSubmissionCommentCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmissionComment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - kwargs['assignment_submission_comment_creation'] = \ - assignment_submission_comment_creation - return self.post_submission_comment_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_submission_comment_creation is not None: + _body_params = assignment_submission_comment_creation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def unarchive_assignment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unarchive_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unarchive_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unarchive_assignment_serialize( + self, + var_class, assignment, - **kwargs - ): - """Unarchive the assignment. # noqa: E501 - - Mark the assignment as `active`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unarchive_assignment(_class, assignment, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Assignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - return self.unarchive_assignment_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def unarchive_class( self, - _class, - **kwargs - ): - """Unarchive the class # noqa: E501 - - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unarchive_class(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.unarchive_class_endpoint.call_with_http_info(**kwargs) + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unarchive_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unarchive_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unarchive_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_class( self, - _class, - **kwargs - ): - """Update the class # noqa: E501 - - Update the meta information of the class # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_class(_class, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - - Keyword Args: - body (ClassUpdate): Details of the Class. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - return self.update_class_endpoint.call_with_http_info(**kwargs) - + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_class_serialize( + self, + var_class, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_submission_comment( self, - _class, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmissionComment: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmissionComment]: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_submission_comment_serialize( + self, + var_class, assignment, submission, comment, assignment_submission_comment_creation, - **kwargs - ): - """Update a feedback comment to a submission # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_submission_comment(_class, assignment, submission, comment, assignment_submission_comment_creation, async_req=True) - >>> result = thread.get() - - Args: - _class (str): Unique identifier of the class - assignment (str): Unique identifier of the assignment - submission (str): Unique identifier of the submission - comment (str): Unique identifier of the comment - assignment_submission_comment_creation (AssignmentSubmissionCommentCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - AssignmentSubmissionComment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['_class'] = \ - _class - kwargs['assignment'] = \ - assignment - kwargs['submission'] = \ - submission - kwargs['comment'] = \ - comment - kwargs['assignment_submission_comment_creation'] = \ - assignment_submission_comment_creation - return self.update_submission_comment_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_submission_comment_creation is not None: + _body_params = assignment_submission_comment_creation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index eeb437f..40be3c7 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -1,1390 +1,2709 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.collection import Collection +from flat_api.models.collection_creation import CollectionCreation +from flat_api.models.collection_modification import CollectionModification +from flat_api.models.score_details import ScoreDetails -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.collection import Collection -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection_modification import CollectionModification -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_details import ScoreDetails +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType -class CollectionApi(object): +class CollectionApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.add_score_to_collection_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}/scores/{score}', - 'operation_id': 'add_score_to_collection', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - 'score', - 'sharing_key', - ], - 'required': [ - 'collection', - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - 'score': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'collection': 'path', - 'score': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.create_collection_endpoint = _Endpoint( - settings={ - 'response_type': (Collection,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections', - 'operation_id': 'create_collection', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [ - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (CollectionCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_collection_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}', - 'operation_id': 'delete_collection', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - ], - 'required': [ - 'collection', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - }, - 'location_map': { - 'collection': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_score_from_collection_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}/scores/{score}', - 'operation_id': 'delete_score_from_collection', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - 'score', - 'sharing_key', - ], - 'required': [ - 'collection', - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - 'score': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'collection': 'path', - 'score': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.edit_collection_endpoint = _Endpoint( - settings={ - 'response_type': (Collection,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}', - 'operation_id': 'edit_collection', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - 'body', - ], - 'required': [ - 'collection', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - 'body': - (CollectionModification,), - }, - 'attribute_map': { - 'collection': 'collection', - }, - 'location_map': { - 'collection': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_collection_endpoint = _Endpoint( - settings={ - 'response_type': (Collection,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}', - 'operation_id': 'get_collection', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - 'sharing_key', - ], - 'required': [ - 'collection', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'collection': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_collection_scores_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}/scores', - 'operation_id': 'list_collection_scores', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - 'sharing_key', - 'sort', - 'direction', - 'limit', - 'next', - 'previous', - ], - 'required': [ - 'collection', - ], - 'nullable': [ - ], - 'enum': [ - 'sort', - 'direction', - ], - 'validation': [ - 'limit', - ] - }, - root_map={ - 'validations': { - ('limit',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - ('sort',): { - - "CREATIONDATE": "creationDate", - "MODIFICATIONDATE": "modificationDate", - "TITLE": "title" - }, - ('direction',): { - - "ASC": "asc", - "DESC": "desc" - }, - }, - 'openapi_types': { - 'collection': - (str,), - 'sharing_key': - (str,), - 'sort': - (str,), - 'direction': - (str,), - 'limit': - (int,), - 'next': - (str,), - 'previous': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - 'sharing_key': 'sharingKey', - 'sort': 'sort', - 'direction': 'direction', - 'limit': 'limit', - 'next': 'next', - 'previous': 'previous', - }, - 'location_map': { - 'collection': 'path', - 'sharing_key': 'query', - 'sort': 'query', - 'direction': 'query', - 'limit': 'query', - 'next': 'query', - 'previous': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_collections_endpoint = _Endpoint( - settings={ - 'response_type': ([Collection],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections', - 'operation_id': 'list_collections', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'parent', - 'sort', - 'direction', - 'limit', - 'next', - 'previous', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'sort', - 'direction', - ], - 'validation': [ - 'limit', - ] - }, - root_map={ - 'validations': { - ('limit',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - ('sort',): { - - "CREATIONDATE": "creationDate", - "TITLE": "title" - }, - ('direction',): { - - "ASC": "asc", - "DESC": "desc" - }, - }, - 'openapi_types': { - 'parent': - (str,), - 'sort': - (str,), - 'direction': - (str,), - 'limit': - (int,), - 'next': - (str,), - 'previous': - (str,), - }, - 'attribute_map': { - 'parent': 'parent', - 'sort': 'sort', - 'direction': 'direction', - 'limit': 'limit', - 'next': 'next', - 'previous': 'previous', - }, - 'location_map': { - 'parent': 'query', - 'sort': 'query', - 'direction': 'query', - 'limit': 'query', - 'next': 'query', - 'previous': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.untrash_collection_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/collections/{collection}/untrash', - 'operation_id': 'untrash_collection', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'collection', - ], - 'required': [ - 'collection', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'collection': - (str,), - }, - 'attribute_map': { - 'collection': 'collection', - }, - 'location_map': { - 'collection': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def add_score_to_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreDetails: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_score_to_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreDetails]: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_score_to_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_to_collection_serialize( self, collection, score, - **kwargs - ): - """Add a score to the collection # noqa: E501 - - This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_score_to_collection(collection, score, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - kwargs['score'] = \ - score - return self.add_score_to_collection_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/collections/{collection}/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_collection( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Create a new collection + + This method will create a new collection and add it to your `root` collection. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_collection_with_http_info( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Create a new collection + + This method will create a new collection and add it to your `root` collection. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_collection_without_preload_content( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new collection + + This method will create a new collection and add it to your `root` collection. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_collection_serialize( self, body, - **kwargs - ): - """Create a new collection # noqa: E501 - - This method will create a new collection and add it to your `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_collection(body, async_req=True) - >>> result = thread.get() - - Args: - body (CollectionCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Collection - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['body'] = \ - body - return self.create_collection_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_collection_serialize( self, collection, - **kwargs - ): - """Delete the collection # noqa: E501 - - This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_collection(collection, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - return self.delete_collection_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_score_from_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_score_from_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_score_from_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_from_collection_serialize( self, collection, score, - **kwargs - ): - """Delete a score from the collection # noqa: E501 - - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_score_from_collection(collection, score, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - kwargs['score'] = \ - score - return self.delete_score_from_collection_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/collections/{collection}/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def edit_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def edit_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def edit_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_collection_serialize( self, collection, - **kwargs - ): - """Update a collection's metadata # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.edit_collection(collection, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - Keyword Args: - body (CollectionModification): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Collection - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - return self.edit_collection_endpoint.call_with_http_info(**kwargs) - + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Get collection details + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Get collection details + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get collection details + + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_collection_serialize( self, collection, - **kwargs - ): - """Get collection details # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_collection(collection, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Collection - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - return self.get_collection_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_collection_scores( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sharing_key=sharing_key, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_collection_scores_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sharing_key=sharing_key, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_collection_scores_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sharing_key=sharing_key, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_collection_scores_serialize( self, collection, - **kwargs - ): - """List the scores contained in a collection # noqa: E501 - - Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_collection_scores(collection, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - Keyword Args: - sharing_key (str): 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] - sort (str): Sort. [optional] - direction (str): Sort direction. [optional] - limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 - next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - return self.list_collection_scores_endpoint.call_with_http_info(**kwargs) - + sharing_key, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections/{collection}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_collections( self, - **kwargs - ): - """List the collections # noqa: E501 - - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_collections(async_req=True) - >>> result = thread.get() - - - Keyword Args: - parent (str): List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. . [optional] if omitted the server will use the default value of "root" - sort (str): Sort. [optional] - direction (str): Sort direction. [optional] - limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 - next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [Collection] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_collections_endpoint.call_with_http_info(**kwargs) - + parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Collection]: + """List the collections + + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_collections_with_http_info( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Collection]]: + """List the collections + + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_collections_without_preload_content( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the collections + + Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_collections_serialize( + self, + parent, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def untrash_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Untrash a collection + + This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def untrash_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Untrash a collection + + This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def untrash_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Untrash a collection + + This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _untrash_collection_serialize( self, collection, - **kwargs - ): - """Untrash a collection # noqa: E501 - - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.untrash_collection(collection, async_req=True) - >>> result = thread.get() - - Args: - collection (str): Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['collection'] = \ - collection - return self.untrash_collection_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/collections/{collection}/untrash', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/edu_resources_api.py b/flat_api/api/edu_resources_api.py index 9b9a448..edf488f 100644 --- a/flat_api/api/edu_resources_api.py +++ b/flat_api/api/edu_resources_api.py @@ -1,1614 +1,3364 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.assignment import Assignment -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.edu_library import EduLibrary -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.edu_resource_update import EduResourceUpdate -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.flat_error_response import FlatErrorResponse - - -class EduResourcesApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.assignment import Assignment +from flat_api.models.assignment_update import AssignmentUpdate +from flat_api.models.class_assignment import ClassAssignment +from flat_api.models.edu_library import EduLibrary +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_copy import EduResourceCopy +from flat_api.models.edu_resource_creation import EduResourceCreation +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.models.edu_resource_move import EduResourceMove +from flat_api.models.edu_resource_update import EduResourceUpdate +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass + +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType + + +class EduResourcesApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.copy_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': (EduResource,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}/copy', - 'operation_id': 'copy_edu_resource', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - 'edu_resource_copy', - ], - 'required': [ - 'resource', - 'edu_resource_copy', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - 'edu_resource_copy': - (EduResourceCopy,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - 'edu_resource_copy': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.copy_edu_resource_to_demo_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassAssignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}/copyToDemoClass', - 'operation_id': 'copy_edu_resource_to_demo_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - ], - 'required': [ - 'resource', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.create_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': (EduResource,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources', - 'operation_id': 'create_edu_resource', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'edu_resource_creation', - ], - 'required': [ - 'edu_resource_creation', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'edu_resource_creation': - (EduResourceCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'edu_resource_creation': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}', - 'operation_id': 'delete_edu_resource', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - ], - 'required': [ - 'resource', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': (EduResource,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}', - 'operation_id': 'get_edu_resource', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - ], - 'required': [ - 'resource', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_edu_libraries_endpoint = _Endpoint( - settings={ - 'response_type': ([EduLibrary],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/libraries', - 'operation_id': 'list_edu_libraries', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_edu_resources_endpoint = _Endpoint( - settings={ - 'response_type': ([EduResource],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources', - 'operation_id': 'list_edu_resources', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'parent', - 'type', - 'sort', - 'direction', - 'limit', - 'next', - 'previous', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'type', - 'sort', - 'direction', - ], - 'validation': [ - 'limit', - ] - }, - root_map={ - 'validations': { - ('limit',): { - - 'inclusive_maximum': 100, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - ('type',): { - - "ASSIGNMENT": "assignment", - "FOLDER": "folder" - }, - ('sort',): { - - "CREATIONDATE": "creationDate", - "UPDATEDATE": "updateDate", - "TITLE": "title" - }, - ('direction',): { - - "ASC": "asc", - "DESC": "desc" - }, - }, - 'openapi_types': { - 'parent': - (str,), - 'type': - (str,), - 'sort': - (str,), - 'direction': - (str,), - 'limit': - (int,), - 'next': - (str,), - 'previous': - (str,), - }, - 'attribute_map': { - 'parent': 'parent', - 'type': 'type', - 'sort': 'sort', - 'direction': 'direction', - 'limit': 'limit', - 'next': 'next', - 'previous': 'previous', - }, - 'location_map': { - 'parent': 'query', - 'type': 'query', - 'sort': 'query', - 'direction': 'query', - 'limit': 'query', - 'next': 'query', - 'previous': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.move_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': (EduResource,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}/move', - 'operation_id': 'move_edu_resource', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - 'edu_resource_move', - ], - 'required': [ - 'resource', - 'edu_resource_move', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - 'edu_resource_move': - (EduResourceMove,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - 'edu_resource_move': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_edu_resource_endpoint = _Endpoint( - settings={ - 'response_type': (EduResource,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}', - 'operation_id': 'update_edu_resource', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - 'edu_resource_update', - ], - 'required': [ - 'resource', - 'edu_resource_update', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - 'edu_resource_update': - (EduResourceUpdate,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - 'edu_resource_update': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_edu_resource_assignment_endpoint = _Endpoint( - settings={ - 'response_type': (Assignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}/assignment', - 'operation_id': 'update_edu_resource_assignment', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - 'assignment_update', - ], - 'required': [ - 'resource', - 'assignment_update', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - 'assignment_update': - (AssignmentUpdate,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - 'assignment_update': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.use_edu_resource_in_class_endpoint = _Endpoint( - settings={ - 'response_type': (ClassAssignment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/eduResources/{resource}/useInClass', - 'operation_id': 'use_edu_resource_in_class', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'resource', - 'edu_resource_use_in_class', - ], - 'required': [ - 'resource', - 'edu_resource_use_in_class', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'resource': - (str,), - 'edu_resource_use_in_class': - (EduResourceUseInClass,), - }, - 'attribute_map': { - 'resource': 'resource', - }, - 'location_map': { - 'resource': 'path', - 'edu_resource_use_in_class': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def copy_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def copy_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def copy_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_edu_resource_serialize( self, resource, edu_resource_copy, - **kwargs - ): - """Copy an education resource to a Resource Library # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.copy_edu_resource(resource, edu_resource_copy, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - edu_resource_copy (EduResourceCopy): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - EduResource - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - kwargs['edu_resource_copy'] = \ - edu_resource_copy - return self.copy_edu_resource_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_copy is not None: + _body_params = edu_resource_copy + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def copy_edu_resource_to_demo_class( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassAssignment: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def copy_edu_resource_to_demo_class_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassAssignment]: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def copy_edu_resource_to_demo_class_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_edu_resource_to_demo_class_serialize( self, resource, - **kwargs - ): - """Copy an education assignment to a teacher demo class # noqa: E501 - - Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.copy_edu_resource_to_demo_class(resource, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassAssignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - return self.copy_edu_resource_to_demo_class_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/copyToDemoClass', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_edu_resource( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_edu_resource_with_http_info( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_edu_resource_without_preload_content( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_edu_resource_serialize( self, edu_resource_creation, - **kwargs - ): - """Create a new education resource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_edu_resource(edu_resource_creation, async_req=True) - >>> result = thread.get() - - Args: - edu_resource_creation (EduResourceCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - EduResource - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['edu_resource_creation'] = \ - edu_resource_creation - return self.create_edu_resource_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_creation is not None: + _body_params = edu_resource_creation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_edu_resource_lti_link( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResourceLtiLink: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_edu_resource_lti_link_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResourceLtiLink]: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_edu_resource_lti_link_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_edu_resource_lti_link_serialize( + self, + resource, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/createLtiLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_edu_resource_serialize( self, resource, - **kwargs - ): - """Delete an education resource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_edu_resource(resource, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - return self.delete_edu_resource_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + return self.api_client.param_serialize( + method='DELETE', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_edu_resource_serialize( self, resource, - **kwargs - ): - """Get an education resource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_edu_resource(resource, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - EduResource - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - return self.get_edu_resource_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_edu_libraries( self, - **kwargs - ): - """List the education libraries # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_edu_libraries(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [EduLibrary] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_edu_libraries_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[EduLibrary]: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_edu_libraries_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[EduLibrary]]: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_edu_libraries_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_edu_libraries_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources/libraries', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_edu_resources( self, - **kwargs - ): - """List education resources in a library or folder # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_edu_resources(async_req=True) - >>> result = thread.get() - - - Keyword Args: - parent (str): List the resources contained in this `parent` library or folder . [optional] if omitted the server will use the default value of "root" - type (str): Filter the returned resources by type . [optional] - sort (str): Sort. [optional] if omitted the server will use the default value of "creationDate" - direction (str): Sort direction. [optional] - limit (int): This is the maximum number of resources that may be returned. [optional] if omitted the server will use the default value of 25 - next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [EduResource] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_edu_resources_endpoint.call_with_http_info(**kwargs) - + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[EduResource]: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder + :type parent: str + :param type: Filter the returned resources by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + type=type, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_edu_resources_with_http_info( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[EduResource]]: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder + :type parent: str + :param type: Filter the returned resources by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + type=type, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_edu_resources_without_preload_content( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder + :type parent: str + :param type: Filter the returned resources by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + type=type, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_edu_resources_serialize( + self, + parent, + type, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + if type is not None: + + _query_params.append(('type', type)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def move_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def move_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def move_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _move_edu_resource_serialize( self, resource, edu_resource_move, - **kwargs - ): - """Move an education resource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.move_edu_resource(resource, edu_resource_move, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - edu_resource_move (EduResourceMove): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - EduResource - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - kwargs['edu_resource_move'] = \ - edu_resource_move - return self.move_edu_resource_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_move is not None: + _body_params = edu_resource_move + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/move', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_edu_resource_serialize( self, resource, edu_resource_update, - **kwargs - ): - """Update an education resource metadata # noqa: E501 - - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_edu_resource(resource, edu_resource_update, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - edu_resource_update (EduResourceUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - EduResource - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - kwargs['edu_resource_update'] = \ - edu_resource_update - return self.update_edu_resource_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_update is not None: + _body_params = edu_resource_update + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_edu_resource_assignment( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_edu_resource_assignment_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_edu_resource_assignment_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_edu_resource_assignment_serialize( self, resource, assignment_update, - **kwargs - ): - """Update an education resource assignment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_edu_resource_assignment(resource, assignment_update, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - assignment_update (AssignmentUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Assignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - kwargs['assignment_update'] = \ - assignment_update - return self.update_edu_resource_assignment_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_update is not None: + _body_params = assignment_update + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/eduResources/{resource}/assignment', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def use_edu_resource_in_class( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassAssignment: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def use_edu_resource_in_class_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassAssignment]: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def use_edu_resource_in_class_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _use_edu_resource_in_class_serialize( self, resource, edu_resource_use_in_class, - **kwargs - ): - """Use an education resource in a class # noqa: E501 - - This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.use_edu_resource_in_class(resource, edu_resource_use_in_class, async_req=True) - >>> result = thread.get() - - Args: - resource (str): Unique identifier of the resource - edu_resource_use_in_class (EduResourceUseInClass): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ClassAssignment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['resource'] = \ - resource - kwargs['edu_resource_use_in_class'] = \ - edu_resource_use_in_class - return self.use_edu_resource_in_class_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_use_in_class is not None: + _body_params = edu_resource_use_in_class + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/useInClass', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 45516eb..75cc0c4 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -1,461 +1,844 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.group_details import GroupDetails +from flat_api.models.score_details import ScoreDetails +from flat_api.models.user_public import UserPublic -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.group_details import GroupDetails -from flat_api.model.score_details import ScoreDetails -from flat_api.model.user_public import UserPublic +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType -class GroupApi(object): +class GroupApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.get_group_details_endpoint = _Endpoint( - settings={ - 'response_type': (GroupDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/groups/{group}', - 'operation_id': 'get_group_details', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'group', - ], - 'required': [ - 'group', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'group': - (str,), - }, - 'attribute_map': { - 'group': 'group', - }, - 'location_map': { - 'group': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_group_scores_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/groups/{group}/scores', - 'operation_id': 'get_group_scores', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'group', - 'parent', - ], - 'required': [ - 'group', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'group': - (str,), - 'parent': - (str,), - }, - 'attribute_map': { - 'group': 'group', - 'parent': 'parent', - }, - 'location_map': { - 'group': 'path', - 'parent': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client + + + @validate_call + def get_group_details( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - self.list_group_users_endpoint = _Endpoint( - settings={ - 'response_type': ([UserPublic],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/groups/{group}/users', - 'operation_id': 'list_group_users', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'group', - 'source', - ], - 'required': [ - 'group', - ], - 'nullable': [ - ], - 'enum': [ - 'source', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('source',): { - - "GOOGLECLASSROOM": "googleClassroom", - "MICROSOFTGRAPH": "microsoftGraph", - "CLEVER": "clever" - }, - }, - 'openapi_types': { - 'group': - (str,), - 'source': - (str,), - }, - 'attribute_map': { - 'group': 'group', - 'source': 'source', - }, - 'location_map': { - 'group': 'path', - 'source': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def get_group_details( + + @validate_call + def get_group_details_with_http_info( self, - group, - **kwargs - ): - """Get group information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_group_details(group, async_req=True) - >>> result = thread.get() - - Args: - group (str): Unique identifier of a Flat group - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - GroupDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + + @validate_call + def get_group_details_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + return response_data.response + + + def _get_group_details_serialize( + self, + group, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['group'] = \ - group - return self.get_group_details_endpoint.call_with_http_info(**kwargs) + + + + @validate_call def get_group_scores( self, - group, - **kwargs - ): - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_group_scores(group, async_req=True) - >>> result = thread.get() - - Args: - group (str): Unique identifier of a Flat group - - Keyword Args: - parent (str): Filter the score forked from the score id `parent`. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_scores_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def get_group_scores_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['group'] = \ - group - return self.get_group_scores_endpoint.call_with_http_info(**kwargs) + return response_data.response - def list_group_users( + + def _get_group_scores_serialize( self, group, - **kwargs - ): - """List group's users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_group_users(group, async_req=True) - >>> result = thread.get() - - Args: - group (str): Unique identifier of a Flat group - - Keyword Args: - source (str): Filter the users by their source . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [UserPublic] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + + + + @validate_call + def list_group_users( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserPublic]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_group_users_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserPublic]]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_group_users_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + return response_data.response + + + def _list_group_users_serialize( + self, + group, + source, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if source is not None: + + _query_params.append(('source', source)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['group'] = \ - group - return self.list_group_users_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 2e1cf74..e5675f7 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -1,1924 +1,3798 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation -from flat_api.model.organization_invitation import OrganizationInvitation -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.user_admin_update import UserAdminUpdate -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.user_signin_link import UserSigninLink -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation - - -class OrganizationApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.lti_credentials import LtiCredentials +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.models.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.user_admin_update import UserAdminUpdate +from flat_api.models.user_creation import UserCreation +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.models.user_signin_link import UserSigninLink +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation + +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType + + +class OrganizationApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.count_orga_users_endpoint = _Endpoint( - settings={ - 'response_type': ([UserDetailsAdmin],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users/count', - 'operation_id': 'count_orga_users', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'role', - 'q', - 'group', - 'no_active_license', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'role', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('role',): { - - "USER": "user", - "TEACHER": "teacher", - "ADMIN": "admin" - }, - }, - 'openapi_types': { - 'role': - ([str],), - 'q': - (str,), - 'group': - ([str],), - 'no_active_license': - (bool,), - }, - 'attribute_map': { - 'role': 'role', - 'q': 'q', - 'group': 'group', - 'no_active_license': 'noActiveLicense', - }, - 'location_map': { - 'role': 'query', - 'q': 'query', - 'group': 'query', - 'no_active_license': 'query', - }, - 'collection_format_map': { - 'role': 'multi', - 'group': 'multi', - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.create_lti_credentials_endpoint = _Endpoint( - settings={ - 'response_type': (LtiCredentials,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/lti/credentials', - 'operation_id': 'create_lti_credentials', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [ - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (LtiCredentialsCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_organization_invitation_endpoint = _Endpoint( - settings={ - 'response_type': (OrganizationInvitation,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/invitations', - 'operation_id': 'create_organization_invitation', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (OrganizationInvitationCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_organization_user_endpoint = _Endpoint( - settings={ - 'response_type': (UserDetailsAdmin,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users', - 'operation_id': 'create_organization_user', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (UserCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_organization_user_access_token_endpoint = _Endpoint( - settings={ - 'response_type': (ApiAccessToken,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users/{user}/accessToken', - 'operation_id': 'create_organization_user_access_token', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'organization_user_access_token_creation', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'organization_user_access_token_creation': - (OrganizationUserAccessTokenCreation,), - }, - 'attribute_map': { - 'user': 'user', - }, - 'location_map': { - 'user': 'path', - 'organization_user_access_token_creation': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_organization_user_signin_link_endpoint = _Endpoint( - settings={ - 'response_type': (UserSigninLink,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users/{user}/signinLink', - 'operation_id': 'create_organization_user_signin_link', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'user_signin_link_creation', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'user_signin_link_creation': - (UserSigninLinkCreation,), - }, - 'attribute_map': { - 'user': 'user', - }, - 'location_map': { - 'user': 'path', - 'user_signin_link_creation': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.list_lti_credentials_endpoint = _Endpoint( - settings={ - 'response_type': ([LtiCredentials],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/lti/credentials', - 'operation_id': 'list_lti_credentials', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_organization_invitations_endpoint = _Endpoint( - settings={ - 'response_type': ([OrganizationInvitation],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/invitations', - 'operation_id': 'list_organization_invitations', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'role', - 'limit', - 'next', - 'previous', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'role', - ], - 'validation': [ - 'limit', - ] - }, - root_map={ - 'validations': { - ('limit',): { - - 'inclusive_maximum': 1000, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - ('role',): { - - "USER": "user", - "TEACHER": "teacher", - "ADMIN": "admin" - }, - }, - 'openapi_types': { - 'role': - (str,), - 'limit': - (int,), - 'next': - (str,), - 'previous': - (str,), - }, - 'attribute_map': { - 'role': 'role', - 'limit': 'limit', - 'next': 'next', - 'previous': 'previous', - }, - 'location_map': { - 'role': 'query', - 'limit': 'query', - 'next': 'query', - 'previous': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_organization_users_endpoint = _Endpoint( - settings={ - 'response_type': ([UserDetailsAdmin],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users', - 'operation_id': 'list_organization_users', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'sort', - 'direction', - 'next', - 'previous', - 'role', - 'q', - 'group', - 'no_active_license', - 'license_expiration_date', - 'only_ids', - 'limit', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - 'sort', - 'direction', - 'role', - ], - 'validation': [ - 'limit', - ] - }, - root_map={ - 'validations': { - ('limit',): { - - 'inclusive_maximum': 1000, - 'inclusive_minimum': 1, - }, - }, - 'allowed_values': { - ('sort',): { - - "FIRSTNAME": "firstname", - "LASTNAME": "lastname", - "LASTACTIVITYDATE": "lastActivityDate", - "LICENSEEXPIRATIONDATE": "licenseExpirationDate" - }, - ('direction',): { - - "ASC": "asc", - "DESC": "desc" - }, - ('role',): { - - "USER": "user", - "TEACHER": "teacher", - "ADMIN": "admin" - }, - }, - 'openapi_types': { - 'sort': - ([str],), - 'direction': - (str,), - 'next': - (str,), - 'previous': - (str,), - 'role': - ([str],), - 'q': - (str,), - 'group': - ([str],), - 'no_active_license': - (bool,), - 'license_expiration_date': - ([str],), - 'only_ids': - (bool,), - 'limit': - (int,), - }, - 'attribute_map': { - 'sort': 'sort', - 'direction': 'direction', - 'next': 'next', - 'previous': 'previous', - 'role': 'role', - 'q': 'q', - 'group': 'group', - 'no_active_license': 'noActiveLicense', - 'license_expiration_date': 'licenseExpirationDate', - 'only_ids': 'onlyIds', - 'limit': 'limit', - }, - 'location_map': { - 'sort': 'query', - 'direction': 'query', - 'next': 'query', - 'previous': 'query', - 'role': 'query', - 'q': 'query', - 'group': 'query', - 'no_active_license': 'query', - 'license_expiration_date': 'query', - 'only_ids': 'query', - 'limit': 'query', - }, - 'collection_format_map': { - 'sort': 'multi', - 'role': 'multi', - 'group': 'multi', - 'license_expiration_date': 'multi', - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.remove_organization_invitation_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/invitations/{invitation}', - 'operation_id': 'remove_organization_invitation', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'invitation', - ], - 'required': [ - 'invitation', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'invitation': - (str,), - }, - 'attribute_map': { - 'invitation': 'invitation', - }, - 'location_map': { - 'invitation': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.remove_organization_user_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users/{user}', - 'operation_id': 'remove_organization_user', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'convert_to_individual', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'convert_to_individual': - (bool,), - }, - 'attribute_map': { - 'user': 'user', - 'convert_to_individual': 'convertToIndividual', - }, - 'location_map': { - 'user': 'path', - 'convert_to_individual': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_lti_credentials_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/lti/credentials/{credentials}', - 'operation_id': 'revoke_lti_credentials', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'credentials', - ], - 'required': [ - 'credentials', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'credentials': - (str,), - }, - 'attribute_map': { - 'credentials': 'credentials', - }, - 'location_map': { - 'credentials': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_organization_user_endpoint = _Endpoint( - settings={ - 'response_type': (UserDetailsAdmin,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/organizations/users/{user}', - 'operation_id': 'update_organization_user', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'body', - ], - 'required': [ - 'user', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'body': - (UserAdminUpdate,), - }, - 'attribute_map': { - 'user': 'user', - }, - 'location_map': { - 'user': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def count_orga_users( self, - **kwargs - ): - """Count the organization users using the provided filters # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.count_orga_users(async_req=True) - >>> result = thread.get() - - - Keyword Args: - role ([str]): Filter users by role. [optional] - q (str): The query to search. [optional] - group ([str]): Filter users by group. [optional] - no_active_license (bool): Filter users who don't have an active license. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [UserDetailsAdmin] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.count_orga_users_endpoint.call_with_http_info(**kwargs) - + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserDetailsAdmin]: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def count_orga_users_with_http_info( + self, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserDetailsAdmin]]: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def count_orga_users_without_preload_content( + self, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _count_orga_users_serialize( + self, + role, + q, + group, + no_active_license, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'role': 'multi', + 'group': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if role is not None: + + _query_params.append(('role', role)) + + if q is not None: + + _query_params.append(('q', q)) + + if group is not None: + + _query_params.append(('group', group)) + + if no_active_license is not None: + + _query_params.append(('noActiveLicense', no_active_license)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/users/count', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_lti_credentials( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LtiCredentials: + """Create a new couple of LTI 1.x credentials + + Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_lti_credentials_with_http_info( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LtiCredentials]: + """Create a new couple of LTI 1.x credentials + + Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_lti_credentials_without_preload_content( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new couple of LTI 1.x credentials + + Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lti_credentials_serialize( self, body, - **kwargs - ): - """Create a new couple of LTI 1.x credentials # noqa: E501 - - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_lti_credentials(body, async_req=True) - >>> result = thread.get() - - Args: - body (LtiCredentialsCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - LtiCredentials - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['body'] = \ - body - return self.create_lti_credentials_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/lti/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_organization_invitation( self, - **kwargs - ): - """Create a new invitation to join the organization # noqa: E501 - - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_organization_invitation(async_req=True) - >>> result = thread.get() - - - Keyword Args: - body (OrganizationInvitationCreation): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - OrganizationInvitation - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.create_organization_invitation_endpoint.call_with_http_info(**kwargs) - + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OrganizationInvitation: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_organization_invitation_with_http_info( + self, + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OrganizationInvitation]: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_organization_invitation_without_preload_content( + self, + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_invitation_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_organization_user( self, - **kwargs - ): - """Create a new user account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_organization_user(async_req=True) - >>> result = thread.get() - - - Keyword Args: - body (UserCreation): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserDetailsAdmin - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.create_organization_user_endpoint.call_with_http_info(**kwargs) - + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetailsAdmin: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_organization_user_with_http_info( + self, + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetailsAdmin]: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_organization_user_without_preload_content( + self, + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_organization_user_access_token( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiAccessToken: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_organization_user_access_token_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAccessToken]: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_organization_user_access_token_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_access_token_serialize( self, user, - **kwargs - ): - """Create a delegated API access token for an organization user # noqa: E501 - - This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_organization_user_access_token(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of the Flat account - - Keyword Args: - organization_user_access_token_creation (OrganizationUserAccessTokenCreation): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ApiAccessToken - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.create_organization_user_access_token_endpoint.call_with_http_info(**kwargs) - + organization_user_access_token_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if organization_user_access_token_creation is not None: + _body_params = organization_user_access_token_creation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users/{user}/accessToken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_organization_user_signin_link( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserSigninLink: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_organization_user_signin_link_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserSigninLink]: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_organization_user_signin_link_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_signin_link_serialize( self, user, - **kwargs - ): - """Create a sign in link for an organization user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_organization_user_signin_link(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of the Flat account - - Keyword Args: - user_signin_link_creation (UserSigninLinkCreation): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserSigninLink - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.create_organization_user_signin_link_endpoint.call_with_http_info(**kwargs) - + user_signin_link_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_signin_link_creation is not None: + _body_params = user_signin_link_creation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users/{user}/signinLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_lti_credentials( self, - **kwargs - ): - """List LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_lti_credentials(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [LtiCredentials] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_lti_credentials_endpoint.call_with_http_info(**kwargs) + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LtiCredentials]: + """List LTI 1.x credentials + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_lti_credentials_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LtiCredentials]]: + """List LTI 1.x credentials + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_lti_credentials_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List LTI 1.x credentials + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_lti_credentials_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/lti/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_organization_invitations( self, - **kwargs - ): - """List the organization invitations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_organization_invitations(async_req=True) - >>> result = thread.get() - - - Keyword Args: - role (str): Filter users by role. [optional] - limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 50 - next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [OrganizationInvitation] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_organization_invitations_endpoint.call_with_http_info(**kwargs) - + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OrganizationInvitation]: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_organization_invitations_with_http_info( + self, + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OrganizationInvitation]]: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_organization_invitations_without_preload_content( + self, + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_invitations_serialize( + self, + role, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if role is not None: + + _query_params.append(('role', role)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_organization_users( self, - **kwargs - ): - """List the organization users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_organization_users(async_req=True) - >>> result = thread.get() - - - Keyword Args: - sort ([str]): The order to sort the user list. [optional] - direction (str): Sort direction. [optional] - next (str): An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - previous (str): An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. . [optional] - role ([str]): Filter users by role. [optional] - q (str): The query to search. [optional] - group ([str]): Filter users by group. [optional] - no_active_license (bool): Filter users who don't have an active license. [optional] - license_expiration_date ([str]): Filter users by license expiration date or `active` / `notActive`. [optional] - only_ids (bool): Return only user ids. [optional] - limit (int): This is the maximum number of objects that may be returned. [optional] if omitted the server will use the default value of 25 - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [UserDetailsAdmin] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.list_organization_users_endpoint.call_with_http_info(**kwargs) - + sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserDetailsAdmin]: + """List the organization users + + + :param sort: The order to sort the user list + :type sort: List[str] + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_organization_users_with_http_info( + self, + sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserDetailsAdmin]]: + """List the organization users + + + :param sort: The order to sort the user list + :type sort: List[str] + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_organization_users_without_preload_content( + self, + sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the organization users + + + :param sort: The order to sort the user list + :type sort: List[str] + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_users_serialize( + self, + sort, + direction, + next, + previous, + role, + q, + group, + no_active_license, + license_expiration_date, + only_ids, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'sort': 'multi', + 'role': 'multi', + 'group': 'multi', + 'licenseExpirationDate': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if role is not None: + + _query_params.append(('role', role)) + + if q is not None: + + _query_params.append(('q', q)) + + if group is not None: + + _query_params.append(('group', group)) + + if no_active_license is not None: + + _query_params.append(('noActiveLicense', no_active_license)) + + if license_expiration_date is not None: + + _query_params.append(('licenseExpirationDate', license_expiration_date)) + + if only_ids is not None: + + _query_params.append(('onlyIds', only_ids)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def remove_organization_invitation( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_organization_invitation_with_http_info( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_organization_invitation_without_preload_content( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_invitation_serialize( self, invitation, - **kwargs - ): - """Remove an organization invitation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_organization_invitation(invitation, async_req=True) - >>> result = thread.get() - - Args: - invitation (str): Unique identifier of the invitation - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['invitation'] = \ - invitation - return self.remove_organization_invitation_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + # process the path parameters + if invitation is not None: + _path_params['invitation'] = invitation + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/invitations/{invitation}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def remove_organization_user( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_organization_user_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_organization_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_user_serialize( self, user, - **kwargs - ): - """Remove an account from Flat # noqa: E501 - - This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_organization_user(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of the Flat account - - Keyword Args: - convert_to_individual (bool): If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.remove_organization_user_endpoint.call_with_http_info(**kwargs) - + convert_to_individual, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if convert_to_individual is not None: + + _query_params.append(('convertToIndividual', convert_to_individual)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def revoke_lti_credentials( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke LTI 1.x credentials + + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_lti_credentials_with_http_info( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke LTI 1.x credentials + + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_lti_credentials_without_preload_content( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke LTI 1.x credentials + + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_lti_credentials_serialize( self, credentials, - **kwargs - ): - """Revoke LTI 1.x credentials # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.revoke_lti_credentials(credentials, async_req=True) - >>> result = thread.get() - - Args: - credentials (str): Credentials unique identifier - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['credentials'] = \ - credentials - return self.revoke_lti_credentials_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if credentials is not None: + _path_params['credentials'] = credentials + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/lti/credentials/{credentials}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_organization_user( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetailsAdmin: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_organization_user_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetailsAdmin]: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_organization_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_organization_user_serialize( self, user, body, - **kwargs - ): - """Update account information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_organization_user(user, body, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of the Flat account - body (UserAdminUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserDetailsAdmin - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - kwargs['body'] = \ - body - return self.update_organization_user_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/organizations/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index dd25599..762cfe7 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -1,4509 +1,8975 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - + Generated by OpenAPI Generator (https://openapi-generator.tech) -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.score_comment import ScoreComment -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment_update import ScoreCommentUpdate -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_details import ScoreDetails -from flat_api.model.score_fork import ScoreFork -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_track import ScoreTrack -from flat_api.model.score_track_creation import ScoreTrackCreation -from flat_api.model.score_track_update import ScoreTrackUpdate -from flat_api.model.task import Task -from flat_api.model.task_export_options import TaskExportOptions - - -class ScoreApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.models.score_comment import ScoreComment +from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.models.score_comment_update import ScoreCommentUpdate +from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_fork import ScoreFork +from flat_api.models.score_modification import ScoreModification +from flat_api.models.score_revision import ScoreRevision +from flat_api.models.score_revision_creation import ScoreRevisionCreation +from flat_api.models.score_track import ScoreTrack +from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_update import ScoreTrackUpdate +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions + +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType + + +class ScoreApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.add_score_collaborator_endpoint = _Endpoint( - settings={ - 'response_type': (ResourceCollaborator,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/collaborators', - 'operation_id': 'add_score_collaborator', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - ], - 'required': [ - 'score', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ResourceCollaboratorCreation,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.add_score_track_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreTrack,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/tracks', - 'operation_id': 'add_score_track', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - ], - 'required': [ - 'score', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ScoreTrackCreation,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_export_task_endpoint = _Endpoint( - settings={ - 'response_type': (Task,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/revisions/{revision}/{format}/task', - 'operation_id': 'create_export_task', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'revision', - 'format', - 'sharing_key', - 'body', - ], - 'required': [ - 'score', - 'revision', - 'format', - ], - 'nullable': [ - ], - 'enum': [ - 'format', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('format',): { - - "MP3": "mp3", - "WAV": "wav", - "PRACTICEFIRST": "practicefirst" - }, - }, - 'openapi_types': { - 'score': - (str,), - 'revision': - (str,), - 'format': - (str,), - 'sharing_key': - (str,), - 'body': - (TaskExportOptions,), - }, - 'attribute_map': { - 'score': 'score', - 'revision': 'revision', - 'format': 'format', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'revision': 'path', - 'format': 'path', - 'sharing_key': 'query', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_score_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores', - 'operation_id': 'create_score', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [ - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (ScoreCreation,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_score_revision_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreRevision,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/revisions', - 'operation_id': 'create_score_revision', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - ], - 'required': [ - 'score', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ScoreRevisionCreation,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_score_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}', - 'operation_id': 'delete_score', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'now', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'now': - (bool,), - }, - 'attribute_map': { - 'score': 'score', - 'now': 'now', - }, - 'location_map': { - 'score': 'path', - 'now': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_score_comment_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments/{comment}', - 'operation_id': 'delete_score_comment', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'comment', - 'sharing_key', - ], - 'required': [ - 'score', - 'comment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'comment': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'comment': 'comment', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'comment': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_score_track_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/tracks/{track}', - 'operation_id': 'delete_score_track', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'track', - ], - 'required': [ - 'score', - 'track', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'track': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'track': 'track', - }, - 'location_map': { - 'score': 'path', - 'track': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.edit_score_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}', - 'operation_id': 'edit_score', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ScoreModification,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.fork_score_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/fork', - 'operation_id': 'fork_score', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - 'sharing_key', - ], - 'required': [ - 'score', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ScoreFork,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.ger_user_likes_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/users/{user}/likes', - 'operation_id': 'ger_user_likes', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'ids', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'ids': - (bool,), - }, - 'attribute_map': { - 'user': 'user', - 'ids': 'ids', - }, - 'location_map': { - 'user': 'path', - 'ids': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_group_scores_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/groups/{group}/scores', - 'operation_id': 'get_group_scores', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'group', - 'parent', - ], - 'required': [ - 'group', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'group': - (str,), - 'parent': - (str,), - }, - 'attribute_map': { - 'group': 'group', - 'parent': 'parent', - }, - 'location_map': { - 'group': 'path', - 'parent': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreDetails,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}', - 'operation_id': 'get_score', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'sharing_key', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_collaborator_endpoint = _Endpoint( - settings={ - 'response_type': (ResourceCollaborator,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/collaborators/{collaborator}', - 'operation_id': 'get_score_collaborator', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'collaborator', - 'sharing_key', - ], - 'required': [ - 'score', - 'collaborator', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'collaborator': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'collaborator': 'collaborator', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'collaborator': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_collaborators_endpoint = _Endpoint( - settings={ - 'response_type': ([ResourceCollaborator],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/collaborators', - 'operation_id': 'get_score_collaborators', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'sharing_key', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_comments_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreComment],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments', - 'operation_id': 'get_score_comments', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'sharing_key', - 'type', - 'sort', - 'direction', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - 'type', - 'sort', - 'direction', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('type',): { - - "DOCUMENT": "document", - "INLINE": "inline" - }, - ('sort',): { - - "DATE": "date" - }, - ('direction',): { - - "ASC": "asc", - "DESC": "desc" - }, - }, - 'openapi_types': { - 'score': - (str,), - 'sharing_key': - (str,), - 'type': - (str,), - 'sort': - (str,), - 'direction': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - 'type': 'type', - 'sort': 'sort', - 'direction': 'direction', - }, - 'location_map': { - 'score': 'path', - 'sharing_key': 'query', - 'type': 'query', - 'sort': 'query', - 'direction': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_revision_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreRevision,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/revisions/{revision}', - 'operation_id': 'get_score_revision', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'revision', - 'sharing_key', - ], - 'required': [ - 'score', - 'revision', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'revision': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'revision': 'revision', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'revision': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_revision_data_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/revisions/{revision}/{format}', - 'operation_id': 'get_score_revision_data', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'revision', - 'format', - 'sharing_key', - 'parts', - 'default_track', - 'url', - ], - 'required': [ - 'score', - 'revision', - 'format', - ], - 'nullable': [ - ], - 'enum': [ - 'format', - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - ('format',): { - - "JSON": "json", - "MXL": "mxl", - "XML": "xml", - "MP3": "mp3", - "WAV": "wav", - "MIDI": "midi", - "THUMBNAIL.PNG": "thumbnail.png", - "SYNCHRONIZATIONPOINTS": "synchronizationPoints" - }, - }, - 'openapi_types': { - 'score': - (str,), - 'revision': - (str,), - 'format': - (str,), - 'sharing_key': - (str,), - 'parts': - (str,), - 'default_track': - (bool,), - 'url': - (bool,), - }, - 'attribute_map': { - 'score': 'score', - 'revision': 'revision', - 'format': 'format', - 'sharing_key': 'sharingKey', - 'parts': 'parts', - 'default_track': 'defaultTrack', - 'url': 'url', - }, - 'location_map': { - 'score': 'path', - 'revision': 'path', - 'format': 'path', - 'sharing_key': 'query', - 'parts': 'query', - 'default_track': 'query', - 'url': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json', - 'application/vnd.recordare.musicxml+xml', - 'application/vnd.recordare.musicxml', - 'audio/mp3', - 'audio/wav', - 'audio/midi', - 'image/png' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_revisions_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreRevision],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/revisions', - 'operation_id': 'get_score_revisions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'sharing_key', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_submissions_endpoint = _Endpoint( - settings={ - 'response_type': ([AssignmentSubmission],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/submissions', - 'operation_id': 'get_score_submissions', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_score_track_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreTrack,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/tracks/{track}', - 'operation_id': 'get_score_track', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'track', - 'sharing_key', - ], - 'required': [ - 'score', - 'track', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'track': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'track': 'track', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'track': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_user_scores_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/users/{user}/scores', - 'operation_id': 'get_user_scores', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'parent', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'parent': - (str,), - }, - 'attribute_map': { - 'user': 'user', - 'parent': 'parent', - }, - 'location_map': { - 'user': 'path', - 'parent': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_score_tracks_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreTrack],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/tracks', - 'operation_id': 'list_score_tracks', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'sharing_key', - 'assignment', - 'list_auto_track', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'sharing_key': - (str,), - 'assignment': - (str,), - 'list_auto_track': - (bool,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - 'assignment': 'assignment', - 'list_auto_track': 'listAutoTrack', - }, - 'location_map': { - 'score': 'path', - 'sharing_key': 'query', - 'assignment': 'query', - 'list_auto_track': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.mark_score_comment_resolved_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments/{comment}/resolved', - 'operation_id': 'mark_score_comment_resolved', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'comment', - 'sharing_key', - ], - 'required': [ - 'score', - 'comment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'comment': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'comment': 'comment', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'comment': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.mark_score_comment_unresolved_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments/{comment}/resolved', - 'operation_id': 'mark_score_comment_unresolved', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'comment', - 'sharing_key', - ], - 'required': [ - 'score', - 'comment', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'comment': - (str,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'comment': 'comment', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'comment': 'path', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.post_score_comment_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreComment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments', - 'operation_id': 'post_score_comment', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'body', - 'sharing_key', - ], - 'required': [ - 'score', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'body': - (ScoreCommentCreation,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'body': 'body', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.remove_score_collaborator_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/collaborators/{collaborator}', - 'operation_id': 'remove_score_collaborator', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'collaborator', - ], - 'required': [ - 'score', - 'collaborator', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'collaborator': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'collaborator': 'collaborator', - }, - 'location_map': { - 'score': 'path', - 'collaborator': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.untrash_score_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/untrash', - 'operation_id': 'untrash_score', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - ], - 'required': [ - 'score', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - }, - 'attribute_map': { - 'score': 'score', - }, - 'location_map': { - 'score': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_score_comment_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreComment,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/comments/{comment}', - 'operation_id': 'update_score_comment', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'comment', - 'body', - 'sharing_key', - ], - 'required': [ - 'score', - 'comment', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'comment': - (str,), - 'body': - (ScoreCommentUpdate,), - 'sharing_key': - (str,), - }, - 'attribute_map': { - 'score': 'score', - 'comment': 'comment', - 'sharing_key': 'sharingKey', - }, - 'location_map': { - 'score': 'path', - 'comment': 'path', - 'body': 'body', - 'sharing_key': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_score_track_endpoint = _Endpoint( - settings={ - 'response_type': (ScoreTrack,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/scores/{score}/tracks/{track}', - 'operation_id': 'update_score_track', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'score', - 'track', - 'body', - ], - 'required': [ - 'score', - 'track', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'score': - (str,), - 'track': - (str,), - 'body': - (ScoreTrackUpdate,), - }, - 'attribute_map': { - 'score': 'score', - 'track': 'track', - }, - 'location_map': { - 'score': 'path', - 'track': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def add_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a new collaborator + + Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_collaborator_serialize( self, score, body, - **kwargs - ): - """Add a new collaborator # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_score_collaborator(score, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (ResourceCollaboratorCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ResourceCollaborator - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['body'] = \ - body - return self.add_score_collaborator_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/collaborators', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def add_score_track( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreTrack: + """Add a new video or audio track to the score + + Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreTrack]: + """Add a new video or audio track to the score + + Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a new video or audio track to the score + + Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_track_serialize( self, score, body, - **kwargs - ): - """Add a new video or audio track to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_score_track(score, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (ScoreTrackCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreTrack - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['body'] = \ - body - return self.add_score_track_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/tracks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_export_task( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_export_task_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_export_task_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_export_task_serialize( self, score, revision, format, - **kwargs - ): - """Create a new score export task # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_export_task(score, revision, format, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - format (str): The format of the file that will be generated or the target service name where the file will be exported - - Keyword Args: - sharing_key (str): 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] - body (TaskExportOptions): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Task - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['revision'] = \ - revision - kwargs['format'] = \ - format - return self.create_export_task_endpoint.call_with_http_info(**kwargs) - + sharing_key, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + if format is not None: + _path_params['format'] = format + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/revisions/{revision}/{format}/task', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_score( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_score_with_http_info( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_score_without_preload_content( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_score_serialize( self, body, - **kwargs - ): - """Create a new score # noqa: E501 - - 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_score(body, async_req=True) - >>> result = thread.get() - - Args: - body (ScoreCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['body'] = \ - body - return self.create_score_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create_score_revision( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreRevision: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_score_revision_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreRevision]: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_score_revision_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_score_revision_serialize( self, score, body, - **kwargs - ): - """Create a new revision # noqa: E501 - - Update a score by uploading a new revision for this one. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_score_revision(score, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (ScoreRevisionCreation): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreRevision - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['body'] = \ - body - return self.create_score_revision_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/revisions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a score + + This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a score + + This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a score + + This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_serialize( self, score, - **kwargs - ): - """Delete a score # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_score(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - now (bool): If `true`, the score deletion will be scheduled to be done ASAP. [optional] if omitted the server will use the default value of False - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.delete_score_endpoint.call_with_http_info(**kwargs) - + now, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if now is not None: + + _query_params.append(('now', now)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_comment_serialize( self, score, comment, - **kwargs - ): - """Delete a comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_score_comment(score, comment, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a sheet music comment - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['comment'] = \ - comment - return self.delete_score_comment_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def delete_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_track_serialize( self, score, track, - **kwargs - ): - """Remove an audio or video track linked to the score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_score_track(score, track, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score audio track - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['track'] = \ - track - return self.delete_score_track_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def edit_score( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def edit_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def edit_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_score_serialize( self, score, - **kwargs - ): - """Edit a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.edit_score(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - body (ScoreModification): [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.edit_score_endpoint.call_with_http_info(**kwargs) - + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def fork_score( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def fork_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def fork_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _fork_score_serialize( self, score, body, - **kwargs - ): - """Fork a score # noqa: E501 - - 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fork_score(score, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (ScoreFork): - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['body'] = \ - body - return self.fork_score_endpoint.call_with_http_info(**kwargs) - - def ger_user_likes( - self, - user, - **kwargs - ): - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.ger_user_likes(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - - Keyword Args: - ids (bool): Return only the identifiers of the scores. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.ger_user_likes_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/fork', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_group_scores( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_scores_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_scores_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_scores_serialize( self, group, - **kwargs - ): - """List group's scores # noqa: E501 - - Get the list of scores shared with a group. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_group_scores(group, async_req=True) - >>> result = thread.get() - - Args: - group (str): Unique identifier of a Flat group - - Keyword Args: - parent (str): Filter the score forked from the score id `parent`. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['group'] = \ - group - return self.get_group_scores_endpoint.call_with_http_info(**kwargs) - + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a score's metadata + + Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_serialize( self, score, - **kwargs - ): - """Get a score's metadata # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreDetails - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceCollaborator: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResourceCollaborator]: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_collaborator_serialize( self, score, collaborator, - **kwargs - ): - """Get a collaborator # noqa: E501 - - Get the information about a collaborator (User or Group). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_collaborator(score, collaborator, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ResourceCollaborator - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['collaborator'] = \ - collaborator - return self.get_score_collaborator_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if collaborator is not None: + _path_params['collaborator'] = collaborator + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/collaborators/{collaborator}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_collaborators( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_collaborators_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_collaborators_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the collaborators + + This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_collaborators_serialize( self, score, - **kwargs - ): - """List the collaborators # noqa: E501 - - 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). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_collaborators(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ResourceCollaborator] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_collaborators_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/collaborators', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_comments( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreComment]: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + sharing_key=sharing_key, + type=type, + sort=sort, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_comments_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreComment]]: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + sharing_key=sharing_key, + type=type, + sort=sort, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_comments_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + sharing_key=sharing_key, + type=type, + sort=sort, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_comments_serialize( self, score, - **kwargs - ): - """List comments # noqa: E501 - - This method lists the different comments added on a music score (documents and inline) sorted by their post dates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_comments(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - sharing_key (str): 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 (str): Filter the comments by type. [optional] - sort (str): Sort. [optional] if omitted the server will use the default value of "date" - direction (str): Sort direction. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreComment] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_comments_endpoint.call_with_http_info(**kwargs) - + sharing_key, + type, + sort, + direction, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if type is not None: + + _query_params.append(('type', type)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_revision( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_revision_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_revision_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a score revision + + When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revision_serialize( self, score, revision, - **kwargs - ): - """Get a score revision # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_revision(score, revision, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreRevision - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['revision'] = \ - revision - return self.get_score_revision_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions/{revision}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_revision_data( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_revision_data_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_revision_data_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revision_data_serialize( self, score, revision, format, - **kwargs - ): - """Get a score revision data # noqa: E501 - - 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_revision_data(score, revision, format, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. - format (str): The format of the file you will retrieve - - Keyword Args: - sharing_key (str): 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 (str): An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". . [optional] - default_track (bool): When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. . [optional] - url (bool): Returns a json with the `url` in it instead of redirecting . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - file_type - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['revision'] = \ - revision - kwargs['format'] = \ - format - return self.get_score_revision_data_endpoint.call_with_http_info(**kwargs) - + sharing_key, + parts, + default_track, + url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + if format is not None: + _path_params['format'] = format + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if parts is not None: + + _query_params.append(('parts', parts)) + + if default_track is not None: + + _query_params.append(('defaultTrack', default_track)) + + if url is not None: + + _query_params.append(('url', url)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'application/vnd.recordare.musicxml+xml', + 'application/vnd.recordare.musicxml', + 'audio/mp3', + 'audio/wav', + 'audio/midi', + 'image/png' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions/{revision}/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_revisions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_revisions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_revisions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the revisions + + When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revisions_serialize( self, score, - **kwargs - ): - """List the revisions # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_revisions(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreRevision] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_revisions_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_submissions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_submissions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_submissions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List submissions related to the score + + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_submissions_serialize( self, score, - **kwargs - ): - """List submissions related to the score # noqa: E501 - - 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. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_submissions(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [AssignmentSubmission] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.get_score_submissions_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreTrack: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreTrack]: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_track_serialize( self, score, track, - **kwargs - ): - """Retrieve the details of an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_score_track(score, track, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score audio track - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreTrack - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['track'] = \ - track - return self.get_score_track_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_likes( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_likes_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_likes_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_likes_serialize( + self, + user, + next, + previous, + limit, + ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if ids is not None: + + _query_params.append(('ids', ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/likes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get_user_scores( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_scores_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_scores_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_scores_serialize( self, user, - **kwargs - ): - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_scores(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - - Keyword Args: - parent (str): Filter the score forked from the score id `parent`. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.get_user_scores_endpoint.call_with_http_info(**kwargs) - + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def list_score_tracks( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreTrack]: + """List the audio or video tracks linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_score_tracks_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreTrack]]: + """List the audio or video tracks linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_score_tracks_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the audio or video tracks linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_score_tracks_serialize( self, score, - **kwargs - ): - """List the audio or video tracks linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_score_tracks(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - sharing_key (str): 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] - assignment (str): An assignment id with which all the tracks returned will be related to . [optional] - list_auto_track (bool): If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track . [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreTrack] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.list_score_tracks_endpoint.call_with_http_info(**kwargs) - + sharing_key, + assignment, + list_auto_track, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if assignment is not None: + + _query_params.append(('assignment', assignment)) + + if list_auto_track is not None: + + _query_params.append(('listAutoTrack', list_auto_track)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/tracks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def mark_score_comment_resolved( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def mark_score_comment_resolved_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def mark_score_comment_resolved_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _mark_score_comment_resolved_serialize( self, score, comment, - **kwargs - ): - """Mark the comment as resolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.mark_score_comment_resolved(score, comment, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a sheet music comment - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['comment'] = \ - comment - return self.mark_score_comment_resolved_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/comments/{comment}/resolved', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def mark_score_comment_unresolved( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def mark_score_comment_unresolved_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def mark_score_comment_unresolved_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _mark_score_comment_unresolved_serialize( self, score, comment, - **kwargs - ): - """Mark the comment as unresolved # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.mark_score_comment_unresolved(score, comment, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a sheet music comment - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['comment'] = \ - comment - return self.mark_score_comment_unresolved_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/comments/{comment}/resolved', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def post_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Post a new comment + + Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_score_comment_serialize( self, score, body, - **kwargs - ): - """Post a new comment # noqa: E501 - - 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`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.post_score_comment(score, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (ScoreCommentCreation): - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreComment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['body'] = \ - body - return self.post_score_comment_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def remove_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_score_collaborator_serialize( self, score, collaborator, - **kwargs - ): - """Delete a collaborator # noqa: E501 - - Remove the specified collaborator from the score # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_score_collaborator(score, collaborator, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['collaborator'] = \ - collaborator - return self.remove_score_collaborator_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if collaborator is not None: + _path_params['collaborator'] = collaborator + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/collaborators/{collaborator}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def untrash_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def untrash_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def untrash_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _untrash_score_serialize( self, score, - **kwargs - ): - """Untrash a score # noqa: E501 - - This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.untrash_score(score, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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`). - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - return self.untrash_score_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/untrash', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreComment: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreComment]: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_score_comment_serialize( self, score, comment, body, - **kwargs - ): - """Update an existing comment # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_score_comment(score, comment, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a sheet music comment - body (ScoreCommentUpdate): - - Keyword Args: - sharing_key (str): 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] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreComment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['comment'] = \ - comment - kwargs['body'] = \ - body - return self.update_score_comment_endpoint.call_with_http_info(**kwargs) - + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreTrack: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreTrack]: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_score_track_serialize( self, score, track, body, - **kwargs - ): - """Update an audio or video track linked to a score # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_score_track(score, track, body, async_req=True) - >>> result = thread.get() - - Args: - score (str): 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 (str): Unique identifier of a score audio track - body (ScoreTrackUpdate): - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ScoreTrack - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['score'] = \ - score - kwargs['track'] = \ - track - kwargs['body'] = \ - body - return self.update_score_track_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py index 2cde8dc..53e1130 100644 --- a/flat_api/api/task_api.py +++ b/flat_api/api/task_api.py @@ -1,174 +1,297 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from flat_api.models.task import Task -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.task import Task +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType -class TaskApi(object): +class TaskApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.get_task_endpoint = _Endpoint( - settings={ - 'response_type': (Task,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/tasks/{task}', - 'operation_id': 'get_task', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'task', - ], - 'required': [ - 'task', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'task': - (str,), - }, - 'attribute_map': { - 'task': 'task', - }, - 'location_map': { - 'task': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def get_task( self, - task, - **kwargs - ): - """Get a task details # noqa: E501 - - This method can be used to follow a task progression, for example while a score is being exported. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_task(task, async_req=True) - >>> result = thread.get() - - Args: - task (str): Unique identifier for the task - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Task - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Task: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_task_with_http_info( + self, + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Task]: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def get_task_without_preload_content( + self, + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_task_serialize( + self, + task, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task is not None: + _path_params['task'] = task + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/tasks/{task}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['task'] = \ - task - return self.get_task_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index 2eb12b0..f572582 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -1,454 +1,897 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated -import re # noqa: F401 -import sys # noqa: F401 +from pydantic import Field, StrictBool, StrictStr +from typing import Optional +from typing_extensions import Annotated +from flat_api.models.score_details import ScoreDetails +from flat_api.models.user_public import UserPublic -from flat_api.api_client import ApiClient, Endpoint as _Endpoint -from flat_api.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.score_details import ScoreDetails -from flat_api.model.user_public import UserPublic +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType -class UserApi(object): +class UserApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.ger_user_likes_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/users/{user}/likes', - 'operation_id': 'ger_user_likes', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'ids', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'ids': - (bool,), - }, - 'attribute_map': { - 'user': 'user', - 'ids': 'ids', - }, - 'location_map': { - 'user': 'path', - 'ids': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_user_endpoint = _Endpoint( - settings={ - 'response_type': (UserPublic,), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/users/{user}', - 'operation_id': 'get_user', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - }, - 'attribute_map': { - 'user': 'user', - }, - 'location_map': { - 'user': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client + + + @validate_call + def get_user( + self, + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserPublic: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - self.get_user_scores_endpoint = _Endpoint( - settings={ - 'response_type': ([ScoreDetails],), - 'auth': [ - 'OAuth2' - ], - 'endpoint_path': '/users/{user}/scores', - 'operation_id': 'get_user_scores', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'user', - 'parent', - ], - 'required': [ - 'user', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'user': - (str,), - 'parent': - (str,), - }, - 'attribute_map': { - 'user': 'user', - 'parent': 'parent', - }, - 'location_map': { - 'user': 'path', - 'parent': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + - def ger_user_likes( + @validate_call + def get_user_with_http_info( self, - user, - **kwargs - ): - """List liked scores # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.ger_user_likes(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - - Keyword Args: - ids (bool): Return only the identifiers of the scores. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserPublic]: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + + @validate_call + def get_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + return response_data.response + + + def _get_user_serialize( + self, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.ger_user_likes_endpoint.call_with_http_info(**kwargs) - def get_user( + + + + @validate_call + def get_user_likes( self, - user, - **kwargs - ): - """Get a public user profile # noqa: E501 - - Get a profile of a Flat or Flat for Education User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - UserPublic - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_likes_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def get_user_likes_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.get_user_endpoint.call_with_http_info(**kwargs) + return response_data.response - def get_user_scores( + + def _get_user_likes_serialize( self, user, - **kwargs - ): - """List user's scores # noqa: E501 - - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_scores(user, async_req=True) - >>> result = thread.get() - - Args: - user (str): Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - - Keyword Args: - parent (str): Filter the score forked from the score id `parent`. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [ScoreDetails] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + next, + previous, + limit, + ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if ids is not None: + + _query_params.append(('ids', ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/likes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + + + + + @validate_call + def get_user_scores( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_scores_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_scores_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List user's scores + + Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + return response_data.response + + + def _get_user_scores_serialize( + self, + user, + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['user'] = \ - user - return self.get_user_scores_endpoint.call_with_http_info(**kwargs) + diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 070d9f7..418c43f 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -1,46 +1,47 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import datetime +from dateutil.parser import parse +from enum import Enum import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict -from flat_api import rest from flat_api.configuration import Configuration -from flat_api.exceptions import ApiTypeError, ApiValueError, ApiException -from flat_api.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from flat_api.api_response import ApiResponse, T as ApiResponseT +import flat_api.models +from flat_api import rest +from flat_api.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -48,28 +49,38 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -77,31 +88,14 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'flat_api/1.0.0' + self.user_agent = 'flat_api/1.1.0' + self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + pass @property def user_agent(self): @@ -115,27 +109,69 @@ def user_agent(self, value): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -146,14 +182,17 @@ def __call_api( header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( @@ -161,32 +200,31 @@ def __call_api( quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body, - request_auths=_request_auths) - # request url if _host is None: url = self.configuration.host + resource_path @@ -194,74 +232,106 @@ def __call_api( # use server/host defined in path or operation instead url = _host + resource_path + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data - return_data = response_data + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg - if not _preload_content: - return (return_data) - return return_data + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None content_type = response_data.getheader('content-type') if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance( - v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date @@ -269,237 +339,102 @@ def sanitize_for_serialization(cls, obj): If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes + :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, - val in model_to_dict( - obj, - serialize=True).items()} - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError( - 'Unable to prepare type {} for serialization'.format( - obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object try: - received_data = json.loads(response.data) + data = json.loads(response_text) except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + data = response_text - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. + return self.__deserialize(data, response_type) - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :param _request_auths: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auths: list, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type, _request_auths=_request_auths) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type, None, _request_auths)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(flat_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -508,10 +443,10 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -531,118 +466,170 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. - def files_parameters(self, - files: typing.Optional[typing.Dict[str, - typing.List[io.IOBase]]] = None): + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files=None): """Builds form parameters. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param files: File parameters. + :return: Form parameters with files. """ - if files is None: - return [] - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values - continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values + + if files: + for k, v in files.items(): + if not v: continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name - ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: return None - content_types = [x.lower() for x in content_types] + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + return content_types[0] - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, request_auths=None): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - :param request_auths: if set, the provided settings will - override the token in the configuration. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - if request_auths: - for auth_setting in request_auths: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) - return + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting - def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] @@ -653,245 +640,120 @@ def _apply_auth_params(self, headers, queries, resource_path, method, body, auth 'Authentication token must be in `query` or `header`' ) + def __deserialize_file(self, response): + """Deserializes body to file -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called - """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming', - '_request_auths' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str), - '_request_auths': (none_type, list) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) - - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. - if kwargs['_check_input_type'] is False: - return + handle file downloading + save response body into a tmp file and return the instance - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + with open(path, "wb") as f: + f.write(response.data) - return params + return path - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. - api_instance = AccountApi() - api_instance.get_authenticated_user # this is an instance of the class Endpoint - api_instance.get_authenticated_user() # this invokes api_instance.get_authenticated_user.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.get_authenticated_user.callable or self.callable in this class + :param data: str. + :param klass: class literal. + :return: int, long, float, str, bool. """ - return self.callable(self, *args, **kwargs) + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value - def call_with_http_info(self, **kwargs): + def __deserialize_date(self, string): + """Deserializes string to date. + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. - self.__validate_inputs(kwargs) + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) - params = self.__gather_params(kwargs) + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if params['body'] != "": - content_types_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - if content_types_list: - params['header']['Content-Type'] = content_types_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - _request_auths=kwargs['_request_auths'], - collection_formats=params['collection_format']) + return klass.from_dict(data) diff --git a/flat_api/api_response.py b/flat_api/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/flat_api/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/flat_api/apis/__init__.py b/flat_api/apis/__init__.py deleted file mode 100644 index c82c2f5..0000000 --- a/flat_api/apis/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from flat_api.api.account_api import AccountApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from flat_api.api.account_api import AccountApi -from flat_api.api.class_api import ClassApi -from flat_api.api.collection_api import CollectionApi -from flat_api.api.edu_resources_api import EduResourcesApi -from flat_api.api.group_api import GroupApi -from flat_api.api.organization_api import OrganizationApi -from flat_api.api.score_api import ScoreApi -from flat_api.api.task_api import TaskApi -from flat_api.api.user_api import UserApi diff --git a/flat_api/configuration.py b/flat_api/configuration.py index e92e1a1..c94ccfd 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -1,23 +1,27 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 -from http import client as http_client -from flat_api.exceptions import ApiValueError - +import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -25,46 +29,20 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. +class Configuration: + """This class contains various settings of the API client. - :param host: Base url + :param host: Base url. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -73,9 +51,10 @@ class Configuration(object): configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. + The validation of enums is performed for variables with defined enum + values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + in PEM format. :Example: """ @@ -84,14 +63,12 @@ class Configuration(object): def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", + access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, ssl_ca_cert=None, - ): + ) -> None: """Constructor """ self._base_path = "https://api.flat.io/v2" if host is None else host @@ -109,7 +86,6 @@ def __init__(self, host=None, """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -129,8 +105,9 @@ def __init__(self, host=None, self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ self.logger = {} """Logging Settings """ @@ -142,7 +119,7 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None @@ -169,6 +146,10 @@ def __init__(self, host=None, self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -178,12 +159,9 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ @@ -196,8 +174,17 @@ def __init__(self, host=None, # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ def __deepcopy__(self, memo): cls = self.__class__ @@ -215,13 +202,6 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -232,21 +212,31 @@ def set_default(cls, default): :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod def get_default_copy(cls): - """Return new instance of configuration. + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -300,15 +290,15 @@ def debug(self, value): # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -388,8 +378,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.18.0\n"\ - "SDK Package Version: 1.0.0".\ + "Version of the API: 2.20.0\n"\ + "SDK Package Version: 1.1.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py index 5f6bb9d..67046cb 100644 --- a/flat_api/exceptions.py +++ b/flat_api/exceptions.py @@ -1,13 +1,19 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -15,7 +21,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): + key_type=None) -> None: """ Raises an exception for TypeErrors Args: @@ -43,7 +49,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -61,7 +67,7 @@ def __init__(self, msg, path_to_item=None): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -80,7 +86,7 @@ def __init__(self, msg, path_to_item=None): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -98,54 +104,89 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" - error_message = "Status Code: {0}\n"\ + error_message = "({0})\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass + - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/flat_api/model/__init__.py b/flat_api/model/__init__.py deleted file mode 100644 index 6daffc2..0000000 --- a/flat_api/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from flat_api.models import ModelA, ModelB diff --git a/flat_api/model/api_access_token.py b/flat_api/model/api_access_token.py deleted file mode 100644 index 9ecbc4e..0000000 --- a/flat_api/model/api_access_token.py +++ /dev/null @@ -1,290 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.app_scopes import AppScopes - globals()['AppScopes'] = AppScopes - - -class ApiAccessToken(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'token': (str,), # noqa: E501 - 'issued_date': (datetime,), # noqa: E501 - 'expiration_date': (datetime,), # noqa: E501 - 'scopes': ([AppScopes],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'token': 'token', # noqa: E501 - 'issued_date': 'issuedDate', # noqa: E501 - 'expiration_date': 'expirationDate', # noqa: E501 - 'scopes': 'scopes', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApiAccessToken - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of this private token. [optional] # noqa: E501 - name (str): Name of the personal access token. [optional] # noqa: E501 - token (str): The token. This token will only be returned once, then only the first 4 characters will be returned. . [optional] # noqa: E501 - issued_date (datetime): The date then this token was issued . [optional] # noqa: E501 - expiration_date (datetime): The date then this token will expire . [optional] # noqa: E501 - scopes ([AppScopes]): The list of scopes associated to the token . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApiAccessToken - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of this private token. [optional] # noqa: E501 - name (str): Name of the personal access token. [optional] # noqa: E501 - token (str): The token. This token will only be returned once, then only the first 4 characters will be returned. . [optional] # noqa: E501 - issued_date (datetime): The date then this token was issued . [optional] # noqa: E501 - expiration_date (datetime): The date then this token will expire . [optional] # noqa: E501 - scopes ([AppScopes]): The list of scopes associated to the token . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/app_scopes.py b/flat_api/model/app_scopes.py deleted file mode 100644 index 6a711a6..0000000 --- a/flat_api/model/app_scopes.py +++ /dev/null @@ -1,310 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AppScopes(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ACCOUNT.PUBLIC_PROFILE': "account.public_profile", - 'ACCOUNT.EMAIL': "account.email", - 'ACCOUNT.EDUCATION_PROFILE': "account.education_profile", - 'SCORES.READONLY': "scores.readonly", - 'SCORES.SOCIAL': "scores.social", - 'SCORES': "scores", - 'COLLECTIONS.READONLY': "collections.readonly", - 'COLLECTIONS.ADD_SCORES': "collections.add_scores", - 'COLLECTIONS': "collections", - 'EDU.RESOURCES': "edu.resources", - 'EDU.RESOURCES.READONLY': "edu.resources.readonly", - 'EDU.CLASSES': "edu.classes", - 'EDU.CLASSES.READONLY': "edu.classes.readonly", - 'EDU.ASSIGNMENTS': "edu.assignments", - 'EDU.ASSIGNMENTS.READONLY': "edu.assignments.readonly", - 'EDU.ADMIN': "edu.admin", - 'EDU.ADMIN.LTI': "edu.admin.lti", - 'EDU.ADMIN.LTI.READONLY': "edu.admin.lti.readonly", - 'EDU.ADMIN.USERS': "edu.admin.users", - 'EDU.ADMIN.USERS.READONLY': "edu.admin.users.readonly", - 'TASKS.READONLY': "tasks.readonly", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """AppScopes - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 - - Keyword Args: - value (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """AppScopes - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 - - Keyword Args: - value (str): Available scopes., must be one of ["account.public_profile", "account.email", "account.education_profile", "scores.readonly", "scores.social", "scores", "collections.readonly", "collections.add_scores", "collections", "edu.resources", "edu.resources.readonly", "edu.classes", "edu.classes.readonly", "edu.assignments", "edu.assignments.readonly", "edu.admin", "edu.admin.lti", "edu.admin.lti.readonly", "edu.admin.users", "edu.admin.users.readonly", "tasks.readonly", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/assignment.py b/flat_api/model/assignment.py deleted file mode 100644 index fecf50a..0000000 --- a/flat_api/model/assignment.py +++ /dev/null @@ -1,344 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.media_attachment import MediaAttachment - globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities - globals()['AssignmentType'] = AssignmentType - globals()['MediaAttachment'] = MediaAttachment - - -class Assignment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (AssignmentType,), # noqa: E501 - 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'attachments': ([MediaAttachment],), # noqa: E501 - 'description': (str,), # noqa: E501 - 'cover': (str,), # noqa: E501 - 'cover_file': (str,), # noqa: E501 - 'use_dedicated_attachments': (bool,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - 'toolset': (str,), # noqa: E501 - 'nb_playback_authorized': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'title': 'title', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'description': 'description', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, type, capabilities, title, attachments, *args, **kwargs): # noqa: E501 - """Assignment - a model defined in OpenAPI - - Args: - id (str): Unique identifier of the assignment - type (AssignmentType): - capabilities (AssignmentCopyResponseCapabilities): - title (str): Title of the assignment - attachments ([MediaAttachment]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.type = type - self.capabilities = capabilities - self.title = title - self.attachments = attachments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, type, capabilities, title, attachments, *args, **kwargs): # noqa: E501 - """Assignment - a model defined in OpenAPI - - Args: - id (str): Unique identifier of the assignment - type (AssignmentType): - capabilities (AssignmentCopyResponseCapabilities): - title (str): Title of the assignment - attachments ([MediaAttachment]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.type = type - self.capabilities = capabilities - self.title = title - self.attachments = attachments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy.py b/flat_api/model/assignment_copy.py deleted file mode 100644 index 96ff52e..0000000 --- a/flat_api/model/assignment_copy.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentCopy(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'classroom': (str,), # noqa: E501 - 'assignment': (str,), # noqa: E501 - 'scheduled_date': (datetime,), # noqa: E501 - 'library_parent': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'classroom': 'classroom', # noqa: E501 - 'assignment': 'assignment', # noqa: E501 - 'scheduled_date': 'scheduledDate', # noqa: E501 - 'library_parent': 'libraryParent', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentCopy - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - classroom (str): The destination classroom where the assignment will be copied. [optional] # noqa: E501 - assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 - scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. . [optional] # noqa: E501 - library_parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentCopy - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - classroom (str): The destination classroom where the assignment will be copied. [optional] # noqa: E501 - assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 - scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. . [optional] # noqa: E501 - library_parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy_response.py b/flat_api/model/assignment_copy_response.py deleted file mode 100644 index b745502..0000000 --- a/flat_api/model/assignment_copy_response.py +++ /dev/null @@ -1,334 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.media_attachment import MediaAttachment - globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities - globals()['AssignmentType'] = AssignmentType - globals()['MediaAttachment'] = MediaAttachment - - -class AssignmentCopyResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (AssignmentType,), # noqa: E501 - 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'cover': (str,), # noqa: E501 - 'cover_file': (str,), # noqa: E501 - 'attachments': ([MediaAttachment],), # noqa: E501 - 'use_dedicated_attachments': (bool,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - 'toolset': (str,), # noqa: E501 - 'nb_playback_authorized': (float,), # noqa: E501 - 'resource': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - 'resource': 'resource', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - resource (str): If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - resource (str): If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy_response_capabilities.py b/flat_api/model/assignment_copy_response_capabilities.py deleted file mode 100644 index 6f5ebeb..0000000 --- a/flat_api/model/assignment_copy_response_capabilities.py +++ /dev/null @@ -1,298 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError - globals()['AssignmentCopyResponseCapabilitiesCanPublishInClassError'] = AssignmentCopyResponseCapabilitiesCanPublishInClassError - - -class AssignmentCopyResponseCapabilities(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'can_edit': (bool,), # noqa: E501 - 'can_publish_in_class': (bool,), # noqa: E501 - 'can_archive': (bool,), # noqa: E501 - 'can_unarchive': (bool,), # noqa: E501 - 'can_publish_in_class_error': (AssignmentCopyResponseCapabilitiesCanPublishInClassError,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'can_edit': 'canEdit', # noqa: E501 - 'can_publish_in_class': 'canPublishInClass', # noqa: E501 - 'can_archive': 'canArchive', # noqa: E501 - 'can_unarchive': 'canUnarchive', # noqa: E501 - 'can_publish_in_class_error': 'canPublishInClassError', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, can_edit, can_publish_in_class, can_archive, can_unarchive, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponseCapabilities - a model defined in OpenAPI - - Args: - can_edit (bool): Whether the current user can edit the assignment - can_publish_in_class (bool): Whether this assignment can be published in a class - can_archive (bool): Whether the current user can archive the assignment - can_unarchive (bool): Whether the current user can unarchive the assignment - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_publish_in_class_error (AssignmentCopyResponseCapabilitiesCanPublishInClassError): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.can_edit = can_edit - self.can_publish_in_class = can_publish_in_class - self.can_archive = can_archive - self.can_unarchive = can_unarchive - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, can_edit, can_publish_in_class, can_archive, can_unarchive, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponseCapabilities - a model defined in OpenAPI - - Args: - can_edit (bool): Whether the current user can edit the assignment - can_publish_in_class (bool): Whether this assignment can be published in a class - can_archive (bool): Whether the current user can archive the assignment - can_unarchive (bool): Whether the current user can unarchive the assignment - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_publish_in_class_error (AssignmentCopyResponseCapabilitiesCanPublishInClassError): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.can_edit = can_edit - self.can_publish_in_class = can_publish_in_class - self.can_archive = can_archive - self.can_unarchive = can_unarchive - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py b/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py deleted file mode 100644 index cae9192..0000000 --- a/flat_api/model/assignment_copy_response_capabilities_can_publish_in_class_error.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentCopyResponseCapabilitiesCanPublishInClassError(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'code': 'code', # noqa: E501 - 'message': 'message', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, code, message, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponseCapabilitiesCanPublishInClassError - a model defined in OpenAPI - - Args: - code (str): A corresponding code for this error - message (str): A printable and localized message for this error - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.code = code - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, code, message, *args, **kwargs): # noqa: E501 - """AssignmentCopyResponseCapabilitiesCanPublishInClassError - a model defined in OpenAPI - - Args: - code (str): A corresponding code for this error - message (str): A printable and localized message for this error - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.code = code - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission.py b/flat_api/model/assignment_submission.py deleted file mode 100644 index f4f5f4b..0000000 --- a/flat_api/model/assignment_submission.py +++ /dev/null @@ -1,352 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_submission_state import AssignmentSubmissionState - from flat_api.model.google_classroom_submission import GoogleClassroomSubmission - from flat_api.model.media_attachment import MediaAttachment - from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission - globals()['AssignmentSubmissionState'] = AssignmentSubmissionState - globals()['GoogleClassroomSubmission'] = GoogleClassroomSubmission - globals()['MediaAttachment'] = MediaAttachment - globals()['MicrosoftGraphSubmission'] = MicrosoftGraphSubmission - - -class AssignmentSubmission(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'state': (AssignmentSubmissionState,), # noqa: E501 - 'classroom': (str,), # noqa: E501 - 'assignment': (str,), # noqa: E501 - 'creator': (str,), # noqa: E501 - 'attachments': ([MediaAttachment],), # noqa: E501 - 'creation_date': (str,), # noqa: E501 - 'submission_date': (str,), # noqa: E501 - 'return_date': (str,), # noqa: E501 - 'return_creator': (str,), # noqa: E501 - 'grade': (float, none_type,), # noqa: E501 - 'draft_grade': (float, none_type,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'exercises_ids': ([str], none_type,), # noqa: E501 - 'google_classroom': (GoogleClassroomSubmission,), # noqa: E501 - 'microsoft_graph': (MicrosoftGraphSubmission,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'classroom': 'classroom', # noqa: E501 - 'assignment': 'assignment', # noqa: E501 - 'creator': 'creator', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'submission_date': 'submissionDate', # noqa: E501 - 'return_date': 'returnDate', # noqa: E501 - 'return_creator': 'returnCreator', # noqa: E501 - 'grade': 'grade', # noqa: E501 - 'draft_grade': 'draftGrade', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'exercises_ids': 'exercisesIds', # noqa: E501 - 'google_classroom': 'googleClassroom', # noqa: E501 - 'microsoft_graph': 'microsoftGraph', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, state, classroom, assignment, creator, attachments, *args, **kwargs): # noqa: E501 - """AssignmentSubmission - a model defined in OpenAPI - - Args: - id (str): Unique identifier of the submission - state (AssignmentSubmissionState): - classroom (str): Unique identifier of the classroom where the assignment was posted - assignment (str): Unique identifier of the assignment - creator (str): The User identifier of the student who created the submission - attachments ([MediaAttachment]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - creation_date (str): The date when the submission was created. [optional] # noqa: E501 - submission_date (str): The date when the student submitted their work. [optional] # noqa: E501 - return_date (str): The date when the teacher returned the work. [optional] # noqa: E501 - return_creator (str): The User unique identifier of the teacher who returned the submission . [optional] # noqa: E501 - grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 - draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 - max_points (float): Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.. [optional] # noqa: E501 - exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 - google_classroom (GoogleClassroomSubmission): [optional] # noqa: E501 - microsoft_graph (MicrosoftGraphSubmission): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.state = state - self.classroom = classroom - self.assignment = assignment - self.creator = creator - self.attachments = attachments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, state, classroom, assignment, creator, attachments, *args, **kwargs): # noqa: E501 - """AssignmentSubmission - a model defined in OpenAPI - - Args: - id (str): Unique identifier of the submission - state (AssignmentSubmissionState): - classroom (str): Unique identifier of the classroom where the assignment was posted - assignment (str): Unique identifier of the assignment - creator (str): The User identifier of the student who created the submission - attachments ([MediaAttachment]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - creation_date (str): The date when the submission was created. [optional] # noqa: E501 - submission_date (str): The date when the student submitted their work. [optional] # noqa: E501 - return_date (str): The date when the teacher returned the work. [optional] # noqa: E501 - return_creator (str): The User unique identifier of the teacher who returned the submission . [optional] # noqa: E501 - grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 - draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 - max_points (float): Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.. [optional] # noqa: E501 - exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 - google_classroom (GoogleClassroomSubmission): [optional] # noqa: E501 - microsoft_graph (MicrosoftGraphSubmission): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.state = state - self.classroom = classroom - self.assignment = assignment - self.creator = creator - self.attachments = attachments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_comment.py b/flat_api/model/assignment_submission_comment.py deleted file mode 100644 index 49a5f3a..0000000 --- a/flat_api/model/assignment_submission_comment.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionComment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'user': (str,), # noqa: E501 - 'submission': (str,), # noqa: E501 - 'date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'comment': (str,), # noqa: E501 - 'unread': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'user': 'user', # noqa: E501 - 'submission': 'submission', # noqa: E501 - 'date': 'date', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'comment': 'comment', # noqa: E501 - 'unread': 'unread', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionComment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The comment unique identifier. [optional] # noqa: E501 - user (str): The author unique identifier. [optional] # noqa: E501 - submission (str): The submission unique identifier. [optional] # noqa: E501 - date (datetime): The date when the comment was posted. [optional] # noqa: E501 - modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 - comment (str): The comment text. [optional] # noqa: E501 - unread (bool): True if the comment is unread by the current user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionComment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The comment unique identifier. [optional] # noqa: E501 - user (str): The author unique identifier. [optional] # noqa: E501 - submission (str): The submission unique identifier. [optional] # noqa: E501 - date (datetime): The date when the comment was posted. [optional] # noqa: E501 - modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 - comment (str): The comment text. [optional] # noqa: E501 - unread (bool): True if the comment is unread by the current user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_comment_creation.py b/flat_api/model/assignment_submission_comment_creation.py deleted file mode 100644 index a4d7114..0000000 --- a/flat_api/model/assignment_submission_comment_creation.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionCommentCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'comment': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'comment': 'comment', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, comment, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionCommentCreation - a model defined in OpenAPI - - Args: - comment (str): The comment text - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.comment = comment - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, comment, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionCommentCreation - a model defined in OpenAPI - - Args: - comment (str): The comment text - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.comment = comment - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_history.py b/flat_api/model/assignment_submission_history.py deleted file mode 100644 index 588f91d..0000000 --- a/flat_api/model/assignment_submission_history.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment - from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState - globals()['AssignmentSubmissionHistoryAttachment'] = AssignmentSubmissionHistoryAttachment - globals()['AssignmentSubmissionHistoryState'] = AssignmentSubmissionHistoryState - - -class AssignmentSubmissionHistory(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('source',): { - 'LTI': "lti", - 'GOOGLECLASSROOM': "googleClassroom", - 'MICROSOFTGRAPH': "microsoftGraph", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'date': (datetime,), # noqa: E501 - 'users': ([str],), # noqa: E501 - 'source': (str,), # noqa: E501 - 'state': (AssignmentSubmissionHistoryState,), # noqa: E501 - 'draft_grade': (float,), # noqa: E501 - 'grade': (float,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'comment': (str,), # noqa: E501 - 'due_date': (datetime,), # noqa: E501 - 'attachment': (AssignmentSubmissionHistoryAttachment,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'date': 'date', # noqa: E501 - 'users': 'users', # noqa: E501 - 'source': 'source', # noqa: E501 - 'state': 'state', # noqa: E501 - 'draft_grade': 'draftGrade', # noqa: E501 - 'grade': 'grade', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'comment': 'comment', # noqa: E501 - 'due_date': 'dueDate', # noqa: E501 - 'attachment': 'attachment', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionHistory - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - date (datetime): The date when the submission was changed. [optional] # noqa: E501 - users ([str]): The user(s) unique identifier(s) who made the change. [optional] # noqa: E501 - source (str): The source of the change if the change was made by a third-party software. [optional] # noqa: E501 - state (AssignmentSubmissionHistoryState): [optional] # noqa: E501 - draft_grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 - grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 - max_points (float): The denominator of the grade at this time in the submission grade history. [optional] # noqa: E501 - comment (str): The comment that is made to this submission. [optional] # noqa: E501 - due_date (datetime): The due date of this assignment. [optional] # noqa: E501 - attachment (AssignmentSubmissionHistoryAttachment): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionHistory - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - date (datetime): The date when the submission was changed. [optional] # noqa: E501 - users ([str]): The user(s) unique identifier(s) who made the change. [optional] # noqa: E501 - source (str): The source of the change if the change was made by a third-party software. [optional] # noqa: E501 - state (AssignmentSubmissionHistoryState): [optional] # noqa: E501 - draft_grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 - grade (float): The numerator of the grade at this time in the submission grade history. [optional] # noqa: E501 - max_points (float): The denominator of the grade at this time in the submission grade history. [optional] # noqa: E501 - comment (str): The comment that is made to this submission. [optional] # noqa: E501 - due_date (datetime): The due date of this assignment. [optional] # noqa: E501 - attachment (AssignmentSubmissionHistoryAttachment): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_history_attachment.py b/flat_api/model/assignment_submission_history_attachment.py deleted file mode 100644 index c0915bd..0000000 --- a/flat_api/model/assignment_submission_history_attachment.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionHistoryAttachment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'score': (str,), # noqa: E501 - 'revision': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'score': 'score', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - score (str): The score identifier that changed. [optional] # noqa: E501 - revision (str): The revision identifier that changed. [optional] # noqa: E501 - title (str): The title of the score that changed. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionHistoryAttachment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - score (str): The score identifier that changed. [optional] # noqa: E501 - revision (str): The revision identifier that changed. [optional] # noqa: E501 - title (str): The title of the score that changed. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_history_state.py b/flat_api/model/assignment_submission_history_state.py deleted file mode 100644 index e7beee6..0000000 --- a/flat_api/model/assignment_submission_history_state.py +++ /dev/null @@ -1,293 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionHistoryState(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CREATED': "created", - 'TURNEDIN': "turnedIn", - 'RETURNED': "returned", - 'RESET': "reset", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """AssignmentSubmissionHistoryState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 - - Keyword Args: - value (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """AssignmentSubmissionHistoryState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 - - Keyword Args: - value (str): State of the submission history., must be one of ["created", "turnedIn", "returned", "reset", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/assignment_submission_state.py b/flat_api/model/assignment_submission_state.py deleted file mode 100644 index 97beb44..0000000 --- a/flat_api/model/assignment_submission_state.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionState(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CREATED': "created", - 'TURNEDIN': "turnedIn", - 'RETURNED': "returned", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """AssignmentSubmissionState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 - - Keyword Args: - value (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """AssignmentSubmissionState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 - - Keyword Args: - value (str): State of the submission., must be one of ["created", "turnedIn", "returned", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/assignment_submission_update.py b/flat_api/model/assignment_submission_update.py deleted file mode 100644 index e09e108..0000000 --- a/flat_api/model/assignment_submission_update.py +++ /dev/null @@ -1,304 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments - from flat_api.model.class_attachment_creation import ClassAttachmentCreation - globals()['AssignmentSubmissionUpdateComments'] = AssignmentSubmissionUpdateComments - globals()['ClassAttachmentCreation'] = ClassAttachmentCreation - - -class AssignmentSubmissionUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('draft_grade',): { - 'inclusive_maximum': 100, - 'inclusive_minimum': 0, - }, - ('grade',): { - 'inclusive_maximum': 100, - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'attachments': ([ClassAttachmentCreation],), # noqa: E501 - 'submit': (bool,), # noqa: E501 - 'draft_grade': (float, none_type,), # noqa: E501 - 'grade': (float, none_type,), # noqa: E501 - 'exercises_ids': ([str], none_type,), # noqa: E501 - '_return': (bool,), # noqa: E501 - 'comments': (AssignmentSubmissionUpdateComments,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'attachments': 'attachments', # noqa: E501 - 'submit': 'submit', # noqa: E501 - 'draft_grade': 'draftGrade', # noqa: E501 - 'grade': 'grade', # noqa: E501 - 'exercises_ids': 'exercisesIds', # noqa: E501 - '_return': 'return', # noqa: E501 - 'comments': 'comments', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - submit (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 - draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 - grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 - exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 - _return (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 - comments (AssignmentSubmissionUpdateComments): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - submit (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 - draft_grade (float, none_type): Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission. [optional] # noqa: E501 - grade (float, none_type): Optional grade. If unset, no grade was set.. [optional] # noqa: E501 - exercises_ids ([str], none_type): The ids of exercises when they need to be in a specific order. [optional] # noqa: E501 - _return (bool): If `true`, the submission will be marked as done. [optional] # noqa: E501 - comments (AssignmentSubmissionUpdateComments): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_submission_update_comments.py b/flat_api/model/assignment_submission_update_comments.py deleted file mode 100644 index 2826178..0000000 --- a/flat_api/model/assignment_submission_update_comments.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentSubmissionUpdateComments(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'total': (float,), # noqa: E501 - 'unread': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'unread': 'unread', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionUpdateComments - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of comments added to the submission. [optional] # noqa: E501 - unread (float): The number of unread comments for the current user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentSubmissionUpdateComments - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of comments added to the submission. [optional] # noqa: E501 - unread (float): The number of unread comments for the current user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/assignment_type.py b/flat_api/model/assignment_type.py deleted file mode 100644 index 73518a9..0000000 --- a/flat_api/model/assignment_type.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class AssignmentType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'NONE': "none", - 'NEWSCORE': "newScore", - 'SCORETEMPLATE': "scoreTemplate", - 'SHAREDWRITING': "sharedWriting", - 'WORKSHEET': "worksheet", - 'PERFORMANCE': "performance", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """AssignmentType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 - - Keyword Args: - value (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """AssignmentType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 - - Keyword Args: - value (str): Type of the assignment., must be one of ["none", "newScore", "scoreTemplate", "sharedWriting", "worksheet", "performance", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/assignment_update.py b/flat_api/model/assignment_update.py deleted file mode 100644 index 2280d7b..0000000 --- a/flat_api/model/assignment_update.py +++ /dev/null @@ -1,324 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.class_attachment_creation import ClassAttachmentCreation - globals()['AssignmentType'] = AssignmentType - globals()['ClassAttachmentCreation'] = ClassAttachmentCreation - - -class AssignmentUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - } - - validations = { - ('title',): { - 'max_length': 1000, - 'min_length': 1, - }, - ('max_points',): { - 'inclusive_maximum': 100, - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (AssignmentType,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'attachments': ([ClassAttachmentCreation],), # noqa: E501 - 'nb_playback_authorized': (float, none_type,), # noqa: E501 - 'toolset': (str, none_type,), # noqa: E501 - 'cover_file': (str, none_type,), # noqa: E501 - 'cover': (str, none_type,), # noqa: E501 - 'max_points': (float, none_type,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AssignmentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (AssignmentType): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 - cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 - cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 - max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AssignmentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (AssignmentType): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 - cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 - cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 - max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment.py b/flat_api/model/class_assignment.py deleted file mode 100644 index c1f0b13..0000000 --- a/flat_api/model/class_assignment.py +++ /dev/null @@ -1,411 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities - from flat_api.model.assignment_submission import AssignmentSubmission - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas - from flat_api.model.class_assignment_lti import ClassAssignmentLti - from flat_api.model.class_assignment_mfc import ClassAssignmentMfc - from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework - from flat_api.model.media_attachment import MediaAttachment - from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment - globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities - globals()['AssignmentSubmission'] = AssignmentSubmission - globals()['AssignmentType'] = AssignmentType - globals()['ClassAssignmentCanvas'] = ClassAssignmentCanvas - globals()['ClassAssignmentLti'] = ClassAssignmentLti - globals()['ClassAssignmentMfc'] = ClassAssignmentMfc - globals()['GoogleClassroomCoursework'] = GoogleClassroomCoursework - globals()['MediaAttachment'] = MediaAttachment - globals()['MicrosoftGraphAssignment'] = MicrosoftGraphAssignment - - -class ClassAssignment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - ('state',): { - 'DRAFT': "draft", - 'ACTIVE': "active", - 'ARCHIVED': "archived", - }, - ('assignee_mode',): { - 'EVERYONE': "everyone", - 'SELECTED': "selected", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (AssignmentType,), # noqa: E501 - 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'cover': (str,), # noqa: E501 - 'cover_file': (str,), # noqa: E501 - 'attachments': ([MediaAttachment],), # noqa: E501 - 'use_dedicated_attachments': (bool,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - 'toolset': (str,), # noqa: E501 - 'nb_playback_authorized': (float,), # noqa: E501 - 'creator': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'classroom': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'scheduled_date': (datetime,), # noqa: E501 - 'due_date': (datetime,), # noqa: E501 - 'assignee_mode': (str,), # noqa: E501 - 'assigned_students': ([str],), # noqa: E501 - 'submissions': ([AssignmentSubmission],), # noqa: E501 - 'google_classroom': (GoogleClassroomCoursework,), # noqa: E501 - 'microsoft_graph': (MicrosoftGraphAssignment,), # noqa: E501 - 'mfc': (ClassAssignmentMfc,), # noqa: E501 - 'canvas': (ClassAssignmentCanvas,), # noqa: E501 - 'lti': (ClassAssignmentLti,), # noqa: E501 - 'issue': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - 'creator': 'creator', # noqa: E501 - 'state': 'state', # noqa: E501 - 'classroom': 'classroom', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'scheduled_date': 'scheduledDate', # noqa: E501 - 'due_date': 'dueDate', # noqa: E501 - 'assignee_mode': 'assigneeMode', # noqa: E501 - 'assigned_students': 'assignedStudents', # noqa: E501 - 'submissions': 'submissions', # noqa: E501 - 'google_classroom': 'googleClassroom', # noqa: E501 - 'microsoft_graph': 'microsoftGraph', # noqa: E501 - 'mfc': 'mfc', # noqa: E501 - 'canvas': 'canvas', # noqa: E501 - 'lti': 'lti', # noqa: E501 - 'issue': 'issue', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - creator (str): The User unique identifier of the creator of this assignment . [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - classroom (str): The unique identifier of the class where this assignment was posted. [optional] # noqa: E501 - creation_date (datetime): The creation date of this assignment. [optional] # noqa: E501 - scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 - due_date (datetime): The due date of this assignment, late submissions will be marked as paste due. . [optional] # noqa: E501 - assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 - assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 - submissions ([AssignmentSubmission]): [optional] # noqa: E501 - google_classroom (GoogleClassroomCoursework): [optional] # noqa: E501 - microsoft_graph (MicrosoftGraphAssignment): [optional] # noqa: E501 - mfc (ClassAssignmentMfc): [optional] # noqa: E501 - canvas (ClassAssignmentCanvas): [optional] # noqa: E501 - lti (ClassAssignmentLti): [optional] # noqa: E501 - issue (str): Detected issue for this assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - creator (str): The User unique identifier of the creator of this assignment . [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - classroom (str): The unique identifier of the class where this assignment was posted. [optional] # noqa: E501 - creation_date (datetime): The creation date of this assignment. [optional] # noqa: E501 - scheduled_date (datetime): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 - due_date (datetime): The due date of this assignment, late submissions will be marked as paste due. . [optional] # noqa: E501 - assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 - assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 - submissions ([AssignmentSubmission]): [optional] # noqa: E501 - google_classroom (GoogleClassroomCoursework): [optional] # noqa: E501 - microsoft_graph (MicrosoftGraphAssignment): [optional] # noqa: E501 - mfc (ClassAssignmentMfc): [optional] # noqa: E501 - canvas (ClassAssignmentCanvas): [optional] # noqa: E501 - lti (ClassAssignmentLti): [optional] # noqa: E501 - issue (str): Detected issue for this assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_canvas.py b/flat_api/model/class_assignment_canvas.py deleted file mode 100644 index 2a5a66f..0000000 --- a/flat_api/model/class_assignment_canvas.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassAssignmentCanvas(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentCanvas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on Canvas assignment. [optional] # noqa: E501 - alternate_link (str): Link to Canvas assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentCanvas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on Canvas assignment. [optional] # noqa: E501 - alternate_link (str): Link to Canvas assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_lti.py b/flat_api/model/class_assignment_lti.py deleted file mode 100644 index a81ff3f..0000000 --- a/flat_api/model/class_assignment_lti.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassAssignmentLti(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentLti - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Resource ID in the LMS. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentLti - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Resource ID in the LMS. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_mfc.py b/flat_api/model/class_assignment_mfc.py deleted file mode 100644 index 450e19c..0000000 --- a/flat_api/model/class_assignment_mfc.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassAssignmentMfc(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentMfc - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on MusicFirst Task. [optional] # noqa: E501 - alternate_link (str): Link to MusicFirst Classroom task. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentMfc - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on MusicFirst Task. [optional] # noqa: E501 - alternate_link (str): Link to MusicFirst Classroom task. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update.py b/flat_api/model/class_assignment_update.py deleted file mode 100644 index bce119c..0000000 --- a/flat_api/model/class_assignment_update.py +++ /dev/null @@ -1,364 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom - from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph - from flat_api.model.class_attachment_creation import ClassAttachmentCreation - globals()['AssignmentType'] = AssignmentType - globals()['ClassAssignmentUpdateGoogleClassroom'] = ClassAssignmentUpdateGoogleClassroom - globals()['ClassAssignmentUpdateMicrosoftGraph'] = ClassAssignmentUpdateMicrosoftGraph - globals()['ClassAttachmentCreation'] = ClassAttachmentCreation - - -class ClassAssignmentUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - ('state',): { - 'DRAFT': "draft", - 'ACTIVE': "active", - }, - ('assignee_mode',): { - 'EVERYONE': "everyone", - 'SELECTED': "selected", - }, - } - - validations = { - ('title',): { - 'max_length': 1000, - 'min_length': 1, - }, - ('max_points',): { - 'inclusive_maximum': 100, - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (AssignmentType,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'attachments': ([ClassAttachmentCreation],), # noqa: E501 - 'nb_playback_authorized': (float, none_type,), # noqa: E501 - 'toolset': (str, none_type,), # noqa: E501 - 'cover_file': (str, none_type,), # noqa: E501 - 'cover': (str, none_type,), # noqa: E501 - 'max_points': (float, none_type,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'due_date': (datetime, none_type,), # noqa: E501 - 'scheduled_date': (datetime, none_type,), # noqa: E501 - 'google_classroom': (ClassAssignmentUpdateGoogleClassroom,), # noqa: E501 - 'microsoft_graph': (ClassAssignmentUpdateMicrosoftGraph,), # noqa: E501 - 'assignee_mode': (str,), # noqa: E501 - 'assigned_students': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - 'state': 'state', # noqa: E501 - 'due_date': 'dueDate', # noqa: E501 - 'scheduled_date': 'scheduledDate', # noqa: E501 - 'google_classroom': 'googleClassroom', # noqa: E501 - 'microsoft_graph': 'microsoftGraph', # noqa: E501 - 'assignee_mode': 'assigneeMode', # noqa: E501 - 'assigned_students': 'assignedStudents', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (AssignmentType): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 - cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 - cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 - max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - due_date (datetime, none_type): The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. . [optional] # noqa: E501 - scheduled_date (datetime, none_type): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 - google_classroom (ClassAssignmentUpdateGoogleClassroom): [optional] # noqa: E501 - microsoft_graph (ClassAssignmentUpdateMicrosoftGraph): [optional] # noqa: E501 - assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 - assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (AssignmentType): [optional] # noqa: E501 - title (str): Title of the assignment. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - attachments ([ClassAttachmentCreation]): [optional] # noqa: E501 - nb_playback_authorized (float, none_type): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - toolset (str, none_type): The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. . [optional] # noqa: E501 - cover_file (str, none_type): The id of the cover to display. [optional] # noqa: E501 - cover (str, none_type): The URL of the cover to display. [optional] # noqa: E501 - max_points (float, none_type): If set, the grading will be enabled for the assignement with this value as the maximum of points . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - due_date (datetime, none_type): The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. . [optional] # noqa: E501 - scheduled_date (datetime, none_type): The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. . [optional] # noqa: E501 - google_classroom (ClassAssignmentUpdateGoogleClassroom): [optional] # noqa: E501 - microsoft_graph (ClassAssignmentUpdateMicrosoftGraph): [optional] # noqa: E501 - assignee_mode (str): Possible modes of assigning assignments. [optional] # noqa: E501 - assigned_students ([str]): Identifiers for the students that have access to the assignment. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update_google_classroom.py b/flat_api/model/class_assignment_update_google_classroom.py deleted file mode 100644 index 79719e2..0000000 --- a/flat_api/model/class_assignment_update_google_classroom.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassAssignmentUpdateGoogleClassroom(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'topic_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'topic_id': 'topicId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdateGoogleClassroom - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdateGoogleClassroom - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_assignment_update_microsoft_graph.py b/flat_api/model/class_assignment_update_microsoft_graph.py deleted file mode 100644 index e297f77..0000000 --- a/flat_api/model/class_assignment_update_microsoft_graph.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassAssignmentUpdateMicrosoftGraph(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'categories': ([str], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'categories': 'categories', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdateMicrosoftGraph - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - categories ([str], none_type): List of categories this assignment belongs to. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAssignmentUpdateMicrosoftGraph - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - categories ([str], none_type): List of categories this assignment belongs to. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_attachment_creation.py b/flat_api/model/class_attachment_creation.py deleted file mode 100644 index dfa79b6..0000000 --- a/flat_api/model/class_attachment_creation.py +++ /dev/null @@ -1,304 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode - globals()['MediaScoreSharingMode'] = MediaScoreSharingMode - - -class ClassAttachmentCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'RICH': "rich", - 'PHOTO': "photo", - 'VIDEO': "video", - 'LINK': "link", - 'FLAT': "flat", - 'GOOGLEDRIVE': "googleDrive", - 'WORKSHEET': "worksheet", - 'PERFORMANCE': "performance", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'worksheet': (str,), # noqa: E501 - 'sharing_mode': (MediaScoreSharingMode,), # noqa: E501 - 'lock_score_template': (bool,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'google_drive_file_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'score': 'score', # noqa: E501 - 'worksheet': 'worksheet', # noqa: E501 - 'sharing_mode': 'sharingMode', # noqa: E501 - 'lock_score_template': 'lockScoreTemplate', # noqa: E501 - 'url': 'url', # noqa: E501 - 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassAttachmentCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): The type of the attachment posted: * `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] # noqa: E501 - score (str): A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. . [optional] # noqa: E501 - worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 - sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 - lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 - url (str): The URL of the attachment.. [optional] # noqa: E501 - google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassAttachmentCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): The type of the attachment posted: * `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] # noqa: E501 - score (str): A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. . [optional] # noqa: E501 - worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 - sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 - lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 - url (str): The URL of the attachment.. [optional] # noqa: E501 - google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_creation.py b/flat_api/model/class_creation.py deleted file mode 100644 index d0d08b9..0000000 --- a/flat_api/model/class_creation.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_grade_level import ClassGradeLevel - from flat_api.model.edu_skills_focused import EduSkillsFocused - globals()['ClassGradeLevel'] = ClassGradeLevel - globals()['EduSkillsFocused'] = EduSkillsFocused - - -class ClassCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('name',): { - 'max_length': 255, - }, - ('section',): { - 'max_length': 255, - }, - ('size',): { - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'section': (str,), # noqa: E501 - 'level': (ClassGradeLevel,), # noqa: E501 - 'skills_focused': (EduSkillsFocused,), # noqa: E501 - 'size': (float, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'section': 'section', # noqa: E501 - 'level': 'level', # noqa: E501 - 'skills_focused': 'skillsFocused', # noqa: E501 - 'size': 'size', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 - """ClassCreation - a model defined in OpenAPI - - Args: - name (str): The name of the new class - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - section (str): The section of the new class. [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, *args, **kwargs): # noqa: E501 - """ClassCreation - a model defined in OpenAPI - - Args: - name (str): The name of the new class - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - section (str): The section of the new class. [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details.py b/flat_api/model/class_details.py deleted file mode 100644 index 8ba9121..0000000 --- a/flat_api/model/class_details.py +++ /dev/null @@ -1,384 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_details_canvas import ClassDetailsCanvas - from flat_api.model.class_details_clever import ClassDetailsClever - from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom - from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive - from flat_api.model.class_details_issues import ClassDetailsIssues - from flat_api.model.class_details_lti import ClassDetailsLti - from flat_api.model.class_details_mfc import ClassDetailsMfc - from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph - from flat_api.model.class_grade_level import ClassGradeLevel - from flat_api.model.class_state import ClassState - from flat_api.model.edu_skills_focused import EduSkillsFocused - from flat_api.model.group_details import GroupDetails - globals()['ClassDetailsCanvas'] = ClassDetailsCanvas - globals()['ClassDetailsClever'] = ClassDetailsClever - globals()['ClassDetailsGoogleClassroom'] = ClassDetailsGoogleClassroom - globals()['ClassDetailsGoogleDrive'] = ClassDetailsGoogleDrive - globals()['ClassDetailsIssues'] = ClassDetailsIssues - globals()['ClassDetailsLti'] = ClassDetailsLti - globals()['ClassDetailsMfc'] = ClassDetailsMfc - globals()['ClassDetailsMicrosoftGraph'] = ClassDetailsMicrosoftGraph - globals()['ClassGradeLevel'] = ClassGradeLevel - globals()['ClassState'] = ClassState - globals()['EduSkillsFocused'] = EduSkillsFocused - globals()['GroupDetails'] = GroupDetails - - -class ClassDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'state': (ClassState,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'section': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'owner': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'enrollment_code': (str,), # noqa: E501 - 'theme': (str,), # noqa: E501 - 'assignments_count': (float,), # noqa: E501 - 'students_group': (GroupDetails,), # noqa: E501 - 'teachers_group': (GroupDetails,), # noqa: E501 - 'issues': (ClassDetailsIssues,), # noqa: E501 - 'google_classroom': (ClassDetailsGoogleClassroom,), # noqa: E501 - 'google_drive': (ClassDetailsGoogleDrive,), # noqa: E501 - 'microsoft_graph': (ClassDetailsMicrosoftGraph,), # noqa: E501 - 'lti': (ClassDetailsLti,), # noqa: E501 - 'canvas': (ClassDetailsCanvas,), # noqa: E501 - 'mfc': (ClassDetailsMfc,), # noqa: E501 - 'clever': (ClassDetailsClever,), # noqa: E501 - 'level': (ClassGradeLevel,), # noqa: E501 - 'skills_focused': (EduSkillsFocused,), # noqa: E501 - 'size': (float, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'name': 'name', # noqa: E501 - 'section': 'section', # noqa: E501 - 'description': 'description', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'owner': 'owner', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'enrollment_code': 'enrollmentCode', # noqa: E501 - 'theme': 'theme', # noqa: E501 - 'assignments_count': 'assignmentsCount', # noqa: E501 - 'students_group': 'studentsGroup', # noqa: E501 - 'teachers_group': 'teachersGroup', # noqa: E501 - 'issues': 'issues', # noqa: E501 - 'google_classroom': 'googleClassroom', # noqa: E501 - 'google_drive': 'googleDrive', # noqa: E501 - 'microsoft_graph': 'microsoftGraph', # noqa: E501 - 'lti': 'lti', # noqa: E501 - 'canvas': 'canvas', # noqa: E501 - 'mfc': 'mfc', # noqa: E501 - 'clever': 'clever', # noqa: E501 - 'level': 'level', # noqa: E501 - 'skills_focused': 'skillsFocused', # noqa: E501 - 'size': 'size', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the class. [optional] # noqa: E501 - state (ClassState): [optional] # noqa: E501 - name (str): The name of the class. [optional] # noqa: E501 - section (str): The section of the class. [optional] # noqa: E501 - description (str): An optionnal description for this class. [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 - owner (str): The unique identifier of the User owning this class. [optional] # noqa: E501 - creation_date (datetime): The date when the class was create. [optional] # noqa: E501 - enrollment_code (str): [Teachers only] The enrollment code that can be used by the students to join the class . [optional] # noqa: E501 - theme (str): The theme identifier using in Flat User Interface. [optional] # noqa: E501 - assignments_count (float): The number of assignments created in the class. [optional] # noqa: E501 - students_group (GroupDetails): [optional] # noqa: E501 - teachers_group (GroupDetails): [optional] # noqa: E501 - issues (ClassDetailsIssues): [optional] # noqa: E501 - google_classroom (ClassDetailsGoogleClassroom): [optional] # noqa: E501 - google_drive (ClassDetailsGoogleDrive): [optional] # noqa: E501 - microsoft_graph (ClassDetailsMicrosoftGraph): [optional] # noqa: E501 - lti (ClassDetailsLti): [optional] # noqa: E501 - canvas (ClassDetailsCanvas): [optional] # noqa: E501 - mfc (ClassDetailsMfc): [optional] # noqa: E501 - clever (ClassDetailsClever): [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the class. [optional] # noqa: E501 - state (ClassState): [optional] # noqa: E501 - name (str): The name of the class. [optional] # noqa: E501 - section (str): The section of the class. [optional] # noqa: E501 - description (str): An optionnal description for this class. [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 - owner (str): The unique identifier of the User owning this class. [optional] # noqa: E501 - creation_date (datetime): The date when the class was create. [optional] # noqa: E501 - enrollment_code (str): [Teachers only] The enrollment code that can be used by the students to join the class . [optional] # noqa: E501 - theme (str): The theme identifier using in Flat User Interface. [optional] # noqa: E501 - assignments_count (float): The number of assignments created in the class. [optional] # noqa: E501 - students_group (GroupDetails): [optional] # noqa: E501 - teachers_group (GroupDetails): [optional] # noqa: E501 - issues (ClassDetailsIssues): [optional] # noqa: E501 - google_classroom (ClassDetailsGoogleClassroom): [optional] # noqa: E501 - google_drive (ClassDetailsGoogleDrive): [optional] # noqa: E501 - microsoft_graph (ClassDetailsMicrosoftGraph): [optional] # noqa: E501 - lti (ClassDetailsLti): [optional] # noqa: E501 - canvas (ClassDetailsCanvas): [optional] # noqa: E501 - mfc (ClassDetailsMfc): [optional] # noqa: E501 - clever (ClassDetailsClever): [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_canvas.py b/flat_api/model/class_details_canvas.py deleted file mode 100644 index b129b3e..0000000 --- a/flat_api/model/class_details_canvas.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsCanvas(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'domain': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'domain': 'domain', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsCanvas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on Canvas. [optional] # noqa: E501 - domain (str): Canvas instance domain (e.g. \"canvas.instructure.com\"). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsCanvas - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on Canvas. [optional] # noqa: E501 - domain (str): Canvas instance domain (e.g. \"canvas.instructure.com\"). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_clever.py b/flat_api/model/class_details_clever.py deleted file mode 100644 index 59e9a77..0000000 --- a/flat_api/model/class_details_clever.py +++ /dev/null @@ -1,301 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsClever(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('subject',): { - 'ENGLISH/LANGUAGE_ARTS': "english/language arts", - 'MATH': "math", - 'SCIENCE': "science", - 'SOCIAL_STUDIES': "social studies", - 'LANGUAGE': "language", - 'HOMEROOM/ADVISORY': "homeroom/advisory", - 'INTERVENTIONS/ONLINE_LEARNING': "interventions/online learning", - 'TECHNOLOGY_AND_ENGINEERING': "technology and engineering", - 'PE_AND_HEALTH': "PE and health", - 'ARTS_AND_MUSIC': "arts and music", - 'OTHER': "other", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'subject': (str,), # noqa: E501 - 'term_name': (str,), # noqa: E501 - 'term_start_date': (datetime,), # noqa: E501 - 'term_end_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'subject': 'subject', # noqa: E501 - 'term_name': 'termName', # noqa: E501 - 'term_start_date': 'termStartDate', # noqa: E501 - 'term_end_date': 'termEndDate', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsClever - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Clever section unique identifier. [optional] # noqa: E501 - creation_date (datetime): The creation date of the section on clever. [optional] # noqa: E501 - modification_date (datetime): The last modification date of the section on clever. [optional] # noqa: E501 - subject (str): Normalized subject of the course. [optional] # noqa: E501 - term_name (str): Name of the term when this course happens. [optional] # noqa: E501 - term_start_date (datetime): Beginning date of the term. [optional] # noqa: E501 - term_end_date (datetime): End date of the term. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsClever - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Clever section unique identifier. [optional] # noqa: E501 - creation_date (datetime): The creation date of the section on clever. [optional] # noqa: E501 - modification_date (datetime): The last modification date of the section on clever. [optional] # noqa: E501 - subject (str): Normalized subject of the course. [optional] # noqa: E501 - term_name (str): Name of the term when this course happens. [optional] # noqa: E501 - term_start_date (datetime): Beginning date of the term. [optional] # noqa: E501 - term_end_date (datetime): End date of the term. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_google_classroom.py b/flat_api/model/class_details_google_classroom.py deleted file mode 100644 index 24e4288..0000000 --- a/flat_api/model/class_details_google_classroom.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsGoogleClassroom(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsGoogleClassroom - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The course identifier on Google Classroom. [optional] # noqa: E501 - alternate_link (str): Absolute link to this course in the Classroom web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsGoogleClassroom - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The course identifier on Google Classroom. [optional] # noqa: E501 - alternate_link (str): Absolute link to this course in the Classroom web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_google_drive.py b/flat_api/model/class_details_google_drive.py deleted file mode 100644 index c9384b6..0000000 --- a/flat_api/model/class_details_google_drive.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsGoogleDrive(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'teacher_folder_id': (str,), # noqa: E501 - 'teacher_folder_alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'teacher_folder_id': 'teacherFolderId', # noqa: E501 - 'teacher_folder_alternate_link': 'teacherFolderAlternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsGoogleDrive - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - teacher_folder_id (str): [Teachers only] The Drive directory identifier of the teachers' folder . [optional] # noqa: E501 - teacher_folder_alternate_link (str): [Teachers only] The Drive URL of the teachers' folder . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsGoogleDrive - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - teacher_folder_id (str): [Teachers only] The Drive directory identifier of the teachers' folder . [optional] # noqa: E501 - teacher_folder_alternate_link (str): [Teachers only] The Drive URL of the teachers' folder . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_issues.py b/flat_api/model/class_details_issues.py deleted file mode 100644 index e3db155..0000000 --- a/flat_api/model/class_details_issues.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner - globals()['ClassDetailsIssuesSyncInner'] = ClassDetailsIssuesSyncInner - - -class ClassDetailsIssues(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'sync': ([ClassDetailsIssuesSyncInner],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'sync': 'sync', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsIssues - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sync ([ClassDetailsIssuesSyncInner]): Synchronization issues for the class. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsIssues - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - sync ([ClassDetailsIssuesSyncInner]): Synchronization issues for the class. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_issues_sync_inner.py b/flat_api/model/class_details_issues_sync_inner.py deleted file mode 100644 index a522b70..0000000 --- a/flat_api/model/class_details_issues_sync_inner.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsIssuesSyncInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('reason',): { - 'OTHERORGNANIZATION': "otherOrgnanization", - 'PERSONALSUBSCRIPTION': "personalSubscription", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'reason': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'email': 'email', # noqa: E501 - 'reason': 'reason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsIssuesSyncInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The account user identifier. [optional] # noqa: E501 - email (str): The email address of the user concerned by this sync issue. [optional] # noqa: E501 - reason (str): The reason why the account cannot be synced. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsIssuesSyncInner - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The account user identifier. [optional] # noqa: E501 - email (str): The email address of the user concerned by this sync issue. [optional] # noqa: E501 - reason (str): The reason why the account cannot be synced. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_lti.py b/flat_api/model/class_details_lti.py deleted file mode 100644 index 144fce2..0000000 --- a/flat_api/model/class_details_lti.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsLti(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'context_id': (str,), # noqa: E501 - 'context_title': (str,), # noqa: E501 - 'context_label': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'context_id': 'contextId', # noqa: E501 - 'context_title': 'contextTitle', # noqa: E501 - 'context_label': 'contextLabel', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsLti - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - context_id (str): Unique context identifier provided. [optional] # noqa: E501 - context_title (str): Context title. [optional] # noqa: E501 - context_label (str): Context label. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsLti - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - context_id (str): Unique context identifier provided. [optional] # noqa: E501 - context_title (str): Context title. [optional] # noqa: E501 - context_label (str): Context label. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_mfc.py b/flat_api/model/class_details_mfc.py deleted file mode 100644 index f8c0f17..0000000 --- a/flat_api/model/class_details_mfc.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsMfc(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsMfc - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on MusicFirst Classroom. [optional] # noqa: E501 - alternate_link (str): Link to MusicFirst Classroom class. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsMfc - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the course on MusicFirst Classroom. [optional] # noqa: E501 - alternate_link (str): Link to MusicFirst Classroom class. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_details_microsoft_graph.py b/flat_api/model/class_details_microsoft_graph.py deleted file mode 100644 index c9d67f0..0000000 --- a/flat_api/model/class_details_microsoft_graph.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassDetailsMicrosoftGraph(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassDetailsMicrosoftGraph - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The course identifier on Microsoft Graph. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassDetailsMicrosoftGraph - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The course identifier on Microsoft Graph. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/class_grade_level.py b/flat_api/model/class_grade_level.py deleted file mode 100644 index c72f20b..0000000 --- a/flat_api/model/class_grade_level.py +++ /dev/null @@ -1,294 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassGradeLevel(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ELEMENTARY': "elementary", - 'MIDDLE': "middle", - 'HIGH': "high", - 'UNIVERSITY': "university", - 'OTHER': "other", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ClassGradeLevel - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 - - Keyword Args: - value (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ClassGradeLevel - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 - - Keyword Args: - value (str): Class grade level., must be one of ["elementary", "middle", "high", "university", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/class_roles.py b/flat_api/model/class_roles.py deleted file mode 100644 index 4055479..0000000 --- a/flat_api/model/class_roles.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassRoles(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'TEACHER': "teacher", - 'STUDENT': "student", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ClassRoles - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 - - Keyword Args: - value (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ClassRoles - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 - - Keyword Args: - value (str): User's Class Role (for Edu users only)., must be one of ["teacher", "student", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/class_state.py b/flat_api/model/class_state.py deleted file mode 100644 index 783f2f2..0000000 --- a/flat_api/model/class_state.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ClassState(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ACTIVE': "active", - 'INACTIVE': "inactive", - 'ARCHIVED': "archived", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ClassState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 - - Keyword Args: - value (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ClassState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 - - Keyword Args: - value (str): The state of a classroom., must be one of ["active", "inactive", "archived", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/class_update.py b/flat_api/model/class_update.py deleted file mode 100644 index 64cbbf8..0000000 --- a/flat_api/model/class_update.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_grade_level import ClassGradeLevel - from flat_api.model.edu_skills_focused import EduSkillsFocused - globals()['ClassGradeLevel'] = ClassGradeLevel - globals()['EduSkillsFocused'] = EduSkillsFocused - - -class ClassUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('name',): { - 'max_length': 255, - }, - ('section',): { - 'max_length': 255, - }, - ('size',): { - 'inclusive_minimum': 0, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'section': (str,), # noqa: E501 - 'level': (ClassGradeLevel,), # noqa: E501 - 'skills_focused': (EduSkillsFocused,), # noqa: E501 - 'size': (float, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'section': 'section', # noqa: E501 - 'level': 'level', # noqa: E501 - 'skills_focused': 'skillsFocused', # noqa: E501 - 'size': 'size', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ClassUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the class. [optional] # noqa: E501 - section (str): The section of the class. [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ClassUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the class. [optional] # noqa: E501 - section (str): The section of the class. [optional] # noqa: E501 - level (ClassGradeLevel): [optional] # noqa: E501 - skills_focused (EduSkillsFocused): [optional] # noqa: E501 - size (float, none_type): Number of students in the classroom. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection.py b/flat_api/model/collection.py deleted file mode 100644 index cda524e..0000000 --- a/flat_api/model/collection.py +++ /dev/null @@ -1,330 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.collection_app import CollectionApp - from flat_api.model.collection_capabilities import CollectionCapabilities - from flat_api.model.collection_privacy import CollectionPrivacy - from flat_api.model.collection_type import CollectionType - from flat_api.model.resource_collaborator import ResourceCollaborator - from flat_api.model.resource_rights import ResourceRights - from flat_api.model.user_public_summary import UserPublicSummary - globals()['CollectionApp'] = CollectionApp - globals()['CollectionCapabilities'] = CollectionCapabilities - globals()['CollectionPrivacy'] = CollectionPrivacy - globals()['CollectionType'] = CollectionType - globals()['ResourceCollaborator'] = ResourceCollaborator - globals()['ResourceRights'] = ResourceRights - globals()['UserPublicSummary'] = UserPublicSummary - - -class Collection(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - 'type': (CollectionType,), # noqa: E501 - 'privacy': (CollectionPrivacy,), # noqa: E501 - 'sharing_key': (str,), # noqa: E501 - 'app': (CollectionApp,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'user': (UserPublicSummary,), # noqa: E501 - 'rights': (ResourceRights,), # noqa: E501 - 'collaborators': ([ResourceCollaborator],), # noqa: E501 - 'capabilities': (CollectionCapabilities,), # noqa: E501 - 'collections': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'title': 'title', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - 'type': 'type', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - 'sharing_key': 'sharingKey', # noqa: E501 - 'app': 'app', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'user': 'user', # noqa: E501 - 'rights': 'rights', # noqa: E501 - 'collaborators': 'collaborators', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'collections': 'collections', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Collection - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the collection. [optional] # noqa: E501 - title (str): The title of the collection. [optional] # noqa: E501 - html_url (str): The url where the collection can be viewed in a web browser. [optional] # noqa: E501 - type (CollectionType): [optional] # noqa: E501 - privacy (CollectionPrivacy): [optional] # noqa: E501 - sharing_key (str): The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 - app (CollectionApp): [optional] # noqa: E501 - creation_date (datetime): The date when the collection was created. [optional] # noqa: E501 - user (UserPublicSummary): [optional] # noqa: E501 - rights (ResourceRights): [optional] # noqa: E501 - collaborators ([ResourceCollaborator]): The list of the collaborators of the collection. [optional] # noqa: E501 - capabilities (CollectionCapabilities): [optional] # noqa: E501 - collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Collection - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the collection. [optional] # noqa: E501 - title (str): The title of the collection. [optional] # noqa: E501 - html_url (str): The url where the collection can be viewed in a web browser. [optional] # noqa: E501 - type (CollectionType): [optional] # noqa: E501 - privacy (CollectionPrivacy): [optional] # noqa: E501 - sharing_key (str): The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 - app (CollectionApp): [optional] # noqa: E501 - creation_date (datetime): The date when the collection was created. [optional] # noqa: E501 - user (UserPublicSummary): [optional] # noqa: E501 - rights (ResourceRights): [optional] # noqa: E501 - collaborators ([ResourceCollaborator]): The list of the collaborators of the collection. [optional] # noqa: E501 - capabilities (CollectionCapabilities): [optional] # noqa: E501 - collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection_app.py b/flat_api/model/collection_app.py deleted file mode 100644 index 37f7e2a..0000000 --- a/flat_api/model/collection_app.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class CollectionApp(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'logo': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'logo': 'logo', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CollectionApp - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The app unique identifier. [optional] # noqa: E501 - name (str): The name of the app. [optional] # noqa: E501 - logo (str): The app logo url. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CollectionApp - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The app unique identifier. [optional] # noqa: E501 - name (str): The name of the app. [optional] # noqa: E501 - logo (str): The app logo url. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection_capabilities.py b/flat_api/model/collection_capabilities.py deleted file mode 100644 index 9c3f93b..0000000 --- a/flat_api/model/collection_capabilities.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class CollectionCapabilities(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'can_edit': (bool,), # noqa: E501 - 'can_share': (bool,), # noqa: E501 - 'can_delete': (bool,), # noqa: E501 - 'can_add_scores': (bool,), # noqa: E501 - 'can_delete_scores': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'can_edit': 'canEdit', # noqa: E501 - 'can_share': 'canShare', # noqa: E501 - 'can_delete': 'canDelete', # noqa: E501 - 'can_add_scores': 'canAddScores', # noqa: E501 - 'can_delete_scores': 'canDeleteScores', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CollectionCapabilities - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_edit (bool): Whether the current user can modify the metadata for the collection . [optional] # noqa: E501 - can_share (bool): Whether the current user can modify the sharing settings for the collection . [optional] # noqa: E501 - can_delete (bool): Whether the current user can delete the collection . [optional] # noqa: E501 - can_add_scores (bool): Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. . [optional] # noqa: E501 - can_delete_scores (bool): Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CollectionCapabilities - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_edit (bool): Whether the current user can modify the metadata for the collection . [optional] # noqa: E501 - can_share (bool): Whether the current user can modify the sharing settings for the collection . [optional] # noqa: E501 - can_delete (bool): Whether the current user can delete the collection . [optional] # noqa: E501 - can_add_scores (bool): Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. . [optional] # noqa: E501 - can_delete_scores (bool): Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection_creation.py b/flat_api/model/collection_creation.py deleted file mode 100644 index e3038a0..0000000 --- a/flat_api/model/collection_creation.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.collection_privacy import CollectionPrivacy - globals()['CollectionPrivacy'] = CollectionPrivacy - - -class CollectionCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('title',): { - 'max_length': 300, - 'min_length': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'privacy': (CollectionPrivacy,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, title, privacy, *args, **kwargs): # noqa: E501 - """CollectionCreation - a model defined in OpenAPI - - Args: - title (str): The title of the collection - privacy (CollectionPrivacy): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.title = title - self.privacy = privacy - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, title, privacy, *args, **kwargs): # noqa: E501 - """CollectionCreation - a model defined in OpenAPI - - Args: - title (str): The title of the collection - privacy (CollectionPrivacy): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.title = title - self.privacy = privacy - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection_modification.py b/flat_api/model/collection_modification.py deleted file mode 100644 index 325474d..0000000 --- a/flat_api/model/collection_modification.py +++ /dev/null @@ -1,278 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.collection_privacy import CollectionPrivacy - globals()['CollectionPrivacy'] = CollectionPrivacy - - -class CollectionModification(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('title',): { - 'max_length': 300, - 'min_length': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'privacy': (CollectionPrivacy,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CollectionModification - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the collection. [optional] # noqa: E501 - privacy (CollectionPrivacy): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CollectionModification - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the collection. [optional] # noqa: E501 - privacy (CollectionPrivacy): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/collection_privacy.py b/flat_api/model/collection_privacy.py deleted file mode 100644 index c1fb797..0000000 --- a/flat_api/model/collection_privacy.py +++ /dev/null @@ -1,282 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class CollectionPrivacy(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'PRIVATE': "private", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """CollectionPrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 - - Keyword Args: - value (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """CollectionPrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 - - Keyword Args: - value (str): The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. . if omitted defaults to "private", must be one of ["private", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/collection_type.py b/flat_api/model/collection_type.py deleted file mode 100644 index 596540a..0000000 --- a/flat_api/model/collection_type.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class CollectionType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ROOT': "root", - 'REGULAR': "regular", - 'SHAREDWITHME': "sharedWithMe", - 'SHAREDWITHGROUP': "sharedWithGroup", - 'APP': "app", - 'TRASH': "trash", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """CollectionType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 - - Keyword Args: - value (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """CollectionType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 - - Keyword Args: - value (str): Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. ., must be one of ["root", "regular", "sharedWithMe", "sharedWithGroup", "app", "trash", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/edu_library.py b/flat_api/model/edu_library.py deleted file mode 100644 index c6558ce..0000000 --- a/flat_api/model/edu_library.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduLibrary(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'MYRESOURCES': "myResources", - 'FLATEDUSAMPLES': "flatEduSamples", - }, - ('visibility',): { - 'PRIVATE': "private", - 'ORGANIZATION': "organization", - 'PUBLIC': "public", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'visibility': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'visibility': 'visibility', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EduLibrary - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` . [optional] # noqa: E501 - name (str): Name of the lirbary. [optional] # noqa: E501 - type (str): Type of the library. [optional] # noqa: E501 - visibility (str): Visibility of the library. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EduLibrary - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` . [optional] # noqa: E501 - name (str): Name of the lirbary. [optional] # noqa: E501 - type (str): Type of the library. [optional] # noqa: E501 - visibility (str): Visibility of the library. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource.py b/flat_api/model/edu_resource.py deleted file mode 100644 index 5c4e194..0000000 --- a/flat_api/model/edu_resource.py +++ /dev/null @@ -1,328 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.edu_resource_capabilities import EduResourceCapabilities - from flat_api.model.edu_resource_privacy import EduResourcePrivacy - from flat_api.model.edu_resource_resource import EduResourceResource - from flat_api.model.edu_resource_type import EduResourceType - globals()['EduResourceCapabilities'] = EduResourceCapabilities - globals()['EduResourcePrivacy'] = EduResourcePrivacy - globals()['EduResourceResource'] = EduResourceResource - globals()['EduResourceType'] = EduResourceType - - -class EduResource(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (EduResourceType,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'capabilities': (EduResourceCapabilities,), # noqa: E501 - 'creator': (str,), # noqa: E501 - 'privacy': (EduResourcePrivacy,), # noqa: E501 - 'tags': ([str],), # noqa: E501 - 'parent': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'update_date': (datetime,), # noqa: E501 - 'resource': (EduResourceResource,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'title': 'title', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'creator': 'creator', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - 'tags': 'tags', # noqa: E501 - 'parent': 'parent', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'update_date': 'updateDate', # noqa: E501 - 'resource': 'resource', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, id, type, title, capabilities, *args, **kwargs): # noqa: E501 - """EduResource - a model defined in OpenAPI - - Args: - id (str): Resource unique identifier - type (EduResourceType): - title (str): Title of the resource - capabilities (EduResourceCapabilities): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - creator (str): The User identifier of the resource creator. [optional] # noqa: E501 - privacy (EduResourcePrivacy): [optional] # noqa: E501 - tags ([str]): Specific attributes for the resource (e.g. sample resources with custom design). [optional] # noqa: E501 - parent (str): Identifier of the parent resource, e.g. a folder or root. [optional] # noqa: E501 - creation_date (datetime): The date when the resource was created. [optional] # noqa: E501 - update_date (datetime): The date when the resource was updated. [optional] # noqa: E501 - resource (EduResourceResource): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.type = type - self.title = title - self.capabilities = capabilities - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, id, type, title, capabilities, *args, **kwargs): # noqa: E501 - """EduResource - a model defined in OpenAPI - - Args: - id (str): Resource unique identifier - type (EduResourceType): - title (str): Title of the resource - capabilities (EduResourceCapabilities): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - creator (str): The User identifier of the resource creator. [optional] # noqa: E501 - privacy (EduResourcePrivacy): [optional] # noqa: E501 - tags ([str]): Specific attributes for the resource (e.g. sample resources with custom design). [optional] # noqa: E501 - parent (str): Identifier of the parent resource, e.g. a folder or root. [optional] # noqa: E501 - creation_date (datetime): The date when the resource was created. [optional] # noqa: E501 - update_date (datetime): The date when the resource was updated. [optional] # noqa: E501 - resource (EduResourceResource): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.id = id - self.type = type - self.title = title - self.capabilities = capabilities - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_capabilities.py b/flat_api/model/edu_resource_capabilities.py deleted file mode 100644 index 0de08a1..0000000 --- a/flat_api/model/edu_resource_capabilities.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceCapabilities(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'can_edit': (bool,), # noqa: E501 - 'can_add_resources': (bool,), # noqa: E501 - 'can_add_folders': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'can_edit': 'canEdit', # noqa: E501 - 'can_add_resources': 'canAddResources', # noqa: E501 - 'can_add_folders': 'canAddFolders', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EduResourceCapabilities - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_edit (bool): Whether the current user can modify this resource . [optional] # noqa: E501 - can_add_resources (bool): Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) . [optional] # noqa: E501 - can_add_folders (bool): Whether the current user can add folders within this resource (e.g. `folder` inside `root`) . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EduResourceCapabilities - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - can_edit (bool): Whether the current user can modify this resource . [optional] # noqa: E501 - can_add_resources (bool): Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) . [optional] # noqa: E501 - can_add_folders (bool): Whether the current user can add folders within this resource (e.g. `folder` inside `root`) . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_copy.py b/flat_api/model/edu_resource_copy.py deleted file mode 100644 index 9166226..0000000 --- a/flat_api/model/edu_resource_copy.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceCopy(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'destination': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'destination': 'destination', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, destination, *args, **kwargs): # noqa: E501 - """EduResourceCopy - a model defined in OpenAPI - - Args: - destination (str): Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.destination = destination - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, destination, *args, **kwargs): # noqa: E501 - """EduResourceCopy - a model defined in OpenAPI - - Args: - destination (str): Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.destination = destination - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_creation.py b/flat_api/model/edu_resource_creation.py deleted file mode 100644 index b5ac71c..0000000 --- a/flat_api/model/edu_resource_creation.py +++ /dev/null @@ -1,290 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.edu_resource_type import EduResourceType - globals()['EduResourceType'] = EduResourceType - - -class EduResourceCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('title',): { - 'max_length': 1000, - 'min_length': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (EduResourceType,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'parent': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'title': 'title', # noqa: E501 - 'parent': 'parent', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, title, *args, **kwargs): # noqa: E501 - """EduResourceCreation - a model defined in OpenAPI - - Args: - type (EduResourceType): - title (str): Title of the resource - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] if omitted the server will use the default value of "root" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.title = title - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, title, *args, **kwargs): # noqa: E501 - """EduResourceCreation - a model defined in OpenAPI - - Args: - type (EduResourceType): - title (str): Title of the resource - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - parent (str): Identifier of the parent resource where the new one will created, e.g. a folder id or `root`. [optional] if omitted the server will use the default value of "root" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.title = title - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_move.py b/flat_api/model/edu_resource_move.py deleted file mode 100644 index 769ee72..0000000 --- a/flat_api/model/edu_resource_move.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceMove(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'destination': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'destination': 'destination', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, destination, *args, **kwargs): # noqa: E501 - """EduResourceMove - a model defined in OpenAPI - - Args: - destination (str): Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.destination = destination - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, destination, *args, **kwargs): # noqa: E501 - """EduResourceMove - a model defined in OpenAPI - - Args: - destination (str): Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.destination = destination - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_privacy.py b/flat_api/model/edu_resource_privacy.py deleted file mode 100644 index 12426a8..0000000 --- a/flat_api/model/edu_resource_privacy.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourcePrivacy(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'PRIVATE': "private", - 'PUBLIC': "public", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """EduResourcePrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 - - Keyword Args: - value (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """EduResourcePrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 - - Keyword Args: - value (str): The Education resource privacy mode. . if omitted defaults to "private", must be one of ["private", "public", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/edu_resource_resource.py b/flat_api/model/edu_resource_resource.py deleted file mode 100644 index 9faf2e4..0000000 --- a/flat_api/model/edu_resource_resource.py +++ /dev/null @@ -1,330 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities - from flat_api.model.assignment_type import AssignmentType - from flat_api.model.media_attachment import MediaAttachment - globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities - globals()['AssignmentType'] = AssignmentType - globals()['MediaAttachment'] = MediaAttachment - - -class EduResourceResource(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('release_grades',): { - 'AUTO': "auto", - 'MANUAL': "manual", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (AssignmentType,), # noqa: E501 - 'capabilities': (AssignmentCopyResponseCapabilities,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'cover': (str,), # noqa: E501 - 'cover_file': (str,), # noqa: E501 - 'attachments': ([MediaAttachment],), # noqa: E501 - 'use_dedicated_attachments': (bool,), # noqa: E501 - 'max_points': (float,), # noqa: E501 - 'release_grades': (str,), # noqa: E501 - 'shuffle_exercises': (bool,), # noqa: E501 - 'toolset': (str,), # noqa: E501 - 'nb_playback_authorized': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'cover': 'cover', # noqa: E501 - 'cover_file': 'coverFile', # noqa: E501 - 'attachments': 'attachments', # noqa: E501 - 'use_dedicated_attachments': 'useDedicatedAttachments', # noqa: E501 - 'max_points': 'maxPoints', # noqa: E501 - 'release_grades': 'releaseGrades', # noqa: E501 - 'shuffle_exercises': 'shuffleExercises', # noqa: E501 - 'toolset': 'toolset', # noqa: E501 - 'nb_playback_authorized': 'nbPlaybackAuthorized', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EduResourceResource - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the folder. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EduResourceResource - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the assignment. [optional] # noqa: E501 - type (AssignmentType): [optional] # noqa: E501 - capabilities (AssignmentCopyResponseCapabilities): [optional] # noqa: E501 - title (str): Title of the folder. [optional] # noqa: E501 - description (str): Description and content of the assignment. [optional] # noqa: E501 - cover (str): The URL of the cover to display. [optional] # noqa: E501 - cover_file (str): The id of the cover to display. [optional] # noqa: E501 - attachments ([MediaAttachment]): [optional] # noqa: E501 - use_dedicated_attachments (bool): For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. . [optional] # noqa: E501 - max_points (float): If set, the grading will be enabled for the assignement . [optional] # noqa: E501 - release_grades (str): For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions . [optional] # noqa: E501 - shuffle_exercises (bool): Mixing worksheets exercises for each student. [optional] # noqa: E501 - toolset (str): The id of the associated toolset. [optional] # noqa: E501 - nb_playback_authorized (float): The number of playback authorized on the scores of the assignment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_type.py b/flat_api/model/edu_resource_type.py deleted file mode 100644 index f942c44..0000000 --- a/flat_api/model/edu_resource_type.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ASSIGNMENT': "assignment", - 'FOLDER': "folder", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """EduResourceType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 - - Keyword Args: - value (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """EduResourceType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 - - Keyword Args: - value (str): Type of an education resource., must be one of ["assignment", "folder", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/edu_resource_update.py b/flat_api/model/edu_resource_update.py deleted file mode 100644 index 7cecdf2..0000000 --- a/flat_api/model/edu_resource_update.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('title',): { - 'max_length': 1000, - 'min_length': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'title': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """EduResourceUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the resource. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """EduResourceUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the resource. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_resource_use_in_class.py b/flat_api/model/edu_resource_use_in_class.py deleted file mode 100644 index 3e7a26e..0000000 --- a/flat_api/model/edu_resource_use_in_class.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduResourceUseInClass(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'classroom': (str,), # noqa: E501 - 'assignment': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'classroom': 'classroom', # noqa: E501 - 'assignment': 'assignment', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, classroom, *args, **kwargs): # noqa: E501 - """EduResourceUseInClass - a model defined in OpenAPI - - Args: - classroom (str): The destination classroom where the resource will be copied. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.classroom = classroom - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, classroom, *args, **kwargs): # noqa: E501 - """EduResourceUseInClass - a model defined in OpenAPI - - Args: - classroom (str): The destination classroom where the resource will be copied. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - assignment (str): An optional destination assignment where the original assignement will be copied. Must be a draft.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.classroom = classroom - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/edu_skills_focused.py b/flat_api/model/edu_skills_focused.py deleted file mode 100644 index 26f9f62..0000000 --- a/flat_api/model/edu_skills_focused.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class EduSkillsFocused(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': ([str],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """EduSkillsFocused - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): Specific skills that will be focused in classroom. # noqa: E501 - - Keyword Args: - value ([str]): Specific skills that will be focused in classroom. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """EduSkillsFocused - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): Specific skills that will be focused in classroom. # noqa: E501 - - Keyword Args: - value ([str]): Specific skills that will be focused in classroom. # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/flat_error_response.py b/flat_api/model/flat_error_response.py deleted file mode 100644 index 3440b76..0000000 --- a/flat_api/model/flat_error_response.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class FlatErrorResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'param': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'code': 'code', # noqa: E501 - 'message': 'message', # noqa: E501 - 'id': 'id', # noqa: E501 - 'param': 'param', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, code, message, *args, **kwargs): # noqa: E501 - """FlatErrorResponse - a model defined in OpenAPI - - Args: - code (str): A corresponding code for this error - message (str): A printable message for this error - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): An unique error identifier generated for the request. [optional] # noqa: E501 - param (str): The related parameter that caused the error. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.code = code - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, code, message, *args, **kwargs): # noqa: E501 - """FlatErrorResponse - a model defined in OpenAPI - - Args: - code (str): A corresponding code for this error - message (str): A printable message for this error - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): An unique error identifier generated for the request. [optional] # noqa: E501 - param (str): The related parameter that caused the error. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.code = code - self.message = message - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/flat_locales.py b/flat_api/model/flat_locales.py deleted file mode 100644 index 66c8d93..0000000 --- a/flat_api/model/flat_locales.py +++ /dev/null @@ -1,299 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class FlatLocales(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'EN': "en", - 'EN-GB': "en-GB", - 'ES': "es", - 'FR': "fr", - 'DE': "de", - 'IT': "it", - 'JA': "ja", - 'JA-HIRA': "ja-HIRA", - 'KO': "ko", - 'NL': "nl", - 'PL': "pl", - 'PT': "pt", - 'PT-BR': "pt-BR", - 'RO': "ro", - 'RU': "ru", - 'SV': "sv", - 'TR': "tr", - 'ZH-HANS': "zh-Hans", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """FlatLocales - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 - - Keyword Args: - value (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "en" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """FlatLocales - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 - - Keyword Args: - value (str): The user language. if omitted defaults to "en", must be one of ["en", "en-GB", "es", "fr", "de", "it", "ja", "ja-HIRA", "ko", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sv", "tr", "zh-Hans", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "en" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/google_classroom_coursework.py b/flat_api/model/google_classroom_coursework.py deleted file mode 100644 index 3643123..0000000 --- a/flat_api/model/google_classroom_coursework.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class GoogleClassroomCoursework(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - 'topic_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - 'topic_id': 'topicId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GoogleClassroomCoursework - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the coursework assigned by Classroom. [optional] # noqa: E501 - state (str): State of the coursework. [optional] # noqa: E501 - alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 - topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GoogleClassroomCoursework - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the coursework assigned by Classroom. [optional] # noqa: E501 - state (str): State of the coursework. [optional] # noqa: E501 - alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 - topic_id (str, none_type): Identifier of the topic where the assignment is created. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/google_classroom_submission.py b/flat_api/model/google_classroom_submission.py deleted file mode 100644 index e5d4ef1..0000000 --- a/flat_api/model/google_classroom_submission.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class GoogleClassroomSubmission(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GoogleClassroomSubmission - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the coursework submission assigned by Classroom. [optional] # noqa: E501 - state (str): State of the submission on Google Classroom. [optional] # noqa: E501 - alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GoogleClassroomSubmission - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the coursework submission assigned by Classroom. [optional] # noqa: E501 - state (str): State of the submission on Google Classroom. [optional] # noqa: E501 - alternate_link (str): Absolute link to this coursework in the Classroom web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/group.py b/flat_api/model/group.py deleted file mode 100644 index f57f345..0000000 --- a/flat_api/model/group.py +++ /dev/null @@ -1,293 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class Group(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'GENERIC': "generic", - 'CLASSTEACHERS': "classTeachers", - 'CLASSSTUDENTS': "classStudents", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'users_count': (float,), # noqa: E501 - 'read_only': (bool,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'users_count': 'usersCount', # noqa: E501 - 'read_only': 'readOnly', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Group - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the group. [optional] # noqa: E501 - name (str): The display name of the group. [optional] # noqa: E501 - type (str): The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class . [optional] # noqa: E501 - users_count (float): The number of users in this group. [optional] # noqa: E501 - read_only (bool): `True` if the group is set in read-only . [optional] # noqa: E501 - organization (str): If the group is related to an organization, this field will contain the unique identifier of the organization . [optional] # noqa: E501 - creation_date (datetime): The creation date of the group. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Group - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the group. [optional] # noqa: E501 - name (str): The display name of the group. [optional] # noqa: E501 - type (str): The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class . [optional] # noqa: E501 - users_count (float): The number of users in this group. [optional] # noqa: E501 - read_only (bool): `True` if the group is set in read-only . [optional] # noqa: E501 - organization (str): If the group is related to an organization, this field will contain the unique identifier of the organization . [optional] # noqa: E501 - creation_date (datetime): The creation date of the group. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/group_details.py b/flat_api/model/group_details.py deleted file mode 100644 index 25f5844..0000000 --- a/flat_api/model/group_details.py +++ /dev/null @@ -1,294 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.group_type import GroupType - globals()['GroupType'] = GroupType - - -class GroupDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'type': (GroupType,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'users_count': (float,), # noqa: E501 - 'read_only': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'type': 'type', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'users_count': 'usersCount', # noqa: E501 - 'read_only': 'readOnly', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GroupDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the group. [optional] # noqa: E501 - name (str): The displayable name of the group. [optional] # noqa: E501 - type (GroupType): [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning the group. [optional] # noqa: E501 - creation_date (datetime): The date when the group was create. [optional] # noqa: E501 - users_count (float): The number of students in this group. [optional] # noqa: E501 - read_only (bool): `true` if the properties and members of this group are in in read-only . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GroupDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the group. [optional] # noqa: E501 - name (str): The displayable name of the group. [optional] # noqa: E501 - type (GroupType): [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning the group. [optional] # noqa: E501 - creation_date (datetime): The date when the group was create. [optional] # noqa: E501 - users_count (float): The number of students in this group. [optional] # noqa: E501 - read_only (bool): `true` if the properties and members of this group are in in read-only . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/group_type.py b/flat_api/model/group_type.py deleted file mode 100644 index 518f22d..0000000 --- a/flat_api/model/group_type.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class GroupType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'GENERIC': "generic", - 'CLASSTEACHERS': "classTeachers", - 'CLASSSTUDENTS': "classStudents", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """GroupType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 - - Keyword Args: - value (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """GroupType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 - - Keyword Args: - value (str): The type of the group., must be one of ["generic", "classTeachers", "classStudents", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/license_mode.py b/flat_api/model/license_mode.py deleted file mode 100644 index 2022ec1..0000000 --- a/flat_api/model/license_mode.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class LicenseMode(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CREDIT': "credit", - 'SITE': "site", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """LicenseMode - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 - - Keyword Args: - value (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """LicenseMode - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 - - Keyword Args: - value (str): Mode of the license., must be one of ["credit", "site", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/license_sources.py b/flat_api/model/license_sources.py deleted file mode 100644 index bbed8a7..0000000 --- a/flat_api/model/license_sources.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class LicenseSources(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ORDER': "order", - 'TRIAL': "trial", - 'VOUCHER': "voucher", - 'DISTRIBUTOR': "distributor", - 'SUBSCRIPTION': "subscription", - 'APPSTORE': "appStore", - 'PLAYSTORE': "playStore", - 'MUSICFIRST': "musicfirst", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """LicenseSources - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 - - Keyword Args: - value (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "order" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """LicenseSources - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 - - Keyword Args: - value (str): Source of the license. if omitted defaults to "order", must be one of ["order", "trial", "voucher", "distributor", "subscription", "appStore", "playStore", "musicfirst", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "order" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/lms_name.py b/flat_api/model/lms_name.py deleted file mode 100644 index aac5403..0000000 --- a/flat_api/model/lms_name.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class LmsName(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'CANVAS': "canvas", - 'MOODLE': "moodle", - 'SCHOOLOGY': "schoology", - 'BLACKBOARD': "blackboard", - 'DESIRE2LEARN': "desire2learn", - 'SAKAI': "sakai", - 'SCHOOLBOX': "schoolbox", - 'OTHER': "other", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """LmsName - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 - - Keyword Args: - value (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """LmsName - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 - - Keyword Args: - value (str): LMS name., must be one of ["canvas", "moodle", "schoology", "blackboard", "desire2learn", "sakai", "schoolbox", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/lti_credentials.py b/flat_api/model/lti_credentials.py deleted file mode 100644 index 0112582..0000000 --- a/flat_api/model/lti_credentials.py +++ /dev/null @@ -1,302 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.lms_name import LmsName - globals()['LmsName'] = LmsName - - -class LtiCredentials(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'lms': (LmsName,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'creator': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'last_usage': (datetime,), # noqa: E501 - 'consumer_key': (str,), # noqa: E501 - 'consumer_secret': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'lms': 'lms', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'creator': 'creator', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'last_usage': 'lastUsage', # noqa: E501 - 'consumer_key': 'consumerKey', # noqa: E501 - 'consumer_secret': 'consumerSecret', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LtiCredentials - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of this couple of credentials. [optional] # noqa: E501 - name (str): Name of the couple of credentials. [optional] # noqa: E501 - lms (LmsName): [optional] # noqa: E501 - organization (str): The unique identifier of the Organization associated to these credentials. [optional] # noqa: E501 - creator (str): Unique identifier of the user who created these credentials. [optional] # noqa: E501 - creation_date (datetime): The creation date of thse credentials. [optional] # noqa: E501 - last_usage (datetime): The last time these credentials were used. [optional] # noqa: E501 - consumer_key (str): OAuth 1 Consumer Key. [optional] # noqa: E501 - consumer_secret (str): OAuth 1 Consumer Secret. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """LtiCredentials - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of this couple of credentials. [optional] # noqa: E501 - name (str): Name of the couple of credentials. [optional] # noqa: E501 - lms (LmsName): [optional] # noqa: E501 - organization (str): The unique identifier of the Organization associated to these credentials. [optional] # noqa: E501 - creator (str): Unique identifier of the user who created these credentials. [optional] # noqa: E501 - creation_date (datetime): The creation date of thse credentials. [optional] # noqa: E501 - last_usage (datetime): The last time these credentials were used. [optional] # noqa: E501 - consumer_key (str): OAuth 1 Consumer Key. [optional] # noqa: E501 - consumer_secret (str): OAuth 1 Consumer Secret. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/lti_credentials_creation.py b/flat_api/model/lti_credentials_creation.py deleted file mode 100644 index a304bc1..0000000 --- a/flat_api/model/lti_credentials_creation.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.lms_name import LmsName - globals()['LmsName'] = LmsName - - -class LtiCredentialsCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('name',): { - 'max_length': 300, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'lms': (LmsName,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'lms': 'lms', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, name, lms, *args, **kwargs): # noqa: E501 - """LtiCredentialsCreation - a model defined in OpenAPI - - Args: - name (str): Name of the couple of credentials - lms (LmsName): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.lms = lms - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, name, lms, *args, **kwargs): # noqa: E501 - """LtiCredentialsCreation - a model defined in OpenAPI - - Args: - name (str): Name of the couple of credentials - lms (LmsName): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.name = name - self.lms = lms - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/media_attachment.py b/flat_api/model/media_attachment.py deleted file mode 100644 index b768846..0000000 --- a/flat_api/model/media_attachment.py +++ /dev/null @@ -1,370 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode - globals()['MediaScoreSharingMode'] = MediaScoreSharingMode - - -class MediaAttachment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'RICH': "rich", - 'PHOTO': "photo", - 'VIDEO': "video", - 'LINK': "link", - 'FLAT': "flat", - 'GOOGLEDRIVE': "googleDrive", - 'WORKSHEET': "worksheet", - 'PERFORMANCE': "performance", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'revision': (str,), # noqa: E501 - 'worksheet': (str,), # noqa: E501 - 'dedicated': (bool,), # noqa: E501 - 'track': (str,), # noqa: E501 - 'sharing_mode': (MediaScoreSharingMode,), # noqa: E501 - 'lock_score_template': (bool,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'html': (str,), # noqa: E501 - 'html_width': (str,), # noqa: E501 - 'html_height': (str,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'thumbnail_url': (str,), # noqa: E501 - 'thumbnail_width': (int,), # noqa: E501 - 'thumbnail_height': (int,), # noqa: E501 - 'author_name': (str,), # noqa: E501 - 'author_url': (str,), # noqa: E501 - 'icon_url': (str,), # noqa: E501 - 'mime_type': (str,), # noqa: E501 - 'google_drive_file_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'score': 'score', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'worksheet': 'worksheet', # noqa: E501 - 'dedicated': 'dedicated', # noqa: E501 - 'track': 'track', # noqa: E501 - 'sharing_mode': 'sharingMode', # noqa: E501 - 'lock_score_template': 'lockScoreTemplate', # noqa: E501 - 'title': 'title', # noqa: E501 - 'description': 'description', # noqa: E501 - 'html': 'html', # noqa: E501 - 'html_width': 'htmlWidth', # noqa: E501 - 'html_height': 'htmlHeight', # noqa: E501 - 'url': 'url', # noqa: E501 - 'thumbnail_url': 'thumbnailUrl', # noqa: E501 - 'thumbnail_width': 'thumbnailWidth', # noqa: E501 - 'thumbnail_height': 'thumbnailHeight', # noqa: E501 - 'author_name': 'authorName', # noqa: E501 - 'author_url': 'authorUrl', # noqa: E501 - 'icon_url': 'iconUrl', # noqa: E501 - 'mime_type': 'mimeType', # noqa: E501 - 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """MediaAttachment - a model defined in OpenAPI - - Args: - type (str): The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - score (str): An unique Flat score identifier. [optional] # noqa: E501 - revision (str): An unique revision identifier of a score. [optional] # noqa: E501 - worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 - dedicated (bool): True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment. [optional] # noqa: E501 - track (str): A unique track identifier. [optional] # noqa: E501 - sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 - lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 - title (str): The resolved title of the attachment. [optional] # noqa: E501 - description (str): The resolved description of the attachment. [optional] # noqa: E501 - html (str): If the attachment type is `rich` or `video`, the HTML code of the media to display . [optional] # noqa: E501 - html_width (str): If the `html` is available, the width of the widget. [optional] # noqa: E501 - html_height (str): If the `html` is available, the height of the widget. [optional] # noqa: E501 - url (str): The url of the attachment. [optional] # noqa: E501 - thumbnail_url (str): If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment . [optional] # noqa: E501 - thumbnail_width (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 - thumbnail_height (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 - author_name (str): The resolved author name of the attachment. [optional] # noqa: E501 - author_url (str): The resolved author url of the attachment. [optional] # noqa: E501 - icon_url (str): The URL of the icon. [optional] # noqa: E501 - mime_type (str): The mine type of the file. [optional] # noqa: E501 - google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 - """MediaAttachment - a model defined in OpenAPI - - Args: - type (str): The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - score (str): An unique Flat score identifier. [optional] # noqa: E501 - revision (str): An unique revision identifier of a score. [optional] # noqa: E501 - worksheet (str): An unique worksheet identifier. [optional] # noqa: E501 - dedicated (bool): True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment. [optional] # noqa: E501 - track (str): A unique track identifier. [optional] # noqa: E501 - sharing_mode (MediaScoreSharingMode): [optional] # noqa: E501 - lock_score_template (bool): To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.. [optional] # noqa: E501 - title (str): The resolved title of the attachment. [optional] # noqa: E501 - description (str): The resolved description of the attachment. [optional] # noqa: E501 - html (str): If the attachment type is `rich` or `video`, the HTML code of the media to display . [optional] # noqa: E501 - html_width (str): If the `html` is available, the width of the widget. [optional] # noqa: E501 - html_height (str): If the `html` is available, the height of the widget. [optional] # noqa: E501 - url (str): The url of the attachment. [optional] # noqa: E501 - thumbnail_url (str): If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment . [optional] # noqa: E501 - thumbnail_width (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 - thumbnail_height (int): If the `thumbnailUrl` is available, the width of the thumbnail . [optional] # noqa: E501 - author_name (str): The resolved author name of the attachment. [optional] # noqa: E501 - author_url (str): The resolved author url of the attachment. [optional] # noqa: E501 - icon_url (str): The URL of the icon. [optional] # noqa: E501 - mime_type (str): The mine type of the file. [optional] # noqa: E501 - google_drive_file_id (str): The ID of the Google Drive File. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/media_score_sharing_mode.py b/flat_api/model/media_score_sharing_mode.py deleted file mode 100644 index 5c44482..0000000 --- a/flat_api/model/media_score_sharing_mode.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class MediaScoreSharingMode(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'READ': "read", - 'WRITE': "write", - 'COPY': "copy", - 'PERFORMANCE': "performance", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """MediaScoreSharingMode - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 - - Keyword Args: - value (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "read" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """MediaScoreSharingMode - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 - - Keyword Args: - value (str): The sharing mode of the score for classes post and assignments. if omitted defaults to "read", must be one of ["read", "write", "copy", "performance", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "read" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/microsoft_graph_assignment.py b/flat_api/model/microsoft_graph_assignment.py deleted file mode 100644 index 2e7f5da..0000000 --- a/flat_api/model/microsoft_graph_assignment.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class MicrosoftGraphAssignment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - 'categories': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - 'categories': 'categories', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MicrosoftGraphAssignment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the assignement assigned by Microsoft Teams. [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - alternate_link (str): Absolute link to this assignement in the Microsoft Teams web UI. [optional] # noqa: E501 - categories ([str]): List of categories where this assignment is published under. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """MicrosoftGraphAssignment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the assignement assigned by Microsoft Teams. [optional] # noqa: E501 - state (str): State of the assignment. [optional] # noqa: E501 - alternate_link (str): Absolute link to this assignement in the Microsoft Teams web UI. [optional] # noqa: E501 - categories ([str]): List of categories where this assignment is published under. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/microsoft_graph_submission.py b/flat_api/model/microsoft_graph_submission.py deleted file mode 100644 index b038ebf..0000000 --- a/flat_api/model/microsoft_graph_submission.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class MicrosoftGraphSubmission(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'alternate_link': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'state': 'state', # noqa: E501 - 'alternate_link': 'alternateLink', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MicrosoftGraphSubmission - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the submission assigned by Microsoft Teams. [optional] # noqa: E501 - state (str): State of the submission. [optional] # noqa: E501 - alternate_link (str): Absolute link to this submission in the Microsoft Teams web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """MicrosoftGraphSubmission - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the submission assigned by Microsoft Teams. [optional] # noqa: E501 - state (str): State of the submission. [optional] # noqa: E501 - alternate_link (str): Absolute link to this submission in the Microsoft Teams web UI. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/organization_invitation.py b/flat_api/model/organization_invitation.py deleted file mode 100644 index 5d5c7e1..0000000 --- a/flat_api/model/organization_invitation.py +++ /dev/null @@ -1,294 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.organization_roles import OrganizationRoles - globals()['OrganizationRoles'] = OrganizationRoles - - -class OrganizationInvitation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'custom_code': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'invited_by': (str,), # noqa: E501 - 'used_by': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'custom_code': 'customCode', # noqa: E501 - 'email': 'email', # noqa: E501 - 'invited_by': 'invitedBy', # noqa: E501 - 'used_by': 'usedBy', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OrganizationInvitation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The invitation unique identifier. [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - custom_code (str): Enrollment code to use when joining this organization. [optional] # noqa: E501 - email (str): The email address this invitation was sent to. [optional] # noqa: E501 - invited_by (str): The unique identifier of the User who created this invitation. [optional] # noqa: E501 - used_by (str): The unique identifier of the User who used this invitation. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OrganizationInvitation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The invitation unique identifier. [optional] # noqa: E501 - organization (str): The unique identifier of the Organization owning this class. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - custom_code (str): Enrollment code to use when joining this organization. [optional] # noqa: E501 - email (str): The email address this invitation was sent to. [optional] # noqa: E501 - invited_by (str): The unique identifier of the User who created this invitation. [optional] # noqa: E501 - used_by (str): The unique identifier of the User who used this invitation. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/organization_invitation_creation.py b/flat_api/model/organization_invitation_creation.py deleted file mode 100644 index e262726..0000000 --- a/flat_api/model/organization_invitation_creation.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.organization_roles import OrganizationRoles - globals()['OrganizationRoles'] = OrganizationRoles - - -class OrganizationInvitationCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'email': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'email': 'email', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OrganizationInvitationCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email (str): The email address you want to send the invitation to. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OrganizationInvitationCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email (str): The email address you want to send the invitation to. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/organization_roles.py b/flat_api/model/organization_roles.py deleted file mode 100644 index 3d0c34f..0000000 --- a/flat_api/model/organization_roles.py +++ /dev/null @@ -1,293 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class OrganizationRoles(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ADMIN': "admin", - 'BILLING': "billing", - 'TEACHER': "teacher", - 'USER': "user", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """OrganizationRoles - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 - - Keyword Args: - value (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """OrganizationRoles - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 - - Keyword Args: - value (str): User's Organization Role (for Edu users only)., must be one of ["admin", "billing", "teacher", "user", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/organization_user_access_token_creation.py b/flat_api/model/organization_user_access_token_creation.py deleted file mode 100644 index aecd6cf..0000000 --- a/flat_api/model/organization_user_access_token_creation.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.app_scopes import AppScopes - globals()['AppScopes'] = AppScopes - - -class OrganizationUserAccessTokenCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'scopes': ([AppScopes],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'scopes': 'scopes', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, scopes, *args, **kwargs): # noqa: E501 - """OrganizationUserAccessTokenCreation - a model defined in OpenAPI - - Args: - scopes ([AppScopes]): List of requested scopes for this credential - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.scopes = scopes - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, scopes, *args, **kwargs): # noqa: E501 - """OrganizationUserAccessTokenCreation - a model defined in OpenAPI - - Args: - scopes ([AppScopes]): List of requested scopes for this credential - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.scopes = scopes - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/resource_collaborator.py b/flat_api/model/resource_collaborator.py deleted file mode 100644 index 2e96eab..0000000 --- a/flat_api/model/resource_collaborator.py +++ /dev/null @@ -1,312 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.group import Group - from flat_api.model.user_public import UserPublic - globals()['Group'] = Group - globals()['UserPublic'] = UserPublic - - -class ResourceCollaborator(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'acl_read': (bool,), # noqa: E501 - 'acl_write': (bool,), # noqa: E501 - 'acl_admin': (bool,), # noqa: E501 - 'is_collaborator': (bool,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'collection': (str,), # noqa: E501 - 'user': (UserPublic,), # noqa: E501 - 'group': (Group,), # noqa: E501 - 'user_email': (str,), # noqa: E501 - 'invited': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'acl_read': 'aclRead', # noqa: E501 - 'acl_write': 'aclWrite', # noqa: E501 - 'acl_admin': 'aclAdmin', # noqa: E501 - 'is_collaborator': 'isCollaborator', # noqa: E501 - 'id': 'id', # noqa: E501 - 'score': 'score', # noqa: E501 - 'collection': 'collection', # noqa: E501 - 'user': 'user', # noqa: E501 - 'group': 'group', # noqa: E501 - 'user_email': 'userEmail', # noqa: E501 - 'invited': 'invited', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ResourceCollaborator - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 - id (str): The unique identifier of the permission. [optional] # noqa: E501 - score (str): If this object is a permission of a score, this property will contain the unique identifier of the score. [optional] # noqa: E501 - collection (str): If this object is a permission of a collection, this property will contain the unique identifier of the collection. [optional] # noqa: E501 - user (UserPublic): [optional] # noqa: E501 - group (Group): [optional] # noqa: E501 - user_email (str): If the collaborator is not a user of Flat yet, this field will contain their email. . [optional] # noqa: E501 - invited (bool): If this property is `true`, this is still a pending invitation . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ResourceCollaborator - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 - id (str): The unique identifier of the permission. [optional] # noqa: E501 - score (str): If this object is a permission of a score, this property will contain the unique identifier of the score. [optional] # noqa: E501 - collection (str): If this object is a permission of a collection, this property will contain the unique identifier of the collection. [optional] # noqa: E501 - user (UserPublic): [optional] # noqa: E501 - group (Group): [optional] # noqa: E501 - user_email (str): If the collaborator is not a user of Flat yet, this field will contain their email. . [optional] # noqa: E501 - invited (bool): If this property is `true`, this is still a pending invitation . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/resource_collaborator_creation.py b/flat_api/model/resource_collaborator_creation.py deleted file mode 100644 index f0b0829..0000000 --- a/flat_api/model/resource_collaborator_creation.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ResourceCollaboratorCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'user': (str,), # noqa: E501 - 'group': (str,), # noqa: E501 - 'user_email': (str,), # noqa: E501 - 'user_token': (str,), # noqa: E501 - 'acl_read': (bool,), # noqa: E501 - 'acl_write': (bool,), # noqa: E501 - 'acl_admin': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'user': 'user', # noqa: E501 - 'group': 'group', # noqa: E501 - 'user_email': 'userEmail', # noqa: E501 - 'user_token': 'userToken', # noqa: E501 - 'acl_read': 'aclRead', # noqa: E501 - 'acl_write': 'aclWrite', # noqa: E501 - 'acl_admin': 'aclAdmin', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ResourceCollaboratorCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - user (str): The unique identifier of a Flat user. [optional] # noqa: E501 - group (str): The unique identifier of a Flat group. [optional] # noqa: E501 - user_email (str): Fill this field to invite an individual user by email. . [optional] # noqa: E501 - user_token (str): Token received in an invitation to join the score. . [optional] # noqa: E501 - acl_read (bool): `True` if the related user can read the score. (probably true if the user has a permission on the document). . [optional] if omitted the server will use the default value of True # noqa: E501 - acl_write (bool): `True` if the related user can modify the score. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document . [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ResourceCollaboratorCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - user (str): The unique identifier of a Flat user. [optional] # noqa: E501 - group (str): The unique identifier of a Flat group. [optional] # noqa: E501 - user_email (str): Fill this field to invite an individual user by email. . [optional] # noqa: E501 - user_token (str): Token received in an invitation to join the score. . [optional] # noqa: E501 - acl_read (bool): `True` if the related user can read the score. (probably true if the user has a permission on the document). . [optional] if omitted the server will use the default value of True # noqa: E501 - acl_write (bool): `True` if the related user can modify the score. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document . [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/resource_rights.py b/flat_api/model/resource_rights.py deleted file mode 100644 index e2c06db..0000000 --- a/flat_api/model/resource_rights.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ResourceRights(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'acl_read': (bool,), # noqa: E501 - 'acl_write': (bool,), # noqa: E501 - 'acl_admin': (bool,), # noqa: E501 - 'is_collaborator': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'acl_read': 'aclRead', # noqa: E501 - 'acl_write': 'aclWrite', # noqa: E501 - 'acl_admin': 'aclAdmin', # noqa: E501 - 'is_collaborator': 'isCollaborator', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ResourceRights - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ResourceRights - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - acl_read (bool): `True` if the current user can read the current document . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_write (bool): `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - acl_admin (bool): `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. . [optional] if omitted the server will use the default value of False # noqa: E501 - is_collaborator (bool): `True` if the current user is a collaborator of the current document (direct or via group). . [optional] if omitted the server will use the default value of False # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comment.py b/flat_api/model/score_comment.py deleted file mode 100644 index 6a32c33..0000000 --- a/flat_api/model/score_comment.py +++ /dev/null @@ -1,336 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_comment_context import ScoreCommentContext - from flat_api.model.score_comment_moderation import ScoreCommentModeration - globals()['ScoreCommentContext'] = ScoreCommentContext - globals()['ScoreCommentModeration'] = ScoreCommentModeration - - -class ScoreComment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'DOCUMENT': "document", - 'INLINE': "inline", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'user': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'revision': (str,), # noqa: E501 - 'reply_to': (str,), # noqa: E501 - 'date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'comment': (str,), # noqa: E501 - 'raw_comment': (str,), # noqa: E501 - 'context': (ScoreCommentContext,), # noqa: E501 - 'mentions': ([str],), # noqa: E501 - 'resolved': (bool,), # noqa: E501 - 'resolved_by': (str,), # noqa: E501 - 'moderation': (ScoreCommentModeration,), # noqa: E501 - 'spam': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'user': 'user', # noqa: E501 - 'score': 'score', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'reply_to': 'replyTo', # noqa: E501 - 'date': 'date', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'comment': 'comment', # noqa: E501 - 'raw_comment': 'rawComment', # noqa: E501 - 'context': 'context', # noqa: E501 - 'mentions': 'mentions', # noqa: E501 - 'resolved': 'resolved', # noqa: E501 - 'resolved_by': 'resolvedBy', # noqa: E501 - 'moderation': 'moderation', # noqa: E501 - 'spam': 'spam', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreComment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The comment unique identifier. [optional] # noqa: E501 - type (str): The type of the comment. [optional] # noqa: E501 - user (str): The author unique identifier. [optional] # noqa: E501 - score (str): The unique identifier of the score where the comment was posted. [optional] # noqa: E501 - revision (str): The unique identifier of revision the comment was posted. [optional] # noqa: E501 - reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 - date (datetime): The date when the comment was posted. [optional] # noqa: E501 - modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without parsing the mentions. . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - mentions ([str]): The list of user identifier mentioned on the score. [optional] # noqa: E501 - resolved (bool): For inline comments, the comment can be marked as resolved and will be hidden in the future responses . [optional] # noqa: E501 - resolved_by (str): If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved . [optional] # noqa: E501 - moderation (ScoreCommentModeration): [optional] # noqa: E501 - spam (bool): `true if the message has been detected as spam and hidden from other users . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreComment - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The comment unique identifier. [optional] # noqa: E501 - type (str): The type of the comment. [optional] # noqa: E501 - user (str): The author unique identifier. [optional] # noqa: E501 - score (str): The unique identifier of the score where the comment was posted. [optional] # noqa: E501 - revision (str): The unique identifier of revision the comment was posted. [optional] # noqa: E501 - reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 - date (datetime): The date when the comment was posted. [optional] # noqa: E501 - modification_date (datetime): The date of the last comment modification. [optional] # noqa: E501 - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without parsing the mentions. . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - mentions ([str]): The list of user identifier mentioned on the score. [optional] # noqa: E501 - resolved (bool): For inline comments, the comment can be marked as resolved and will be hidden in the future responses . [optional] # noqa: E501 - resolved_by (str): If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved . [optional] # noqa: E501 - moderation (ScoreCommentModeration): [optional] # noqa: E501 - spam (bool): `true if the message has been detected as spam and hidden from other users . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comment_context.py b/flat_api/model/score_comment_context.py deleted file mode 100644 index 65b5b6a..0000000 --- a/flat_api/model/score_comment_context.py +++ /dev/null @@ -1,308 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCommentContext(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'part_uuid': (str,), # noqa: E501 - 'measure_uuids': ([str],), # noqa: E501 - 'start_time_pos': (float,), # noqa: E501 - 'stop_time_pos': (float,), # noqa: E501 - 'start_dpq': (float,), # noqa: E501 - 'stop_dpq': (float,), # noqa: E501 - 'staff_idx': (float,), # noqa: E501 - 'staff_uuid': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'part_uuid': 'partUuid', # noqa: E501 - 'measure_uuids': 'measureUuids', # noqa: E501 - 'start_time_pos': 'startTimePos', # noqa: E501 - 'stop_time_pos': 'stopTimePos', # noqa: E501 - 'start_dpq': 'startDpq', # noqa: E501 - 'stop_dpq': 'stopDpq', # noqa: E501 - 'staff_idx': 'staffIdx', # noqa: E501 - 'staff_uuid': 'staffUuid', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, part_uuid, measure_uuids, start_time_pos, stop_time_pos, start_dpq, stop_dpq, *args, **kwargs): # noqa: E501 - """ScoreCommentContext - a model defined in OpenAPI - - Args: - part_uuid (str): The unique identifier (UUID) of the score part - measure_uuids ([str]): The list of measure UUIds - start_time_pos (float): - stop_time_pos (float): - start_dpq (float): - stop_dpq (float): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - staff_idx (float): (Deprecated, use `staffUuid`) The identififer of the staff. [optional] # noqa: E501 - staff_uuid (str): The unique identififer (UUID) of the staff. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.part_uuid = part_uuid - self.measure_uuids = measure_uuids - self.start_time_pos = start_time_pos - self.stop_time_pos = stop_time_pos - self.start_dpq = start_dpq - self.stop_dpq = stop_dpq - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, part_uuid, measure_uuids, start_time_pos, stop_time_pos, start_dpq, stop_dpq, *args, **kwargs): # noqa: E501 - """ScoreCommentContext - a model defined in OpenAPI - - Args: - part_uuid (str): The unique identifier (UUID) of the score part - measure_uuids ([str]): The list of measure UUIds - start_time_pos (float): - stop_time_pos (float): - start_dpq (float): - stop_dpq (float): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - staff_idx (float): (Deprecated, use `staffUuid`) The identififer of the staff. [optional] # noqa: E501 - staff_uuid (str): The unique identififer (UUID) of the staff. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.part_uuid = part_uuid - self.measure_uuids = measure_uuids - self.start_time_pos = start_time_pos - self.stop_time_pos = stop_time_pos - self.start_dpq = start_dpq - self.stop_dpq = stop_dpq - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comment_creation.py b/flat_api/model/score_comment_creation.py deleted file mode 100644 index bf8e24b..0000000 --- a/flat_api/model/score_comment_creation.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_comment_context import ScoreCommentContext - globals()['ScoreCommentContext'] = ScoreCommentContext - - -class ScoreCommentCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'comment': (str,), # noqa: E501 - 'revision': (str,), # noqa: E501 - 'raw_comment': (str,), # noqa: E501 - 'mentions': ([str],), # noqa: E501 - 'reply_to': (str,), # noqa: E501 - 'context': (ScoreCommentContext,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'comment': 'comment', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'raw_comment': 'rawComment', # noqa: E501 - 'mentions': 'mentions', # noqa: E501 - 'reply_to': 'replyTo', # noqa: E501 - 'context': 'context', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, comment, *args, **kwargs): # noqa: E501 - """ScoreCommentCreation - a model defined in OpenAPI - - Args: - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 - mentions ([str]): The list of user identifiers mentioned in this comment. [optional] # noqa: E501 - reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.comment = comment - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, comment, *args, **kwargs): # noqa: E501 - """ScoreCommentCreation - a model defined in OpenAPI - - Args: - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 - mentions ([str]): The list of user identifiers mentioned in this comment. [optional] # noqa: E501 - reply_to (str): When the comment is a reply to another comment, the unique identifier of the parent comment . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.comment = comment - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comment_moderation.py b/flat_api/model/score_comment_moderation.py deleted file mode 100644 index 85792aa..0000000 --- a/flat_api/model/score_comment_moderation.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCommentModeration(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('reason',): { - 'SPAM': "spam", - 'INAPPROPRIATE': "inappropriate", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'hidden': (bool,), # noqa: E501 - 'reason': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'hidden': 'hidden', # noqa: E501 - 'reason': 'reason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreCommentModeration - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - hidden (bool): If true, this comment will be hidden from other users. [optional] # noqa: E501 - reason (str): If the comment is hidden, the reason why this one has been moderated. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreCommentModeration - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - hidden (bool): If true, this comment will be hidden from other users. [optional] # noqa: E501 - reason (str): If the comment is hidden, the reason why this one has been moderated. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comment_update.py b/flat_api/model/score_comment_update.py deleted file mode 100644 index 249288b..0000000 --- a/flat_api/model/score_comment_update.py +++ /dev/null @@ -1,290 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_comment_context import ScoreCommentContext - globals()['ScoreCommentContext'] = ScoreCommentContext - - -class ScoreCommentUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('comment',): { - 'max_length': 10000, - 'min_length': 1, - }, - ('raw_comment',): { - 'max_length': 10000, - 'min_length': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'revision': (str,), # noqa: E501 - 'comment': (str,), # noqa: E501 - 'raw_comment': (str,), # noqa: E501 - 'context': (ScoreCommentContext,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'revision': 'revision', # noqa: E501 - 'comment': 'comment', # noqa: E501 - 'raw_comment': 'rawComment', # noqa: E501 - 'context': 'context', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreCommentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreCommentUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - revision (str): The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. . [optional] # noqa: E501 - comment (str): The comment text that can includes mentions using the following format: `@[id:username]`. . [optional] # noqa: E501 - raw_comment (str): A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. . [optional] # noqa: E501 - context (ScoreCommentContext): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_comments_counts.py b/flat_api/model/score_comments_counts.py deleted file mode 100644 index ae80bcc..0000000 --- a/flat_api/model/score_comments_counts.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCommentsCounts(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'total': (float,), # noqa: E501 - 'unique': (float,), # noqa: E501 - 'weekly': (float,), # noqa: E501 - 'monthly': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'unique': 'unique', # noqa: E501 - 'weekly': 'weekly', # noqa: E501 - 'monthly': 'monthly', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreCommentsCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of comments added to the score. [optional] # noqa: E501 - unique (float): The unique (1/user) number of comments added to the score. [optional] # noqa: E501 - weekly (float): The weekly unique number of comments added to the score. [optional] # noqa: E501 - monthly (float): The monthly unique number of comments added to the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreCommentsCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of comments added to the score. [optional] # noqa: E501 - unique (float): The unique (1/user) number of comments added to the score. [optional] # noqa: E501 - weekly (float): The weekly unique number of comments added to the score. [optional] # noqa: E501 - monthly (float): The monthly unique number of comments added to the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation.py b/flat_api/model/score_creation.py deleted file mode 100644 index cc673a3..0000000 --- a/flat_api/model/score_creation.py +++ /dev/null @@ -1,309 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData - from flat_api.model.score_privacy import ScorePrivacy - from flat_api.model.score_source import ScoreSource - globals()['ScoreCreationBuilderData'] = ScoreCreationBuilderData - globals()['ScorePrivacy'] = ScorePrivacy - globals()['ScoreSource'] = ScoreSource - - -class ScoreCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('data_encoding',): { - 'BASE64': "base64", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'privacy': (ScorePrivacy,), # noqa: E501 - 'collection': (str,), # noqa: E501 - 'google_drive_folder': (str,), # noqa: E501 - 'builder_data': (ScoreCreationBuilderData,), # noqa: E501 - 'filename': (str,), # noqa: E501 - 'data': (str,), # noqa: E501 - 'data_encoding': (str,), # noqa: E501 - 'source': (ScoreSource,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - 'collection': 'collection', # noqa: E501 - 'google_drive_folder': 'googleDriveFolder', # noqa: E501 - 'builder_data': 'builderData', # noqa: E501 - 'filename': 'filename', # noqa: E501 - 'data': 'data', # noqa: E501 - 'data_encoding': 'dataEncoding', # noqa: E501 - 'source': 'source', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") . [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - collection (str): Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. . [optional] # noqa: E501 - google_drive_folder (str): If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. . [optional] # noqa: E501 - builder_data (ScoreCreationBuilderData): [optional] # noqa: E501 - filename (str): If this is an imported file, its filename. [optional] # noqa: E501 - data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. . [optional] # noqa: E501 - data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 - source (ScoreSource): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") . [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - collection (str): Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. . [optional] # noqa: E501 - google_drive_folder (str): If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. . [optional] # noqa: E501 - builder_data (ScoreCreationBuilderData): [optional] # noqa: E501 - filename (str): If this is an imported file, its filename. [optional] # noqa: E501 - data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. . [optional] # noqa: E501 - data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 - source (ScoreSource): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data.py b/flat_api/model/score_creation_builder_data.py deleted file mode 100644 index 78d1fc7..0000000 --- a/flat_api/model/score_creation_builder_data.py +++ /dev/null @@ -1,282 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData - from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData - globals()['ScoreCreationBuilderDataLayoutData'] = ScoreCreationBuilderDataLayoutData - globals()['ScoreCreationBuilderDataScoreData'] = ScoreCreationBuilderDataScoreData - - -class ScoreCreationBuilderData(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'score_data': (ScoreCreationBuilderDataScoreData,), # noqa: E501 - 'layout_data': (ScoreCreationBuilderDataLayoutData,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'score_data': 'scoreData', # noqa: E501 - 'layout_data': 'layoutData', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, score_data, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderData - a model defined in OpenAPI - - Args: - score_data (ScoreCreationBuilderDataScoreData): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - layout_data (ScoreCreationBuilderDataLayoutData): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.score_data = score_data - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, score_data, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderData - a model defined in OpenAPI - - Args: - score_data (ScoreCreationBuilderDataScoreData): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - layout_data (ScoreCreationBuilderDataLayoutData): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.score_data = score_data - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_layout_data.py b/flat_api/model/score_creation_builder_data_layout_data.py deleted file mode 100644 index a13607f..0000000 --- a/flat_api/model/score_creation_builder_data_layout_data.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCreationBuilderDataLayoutData(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('length_unit',): { - 'CM': "cm", - 'INCH': "inch", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'notes_spacing_coeff': (float,), # noqa: E501 - 'length_unit': (str,), # noqa: E501 - 'page_height': (float,), # noqa: E501 - 'page_width': (float,), # noqa: E501 - 'page_margin_top': (float,), # noqa: E501 - 'page_margin_bottom': (float,), # noqa: E501 - 'page_margin_left': (float,), # noqa: E501 - 'page_margin_right': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'notes_spacing_coeff': 'notesSpacingCoeff', # noqa: E501 - 'length_unit': 'lengthUnit', # noqa: E501 - 'page_height': 'pageHeight', # noqa: E501 - 'page_width': 'pageWidth', # noqa: E501 - 'page_margin_top': 'pageMarginTop', # noqa: E501 - 'page_margin_bottom': 'pageMarginBottom', # noqa: E501 - 'page_margin_left': 'pageMarginLeft', # noqa: E501 - 'page_margin_right': 'pageMarginRight', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - notes_spacing_coeff (float): A float value >= 1 that controls the spacing between notes.. [optional] # noqa: E501 - length_unit (str): The unit to use for layout customizations. [optional] if omitted the server will use the default value of "cm" # noqa: E501 - page_height (float): The height of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_width (float): The width of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_top (float): The top margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_bottom (float): The bottom margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_left (float): The left margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_right (float): The right margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataLayoutData - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - notes_spacing_coeff (float): A float value >= 1 that controls the spacing between notes.. [optional] # noqa: E501 - length_unit (str): The unit to use for layout customizations. [optional] if omitted the server will use the default value of "cm" # noqa: E501 - page_height (float): The height of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_width (float): The width of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_top (float): The top margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_bottom (float): The bottom margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_left (float): The left margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - page_margin_right (float): The right margin of the page in chosen unit (`lengthUnit`).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_score_data.py b/flat_api/model/score_creation_builder_data_score_data.py deleted file mode 100644 index 7e98d44..0000000 --- a/flat_api/model/score_creation_builder_data_score_data.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner - globals()['ScoreCreationBuilderDataScoreDataInstrumentsInner'] = ScoreCreationBuilderDataScoreDataInstrumentsInner - - -class ScoreCreationBuilderDataScoreData(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'instruments': ([ScoreCreationBuilderDataScoreDataInstrumentsInner],), # noqa: E501 - 'use_tab_staff': (bool,), # noqa: E501 - 'use_chord_grid': (bool,), # noqa: E501 - 'fifths': (float,), # noqa: E501 - 'nb_beats': (float,), # noqa: E501 - 'beat_type': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'instruments': 'instruments', # noqa: E501 - 'use_tab_staff': 'useTabStaff', # noqa: E501 - 'use_chord_grid': 'useChordGrid', # noqa: E501 - 'fifths': 'fifths', # noqa: E501 - 'nb_beats': 'nbBeats', # noqa: E501 - 'beat_type': 'beatType', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, instruments, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI - - Args: - instruments ([ScoreCreationBuilderDataScoreDataInstrumentsInner]): The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - use_tab_staff (bool): true if the TAB staff is displayed with fretted instruments. [optional] # noqa: E501 - use_chord_grid (bool): true if the chord grid must be displayed with fretted instruments. [optional] # noqa: E501 - fifths (float): The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.. [optional] # noqa: E501 - nb_beats (float): The number of beats in the measure. [optional] # noqa: E501 - beat_type (float): The duration of a beat in the measure. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.instruments = instruments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, instruments, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataScoreData - a model defined in OpenAPI - - Args: - instruments ([ScoreCreationBuilderDataScoreDataInstrumentsInner]): The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - use_tab_staff (bool): true if the TAB staff is displayed with fretted instruments. [optional] # noqa: E501 - use_chord_grid (bool): true if the chord grid must be displayed with fretted instruments. [optional] # noqa: E501 - fifths (float): The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.. [optional] # noqa: E501 - nb_beats (float): The number of beats in the measure. [optional] # noqa: E501 - beat_type (float): The duration of a beat in the measure. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.instruments = instruments - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py b/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py deleted file mode 100644 index 65bad5b..0000000 --- a/flat_api/model/score_creation_builder_data_score_data_instruments_inner.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCreationBuilderDataScoreDataInstrumentsInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'group': (str,), # noqa: E501 - 'instrument': (str,), # noqa: E501 - 'long_name': (str,), # noqa: E501 - 'short_name': (str,), # noqa: E501 - 'has_quarter_tone': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'group': 'group', # noqa: E501 - 'instrument': 'instrument', # noqa: E501 - 'long_name': 'longName', # noqa: E501 - 'short_name': 'shortName', # noqa: E501 - 'has_quarter_tone': 'hasQuarterTone', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, group, instrument, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataScoreDataInstrumentsInner - a model defined in OpenAPI - - Args: - group (str): The of the instrument group (e.g. `keyboards`, `brass`) - instrument (str): The identifier of the instrument (e.g. `piano`, `trumpet`) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - long_name (str): The full name of the instrument. [optional] # noqa: E501 - short_name (str): The abbreviation of the name of the instrument. [optional] # noqa: E501 - has_quarter_tone (bool): True if the part can use quarter tone (prevent the part to have a TAB/chord grid). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group = group - self.instrument = instrument - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, group, instrument, *args, **kwargs): # noqa: E501 - """ScoreCreationBuilderDataScoreDataInstrumentsInner - a model defined in OpenAPI - - Args: - group (str): The of the instrument group (e.g. `keyboards`, `brass`) - instrument (str): The identifier of the instrument (e.g. `piano`, `trumpet`) - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - long_name (str): The full name of the instrument. [optional] # noqa: E501 - short_name (str): The abbreviation of the name of the instrument. [optional] # noqa: E501 - has_quarter_tone (bool): True if the part can use quarter tone (prevent the part to have a TAB/chord grid). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.group = group - self.instrument = instrument - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_creation_type.py b/flat_api/model/score_creation_type.py deleted file mode 100644 index 03f6b7d..0000000 --- a/flat_api/model/score_creation_type.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreCreationType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ORIGINAL': "original", - 'ARRANGEMENT': "arrangement", - 'OTHER': "other", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ScoreCreationType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 - - Keyword Args: - value (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ScoreCreationType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 - - Keyword Args: - value (str): The type of creation (an orginal, an arrangement)., must be one of ["original", "arrangement", "other", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/score_details.py b/flat_api/model/score_details.py deleted file mode 100644 index f935bb3..0000000 --- a/flat_api/model/score_details.py +++ /dev/null @@ -1,416 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.resource_collaborator import ResourceCollaborator - from flat_api.model.resource_rights import ResourceRights - from flat_api.model.score_comments_counts import ScoreCommentsCounts - from flat_api.model.score_creation_type import ScoreCreationType - from flat_api.model.score_license import ScoreLicense - from flat_api.model.score_likes_counts import ScoreLikesCounts - from flat_api.model.score_plays_counts import ScorePlaysCounts - from flat_api.model.score_privacy import ScorePrivacy - from flat_api.model.score_views_counts import ScoreViewsCounts - from flat_api.model.user_public_summary import UserPublicSummary - globals()['ResourceCollaborator'] = ResourceCollaborator - globals()['ResourceRights'] = ResourceRights - globals()['ScoreCommentsCounts'] = ScoreCommentsCounts - globals()['ScoreCreationType'] = ScoreCreationType - globals()['ScoreLicense'] = ScoreLicense - globals()['ScoreLikesCounts'] = ScoreLikesCounts - globals()['ScorePlaysCounts'] = ScorePlaysCounts - globals()['ScorePrivacy'] = ScorePrivacy - globals()['ScoreViewsCounts'] = ScoreViewsCounts - globals()['UserPublicSummary'] = UserPublicSummary - - -class ScoreDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'sharing_key': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'privacy': (ScorePrivacy,), # noqa: E501 - 'user': (UserPublicSummary,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - 'subtitle': (str,), # noqa: E501 - 'lyricist': (str,), # noqa: E501 - 'arranger': (str,), # noqa: E501 - 'composer': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'tags': ([str],), # noqa: E501 - 'creation_type': (ScoreCreationType,), # noqa: E501 - 'license': (ScoreLicense,), # noqa: E501 - 'license_text': (str,), # noqa: E501 - 'duration_time': (float,), # noqa: E501 - 'number_measures': (int,), # noqa: E501 - 'main_tempo_qpm': (float,), # noqa: E501 - 'rights': (ResourceRights,), # noqa: E501 - 'collaborators': ([ResourceCollaborator],), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'publication_date': (datetime,), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'parent_score': (str,), # noqa: E501 - 'instruments': ([str],), # noqa: E501 - 'samples': ([str],), # noqa: E501 - 'google_drive_file_id': (str,), # noqa: E501 - 'likes': (ScoreLikesCounts,), # noqa: E501 - 'comments': (ScoreCommentsCounts,), # noqa: E501 - 'views': (ScoreViewsCounts,), # noqa: E501 - 'plays': (ScorePlaysCounts,), # noqa: E501 - 'collections': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'sharing_key': 'sharingKey', # noqa: E501 - 'title': 'title', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - 'user': 'user', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - 'subtitle': 'subtitle', # noqa: E501 - 'lyricist': 'lyricist', # noqa: E501 - 'arranger': 'arranger', # noqa: E501 - 'composer': 'composer', # noqa: E501 - 'description': 'description', # noqa: E501 - 'tags': 'tags', # noqa: E501 - 'creation_type': 'creationType', # noqa: E501 - 'license': 'license', # noqa: E501 - 'license_text': 'licenseText', # noqa: E501 - 'duration_time': 'durationTime', # noqa: E501 - 'number_measures': 'numberMeasures', # noqa: E501 - 'main_tempo_qpm': 'mainTempoQpm', # noqa: E501 - 'rights': 'rights', # noqa: E501 - 'collaborators': 'collaborators', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'publication_date': 'publicationDate', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'parent_score': 'parentScore', # noqa: E501 - 'instruments': 'instruments', # noqa: E501 - 'samples': 'samples', # noqa: E501 - 'google_drive_file_id': 'googleDriveFileId', # noqa: E501 - 'likes': 'likes', # noqa: E501 - 'comments': 'comments', # noqa: E501 - 'views': 'views', # noqa: E501 - 'plays': 'plays', # noqa: E501 - 'collections': 'collections', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the score. [optional] # noqa: E501 - sharing_key (str): The private sharing key of the score (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 - title (str): The title of the score. [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - user (UserPublicSummary): [optional] # noqa: E501 - html_url (str): The url where the score can be viewed in a web browser. [optional] # noqa: E501 - subtitle (str): Subtitle of the score. [optional] # noqa: E501 - lyricist (str): Lyricist of the score. [optional] # noqa: E501 - arranger (str): Arranger of the score. [optional] # noqa: E501 - composer (str): Composer of the score. [optional] # noqa: E501 - description (str): Description of the creation. [optional] # noqa: E501 - tags ([str]): Tags describing the score. [optional] # noqa: E501 - creation_type (ScoreCreationType): [optional] # noqa: E501 - license (ScoreLicense): [optional] # noqa: E501 - license_text (str): Additional license text written on the exported/printed score. [optional] # noqa: E501 - duration_time (float): In seconds, an approximative duration of the score. [optional] # noqa: E501 - number_measures (int): The number of measures in the score. [optional] # noqa: E501 - main_tempo_qpm (float): The main tempo of the score (in QPM). [optional] # noqa: E501 - rights (ResourceRights): [optional] # noqa: E501 - collaborators ([ResourceCollaborator]): The list of the collaborators of the score. [optional] # noqa: E501 - creation_date (datetime): The date when the score was created. [optional] # noqa: E501 - modification_date (datetime): The date of the last revision of the score. [optional] # noqa: E501 - publication_date (datetime): The date when the score was published on Flat. [optional] # noqa: E501 - organization (str): If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. . [optional] # noqa: E501 - parent_score (str): If the score has been forked, the unique identifier of the parent score. . [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - samples ([str]): An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. . [optional] # noqa: E501 - google_drive_file_id (str): If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` . [optional] # noqa: E501 - likes (ScoreLikesCounts): [optional] # noqa: E501 - comments (ScoreCommentsCounts): [optional] # noqa: E501 - views (ScoreViewsCounts): [optional] # noqa: E501 - plays (ScorePlaysCounts): [optional] # noqa: E501 - collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the score. [optional] # noqa: E501 - sharing_key (str): The private sharing key of the score (available when the `privacy` mode is set to `privateLink`). [optional] # noqa: E501 - title (str): The title of the score. [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - user (UserPublicSummary): [optional] # noqa: E501 - html_url (str): The url where the score can be viewed in a web browser. [optional] # noqa: E501 - subtitle (str): Subtitle of the score. [optional] # noqa: E501 - lyricist (str): Lyricist of the score. [optional] # noqa: E501 - arranger (str): Arranger of the score. [optional] # noqa: E501 - composer (str): Composer of the score. [optional] # noqa: E501 - description (str): Description of the creation. [optional] # noqa: E501 - tags ([str]): Tags describing the score. [optional] # noqa: E501 - creation_type (ScoreCreationType): [optional] # noqa: E501 - license (ScoreLicense): [optional] # noqa: E501 - license_text (str): Additional license text written on the exported/printed score. [optional] # noqa: E501 - duration_time (float): In seconds, an approximative duration of the score. [optional] # noqa: E501 - number_measures (int): The number of measures in the score. [optional] # noqa: E501 - main_tempo_qpm (float): The main tempo of the score (in QPM). [optional] # noqa: E501 - rights (ResourceRights): [optional] # noqa: E501 - collaborators ([ResourceCollaborator]): The list of the collaborators of the score. [optional] # noqa: E501 - creation_date (datetime): The date when the score was created. [optional] # noqa: E501 - modification_date (datetime): The date of the last revision of the score. [optional] # noqa: E501 - publication_date (datetime): The date when the score was published on Flat. [optional] # noqa: E501 - organization (str): If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. . [optional] # noqa: E501 - parent_score (str): If the score has been forked, the unique identifier of the parent score. . [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - samples ([str]): An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. . [optional] # noqa: E501 - google_drive_file_id (str): If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` . [optional] # noqa: E501 - likes (ScoreLikesCounts): [optional] # noqa: E501 - comments (ScoreCommentsCounts): [optional] # noqa: E501 - views (ScoreViewsCounts): [optional] # noqa: E501 - plays (ScorePlaysCounts): [optional] # noqa: E501 - collections ([str]): The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_fork.py b/flat_api/model/score_fork.py deleted file mode 100644 index c6becd8..0000000 --- a/flat_api/model/score_fork.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreFork(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'collection': (str, none_type,), # noqa: E501 - 'keep_original_title': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'collection': 'collection', # noqa: E501 - 'keep_original_title': 'keepOriginalTitle', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreFork - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - collection (str, none_type): Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections . [optional] if omitted the server will use the default value of "root" # noqa: E501 - keep_original_title (bool): Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreFork - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - collection (str, none_type): Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections . [optional] if omitted the server will use the default value of "root" # noqa: E501 - keep_original_title (bool): Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_license.py b/flat_api/model/score_license.py deleted file mode 100644 index e08c783..0000000 --- a/flat_api/model/score_license.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreLicense(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'COPYRIGHT': "copyright", - 'CC0': "cc0", - 'CC-BY': "cc-by", - 'CC-BY-SA': "cc-by-sa", - 'CC-BY-ND': "cc-by-nd", - 'CC-BY-NC': "cc-by-nc", - 'CC-BY-NC-SA': "cc-by-nc-sa", - 'CC-BY-NC-ND': "cc-by-nc-nd", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ScoreLicense - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 - - Keyword Args: - value (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ScoreLicense - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 - - Keyword Args: - value (str): License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ ., must be one of ["copyright", "cc0", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/score_likes_counts.py b/flat_api/model/score_likes_counts.py deleted file mode 100644 index 3cd6e97..0000000 --- a/flat_api/model/score_likes_counts.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreLikesCounts(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'total': (float,), # noqa: E501 - 'weekly': (float,), # noqa: E501 - 'monthly': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'weekly': 'weekly', # noqa: E501 - 'monthly': 'monthly', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreLikesCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of likes of the score. [optional] # noqa: E501 - weekly (float): The number of new likes during the last week. [optional] # noqa: E501 - monthly (float): The number of new likes during the last month. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreLikesCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of likes of the score. [optional] # noqa: E501 - weekly (float): The number of new likes during the last week. [optional] # noqa: E501 - monthly (float): The number of new likes during the last month. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_modification.py b/flat_api/model/score_modification.py deleted file mode 100644 index a32f5dc..0000000 --- a/flat_api/model/score_modification.py +++ /dev/null @@ -1,326 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_creation_type import ScoreCreationType - from flat_api.model.score_license import ScoreLicense - from flat_api.model.score_privacy import ScorePrivacy - globals()['ScoreCreationType'] = ScoreCreationType - globals()['ScoreLicense'] = ScoreLicense - globals()['ScorePrivacy'] = ScorePrivacy - - -class ScoreModification(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('sharing_key',): { - 'regex': { - 'pattern': r'^[a-f0-9]{128}$', # noqa: E501 - }, - }, - ('description',): { - 'max_length': 2000, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'subtitle': (str,), # noqa: E501 - 'composer': (str,), # noqa: E501 - 'lyricist': (str,), # noqa: E501 - 'arranger': (str,), # noqa: E501 - 'privacy': (ScorePrivacy,), # noqa: E501 - 'sharing_key': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'tags': ([str],), # noqa: E501 - 'creation_type': (ScoreCreationType,), # noqa: E501 - 'license': (ScoreLicense,), # noqa: E501 - 'license_text': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'subtitle': 'subtitle', # noqa: E501 - 'composer': 'composer', # noqa: E501 - 'lyricist': 'lyricist', # noqa: E501 - 'arranger': 'arranger', # noqa: E501 - 'privacy': 'privacy', # noqa: E501 - 'sharing_key': 'sharingKey', # noqa: E501 - 'description': 'description', # noqa: E501 - 'tags': 'tags', # noqa: E501 - 'creation_type': 'creationType', # noqa: E501 - 'license': 'license', # noqa: E501 - 'license_text': 'licenseText', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreModification - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the score. [optional] # noqa: E501 - subtitle (str): The subtitle of the score. [optional] # noqa: E501 - composer (str): The composer of the score. [optional] # noqa: E501 - lyricist (str): The lyricist of the score. [optional] # noqa: E501 - arranger (str): The arranger of the score. [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - sharing_key (str): When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.. [optional] # noqa: E501 - description (str): Description of the creation. [optional] # noqa: E501 - tags ([str]): Tags describing the score. [optional] # noqa: E501 - creation_type (ScoreCreationType): [optional] # noqa: E501 - license (ScoreLicense): [optional] # noqa: E501 - license_text (str): The rights info written on the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreModification - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): The title of the score. [optional] # noqa: E501 - subtitle (str): The subtitle of the score. [optional] # noqa: E501 - composer (str): The composer of the score. [optional] # noqa: E501 - lyricist (str): The lyricist of the score. [optional] # noqa: E501 - arranger (str): The arranger of the score. [optional] # noqa: E501 - privacy (ScorePrivacy): [optional] # noqa: E501 - sharing_key (str): When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.. [optional] # noqa: E501 - description (str): Description of the creation. [optional] # noqa: E501 - tags ([str]): Tags describing the score. [optional] # noqa: E501 - creation_type (ScoreCreationType): [optional] # noqa: E501 - license (ScoreLicense): [optional] # noqa: E501 - license_text (str): The rights info written on the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_plays_counts.py b/flat_api/model/score_plays_counts.py deleted file mode 100644 index 7667e75..0000000 --- a/flat_api/model/score_plays_counts.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScorePlaysCounts(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'total': (float,), # noqa: E501 - 'weekly': (float,), # noqa: E501 - 'monthly': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'weekly': 'weekly', # noqa: E501 - 'monthly': 'monthly', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScorePlaysCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of plays of the score. [optional] # noqa: E501 - weekly (float): The weekly number of plays of the score. [optional] # noqa: E501 - monthly (float): The monthly number of plays of the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScorePlaysCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of plays of the score. [optional] # noqa: E501 - weekly (float): The weekly number of plays of the score. [optional] # noqa: E501 - monthly (float): The monthly number of plays of the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_privacy.py b/flat_api/model/score_privacy.py deleted file mode 100644 index 7f5bc03..0000000 --- a/flat_api/model/score_privacy.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScorePrivacy(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'PUBLIC': "public", - 'PRIVATE': "private", - 'ORGANIZATIONPUBLIC': "organizationPublic", - 'PRIVATELINK': "privateLink", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ScorePrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 - - Keyword Args: - value (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ScorePrivacy - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 - - Keyword Args: - value (str): The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). . if omitted defaults to "private", must be one of ["public", "private", "organizationPublic", "privateLink", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "private" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/score_revision.py b/flat_api/model/score_revision.py deleted file mode 100644 index ee0b419..0000000 --- a/flat_api/model/score_revision.py +++ /dev/null @@ -1,298 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_revision_statistics import ScoreRevisionStatistics - globals()['ScoreRevisionStatistics'] = ScoreRevisionStatistics - - -class ScoreRevision(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'user': (str,), # noqa: E501 - 'collaborators': ([str],), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'event': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'autosave': (bool,), # noqa: E501 - 'statistics': (ScoreRevisionStatistics,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'user': 'user', # noqa: E501 - 'collaborators': 'collaborators', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'event': 'event', # noqa: E501 - 'description': 'description', # noqa: E501 - 'autosave': 'autosave', # noqa: E501 - 'statistics': 'statistics', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreRevision - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the revision.. [optional] # noqa: E501 - user (str): The user identifier who created the revision. [optional] # noqa: E501 - collaborators ([str]): [optional] # noqa: E501 - creation_date (datetime): The date when this revision was created. [optional] # noqa: E501 - event (str): The last event (action id) of the revision. [optional] # noqa: E501 - description (str): A description associated to the revision. [optional] # noqa: E501 - autosave (bool): True if this revision was automatically generated by Flat and not on purpose by the user. . [optional] # noqa: E501 - statistics (ScoreRevisionStatistics): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreRevision - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the revision.. [optional] # noqa: E501 - user (str): The user identifier who created the revision. [optional] # noqa: E501 - collaborators ([str]): [optional] # noqa: E501 - creation_date (datetime): The date when this revision was created. [optional] # noqa: E501 - event (str): The last event (action id) of the revision. [optional] # noqa: E501 - description (str): A description associated to the revision. [optional] # noqa: E501 - autosave (bool): True if this revision was automatically generated by Flat and not on purpose by the user. . [optional] # noqa: E501 - statistics (ScoreRevisionStatistics): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_revision_creation.py b/flat_api/model/score_revision_creation.py deleted file mode 100644 index 51dd147..0000000 --- a/flat_api/model/score_revision_creation.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreRevisionCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('data_encoding',): { - 'BASE64': "base64", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'data': (str,), # noqa: E501 - 'data_encoding': (str,), # noqa: E501 - 'autosave': (bool,), # noqa: E501 - 'description': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'data': 'data', # noqa: E501 - 'data_encoding': 'dataEncoding', # noqa: E501 - 'autosave': 'autosave', # noqa: E501 - 'description': 'description', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 - """ScoreRevisionCreation - a model defined in OpenAPI - - Args: - data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 - autosave (bool): Must be set to `true` if the revision was created automatically. . [optional] # noqa: E501 - description (str): A description associated to the revision. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.data = data - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, data, *args, **kwargs): # noqa: E501 - """ScoreRevisionCreation - a model defined in OpenAPI - - Args: - data (str): The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - data_encoding (str): The optional encoding of the score data. This property must match the encoding used for the `data` property.. [optional] if omitted the server will use the default value of "base64" # noqa: E501 - autosave (bool): Must be set to `true` if the revision was created automatically. . [optional] # noqa: E501 - description (str): A description associated to the revision. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.data = data - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_revision_statistics.py b/flat_api/model/score_revision_statistics.py deleted file mode 100644 index ae848ee..0000000 --- a/flat_api/model/score_revision_statistics.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreRevisionStatistics(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'additions': (float,), # noqa: E501 - 'deletions': (float,), # noqa: E501 - 'start_date': (datetime,), # noqa: E501 - 'end_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'additions': 'additions', # noqa: E501 - 'deletions': 'deletions', # noqa: E501 - 'start_date': 'startDate', # noqa: E501 - 'end_date': 'endDate', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreRevisionStatistics - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - additions (float): The number of additions operations in the last revision. [optional] # noqa: E501 - deletions (float): The number of deletions operations in the last revision. [optional] # noqa: E501 - start_date (datetime): The date of the first action included in this revision. [optional] # noqa: E501 - end_date (datetime): The date of the latest action included in this revision. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreRevisionStatistics - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - additions (float): The number of additions operations in the last revision. [optional] # noqa: E501 - deletions (float): The number of deletions operations in the last revision. [optional] # noqa: E501 - start_date (datetime): The date of the first action included in this revision. [optional] # noqa: E501 - end_date (datetime): The date of the latest action included in this revision. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_source.py b/flat_api/model/score_source.py deleted file mode 100644 index b1d3116..0000000 --- a/flat_api/model/score_source.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreSource(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'google_drive': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'google_drive': 'googleDrive', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreSource - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - google_drive (str): If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreSource - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - google_drive (str): If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_track.py b/flat_api/model/score_track.py deleted file mode 100644 index 933525d..0000000 --- a/flat_api/model/score_track.py +++ /dev/null @@ -1,318 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_track_point import ScoreTrackPoint - from flat_api.model.score_track_state import ScoreTrackState - from flat_api.model.score_track_type import ScoreTrackType - globals()['ScoreTrackPoint'] = ScoreTrackPoint - globals()['ScoreTrackState'] = ScoreTrackState - globals()['ScoreTrackType'] = ScoreTrackType - - -class ScoreTrack(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'title': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'creator': (str,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'default': (bool,), # noqa: E501 - 'state': (ScoreTrackState,), # noqa: E501 - 'type': (ScoreTrackType,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'media_id': (str,), # noqa: E501 - 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'title': 'title', # noqa: E501 - 'score': 'score', # noqa: E501 - 'creator': 'creator', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'default': 'default', # noqa: E501 - 'state': 'state', # noqa: E501 - 'type': 'type', # noqa: E501 - 'url': 'url', # noqa: E501 - 'media_id': 'mediaId', # noqa: E501 - 'synchronization_points': 'synchronizationPoints', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreTrack - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the score track. [optional] # noqa: E501 - title (str): Title of the track. [optional] # noqa: E501 - score (str): The unique identifier of the score. [optional] # noqa: E501 - creator (str): The unique identifier of the track creator. [optional] # noqa: E501 - creation_date (datetime): The creation date of the track. [optional] # noqa: E501 - modification_date (datetime): The modification date of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - type (ScoreTrackType): [optional] # noqa: E501 - url (str): The URL of the track. [optional] # noqa: E501 - media_id (str): The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` . [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreTrack - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The unique identifier of the score track. [optional] # noqa: E501 - title (str): Title of the track. [optional] # noqa: E501 - score (str): The unique identifier of the score. [optional] # noqa: E501 - creator (str): The unique identifier of the track creator. [optional] # noqa: E501 - creation_date (datetime): The creation date of the track. [optional] # noqa: E501 - modification_date (datetime): The modification date of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - type (ScoreTrackType): [optional] # noqa: E501 - url (str): The URL of the track. [optional] # noqa: E501 - media_id (str): The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` . [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_track_creation.py b/flat_api/model/score_track_creation.py deleted file mode 100644 index 7a572de..0000000 --- a/flat_api/model/score_track_creation.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_track_point import ScoreTrackPoint - from flat_api.model.score_track_state import ScoreTrackState - globals()['ScoreTrackPoint'] = ScoreTrackPoint - globals()['ScoreTrackState'] = ScoreTrackState - - -class ScoreTrackCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'default': (bool,), # noqa: E501 - 'state': (ScoreTrackState,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'default': 'default', # noqa: E501 - 'state': 'state', # noqa: E501 - 'url': 'url', # noqa: E501 - 'synchronization_points': 'synchronizationPoints', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreTrackCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - url (str): The URL of the track. [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreTrackCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - url (str): The URL of the track. [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_track_point.py b/flat_api/model/score_track_point.py deleted file mode 100644 index 3a1bb0f..0000000 --- a/flat_api/model/score_track_point.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreTrackPoint(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'MEASURE': "measure", - 'END': "end", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'type': (str,), # noqa: E501 - 'time': (float,), # noqa: E501 - 'measure_uuid': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'time': 'time', # noqa: E501 - 'measure_uuid': 'measureUuid', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, time, *args, **kwargs): # noqa: E501 - """ScoreTrackPoint - a model defined in OpenAPI - - Args: - type (str): The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` - time (float): The corresponding time in seconds - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - measure_uuid (str): The measure unique identifier. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.time = time - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, type, time, *args, **kwargs): # noqa: E501 - """ScoreTrackPoint - a model defined in OpenAPI - - Args: - type (str): The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` - time (float): The corresponding time in seconds - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - measure_uuid (str): The measure unique identifier. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.type = type - self.time = time - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_track_state.py b/flat_api/model/score_track_state.py deleted file mode 100644 index 08e0d9b..0000000 --- a/flat_api/model/score_track_state.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreTrackState(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'DRAFT': "draft", - 'COMPLETED': "completed", - 'DELETED': "deleted", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ScoreTrackState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 - - Keyword Args: - value (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "draft" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ScoreTrackState - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 - - Keyword Args: - value (str): State of the track. if omitted defaults to "draft", must be one of ["draft", "completed", "deleted", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "draft" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/score_track_type.py b/flat_api/model/score_track_type.py deleted file mode 100644 index 6d098c5..0000000 --- a/flat_api/model/score_track_type.py +++ /dev/null @@ -1,293 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreTrackType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'AUDIO': "audio", - 'SOUNDCLOUD': "soundcloud", - 'YOUTUBE': "youtube", - 'VIMEO': "vimeo", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """ScoreTrackType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 - - Keyword Args: - value (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ScoreTrackType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 - - Keyword Args: - value (str): The type of an audio track., must be one of ["audio", "soundcloud", "youtube", "vimeo", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/flat_api/model/score_track_update.py b/flat_api/model/score_track_update.py deleted file mode 100644 index 1da643a..0000000 --- a/flat_api/model/score_track_update.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.score_track_point import ScoreTrackPoint - from flat_api.model.score_track_state import ScoreTrackState - globals()['ScoreTrackPoint'] = ScoreTrackPoint - globals()['ScoreTrackState'] = ScoreTrackState - - -class ScoreTrackUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'title': (str,), # noqa: E501 - 'default': (bool,), # noqa: E501 - 'state': (ScoreTrackState,), # noqa: E501 - 'synchronization_points': ([ScoreTrackPoint],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'title': 'title', # noqa: E501 - 'default': 'default', # noqa: E501 - 'state': 'state', # noqa: E501 - 'synchronization_points': 'synchronizationPoints', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreTrackUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreTrackUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - title (str): Title of the track. [optional] # noqa: E501 - default (bool): True if the track should be used as default audio source. [optional] # noqa: E501 - state (ScoreTrackState): [optional] # noqa: E501 - synchronization_points ([ScoreTrackPoint]): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/score_views_counts.py b/flat_api/model/score_views_counts.py deleted file mode 100644 index 682d724..0000000 --- a/flat_api/model/score_views_counts.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class ScoreViewsCounts(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'total': (float,), # noqa: E501 - 'weekly': (float,), # noqa: E501 - 'monthly': (float,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'weekly': 'weekly', # noqa: E501 - 'monthly': 'monthly', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ScoreViewsCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of views of the score. [optional] # noqa: E501 - weekly (float): The weekly number of views of the score. [optional] # noqa: E501 - monthly (float): The monthly number of views of the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ScoreViewsCounts - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - total (float): The total number of views of the score. [optional] # noqa: E501 - weekly (float): The weekly number of views of the score. [optional] # noqa: E501 - monthly (float): The monthly number of views of the score. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/task.py b/flat_api/model/task.py deleted file mode 100644 index b1d641b..0000000 --- a/flat_api/model/task.py +++ /dev/null @@ -1,319 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.task_progress import TaskProgress - from flat_api.model.task_result import TaskResult - globals()['TaskProgress'] = TaskProgress - globals()['TaskResult'] = TaskResult - - -class Task(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('state',): { - 'CREATED': "created", - 'DOING': "doing", - 'DONE': "done", - 'CANCELED': "canceled", - 'ERROR': "error", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'format': (str,), # noqa: E501 - 'score': (str,), # noqa: E501 - 'progress': (TaskProgress,), # noqa: E501 - 'creation_date': (datetime,), # noqa: E501 - 'modification_date': (datetime,), # noqa: E501 - 'done_date': (datetime,), # noqa: E501 - 'result': (TaskResult,), # noqa: E501 - 'error_history': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'state': 'state', # noqa: E501 - 'format': 'format', # noqa: E501 - 'score': 'score', # noqa: E501 - 'progress': 'progress', # noqa: E501 - 'creation_date': 'creationDate', # noqa: E501 - 'modification_date': 'modificationDate', # noqa: E501 - 'done_date': 'doneDate', # noqa: E501 - 'result': 'result', # noqa: E501 - 'error_history': 'errorHistory', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Task - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the task. [optional] # noqa: E501 - type (str): Type of the task (e.g. audio-export). [optional] # noqa: E501 - state (str): State of the Task. [optional] # noqa: E501 - format (str): For files processing, the file format (e.g. `mp3`, `wav`). [optional] # noqa: E501 - score (str): The score unique identifier for tasks related to scores. [optional] # noqa: E501 - progress (TaskProgress): [optional] # noqa: E501 - creation_date (datetime): The creation date of the task. [optional] # noqa: E501 - modification_date (datetime): The last modification date of the task. [optional] # noqa: E501 - done_date (datetime): The date when the task has been completed. [optional] # noqa: E501 - result (TaskResult): [optional] # noqa: E501 - error_history ([str]): If any errors happened when processing this task, the list of errors identifiers. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Task - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier of the task. [optional] # noqa: E501 - type (str): Type of the task (e.g. audio-export). [optional] # noqa: E501 - state (str): State of the Task. [optional] # noqa: E501 - format (str): For files processing, the file format (e.g. `mp3`, `wav`). [optional] # noqa: E501 - score (str): The score unique identifier for tasks related to scores. [optional] # noqa: E501 - progress (TaskProgress): [optional] # noqa: E501 - creation_date (datetime): The creation date of the task. [optional] # noqa: E501 - modification_date (datetime): The last modification date of the task. [optional] # noqa: E501 - done_date (datetime): The date when the task has been completed. [optional] # noqa: E501 - result (TaskResult): [optional] # noqa: E501 - error_history ([str]): If any errors happened when processing this task, the list of errors identifiers. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/task_export_options.py b/flat_api/model/task_export_options.py deleted file mode 100644 index 5785550..0000000 --- a/flat_api/model/task_export_options.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class TaskExportOptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'parts': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'parts': 'parts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TaskExportOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - parts ([str]): A list of parts to specifically export. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TaskExportOptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - parts ([str]): A list of parts to specifically export. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/task_progress.py b/flat_api/model/task_progress.py deleted file mode 100644 index 0f27c87..0000000 --- a/flat_api/model/task_progress.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class TaskProgress(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'percent': (float,), # noqa: E501 - 'text': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'percent': 'percent', # noqa: E501 - 'text': 'text', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TaskProgress - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - percent (float): Percent of the task progression. [optional] # noqa: E501 - text (str): Text details of the task progress. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TaskProgress - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - percent (float): Percent of the task progression. [optional] # noqa: E501 - text (str): Text details of the task progress. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/task_result.py b/flat_api/model/task_result.py deleted file mode 100644 index 7feef2b..0000000 --- a/flat_api/model/task_result.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class TaskResult(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'url': (str,), # noqa: E501 - 'error': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'url': 'url', # noqa: E501 - 'error': 'error', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TaskResult - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - url (str): URL returned by the task worker. [optional] # noqa: E501 - error (str): Error returned by task worker. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TaskResult - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - url (str): URL returned by the task worker. [optional] # noqa: E501 - error (str): Error returned by task worker. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_admin_update.py b/flat_api/model/user_admin_update.py deleted file mode 100644 index 743b0df..0000000 --- a/flat_api/model/user_admin_update.py +++ /dev/null @@ -1,307 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.organization_roles import OrganizationRoles - globals()['OrganizationRoles'] = OrganizationRoles - - -class UserAdminUpdate(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('password',): { - 'max_length': 1000, - 'min_length': 6, - }, - ('username',): { - 'max_length': 30, - 'min_length': 1, - 'regex': { - 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 - }, - }, - ('firstname',): { - 'max_length': 60, - }, - ('lastname',): { - 'max_length': 60, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'password': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'password': 'password', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'username': 'username', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'email': 'email', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserAdminUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - password (str): Password of the account. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - username (str): Username of the account. [optional] # noqa: E501 - firstname (str): First name of the user. [optional] # noqa: E501 - lastname (str): Last name of the user. [optional] # noqa: E501 - email (str): Email of the account. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserAdminUpdate - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - password (str): Password of the account. [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - username (str): Username of the account. [optional] # noqa: E501 - firstname (str): First name of the user. [optional] # noqa: E501 - lastname (str): Last name of the user. [optional] # noqa: E501 - email (str): Email of the account. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_azure_details.py b/flat_api/model/user_azure_details.py deleted file mode 100644 index 4eec1bf..0000000 --- a/flat_api/model/user_azure_details.py +++ /dev/null @@ -1,272 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class UserAzureDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'oid': (str,), # noqa: E501 - 'hd': (str,), # noqa: E501 - 'preferred_username': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'oid': 'oid', # noqa: E501 - 'hd': 'hd', # noqa: E501 - 'preferred_username': 'preferredUsername', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserAzureDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - oid (str): User object identifier on Azure AD. [optional] # noqa: E501 - hd (str): User tenant (domain name). [optional] # noqa: E501 - preferred_username (str): User Preferred Username (UPN), i.e. the main email of the user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserAzureDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - oid (str): User object identifier on Azure AD. [optional] # noqa: E501 - hd (str): User tenant (domain name). [optional] # noqa: E501 - preferred_username (str): User Preferred Username (UPN), i.e. the main email of the user. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_community_profile_links.py b/flat_api/model/user_community_profile_links.py deleted file mode 100644 index c58d0bc..0000000 --- a/flat_api/model/user_community_profile_links.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class UserCommunityProfileLinks(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'spotify_url': (str, none_type,), # noqa: E501 - 'youtube_url': (str, none_type,), # noqa: E501 - 'soundcloud_url': (str, none_type,), # noqa: E501 - 'tiktok_url': (str, none_type,), # noqa: E501 - 'instagram_url': (str, none_type,), # noqa: E501 - 'website_url': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'spotify_url': 'spotifyUrl', # noqa: E501 - 'youtube_url': 'youtubeUrl', # noqa: E501 - 'soundcloud_url': 'soundcloudUrl', # noqa: E501 - 'tiktok_url': 'tiktokUrl', # noqa: E501 - 'instagram_url': 'instagramUrl', # noqa: E501 - 'website_url': 'websiteUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserCommunityProfileLinks - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - spotify_url (str, none_type): Spotify Profile URL. [optional] # noqa: E501 - youtube_url (str, none_type): YouTube channel URL. [optional] # noqa: E501 - soundcloud_url (str, none_type): SoundCloud Profile URL. [optional] # noqa: E501 - tiktok_url (str, none_type): TikTok profile URL. For updates, also accepts TikTok usernames. [optional] # noqa: E501 - instagram_url (str, none_type): Instagram profile URL. For updates, also accepts Instagram usernames. [optional] # noqa: E501 - website_url (str, none_type): Personnal website URL. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserCommunityProfileLinks - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - spotify_url (str, none_type): Spotify Profile URL. [optional] # noqa: E501 - youtube_url (str, none_type): YouTube channel URL. [optional] # noqa: E501 - soundcloud_url (str, none_type): SoundCloud Profile URL. [optional] # noqa: E501 - tiktok_url (str, none_type): TikTok profile URL. For updates, also accepts TikTok usernames. [optional] # noqa: E501 - instagram_url (str, none_type): Instagram profile URL. For updates, also accepts Instagram usernames. [optional] # noqa: E501 - website_url (str, none_type): Personnal website URL. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_creation.py b/flat_api/model/user_creation.py deleted file mode 100644 index a59938e..0000000 --- a/flat_api/model/user_creation.py +++ /dev/null @@ -1,324 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.flat_locales import FlatLocales - globals()['FlatLocales'] = FlatLocales - - -class UserCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('role',): { - 'USER': "user", - 'TEACHER': "teacher", - 'ADMIN': "admin", - }, - } - - validations = { - ('username',): { - 'max_length': 30, - 'min_length': 1, - 'regex': { - 'pattern': r'^[A-Za-z0-9\-_.]+$', # noqa: E501 - }, - }, - ('password',): { - 'max_length': 1000, - 'min_length': 6, - }, - ('firstname',): { - 'max_length': 60, - }, - ('lastname',): { - 'max_length': 60, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'username': (str,), # noqa: E501 - 'password': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'locale': (FlatLocales,), # noqa: E501 - 'role': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'username': 'username', # noqa: E501 - 'password': 'password', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'email': 'email', # noqa: E501 - 'locale': 'locale', # noqa: E501 - 'role': 'role', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, username, password, *args, **kwargs): # noqa: E501 - """UserCreation - a model defined in OpenAPI - - Args: - username (str): Username of the new account - password (str): Password of the new account - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - firstname (str): First name of the user. [optional] # noqa: E501 - lastname (str): Last name of the user. [optional] # noqa: E501 - email (str): Email of the new account. [optional] # noqa: E501 - locale (FlatLocales): [optional] # noqa: E501 - role (str): Role of the new account. [optional] if omitted the server will use the default value of "user" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.username = username - self.password = password - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, username, password, *args, **kwargs): # noqa: E501 - """UserCreation - a model defined in OpenAPI - - Args: - username (str): Username of the new account - password (str): Password of the new account - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - firstname (str): First name of the user. [optional] # noqa: E501 - lastname (str): Last name of the user. [optional] # noqa: E501 - email (str): Email of the new account. [optional] # noqa: E501 - locale (FlatLocales): [optional] # noqa: E501 - role (str): Role of the new account. [optional] if omitted the server will use the default value of "user" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.username = username - self.password = password - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_details.py b/flat_api/model/user_details.py deleted file mode 100644 index b9e00c4..0000000 --- a/flat_api/model/user_details.py +++ /dev/null @@ -1,394 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_roles import ClassRoles - from flat_api.model.flat_locales import FlatLocales - from flat_api.model.organization_roles import OrganizationRoles - from flat_api.model.user_azure_details import UserAzureDetails - from flat_api.model.user_community_profile_links import UserCommunityProfileLinks - globals()['ClassRoles'] = ClassRoles - globals()['FlatLocales'] = FlatLocales - globals()['OrganizationRoles'] = OrganizationRoles - globals()['UserAzureDetails'] = UserAzureDetails - globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks - - -class UserDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'USER': "user", - 'GUEST': "guest", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'printable_name': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'picture': (str, none_type,), # noqa: E501 - 'badges': ([str],), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'class_role': (ClassRoles,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - 'bio': (str,), # noqa: E501 - 'registration_date': (datetime,), # noqa: E501 - 'liked_scores_count': (int,), # noqa: E501 - 'followers_count': (int,), # noqa: E501 - 'following_count': (int,), # noqa: E501 - 'owned_public_scores_count': (int,), # noqa: E501 - 'cover_picture': (str,), # noqa: E501 - 'profile_theme': (str,), # noqa: E501 - 'instruments': ([str],), # noqa: E501 - 'links': (UserCommunityProfileLinks,), # noqa: E501 - 'azure_details': (UserAzureDetails,), # noqa: E501 - 'private_profile': (bool,), # noqa: E501 - 'locale': (FlatLocales,), # noqa: E501 - 'groups': ([str],), # noqa: E501 - 'picture_file': (str, none_type,), # noqa: E501 - 'cover_picture_file': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'username': 'username', # noqa: E501 - 'printable_name': 'printableName', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'name': 'name', # noqa: E501 - 'picture': 'picture', # noqa: E501 - 'badges': 'badges', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'class_role': 'classRole', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - 'bio': 'bio', # noqa: E501 - 'registration_date': 'registrationDate', # noqa: E501 - 'liked_scores_count': 'likedScoresCount', # noqa: E501 - 'followers_count': 'followersCount', # noqa: E501 - 'following_count': 'followingCount', # noqa: E501 - 'owned_public_scores_count': 'ownedPublicScoresCount', # noqa: E501 - 'cover_picture': 'coverPicture', # noqa: E501 - 'profile_theme': 'profileTheme', # noqa: E501 - 'instruments': 'instruments', # noqa: E501 - 'links': 'links', # noqa: E501 - 'azure_details': 'azureDetails', # noqa: E501 - 'private_profile': 'privateProfile', # noqa: E501 - 'locale': 'locale', # noqa: E501 - 'groups': 'groups', # noqa: E501 - 'picture_file': 'pictureFile', # noqa: E501 - 'cover_picture_file': 'coverPictureFile', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the user. [optional] # noqa: E501 - type (str): The type of account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - bio (str): User's biography. [optional] # noqa: E501 - registration_date (datetime): Date the user signed up. [optional] # noqa: E501 - liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 - followers_count (int): Number of followers the user have. [optional] # noqa: E501 - following_count (int): Number of people the user follow. [optional] # noqa: E501 - owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 - cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 - profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - links (UserCommunityProfileLinks): [optional] # noqa: E501 - azure_details (UserAzureDetails): [optional] # noqa: E501 - private_profile (bool): Tell either this user profile is private or not (individual accounts only). [optional] # noqa: E501 - locale (FlatLocales): [optional] # noqa: E501 - groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 - picture_file (str, none_type): The ID of the user profile picture. [optional] # noqa: E501 - cover_picture_file (str, none_type): The ID of the user profile cover picture. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserDetails - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Identifier of the user. [optional] # noqa: E501 - type (str): The type of account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - bio (str): User's biography. [optional] # noqa: E501 - registration_date (datetime): Date the user signed up. [optional] # noqa: E501 - liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 - followers_count (int): Number of followers the user have. [optional] # noqa: E501 - following_count (int): Number of people the user follow. [optional] # noqa: E501 - owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 - cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 - profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - links (UserCommunityProfileLinks): [optional] # noqa: E501 - azure_details (UserAzureDetails): [optional] # noqa: E501 - private_profile (bool): Tell either this user profile is private or not (individual accounts only). [optional] # noqa: E501 - locale (FlatLocales): [optional] # noqa: E501 - groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 - picture_file (str, none_type): The ID of the user profile picture. [optional] # noqa: E501 - cover_picture_file (str, none_type): The ID of the user profile cover picture. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_details_admin.py b/flat_api/model/user_details_admin.py deleted file mode 100644 index cd73d03..0000000 --- a/flat_api/model/user_details_admin.py +++ /dev/null @@ -1,342 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_roles import ClassRoles - from flat_api.model.organization_roles import OrganizationRoles - from flat_api.model.user_details_admin_license import UserDetailsAdminLicense - globals()['ClassRoles'] = ClassRoles - globals()['OrganizationRoles'] = OrganizationRoles - globals()['UserDetailsAdminLicense'] = UserDetailsAdminLicense - - -class UserDetailsAdmin(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'USER': "user", - 'GUEST': "guest", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'printable_name': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'picture': (str, none_type,), # noqa: E501 - 'badges': ([str],), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'class_role': (ClassRoles,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'last_activity_date': (datetime,), # noqa: E501 - 'license': (UserDetailsAdminLicense,), # noqa: E501 - 'groups': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'username': 'username', # noqa: E501 - 'printable_name': 'printableName', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'name': 'name', # noqa: E501 - 'picture': 'picture', # noqa: E501 - 'badges': 'badges', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'class_role': 'classRole', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - 'email': 'email', # noqa: E501 - 'last_activity_date': 'lastActivityDate', # noqa: E501 - 'license': 'license', # noqa: E501 - 'groups': 'groups', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserDetailsAdmin - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - email (str): Email of the user. [optional] # noqa: E501 - last_activity_date (datetime): Date of the last user activity. [optional] # noqa: E501 - license (UserDetailsAdminLicense): [optional] # noqa: E501 - groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserDetailsAdmin - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - email (str): Email of the user. [optional] # noqa: E501 - last_activity_date (datetime): Date of the last user activity. [optional] # noqa: E501 - license (UserDetailsAdminLicense): [optional] # noqa: E501 - groups ([str]): For Flat for Education accounts, list of Group identifiers the user is part of.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_details_admin_license.py b/flat_api/model/user_details_admin_license.py deleted file mode 100644 index e83dc0e..0000000 --- a/flat_api/model/user_details_admin_license.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.license_mode import LicenseMode - from flat_api.model.license_sources import LicenseSources - globals()['LicenseMode'] = LicenseMode - globals()['LicenseSources'] = LicenseSources - - -class UserDetailsAdminLicense(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'expiration_date': (datetime,), # noqa: E501 - 'source': (LicenseSources,), # noqa: E501 - 'mode': (LicenseMode,), # noqa: E501 - 'active': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'expiration_date': 'expirationDate', # noqa: E501 - 'source': 'source', # noqa: E501 - 'mode': 'mode', # noqa: E501 - 'active': 'active', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserDetailsAdminLicense - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): ID of the current license. [optional] # noqa: E501 - expiration_date (datetime): Date when the license expires. [optional] # noqa: E501 - source (LicenseSources): [optional] # noqa: E501 - mode (LicenseMode): [optional] # noqa: E501 - active (bool): ID of the current license. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserDetailsAdminLicense - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): ID of the current license. [optional] # noqa: E501 - expiration_date (datetime): Date when the license expires. [optional] # noqa: E501 - source (LicenseSources): [optional] # noqa: E501 - mode (LicenseMode): [optional] # noqa: E501 - active (bool): ID of the current license. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_public.py b/flat_api/model/user_public.py deleted file mode 100644 index 79a8450..0000000 --- a/flat_api/model/user_public.py +++ /dev/null @@ -1,366 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_roles import ClassRoles - from flat_api.model.organization_roles import OrganizationRoles - from flat_api.model.user_community_profile_links import UserCommunityProfileLinks - globals()['ClassRoles'] = ClassRoles - globals()['OrganizationRoles'] = OrganizationRoles - globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks - - -class UserPublic(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'USER': "user", - 'GUEST': "guest", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'printable_name': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'picture': (str, none_type,), # noqa: E501 - 'badges': ([str],), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'class_role': (ClassRoles,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - 'bio': (str,), # noqa: E501 - 'registration_date': (datetime,), # noqa: E501 - 'liked_scores_count': (int,), # noqa: E501 - 'followers_count': (int,), # noqa: E501 - 'following_count': (int,), # noqa: E501 - 'owned_public_scores_count': (int,), # noqa: E501 - 'cover_picture': (str,), # noqa: E501 - 'profile_theme': (str,), # noqa: E501 - 'instruments': ([str],), # noqa: E501 - 'links': (UserCommunityProfileLinks,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'username': 'username', # noqa: E501 - 'printable_name': 'printableName', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'name': 'name', # noqa: E501 - 'picture': 'picture', # noqa: E501 - 'badges': 'badges', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'class_role': 'classRole', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - 'bio': 'bio', # noqa: E501 - 'registration_date': 'registrationDate', # noqa: E501 - 'liked_scores_count': 'likedScoresCount', # noqa: E501 - 'followers_count': 'followersCount', # noqa: E501 - 'following_count': 'followingCount', # noqa: E501 - 'owned_public_scores_count': 'ownedPublicScoresCount', # noqa: E501 - 'cover_picture': 'coverPicture', # noqa: E501 - 'profile_theme': 'profileTheme', # noqa: E501 - 'instruments': 'instruments', # noqa: E501 - 'links': 'links', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserPublic - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - bio (str): User's biography. [optional] # noqa: E501 - registration_date (datetime): Date the user signed up. [optional] # noqa: E501 - liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 - followers_count (int): Number of followers the user have. [optional] # noqa: E501 - following_count (int): Number of people the user follow. [optional] # noqa: E501 - owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 - cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 - profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - links (UserCommunityProfileLinks): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserPublic - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - bio (str): User's biography. [optional] # noqa: E501 - registration_date (datetime): Date the user signed up. [optional] # noqa: E501 - liked_scores_count (int): Number of the scores liked by the user. [optional] # noqa: E501 - followers_count (int): Number of followers the user have. [optional] # noqa: E501 - following_count (int): Number of people the user follow. [optional] # noqa: E501 - owned_public_scores_count (int): Number of public scores the user have. [optional] # noqa: E501 - cover_picture (str): Cover picture (backgroud) for the profile. [optional] # noqa: E501 - profile_theme (str): Theme (background) for the profile. [optional] # noqa: E501 - instruments ([str]): An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. . [optional] # noqa: E501 - links (UserCommunityProfileLinks): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_public_summary.py b/flat_api/model/user_public_summary.py deleted file mode 100644 index 4aae952..0000000 --- a/flat_api/model/user_public_summary.py +++ /dev/null @@ -1,324 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - -def lazy_import(): - from flat_api.model.class_roles import ClassRoles - from flat_api.model.organization_roles import OrganizationRoles - globals()['ClassRoles'] = ClassRoles - globals()['OrganizationRoles'] = OrganizationRoles - - -class UserPublicSummary(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'USER': "user", - 'GUEST': "guest", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'printable_name': (str,), # noqa: E501 - 'firstname': (str,), # noqa: E501 - 'lastname': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'picture': (str, none_type,), # noqa: E501 - 'badges': ([str],), # noqa: E501 - 'organization': (str,), # noqa: E501 - 'organization_role': (OrganizationRoles,), # noqa: E501 - 'class_role': (ClassRoles,), # noqa: E501 - 'html_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'username': 'username', # noqa: E501 - 'printable_name': 'printableName', # noqa: E501 - 'firstname': 'firstname', # noqa: E501 - 'lastname': 'lastname', # noqa: E501 - 'name': 'name', # noqa: E501 - 'picture': 'picture', # noqa: E501 - 'badges': 'badges', # noqa: E501 - 'organization': 'organization', # noqa: E501 - 'organization_role': 'organizationRole', # noqa: E501 - 'class_role': 'classRole', # noqa: E501 - 'html_url': 'htmlUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserPublicSummary - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserPublicSummary - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): The user unique identifier. [optional] # noqa: E501 - type (str): The type of user account. [optional] # noqa: E501 - username (str): The user name (unique for the organization). [optional] # noqa: E501 - printable_name (str): The name that can be directly printed (name, firstname & lastname, or username). [optional] # noqa: E501 - firstname (str): Firstname of the user (for education users). [optional] # noqa: E501 - lastname (str): Lastname of the user (for education users). [optional] # noqa: E501 - name (str): A displayable name for the user (for consumer users). [optional] # noqa: E501 - picture (str, none_type): The URL of the picture to display. [optional] # noqa: E501 - badges ([str]): List of badges for the user profile. [optional] # noqa: E501 - organization (str): Organization ID (for Edu users only). [optional] # noqa: E501 - organization_role (OrganizationRoles): [optional] # noqa: E501 - class_role (ClassRoles): [optional] # noqa: E501 - html_url (str): Link to user profile (for Indiv. users only). [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_signin_link.py b/flat_api/model/user_signin_link.py deleted file mode 100644 index 963d914..0000000 --- a/flat_api/model/user_signin_link.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class UserSigninLink(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'url': (str,), # noqa: E501 - 'expiration_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'url': 'url', # noqa: E501 - 'expiration_date': 'expirationDate', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserSigninLink - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - url (str): URL to use to sign in to this account. [optional] # noqa: E501 - expiration_date (datetime): Date when the link expires. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserSigninLink - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - url (str): URL to use to sign in to this account. [optional] # noqa: E501 - expiration_date (datetime): Date when the link expires. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model/user_signin_link_creation.py b/flat_api/model/user_signin_link_creation.py deleted file mode 100644 index b79dd0d..0000000 --- a/flat_api/model/user_signin_link_creation.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from flat_api.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from flat_api.exceptions import ApiAttributeError - - - -class UserSigninLinkCreation(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'destination_path': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'destination_path': 'destinationPath', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserSigninLinkCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - destination_path (str): Path to redirect to after signin. [optional] if omitted the server will use the default value of "/" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UserSigninLinkCreation - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - destination_path (str): Path to redirect to after signin. [optional] if omitted the server will use the default value of "/" # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/flat_api/model_utils.py b/flat_api/model_utils.py deleted file mode 100644 index 7f5319d..0000000 --- a/flat_api/model_utils.py +++ /dev/null @@ -1,2057 +0,0 @@ -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 - - The version of the OpenAPI document: 2.18.0 - Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile -import uuid - -from dateutil.parser import parse - -from flat_api.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (int, float), - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) - if filename is not None: - filename = filename.group(1) - else: - filename = "default_" + str(uuid.uuid4()) - - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): - return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + composed_instances - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 3b2d33f..0158488 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -1,139 +1,149 @@ +# coding: utf-8 + # flake8: noqa +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from flat_api.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) -from flat_api.model.api_access_token import ApiAccessToken -from flat_api.model.app_scopes import AppScopes -from flat_api.model.assignment import Assignment -from flat_api.model.assignment_copy import AssignmentCopy -from flat_api.model.assignment_copy_response import AssignmentCopyResponse -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment -from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState -from flat_api.model.assignment_submission_state import AssignmentSubmissionState -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.assignment_update import AssignmentUpdate -from flat_api.model.class_assignment import ClassAssignment -from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas -from flat_api.model.class_assignment_lti import ClassAssignmentLti -from flat_api.model.class_assignment_mfc import ClassAssignmentMfc -from flat_api.model.class_assignment_update import ClassAssignmentUpdate -from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom -from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph -from flat_api.model.class_attachment_creation import ClassAttachmentCreation -from flat_api.model.class_creation import ClassCreation -from flat_api.model.class_details import ClassDetails -from flat_api.model.class_details_canvas import ClassDetailsCanvas -from flat_api.model.class_details_clever import ClassDetailsClever -from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom -from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive -from flat_api.model.class_details_issues import ClassDetailsIssues -from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner -from flat_api.model.class_details_lti import ClassDetailsLti -from flat_api.model.class_details_mfc import ClassDetailsMfc -from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.class_roles import ClassRoles -from flat_api.model.class_state import ClassState -from flat_api.model.class_update import ClassUpdate -from flat_api.model.collection import Collection -from flat_api.model.collection_app import CollectionApp -from flat_api.model.collection_capabilities import CollectionCapabilities -from flat_api.model.collection_creation import CollectionCreation -from flat_api.model.collection_modification import CollectionModification -from flat_api.model.collection_privacy import CollectionPrivacy -from flat_api.model.collection_type import CollectionType -from flat_api.model.edu_library import EduLibrary -from flat_api.model.edu_resource import EduResource -from flat_api.model.edu_resource_capabilities import EduResourceCapabilities -from flat_api.model.edu_resource_copy import EduResourceCopy -from flat_api.model.edu_resource_creation import EduResourceCreation -from flat_api.model.edu_resource_move import EduResourceMove -from flat_api.model.edu_resource_privacy import EduResourcePrivacy -from flat_api.model.edu_resource_resource import EduResourceResource -from flat_api.model.edu_resource_type import EduResourceType -from flat_api.model.edu_resource_update import EduResourceUpdate -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.model.edu_skills_focused import EduSkillsFocused -from flat_api.model.flat_error_response import FlatErrorResponse -from flat_api.model.flat_locales import FlatLocales -from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.model.google_classroom_submission import GoogleClassroomSubmission -from flat_api.model.group import Group -from flat_api.model.group_details import GroupDetails -from flat_api.model.group_type import GroupType -from flat_api.model.license_mode import LicenseMode -from flat_api.model.license_sources import LicenseSources -from flat_api.model.lms_name import LmsName -from flat_api.model.lti_credentials import LtiCredentials -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode -from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment -from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission -from flat_api.model.organization_invitation import OrganizationInvitation -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.score_comment import ScoreComment -from flat_api.model.score_comment_context import ScoreCommentContext -from flat_api.model.score_comment_creation import ScoreCommentCreation -from flat_api.model.score_comment_moderation import ScoreCommentModeration -from flat_api.model.score_comment_update import ScoreCommentUpdate -from flat_api.model.score_comments_counts import ScoreCommentsCounts -from flat_api.model.score_creation import ScoreCreation -from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_details import ScoreDetails -from flat_api.model.score_fork import ScoreFork -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_likes_counts import ScoreLikesCounts -from flat_api.model.score_modification import ScoreModification -from flat_api.model.score_plays_counts import ScorePlaysCounts -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_revision import ScoreRevision -from flat_api.model.score_revision_creation import ScoreRevisionCreation -from flat_api.model.score_revision_statistics import ScoreRevisionStatistics -from flat_api.model.score_source import ScoreSource -from flat_api.model.score_track import ScoreTrack -from flat_api.model.score_track_creation import ScoreTrackCreation -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -from flat_api.model.score_track_type import ScoreTrackType -from flat_api.model.score_track_update import ScoreTrackUpdate -from flat_api.model.score_views_counts import ScoreViewsCounts -from flat_api.model.task import Task -from flat_api.model.task_export_options import TaskExportOptions -from flat_api.model.task_progress import TaskProgress -from flat_api.model.task_result import TaskResult -from flat_api.model.user_admin_update import UserAdminUpdate -from flat_api.model.user_azure_details import UserAzureDetails -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks -from flat_api.model.user_creation import UserCreation -from flat_api.model.user_details import UserDetails -from flat_api.model.user_details_admin import UserDetailsAdmin -from flat_api.model.user_details_admin_license import UserDetailsAdminLicense -from flat_api.model.user_public import UserPublic -from flat_api.model.user_public_summary import UserPublicSummary -from flat_api.model.user_signin_link import UserSigninLink -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +# import models into model package +from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.app_scopes import AppScopes +from flat_api.models.assignment import Assignment +from flat_api.models.assignment_copy import AssignmentCopy +from flat_api.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti +from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner +from flat_api.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.assignment_update import AssignmentUpdate +from flat_api.models.class_assignment import ClassAssignment +from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.models.class_assignment_lti import ClassAssignmentLti +from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.models.class_attachment_creation import ClassAttachmentCreation +from flat_api.models.class_creation import ClassCreation +from flat_api.models.class_details import ClassDetails +from flat_api.models.class_details_canvas import ClassDetailsCanvas +from flat_api.models.class_details_clever import ClassDetailsClever +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from flat_api.models.class_details_lti import ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.models.class_grade_level import ClassGradeLevel +from flat_api.models.class_roles import ClassRoles +from flat_api.models.class_state import ClassState +from flat_api.models.class_update import ClassUpdate +from flat_api.models.collection import Collection +from flat_api.models.collection_app import CollectionApp +from flat_api.models.collection_capabilities import CollectionCapabilities +from flat_api.models.collection_creation import CollectionCreation +from flat_api.models.collection_modification import CollectionModification +from flat_api.models.collection_privacy import CollectionPrivacy +from flat_api.models.collection_type import CollectionType +from flat_api.models.edu_library import EduLibrary +from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities +from flat_api.models.edu_resource_copy import EduResourceCopy +from flat_api.models.edu_resource_creation import EduResourceCreation +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.models.edu_resource_move import EduResourceMove +from flat_api.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.models.edu_resource_resource import EduResourceResource +from flat_api.models.edu_resource_type import EduResourceType +from flat_api.models.edu_resource_update import EduResourceUpdate +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.models.flat_error_response import FlatErrorResponse +from flat_api.models.flat_locales import FlatLocales +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.models.group import Group +from flat_api.models.group_details import GroupDetails +from flat_api.models.group_type import GroupType +from flat_api.models.license_mode import LicenseMode +from flat_api.models.license_sources import LicenseSources +from flat_api.models.lms_name import LmsName +from flat_api.models.lti_credentials import LtiCredentials +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.models.media_attachment import MediaAttachment +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api.models.organization_invitation import OrganizationInvitation +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.models.resource_rights import ResourceRights +from flat_api.models.score_comment import ScoreComment +from flat_api.models.score_comment_context import ScoreCommentContext +from flat_api.models.score_comment_creation import ScoreCommentCreation +from flat_api.models.score_comment_moderation import ScoreCommentModeration +from flat_api.models.score_comment_update import ScoreCommentUpdate +from flat_api.models.score_comments_counts import ScoreCommentsCounts +from flat_api.models.score_creation import ScoreCreation +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +from flat_api.models.score_creation_type import ScoreCreationType +from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_fork import ScoreFork +from flat_api.models.score_license import ScoreLicense +from flat_api.models.score_likes_counts import ScoreLikesCounts +from flat_api.models.score_modification import ScoreModification +from flat_api.models.score_plays_counts import ScorePlaysCounts +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.score_revision import ScoreRevision +from flat_api.models.score_revision_creation import ScoreRevisionCreation +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics +from flat_api.models.score_source import ScoreSource +from flat_api.models.score_track import ScoreTrack +from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose +from flat_api.models.score_track_state import ScoreTrackState +from flat_api.models.score_track_type import ScoreTrackType +from flat_api.models.score_track_update import ScoreTrackUpdate +from flat_api.models.score_views_counts import ScoreViewsCounts +from flat_api.models.task import Task +from flat_api.models.task_export_options import TaskExportOptions +from flat_api.models.task_progress import TaskProgress +from flat_api.models.task_result import TaskResult +from flat_api.models.tutteo_product import TutteoProduct +from flat_api.models.user_admin_update import UserAdminUpdate +from flat_api.models.user_azure_details import UserAzureDetails +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks +from flat_api.models.user_creation import UserCreation +from flat_api.models.user_details import UserDetails +from flat_api.models.user_details_admin import UserDetailsAdmin +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from flat_api.models.user_public import UserPublic +from flat_api.models.user_public_summary import UserPublicSummary +from flat_api.models.user_signin_link import UserSigninLink +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py new file mode 100644 index 0000000..eec0c96 --- /dev/null +++ b/flat_api/models/api_access_token.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.app_scopes import AppScopes +from typing import Optional, Set +from typing_extensions import Self + +class ApiAccessToken(BaseModel): + """ + An API access token + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of this private token") + name: Optional[StrictStr] = Field(default=None, description="Name of the personal access token") + token: Optional[StrictStr] = Field(default=None, description="The token. This token will only be returned once, then only the first 4 characters will be returned. ") + issued_date: Optional[datetime] = Field(default=None, description="The date then this token was issued ", alias="issuedDate") + expiration_date: Optional[datetime] = Field(default=None, description="The date then this token will expire ", alias="expirationDate") + scopes: Optional[List[AppScopes]] = Field(default=None, description="The list of scopes associated to the token ") + __properties: ClassVar[List[str]] = ["id", "name", "token", "issuedDate", "expirationDate", "scopes"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAccessToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAccessToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "token": obj.get("token"), + "issuedDate": obj.get("issuedDate"), + "expirationDate": obj.get("expirationDate"), + "scopes": obj.get("scopes") + }) + return _obj + + diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py new file mode 100644 index 0000000..69ccd15 --- /dev/null +++ b/flat_api/models/app_scopes.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AppScopes(str, Enum): + """ + Available scopes + """ + + """ + allowed enum values + """ + ACCOUNT_DOT_PUBLIC_PROFILE = 'account.public_profile' + ACCOUNT_DOT_EMAIL = 'account.email' + ACCOUNT_DOT_EDUCATION_PROFILE = 'account.education_profile' + SCORES_DOT_READONLY = 'scores.readonly' + SCORES_DOT_SOCIAL = 'scores.social' + SCORES = 'scores' + COLLECTIONS_DOT_READONLY = 'collections.readonly' + COLLECTIONS_DOT_ADD_SCORES = 'collections.add_scores' + COLLECTIONS = 'collections' + EDU_DOT_RESOURCES = 'edu.resources' + EDU_DOT_RESOURCES_DOT_READONLY = 'edu.resources.readonly' + EDU_DOT_CLASSES = 'edu.classes' + EDU_DOT_CLASSES_DOT_READONLY = 'edu.classes.readonly' + EDU_DOT_ASSIGNMENTS = 'edu.assignments' + EDU_DOT_ASSIGNMENTS_DOT_READONLY = 'edu.assignments.readonly' + EDU_DOT_ADMIN = 'edu.admin' + EDU_DOT_ADMIN_DOT_LTI = 'edu.admin.lti' + EDU_DOT_ADMIN_DOT_LTI_DOT_READONLY = 'edu.admin.lti.readonly' + EDU_DOT_ADMIN_DOT_USERS = 'edu.admin.users' + EDU_DOT_ADMIN_DOT_USERS_DOT_READONLY = 'edu.admin.users.readonly' + TASKS_DOT_READONLY = 'tasks.readonly' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppScopes from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py new file mode 100644 index 0000000..cbab03c --- /dev/null +++ b/flat_api/models/assignment.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.media_attachment import MediaAttachment +from typing import Optional, Set +from typing_extensions import Self + +class Assignment(BaseModel): + """ + Assignment details + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCopyResponseCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Assignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized") + }) + return _obj + + diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py new file mode 100644 index 0000000..596a712 --- /dev/null +++ b/flat_api/models/assignment_copy.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentCopy(BaseModel): + """ + AssignmentCopy + """ # noqa: E501 + classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") + library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") + verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") + __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate", "libraryParent", "verifyIfNotAlreadyInResourceLibrary"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "scheduledDate": obj.get("scheduledDate"), + "libraryParent": obj.get("libraryParent"), + "verifyIfNotAlreadyInResourceLibrary": obj.get("verifyIfNotAlreadyInResourceLibrary") + }) + return _obj + + diff --git a/flat_api/models/assignment_copy_response.py b/flat_api/models/assignment_copy_response.py new file mode 100644 index 0000000..acae4f5 --- /dev/null +++ b/flat_api/models/assignment_copy_response.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.media_attachment import MediaAttachment +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentCopyResponse(BaseModel): + """ + AssignmentCopyResponse + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCopyResponseCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + resource: Optional[StrictStr] = Field(default=None, description="If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.") + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "resource": obj.get("resource") + }) + return _obj + + diff --git a/flat_api/models/assignment_copy_response_capabilities.py b/flat_api/models/assignment_copy_response_capabilities.py new file mode 100644 index 0000000..ef39515 --- /dev/null +++ b/flat_api/models/assignment_copy_response_capabilities.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentCopyResponseCapabilities(BaseModel): + """ + Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + """ # noqa: E501 + can_edit: StrictBool = Field(description="Whether the current user can edit the assignment ", alias="canEdit") + can_publish_in_class: StrictBool = Field(description="Whether this assignment can be published in a class ", alias="canPublishInClass") + can_publish_in_class_error: Optional[AssignmentCopyResponseCapabilitiesCanPublishInClassError] = Field(default=None, alias="canPublishInClassError") + can_archive: StrictBool = Field(description="Whether the current user can archive the assignment ", alias="canArchive") + can_unarchive: StrictBool = Field(description="Whether the current user can unarchive the assignment ", alias="canUnarchive") + __properties: ClassVar[List[str]] = ["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyResponseCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of can_publish_in_class_error + if self.can_publish_in_class_error: + _dict['canPublishInClassError'] = self.can_publish_in_class_error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyResponseCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canPublishInClass": obj.get("canPublishInClass"), + "canPublishInClassError": AssignmentCopyResponseCapabilitiesCanPublishInClassError.from_dict(obj["canPublishInClassError"]) if obj.get("canPublishInClassError") is not None else None, + "canArchive": obj.get("canArchive"), + "canUnarchive": obj.get("canUnarchive") + }) + return _obj + + diff --git a/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py b/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py new file mode 100644 index 0000000..60b7c1f --- /dev/null +++ b/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentCopyResponseCapabilitiesCanPublishInClassError(BaseModel): + """ + If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + """ # noqa: E501 + code: StrictStr = Field(description="A corresponding code for this error") + message: StrictStr = Field(description="A printable and localized message for this error") + __properties: ClassVar[List[str]] = ["code", "message"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py new file mode 100644 index 0000000..85aae91 --- /dev/null +++ b/flat_api/models/assignment_submission.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti +from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner +from flat_api.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.models.media_attachment import MediaAttachment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmission(BaseModel): + """ + Assignment Submission + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the submission") + state: AssignmentSubmissionState + classroom: StrictStr = Field(description="Unique identifier of the classroom where the assignment was posted ") + assignment: StrictStr = Field(description="Unique identifier of the assignment") + creator: StrictStr = Field(description="The User identifier of the student who created the submission") + creation_date: StrictStr = Field(description="The date when the submission was created", alias="creationDate") + attachments: List[MediaAttachment] + submission_date: Optional[StrictStr] = Field(default=None, description="The date when the student submitted their work", alias="submissionDate") + return_date: Optional[StrictStr] = Field(default=None, description="The date when the teacher returned the work", alias="returnDate") + return_creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the teacher who returned the submission ", alias="returnCreator") + grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set.") + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.", alias="maxPoints") + exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") + playback: List[AssignmentSubmissionPlaybackInner] + comments: AssignmentSubmissionComments + google_classroom: Optional[GoogleClassroomSubmission] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[MicrosoftGraphSubmission] = Field(default=None, alias="microsoftGraph") + lti: Optional[AssignmentSubmissionLti] = None + __properties: ClassVar[List[str]] = ["id", "state", "classroom", "assignment", "creator", "creationDate", "attachments", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "playback", "comments", "googleClassroom", "microsoftGraph", "lti"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in playback (list) + _items = [] + if self.playback: + for _item in self.playback: + if _item: + _items.append(_item.to_dict()) + _dict['playback'] = _items + # override the default output from pydantic by calling `to_dict()` of comments + if self.comments: + _dict['comments'] = self.comments.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + # set to None if grade (nullable) is None + # and model_fields_set contains the field + if self.grade is None and "grade" in self.model_fields_set: + _dict['grade'] = None + + # set to None if draft_grade (nullable) is None + # and model_fields_set contains the field + if self.draft_grade is None and "draft_grade" in self.model_fields_set: + _dict['draftGrade'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "submissionDate": obj.get("submissionDate"), + "returnDate": obj.get("returnDate"), + "returnCreator": obj.get("returnCreator"), + "grade": obj.get("grade"), + "draftGrade": obj.get("draftGrade"), + "maxPoints": obj.get("maxPoints"), + "exercisesIds": obj.get("exercisesIds"), + "playback": [AssignmentSubmissionPlaybackInner.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, + "comments": AssignmentSubmissionComments.from_dict(obj["comments"]) if obj.get("comments") is not None else None, + "googleClassroom": GoogleClassroomSubmission.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": MicrosoftGraphSubmission.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "lti": AssignmentSubmissionLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py new file mode 100644 index 0000000..b4174aa --- /dev/null +++ b/flat_api/models/assignment_submission_comment.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionComment(BaseModel): + """ + Feedback comment added to an assignment submission + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The comment unique identifier") + user: Optional[StrictStr] = Field(default=None, description="The author unique identifier") + submission: Optional[StrictStr] = Field(default=None, description="The submission unique identifier") + var_date: Optional[datetime] = Field(default=None, description="The date when the comment was posted", alias="date") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") + comment: Optional[StrictStr] = Field(default=None, description="The comment text") + unread: Optional[StrictBool] = Field(default=None, description="True if the comment is unread by the current user") + __properties: ClassVar[List[str]] = ["id", "user", "submission", "date", "modificationDate", "comment", "unread"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user": obj.get("user"), + "submission": obj.get("submission"), + "date": obj.get("date"), + "modificationDate": obj.get("modificationDate"), + "comment": obj.get("comment"), + "unread": obj.get("unread") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py new file mode 100644 index 0000000..d10da33 --- /dev/null +++ b/flat_api/models/assignment_submission_comment_creation.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionCommentCreation(BaseModel): + """ + Creation of a assignment submission comment + """ # noqa: E501 + comment: StrictStr = Field(description="The comment text") + __properties: ClassVar[List[str]] = ["comment"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionCommentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionCommentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comment": obj.get("comment") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_comments.py b/flat_api/models/assignment_submission_comments.py new file mode 100644 index 0000000..a12a87a --- /dev/null +++ b/flat_api/models/assignment_submission_comments.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionComments(BaseModel): + """ + AssignmentSubmissionComments + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the submission") + unread: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of unread comments for the current user") + __properties: ClassVar[List[str]] = ["total", "unread"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "unread": obj.get("unread") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py new file mode 100644 index 0000000..672153f --- /dev/null +++ b/flat_api/models/assignment_submission_history.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionHistory(BaseModel): + """ + History item of the submission + """ # noqa: E501 + var_date: datetime = Field(description="The date when the submission was changed", alias="date") + classroom: Optional[StrictStr] = Field(default=None, description="The classroom unique identifier where the submission was changed") + assignment: Optional[StrictStr] = Field(default=None, description="The assignment unique identifier where the submission was changed") + submission: Optional[StrictStr] = Field(default=None, description="The submission unique identifier") + users: List[StrictStr] = Field(description="The user(s) unique identifier(s) who made the change") + source: Optional[StrictStr] = Field(default=None, description="The source of the change if the change was made by a third-party software") + state: Optional[AssignmentSubmissionHistoryState] = None + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The numerator of the grade at this time in the submission grade history", alias="draftGrade") + grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The numerator of the grade at this time in the submission grade history") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The denominator of the grade at this time in the submission grade history", alias="maxPoints") + comment: Optional[StrictStr] = Field(default=None, description="The comment that is made to this submission") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment", alias="dueDate") + attachment: Optional[AssignmentSubmissionHistoryAttachment] = None + __properties: ClassVar[List[str]] = ["date", "classroom", "assignment", "submission", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['lti', 'googleClassroom', 'microsoftGraph']): + raise ValueError("must be one of enum values ('lti', 'googleClassroom', 'microsoftGraph')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of attachment + if self.attachment: + _dict['attachment'] = self.attachment.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "submission": obj.get("submission"), + "users": obj.get("users"), + "source": obj.get("source"), + "state": obj.get("state"), + "draftGrade": obj.get("draftGrade"), + "grade": obj.get("grade"), + "maxPoints": obj.get("maxPoints"), + "comment": obj.get("comment"), + "dueDate": obj.get("dueDate"), + "attachment": AssignmentSubmissionHistoryAttachment.from_dict(obj["attachment"]) if obj.get("attachment") is not None else None + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py new file mode 100644 index 0000000..90dde2e --- /dev/null +++ b/flat_api/models/assignment_submission_history_attachment.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionHistoryAttachment(BaseModel): + """ + AssignmentSubmissionHistoryAttachment + """ # noqa: E501 + score: Optional[StrictStr] = Field(default=None, description="The score identifier that changed") + revision: Optional[StrictStr] = Field(default=None, description="The revision identifier that changed") + title: Optional[StrictStr] = Field(default=None, description="The title of the score that changed") + __properties: ClassVar[List[str]] = ["score", "revision", "title"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistoryAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistoryAttachment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "revision": obj.get("revision"), + "title": obj.get("title") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_history_state.py b/flat_api/models/assignment_submission_history_state.py new file mode 100644 index 0000000..fed57ae --- /dev/null +++ b/flat_api/models/assignment_submission_history_state.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionHistoryState(str, Enum): + """ + State of the submission history + """ + + """ + allowed enum values + """ + CREATED = 'created' + TURNEDIN = 'turnedIn' + RETURNED = 'returned' + GRADED = 'graded' + RESET = 'reset' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionHistoryState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/assignment_submission_lti.py b/flat_api/models/assignment_submission_lti.py new file mode 100644 index 0000000..3cc5b15 --- /dev/null +++ b/flat_api/models/assignment_submission_lti.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionLti(BaseModel): + """ + AssignmentSubmissionLti + """ # noqa: E501 + sourcedid: StrictStr = Field(description="The sourcedid of the LTI submission when using LTI Outcomes") + __properties: ClassVar[List[str]] = ["sourcedid"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sourcedid": obj.get("sourcedid") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_playback_inner.py b/flat_api/models/assignment_submission_playback_inner.py new file mode 100644 index 0000000..1f428da --- /dev/null +++ b/flat_api/models/assignment_submission_playback_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionPlaybackInner(BaseModel): + """ + Playback used by student in this submission (used to limit the playback for the assignment) + """ # noqa: E501 + score: StrictStr = Field(description="The score unique identifier") + nb_play_attempt: Union[StrictFloat, StrictInt] = Field(description="The number of playback used by the student", alias="nbPlayAttempt") + __properties: ClassVar[List[str]] = ["score", "nbPlayAttempt"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlaybackInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlaybackInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "nbPlayAttempt": obj.get("nbPlayAttempt") + }) + return _obj + + diff --git a/flat_api/models/assignment_submission_state.py b/flat_api/models/assignment_submission_state.py new file mode 100644 index 0000000..2e86d0e --- /dev/null +++ b/flat_api/models/assignment_submission_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionState(str, Enum): + """ + State of the submission + """ + + """ + allowed enum values + """ + CREATED = 'created' + TURNEDIN = 'turnedIn' + RETURNED = 'returned' + GRADED = 'graded' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py new file mode 100644 index 0000000..11b65f4 --- /dev/null +++ b/flat_api/models/assignment_submission_update.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentSubmissionUpdate(BaseModel): + """ + Assignment Submission creation + """ # noqa: E501 + attachments: Optional[List[ClassAttachmentCreation]] = None + submit: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done") + draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set.") + exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") + var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done", alias="return") + __properties: ClassVar[List[str]] = ["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + # set to None if draft_grade (nullable) is None + # and model_fields_set contains the field + if self.draft_grade is None and "draft_grade" in self.model_fields_set: + _dict['draftGrade'] = None + + # set to None if grade (nullable) is None + # and model_fields_set contains the field + if self.grade is None and "grade" in self.model_fields_set: + _dict['grade'] = None + + # set to None if exercises_ids (nullable) is None + # and model_fields_set contains the field + if self.exercises_ids is None and "exercises_ids" in self.model_fields_set: + _dict['exercisesIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "submit": obj.get("submit"), + "draftGrade": obj.get("draftGrade"), + "grade": obj.get("grade"), + "exercisesIds": obj.get("exercisesIds"), + "return": obj.get("return") + }) + return _obj + + diff --git a/flat_api/models/assignment_type.py b/flat_api/models/assignment_type.py new file mode 100644 index 0000000..dfed2f3 --- /dev/null +++ b/flat_api/models/assignment_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentType(str, Enum): + """ + Type of the assignment + """ + + """ + allowed enum values + """ + NONE = 'none' + NEWSCORE = 'newScore' + SCORETEMPLATE = 'scoreTemplate' + SHAREDWRITING = 'sharedWriting' + WORKSHEET = 'worksheet' + PERFORMANCE = 'performance' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/assignment_update.py b/flat_api/models/assignment_update.py new file mode 100644 index 0000000..2b5536b --- /dev/null +++ b/flat_api/models/assignment_update.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self + +class AssignmentUpdate(BaseModel): + """ + Assignment Resource Editing + """ # noqa: E501 + type: Optional[AssignmentType] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + attachments: Optional[List[ClassAttachmentCreation]] = None + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + __properties: ClassVar[List[str]] = ["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + # set to None if nb_playback_authorized (nullable) is None + # and model_fields_set contains the field + if self.nb_playback_authorized is None and "nb_playback_authorized" in self.model_fields_set: + _dict['nbPlaybackAuthorized'] = None + + # set to None if toolset (nullable) is None + # and model_fields_set contains the field + if self.toolset is None and "toolset" in self.model_fields_set: + _dict['toolset'] = None + + # set to None if cover_file (nullable) is None + # and model_fields_set contains the field + if self.cover_file is None and "cover_file" in self.model_fields_set: + _dict['coverFile'] = None + + # set to None if cover (nullable) is None + # and model_fields_set contains the field + if self.cover is None and "cover" in self.model_fields_set: + _dict['cover'] = None + + # set to None if max_points (nullable) is None + # and model_fields_set contains the field + if self.max_points is None and "max_points" in self.model_fields_set: + _dict['maxPoints'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "toolset": obj.get("toolset"), + "coverFile": obj.get("coverFile"), + "cover": obj.get("cover"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises") + }) + return _obj + + diff --git a/flat_api/models/class_assignment.py b/flat_api/models/class_assignment.py new file mode 100644 index 0000000..d9b907c --- /dev/null +++ b/flat_api/models/class_assignment.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.models.class_assignment_lti import ClassAssignmentLti +from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.models.media_attachment import MediaAttachment +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignment(BaseModel): + """ + ClassAssignment + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCopyResponseCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the creator of this assignment ") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment") + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the class where this assignment was posted") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of this assignment", alias="creationDate") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. ", alias="dueDate") + assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") + assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") + submissions: Optional[List[AssignmentSubmission]] = None + google_classroom: Optional[GoogleClassroomCoursework] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[MicrosoftGraphAssignment] = Field(default=None, alias="microsoftGraph") + mfc: Optional[ClassAssignmentMfc] = None + canvas: Optional[ClassAssignmentCanvas] = None + lti: Optional[ClassAssignmentLti] = None + issue: Optional[StrictStr] = Field(default=None, description="Detected issue for this assignment") + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'active', 'archived']): + raise ValueError("must be one of enum values ('draft', 'active', 'archived')") + return value + + @field_validator('assignee_mode') + def assignee_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['everyone', 'selected']): + raise ValueError("must be one of enum values ('everyone', 'selected')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in submissions (list) + _items = [] + if self.submissions: + for _item in self.submissions: + if _item: + _items.append(_item.to_dict()) + _dict['submissions'] = _items + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfc + if self.mfc: + _dict['mfc'] = self.mfc.to_dict() + # override the default output from pydantic by calling `to_dict()` of canvas + if self.canvas: + _dict['canvas'] = self.canvas.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "creator": obj.get("creator"), + "state": obj.get("state"), + "classroom": obj.get("classroom"), + "creationDate": obj.get("creationDate"), + "scheduledDate": obj.get("scheduledDate"), + "dueDate": obj.get("dueDate"), + "assigneeMode": obj.get("assigneeMode"), + "assignedStudents": obj.get("assignedStudents"), + "submissions": [AssignmentSubmission.from_dict(_item) for _item in obj["submissions"]] if obj.get("submissions") is not None else None, + "googleClassroom": GoogleClassroomCoursework.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": MicrosoftGraphAssignment.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "mfc": ClassAssignmentMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, + "canvas": ClassAssignmentCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, + "lti": ClassAssignmentLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, + "issue": obj.get("issue") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_canvas.py b/flat_api/models/class_assignment_canvas.py new file mode 100644 index 0000000..da11b9d --- /dev/null +++ b/flat_api/models/class_assignment_canvas.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentCanvas(BaseModel): + """ + A Canvas LMS assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentCanvas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentCanvas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_lti.py b/flat_api/models/class_assignment_lti.py new file mode 100644 index 0000000..663ea57 --- /dev/null +++ b/flat_api/models/class_assignment_lti.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentLti(BaseModel): + """ + An LTI assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Resource ID in the LMS") + __properties: ClassVar[List[str]] = ["id"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_mfc.py b/flat_api/models/class_assignment_mfc.py new file mode 100644 index 0000000..01c831c --- /dev/null +++ b/flat_api/models/class_assignment_mfc.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentMfc(BaseModel): + """ + A MusicFirst Classroom assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentMfc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentMfc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_update.py b/flat_api/models/class_assignment_update.py new file mode 100644 index 0000000..73d9412 --- /dev/null +++ b/flat_api/models/class_assignment_update.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentUpdate(BaseModel): + """ + ClassAssignmentUpdate + """ # noqa: E501 + type: Optional[AssignmentType] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + attachments: Optional[List[ClassAttachmentCreation]] = None + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. ", alias="dueDate") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") + google_classroom: Optional[ClassAssignmentUpdateGoogleClassroom] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[ClassAssignmentUpdateMicrosoftGraph] = Field(default=None, alias="microsoftGraph") + assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") + assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") + __properties: ClassVar[List[str]] = ["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'active']): + raise ValueError("must be one of enum values ('draft', 'active')") + return value + + @field_validator('assignee_mode') + def assignee_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['everyone', 'selected']): + raise ValueError("must be one of enum values ('everyone', 'selected')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # set to None if nb_playback_authorized (nullable) is None + # and model_fields_set contains the field + if self.nb_playback_authorized is None and "nb_playback_authorized" in self.model_fields_set: + _dict['nbPlaybackAuthorized'] = None + + # set to None if toolset (nullable) is None + # and model_fields_set contains the field + if self.toolset is None and "toolset" in self.model_fields_set: + _dict['toolset'] = None + + # set to None if cover_file (nullable) is None + # and model_fields_set contains the field + if self.cover_file is None and "cover_file" in self.model_fields_set: + _dict['coverFile'] = None + + # set to None if cover (nullable) is None + # and model_fields_set contains the field + if self.cover is None and "cover" in self.model_fields_set: + _dict['cover'] = None + + # set to None if max_points (nullable) is None + # and model_fields_set contains the field + if self.max_points is None and "max_points" in self.model_fields_set: + _dict['maxPoints'] = None + + # set to None if due_date (nullable) is None + # and model_fields_set contains the field + if self.due_date is None and "due_date" in self.model_fields_set: + _dict['dueDate'] = None + + # set to None if scheduled_date (nullable) is None + # and model_fields_set contains the field + if self.scheduled_date is None and "scheduled_date" in self.model_fields_set: + _dict['scheduledDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "toolset": obj.get("toolset"), + "coverFile": obj.get("coverFile"), + "cover": obj.get("cover"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "state": obj.get("state"), + "dueDate": obj.get("dueDate"), + "scheduledDate": obj.get("scheduledDate"), + "googleClassroom": ClassAssignmentUpdateGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": ClassAssignmentUpdateMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "assigneeMode": obj.get("assigneeMode"), + "assignedStudents": obj.get("assignedStudents") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_update_google_classroom.py b/flat_api/models/class_assignment_update_google_classroom.py new file mode 100644 index 0000000..e100a4e --- /dev/null +++ b/flat_api/models/class_assignment_update_google_classroom.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentUpdateGoogleClassroom(BaseModel): + """ + Google Classroom options for this assignment + """ # noqa: E501 + topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + __properties: ClassVar[List[str]] = ["topicId"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateGoogleClassroom from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if topic_id (nullable) is None + # and model_fields_set contains the field + if self.topic_id is None and "topic_id" in self.model_fields_set: + _dict['topicId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateGoogleClassroom from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "topicId": obj.get("topicId") + }) + return _obj + + diff --git a/flat_api/models/class_assignment_update_microsoft_graph.py b/flat_api/models/class_assignment_update_microsoft_graph.py new file mode 100644 index 0000000..3c1efc4 --- /dev/null +++ b/flat_api/models/class_assignment_update_microsoft_graph.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassAssignmentUpdateMicrosoftGraph(BaseModel): + """ + Microsoft Graph options for this assignment + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories this assignment belongs to") + __properties: ClassVar[List[str]] = ["categories"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateMicrosoftGraph from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateMicrosoftGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories") + }) + return _obj + + diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py new file mode 100644 index 0000000..48de75e --- /dev/null +++ b/flat_api/models/class_attachment_creation.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from typing import Optional, Set +from typing_extensions import Self + +class ClassAttachmentCreation(BaseModel): + """ + Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The type of the attachment posted: * `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. ") + score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. ") + worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=None, alias="sharingMode") + lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") + url: Optional[StrictStr] = Field(default=None, description="The URL of the attachment.") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") + __properties: ClassVar[List[str]] = ["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAttachmentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAttachmentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "score": obj.get("score"), + "worksheet": obj.get("worksheet"), + "sharingMode": obj.get("sharingMode"), + "lockScoreTemplate": obj.get("lockScoreTemplate"), + "url": obj.get("url"), + "googleDriveFileId": obj.get("googleDriveFileId") + }) + return _obj + + diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py new file mode 100644 index 0000000..289e7d0 --- /dev/null +++ b/flat_api/models/class_creation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.class_grade_level import ClassGradeLevel +from typing import Optional, Set +from typing_extensions import Self + +class ClassCreation(BaseModel): + """ + Creation of a classroom + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the new class") + section: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The section of the new class") + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "section": obj.get("section"), + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + return _obj + + diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py new file mode 100644 index 0000000..1535638 --- /dev/null +++ b/flat_api/models/class_details.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.class_details_canvas import ClassDetailsCanvas +from flat_api.models.class_details_clever import ClassDetailsClever +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues +from flat_api.models.class_details_lti import ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.models.class_grade_level import ClassGradeLevel +from flat_api.models.class_state import ClassState +from flat_api.models.group_details import GroupDetails +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetails(BaseModel): + """ + A classroom + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the class") + state: Optional[ClassState] = None + name: Optional[StrictStr] = Field(default=None, description="The name of the class") + section: Optional[StrictStr] = Field(default=None, description="The section of the class") + description: Optional[StrictStr] = Field(default=None, description="An optionnal description for this class") + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning this class") + owner: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User owning this class") + creation_date: Optional[datetime] = Field(default=None, description="The date when the class was create", alias="creationDate") + enrollment_code: Optional[StrictStr] = Field(default=None, description="[Teachers only] The enrollment code that can be used by the students to join the class ", alias="enrollmentCode") + theme: Optional[StrictStr] = Field(default=None, description="The theme identifier using in Flat User Interface") + assignments_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of assignments created in the class", alias="assignmentsCount") + students_group: Optional[GroupDetails] = Field(default=None, alias="studentsGroup") + teachers_group: Optional[GroupDetails] = Field(default=None, alias="teachersGroup") + issues: Optional[ClassDetailsIssues] = None + google_classroom: Optional[ClassDetailsGoogleClassroom] = Field(default=None, alias="googleClassroom") + google_drive: Optional[ClassDetailsGoogleDrive] = Field(default=None, alias="googleDrive") + microsoft_graph: Optional[ClassDetailsMicrosoftGraph] = Field(default=None, alias="microsoftGraph") + lti: Optional[ClassDetailsLti] = None + canvas: Optional[ClassDetailsCanvas] = None + mfc: Optional[ClassDetailsMfc] = None + clever: Optional[ClassDetailsClever] = None + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of students in the classroom") + __properties: ClassVar[List[str]] = ["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of students_group + if self.students_group: + _dict['studentsGroup'] = self.students_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of teachers_group + if self.teachers_group: + _dict['teachersGroup'] = self.teachers_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of issues + if self.issues: + _dict['issues'] = self.issues.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_drive + if self.google_drive: + _dict['googleDrive'] = self.google_drive.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + # override the default output from pydantic by calling `to_dict()` of canvas + if self.canvas: + _dict['canvas'] = self.canvas.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfc + if self.mfc: + _dict['mfc'] = self.mfc.to_dict() + # override the default output from pydantic by calling `to_dict()` of clever + if self.clever: + _dict['clever'] = self.clever.to_dict() + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "name": obj.get("name"), + "section": obj.get("section"), + "description": obj.get("description"), + "organization": obj.get("organization"), + "owner": obj.get("owner"), + "creationDate": obj.get("creationDate"), + "enrollmentCode": obj.get("enrollmentCode"), + "theme": obj.get("theme"), + "assignmentsCount": obj.get("assignmentsCount"), + "studentsGroup": GroupDetails.from_dict(obj["studentsGroup"]) if obj.get("studentsGroup") is not None else None, + "teachersGroup": GroupDetails.from_dict(obj["teachersGroup"]) if obj.get("teachersGroup") is not None else None, + "issues": ClassDetailsIssues.from_dict(obj["issues"]) if obj.get("issues") is not None else None, + "googleClassroom": ClassDetailsGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "googleDrive": ClassDetailsGoogleDrive.from_dict(obj["googleDrive"]) if obj.get("googleDrive") is not None else None, + "microsoftGraph": ClassDetailsMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "lti": ClassDetailsLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, + "canvas": ClassDetailsCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, + "mfc": ClassDetailsMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, + "clever": ClassDetailsClever.from_dict(obj["clever"]) if obj.get("clever") is not None else None, + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + return _obj + + diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py new file mode 100644 index 0000000..cd467e7 --- /dev/null +++ b/flat_api/models/class_details_canvas.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsCanvas(BaseModel): + """ + Meta information provided by Canvs LMS + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas") + domain: Optional[StrictStr] = Field(default=None, description="Canvas instance domain (e.g. \"canvas.instructure.com\")") + __properties: ClassVar[List[str]] = ["id", "domain"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsCanvas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsCanvas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py new file mode 100644 index 0000000..c6a3e5e --- /dev/null +++ b/flat_api/models/class_details_clever.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsClever(BaseModel): + """ + Clever.com section-related information + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Clever section unique identifier") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the section on clever", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The last modification date of the section on clever", alias="modificationDate") + subject: Optional[StrictStr] = Field(default=None, description="Normalized subject of the course") + term_name: Optional[StrictStr] = Field(default=None, description="Name of the term when this course happens", alias="termName") + term_start_date: Optional[datetime] = Field(default=None, description="Beginning date of the term", alias="termStartDate") + term_end_date: Optional[datetime] = Field(default=None, description="End date of the term", alias="termEndDate") + __properties: ClassVar[List[str]] = ["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate"] + + @field_validator('subject') + def subject_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['english/language arts', 'math', 'science', 'social studies', 'language', 'homeroom/advisory', 'interventions/online learning', 'technology and engineering', 'PE and health', 'arts and music', 'other']): + raise ValueError("must be one of enum values ('english/language arts', 'math', 'science', 'social studies', 'language', 'homeroom/advisory', 'interventions/online learning', 'technology and engineering', 'PE and health', 'arts and music', 'other')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsClever from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsClever from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "subject": obj.get("subject"), + "termName": obj.get("termName"), + "termStartDate": obj.get("termStartDate"), + "termEndDate": obj.get("termEndDate") + }) + return _obj + + diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py new file mode 100644 index 0000000..2a94e79 --- /dev/null +++ b/flat_api/models/class_details_google_classroom.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsGoogleClassroom(BaseModel): + """ + Google Classroom course-related information + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The course identifier on Google Classroom") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this course in the Classroom web UI", alias="alternateLink") + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleClassroom from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleClassroom from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + return _obj + + diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py new file mode 100644 index 0000000..1386bbd --- /dev/null +++ b/flat_api/models/class_details_google_drive.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsGoogleDrive(BaseModel): + """ + Google Drive course-related information provided by Google Classroom + """ # noqa: E501 + teacher_folder_id: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive directory identifier of the teachers' folder ", alias="teacherFolderId") + teacher_folder_alternate_link: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive URL of the teachers' folder ", alias="teacherFolderAlternateLink") + __properties: ClassVar[List[str]] = ["teacherFolderId", "teacherFolderAlternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleDrive from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleDrive from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "teacherFolderId": obj.get("teacherFolderId"), + "teacherFolderAlternateLink": obj.get("teacherFolderAlternateLink") + }) + return _obj + + diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py new file mode 100644 index 0000000..62695e1 --- /dev/null +++ b/flat_api/models/class_details_issues.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsIssues(BaseModel): + """ + Detected issues for this class + """ # noqa: E501 + sync: Optional[List[ClassDetailsIssuesSyncInner]] = Field(default=None, description="Synchronization issues for the class") + __properties: ClassVar[List[str]] = ["sync"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsIssues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sync (list) + _items = [] + if self.sync: + for _item in self.sync: + if _item: + _items.append(_item.to_dict()) + _dict['sync'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsIssues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sync": [ClassDetailsIssuesSyncInner.from_dict(_item) for _item in obj["sync"]] if obj.get("sync") is not None else None + }) + return _obj + + diff --git a/flat_api/models/class_details_issues_sync_inner.py b/flat_api/models/class_details_issues_sync_inner.py new file mode 100644 index 0000000..0c4d926 --- /dev/null +++ b/flat_api/models/class_details_issues_sync_inner.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsIssuesSyncInner(BaseModel): + """ + A sync issue + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The account user identifier") + email: Optional[StrictStr] = Field(default=None, description="The email address of the user concerned by this sync issue") + reason: Optional[StrictStr] = Field(default=None, description="The reason why the account cannot be synced") + __properties: ClassVar[List[str]] = ["id", "email", "reason"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['otherOrgnanization', 'personalSubscription']): + raise ValueError("must be one of enum values ('otherOrgnanization', 'personalSubscription')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsIssuesSyncInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsIssuesSyncInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "reason": obj.get("reason") + }) + return _obj + + diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py new file mode 100644 index 0000000..1c8c5d8 --- /dev/null +++ b/flat_api/models/class_details_lti.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsLti(BaseModel): + """ + Meta information provided by the LTI consumer + """ # noqa: E501 + context_id: Optional[StrictStr] = Field(default=None, description="Unique context identifier provided", alias="contextId") + context_title: Optional[StrictStr] = Field(default=None, description="Context title", alias="contextTitle") + context_label: Optional[StrictStr] = Field(default=None, description="Context label", alias="contextLabel") + __properties: ClassVar[List[str]] = ["contextId", "contextTitle", "contextLabel"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "contextId": obj.get("contextId"), + "contextTitle": obj.get("contextTitle"), + "contextLabel": obj.get("contextLabel") + }) + return _obj + + diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py new file mode 100644 index 0000000..fd3b72b --- /dev/null +++ b/flat_api/models/class_details_mfc.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsMfc(BaseModel): + """ + Meta information provided by Canvs LMS + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Classroom") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom class", alias="alternateLink") + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsMfc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsMfc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + return _obj + + diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py new file mode 100644 index 0000000..be2ffb0 --- /dev/null +++ b/flat_api/models/class_details_microsoft_graph.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClassDetailsMicrosoftGraph(BaseModel): + """ + ClassDetailsMicrosoftGraph + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The course identifier on Microsoft Graph") + __properties: ClassVar[List[str]] = ["id"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsMicrosoftGraph from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsMicrosoftGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/flat_api/models/class_grade_level.py b/flat_api/models/class_grade_level.py new file mode 100644 index 0000000..a16aeb3 --- /dev/null +++ b/flat_api/models/class_grade_level.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassGradeLevel(str, Enum): + """ + Class grade level + """ + + """ + allowed enum values + """ + ELEMENTARY = 'elementary' + MIDDLE = 'middle' + HIGH = 'high' + UNIVERSITY = 'university' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassGradeLevel from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py new file mode 100644 index 0000000..e4ce1c5 --- /dev/null +++ b/flat_api/models/class_roles.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassRoles(str, Enum): + """ + User's Class Role (for Edu users only) + """ + + """ + allowed enum values + """ + TEACHER = 'teacher' + STUDENT = 'student' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassRoles from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py new file mode 100644 index 0000000..3deb1c3 --- /dev/null +++ b/flat_api/models/class_state.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassState(str, Enum): + """ + The state of a classroom + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + INACTIVE = 'inactive' + ARCHIVED = 'archived' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py new file mode 100644 index 0000000..cd9074e --- /dev/null +++ b/flat_api/models/class_update.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.class_grade_level import ClassGradeLevel +from typing import Optional, Set +from typing_extensions import Self + +class ClassUpdate(BaseModel): + """ + Update of a classroom + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The name of the class") + section: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The section of the class") + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "section": obj.get("section"), + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + return _obj + + diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py new file mode 100644 index 0000000..4b0b8bf --- /dev/null +++ b/flat_api/models/collection.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.collection_app import CollectionApp +from flat_api.models.collection_capabilities import CollectionCapabilities +from flat_api.models.collection_privacy import CollectionPrivacy +from flat_api.models.collection_type import CollectionType +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_rights import ResourceRights +from flat_api.models.user_public_summary import UserPublicSummary +from typing import Optional, Set +from typing_extensions import Self + +class Collection(BaseModel): + """ + Collection of scores + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the collection") + title: Optional[StrictStr] = Field(default=None, description="The title of the collection") + html_url: Optional[StrictStr] = Field(default=None, description="The url where the collection can be viewed in a web browser", alias="htmlUrl") + type: Optional[CollectionType] = None + privacy: Optional[CollectionPrivacy] = None + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + app: Optional[CollectionApp] = None + creation_date: Optional[datetime] = Field(default=None, description="The date when the collection was created", alias="creationDate") + user: Optional[UserPublicSummary] = None + organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. ") + rights: Optional[ResourceRights] = None + collaborators: Optional[List[ResourceCollaborator]] = Field(default=None, description="The list of the collaborators of the collection") + capabilities: CollectionCapabilities + collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "organization", "rights", "collaborators", "capabilities", "collections"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Collection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of app + if self.app: + _dict['app'] = self.app.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of rights + if self.rights: + _dict['rights'] = self.rights.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) + _items = [] + if self.collaborators: + for _item in self.collaborators: + if _item: + _items.append(_item.to_dict()) + _dict['collaborators'] = _items + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Collection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "htmlUrl": obj.get("htmlUrl"), + "type": obj.get("type"), + "privacy": obj.get("privacy"), + "sharingKey": obj.get("sharingKey"), + "app": CollectionApp.from_dict(obj["app"]) if obj.get("app") is not None else None, + "creationDate": obj.get("creationDate"), + "user": UserPublicSummary.from_dict(obj["user"]) if obj.get("user") is not None else None, + "organization": obj.get("organization"), + "rights": ResourceRights.from_dict(obj["rights"]) if obj.get("rights") is not None else None, + "collaborators": [ResourceCollaborator.from_dict(_item) for _item in obj["collaborators"]] if obj.get("collaborators") is not None else None, + "capabilities": CollectionCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "collections": obj.get("collections") + }) + return _obj + + diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py new file mode 100644 index 0000000..0a63a77 --- /dev/null +++ b/flat_api/models/collection_app.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CollectionApp(BaseModel): + """ + For App collections, the details of the app that created the collection + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The app unique identifier") + name: Optional[StrictStr] = Field(default=None, description="The name of the app") + logo: Optional[StrictStr] = Field(default=None, description="The app logo url") + __properties: ClassVar[List[str]] = ["id", "name", "logo"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionApp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionApp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "logo": obj.get("logo") + }) + return _obj + + diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py new file mode 100644 index 0000000..0b4ab07 --- /dev/null +++ b/flat_api/models/collection_capabilities.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CollectionCapabilities(BaseModel): + """ + Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. + """ # noqa: E501 + can_edit: StrictBool = Field(description="Whether the current user can modify the metadata for the collection ", alias="canEdit") + can_share: StrictBool = Field(description="Whether the current user can modify the sharing settings for the collection ", alias="canShare") + can_delete: StrictBool = Field(description="Whether the current user can delete the collection ", alias="canDelete") + can_add_scores: StrictBool = Field(description="Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. ", alias="canAddScores") + can_delete_scores: StrictBool = Field(description="Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. ", alias="canDeleteScores") + __properties: ClassVar[List[str]] = ["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canShare": obj.get("canShare"), + "canDelete": obj.get("canDelete"), + "canAddScores": obj.get("canAddScores"), + "canDeleteScores": obj.get("canDeleteScores") + }) + return _obj + + diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py new file mode 100644 index 0000000..8e26784 --- /dev/null +++ b/flat_api/models/collection_creation.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from flat_api.models.collection_privacy import CollectionPrivacy +from typing import Optional, Set +from typing_extensions import Self + +class CollectionCreation(BaseModel): + """ + CollectionCreation + """ # noqa: E501 + title: Annotated[str, Field(min_length=1, strict=True, max_length=300)] = Field(description="The title of the collection") + privacy: CollectionPrivacy + __properties: ClassVar[List[str]] = ["title", "privacy"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") + }) + return _obj + + diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py new file mode 100644 index 0000000..7efb8b2 --- /dev/null +++ b/flat_api/models/collection_modification.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.collection_privacy import CollectionPrivacy +from typing import Optional, Set +from typing_extensions import Self + +class CollectionModification(BaseModel): + """ + Edit the collection metadata + """ # noqa: E501 + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field(default=None, description="The title of the collection") + privacy: Optional[CollectionPrivacy] = None + __properties: ClassVar[List[str]] = ["title", "privacy"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionModification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionModification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") + }) + return _obj + + diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py new file mode 100644 index 0000000..aaab6c0 --- /dev/null +++ b/flat_api/models/collection_privacy.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CollectionPrivacy(str, Enum): + """ + The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. + """ + + """ + allowed enum values + """ + PRIVATE = 'private' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CollectionPrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py new file mode 100644 index 0000000..9ac98b5 --- /dev/null +++ b/flat_api/models/collection_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CollectionType(str, Enum): + """ + Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. + """ + + """ + allowed enum values + """ + ROOT = 'root' + REGULAR = 'regular' + SHAREDWITHME = 'sharedWithMe' + SHAREDWITHGROUP = 'sharedWithGroup' + APP = 'app' + TRASH = 'trash' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CollectionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/edu_library.py b/flat_api/models/edu_library.py new file mode 100644 index 0000000..ef788b8 --- /dev/null +++ b/flat_api/models/edu_library.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EduLibrary(BaseModel): + """ + A Flat for Education Library + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") + name: Optional[StrictStr] = Field(default=None, description="Name of the lirbary") + type: Optional[StrictStr] = Field(default=None, description="Type of the library") + visibility: Optional[StrictStr] = Field(default=None, description="Visibility of the library") + __properties: ClassVar[List[str]] = ["id", "name", "type", "visibility"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['myResources', 'organizationResources', 'flatEduSamples']): + raise ValueError("must be one of enum values ('myResources', 'organizationResources', 'flatEduSamples')") + return value + + @field_validator('visibility') + def visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['private', 'organization', 'public']): + raise ValueError("must be one of enum values ('private', 'organization', 'public')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduLibrary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduLibrary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "visibility": obj.get("visibility") + }) + return _obj + + diff --git a/flat_api/models/edu_resource.py b/flat_api/models/edu_resource.py new file mode 100644 index 0000000..12f284c --- /dev/null +++ b/flat_api/models/edu_resource.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities +from flat_api.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.models.edu_resource_resource import EduResourceResource +from flat_api.models.edu_resource_type import EduResourceType +from typing import Optional, Set +from typing_extensions import Self + +class EduResource(BaseModel): + """ + A Flat for Education resource contained in a resources library + """ # noqa: E501 + id: StrictStr = Field(description="Resource unique identifier") + creator: Optional[StrictStr] = Field(default=None, description="The User identifier of the resource creator") + type: EduResourceType + privacy: Optional[EduResourcePrivacy] = None + tags: Optional[List[StrictStr]] = Field(default=None, description="Specific attributes for the resource (e.g. sample resources with custom design)") + parent: Optional[StrictStr] = Field(default=None, description="Identifier of the parent resource, e.g. a folder or root") + title: StrictStr = Field(description="Title of the resource") + creation_date: Optional[datetime] = Field(default=None, description="The date when the resource was created", alias="creationDate") + update_date: Optional[datetime] = Field(default=None, description="The date when the resource was updated", alias="updateDate") + resource: Optional[EduResourceResource] = None + capabilities: EduResourceCapabilities + __properties: ClassVar[List[str]] = ["id", "creator", "type", "privacy", "tags", "parent", "title", "creationDate", "updateDate", "resource", "capabilities"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creator": obj.get("creator"), + "type": obj.get("type"), + "privacy": obj.get("privacy"), + "tags": obj.get("tags"), + "parent": obj.get("parent"), + "title": obj.get("title"), + "creationDate": obj.get("creationDate"), + "updateDate": obj.get("updateDate"), + "resource": EduResourceResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "capabilities": EduResourceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None + }) + return _obj + + diff --git a/flat_api/models/edu_resource_capabilities.py b/flat_api/models/edu_resource_capabilities.py new file mode 100644 index 0000000..ef71ae3 --- /dev/null +++ b/flat_api/models/edu_resource_capabilities.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceCapabilities(BaseModel): + """ + Capabilities available for this resource + """ # noqa: E501 + can_edit: Optional[StrictBool] = Field(default=None, description="Whether the current user can modify this resource ", alias="canEdit") + can_add_resources: Optional[StrictBool] = Field(default=None, description="Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) ", alias="canAddResources") + can_add_folders: Optional[StrictBool] = Field(default=None, description="Whether the current user can add folders within this resource (e.g. `folder` inside `root`) ", alias="canAddFolders") + __properties: ClassVar[List[str]] = ["canEdit", "canAddResources", "canAddFolders"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canAddResources": obj.get("canAddResources"), + "canAddFolders": obj.get("canAddFolders") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_copy.py b/flat_api/models/edu_resource_copy.py new file mode 100644 index 0000000..a131af4 --- /dev/null +++ b/flat_api/models/edu_resource_copy.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceCopy(BaseModel): + """ + Copy an education resource + """ # noqa: E501 + destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. ") + __properties: ClassVar[List[str]] = ["destination"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCopy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCopy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination": obj.get("destination") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_creation.py b/flat_api/models/edu_resource_creation.py new file mode 100644 index 0000000..cc84fb4 --- /dev/null +++ b/flat_api/models/edu_resource_creation.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.edu_resource_type import EduResourceType +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceCreation(BaseModel): + """ + Creation of an education resource + """ # noqa: E501 + type: EduResourceType + title: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="Title of the resource") + parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`") + __properties: ClassVar[List[str]] = ["type", "title", "parent"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "parent": obj.get("parent") if obj.get("parent") is not None else 'root' + }) + return _obj + + diff --git a/flat_api/models/edu_resource_lti_link.py b/flat_api/models/edu_resource_lti_link.py new file mode 100644 index 0000000..ca0df97 --- /dev/null +++ b/flat_api/models/edu_resource_lti_link.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceLtiLink(BaseModel): + """ + LTI Link details for the class + """ # noqa: E501 + lti_url: StrictStr = Field(description="An URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") + __properties: ClassVar[List[str]] = ["ltiUrl"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceLtiLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceLtiLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ltiUrl": obj.get("ltiUrl") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_move.py b/flat_api/models/edu_resource_move.py new file mode 100644 index 0000000..3634928 --- /dev/null +++ b/flat_api/models/edu_resource_move.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceMove(BaseModel): + """ + Move an education resource + """ # noqa: E501 + destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. ") + __properties: ClassVar[List[str]] = ["destination"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceMove from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceMove from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination": obj.get("destination") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_privacy.py b/flat_api/models/edu_resource_privacy.py new file mode 100644 index 0000000..e6a3b96 --- /dev/null +++ b/flat_api/models/edu_resource_privacy.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EduResourcePrivacy(str, Enum): + """ + The Education resource privacy mode. + """ + + """ + allowed enum values + """ + PRIVATE = 'private' + ORGANIZATIONPUBLIC = 'organizationPublic' + PUBLIC = 'public' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EduResourcePrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/edu_resource_resource.py b/flat_api/models/edu_resource_resource.py new file mode 100644 index 0000000..fd02fee --- /dev/null +++ b/flat_api/models/edu_resource_resource.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_type import AssignmentType +from flat_api.models.media_attachment import MediaAttachment +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceResource(BaseModel): + """ + EduResourceResource + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCopyResponseCapabilities + title: StrictStr = Field(description="Title of the folder") + description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_type.py b/flat_api/models/edu_resource_type.py new file mode 100644 index 0000000..ad64940 --- /dev/null +++ b/flat_api/models/edu_resource_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EduResourceType(str, Enum): + """ + Type of an education resource + """ + + """ + allowed enum values + """ + ASSIGNMENT = 'assignment' + FOLDER = 'folder' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EduResourceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/edu_resource_update.py b/flat_api/models/edu_resource_update.py new file mode 100644 index 0000000..fee1b4d --- /dev/null +++ b/flat_api/models/edu_resource_update.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.edu_resource_privacy import EduResourcePrivacy +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceUpdate(BaseModel): + """ + Update of an education resource + """ # noqa: E501 + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the resource") + privacy: Optional[EduResourcePrivacy] = None + __properties: ClassVar[List[str]] = ["title", "privacy"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") + }) + return _obj + + diff --git a/flat_api/models/edu_resource_use_in_class.py b/flat_api/models/edu_resource_use_in_class.py new file mode 100644 index 0000000..dfb5cd1 --- /dev/null +++ b/flat_api/models/edu_resource_use_in_class.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EduResourceUseInClass(BaseModel): + """ + Use an education resource in class + """ # noqa: E501 + classroom: StrictStr = Field(description="The destination classroom where the resource will be copied.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + __properties: ClassVar[List[str]] = ["classroom", "assignment"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceUseInClass from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceUseInClass from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment") + }) + return _obj + + diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py new file mode 100644 index 0000000..9f1ef9c --- /dev/null +++ b/flat_api/models/flat_error_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FlatErrorResponse(BaseModel): + """ + An API Error response + """ # noqa: E501 + code: StrictStr = Field(description="A corresponding code for this error") + message: StrictStr = Field(description="A printable message for this error") + id: Optional[StrictStr] = Field(default=None, description="An unique error identifier generated for the request") + param: Optional[StrictStr] = Field(default=None, description="The related parameter that caused the error") + __properties: ClassVar[List[str]] = ["code", "message", "id", "param"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlatErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlatErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "id": obj.get("id"), + "param": obj.get("param") + }) + return _obj + + diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py new file mode 100644 index 0000000..8e4ce7e --- /dev/null +++ b/flat_api/models/flat_locales.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class FlatLocales(str, Enum): + """ + The user language + """ + + """ + allowed enum values + """ + EN = 'en' + EN_MINUS_GB = 'en-GB' + ES = 'es' + FR = 'fr' + DE = 'de' + IT = 'it' + JA = 'ja' + JA_MINUS_HIRA = 'ja-HIRA' + KO = 'ko' + NL = 'nl' + PL = 'pl' + PT = 'pt' + PT_MINUS_BR = 'pt-BR' + RO = 'ro' + RU = 'ru' + SV = 'sv' + TR = 'tr' + ZH_MINUS_HANS = 'zh-Hans' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FlatLocales from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py new file mode 100644 index 0000000..208777a --- /dev/null +++ b/flat_api/models/google_classroom_coursework.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GoogleClassroomCoursework(BaseModel): + """ + A coursework on Google Classroom + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the coursework assigned by Classroom") + state: Optional[StrictStr] = Field(default=None, description="State of the coursework") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") + topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "topicId"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GoogleClassroomCoursework from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if topic_id (nullable) is None + # and model_fields_set contains the field + if self.topic_id is None and "topic_id" in self.model_fields_set: + _dict['topicId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GoogleClassroomCoursework from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink"), + "topicId": obj.get("topicId") + }) + return _obj + + diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py new file mode 100644 index 0000000..66b6c49 --- /dev/null +++ b/flat_api/models/google_classroom_submission.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GoogleClassroomSubmission(BaseModel): + """ + A coursework submission on Google Classroom + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the coursework submission assigned by Classroom") + state: StrictStr = Field(description="State of the submission on Google Classroom") + alternate_link: StrictStr = Field(description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GoogleClassroomSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GoogleClassroomSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink") + }) + return _obj + + diff --git a/flat_api/models/group.py b/flat_api/models/group.py new file mode 100644 index 0000000..9ec1aab --- /dev/null +++ b/flat_api/models/group.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Group(BaseModel): + """ + A group of users + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group") + name: Optional[StrictStr] = Field(default=None, description="The display name of the group") + type: Optional[StrictStr] = Field(default=None, description="The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class ") + users_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of users in this group", alias="usersCount") + read_only: Optional[StrictBool] = Field(default=None, description="`True` if the group is set in read-only ", alias="readOnly") + organization: Optional[StrictStr] = Field(default=None, description="If the group is related to an organization, this field will contain the unique identifier of the organization ") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the group", alias="creationDate") + __properties: ClassVar[List[str]] = ["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['generic', 'classTeachers', 'classStudents']): + raise ValueError("must be one of enum values ('generic', 'classTeachers', 'classStudents')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Group from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Group from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "usersCount": obj.get("usersCount"), + "readOnly": obj.get("readOnly"), + "organization": obj.get("organization"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py new file mode 100644 index 0000000..b4ab092 --- /dev/null +++ b/flat_api/models/group_details.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.group_type import GroupType +from typing import Optional, Set +from typing_extensions import Self + +class GroupDetails(BaseModel): + """ + The details of a group + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group") + name: Optional[StrictStr] = Field(default=None, description="The displayable name of the group") + type: Optional[GroupType] = None + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning the group") + creation_date: Optional[datetime] = Field(default=None, description="The date when the group was create", alias="creationDate") + users_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of students in this group", alias="usersCount") + read_only: Optional[StrictBool] = Field(default=None, description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") + __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "organization": obj.get("organization"), + "creationDate": obj.get("creationDate"), + "usersCount": obj.get("usersCount"), + "readOnly": obj.get("readOnly") + }) + return _obj + + diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py new file mode 100644 index 0000000..14673fc --- /dev/null +++ b/flat_api/models/group_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class GroupType(str, Enum): + """ + The type of the group + """ + + """ + allowed enum values + """ + GENERIC = 'generic' + CLASSTEACHERS = 'classTeachers' + CLASSSTUDENTS = 'classStudents' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GroupType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py new file mode 100644 index 0000000..b40035a --- /dev/null +++ b/flat_api/models/license_mode.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LicenseMode(str, Enum): + """ + Mode of the license + """ + + """ + allowed enum values + """ + CREDIT = 'credit' + SITE = 'site' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LicenseMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py new file mode 100644 index 0000000..a7622a3 --- /dev/null +++ b/flat_api/models/license_sources.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LicenseSources(str, Enum): + """ + Source of the license + """ + + """ + allowed enum values + """ + ORDER = 'order' + TRIAL = 'trial' + VOUCHER = 'voucher' + DISTRIBUTOR = 'distributor' + SUBSCRIPTION = 'subscription' + APPSTORE = 'appStore' + PLAYSTORE = 'playStore' + MUSICFIRST = 'musicfirst' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LicenseSources from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py new file mode 100644 index 0000000..05c5964 --- /dev/null +++ b/flat_api/models/lms_name.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LmsName(str, Enum): + """ + LMS name + """ + + """ + allowed enum values + """ + CANVAS = 'canvas' + MOODLE = 'moodle' + SCHOOLOGY = 'schoology' + BLACKBOARD = 'blackboard' + DESIRE2LEARN = 'desire2learn' + SAKAI = 'sakai' + SCHOOLBOX = 'schoolbox' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LmsName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py new file mode 100644 index 0000000..ccc7666 --- /dev/null +++ b/flat_api/models/lti_credentials.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lms_name import LmsName +from typing import Optional, Set +from typing_extensions import Self + +class LtiCredentials(BaseModel): + """ + A couple of LTI 1.x OAuth credentials + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this couple of credentials") + name: Optional[StrictStr] = Field(default=None, description="Name of the couple of credentials") + lms: Optional[LmsName] = None + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization associated to these credentials") + creator: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user who created these credentials") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of thse credentials", alias="creationDate") + last_usage: Optional[datetime] = Field(default=None, description="The last time these credentials were used", alias="lastUsage") + consumer_key: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Key", alias="consumerKey") + consumer_secret: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Secret", alias="consumerSecret") + __properties: ClassVar[List[str]] = ["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "lms": obj.get("lms"), + "organization": obj.get("organization"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "lastUsage": obj.get("lastUsage"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret") + }) + return _obj + + diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py new file mode 100644 index 0000000..ccf8c9f --- /dev/null +++ b/flat_api/models/lti_credentials_creation.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from flat_api.models.lms_name import LmsName +from typing import Optional, Set +from typing_extensions import Self + +class LtiCredentialsCreation(BaseModel): + """ + Creation of a couple of LTI 1.x OAuth credentials + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the couple of credentials") + lms: LmsName + __properties: ClassVar[List[str]] = ["name", "lms"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiCredentialsCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiCredentialsCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "lms": obj.get("lms") + }) + return _obj + + diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py new file mode 100644 index 0000000..147504d --- /dev/null +++ b/flat_api/models/media_attachment.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode +from typing import Optional, Set +from typing_extensions import Self + +class MediaAttachment(BaseModel): + """ + Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object + """ # noqa: E501 + type: StrictStr = Field(description="The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") + score: Optional[StrictStr] = Field(default=None, description="An unique Flat score identifier") + revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + dedicated: Optional[StrictBool] = Field(default=None, description="True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment") + track: Optional[StrictStr] = Field(default=None, description="A unique track identifier") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=None, alias="sharingMode") + lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") + title: Optional[StrictStr] = Field(default=None, description="The resolved title of the attachment") + description: Optional[StrictStr] = Field(default=None, description="The resolved description of the attachment") + html: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich` or `video`, the HTML code of the media to display ") + html_width: Optional[StrictStr] = Field(default=None, description="If the `html` is available, the width of the widget", alias="htmlWidth") + html_height: Optional[StrictStr] = Field(default=None, description="If the `html` is available, the height of the widget", alias="htmlHeight") + url: Optional[StrictStr] = Field(default=None, description="The url of the attachment") + thumbnail_url: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment ", alias="thumbnailUrl") + thumbnail_width: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailWidth") + thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailHeight") + author_name: Optional[StrictStr] = Field(default=None, description="The resolved author name of the attachment", alias="authorName") + author_url: Optional[StrictStr] = Field(default=None, description="The resolved author url of the attachment", alias="authorUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the icon", alias="iconUrl") + mime_type: Optional[StrictStr] = Field(default=None, description="The mine type of the file", alias="mimeType") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") + __properties: ClassVar[List[str]] = ["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaAttachment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "score": obj.get("score"), + "revision": obj.get("revision"), + "worksheet": obj.get("worksheet"), + "dedicated": obj.get("dedicated"), + "track": obj.get("track"), + "sharingMode": obj.get("sharingMode"), + "lockScoreTemplate": obj.get("lockScoreTemplate"), + "title": obj.get("title"), + "description": obj.get("description"), + "html": obj.get("html"), + "htmlWidth": obj.get("htmlWidth"), + "htmlHeight": obj.get("htmlHeight"), + "url": obj.get("url"), + "thumbnailUrl": obj.get("thumbnailUrl"), + "thumbnailWidth": obj.get("thumbnailWidth"), + "thumbnailHeight": obj.get("thumbnailHeight"), + "authorName": obj.get("authorName"), + "authorUrl": obj.get("authorUrl"), + "iconUrl": obj.get("iconUrl"), + "mimeType": obj.get("mimeType"), + "googleDriveFileId": obj.get("googleDriveFileId") + }) + return _obj + + diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py new file mode 100644 index 0000000..543a9c3 --- /dev/null +++ b/flat_api/models/media_score_sharing_mode.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class MediaScoreSharingMode(str, Enum): + """ + The sharing mode of the score for classes post and assignments + """ + + """ + allowed enum values + """ + READ = 'read' + WRITE = 'write' + COPY = 'copy' + PERFORMANCE = 'performance' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MediaScoreSharingMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py new file mode 100644 index 0000000..06fb106 --- /dev/null +++ b/flat_api/models/microsoft_graph_assignment.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MicrosoftGraphAssignment(BaseModel): + """ + A Microsoft Teams asignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the assignement assigned by Microsoft Teams") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this assignement in the Microsoft Teams web UI", alias="alternateLink") + categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories where this assignment is published under") + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "categories"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MicrosoftGraphAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MicrosoftGraphAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink"), + "categories": obj.get("categories") + }) + return _obj + + diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py new file mode 100644 index 0000000..789dd09 --- /dev/null +++ b/flat_api/models/microsoft_graph_submission.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MicrosoftGraphSubmission(BaseModel): + """ + A Microsoft Teams submission + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the submission assigned by Microsoft Teams") + state: StrictStr = Field(description="State of the submission") + __properties: ClassVar[List[str]] = ["id", "state"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MicrosoftGraphSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MicrosoftGraphSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state") + }) + return _obj + + diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py new file mode 100644 index 0000000..f2a3812 --- /dev/null +++ b/flat_api/models/organization_invitation.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.organization_roles import OrganizationRoles +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationInvitation(BaseModel): + """ + Details of an invitation to join an organization + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The invitation unique identifier") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the invitation", alias="creationDate") + organization: StrictStr = Field(description="The unique identifier of the Organization owning this class") + organization_role: OrganizationRoles = Field(alias="organizationRole") + custom_code: Optional[StrictStr] = Field(description="Enrollment code to use when joining this organization", alias="customCode") + email: Optional[StrictStr] = Field(default=None, description="The email address this invitation was sent to") + invited_by: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User who created this invitation", alias="invitedBy") + allow_multiple_use: StrictBool = Field(description="If true, the invitation can be used multiple times. If false, the invitation can only be used once. ", alias="allowMultipleUse") + used_by: Optional[List[StrictStr]] = Field(default=None, description="List of users who used this invitation", alias="usedBy") + __properties: ClassVar[List[str]] = ["id", "creationDate", "organization", "organizationRole", "customCode", "email", "invitedBy", "allowMultipleUse", "usedBy"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationInvitation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if custom_code (nullable) is None + # and model_fields_set contains the field + if self.custom_code is None and "custom_code" in self.model_fields_set: + _dict['customCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationInvitation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "customCode": obj.get("customCode"), + "email": obj.get("email"), + "invitedBy": obj.get("invitedBy"), + "allowMultipleUse": obj.get("allowMultipleUse"), + "usedBy": obj.get("usedBy") + }) + return _obj + + diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py new file mode 100644 index 0000000..db09d76 --- /dev/null +++ b/flat_api/models/organization_invitation_creation.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationInvitationCreation(BaseModel): + """ + The parameters to create an organization invitation + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="The email address you want to send the invitation to") + organization_role: Optional[StrictStr] = Field(default='teacher', description="User's Organization Role", alias="organizationRole") + __properties: ClassVar[List[str]] = ["email", "organizationRole"] + + @field_validator('organization_role') + def organization_role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['admin', 'teacher']): + raise ValueError("must be one of enum values ('admin', 'teacher')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationInvitationCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationInvitationCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "organizationRole": obj.get("organizationRole") if obj.get("organizationRole") is not None else 'teacher' + }) + return _obj + + diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py new file mode 100644 index 0000000..6b6ed95 --- /dev/null +++ b/flat_api/models/organization_roles.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OrganizationRoles(str, Enum): + """ + User's Organization Role (for Edu users only) + """ + + """ + allowed enum values + """ + ADMIN = 'admin' + BILLING = 'billing' + TEACHER = 'teacher' + USER = 'user' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OrganizationRoles from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py new file mode 100644 index 0000000..91c6cdb --- /dev/null +++ b/flat_api/models/organization_user_access_token_creation.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List +from flat_api.models.app_scopes import AppScopes +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationUserAccessTokenCreation(BaseModel): + """ + Creation of a delegated API access token for an organization user + """ # noqa: E501 + scopes: List[AppScopes] = Field(description="List of requested scopes for this credential") + __properties: ClassVar[List[str]] = ["scopes"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationUserAccessTokenCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationUserAccessTokenCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scopes": obj.get("scopes") + }) + return _obj + + diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py new file mode 100644 index 0000000..2ac6008 --- /dev/null +++ b/flat_api/models/resource_collaborator.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.group import Group +from flat_api.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self + +class ResourceCollaborator(BaseModel): + """ + ResourceCollaborator + """ # noqa: E501 + acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") + acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") + acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") + is_collaborator: StrictBool = Field(description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the permission") + var_date: Optional[datetime] = Field(default=None, description="The date when the permission was added", alias="date") + score: Optional[StrictStr] = Field(default=None, description="If this object is a permission of a score, this property will contain the unique identifier of the score") + collection: Optional[StrictStr] = Field(default=None, description="If this object is a permission of a collection, this property will contain the unique identifier of the collection") + user: Optional[UserPublic] = None + group: Optional[Group] = None + user_email: Optional[StrictStr] = Field(default=None, description="If the collaborator is not a user of Flat yet, this field will contain their email. ", alias="userEmail") + invited: Optional[StrictBool] = Field(default=None, description="If this property is `true`, this is still a pending invitation ") + __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType", "id", "date", "score", "collection", "user", "group", "userEmail", "invited"] + + @field_validator('collaborator_type') + def collaborator_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['owner', 'user', 'group']): + raise ValueError("must be one of enum values ('owner', 'user', 'group')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCollaborator from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of group + if self.group: + _dict['group'] = self.group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCollaborator from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else False, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False, + "isCollaborator": obj.get("isCollaborator") if obj.get("isCollaborator") is not None else False, + "collaboratorType": obj.get("collaboratorType"), + "id": obj.get("id"), + "date": obj.get("date"), + "score": obj.get("score"), + "collection": obj.get("collection"), + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, + "userEmail": obj.get("userEmail"), + "invited": obj.get("invited") + }) + return _obj + + diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py new file mode 100644 index 0000000..f8a5af1 --- /dev/null +++ b/flat_api/models/resource_collaborator_creation.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResourceCollaboratorCreation(BaseModel): + """ + Add a collaborator to a resource. + """ # noqa: E501 + user: Optional[StrictStr] = Field(default=None, description="The unique identifier of a Flat user") + group: Optional[StrictStr] = Field(default=None, description="The unique identifier of a Flat group") + user_email: Optional[StrictStr] = Field(default=None, description="Fill this field to invite an individual user by email. ", alias="userEmail") + user_token: Optional[StrictStr] = Field(default=None, description="Token received in an invitation to join the score. ", alias="userToken") + acl_read: Optional[StrictBool] = Field(default=True, description="`True` if the related user can read the score. (probably true if the user has a permission on the document). ", alias="aclRead") + acl_write: Optional[StrictBool] = Field(default=False, description="`True` if the related user can modify the score. ", alias="aclWrite") + acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") + __properties: ClassVar[List[str]] = ["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCollaboratorCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCollaboratorCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user"), + "group": obj.get("group"), + "userEmail": obj.get("userEmail"), + "userToken": obj.get("userToken"), + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else True, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False + }) + return _obj + + diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py new file mode 100644 index 0000000..e25a256 --- /dev/null +++ b/flat_api/models/resource_rights.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRights(BaseModel): + """ + The rights of the current user on a score or collection + """ # noqa: E501 + acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") + acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") + acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") + is_collaborator: StrictBool = Field(description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") + __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType"] + + @field_validator('collaborator_type') + def collaborator_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['owner', 'user', 'group']): + raise ValueError("must be one of enum values ('owner', 'user', 'group')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRights from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRights from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else False, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False, + "isCollaborator": obj.get("isCollaborator") if obj.get("isCollaborator") is not None else False, + "collaboratorType": obj.get("collaboratorType") + }) + return _obj + + diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py new file mode 100644 index 0000000..a298c99 --- /dev/null +++ b/flat_api/models/score_comment.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_comment_context import ScoreCommentContext +from flat_api.models.score_comment_moderation import ScoreCommentModeration +from typing import Optional, Set +from typing_extensions import Self + +class ScoreComment(BaseModel): + """ + Comment added on a sheet music + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The comment unique identifier") + type: Optional[StrictStr] = Field(default=None, description="The type of the comment") + user: Optional[StrictStr] = Field(default=None, description="The author unique identifier") + score: Optional[StrictStr] = Field(default=None, description="The unique identifier of the score where the comment was posted") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of revision the comment was posted") + reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") + var_date: Optional[datetime] = Field(default=None, description="The date when the comment was posted", alias="date") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") + comment: Optional[StrictStr] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") + context: Optional[ScoreCommentContext] = None + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifier mentioned on the score") + resolved: Optional[StrictBool] = Field(default=None, description="For inline comments, the comment can be marked as resolved and will be hidden in the future responses ") + resolved_by: Optional[StrictStr] = Field(default=None, description="If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") + moderation: Optional[ScoreCommentModeration] = None + spam: Optional[StrictBool] = Field(default=None, description="`true if the message has been detected as spam and hidden from other users ") + __properties: ClassVar[List[str]] = ["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['document', 'inline']): + raise ValueError("must be one of enum values ('document', 'inline')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreComment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + # override the default output from pydantic by calling `to_dict()` of moderation + if self.moderation: + _dict['moderation'] = self.moderation.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreComment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "user": obj.get("user"), + "score": obj.get("score"), + "revision": obj.get("revision"), + "replyTo": obj.get("replyTo"), + "date": obj.get("date"), + "modificationDate": obj.get("modificationDate"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None, + "mentions": obj.get("mentions"), + "resolved": obj.get("resolved"), + "resolvedBy": obj.get("resolvedBy"), + "moderation": ScoreCommentModeration.from_dict(obj["moderation"]) if obj.get("moderation") is not None else None, + "spam": obj.get("spam") + }) + return _obj + + diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py new file mode 100644 index 0000000..a8185d9 --- /dev/null +++ b/flat_api/models/score_comment_context.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCommentContext(BaseModel): + """ + The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + """ # noqa: E501 + part_uuid: StrictStr = Field(description="The unique identifier (UUID) of the score part", alias="partUuid") + staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identififer of the staff", alias="staffIdx") + staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identififer (UUID) of the staff", alias="staffUuid") + measure_uuids: List[StrictStr] = Field(description="The list of measure UUIds", alias="measureUuids") + start_time_pos: Union[StrictFloat, StrictInt] = Field(alias="startTimePos") + stop_time_pos: Union[StrictFloat, StrictInt] = Field(alias="stopTimePos") + start_dpq: Union[StrictFloat, StrictInt] = Field(alias="startDpq") + stop_dpq: Union[StrictFloat, StrictInt] = Field(alias="stopDpq") + __properties: ClassVar[List[str]] = ["partUuid", "staffIdx", "staffUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentContext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "partUuid": obj.get("partUuid"), + "staffIdx": obj.get("staffIdx"), + "staffUuid": obj.get("staffUuid"), + "measureUuids": obj.get("measureUuids"), + "startTimePos": obj.get("startTimePos"), + "stopTimePos": obj.get("stopTimePos"), + "startDpq": obj.get("startDpq"), + "stopDpq": obj.get("stopDpq") + }) + return _obj + + diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py new file mode 100644 index 0000000..5b2c980 --- /dev/null +++ b/flat_api/models/score_comment_creation.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_comment_context import ScoreCommentContext +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCommentCreation(BaseModel): + """ + Creation of a comment + """ # noqa: E501 + revision: Optional[StrictStr] = Field(default=None, description="The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") + reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") + context: Optional[ScoreCommentContext] = None + __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "mentions", "replyTo", "context"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "revision": obj.get("revision"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "mentions": obj.get("mentions"), + "replyTo": obj.get("replyTo"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py new file mode 100644 index 0000000..ced5e95 --- /dev/null +++ b/flat_api/models/score_comment_moderation.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCommentModeration(BaseModel): + """ + Information about the comment being moderated + """ # noqa: E501 + hidden: Optional[StrictBool] = Field(default=None, description="If true, this comment will be hidden from other users") + reason: Optional[StrictStr] = Field(default=None, description="If the comment is hidden, the reason why this one has been moderated") + __properties: ClassVar[List[str]] = ["hidden", "reason"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['spam', 'inappropriate']): + raise ValueError("must be one of enum values ('spam', 'inappropriate')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentModeration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentModeration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hidden": obj.get("hidden"), + "reason": obj.get("reason") + }) + return _obj + + diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py new file mode 100644 index 0000000..ef245d0 --- /dev/null +++ b/flat_api/models/score_comment_update.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.score_comment_context import ScoreCommentContext +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCommentUpdate(BaseModel): + """ + Update of a comment + """ # noqa: E501 + revision: Optional[StrictStr] = Field(default=None, description="The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") + context: Optional[ScoreCommentContext] = None + __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "context"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "revision": obj.get("revision"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py new file mode 100644 index 0000000..e468184 --- /dev/null +++ b/flat_api/models/score_comments_counts.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCommentsCounts(BaseModel): + """ + A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the score") + unique: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The unique (1/user) number of comments added to the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly unique number of comments added to the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly unique number of comments added to the score") + __properties: ClassVar[List[str]] = ["total", "unique", "weekly", "monthly"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentsCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentsCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "unique": obj.get("unique"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly") + }) + return _obj + + diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py new file mode 100644 index 0000000..9d3716b --- /dev/null +++ b/flat_api/models/score_creation.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.score_source import ScoreSource +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCreation(BaseModel): + """ + ScoreCreation + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = None + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + builder_data: Optional[ScoreCreationBuilderData] = Field(default=None, alias="builderData") + filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") + data: Optional[StrictStr] = Field(default=None, description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") + data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") + source: Optional[ScoreSource] = None + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source"] + + @field_validator('data_encoding') + def data_encoding_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['base64']): + raise ValueError("must be one of enum values ('base64')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of builder_data + if self.builder_data: + _dict['builderData'] = self.builder_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy"), + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "builderData": ScoreCreationBuilderData.from_dict(obj["builderData"]) if obj.get("builderData") is not None else None, + "filename": obj.get("filename"), + "data": obj.get("data"), + "dataEncoding": obj.get("dataEncoding"), + "source": ScoreSource.from_dict(obj["source"]) if obj.get("source") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py new file mode 100644 index 0000000..51f3dcc --- /dev/null +++ b/flat_api/models/score_creation_builder_data.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCreationBuilderData(BaseModel): + """ + ScoreCreationBuilderData + """ # noqa: E501 + score_data: ScoreCreationBuilderDataScoreData = Field(alias="scoreData") + layout_data: Optional[ScoreCreationBuilderDataLayoutData] = Field(default=None, alias="layoutData") + __properties: ClassVar[List[str]] = ["scoreData", "layoutData"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of score_data + if self.score_data: + _dict['scoreData'] = self.score_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of layout_data + if self.layout_data: + _dict['layoutData'] = self.layout_data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scoreData": ScoreCreationBuilderDataScoreData.from_dict(obj["scoreData"]) if obj.get("scoreData") is not None else None, + "layoutData": ScoreCreationBuilderDataLayoutData.from_dict(obj["layoutData"]) if obj.get("layoutData") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_layout_data.py new file mode 100644 index 0000000..a69f749 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_layout_data.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCreationBuilderDataLayoutData(BaseModel): + """ + Control the appearance of the score. If missing, default values are used. + """ # noqa: E501 + notes_spacing_coeff: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="A float value >= 1 that controls the spacing between notes.", alias="notesSpacingCoeff") + length_unit: Optional[StrictStr] = Field(default='cm', description="The unit to use for layout customizations", alias="lengthUnit") + page_height: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The height of the page in chosen unit (`lengthUnit`).", alias="pageHeight") + page_width: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The width of the page in chosen unit (`lengthUnit`).", alias="pageWidth") + page_margin_top: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The top margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginTop") + page_margin_bottom: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The bottom margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginBottom") + page_margin_left: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The left margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginLeft") + page_margin_right: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The right margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginRight") + __properties: ClassVar[List[str]] = ["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight"] + + @field_validator('length_unit') + def length_unit_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['cm', 'inch']): + raise ValueError("must be one of enum values ('cm', 'inch')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataLayoutData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataLayoutData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notesSpacingCoeff": obj.get("notesSpacingCoeff"), + "lengthUnit": obj.get("lengthUnit") if obj.get("lengthUnit") is not None else 'cm', + "pageHeight": obj.get("pageHeight"), + "pageWidth": obj.get("pageWidth"), + "pageMarginTop": obj.get("pageMarginTop"), + "pageMarginBottom": obj.get("pageMarginBottom"), + "pageMarginLeft": obj.get("pageMarginLeft"), + "pageMarginRight": obj.get("pageMarginRight") + }) + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_score_data.py new file mode 100644 index 0000000..94423f3 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_score_data.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCreationBuilderDataScoreData(BaseModel): + """ + ScoreCreationBuilderDataScoreData + """ # noqa: E501 + use_tab_staff: Optional[StrictBool] = Field(default=None, description="true if the TAB staff is displayed with fretted instruments", alias="useTabStaff") + use_chord_grid: Optional[StrictBool] = Field(default=None, description="true if the chord grid must be displayed with fretted instruments", alias="useChordGrid") + fifths: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.") + nb_beats: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of beats in the measure", alias="nbBeats") + beat_type: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The duration of a beat in the measure", alias="beatType") + instruments: List[ScoreCreationBuilderDataScoreDataInstrumentsInner] = Field(description="The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. ") + __properties: ClassVar[List[str]] = ["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataScoreData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item in self.instruments: + if _item: + _items.append(_item.to_dict()) + _dict['instruments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataScoreData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "useTabStaff": obj.get("useTabStaff"), + "useChordGrid": obj.get("useChordGrid"), + "fifths": obj.get("fifths"), + "nbBeats": obj.get("nbBeats"), + "beatType": obj.get("beatType"), + "instruments": [ScoreCreationBuilderDataScoreDataInstrumentsInner.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_score_data_instruments_inner.py b/flat_api/models/score_creation_builder_data_score_data_instruments_inner.py new file mode 100644 index 0000000..7ea8959 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_score_data_instruments_inner.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScoreCreationBuilderDataScoreDataInstrumentsInner(BaseModel): + """ + ScoreCreationBuilderDataScoreDataInstrumentsInner + """ # noqa: E501 + group: StrictStr = Field(description="The of the instrument group (e.g. `keyboards`, `brass`)") + instrument: StrictStr = Field(description="The identifier of the instrument (e.g. `piano`, `trumpet`)") + long_name: Optional[StrictStr] = Field(default=None, description="The full name of the instrument", alias="longName") + short_name: Optional[StrictStr] = Field(default=None, description="The abbreviation of the name of the instrument", alias="shortName") + has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tone (prevent the part to have a TAB/chord grid)", alias="hasQuarterTone") + __properties: ClassVar[List[str]] = ["group", "instrument", "longName", "shortName", "hasQuarterTone"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group": obj.get("group"), + "instrument": obj.get("instrument"), + "longName": obj.get("longName"), + "shortName": obj.get("shortName"), + "hasQuarterTone": obj.get("hasQuarterTone") + }) + return _obj + + diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py new file mode 100644 index 0000000..f512b5a --- /dev/null +++ b/flat_api/models/score_creation_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreCreationType(str, Enum): + """ + The type of creation (an orginal, an arrangement) + """ + + """ + allowed enum values + """ + ORIGINAL = 'original' + ARRANGEMENT = 'arrangement' + OTHER = 'other' + NULL = 'null' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreCreationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py new file mode 100644 index 0000000..97e7882 --- /dev/null +++ b/flat_api/models/score_details.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.models.resource_collaborator import ResourceCollaborator +from flat_api.models.resource_rights import ResourceRights +from flat_api.models.score_comments_counts import ScoreCommentsCounts +from flat_api.models.score_creation_type import ScoreCreationType +from flat_api.models.score_license import ScoreLicense +from flat_api.models.score_likes_counts import ScoreLikesCounts +from flat_api.models.score_plays_counts import ScorePlaysCounts +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.score_views_counts import ScoreViewsCounts +from flat_api.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self + +class ScoreDetails(BaseModel): + """ + ScoreDetails + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score") + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the score (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + title: StrictStr = Field(description="The title of the score") + privacy: ScorePrivacy + user: UserPublic + html_url: StrictStr = Field(description="The url where the score can be viewed in a web browser", alias="htmlUrl") + subtitle: Optional[StrictStr] = Field(default=None, description="Subtitle of the score") + lyricist: Optional[StrictStr] = Field(default=None, description="Lyricist of the score") + arranger: Optional[StrictStr] = Field(default=None, description="Arranger of the score") + composer: Optional[StrictStr] = Field(default=None, description="Composer of the score") + description: Optional[StrictStr] = Field(default=None, description="Description of the creation") + tags: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Tags describing the score") + creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") + license: Optional[ScoreLicense] = None + license_text: Optional[StrictStr] = Field(default=None, description="Additional license text written on the exported/printed score", alias="licenseText") + duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximative duration of the score", alias="durationTime") + number_measures: Optional[StrictInt] = Field(default=None, description="The number of measures in the score", alias="numberMeasures") + main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main tempo of the score (in QPM)", alias="mainTempoQpm") + main_key_signature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main key signature of the score (expressed between -7 and 7).", alias="mainKeySignature") + rights: Optional[ResourceRights] = None + collaborators: Optional[List[ResourceCollaborator]] = Field(default=None, description="The list of the collaborators of the score") + creation_date: Optional[datetime] = Field(default=None, description="The date when the score was created", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last revision of the score", alias="modificationDate") + publication_date: Optional[datetime] = Field(default=None, description="The date when the score was published on Flat", alias="publicationDate") + highlighted_date: Optional[datetime] = Field(default=None, description="The date when the score was highlighted (featured) on our community", alias="highlightedDate") + organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. ") + parent_score: Optional[StrictStr] = Field(default=None, description="If the score has been forked, the unique identifier of the parent score. ", alias="parentScore") + instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") + samples: Optional[List[StrictStr]] = Field(default=None, description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` ", alias="googleDriveFileId") + likes: Optional[ScoreLikesCounts] = None + comments: Optional[ScoreCommentsCounts] = None + views: Optional[ScoreViewsCounts] = None + plays: Optional[ScorePlaysCounts] = None + collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "highlightedDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of rights + if self.rights: + _dict['rights'] = self.rights.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) + _items = [] + if self.collaborators: + for _item in self.collaborators: + if _item: + _items.append(_item.to_dict()) + _dict['collaborators'] = _items + # override the default output from pydantic by calling `to_dict()` of likes + if self.likes: + _dict['likes'] = self.likes.to_dict() + # override the default output from pydantic by calling `to_dict()` of comments + if self.comments: + _dict['comments'] = self.comments.to_dict() + # override the default output from pydantic by calling `to_dict()` of views + if self.views: + _dict['views'] = self.views.to_dict() + # override the default output from pydantic by calling `to_dict()` of plays + if self.plays: + _dict['plays'] = self.plays.to_dict() + # set to None if creation_type (nullable) is None + # and model_fields_set contains the field + if self.creation_type is None and "creation_type" in self.model_fields_set: + _dict['creationType'] = None + + # set to None if license (nullable) is None + # and model_fields_set contains the field + if self.license is None and "license" in self.model_fields_set: + _dict['license'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sharingKey": obj.get("sharingKey"), + "title": obj.get("title"), + "privacy": obj.get("privacy"), + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "htmlUrl": obj.get("htmlUrl"), + "subtitle": obj.get("subtitle"), + "lyricist": obj.get("lyricist"), + "arranger": obj.get("arranger"), + "composer": obj.get("composer"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "creationType": obj.get("creationType"), + "license": obj.get("license"), + "licenseText": obj.get("licenseText"), + "durationTime": obj.get("durationTime"), + "numberMeasures": obj.get("numberMeasures"), + "mainTempoQpm": obj.get("mainTempoQpm"), + "mainKeySignature": obj.get("mainKeySignature"), + "rights": ResourceRights.from_dict(obj["rights"]) if obj.get("rights") is not None else None, + "collaborators": [ResourceCollaborator.from_dict(_item) for _item in obj["collaborators"]] if obj.get("collaborators") is not None else None, + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "publicationDate": obj.get("publicationDate"), + "highlightedDate": obj.get("highlightedDate"), + "organization": obj.get("organization"), + "parentScore": obj.get("parentScore"), + "instruments": obj.get("instruments"), + "samples": obj.get("samples"), + "googleDriveFileId": obj.get("googleDriveFileId"), + "likes": ScoreLikesCounts.from_dict(obj["likes"]) if obj.get("likes") is not None else None, + "comments": ScoreCommentsCounts.from_dict(obj["comments"]) if obj.get("comments") is not None else None, + "views": ScoreViewsCounts.from_dict(obj["views"]) if obj.get("views") is not None else None, + "plays": ScorePlaysCounts.from_dict(obj["plays"]) if obj.get("plays") is not None else None, + "collections": obj.get("collections") + }) + return _obj + + diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py new file mode 100644 index 0000000..ebb3ecb --- /dev/null +++ b/flat_api/models/score_fork.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScoreFork(BaseModel): + """ + Options to fork the score + """ # noqa: E501 + collection: Optional[StrictStr] = Field(default='root', description="Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections ") + google_drive_disabled: Optional[StrictBool] = Field(default=False, description="If set to `true`, the API won't create the score on Google Drive ", alias="googleDriveDisabled") + keep_original_title: Optional[StrictBool] = Field(default=None, description="Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). ", alias="keepOriginalTitle") + __properties: ClassVar[List[str]] = ["collection", "googleDriveDisabled", "keepOriginalTitle"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreFork from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if collection (nullable) is None + # and model_fields_set contains the field + if self.collection is None and "collection" in self.model_fields_set: + _dict['collection'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreFork from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection": obj.get("collection") if obj.get("collection") is not None else 'root', + "googleDriveDisabled": obj.get("googleDriveDisabled") if obj.get("googleDriveDisabled") is not None else False, + "keepOriginalTitle": obj.get("keepOriginalTitle") + }) + return _obj + + diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py new file mode 100644 index 0000000..03cb73c --- /dev/null +++ b/flat_api/models/score_license.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreLicense(str, Enum): + """ + License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + """ + + """ + allowed enum values + """ + COPYRIGHT = 'copyright' + CC0 = 'cc0' + CC_MINUS_BY = 'cc-by' + CC_MINUS_BY_MINUS_SA = 'cc-by-sa' + CC_MINUS_BY_MINUS_ND = 'cc-by-nd' + CC_MINUS_BY_MINUS_NC = 'cc-by-nc' + CC_MINUS_BY_MINUS_NC_MINUS_SA = 'cc-by-nc-sa' + CC_MINUS_BY_MINUS_NC_MINUS_ND = 'cc-by-nc-nd' + NULL = 'null' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreLicense from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py new file mode 100644 index 0000000..b002e3a --- /dev/null +++ b/flat_api/models/score_likes_counts.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreLikesCounts(BaseModel): + """ + A computed version of the weekly, monthly and total of number of likes for a score + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="The total number of likes of the score") + weekly: Union[StrictFloat, StrictInt] = Field(description="The number of new likes during the last week") + monthly: Union[StrictFloat, StrictInt] = Field(description="The number of new likes during the last month") + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreLikesCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreLikesCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total") if obj.get("total") is not None else 0, + "weekly": obj.get("weekly") if obj.get("weekly") is not None else 0, + "monthly": obj.get("monthly") if obj.get("monthly") is not None else 0 + }) + return _obj + + diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py new file mode 100644 index 0000000..7e871ef --- /dev/null +++ b/flat_api/models/score_modification.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.score_creation_type import ScoreCreationType +from flat_api.models.score_license import ScoreLicense +from flat_api.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self + +class ScoreModification(BaseModel): + """ + Edit the score metadata + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the score") + subtitle: Optional[StrictStr] = Field(default=None, description="The subtitle of the score") + composer: Optional[StrictStr] = Field(default=None, description="The composer of the score") + lyricist: Optional[StrictStr] = Field(default=None, description="The lyricist of the score") + arranger: Optional[StrictStr] = Field(default=None, description="The arranger of the score") + privacy: Optional[ScorePrivacy] = None + sharing_key: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.", alias="sharingKey") + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="Description of the creation") + tags: Optional[List[StrictStr]] = Field(default=None, description="Tags describing the score") + creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") + license: Optional[ScoreLicense] = None + license_text: Optional[StrictStr] = Field(default=None, description="The rights info written on the score", alias="licenseText") + __properties: ClassVar[List[str]] = ["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText"] + + @field_validator('sharing_key') + def sharing_key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-f0-9]{128}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{128}$/") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreModification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if subtitle (nullable) is None + # and model_fields_set contains the field + if self.subtitle is None and "subtitle" in self.model_fields_set: + _dict['subtitle'] = None + + # set to None if composer (nullable) is None + # and model_fields_set contains the field + if self.composer is None and "composer" in self.model_fields_set: + _dict['composer'] = None + + # set to None if lyricist (nullable) is None + # and model_fields_set contains the field + if self.lyricist is None and "lyricist" in self.model_fields_set: + _dict['lyricist'] = None + + # set to None if arranger (nullable) is None + # and model_fields_set contains the field + if self.arranger is None and "arranger" in self.model_fields_set: + _dict['arranger'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creation_type (nullable) is None + # and model_fields_set contains the field + if self.creation_type is None and "creation_type" in self.model_fields_set: + _dict['creationType'] = None + + # set to None if license (nullable) is None + # and model_fields_set contains the field + if self.license is None and "license" in self.model_fields_set: + _dict['license'] = None + + # set to None if license_text (nullable) is None + # and model_fields_set contains the field + if self.license_text is None and "license_text" in self.model_fields_set: + _dict['licenseText'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreModification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "subtitle": obj.get("subtitle"), + "composer": obj.get("composer"), + "lyricist": obj.get("lyricist"), + "arranger": obj.get("arranger"), + "privacy": obj.get("privacy"), + "sharingKey": obj.get("sharingKey"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "creationType": obj.get("creationType"), + "license": obj.get("license"), + "licenseText": obj.get("licenseText") + }) + return _obj + + diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py new file mode 100644 index 0000000..d9280b9 --- /dev/null +++ b/flat_api/models/score_plays_counts.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScorePlaysCounts(BaseModel): + """ + A computed version of the total, weekly, and monthly number of plays of the score + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of plays of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of plays of the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of plays of the score") + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScorePlaysCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScorePlaysCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly") + }) + return _obj + + diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py new file mode 100644 index 0000000..d93f865 --- /dev/null +++ b/flat_api/models/score_privacy.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScorePrivacy(str, Enum): + """ + The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + """ + + """ + allowed enum values + """ + PUBLIC = 'public' + PRIVATE = 'private' + ORGANIZATIONPUBLIC = 'organizationPublic' + PRIVATELINK = 'privateLink' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScorePrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py new file mode 100644 index 0000000..cfbec2b --- /dev/null +++ b/flat_api/models/score_revision.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics +from typing import Optional, Set +from typing_extensions import Self + +class ScoreRevision(BaseModel): + """ + A score revision metadata + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision.") + user: Optional[StrictStr] = Field(default=None, description="The user identifier who created the revision") + collaborators: Optional[List[StrictStr]] = None + creation_date: Optional[datetime] = Field(default=None, description="The date when this revision was created", alias="creationDate") + event: Optional[StrictStr] = Field(default=None, description="The last event (action id) of the revision") + description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") + autosave: Optional[StrictBool] = Field(default=None, description="True if this revision was automatically generated by Flat and not on purpose by the user. ") + statistics: Optional[ScoreRevisionStatistics] = None + __properties: ClassVar[List[str]] = ["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevision from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of statistics + if self.statistics: + _dict['statistics'] = self.statistics.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevision from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user": obj.get("user"), + "collaborators": obj.get("collaborators"), + "creationDate": obj.get("creationDate"), + "event": obj.get("event"), + "description": obj.get("description"), + "autosave": obj.get("autosave"), + "statistics": ScoreRevisionStatistics.from_dict(obj["statistics"]) if obj.get("statistics") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py new file mode 100644 index 0000000..3e70df1 --- /dev/null +++ b/flat_api/models/score_revision_creation.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScoreRevisionCreation(BaseModel): + """ + A new created revision + """ # noqa: E501 + data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") + data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") + autosave: Optional[StrictBool] = Field(default=None, description="Must be set to `true` if the revision was created automatically. ") + description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") + __properties: ClassVar[List[str]] = ["data", "dataEncoding", "autosave", "description"] + + @field_validator('data_encoding') + def data_encoding_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['base64']): + raise ValueError("must be one of enum values ('base64')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevisionCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevisionCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data"), + "dataEncoding": obj.get("dataEncoding"), + "autosave": obj.get("autosave"), + "description": obj.get("description") + }) + return _obj + + diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py new file mode 100644 index 0000000..fff610e --- /dev/null +++ b/flat_api/models/score_revision_statistics.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreRevisionStatistics(BaseModel): + """ + The statistics related to the score revision (additions and deletions) + """ # noqa: E501 + additions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of additions operations in the last revision") + deletions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of deletions operations in the last revision") + start_date: Optional[datetime] = Field(default=None, description="The date of the first action included in this revision", alias="startDate") + end_date: Optional[datetime] = Field(default=None, description="The date of the latest action included in this revision", alias="endDate") + __properties: ClassVar[List[str]] = ["additions", "deletions", "startDate", "endDate"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevisionStatistics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevisionStatistics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "additions": obj.get("additions"), + "deletions": obj.get("deletions"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py new file mode 100644 index 0000000..453ea64 --- /dev/null +++ b/flat_api/models/score_source.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ScoreSource(BaseModel): + """ + ScoreSource + """ # noqa: E501 + google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") + __properties: ClassVar[List[str]] = ["googleDrive"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "googleDrive": obj.get("googleDrive") + }) + return _obj + + diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py new file mode 100644 index 0000000..cac6d06 --- /dev/null +++ b/flat_api/models/score_track.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose +from flat_api.models.score_track_state import ScoreTrackState +from flat_api.models.score_track_type import ScoreTrackType +from typing import Optional, Set +from typing_extensions import Self + +class ScoreTrack(BaseModel): + """ + An audio track for a score + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score track") + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + score: StrictStr = Field(description="The unique identifier of the score") + creator: StrictStr = Field(description="The unique identifier of the track creator") + creation_date: datetime = Field(description="The creation date of the track", alias="creationDate") + modification_date: datetime = Field(description="The modification date of the track", alias="modificationDate") + default: StrictBool = Field(description="True if the track should be used as default audio source") + state: ScoreTrackState + type: ScoreTrackType + purpose: ScoreTrackPurpose + url: Optional[StrictStr] = Field(default=None, description="The URL of the track") + media_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` ", alias="mediaId") + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + __properties: ClassVar[List[str]] = ["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "purpose", "url", "mediaId", "synchronizationPoints"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrack from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item in self.synchronization_points: + if _item: + _items.append(_item.to_dict()) + _dict['synchronizationPoints'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrack from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "score": obj.get("score"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "default": obj.get("default"), + "state": obj.get("state"), + "type": obj.get("type"), + "purpose": obj.get("purpose"), + "url": obj.get("url"), + "mediaId": obj.get("mediaId"), + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py new file mode 100644 index 0000000..59d6602 --- /dev/null +++ b/flat_api/models/score_track_creation.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose +from flat_api.models.score_track_state import ScoreTrackState +from typing import Optional, Set +from typing_extensions import Self + +class ScoreTrackCreation(BaseModel): + """ + Creation of a new track. This one must contain the URL of the track or the corresponding file + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") + state: Optional[ScoreTrackState] = None + purpose: Optional[ScoreTrackPurpose] = None + url: Optional[StrictStr] = Field(default=None, description="The URL of the track") + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + __properties: ClassVar[List[str]] = ["title", "default", "state", "purpose", "url", "synchronizationPoints"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item in self.synchronization_points: + if _item: + _items.append(_item.to_dict()) + _dict['synchronizationPoints'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "default": obj.get("default"), + "state": obj.get("state"), + "purpose": obj.get("purpose"), + "url": obj.get("url"), + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py new file mode 100644 index 0000000..0d876d4 --- /dev/null +++ b/flat_api/models/score_track_point.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreTrackPoint(BaseModel): + """ + A track synchronization point + """ # noqa: E501 + type: StrictStr = Field(description="The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid`") + measure_uuid: Optional[StrictStr] = Field(default=None, description="The measure unique identifier", alias="measureUuid") + time: Union[StrictFloat, StrictInt] = Field(description="The corresponding time in seconds") + __properties: ClassVar[List[str]] = ["type", "measureUuid", "time"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['measure', 'end']): + raise ValueError("must be one of enum values ('measure', 'end')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackPoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackPoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "measureUuid": obj.get("measureUuid"), + "time": obj.get("time") + }) + return _obj + + diff --git a/flat_api/models/score_track_purpose.py b/flat_api/models/score_track_purpose.py new file mode 100644 index 0000000..41e7153 --- /dev/null +++ b/flat_api/models/score_track_purpose.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackPurpose(str, Enum): + """ + The purpose of the audio track + """ + + """ + allowed enum values + """ + COMMON = 'common' + PERFORMANCESUBMISSION = 'performanceSubmission' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackPurpose from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py new file mode 100644 index 0000000..ce06a5b --- /dev/null +++ b/flat_api/models/score_track_state.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackState(str, Enum): + """ + State of the track + """ + + """ + allowed enum values + """ + DRAFT = 'draft' + COMPLETED = 'completed' + DELETED = 'deleted' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py new file mode 100644 index 0000000..fbf4840 --- /dev/null +++ b/flat_api/models/score_track_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackType(str, Enum): + """ + The type of an audio track + """ + + """ + allowed enum values + """ + AUDIO = 'audio' + SOUNDCLOUD = 'soundcloud' + YOUTUBE = 'youtube' + VIMEO = 'vimeo' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py new file mode 100644 index 0000000..0e757ee --- /dev/null +++ b/flat_api/models/score_track_update.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_state import ScoreTrackState +from typing import Optional, Set +from typing_extensions import Self + +class ScoreTrackUpdate(BaseModel): + """ + Update an existing track. + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") + state: Optional[ScoreTrackState] = None + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + __properties: ClassVar[List[str]] = ["title", "default", "state", "synchronizationPoints"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item in self.synchronization_points: + if _item: + _items.append(_item.to_dict()) + _dict['synchronizationPoints'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "default": obj.get("default"), + "state": obj.get("state"), + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + return _obj + + diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py new file mode 100644 index 0000000..586a930 --- /dev/null +++ b/flat_api/models/score_views_counts.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ScoreViewsCounts(BaseModel): + """ + A computed version of the total, weekly, and monthly number of views of the score + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of views of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of views of the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of views of the score") + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreViewsCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreViewsCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly") + }) + return _obj + + diff --git a/flat_api/models/task.py b/flat_api/models/task.py new file mode 100644 index 0000000..72382d4 --- /dev/null +++ b/flat_api/models/task.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.task_progress import TaskProgress +from flat_api.models.task_result import TaskResult +from typing import Optional, Set +from typing_extensions import Self + +class Task(BaseModel): + """ + An asynchronous task + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the task") + type: Optional[StrictStr] = Field(default=None, description="Type of the task (e.g. audio-export)") + state: StrictStr = Field(description="State of the Task") + format: Optional[StrictStr] = Field(default=None, description="For files processing, the file format (e.g. `mp3`, `wav`)") + score: Optional[StrictStr] = Field(default=None, description="The score unique identifier for tasks related to scores") + progress: Optional[TaskProgress] = None + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the task", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The last modification date of the task", alias="modificationDate") + done_date: Optional[datetime] = Field(default=None, description="The date when the task has been completed", alias="doneDate") + result: Optional[TaskResult] = None + error_history: Optional[List[StrictStr]] = Field(default=None, description="If any errors happened when processing this task, the list of errors identifiers", alias="errorHistory") + __properties: ClassVar[List[str]] = ["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['created', 'doing', 'done', 'canceled', 'error']): + raise ValueError("must be one of enum values ('created', 'doing', 'done', 'canceled', 'error')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Task from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of progress + if self.progress: + _dict['progress'] = self.progress.to_dict() + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Task from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "state": obj.get("state"), + "format": obj.get("format"), + "score": obj.get("score"), + "progress": TaskProgress.from_dict(obj["progress"]) if obj.get("progress") is not None else None, + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "doneDate": obj.get("doneDate"), + "result": TaskResult.from_dict(obj["result"]) if obj.get("result") is not None else None, + "errorHistory": obj.get("errorHistory") + }) + return _obj + + diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py new file mode 100644 index 0000000..71103da --- /dev/null +++ b/flat_api/models/task_export_options.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TaskExportOptions(BaseModel): + """ + Options for the requested export + """ # noqa: E501 + parts: Optional[List[StrictStr]] = Field(default=None, description="A list of parts to specifically export") + __properties: ClassVar[List[str]] = ["parts"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskExportOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskExportOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "parts": obj.get("parts") + }) + return _obj + + diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py new file mode 100644 index 0000000..538f7f1 --- /dev/null +++ b/flat_api/models/task_progress.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class TaskProgress(BaseModel): + """ + Details about the task progression + """ # noqa: E501 + percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percent of the task progression") + text: Optional[StrictStr] = Field(default=None, description="Text details of the task progress") + __properties: ClassVar[List[str]] = ["percent", "text"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskProgress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskProgress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "percent": obj.get("percent"), + "text": obj.get("text") + }) + return _obj + + diff --git a/flat_api/models/task_result.py b/flat_api/models/task_result.py new file mode 100644 index 0000000..2976078 --- /dev/null +++ b/flat_api/models/task_result.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TaskResult(BaseModel): + """ + Optional result information about this task + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="URL returned by the task worker") + error: Optional[StrictStr] = Field(default=None, description="Error returned by task worker") + __properties: ClassVar[List[str]] = ["url", "error"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "error": obj.get("error") + }) + return _obj + + diff --git a/flat_api/models/tutteo_product.py b/flat_api/models/tutteo_product.py new file mode 100644 index 0000000..82ffae9 --- /dev/null +++ b/flat_api/models/tutteo_product.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TutteoProduct(str, Enum): + """ + The Tutteo product used by the user account + """ + + """ + allowed enum values + """ + FLAT = 'flat' + FLATEDU = 'flatEdu' + MSNIPPET = 'msnippet' + EMBED = 'embed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TutteoProduct from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py new file mode 100644 index 0000000..0b8a0cd --- /dev/null +++ b/flat_api/models/user_admin_update.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.organization_roles import OrganizationRoles +from typing import Optional, Set +from typing_extensions import Self + +class UserAdminUpdate(BaseModel): + """ + User update as an organization admin + """ # noqa: E501 + password: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=1000)]] = Field(default=None, description="Password of the account") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=30)]] = Field(default=None, description="Username of the account") + firstname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="First name of the user") + lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") + email: Optional[StrictStr] = Field(default=None, description="Email of the account") + __properties: ClassVar[List[str]] = ["password", "organizationRole", "username", "firstname", "lastname", "email"] + + @field_validator('username') + def username_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9\-_.]+$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9\-_.]+$/") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAdminUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAdminUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "organizationRole": obj.get("organizationRole"), + "username": obj.get("username"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "email": obj.get("email") + }) + return _obj + + diff --git a/flat_api/models/user_azure_details.py b/flat_api/models/user_azure_details.py new file mode 100644 index 0000000..48e3f1b --- /dev/null +++ b/flat_api/models/user_azure_details.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserAzureDetails(BaseModel): + """ + UserAzureDetails + """ # noqa: E501 + oid: Optional[StrictStr] = Field(default=None, description="User object identifier on Azure AD") + hd: Optional[StrictStr] = Field(default=None, description="User tenant (domain name)") + preferred_username: Optional[StrictStr] = Field(default=None, description="User Preferred Username (UPN), i.e. the main email of the user", alias="preferredUsername") + __properties: ClassVar[List[str]] = ["oid", "hd", "preferredUsername"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAzureDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAzureDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oid": obj.get("oid"), + "hd": obj.get("hd"), + "preferredUsername": obj.get("preferredUsername") + }) + return _obj + + diff --git a/flat_api/models/user_community_profile_links.py b/flat_api/models/user_community_profile_links.py new file mode 100644 index 0000000..78f68a0 --- /dev/null +++ b/flat_api/models/user_community_profile_links.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserCommunityProfileLinks(BaseModel): + """ + Social networks links + """ # noqa: E501 + spotify_url: Optional[StrictStr] = Field(default=None, description="Spotify Profile URL", alias="spotifyUrl") + youtube_url: Optional[StrictStr] = Field(default=None, description="YouTube channel URL", alias="youtubeUrl") + soundcloud_url: Optional[StrictStr] = Field(default=None, description="SoundCloud Profile URL", alias="soundcloudUrl") + tiktok_url: Optional[StrictStr] = Field(default=None, description="TikTok profile URL. For updates, also accepts TikTok usernames", alias="tiktokUrl") + instagram_url: Optional[StrictStr] = Field(default=None, description="Instagram profile URL. For updates, also accepts Instagram usernames", alias="instagramUrl") + website_url: Optional[StrictStr] = Field(default=None, description="Personnal website URL", alias="websiteUrl") + __properties: ClassVar[List[str]] = ["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunityProfileLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if spotify_url (nullable) is None + # and model_fields_set contains the field + if self.spotify_url is None and "spotify_url" in self.model_fields_set: + _dict['spotifyUrl'] = None + + # set to None if youtube_url (nullable) is None + # and model_fields_set contains the field + if self.youtube_url is None and "youtube_url" in self.model_fields_set: + _dict['youtubeUrl'] = None + + # set to None if soundcloud_url (nullable) is None + # and model_fields_set contains the field + if self.soundcloud_url is None and "soundcloud_url" in self.model_fields_set: + _dict['soundcloudUrl'] = None + + # set to None if tiktok_url (nullable) is None + # and model_fields_set contains the field + if self.tiktok_url is None and "tiktok_url" in self.model_fields_set: + _dict['tiktokUrl'] = None + + # set to None if instagram_url (nullable) is None + # and model_fields_set contains the field + if self.instagram_url is None and "instagram_url" in self.model_fields_set: + _dict['instagramUrl'] = None + + # set to None if website_url (nullable) is None + # and model_fields_set contains the field + if self.website_url is None and "website_url" in self.model_fields_set: + _dict['websiteUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunityProfileLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spotifyUrl": obj.get("spotifyUrl"), + "youtubeUrl": obj.get("youtubeUrl"), + "soundcloudUrl": obj.get("soundcloudUrl"), + "tiktokUrl": obj.get("tiktokUrl"), + "instagramUrl": obj.get("instagramUrl"), + "websiteUrl": obj.get("websiteUrl") + }) + return _obj + + diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py new file mode 100644 index 0000000..fe339c7 --- /dev/null +++ b/flat_api/models/user_creation.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.flat_locales import FlatLocales +from typing import Optional, Set +from typing_extensions import Self + +class UserCreation(BaseModel): + """ + User creation + """ # noqa: E501 + username: Annotated[str, Field(min_length=1, strict=True, max_length=30)] = Field(description="Username of the new account") + firstname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="First name of the user") + lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") + email: Optional[StrictStr] = Field(default=None, description="Email of the new account") + password: Annotated[str, Field(min_length=6, strict=True, max_length=1000)] = Field(description="Password of the new account") + locale: Optional[FlatLocales] = None + role: Optional[StrictStr] = Field(default='user', description="Role of the new account") + __properties: ClassVar[List[str]] = ["username", "firstname", "lastname", "email", "password", "locale", "role"] + + @field_validator('username') + def username_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Za-z0-9\-_.]+$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9\-_.]+$/") + return value + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['user', 'teacher', 'admin']): + raise ValueError("must be one of enum values ('user', 'teacher', 'admin')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "email": obj.get("email"), + "password": obj.get("password"), + "locale": obj.get("locale"), + "role": obj.get("role") if obj.get("role") is not None else 'user' + }) + return _obj + + diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py new file mode 100644 index 0000000..51520e5 --- /dev/null +++ b/flat_api/models/user_details.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.class_roles import ClassRoles +from flat_api.models.flat_locales import FlatLocales +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.tutteo_product import TutteoProduct +from flat_api.models.user_azure_details import UserAzureDetails +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks +from typing import Optional, Set +from typing_extensions import Self + +class UserDetails(BaseModel): + """ + UserDetails + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + bio: Optional[StrictStr] = Field(default=None, description="User's biography") + registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") + liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") + instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. ") + links: Optional[UserCommunityProfileLinks] = None + azure_details: Optional[UserAzureDetails] = Field(default=None, alias="azureDetails") + private_profile: Optional[StrictBool] = Field(default=None, description="Tell either this user profile is private or not (individual accounts only)", alias="privateProfile") + locale: Optional[FlatLocales] = None + groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") + picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile picture", alias="pictureFile") + cover_picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile cover picture", alias="coverPictureFile") + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of azure_details + if self.azure_details: + _dict['azureDetails'] = self.azure_details.to_dict() + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + # set to None if cover_picture (nullable) is None + # and model_fields_set contains the field + if self.cover_picture is None and "cover_picture" in self.model_fields_set: + _dict['coverPicture'] = None + + # set to None if picture_file (nullable) is None + # and model_fields_set contains the field + if self.picture_file is None and "picture_file" in self.model_fields_set: + _dict['pictureFile'] = None + + # set to None if cover_picture_file (nullable) is None + # and model_fields_set contains the field + if self.cover_picture_file is None and "cover_picture_file" in self.model_fields_set: + _dict['coverPictureFile'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product"), + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "bio": obj.get("bio"), + "registrationDate": obj.get("registrationDate"), + "likedScoresCount": obj.get("likedScoresCount"), + "followersCount": obj.get("followersCount"), + "followingCount": obj.get("followingCount"), + "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "coverPicture": obj.get("coverPicture"), + "profileTheme": obj.get("profileTheme"), + "instruments": obj.get("instruments"), + "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "azureDetails": UserAzureDetails.from_dict(obj["azureDetails"]) if obj.get("azureDetails") is not None else None, + "privateProfile": obj.get("privateProfile"), + "locale": obj.get("locale"), + "groups": obj.get("groups"), + "pictureFile": obj.get("pictureFile"), + "coverPictureFile": obj.get("coverPictureFile") + }) + return _obj + + diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py new file mode 100644 index 0000000..16ba418 --- /dev/null +++ b/flat_api/models/user_details_admin.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.class_roles import ClassRoles +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.tutteo_product import TutteoProduct +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from typing import Optional, Set +from typing_extensions import Self + +class UserDetailsAdmin(BaseModel): + """ + UserDetailsAdmin + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + email: Optional[StrictStr] = Field(default=None, description="Email of the user") + last_activity_date: Optional[datetime] = Field(default=None, description="Date of the last user activity", alias="lastActivityDate") + license: Optional[UserDetailsAdminLicense] = None + groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetailsAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of license + if self.license: + _dict['license'] = self.license.to_dict() + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetailsAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product"), + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "email": obj.get("email"), + "lastActivityDate": obj.get("lastActivityDate"), + "license": UserDetailsAdminLicense.from_dict(obj["license"]) if obj.get("license") is not None else None, + "groups": obj.get("groups") + }) + return _obj + + diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py new file mode 100644 index 0000000..0696541 --- /dev/null +++ b/flat_api/models/user_details_admin_license.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.license_mode import LicenseMode +from flat_api.models.license_sources import LicenseSources +from typing import Optional, Set +from typing_extensions import Self + +class UserDetailsAdminLicense(BaseModel): + """ + Current active license of the user + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID of the current license") + expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") + source: Optional[LicenseSources] = None + mode: Optional[LicenseMode] = None + active: Optional[StrictBool] = Field(default=None, description="ID of the current license") + __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetailsAdminLicense from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetailsAdminLicense from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "expirationDate": obj.get("expirationDate"), + "source": obj.get("source"), + "mode": obj.get("mode"), + "active": obj.get("active") + }) + return _obj + + diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py new file mode 100644 index 0000000..48f9936 --- /dev/null +++ b/flat_api/models/user_public.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.class_roles import ClassRoles +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.tutteo_product import TutteoProduct +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks +from typing import Optional, Set +from typing_extensions import Self + +class UserPublic(BaseModel): + """ + UserPublic + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + bio: Optional[StrictStr] = Field(default=None, description="User's biography") + registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") + liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") + instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. ") + links: Optional[UserCommunityProfileLinks] = None + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPublic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + # set to None if cover_picture (nullable) is None + # and model_fields_set contains the field + if self.cover_picture is None and "cover_picture" in self.model_fields_set: + _dict['coverPicture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPublic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product"), + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "bio": obj.get("bio"), + "registrationDate": obj.get("registrationDate"), + "likedScoresCount": obj.get("likedScoresCount"), + "followersCount": obj.get("followersCount"), + "followingCount": obj.get("followingCount"), + "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "coverPicture": obj.get("coverPicture"), + "profileTheme": obj.get("profileTheme"), + "instruments": obj.get("instruments"), + "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + return _obj + + diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py new file mode 100644 index 0000000..0225f82 --- /dev/null +++ b/flat_api/models/user_public_summary.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.class_roles import ClassRoles +from flat_api.models.organization_roles import OrganizationRoles +from flat_api.models.tutteo_product import TutteoProduct +from typing import Optional, Set +from typing_extensions import Self + +class UserPublicSummary(BaseModel): + """ + UserPublicSummary + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPublicSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPublicSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product"), + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl") + }) + return _obj + + diff --git a/flat_api/models/user_signin_link.py b/flat_api/models/user_signin_link.py new file mode 100644 index 0000000..39892c7 --- /dev/null +++ b/flat_api/models/user_signin_link.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserSigninLink(BaseModel): + """ + UserSigninLink + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="URL to use to sign in to this account") + expiration_date: Optional[datetime] = Field(default=None, description="Date when the link expires", alias="expirationDate") + __properties: ClassVar[List[str]] = ["url", "expirationDate"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSigninLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSigninLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/flat_api/models/user_signin_link_creation.py b/flat_api/models/user_signin_link_creation.py new file mode 100644 index 0000000..bc7b132 --- /dev/null +++ b/flat_api/models/user_signin_link_creation.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserSigninLinkCreation(BaseModel): + """ + UserSigninLinkCreation + """ # noqa: E501 + destination_path: Optional[StrictStr] = Field(default='/', description="Path to redirect to after signin", alias="destinationPath") + __properties: ClassVar[List[str]] = ["destinationPath"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSigninLinkCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSigninLinkCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destinationPath": obj.get("destinationPath") if obj.get("destinationPath") is not None else '/' + }) + return _obj + + diff --git a/flat_api/py.typed b/flat_api/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/flat_api/rest.py b/flat_api/rest.py index 67ed4c9..e0806d1 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -1,55 +1,69 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from flat_api.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from flat_api.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -58,71 +72,79 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies( - configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -134,61 +156,81 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) + connect=_request_timeout[0], + read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', - headers['Content-Type'], re.IGNORECASE)): + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -199,155 +241,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject - - -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None, '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ', ''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) + return RESTResponse(r) diff --git a/pyproject.toml b/pyproject.toml index ce73ca9..f0817ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,29 @@ [tool.poetry] name = "flat_api" -version = "0.9.0" +version = "1.1.0" description = "Flat API" authors = ["Flat "] license = "NoLicense" readme = "README.md" repository = "https://github.com/FlatIO/api-client-python" keywords = ["OpenAPI", "OpenAPI-Generator", "Flat API"] +include = ["flat_api/py.typed"] [tool.poetry.dependencies] python = "^3.7" urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" -pydantic = "^1.10.5, <2" -aenum = ">=3.1.11" +pydantic = ">=2" +typing-extensions = ">=4.7.1" [tool.poetry.dev-dependencies] pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + [build-system] requires = ["setuptools"] @@ -27,3 +31,41 @@ build-backend = "setuptools.build_meta" [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "flat_api", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/requirements.txt b/requirements.txt index 96947f6..cc85509 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/test-requirements.txt b/test-requirements.txt index bb4f22b..8e6d8cb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,5 @@ +pytest~=7.1.3 pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/test/test_account_api.py b/test/test_account_api.py index ae49575..5a80aa5 100644 --- a/test/test_account_api.py +++ b/test/test_account_api.py @@ -1,33 +1,36 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.account_api import AccountApi # noqa: E501 +from flat_api.api.account_api import AccountApi class TestAccountApi(unittest.TestCase): """AccountApi unit test stubs""" - def setUp(self): - self.api = AccountApi() # noqa: E501 + def setUp(self) -> None: + self.api = AccountApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_get_authenticated_user(self): + def test_get_authenticated_user(self) -> None: """Test case for get_authenticated_user - Get current user account # noqa: E501 + Get current user account """ pass diff --git a/test/test_api_access_token.py b/test/test_api_access_token.py index 44e108c..b7b6ba4 100644 --- a/test/test_api_access_token.py +++ b/test/test_api_access_token.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.app_scopes import AppScopes -globals()['AppScopes'] = AppScopes -from flat_api.model.api_access_token import ApiAccessToken +import unittest +from flat_api.models.api_access_token import ApiAccessToken class TestApiAccessToken(unittest.TestCase): """ApiAccessToken unit test stubs""" @@ -27,12 +26,34 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ApiAccessToken: + """Test ApiAccessToken + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiAccessToken` + """ + model = ApiAccessToken() + if include_optional: + return ApiAccessToken( + id = '', + name = '', + token = '', + issued_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scopes = [ + 'account.public_profile' + ] + ) + else: + return ApiAccessToken( + ) + """ + def testApiAccessToken(self): """Test ApiAccessToken""" - # FIXME: construct object with mandatory attributes with example values - # model = ApiAccessToken() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_app_scopes.py b/test/test_app_scopes.py index 1fca795..7b6e1e3 100644 --- a/test/test_app_scopes.py +++ b/test/test_app_scopes.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.app_scopes import AppScopes +import unittest +from flat_api.models.app_scopes import AppScopes class TestAppScopes(unittest.TestCase): """AppScopes unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testAppScopes(self): """Test AppScopes""" - # FIXME: construct object with mandatory attributes with example values - # model = AppScopes() # noqa: E501 - pass - + # inst = AppScopes() if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment.py b/test/test_assignment.py index 105f3e5..748a2a8 100644 --- a/test/test_assignment.py +++ b/test/test_assignment.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment -globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities -globals()['AssignmentType'] = AssignmentType -globals()['MediaAttachment'] = MediaAttachment -from flat_api.model.assignment import Assignment +import unittest +from flat_api.models.assignment import Assignment class TestAssignment(unittest.TestCase): """Assignment unit test stubs""" @@ -31,12 +26,63 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Assignment: + """Test Assignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Assignment` + """ + model = Assignment() + if include_optional: + return Assignment( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + description = '', + cover = '', + cover_file = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + use_dedicated_attachments = True, + max_points = 1.337, + release_grades = 'auto', + shuffle_exercises = True, + toolset = '', + nb_playback_authorized = 1.337 + ) + else: + return Assignment( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + ) + """ + def testAssignment(self): """Test Assignment""" - # FIXME: construct object with mandatory attributes with example values - # model = Assignment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_copy.py b/test/test_assignment_copy.py index 44c06d0..bc39b4f 100644 --- a/test/test_assignment_copy.py +++ b/test/test_assignment_copy.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy import AssignmentCopy +import unittest +from flat_api.models.assignment_copy import AssignmentCopy class TestAssignmentCopy(unittest.TestCase): """AssignmentCopy unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentCopy: + """Test AssignmentCopy + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentCopy` + """ + model = AssignmentCopy() + if include_optional: + return AssignmentCopy( + classroom = '', + assignment = '', + scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + library_parent = '', + verify_if_not_already_in_resource_library = True + ) + else: + return AssignmentCopy( + classroom = '', + library_parent = '', + ) + """ + def testAssignmentCopy(self): """Test AssignmentCopy""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentCopy() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_copy_response.py b/test/test_assignment_copy_response.py index d9ddfad..37bdd41 100644 --- a/test/test_assignment_copy_response.py +++ b/test/test_assignment_copy_response.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment -globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities -globals()['AssignmentType'] = AssignmentType -globals()['MediaAttachment'] = MediaAttachment -from flat_api.model.assignment_copy_response import AssignmentCopyResponse +import unittest +from flat_api.models.assignment_copy_response import AssignmentCopyResponse class TestAssignmentCopyResponse(unittest.TestCase): """AssignmentCopyResponse unit test stubs""" @@ -31,12 +26,64 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentCopyResponse: + """Test AssignmentCopyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentCopyResponse` + """ + model = AssignmentCopyResponse() + if include_optional: + return AssignmentCopyResponse( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + description = '', + cover = '', + cover_file = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + use_dedicated_attachments = True, + max_points = 1.337, + release_grades = 'auto', + shuffle_exercises = True, + toolset = '', + nb_playback_authorized = 1.337, + resource = '' + ) + else: + return AssignmentCopyResponse( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + ) + """ + def testAssignmentCopyResponse(self): """Test AssignmentCopyResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentCopyResponse() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_copy_response_capabilities.py b/test/test_assignment_copy_response_capabilities.py index ffec44f..818bcf4 100644 --- a/test/test_assignment_copy_response_capabilities.py +++ b/test/test_assignment_copy_response_capabilities.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError -globals()['AssignmentCopyResponseCapabilitiesCanPublishInClassError'] = AssignmentCopyResponseCapabilitiesCanPublishInClassError -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +import unittest +from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities class TestAssignmentCopyResponseCapabilities(unittest.TestCase): """AssignmentCopyResponseCapabilities unit test stubs""" @@ -27,12 +26,37 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentCopyResponseCapabilities: + """Test AssignmentCopyResponseCapabilities + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentCopyResponseCapabilities` + """ + model = AssignmentCopyResponseCapabilities() + if include_optional: + return AssignmentCopyResponseCapabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True + ) + else: + return AssignmentCopyResponseCapabilities( + can_edit = True, + can_publish_in_class = True, + can_archive = True, + can_unarchive = True, + ) + """ + def testAssignmentCopyResponseCapabilities(self): """Test AssignmentCopyResponseCapabilities""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentCopyResponseCapabilities() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py b/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py index 0c7ff8d..08f2935 100644 --- a/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py +++ b/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +import unittest +from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError class TestAssignmentCopyResponseCapabilitiesCanPublishInClassError(unittest.TestCase): """AssignmentCopyResponseCapabilitiesCanPublishInClassError unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentCopyResponseCapabilitiesCanPublishInClassError: + """Test AssignmentCopyResponseCapabilitiesCanPublishInClassError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentCopyResponseCapabilitiesCanPublishInClassError` + """ + model = AssignmentCopyResponseCapabilitiesCanPublishInClassError() + if include_optional: + return AssignmentCopyResponseCapabilitiesCanPublishInClassError( + code = '', + message = '' + ) + else: + return AssignmentCopyResponseCapabilitiesCanPublishInClassError( + code = '', + message = '', + ) + """ + def testAssignmentCopyResponseCapabilitiesCanPublishInClassError(self): """Test AssignmentCopyResponseCapabilitiesCanPublishInClassError""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentCopyResponseCapabilitiesCanPublishInClassError() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission.py b/test/test_assignment_submission.py index f733126..5f0a974 100644 --- a/test/test_assignment_submission.py +++ b/test/test_assignment_submission.py @@ -1,28 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_state import AssignmentSubmissionState -from flat_api.model.google_classroom_submission import GoogleClassroomSubmission -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission -globals()['AssignmentSubmissionState'] = AssignmentSubmissionState -globals()['GoogleClassroomSubmission'] = GoogleClassroomSubmission -globals()['MediaAttachment'] = MediaAttachment -globals()['MicrosoftGraphSubmission'] = MicrosoftGraphSubmission -from flat_api.model.assignment_submission import AssignmentSubmission +import unittest +from flat_api.models.assignment_submission import AssignmentSubmission class TestAssignmentSubmission(unittest.TestCase): """AssignmentSubmission unit test stubs""" @@ -33,12 +26,73 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmission: + """Test AssignmentSubmission + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmission` + """ + model = AssignmentSubmission() + if include_optional: + return AssignmentSubmission( + id = '', + state = 'created', + classroom = '', + assignment = '', + creator = '', + creation_date = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + submission_date = '', + return_date = '', + return_creator = '', + grade = 1.337, + draft_grade = 1.337, + max_points = 1.337, + exercises_ids = [ + '' + ], + playback = [ + flat_api.models.assignment_submission_playback_inner.AssignmentSubmission_playback_inner( + score = '', + nb_play_attempt = 1.337, ) + ], + comments = flat_api.models.assignment_submission_comments.AssignmentSubmission_comments( + total = 1.337, + unread = 1.337, ), + google_classroom = {"id":"CgsI-00000000000","state":"turned_in","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/submissions/student/my-submission"}, + microsoft_graph = {"id":"8e460d32-d2d4-46b3-8e1a-9b7677a48fda","state":"returned"}, + lti = flat_api.models.assignment_submission_lti.AssignmentSubmission_lti( + sourcedid = '', ) + ) + else: + return AssignmentSubmission( + id = '', + state = 'created', + classroom = '', + assignment = '', + creator = '', + creation_date = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + playback = [ + flat_api.models.assignment_submission_playback_inner.AssignmentSubmission_playback_inner( + score = '', + nb_play_attempt = 1.337, ) + ], + comments = flat_api.models.assignment_submission_comments.AssignmentSubmission_comments( + total = 1.337, + unread = 1.337, ), + ) + """ + def testAssignmentSubmission(self): """Test AssignmentSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmission() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_comment.py b/test/test_assignment_submission_comment.py index f530c18..babd960 100644 --- a/test/test_assignment_submission_comment.py +++ b/test/test_assignment_submission_comment.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_comment import AssignmentSubmissionComment +import unittest +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment class TestAssignmentSubmissionComment(unittest.TestCase): """AssignmentSubmissionComment unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmissionComment: + """Test AssignmentSubmissionComment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionComment` + """ + model = AssignmentSubmissionComment() + if include_optional: + return AssignmentSubmissionComment( + id = '', + user = '', + submission = '', + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + comment = '', + unread = True + ) + else: + return AssignmentSubmissionComment( + ) + """ + def testAssignmentSubmissionComment(self): """Test AssignmentSubmissionComment""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionComment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_comment_creation.py b/test/test_assignment_submission_comment_creation.py index b43cd49..8693626 100644 --- a/test/test_assignment_submission_comment_creation.py +++ b/test/test_assignment_submission_comment_creation.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +import unittest +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation class TestAssignmentSubmissionCommentCreation(unittest.TestCase): """AssignmentSubmissionCommentCreation unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmissionCommentCreation: + """Test AssignmentSubmissionCommentCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionCommentCreation` + """ + model = AssignmentSubmissionCommentCreation() + if include_optional: + return AssignmentSubmissionCommentCreation( + comment = '' + ) + else: + return AssignmentSubmissionCommentCreation( + comment = '', + ) + """ + def testAssignmentSubmissionCommentCreation(self): """Test AssignmentSubmissionCommentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionCommentCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_comments.py b/test/test_assignment_submission_comments.py new file mode 100644 index 0000000..1d322a6 --- /dev/null +++ b/test/test_assignment_submission_comments.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments + +class TestAssignmentSubmissionComments(unittest.TestCase): + """AssignmentSubmissionComments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssignmentSubmissionComments: + """Test AssignmentSubmissionComments + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionComments` + """ + model = AssignmentSubmissionComments() + if include_optional: + return AssignmentSubmissionComments( + total = 1.337, + unread = 1.337 + ) + else: + return AssignmentSubmissionComments( + ) + """ + + def testAssignmentSubmissionComments(self): + """Test AssignmentSubmissionComments""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_history.py b/test/test_assignment_submission_history.py index 3b97769..492dd23 100644 --- a/test/test_assignment_submission_history.py +++ b/test/test_assignment_submission_history.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment -from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState -globals()['AssignmentSubmissionHistoryAttachment'] = AssignmentSubmissionHistoryAttachment -globals()['AssignmentSubmissionHistoryState'] = AssignmentSubmissionHistoryState -from flat_api.model.assignment_submission_history import AssignmentSubmissionHistory +import unittest +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory class TestAssignmentSubmissionHistory(unittest.TestCase): """AssignmentSubmissionHistory unit test stubs""" @@ -29,12 +26,48 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmissionHistory: + """Test AssignmentSubmissionHistory + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionHistory` + """ + model = AssignmentSubmissionHistory() + if include_optional: + return AssignmentSubmissionHistory( + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + classroom = '', + assignment = '', + submission = '', + users = [ + '' + ], + source = 'lti', + state = 'created', + draft_grade = 1.337, + grade = 1.337, + max_points = 1.337, + comment = '', + due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + attachment = flat_api.models.assignment_submission_history_attachment.AssignmentSubmissionHistory_attachment( + score = '', + revision = '', + title = '', ) + ) + else: + return AssignmentSubmissionHistory( + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + users = [ + '' + ], + ) + """ + def testAssignmentSubmissionHistory(self): """Test AssignmentSubmissionHistory""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionHistory() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_history_attachment.py b/test/test_assignment_submission_history_attachment.py index d1d87dc..c1bc26b 100644 --- a/test/test_assignment_submission_history_attachment.py +++ b/test/test_assignment_submission_history_attachment.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +import unittest +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment class TestAssignmentSubmissionHistoryAttachment(unittest.TestCase): """AssignmentSubmissionHistoryAttachment unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmissionHistoryAttachment: + """Test AssignmentSubmissionHistoryAttachment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionHistoryAttachment` + """ + model = AssignmentSubmissionHistoryAttachment() + if include_optional: + return AssignmentSubmissionHistoryAttachment( + score = '', + revision = '', + title = '' + ) + else: + return AssignmentSubmissionHistoryAttachment( + ) + """ + def testAssignmentSubmissionHistoryAttachment(self): """Test AssignmentSubmissionHistoryAttachment""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionHistoryAttachment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_history_state.py b/test/test_assignment_submission_history_state.py index 172331f..6e0357e 100644 --- a/test/test_assignment_submission_history_state.py +++ b/test/test_assignment_submission_history_state.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_history_state import AssignmentSubmissionHistoryState +import unittest +from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState class TestAssignmentSubmissionHistoryState(unittest.TestCase): """AssignmentSubmissionHistoryState unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testAssignmentSubmissionHistoryState(self): """Test AssignmentSubmissionHistoryState""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionHistoryState() # noqa: E501 - pass - + # inst = AssignmentSubmissionHistoryState() if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_lti.py b/test/test_assignment_submission_lti.py new file mode 100644 index 0000000..06c386a --- /dev/null +++ b/test/test_assignment_submission_lti.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti + +class TestAssignmentSubmissionLti(unittest.TestCase): + """AssignmentSubmissionLti unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssignmentSubmissionLti: + """Test AssignmentSubmissionLti + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionLti` + """ + model = AssignmentSubmissionLti() + if include_optional: + return AssignmentSubmissionLti( + sourcedid = '' + ) + else: + return AssignmentSubmissionLti( + sourcedid = '', + ) + """ + + def testAssignmentSubmissionLti(self): + """Test AssignmentSubmissionLti""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_playback_inner.py b/test/test_assignment_submission_playback_inner.py new file mode 100644 index 0000000..53d9c8b --- /dev/null +++ b/test/test_assignment_submission_playback_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner + +class TestAssignmentSubmissionPlaybackInner(unittest.TestCase): + """AssignmentSubmissionPlaybackInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssignmentSubmissionPlaybackInner: + """Test AssignmentSubmissionPlaybackInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionPlaybackInner` + """ + model = AssignmentSubmissionPlaybackInner() + if include_optional: + return AssignmentSubmissionPlaybackInner( + score = '', + nb_play_attempt = 1.337 + ) + else: + return AssignmentSubmissionPlaybackInner( + score = '', + nb_play_attempt = 1.337, + ) + """ + + def testAssignmentSubmissionPlaybackInner(self): + """Test AssignmentSubmissionPlaybackInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assignment_submission_state.py b/test/test_assignment_submission_state.py index f75b1c1..826d569 100644 --- a/test/test_assignment_submission_state.py +++ b/test/test_assignment_submission_state.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_state import AssignmentSubmissionState +import unittest +from flat_api.models.assignment_submission_state import AssignmentSubmissionState class TestAssignmentSubmissionState(unittest.TestCase): """AssignmentSubmissionState unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testAssignmentSubmissionState(self): """Test AssignmentSubmissionState""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionState() # noqa: E501 - pass - + # inst = AssignmentSubmissionState() if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_update.py b/test/test_assignment_submission_update.py index fc471de..ea3e9d9 100644 --- a/test/test_assignment_submission_update.py +++ b/test/test_assignment_submission_update.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments -from flat_api.model.class_attachment_creation import ClassAttachmentCreation -globals()['AssignmentSubmissionUpdateComments'] = AssignmentSubmissionUpdateComments -globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -from flat_api.model.assignment_submission_update import AssignmentSubmissionUpdate +import unittest +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate class TestAssignmentSubmissionUpdate(unittest.TestCase): """AssignmentSubmissionUpdate unit test stubs""" @@ -29,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentSubmissionUpdate: + """Test AssignmentSubmissionUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentSubmissionUpdate` + """ + model = AssignmentSubmissionUpdate() + if include_optional: + return AssignmentSubmissionUpdate( + attachments = [ + {"type":"flat","score":"000000000000000001","sharingMode":"copy"} + ], + submit = True, + draft_grade = 0, + grade = 0, + exercises_ids = [ + '' + ], + var_return = True + ) + else: + return AssignmentSubmissionUpdate( + ) + """ + def testAssignmentSubmissionUpdate(self): """Test AssignmentSubmissionUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_type.py b/test/test_assignment_type.py index 4502497..d96e979 100644 --- a/test/test_assignment_type.py +++ b/test/test_assignment_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_type import AssignmentType +import unittest +from flat_api.models.assignment_type import AssignmentType class TestAssignmentType(unittest.TestCase): """AssignmentType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testAssignmentType(self): """Test AssignmentType""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentType() # noqa: E501 - pass - + # inst = AssignmentType() if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_update.py b/test/test_assignment_update.py index 68a2b00..d61f75c 100644 --- a/test/test_assignment_update.py +++ b/test/test_assignment_update.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_attachment_creation import ClassAttachmentCreation -globals()['AssignmentType'] = AssignmentType -globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -from flat_api.model.assignment_update import AssignmentUpdate +import unittest +from flat_api.models.assignment_update import AssignmentUpdate class TestAssignmentUpdate(unittest.TestCase): """AssignmentUpdate unit test stubs""" @@ -29,12 +26,39 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssignmentUpdate: + """Test AssignmentUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignmentUpdate` + """ + model = AssignmentUpdate() + if include_optional: + return AssignmentUpdate( + type = 'none', + title = '0', + description = '', + attachments = [ + {"type":"flat","score":"000000000000000001","sharingMode":"copy"} + ], + nb_playback_authorized = 1.337, + toolset = '', + cover_file = '', + cover = '', + max_points = 0, + release_grades = 'auto', + shuffle_exercises = True + ) + else: + return AssignmentUpdate( + ) + """ + def testAssignmentUpdate(self): """Test AssignmentUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_api.py b/test/test_class_api.py index d7a7fac..40dbfb3 100644 --- a/test/test_class_api.py +++ b/test/test_class_api.py @@ -1,236 +1,239 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.class_api import ClassApi # noqa: E501 +from flat_api.api.class_api import ClassApi class TestClassApi(unittest.TestCase): """ClassApi unit test stubs""" - def setUp(self): - self.api = ClassApi() # noqa: E501 + def setUp(self) -> None: + self.api = ClassApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_activate_class(self): + def test_activate_class(self) -> None: """Test case for activate_class - Activate the class # noqa: E501 + Activate the class """ pass - def test_add_class_user(self): + def test_add_class_user(self) -> None: """Test case for add_class_user - Add a user to the class # noqa: E501 + Add a user to the class """ pass - def test_archive_assignment(self): + def test_archive_assignment(self) -> None: """Test case for archive_assignment - Archive the assignment # noqa: E501 + Archive the assignment """ pass - def test_archive_class(self): + def test_archive_class(self) -> None: """Test case for archive_class - Archive the class # noqa: E501 + Archive the class """ pass - def test_copy_assignment(self): + def test_copy_assignment(self) -> None: """Test case for copy_assignment - Copy an assignment # noqa: E501 + Copy an assignment """ pass - def test_create_class(self): + def test_create_class(self) -> None: """Test case for create_class - Create a new class # noqa: E501 + Create a new class """ pass - def test_create_class_assignment(self): + def test_create_class_assignment(self) -> None: """Test case for create_class_assignment - Assignment creation # noqa: E501 + Assignment creation """ pass - def test_create_submission(self): + def test_create_submission(self) -> None: """Test case for create_submission - Create or edit a submission # noqa: E501 + Create or edit a submission """ pass - def test_create_test_student_account(self): + def test_create_test_student_account(self) -> None: """Test case for create_test_student_account - Create a test student account # noqa: E501 + Create a test student account """ pass - def test_delete_class_user(self): + def test_delete_class_user(self) -> None: """Test case for delete_class_user - Remove a user from the class # noqa: E501 + Remove a user from the class """ pass - def test_delete_submission(self): + def test_delete_submission(self) -> None: """Test case for delete_submission - Reset a submission # noqa: E501 + Reset a submission """ pass - def test_delete_submission_comment(self): + def test_delete_submission_comment(self) -> None: """Test case for delete_submission_comment - Delete a feedback comment to a submission # noqa: E501 + Delete a feedback comment to a submission """ pass - def test_edit_submission(self): + def test_edit_submission(self) -> None: """Test case for edit_submission - Edit a submission # noqa: E501 + Edit a submission """ pass - def test_enroll_class(self): + def test_enroll_class(self) -> None: """Test case for enroll_class - Join a class # noqa: E501 + Join a class """ pass - def test_export_submissions_reviews_as_csv(self): + def test_export_submissions_reviews_as_csv(self) -> None: """Test case for export_submissions_reviews_as_csv - CSV Grades exports # noqa: E501 + CSV Grades exports """ pass - def test_export_submissions_reviews_as_excel(self): + def test_export_submissions_reviews_as_excel(self) -> None: """Test case for export_submissions_reviews_as_excel - Excel Grades exports # noqa: E501 + Excel Grades exports """ pass - def test_get_class(self): + def test_get_class(self) -> None: """Test case for get_class - Get the details of a single class # noqa: E501 + Get the details of a single class """ pass - def test_get_score_submissions(self): + def test_get_score_submissions(self) -> None: """Test case for get_score_submissions - List submissions related to the score # noqa: E501 + List submissions related to the score """ pass - def test_get_submission(self): + def test_get_submission(self) -> None: """Test case for get_submission - Get a student submission # noqa: E501 + Get a student submission """ pass - def test_get_submission_comments(self): + def test_get_submission_comments(self) -> None: """Test case for get_submission_comments - List the feedback comments of a submission # noqa: E501 + List the feedback comments of a submission """ pass - def test_get_submission_history(self): + def test_get_submission_history(self) -> None: """Test case for get_submission_history - Get the history of the submission # noqa: E501 + Get the history of the submission """ pass - def test_get_submissions(self): + def test_get_submissions(self) -> None: """Test case for get_submissions - List the students' submissions # noqa: E501 + List the students' submissions """ pass - def test_list_assignments(self): + def test_list_assignments(self) -> None: """Test case for list_assignments - Assignments listing # noqa: E501 + Assignments listing """ pass - def test_list_class_student_submissions(self): + def test_list_class_student_submissions(self) -> None: """Test case for list_class_student_submissions - List the submissions for a student # noqa: E501 + List the submissions for a student """ pass - def test_list_classes(self): + def test_list_classes(self) -> None: """Test case for list_classes - List the classes available for the current user # noqa: E501 + List the classes available for the current user """ pass - def test_post_submission_comment(self): + def test_post_submission_comment(self) -> None: """Test case for post_submission_comment - Add a feedback comment to a submission # noqa: E501 + Add a feedback comment to a submission """ pass - def test_unarchive_assignment(self): + def test_unarchive_assignment(self) -> None: """Test case for unarchive_assignment - Unarchive the assignment. # noqa: E501 + Unarchive the assignment. """ pass - def test_unarchive_class(self): + def test_unarchive_class(self) -> None: """Test case for unarchive_class - Unarchive the class # noqa: E501 + Unarchive the class """ pass - def test_update_class(self): + def test_update_class(self) -> None: """Test case for update_class - Update the class # noqa: E501 + Update the class """ pass - def test_update_submission_comment(self): + def test_update_submission_comment(self) -> None: """Test case for update_submission_comment - Update a feedback comment to a submission # noqa: E501 + Update a feedback comment to a submission """ pass diff --git a/test/test_class_assignment.py b/test/test_class_assignment.py index 0e10d38..2d5b6f1 100644 --- a/test/test_class_assignment.py +++ b/test/test_class_assignment.py @@ -1,38 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.model.assignment_submission import AssignmentSubmission -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas -from flat_api.model.class_assignment_lti import ClassAssignmentLti -from flat_api.model.class_assignment_mfc import ClassAssignmentMfc -from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.model.media_attachment import MediaAttachment -from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment -globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities -globals()['AssignmentSubmission'] = AssignmentSubmission -globals()['AssignmentType'] = AssignmentType -globals()['ClassAssignmentCanvas'] = ClassAssignmentCanvas -globals()['ClassAssignmentLti'] = ClassAssignmentLti -globals()['ClassAssignmentMfc'] = ClassAssignmentMfc -globals()['GoogleClassroomCoursework'] = GoogleClassroomCoursework -globals()['MediaAttachment'] = MediaAttachment -globals()['MicrosoftGraphAssignment'] = MicrosoftGraphAssignment -from flat_api.model.class_assignment import ClassAssignment +import unittest +from flat_api.models.class_assignment import ClassAssignment class TestClassAssignment(unittest.TestCase): """ClassAssignment unit test stubs""" @@ -43,12 +26,87 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignment: + """Test ClassAssignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignment` + """ + model = ClassAssignment() + if include_optional: + return ClassAssignment( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + description = '', + cover = '', + cover_file = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + use_dedicated_attachments = True, + max_points = 1.337, + release_grades = 'auto', + shuffle_exercises = True, + toolset = '', + nb_playback_authorized = 1.337, + creator = '', + state = 'draft', + classroom = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + assignee_mode = 'everyone', + assigned_students = [ + '' + ], + submissions = [ + {"id":"58c4955c226ffff257211a90","classroom":"58c4725345cd836264f0b29e","assignment":"58c49068524c03ec576ca43c","creator":"559eb5c7f0d4d5e46d03781d","creationDate":"2020-08-12T00:25:00.748000Z","submissionDate":"2020-08-12T00:45:22.748000Z","attachments":[{"type":"flat","score":"58c4955a226ffff257211a8d","title":"Hello - Student"}],"returnDate":"2020-08-15T00:25:00.748000Z","returnCreator":"559eb5c7f0d4d5e46d000000","grade":80,"draftGrade":82,"googleClassroom":{"id":"CgsI-00000000000","state":"turned_in","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/submissions/student/my-submission"}} + ], + google_classroom = {"id":"1235665432","state":"draft","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/detail"}, + microsoft_graph = {"id":"8e460d32-d2d4-46b3-8e1a-9b7677a48fda","state":"draft","alternateLink":"https://teams.microsoft.com/l/entity","categories":["0a012acd-6e78-4cd0-89a9-80d296e48f82"]}, + mfc = flat_api.models.class_assignment_mfc.ClassAssignment_mfc( + id = '', + alternate_link = '', ), + canvas = flat_api.models.class_assignment_canvas.ClassAssignment_canvas( + id = '', + alternate_link = '', ), + lti = flat_api.models.class_assignment_lti.ClassAssignment_lti( + id = '', ), + issue = '' + ) + else: + return ClassAssignment( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + ) + """ + def testClassAssignment(self): """Test ClassAssignment""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_canvas.py b/test/test_class_assignment_canvas.py index 4c0098c..665bef5 100644 --- a/test/test_class_assignment_canvas.py +++ b/test/test_class_assignment_canvas.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_assignment_canvas import ClassAssignmentCanvas +import unittest +from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas class TestClassAssignmentCanvas(unittest.TestCase): """ClassAssignmentCanvas unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentCanvas: + """Test ClassAssignmentCanvas + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentCanvas` + """ + model = ClassAssignmentCanvas() + if include_optional: + return ClassAssignmentCanvas( + id = '', + alternate_link = '' + ) + else: + return ClassAssignmentCanvas( + ) + """ + def testClassAssignmentCanvas(self): """Test ClassAssignmentCanvas""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentCanvas() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_lti.py b/test/test_class_assignment_lti.py index 0b26665..d4d5045 100644 --- a/test/test_class_assignment_lti.py +++ b/test/test_class_assignment_lti.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_assignment_lti import ClassAssignmentLti +import unittest +from flat_api.models.class_assignment_lti import ClassAssignmentLti class TestClassAssignmentLti(unittest.TestCase): """ClassAssignmentLti unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentLti: + """Test ClassAssignmentLti + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentLti` + """ + model = ClassAssignmentLti() + if include_optional: + return ClassAssignmentLti( + id = '' + ) + else: + return ClassAssignmentLti( + ) + """ + def testClassAssignmentLti(self): """Test ClassAssignmentLti""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentLti() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_mfc.py b/test/test_class_assignment_mfc.py index 7eb04f3..e6eed45 100644 --- a/test/test_class_assignment_mfc.py +++ b/test/test_class_assignment_mfc.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_assignment_mfc import ClassAssignmentMfc +import unittest +from flat_api.models.class_assignment_mfc import ClassAssignmentMfc class TestClassAssignmentMfc(unittest.TestCase): """ClassAssignmentMfc unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentMfc: + """Test ClassAssignmentMfc + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentMfc` + """ + model = ClassAssignmentMfc() + if include_optional: + return ClassAssignmentMfc( + id = '', + alternate_link = '' + ) + else: + return ClassAssignmentMfc( + ) + """ + def testClassAssignmentMfc(self): """Test ClassAssignmentMfc""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentMfc() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_update.py b/test/test_class_assignment_update.py index a3751d0..c29ef7d 100644 --- a/test/test_class_assignment_update.py +++ b/test/test_class_assignment_update.py @@ -1,28 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom -from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph -from flat_api.model.class_attachment_creation import ClassAttachmentCreation -globals()['AssignmentType'] = AssignmentType -globals()['ClassAssignmentUpdateGoogleClassroom'] = ClassAssignmentUpdateGoogleClassroom -globals()['ClassAssignmentUpdateMicrosoftGraph'] = ClassAssignmentUpdateMicrosoftGraph -globals()['ClassAttachmentCreation'] = ClassAttachmentCreation -from flat_api.model.class_assignment_update import ClassAssignmentUpdate +import unittest +from flat_api.models.class_assignment_update import ClassAssignmentUpdate class TestClassAssignmentUpdate(unittest.TestCase): """ClassAssignmentUpdate unit test stubs""" @@ -33,12 +26,52 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentUpdate: + """Test ClassAssignmentUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentUpdate` + """ + model = ClassAssignmentUpdate() + if include_optional: + return ClassAssignmentUpdate( + type = 'none', + title = '0', + description = '', + attachments = [ + {"type":"flat","score":"000000000000000001","sharingMode":"copy"} + ], + nb_playback_authorized = 1.337, + toolset = '', + cover_file = '', + cover = '', + max_points = 0, + release_grades = 'auto', + shuffle_exercises = True, + state = 'draft', + due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + google_classroom = flat_api.models.class_assignment_update_google_classroom.ClassAssignmentUpdate_googleClassroom( + topic_id = '', ), + microsoft_graph = flat_api.models.class_assignment_update_microsoft_graph.ClassAssignmentUpdate_microsoftGraph( + categories = [ + '' + ], ), + assignee_mode = 'everyone', + assigned_students = [ + '' + ] + ) + else: + return ClassAssignmentUpdate( + ) + """ + def testClassAssignmentUpdate(self): """Test ClassAssignmentUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_update_google_classroom.py b/test/test_class_assignment_update_google_classroom.py index fff3c13..a60d32f 100644 --- a/test/test_class_assignment_update_google_classroom.py +++ b/test/test_class_assignment_update_google_classroom.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom +import unittest +from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom class TestClassAssignmentUpdateGoogleClassroom(unittest.TestCase): """ClassAssignmentUpdateGoogleClassroom unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentUpdateGoogleClassroom: + """Test ClassAssignmentUpdateGoogleClassroom + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentUpdateGoogleClassroom` + """ + model = ClassAssignmentUpdateGoogleClassroom() + if include_optional: + return ClassAssignmentUpdateGoogleClassroom( + topic_id = '' + ) + else: + return ClassAssignmentUpdateGoogleClassroom( + ) + """ + def testClassAssignmentUpdateGoogleClassroom(self): """Test ClassAssignmentUpdateGoogleClassroom""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentUpdateGoogleClassroom() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_assignment_update_microsoft_graph.py b/test/test_class_assignment_update_microsoft_graph.py index b3a7d7d..f074524 100644 --- a/test/test_class_assignment_update_microsoft_graph.py +++ b/test/test_class_assignment_update_microsoft_graph.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +import unittest +from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph class TestClassAssignmentUpdateMicrosoftGraph(unittest.TestCase): """ClassAssignmentUpdateMicrosoftGraph unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAssignmentUpdateMicrosoftGraph: + """Test ClassAssignmentUpdateMicrosoftGraph + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAssignmentUpdateMicrosoftGraph` + """ + model = ClassAssignmentUpdateMicrosoftGraph() + if include_optional: + return ClassAssignmentUpdateMicrosoftGraph( + categories = [ + '' + ] + ) + else: + return ClassAssignmentUpdateMicrosoftGraph( + ) + """ + def testClassAssignmentUpdateMicrosoftGraph(self): """Test ClassAssignmentUpdateMicrosoftGraph""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAssignmentUpdateMicrosoftGraph() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_attachment_creation.py b/test/test_class_attachment_creation.py index 52fbeba..a4a53a2 100644 --- a/test/test_class_attachment_creation.py +++ b/test/test_class_attachment_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode -globals()['MediaScoreSharingMode'] = MediaScoreSharingMode -from flat_api.model.class_attachment_creation import ClassAttachmentCreation +import unittest +from flat_api.models.class_attachment_creation import ClassAttachmentCreation class TestClassAttachmentCreation(unittest.TestCase): """ClassAttachmentCreation unit test stubs""" @@ -27,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassAttachmentCreation: + """Test ClassAttachmentCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassAttachmentCreation` + """ + model = ClassAttachmentCreation() + if include_optional: + return ClassAttachmentCreation( + type = 'rich', + score = '', + worksheet = '', + sharing_mode = 'read', + lock_score_template = True, + url = '', + google_drive_file_id = '' + ) + else: + return ClassAttachmentCreation( + ) + """ + def testClassAttachmentCreation(self): """Test ClassAttachmentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassAttachmentCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_creation.py b/test/test_class_creation.py index 3851aae..1153a06 100644 --- a/test/test_class_creation.py +++ b/test/test_class_creation.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused -globals()['ClassGradeLevel'] = ClassGradeLevel -globals()['EduSkillsFocused'] = EduSkillsFocused -from flat_api.model.class_creation import ClassCreation +import unittest +from flat_api.models.class_creation import ClassCreation class TestClassCreation(unittest.TestCase): """ClassCreation unit test stubs""" @@ -29,12 +26,34 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassCreation: + """Test ClassCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassCreation` + """ + model = ClassCreation() + if include_optional: + return ClassCreation( + name = '', + section = '', + level = 'elementary', + skills_focused = [ + 'notation' + ], + size = 0 + ) + else: + return ClassCreation( + name = '', + ) + """ + def testClassCreation(self): """Test ClassCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details.py b/test/test_class_details.py index bf98afa..9d59605 100644 --- a/test/test_class_details.py +++ b/test/test_class_details.py @@ -1,44 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_canvas import ClassDetailsCanvas -from flat_api.model.class_details_clever import ClassDetailsClever -from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom -from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive -from flat_api.model.class_details_issues import ClassDetailsIssues -from flat_api.model.class_details_lti import ClassDetailsLti -from flat_api.model.class_details_mfc import ClassDetailsMfc -from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.class_state import ClassState -from flat_api.model.edu_skills_focused import EduSkillsFocused -from flat_api.model.group_details import GroupDetails -globals()['ClassDetailsCanvas'] = ClassDetailsCanvas -globals()['ClassDetailsClever'] = ClassDetailsClever -globals()['ClassDetailsGoogleClassroom'] = ClassDetailsGoogleClassroom -globals()['ClassDetailsGoogleDrive'] = ClassDetailsGoogleDrive -globals()['ClassDetailsIssues'] = ClassDetailsIssues -globals()['ClassDetailsLti'] = ClassDetailsLti -globals()['ClassDetailsMfc'] = ClassDetailsMfc -globals()['ClassDetailsMicrosoftGraph'] = ClassDetailsMicrosoftGraph -globals()['ClassGradeLevel'] = ClassGradeLevel -globals()['ClassState'] = ClassState -globals()['EduSkillsFocused'] = EduSkillsFocused -globals()['GroupDetails'] = GroupDetails -from flat_api.model.class_details import ClassDetails +import unittest +from flat_api.models.class_details import ClassDetails class TestClassDetails(unittest.TestCase): """ClassDetails unit test stubs""" @@ -49,12 +26,78 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetails: + """Test ClassDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetails` + """ + model = ClassDetails() + if include_optional: + return ClassDetails( + id = '', + state = 'active', + name = '', + section = '', + description = '', + organization = '', + owner = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + enrollment_code = '', + theme = '', + assignments_count = 1.337, + students_group = {"id":"58c4955c226ffff257211a00","name":"5th Grade - Teachers","type":"classTeachers","organization":"0000000000000000000000042","creationDate":"2017-07-02T15:02:40.207000Z","usersCount":2,"readOnly":false}, + teachers_group = {"id":"58c4955c226ffff257211a00","name":"5th Grade - Teachers","type":"classTeachers","organization":"0000000000000000000000042","creationDate":"2017-07-02T15:02:40.207000Z","usersCount":2,"readOnly":false}, + issues = flat_api.models.class_details_issues.ClassDetails_issues( + sync = [ + flat_api.models.class_details_issues_sync_inner.ClassDetails_issues_sync_inner( + id = '', + email = '', + reason = 'otherOrgnanization', ) + ], ), + google_classroom = flat_api.models.class_details_google_classroom.ClassDetails_googleClassroom( + id = '', + alternate_link = '', ), + google_drive = flat_api.models.class_details_google_drive.ClassDetails_googleDrive( + teacher_folder_id = '', + teacher_folder_alternate_link = '', ), + microsoft_graph = flat_api.models.class_details_microsoft_graph.ClassDetails_microsoftGraph( + id = '', ), + lti = flat_api.models.class_details_lti.ClassDetails_lti( + context_id = '', + context_title = '', + context_label = '', ), + canvas = flat_api.models.class_details_canvas.ClassDetails_canvas( + id = '', + domain = '', ), + mfc = flat_api.models.class_details_mfc.ClassDetails_mfc( + id = '', + alternate_link = '', ), + clever = flat_api.models.class_details_clever.ClassDetails_clever( + id = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + subject = 'english/language arts', + term_name = '', + term_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + term_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + level = 'elementary', + skills_focused = [ + 'notation' + ], + size = 1.337 + ) + else: + return ClassDetails( + id = '', + ) + """ + def testClassDetails(self): """Test ClassDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetails() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py index bbadfbf..4b94bc2 100644 --- a/test/test_class_details_canvas.py +++ b/test/test_class_details_canvas.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_canvas import ClassDetailsCanvas +import unittest +from flat_api.models.class_details_canvas import ClassDetailsCanvas class TestClassDetailsCanvas(unittest.TestCase): """ClassDetailsCanvas unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsCanvas: + """Test ClassDetailsCanvas + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsCanvas` + """ + model = ClassDetailsCanvas() + if include_optional: + return ClassDetailsCanvas( + id = '', + domain = '' + ) + else: + return ClassDetailsCanvas( + ) + """ + def testClassDetailsCanvas(self): """Test ClassDetailsCanvas""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsCanvas() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py index f11a383..0d5bb64 100644 --- a/test/test_class_details_clever.py +++ b/test/test_class_details_clever.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_clever import ClassDetailsClever +import unittest +from flat_api.models.class_details_clever import ClassDetailsClever class TestClassDetailsClever(unittest.TestCase): """ClassDetailsClever unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsClever: + """Test ClassDetailsClever + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsClever` + """ + model = ClassDetailsClever() + if include_optional: + return ClassDetailsClever( + id = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + subject = 'english/language arts', + term_name = '', + term_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + term_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ClassDetailsClever( + ) + """ + def testClassDetailsClever(self): """Test ClassDetailsClever""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsClever() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py index b069fba..0743a3e 100644 --- a/test/test_class_details_google_classroom.py +++ b/test/test_class_details_google_classroom.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_google_classroom import ClassDetailsGoogleClassroom +import unittest +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom class TestClassDetailsGoogleClassroom(unittest.TestCase): """ClassDetailsGoogleClassroom unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsGoogleClassroom: + """Test ClassDetailsGoogleClassroom + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsGoogleClassroom` + """ + model = ClassDetailsGoogleClassroom() + if include_optional: + return ClassDetailsGoogleClassroom( + id = '', + alternate_link = '' + ) + else: + return ClassDetailsGoogleClassroom( + ) + """ + def testClassDetailsGoogleClassroom(self): """Test ClassDetailsGoogleClassroom""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsGoogleClassroom() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py index 65f5f05..297b0b9 100644 --- a/test/test_class_details_google_drive.py +++ b/test/test_class_details_google_drive.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_google_drive import ClassDetailsGoogleDrive +import unittest +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive class TestClassDetailsGoogleDrive(unittest.TestCase): """ClassDetailsGoogleDrive unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsGoogleDrive: + """Test ClassDetailsGoogleDrive + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsGoogleDrive` + """ + model = ClassDetailsGoogleDrive() + if include_optional: + return ClassDetailsGoogleDrive( + teacher_folder_id = '', + teacher_folder_alternate_link = '' + ) + else: + return ClassDetailsGoogleDrive( + ) + """ + def testClassDetailsGoogleDrive(self): """Test ClassDetailsGoogleDrive""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsGoogleDrive() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_issues.py b/test/test_class_details_issues.py index d9dd609..5b9a259 100644 --- a/test/test_class_details_issues.py +++ b/test/test_class_details_issues.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner -globals()['ClassDetailsIssuesSyncInner'] = ClassDetailsIssuesSyncInner -from flat_api.model.class_details_issues import ClassDetailsIssues +import unittest +from flat_api.models.class_details_issues import ClassDetailsIssues class TestClassDetailsIssues(unittest.TestCase): """ClassDetailsIssues unit test stubs""" @@ -27,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsIssues: + """Test ClassDetailsIssues + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsIssues` + """ + model = ClassDetailsIssues() + if include_optional: + return ClassDetailsIssues( + sync = [ + flat_api.models.class_details_issues_sync_inner.ClassDetails_issues_sync_inner( + id = '', + email = '', + reason = 'otherOrgnanization', ) + ] + ) + else: + return ClassDetailsIssues( + ) + """ + def testClassDetailsIssues(self): """Test ClassDetailsIssues""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsIssues() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_issues_sync_inner.py b/test/test_class_details_issues_sync_inner.py index fc158b0..799dbd6 100644 --- a/test/test_class_details_issues_sync_inner.py +++ b/test/test_class_details_issues_sync_inner.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +import unittest +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner class TestClassDetailsIssuesSyncInner(unittest.TestCase): """ClassDetailsIssuesSyncInner unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsIssuesSyncInner: + """Test ClassDetailsIssuesSyncInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsIssuesSyncInner` + """ + model = ClassDetailsIssuesSyncInner() + if include_optional: + return ClassDetailsIssuesSyncInner( + id = '', + email = '', + reason = 'otherOrgnanization' + ) + else: + return ClassDetailsIssuesSyncInner( + ) + """ + def testClassDetailsIssuesSyncInner(self): """Test ClassDetailsIssuesSyncInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsIssuesSyncInner() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py index 1757419..1ea9367 100644 --- a/test/test_class_details_lti.py +++ b/test/test_class_details_lti.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_lti import ClassDetailsLti +import unittest +from flat_api.models.class_details_lti import ClassDetailsLti class TestClassDetailsLti(unittest.TestCase): """ClassDetailsLti unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsLti: + """Test ClassDetailsLti + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsLti` + """ + model = ClassDetailsLti() + if include_optional: + return ClassDetailsLti( + context_id = '', + context_title = '', + context_label = '' + ) + else: + return ClassDetailsLti( + ) + """ + def testClassDetailsLti(self): """Test ClassDetailsLti""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsLti() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_mfc.py b/test/test_class_details_mfc.py index 1382fd1..72d26b3 100644 --- a/test/test_class_details_mfc.py +++ b/test/test_class_details_mfc.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_mfc import ClassDetailsMfc +import unittest +from flat_api.models.class_details_mfc import ClassDetailsMfc class TestClassDetailsMfc(unittest.TestCase): """ClassDetailsMfc unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsMfc: + """Test ClassDetailsMfc + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsMfc` + """ + model = ClassDetailsMfc() + if include_optional: + return ClassDetailsMfc( + id = '', + alternate_link = '' + ) + else: + return ClassDetailsMfc( + ) + """ + def testClassDetailsMfc(self): """Test ClassDetailsMfc""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsMfc() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_details_microsoft_graph.py b/test/test_class_details_microsoft_graph.py index 8e9e3a4..12ccac2 100644 --- a/test/test_class_details_microsoft_graph.py +++ b/test/test_class_details_microsoft_graph.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +import unittest +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph class TestClassDetailsMicrosoftGraph(unittest.TestCase): """ClassDetailsMicrosoftGraph unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassDetailsMicrosoftGraph: + """Test ClassDetailsMicrosoftGraph + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassDetailsMicrosoftGraph` + """ + model = ClassDetailsMicrosoftGraph() + if include_optional: + return ClassDetailsMicrosoftGraph( + id = '' + ) + else: + return ClassDetailsMicrosoftGraph( + ) + """ + def testClassDetailsMicrosoftGraph(self): """Test ClassDetailsMicrosoftGraph""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassDetailsMicrosoftGraph() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_class_grade_level.py b/test/test_class_grade_level.py index 4e15569..5080ae9 100644 --- a/test/test_class_grade_level.py +++ b/test/test_class_grade_level.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_grade_level import ClassGradeLevel +import unittest +from flat_api.models.class_grade_level import ClassGradeLevel class TestClassGradeLevel(unittest.TestCase): """ClassGradeLevel unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testClassGradeLevel(self): """Test ClassGradeLevel""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassGradeLevel() # noqa: E501 - pass - + # inst = ClassGradeLevel() if __name__ == '__main__': unittest.main() diff --git a/test/test_class_roles.py b/test/test_class_roles.py index 93d613c..6df26cb 100644 --- a/test/test_class_roles.py +++ b/test/test_class_roles.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_roles import ClassRoles +import unittest +from flat_api.models.class_roles import ClassRoles class TestClassRoles(unittest.TestCase): """ClassRoles unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testClassRoles(self): """Test ClassRoles""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassRoles() # noqa: E501 - pass - + # inst = ClassRoles() if __name__ == '__main__': unittest.main() diff --git a/test/test_class_state.py b/test/test_class_state.py index c599c4d..bcb66b0 100644 --- a/test/test_class_state.py +++ b/test/test_class_state.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_state import ClassState +import unittest +from flat_api.models.class_state import ClassState class TestClassState(unittest.TestCase): """ClassState unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testClassState(self): """Test ClassState""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassState() # noqa: E501 - pass - + # inst = ClassState() if __name__ == '__main__': unittest.main() diff --git a/test/test_class_update.py b/test/test_class_update.py index af1062f..124ee35 100644 --- a/test/test_class_update.py +++ b/test/test_class_update.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_grade_level import ClassGradeLevel -from flat_api.model.edu_skills_focused import EduSkillsFocused -globals()['ClassGradeLevel'] = ClassGradeLevel -globals()['EduSkillsFocused'] = EduSkillsFocused -from flat_api.model.class_update import ClassUpdate +import unittest +from flat_api.models.class_update import ClassUpdate class TestClassUpdate(unittest.TestCase): """ClassUpdate unit test stubs""" @@ -29,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ClassUpdate: + """Test ClassUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClassUpdate` + """ + model = ClassUpdate() + if include_optional: + return ClassUpdate( + name = '', + section = '', + level = 'elementary', + skills_focused = [ + 'notation' + ], + size = 0 + ) + else: + return ClassUpdate( + ) + """ + def testClassUpdate(self): """Test ClassUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = ClassUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection.py b/test/test_collection.py index 1239d29..726f669 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -1,34 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_app import CollectionApp -from flat_api.model.collection_capabilities import CollectionCapabilities -from flat_api.model.collection_privacy import CollectionPrivacy -from flat_api.model.collection_type import CollectionType -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.user_public_summary import UserPublicSummary -globals()['CollectionApp'] = CollectionApp -globals()['CollectionCapabilities'] = CollectionCapabilities -globals()['CollectionPrivacy'] = CollectionPrivacy -globals()['CollectionType'] = CollectionType -globals()['ResourceCollaborator'] = ResourceCollaborator -globals()['ResourceRights'] = ResourceRights -globals()['UserPublicSummary'] = UserPublicSummary -from flat_api.model.collection import Collection +import unittest +from flat_api.models.collection import Collection class TestCollection(unittest.TestCase): """Collection unit test stubs""" @@ -39,12 +26,121 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Collection: + """Test Collection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Collection` + """ + model = Collection() + if include_optional: + return Collection( + id = '', + title = '', + html_url = '', + type = 'root', + privacy = 'private', + sharing_key = '', + app = flat_api.models.collection_app.CollectionApp( + id = '', + name = '', + logo = '', ), + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + user = flat_api.models.user_public_summary.UserPublicSummary( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', ), + organization = '', + rights = {"aclRead":true,"aclWrite":true,"aclAdmin":true,"isCollaborator":true}, + collaborators = [ + flat_api.models.resource_collaborator.ResourceCollaborator( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + collaborator_type = 'owner', + id = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = '', + collection = '', + user = flat_api.models.user_public.UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), ), + group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, + user_email = '', + invited = True, ) + ], + capabilities = flat_api.models.collection_capabilities.Collection_capabilities( + can_edit = True, + can_share = True, + can_delete = True, + can_add_scores = True, + can_delete_scores = True, ), + collections = [ + '' + ] + ) + else: + return Collection( + capabilities = flat_api.models.collection_capabilities.Collection_capabilities( + can_edit = True, + can_share = True, + can_delete = True, + can_add_scores = True, + can_delete_scores = True, ), + ) + """ + def testCollection(self): """Test Collection""" - # FIXME: construct object with mandatory attributes with example values - # model = Collection() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_api.py b/test/test_collection_api.py index 6323c73..fe1bd62 100644 --- a/test/test_collection_api.py +++ b/test/test_collection_api.py @@ -1,89 +1,92 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.collection_api import CollectionApi # noqa: E501 +from flat_api.api.collection_api import CollectionApi class TestCollectionApi(unittest.TestCase): """CollectionApi unit test stubs""" - def setUp(self): - self.api = CollectionApi() # noqa: E501 + def setUp(self) -> None: + self.api = CollectionApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_add_score_to_collection(self): + def test_add_score_to_collection(self) -> None: """Test case for add_score_to_collection - Add a score to the collection # noqa: E501 + Add a score to the collection """ pass - def test_create_collection(self): + def test_create_collection(self) -> None: """Test case for create_collection - Create a new collection # noqa: E501 + Create a new collection """ pass - def test_delete_collection(self): + def test_delete_collection(self) -> None: """Test case for delete_collection - Delete the collection # noqa: E501 + Delete the collection """ pass - def test_delete_score_from_collection(self): + def test_delete_score_from_collection(self) -> None: """Test case for delete_score_from_collection - Delete a score from the collection # noqa: E501 + Delete a score from the collection """ pass - def test_edit_collection(self): + def test_edit_collection(self) -> None: """Test case for edit_collection - Update a collection's metadata # noqa: E501 + Update a collection's metadata """ pass - def test_get_collection(self): + def test_get_collection(self) -> None: """Test case for get_collection - Get collection details # noqa: E501 + Get collection details """ pass - def test_list_collection_scores(self): + def test_list_collection_scores(self) -> None: """Test case for list_collection_scores - List the scores contained in a collection # noqa: E501 + List the scores contained in a collection """ pass - def test_list_collections(self): + def test_list_collections(self) -> None: """Test case for list_collections - List the collections # noqa: E501 + List the collections """ pass - def test_untrash_collection(self): + def test_untrash_collection(self) -> None: """Test case for untrash_collection - Untrash a collection # noqa: E501 + Untrash a collection """ pass diff --git a/test/test_collection_app.py b/test/test_collection_app.py index a7fd8f9..32ab923 100644 --- a/test/test_collection_app.py +++ b/test/test_collection_app.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_app import CollectionApp +import unittest +from flat_api.models.collection_app import CollectionApp class TestCollectionApp(unittest.TestCase): """CollectionApp unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CollectionApp: + """Test CollectionApp + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionApp` + """ + model = CollectionApp() + if include_optional: + return CollectionApp( + id = '', + name = '', + logo = '' + ) + else: + return CollectionApp( + ) + """ + def testCollectionApp(self): """Test CollectionApp""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionApp() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py index 46295d3..bcf7374 100644 --- a/test/test_collection_capabilities.py +++ b/test/test_collection_capabilities.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_capabilities import CollectionCapabilities +import unittest +from flat_api.models.collection_capabilities import CollectionCapabilities class TestCollectionCapabilities(unittest.TestCase): """CollectionCapabilities unit test stubs""" @@ -25,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CollectionCapabilities: + """Test CollectionCapabilities + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionCapabilities` + """ + model = CollectionCapabilities() + if include_optional: + return CollectionCapabilities( + can_edit = True, + can_share = True, + can_delete = True, + can_add_scores = True, + can_delete_scores = True + ) + else: + return CollectionCapabilities( + can_edit = True, + can_share = True, + can_delete = True, + can_add_scores = True, + can_delete_scores = True, + ) + """ + def testCollectionCapabilities(self): """Test CollectionCapabilities""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionCapabilities() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_creation.py b/test/test_collection_creation.py index 9af0553..1ecbc8c 100644 --- a/test/test_collection_creation.py +++ b/test/test_collection_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_privacy import CollectionPrivacy -globals()['CollectionPrivacy'] = CollectionPrivacy -from flat_api.model.collection_creation import CollectionCreation +import unittest +from flat_api.models.collection_creation import CollectionCreation class TestCollectionCreation(unittest.TestCase): """CollectionCreation unit test stubs""" @@ -27,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CollectionCreation: + """Test CollectionCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionCreation` + """ + model = CollectionCreation() + if include_optional: + return CollectionCreation( + title = '0', + privacy = 'private' + ) + else: + return CollectionCreation( + title = '0', + privacy = 'private', + ) + """ + def testCollectionCreation(self): """Test CollectionCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_modification.py b/test/test_collection_modification.py index 11eb488..358826d 100644 --- a/test/test_collection_modification.py +++ b/test/test_collection_modification.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_privacy import CollectionPrivacy -globals()['CollectionPrivacy'] = CollectionPrivacy -from flat_api.model.collection_modification import CollectionModification +import unittest +from flat_api.models.collection_modification import CollectionModification class TestCollectionModification(unittest.TestCase): """CollectionModification unit test stubs""" @@ -27,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> CollectionModification: + """Test CollectionModification + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CollectionModification` + """ + model = CollectionModification() + if include_optional: + return CollectionModification( + title = '0', + privacy = 'private' + ) + else: + return CollectionModification( + ) + """ + def testCollectionModification(self): """Test CollectionModification""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionModification() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_privacy.py b/test/test_collection_privacy.py index 35619f7..feff8d1 100644 --- a/test/test_collection_privacy.py +++ b/test/test_collection_privacy.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_privacy import CollectionPrivacy +import unittest +from flat_api.models.collection_privacy import CollectionPrivacy class TestCollectionPrivacy(unittest.TestCase): """CollectionPrivacy unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testCollectionPrivacy(self): """Test CollectionPrivacy""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionPrivacy() # noqa: E501 - pass - + # inst = CollectionPrivacy() if __name__ == '__main__': unittest.main() diff --git a/test/test_collection_type.py b/test/test_collection_type.py index 3ec4bba..45f62b9 100644 --- a/test/test_collection_type.py +++ b/test/test_collection_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.collection_type import CollectionType +import unittest +from flat_api.models.collection_type import CollectionType class TestCollectionType(unittest.TestCase): """CollectionType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testCollectionType(self): """Test CollectionType""" - # FIXME: construct object with mandatory attributes with example values - # model = CollectionType() # noqa: E501 - pass - + # inst = CollectionType() if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_library.py b/test/test_edu_library.py index 258afdf..d4a35f5 100644 --- a/test/test_edu_library.py +++ b/test/test_edu_library.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_library import EduLibrary +import unittest +from flat_api.models.edu_library import EduLibrary class TestEduLibrary(unittest.TestCase): """EduLibrary unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduLibrary: + """Test EduLibrary + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduLibrary` + """ + model = EduLibrary() + if include_optional: + return EduLibrary( + id = '', + name = '', + type = 'myResources', + visibility = 'private' + ) + else: + return EduLibrary( + ) + """ + def testEduLibrary(self): """Test EduLibrary""" - # FIXME: construct object with mandatory attributes with example values - # model = EduLibrary() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource.py b/test/test_edu_resource.py index 6e0e7cc..d147303 100644 --- a/test/test_edu_resource.py +++ b/test/test_edu_resource.py @@ -1,28 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_capabilities import EduResourceCapabilities -from flat_api.model.edu_resource_privacy import EduResourcePrivacy -from flat_api.model.edu_resource_resource import EduResourceResource -from flat_api.model.edu_resource_type import EduResourceType -globals()['EduResourceCapabilities'] = EduResourceCapabilities -globals()['EduResourcePrivacy'] = EduResourcePrivacy -globals()['EduResourceResource'] = EduResourceResource -globals()['EduResourceType'] = EduResourceType -from flat_api.model.edu_resource import EduResource +import unittest +from flat_api.models.edu_resource import EduResource class TestEduResource(unittest.TestCase): """EduResource unit test stubs""" @@ -33,12 +26,72 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResource: + """Test EduResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResource` + """ + model = EduResource() + if include_optional: + return EduResource( + id = '', + creator = '', + type = 'assignment', + privacy = 'private', + tags = [ + '' + ], + parent = '', + title = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + update_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resource = flat_api.models.edu_resource_resource.EduResource_resource( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + description = '', + cover = '', + cover_file = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + use_dedicated_attachments = True, + max_points = 1.337, + release_grades = 'auto', + shuffle_exercises = True, + toolset = '', + nb_playback_authorized = 1.337, ), + capabilities = flat_api.models.edu_resource_capabilities.EduResource_capabilities( + can_edit = True, + can_add_resources = True, + can_add_folders = True, ) + ) + else: + return EduResource( + id = '', + type = 'assignment', + title = '', + capabilities = flat_api.models.edu_resource_capabilities.EduResource_capabilities( + can_edit = True, + can_add_resources = True, + can_add_folders = True, ), + ) + """ + def testEduResource(self): """Test EduResource""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResource() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_capabilities.py b/test/test_edu_resource_capabilities.py index 339b154..58078e5 100644 --- a/test/test_edu_resource_capabilities.py +++ b/test/test_edu_resource_capabilities.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_capabilities import EduResourceCapabilities +import unittest +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities class TestEduResourceCapabilities(unittest.TestCase): """EduResourceCapabilities unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceCapabilities: + """Test EduResourceCapabilities + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceCapabilities` + """ + model = EduResourceCapabilities() + if include_optional: + return EduResourceCapabilities( + can_edit = True, + can_add_resources = True, + can_add_folders = True + ) + else: + return EduResourceCapabilities( + ) + """ + def testEduResourceCapabilities(self): """Test EduResourceCapabilities""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceCapabilities() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_copy.py b/test/test_edu_resource_copy.py index eca3a45..c2d2dc4 100644 --- a/test/test_edu_resource_copy.py +++ b/test/test_edu_resource_copy.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_copy import EduResourceCopy +import unittest +from flat_api.models.edu_resource_copy import EduResourceCopy class TestEduResourceCopy(unittest.TestCase): """EduResourceCopy unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceCopy: + """Test EduResourceCopy + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceCopy` + """ + model = EduResourceCopy() + if include_optional: + return EduResourceCopy( + destination = '' + ) + else: + return EduResourceCopy( + destination = '', + ) + """ + def testEduResourceCopy(self): """Test EduResourceCopy""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceCopy() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_creation.py b/test/test_edu_resource_creation.py index e91a713..6b00c3e 100644 --- a/test/test_edu_resource_creation.py +++ b/test/test_edu_resource_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_type import EduResourceType -globals()['EduResourceType'] = EduResourceType -from flat_api.model.edu_resource_creation import EduResourceCreation +import unittest +from flat_api.models.edu_resource_creation import EduResourceCreation class TestEduResourceCreation(unittest.TestCase): """EduResourceCreation unit test stubs""" @@ -27,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceCreation: + """Test EduResourceCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceCreation` + """ + model = EduResourceCreation() + if include_optional: + return EduResourceCreation( + type = 'assignment', + title = '0', + parent = 'root' + ) + else: + return EduResourceCreation( + type = 'assignment', + title = '0', + ) + """ + def testEduResourceCreation(self): """Test EduResourceCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_lti_link.py b/test/test_edu_resource_lti_link.py new file mode 100644 index 0000000..b350cf4 --- /dev/null +++ b/test/test_edu_resource_lti_link.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.20.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink + +class TestEduResourceLtiLink(unittest.TestCase): + """EduResourceLtiLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EduResourceLtiLink: + """Test EduResourceLtiLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceLtiLink` + """ + model = EduResourceLtiLink() + if include_optional: + return EduResourceLtiLink( + lti_url = '' + ) + else: + return EduResourceLtiLink( + lti_url = '', + ) + """ + + def testEduResourceLtiLink(self): + """Test EduResourceLtiLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edu_resource_move.py b/test/test_edu_resource_move.py index ec39331..833e4a9 100644 --- a/test/test_edu_resource_move.py +++ b/test/test_edu_resource_move.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_move import EduResourceMove +import unittest +from flat_api.models.edu_resource_move import EduResourceMove class TestEduResourceMove(unittest.TestCase): """EduResourceMove unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceMove: + """Test EduResourceMove + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceMove` + """ + model = EduResourceMove() + if include_optional: + return EduResourceMove( + destination = '' + ) + else: + return EduResourceMove( + destination = '', + ) + """ + def testEduResourceMove(self): """Test EduResourceMove""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceMove() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_privacy.py b/test/test_edu_resource_privacy.py index 7387269..52022e9 100644 --- a/test/test_edu_resource_privacy.py +++ b/test/test_edu_resource_privacy.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_privacy import EduResourcePrivacy +import unittest +from flat_api.models.edu_resource_privacy import EduResourcePrivacy class TestEduResourcePrivacy(unittest.TestCase): """EduResourcePrivacy unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testEduResourcePrivacy(self): """Test EduResourcePrivacy""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourcePrivacy() # noqa: E501 - pass - + # inst = EduResourcePrivacy() if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_resource.py b/test/test_edu_resource_resource.py index 1017a85..11980b2 100644 --- a/test/test_edu_resource_resource.py +++ b/test/test_edu_resource_resource.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.model.assignment_type import AssignmentType -from flat_api.model.media_attachment import MediaAttachment -globals()['AssignmentCopyResponseCapabilities'] = AssignmentCopyResponseCapabilities -globals()['AssignmentType'] = AssignmentType -globals()['MediaAttachment'] = MediaAttachment -from flat_api.model.edu_resource_resource import EduResourceResource +import unittest +from flat_api.models.edu_resource_resource import EduResourceResource class TestEduResourceResource(unittest.TestCase): """EduResourceResource unit test stubs""" @@ -31,12 +26,63 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceResource: + """Test EduResourceResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceResource` + """ + model = EduResourceResource() + if include_optional: + return EduResourceResource( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + description = '', + cover = '', + cover_file = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + use_dedicated_attachments = True, + max_points = 1.337, + release_grades = 'auto', + shuffle_exercises = True, + toolset = '', + nb_playback_authorized = 1.337 + ) + else: + return EduResourceResource( + id = '', + type = 'none', + capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( + can_edit = True, + can_publish_in_class = True, + can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( + code = '', + message = '', ), + can_archive = True, + can_unarchive = True, ), + title = '', + attachments = [ + {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} + ], + ) + """ + def testEduResourceResource(self): """Test EduResourceResource""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceResource() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_type.py b/test/test_edu_resource_type.py index 4038ca5..81cc59e 100644 --- a/test/test_edu_resource_type.py +++ b/test/test_edu_resource_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_type import EduResourceType +import unittest +from flat_api.models.edu_resource_type import EduResourceType class TestEduResourceType(unittest.TestCase): """EduResourceType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testEduResourceType(self): """Test EduResourceType""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceType() # noqa: E501 - pass - + # inst = EduResourceType() if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_update.py b/test/test_edu_resource_update.py index e4f3914..b6ca8dd 100644 --- a/test/test_edu_resource_update.py +++ b/test/test_edu_resource_update.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_update import EduResourceUpdate +import unittest +from flat_api.models.edu_resource_update import EduResourceUpdate class TestEduResourceUpdate(unittest.TestCase): """EduResourceUpdate unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceUpdate: + """Test EduResourceUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceUpdate` + """ + model = EduResourceUpdate() + if include_optional: + return EduResourceUpdate( + title = '0', + privacy = 'private' + ) + else: + return EduResourceUpdate( + ) + """ + def testEduResourceUpdate(self): """Test EduResourceUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resource_use_in_class.py b/test/test_edu_resource_use_in_class.py index 00459f3..27c2283 100644 --- a/test/test_edu_resource_use_in_class.py +++ b/test/test_edu_resource_use_in_class.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_resource_use_in_class import EduResourceUseInClass +import unittest +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass class TestEduResourceUseInClass(unittest.TestCase): """EduResourceUseInClass unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> EduResourceUseInClass: + """Test EduResourceUseInClass + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EduResourceUseInClass` + """ + model = EduResourceUseInClass() + if include_optional: + return EduResourceUseInClass( + classroom = '', + assignment = '' + ) + else: + return EduResourceUseInClass( + classroom = '', + ) + """ + def testEduResourceUseInClass(self): """Test EduResourceUseInClass""" - # FIXME: construct object with mandatory attributes with example values - # model = EduResourceUseInClass() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_resources_api.py b/test/test_edu_resources_api.py index 8ac337d..908200d 100644 --- a/test/test_edu_resources_api.py +++ b/test/test_edu_resources_api.py @@ -1,103 +1,113 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.edu_resources_api import EduResourcesApi # noqa: E501 +from flat_api.api.edu_resources_api import EduResourcesApi class TestEduResourcesApi(unittest.TestCase): """EduResourcesApi unit test stubs""" - def setUp(self): - self.api = EduResourcesApi() # noqa: E501 + def setUp(self) -> None: + self.api = EduResourcesApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_copy_edu_resource(self): + def test_copy_edu_resource(self) -> None: """Test case for copy_edu_resource - Copy an education resource to a Resource Library # noqa: E501 + Copy an education resource to a Resource Library """ pass - def test_copy_edu_resource_to_demo_class(self): + def test_copy_edu_resource_to_demo_class(self) -> None: """Test case for copy_edu_resource_to_demo_class - Copy an education assignment to a teacher demo class # noqa: E501 + Copy an education assignment to a teacher demo class """ pass - def test_create_edu_resource(self): + def test_create_edu_resource(self) -> None: """Test case for create_edu_resource - Create a new education resource # noqa: E501 + Create a new education resource + """ + pass + + def test_create_edu_resource_lti_link(self) -> None: + """Test case for create_edu_resource_lti_link + + Create an LTI link for an education resource """ pass - def test_delete_edu_resource(self): + def test_delete_edu_resource(self) -> None: """Test case for delete_edu_resource - Delete an education resource # noqa: E501 + Delete an education resource """ pass - def test_get_edu_resource(self): + def test_get_edu_resource(self) -> None: """Test case for get_edu_resource - Get an education resource # noqa: E501 + Get an education resource """ pass - def test_list_edu_libraries(self): + def test_list_edu_libraries(self) -> None: """Test case for list_edu_libraries - List the education libraries # noqa: E501 + List the education libraries """ pass - def test_list_edu_resources(self): + def test_list_edu_resources(self) -> None: """Test case for list_edu_resources - List education resources in a library or folder # noqa: E501 + List education resources in a library or folder """ pass - def test_move_edu_resource(self): + def test_move_edu_resource(self) -> None: """Test case for move_edu_resource - Move an education resource # noqa: E501 + Move an education resource """ pass - def test_update_edu_resource(self): + def test_update_edu_resource(self) -> None: """Test case for update_edu_resource - Update an education resource metadata # noqa: E501 + Update an education resource metadata """ pass - def test_update_edu_resource_assignment(self): + def test_update_edu_resource_assignment(self) -> None: """Test case for update_edu_resource_assignment - Update an education resource assignment # noqa: E501 + Update an education resource assignment """ pass - def test_use_edu_resource_in_class(self): + def test_use_edu_resource_in_class(self) -> None: """Test case for use_edu_resource_in_class - Use an education resource in a class # noqa: E501 + Use an education resource in a class """ pass diff --git a/test/test_flat_error_response.py b/test/test_flat_error_response.py index b18af07..bf5ba23 100644 --- a/test/test_flat_error_response.py +++ b/test/test_flat_error_response.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.flat_error_response import FlatErrorResponse +import unittest +from flat_api.models.flat_error_response import FlatErrorResponse class TestFlatErrorResponse(unittest.TestCase): """FlatErrorResponse unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> FlatErrorResponse: + """Test FlatErrorResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlatErrorResponse` + """ + model = FlatErrorResponse() + if include_optional: + return FlatErrorResponse( + code = '', + message = '', + id = '', + param = '' + ) + else: + return FlatErrorResponse( + code = '', + message = '', + ) + """ + def testFlatErrorResponse(self): """Test FlatErrorResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = FlatErrorResponse() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_flat_locales.py b/test/test_flat_locales.py index 02d14dd..c164475 100644 --- a/test/test_flat_locales.py +++ b/test/test_flat_locales.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.flat_locales import FlatLocales +import unittest +from flat_api.models.flat_locales import FlatLocales class TestFlatLocales(unittest.TestCase): """FlatLocales unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testFlatLocales(self): """Test FlatLocales""" - # FIXME: construct object with mandatory attributes with example values - # model = FlatLocales() # noqa: E501 - pass - + # inst = FlatLocales() if __name__ == '__main__': unittest.main() diff --git a/test/test_google_classroom_coursework.py b/test/test_google_classroom_coursework.py index 892310f..05ecca0 100644 --- a/test/test_google_classroom_coursework.py +++ b/test/test_google_classroom_coursework.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.google_classroom_coursework import GoogleClassroomCoursework +import unittest +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework class TestGoogleClassroomCoursework(unittest.TestCase): """GoogleClassroomCoursework unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> GoogleClassroomCoursework: + """Test GoogleClassroomCoursework + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GoogleClassroomCoursework` + """ + model = GoogleClassroomCoursework() + if include_optional: + return GoogleClassroomCoursework( + id = '', + state = '', + alternate_link = '', + topic_id = '' + ) + else: + return GoogleClassroomCoursework( + ) + """ + def testGoogleClassroomCoursework(self): """Test GoogleClassroomCoursework""" - # FIXME: construct object with mandatory attributes with example values - # model = GoogleClassroomCoursework() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_google_classroom_submission.py b/test/test_google_classroom_submission.py index cb25004..3207551 100644 --- a/test/test_google_classroom_submission.py +++ b/test/test_google_classroom_submission.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.google_classroom_submission import GoogleClassroomSubmission +import unittest +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission class TestGoogleClassroomSubmission(unittest.TestCase): """GoogleClassroomSubmission unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> GoogleClassroomSubmission: + """Test GoogleClassroomSubmission + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GoogleClassroomSubmission` + """ + model = GoogleClassroomSubmission() + if include_optional: + return GoogleClassroomSubmission( + id = '', + state = '', + alternate_link = '' + ) + else: + return GoogleClassroomSubmission( + id = '', + state = '', + alternate_link = '', + ) + """ + def testGoogleClassroomSubmission(self): """Test GoogleClassroomSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = GoogleClassroomSubmission() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_group.py b/test/test_group.py index 1c6fe72..3f5fb3c 100644 --- a/test/test_group.py +++ b/test/test_group.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.group import Group +import unittest +from flat_api.models.group import Group class TestGroup(unittest.TestCase): """Group unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Group: + """Test Group + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Group` + """ + model = Group() + if include_optional: + return Group( + id = '', + name = '', + type = 'generic', + users_count = 1.337, + read_only = True, + organization = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return Group( + ) + """ + def testGroup(self): """Test Group""" - # FIXME: construct object with mandatory attributes with example values - # model = Group() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_group_api.py b/test/test_group_api.py index 0d8d72c..34add5b 100644 --- a/test/test_group_api.py +++ b/test/test_group_api.py @@ -1,47 +1,50 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.group_api import GroupApi # noqa: E501 +from flat_api.api.group_api import GroupApi class TestGroupApi(unittest.TestCase): """GroupApi unit test stubs""" - def setUp(self): - self.api = GroupApi() # noqa: E501 + def setUp(self) -> None: + self.api = GroupApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_get_group_details(self): + def test_get_group_details(self) -> None: """Test case for get_group_details - Get group information # noqa: E501 + Get group information """ pass - def test_get_group_scores(self): + def test_get_group_scores(self) -> None: """Test case for get_group_scores - List group's scores # noqa: E501 + List group's scores """ pass - def test_list_group_users(self): + def test_list_group_users(self) -> None: """Test case for list_group_users - List group's users # noqa: E501 + List group's users """ pass diff --git a/test/test_group_details.py b/test/test_group_details.py index 8ade346..576df21 100644 --- a/test/test_group_details.py +++ b/test/test_group_details.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.group_type import GroupType -globals()['GroupType'] = GroupType -from flat_api.model.group_details import GroupDetails +import unittest +from flat_api.models.group_details import GroupDetails class TestGroupDetails(unittest.TestCase): """GroupDetails unit test stubs""" @@ -27,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> GroupDetails: + """Test GroupDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupDetails` + """ + model = GroupDetails() + if include_optional: + return GroupDetails( + id = '', + name = '', + type = 'generic', + organization = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + users_count = 1.337, + read_only = True + ) + else: + return GroupDetails( + ) + """ + def testGroupDetails(self): """Test GroupDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = GroupDetails() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_group_type.py b/test/test_group_type.py index febdcbd..fab9358 100644 --- a/test/test_group_type.py +++ b/test/test_group_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.group_type import GroupType +import unittest +from flat_api.models.group_type import GroupType class TestGroupType(unittest.TestCase): """GroupType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testGroupType(self): """Test GroupType""" - # FIXME: construct object with mandatory attributes with example values - # model = GroupType() # noqa: E501 - pass - + # inst = GroupType() if __name__ == '__main__': unittest.main() diff --git a/test/test_license_mode.py b/test/test_license_mode.py index 332c8ba..85d084b 100644 --- a/test/test_license_mode.py +++ b/test/test_license_mode.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.license_mode import LicenseMode +import unittest +from flat_api.models.license_mode import LicenseMode class TestLicenseMode(unittest.TestCase): """LicenseMode unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testLicenseMode(self): """Test LicenseMode""" - # FIXME: construct object with mandatory attributes with example values - # model = LicenseMode() # noqa: E501 - pass - + # inst = LicenseMode() if __name__ == '__main__': unittest.main() diff --git a/test/test_license_sources.py b/test/test_license_sources.py index 0a3af68..dc91bfa 100644 --- a/test/test_license_sources.py +++ b/test/test_license_sources.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.license_sources import LicenseSources +import unittest +from flat_api.models.license_sources import LicenseSources class TestLicenseSources(unittest.TestCase): """LicenseSources unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testLicenseSources(self): """Test LicenseSources""" - # FIXME: construct object with mandatory attributes with example values - # model = LicenseSources() # noqa: E501 - pass - + # inst = LicenseSources() if __name__ == '__main__': unittest.main() diff --git a/test/test_lms_name.py b/test/test_lms_name.py index d8675f3..3f78e8b 100644 --- a/test/test_lms_name.py +++ b/test/test_lms_name.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.lms_name import LmsName +import unittest +from flat_api.models.lms_name import LmsName class TestLmsName(unittest.TestCase): """LmsName unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testLmsName(self): """Test LmsName""" - # FIXME: construct object with mandatory attributes with example values - # model = LmsName() # noqa: E501 - pass - + # inst = LmsName() if __name__ == '__main__': unittest.main() diff --git a/test/test_lti_credentials.py b/test/test_lti_credentials.py index 23cd902..4afc657 100644 --- a/test/test_lti_credentials.py +++ b/test/test_lti_credentials.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.lms_name import LmsName -globals()['LmsName'] = LmsName -from flat_api.model.lti_credentials import LtiCredentials +import unittest +from flat_api.models.lti_credentials import LtiCredentials class TestLtiCredentials(unittest.TestCase): """LtiCredentials unit test stubs""" @@ -27,12 +26,35 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> LtiCredentials: + """Test LtiCredentials + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LtiCredentials` + """ + model = LtiCredentials() + if include_optional: + return LtiCredentials( + id = '', + name = '', + lms = 'canvas', + organization = '', + creator = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_usage = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + consumer_key = '', + consumer_secret = '' + ) + else: + return LtiCredentials( + ) + """ + def testLtiCredentials(self): """Test LtiCredentials""" - # FIXME: construct object with mandatory attributes with example values - # model = LtiCredentials() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_lti_credentials_creation.py b/test/test_lti_credentials_creation.py index 75835a7..73dee63 100644 --- a/test/test_lti_credentials_creation.py +++ b/test/test_lti_credentials_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.lms_name import LmsName -globals()['LmsName'] = LmsName -from flat_api.model.lti_credentials_creation import LtiCredentialsCreation +import unittest +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation class TestLtiCredentialsCreation(unittest.TestCase): """LtiCredentialsCreation unit test stubs""" @@ -27,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> LtiCredentialsCreation: + """Test LtiCredentialsCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LtiCredentialsCreation` + """ + model = LtiCredentialsCreation() + if include_optional: + return LtiCredentialsCreation( + name = '', + lms = 'canvas' + ) + else: + return LtiCredentialsCreation( + name = '', + lms = 'canvas', + ) + """ + def testLtiCredentialsCreation(self): """Test LtiCredentialsCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = LtiCredentialsCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_media_attachment.py b/test/test_media_attachment.py index 2f848cd..a29ebf2 100644 --- a/test/test_media_attachment.py +++ b/test/test_media_attachment.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode -globals()['MediaScoreSharingMode'] = MediaScoreSharingMode -from flat_api.model.media_attachment import MediaAttachment +import unittest +from flat_api.models.media_attachment import MediaAttachment class TestMediaAttachment(unittest.TestCase): """MediaAttachment unit test stubs""" @@ -27,12 +26,49 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> MediaAttachment: + """Test MediaAttachment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaAttachment` + """ + model = MediaAttachment() + if include_optional: + return MediaAttachment( + type = 'rich', + score = '', + revision = '', + worksheet = '', + dedicated = True, + track = '', + sharing_mode = 'read', + lock_score_template = True, + title = '', + description = '', + html = '', + html_width = '', + html_height = '', + url = '', + thumbnail_url = '', + thumbnail_width = 56, + thumbnail_height = 56, + author_name = '', + author_url = '', + icon_url = '', + mime_type = '', + google_drive_file_id = '' + ) + else: + return MediaAttachment( + type = 'rich', + ) + """ + def testMediaAttachment(self): """Test MediaAttachment""" - # FIXME: construct object with mandatory attributes with example values - # model = MediaAttachment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_media_score_sharing_mode.py b/test/test_media_score_sharing_mode.py index 354754a..6b57c6e 100644 --- a/test/test_media_score_sharing_mode.py +++ b/test/test_media_score_sharing_mode.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.media_score_sharing_mode import MediaScoreSharingMode +import unittest +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode class TestMediaScoreSharingMode(unittest.TestCase): """MediaScoreSharingMode unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testMediaScoreSharingMode(self): """Test MediaScoreSharingMode""" - # FIXME: construct object with mandatory attributes with example values - # model = MediaScoreSharingMode() # noqa: E501 - pass - + # inst = MediaScoreSharingMode() if __name__ == '__main__': unittest.main() diff --git a/test/test_microsoft_graph_assignment.py b/test/test_microsoft_graph_assignment.py index 1ada9fb..89f7a16 100644 --- a/test/test_microsoft_graph_assignment.py +++ b/test/test_microsoft_graph_assignment.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.microsoft_graph_assignment import MicrosoftGraphAssignment +import unittest +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment class TestMicrosoftGraphAssignment(unittest.TestCase): """MicrosoftGraphAssignment unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> MicrosoftGraphAssignment: + """Test MicrosoftGraphAssignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MicrosoftGraphAssignment` + """ + model = MicrosoftGraphAssignment() + if include_optional: + return MicrosoftGraphAssignment( + id = '', + state = '', + alternate_link = '', + categories = [ + '' + ] + ) + else: + return MicrosoftGraphAssignment( + ) + """ + def testMicrosoftGraphAssignment(self): """Test MicrosoftGraphAssignment""" - # FIXME: construct object with mandatory attributes with example values - # model = MicrosoftGraphAssignment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_microsoft_graph_submission.py b/test/test_microsoft_graph_submission.py index dca9ec5..5fb9324 100644 --- a/test/test_microsoft_graph_submission.py +++ b/test/test_microsoft_graph_submission.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.microsoft_graph_submission import MicrosoftGraphSubmission +import unittest +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission class TestMicrosoftGraphSubmission(unittest.TestCase): """MicrosoftGraphSubmission unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> MicrosoftGraphSubmission: + """Test MicrosoftGraphSubmission + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MicrosoftGraphSubmission` + """ + model = MicrosoftGraphSubmission() + if include_optional: + return MicrosoftGraphSubmission( + id = '', + state = '' + ) + else: + return MicrosoftGraphSubmission( + id = '', + state = '', + ) + """ + def testMicrosoftGraphSubmission(self): """Test MicrosoftGraphSubmission""" - # FIXME: construct object with mandatory attributes with example values - # model = MicrosoftGraphSubmission() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py index 77e9b17..27fa6e6 100644 --- a/test/test_organization_api.py +++ b/test/test_organization_api.py @@ -1,117 +1,120 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.organization_api import OrganizationApi # noqa: E501 +from flat_api.api.organization_api import OrganizationApi class TestOrganizationApi(unittest.TestCase): """OrganizationApi unit test stubs""" - def setUp(self): - self.api = OrganizationApi() # noqa: E501 + def setUp(self) -> None: + self.api = OrganizationApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_count_orga_users(self): + def test_count_orga_users(self) -> None: """Test case for count_orga_users - Count the organization users using the provided filters # noqa: E501 + Count the organization users using the provided filters """ pass - def test_create_lti_credentials(self): + def test_create_lti_credentials(self) -> None: """Test case for create_lti_credentials - Create a new couple of LTI 1.x credentials # noqa: E501 + Create a new couple of LTI 1.x credentials """ pass - def test_create_organization_invitation(self): + def test_create_organization_invitation(self) -> None: """Test case for create_organization_invitation - Create a new invitation to join the organization # noqa: E501 + Create a new invitation to join the organization """ pass - def test_create_organization_user(self): + def test_create_organization_user(self) -> None: """Test case for create_organization_user - Create a new user account # noqa: E501 + Create a new user account """ pass - def test_create_organization_user_access_token(self): + def test_create_organization_user_access_token(self) -> None: """Test case for create_organization_user_access_token - Create a delegated API access token for an organization user # noqa: E501 + Create a delegated API access token for an organization user """ pass - def test_create_organization_user_signin_link(self): + def test_create_organization_user_signin_link(self) -> None: """Test case for create_organization_user_signin_link - Create a sign in link for an organization user # noqa: E501 + Create a sign in link for an organization user """ pass - def test_list_lti_credentials(self): + def test_list_lti_credentials(self) -> None: """Test case for list_lti_credentials - List LTI 1.x credentials # noqa: E501 + List LTI 1.x credentials """ pass - def test_list_organization_invitations(self): + def test_list_organization_invitations(self) -> None: """Test case for list_organization_invitations - List the organization invitations # noqa: E501 + List the organization invitations """ pass - def test_list_organization_users(self): + def test_list_organization_users(self) -> None: """Test case for list_organization_users - List the organization users # noqa: E501 + List the organization users """ pass - def test_remove_organization_invitation(self): + def test_remove_organization_invitation(self) -> None: """Test case for remove_organization_invitation - Remove an organization invitation # noqa: E501 + Remove an organization invitation """ pass - def test_remove_organization_user(self): + def test_remove_organization_user(self) -> None: """Test case for remove_organization_user - Remove an account from Flat # noqa: E501 + Remove an account from Flat """ pass - def test_revoke_lti_credentials(self): + def test_revoke_lti_credentials(self) -> None: """Test case for revoke_lti_credentials - Revoke LTI 1.x credentials # noqa: E501 + Revoke LTI 1.x credentials """ pass - def test_update_organization_user(self): + def test_update_organization_user(self) -> None: """Test case for update_organization_user - Update account information # noqa: E501 + Update account information """ pass diff --git a/test/test_organization_invitation.py b/test/test_organization_invitation.py index f3f3621..1ff217f 100644 --- a/test/test_organization_invitation.py +++ b/test/test_organization_invitation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.organization_roles import OrganizationRoles -globals()['OrganizationRoles'] = OrganizationRoles -from flat_api.model.organization_invitation import OrganizationInvitation +import unittest +from flat_api.models.organization_invitation import OrganizationInvitation class TestOrganizationInvitation(unittest.TestCase): """OrganizationInvitation unit test stubs""" @@ -27,12 +26,41 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OrganizationInvitation: + """Test OrganizationInvitation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationInvitation` + """ + model = OrganizationInvitation() + if include_optional: + return OrganizationInvitation( + id = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization = '', + organization_role = 'admin', + custom_code = '', + email = '', + invited_by = '', + allow_multiple_use = True, + used_by = [ + '' + ] + ) + else: + return OrganizationInvitation( + organization = '', + organization_role = 'admin', + custom_code = '', + allow_multiple_use = True, + ) + """ + def testOrganizationInvitation(self): """Test OrganizationInvitation""" - # FIXME: construct object with mandatory attributes with example values - # model = OrganizationInvitation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_organization_invitation_creation.py b/test/test_organization_invitation_creation.py index 7e77ce2..17fe881 100644 --- a/test/test_organization_invitation_creation.py +++ b/test/test_organization_invitation_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.organization_roles import OrganizationRoles -globals()['OrganizationRoles'] = OrganizationRoles -from flat_api.model.organization_invitation_creation import OrganizationInvitationCreation +import unittest +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation class TestOrganizationInvitationCreation(unittest.TestCase): """OrganizationInvitationCreation unit test stubs""" @@ -27,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OrganizationInvitationCreation: + """Test OrganizationInvitationCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationInvitationCreation` + """ + model = OrganizationInvitationCreation() + if include_optional: + return OrganizationInvitationCreation( + email = '', + organization_role = 'teacher' + ) + else: + return OrganizationInvitationCreation( + ) + """ + def testOrganizationInvitationCreation(self): """Test OrganizationInvitationCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = OrganizationInvitationCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_organization_roles.py b/test/test_organization_roles.py index a504dbf..b8a15d3 100644 --- a/test/test_organization_roles.py +++ b/test/test_organization_roles.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.organization_roles import OrganizationRoles +import unittest +from flat_api.models.organization_roles import OrganizationRoles class TestOrganizationRoles(unittest.TestCase): """OrganizationRoles unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testOrganizationRoles(self): """Test OrganizationRoles""" - # FIXME: construct object with mandatory attributes with example values - # model = OrganizationRoles() # noqa: E501 - pass - + # inst = OrganizationRoles() if __name__ == '__main__': unittest.main() diff --git a/test/test_organization_user_access_token_creation.py b/test/test_organization_user_access_token_creation.py index cf85974..1a8ed45 100644 --- a/test/test_organization_user_access_token_creation.py +++ b/test/test_organization_user_access_token_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.app_scopes import AppScopes -globals()['AppScopes'] = AppScopes -from flat_api.model.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +import unittest +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation class TestOrganizationUserAccessTokenCreation(unittest.TestCase): """OrganizationUserAccessTokenCreation unit test stubs""" @@ -27,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> OrganizationUserAccessTokenCreation: + """Test OrganizationUserAccessTokenCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationUserAccessTokenCreation` + """ + model = OrganizationUserAccessTokenCreation() + if include_optional: + return OrganizationUserAccessTokenCreation( + scopes = [ + 'account.public_profile' + ] + ) + else: + return OrganizationUserAccessTokenCreation( + scopes = [ + 'account.public_profile' + ], + ) + """ + def testOrganizationUserAccessTokenCreation(self): """Test OrganizationUserAccessTokenCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = OrganizationUserAccessTokenCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_resource_collaborator.py b/test/test_resource_collaborator.py index 0d1f20d..0d61bcf 100644 --- a/test/test_resource_collaborator.py +++ b/test/test_resource_collaborator.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.group import Group -from flat_api.model.user_public import UserPublic -globals()['Group'] = Group -globals()['UserPublic'] = UserPublic -from flat_api.model.resource_collaborator import ResourceCollaborator +import unittest +from flat_api.models.resource_collaborator import ResourceCollaborator class TestResourceCollaborator(unittest.TestCase): """ResourceCollaborator unit test stubs""" @@ -29,12 +26,77 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ResourceCollaborator: + """Test ResourceCollaborator + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceCollaborator` + """ + model = ResourceCollaborator() + if include_optional: + return ResourceCollaborator( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + collaborator_type = 'owner', + id = '', + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = '', + collection = '', + user = flat_api.models.user_public.UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), ), + group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, + user_email = '', + invited = True + ) + else: + return ResourceCollaborator( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + ) + """ + def testResourceCollaborator(self): """Test ResourceCollaborator""" - # FIXME: construct object with mandatory attributes with example values - # model = ResourceCollaborator() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_resource_collaborator_creation.py b/test/test_resource_collaborator_creation.py index 1295668..26e1dfe 100644 --- a/test/test_resource_collaborator_creation.py +++ b/test/test_resource_collaborator_creation.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.resource_collaborator_creation import ResourceCollaboratorCreation +import unittest +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation class TestResourceCollaboratorCreation(unittest.TestCase): """ResourceCollaboratorCreation unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ResourceCollaboratorCreation: + """Test ResourceCollaboratorCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceCollaboratorCreation` + """ + model = ResourceCollaboratorCreation() + if include_optional: + return ResourceCollaboratorCreation( + user = '', + group = '', + user_email = '', + user_token = '', + acl_read = True, + acl_write = True, + acl_admin = True + ) + else: + return ResourceCollaboratorCreation( + ) + """ + def testResourceCollaboratorCreation(self): """Test ResourceCollaboratorCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ResourceCollaboratorCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_resource_rights.py b/test/test_resource_rights.py index 192bf66..790e9a6 100644 --- a/test/test_resource_rights.py +++ b/test/test_resource_rights.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.resource_rights import ResourceRights +import unittest +from flat_api.models.resource_rights import ResourceRights class TestResourceRights(unittest.TestCase): """ResourceRights unit test stubs""" @@ -25,12 +26,35 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ResourceRights: + """Test ResourceRights + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRights` + """ + model = ResourceRights() + if include_optional: + return ResourceRights( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + collaborator_type = 'owner' + ) + else: + return ResourceRights( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + ) + """ + def testResourceRights(self): """Test ResourceRights""" - # FIXME: construct object with mandatory attributes with example values - # model = ResourceRights() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_api.py b/test/test_score_api.py index 211ff88..1162a1e 100644 --- a/test/test_score_api.py +++ b/test/test_score_api.py @@ -1,236 +1,239 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.score_api import ScoreApi # noqa: E501 +from flat_api.api.score_api import ScoreApi class TestScoreApi(unittest.TestCase): """ScoreApi unit test stubs""" - def setUp(self): - self.api = ScoreApi() # noqa: E501 + def setUp(self) -> None: + self.api = ScoreApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_add_score_collaborator(self): + def test_add_score_collaborator(self) -> None: """Test case for add_score_collaborator - Add a new collaborator # noqa: E501 + Add a new collaborator """ pass - def test_add_score_track(self): + def test_add_score_track(self) -> None: """Test case for add_score_track - Add a new video or audio track to the score # noqa: E501 + Add a new video or audio track to the score """ pass - def test_create_export_task(self): + def test_create_export_task(self) -> None: """Test case for create_export_task - Create a new score export task # noqa: E501 + Create a new score export task """ pass - def test_create_score(self): + def test_create_score(self) -> None: """Test case for create_score - Create a new score # noqa: E501 + Create a new score """ pass - def test_create_score_revision(self): + def test_create_score_revision(self) -> None: """Test case for create_score_revision - Create a new revision # noqa: E501 + Create a new revision """ pass - def test_delete_score(self): + def test_delete_score(self) -> None: """Test case for delete_score - Delete a score # noqa: E501 + Delete a score """ pass - def test_delete_score_comment(self): + def test_delete_score_comment(self) -> None: """Test case for delete_score_comment - Delete a comment # noqa: E501 + Delete a comment """ pass - def test_delete_score_track(self): + def test_delete_score_track(self) -> None: """Test case for delete_score_track - Remove an audio or video track linked to the score # noqa: E501 + Remove an audio or video track linked to the score """ pass - def test_edit_score(self): + def test_edit_score(self) -> None: """Test case for edit_score - Edit a score's metadata # noqa: E501 + Edit a score's metadata """ pass - def test_fork_score(self): + def test_fork_score(self) -> None: """Test case for fork_score - Fork a score # noqa: E501 + Fork a score """ pass - def test_ger_user_likes(self): - """Test case for ger_user_likes - - List liked scores # noqa: E501 - """ - pass - - def test_get_group_scores(self): + def test_get_group_scores(self) -> None: """Test case for get_group_scores - List group's scores # noqa: E501 + List group's scores """ pass - def test_get_score(self): + def test_get_score(self) -> None: """Test case for get_score - Get a score's metadata # noqa: E501 + Get a score's metadata """ pass - def test_get_score_collaborator(self): + def test_get_score_collaborator(self) -> None: """Test case for get_score_collaborator - Get a collaborator # noqa: E501 + Get a collaborator """ pass - def test_get_score_collaborators(self): + def test_get_score_collaborators(self) -> None: """Test case for get_score_collaborators - List the collaborators # noqa: E501 + List the collaborators """ pass - def test_get_score_comments(self): + def test_get_score_comments(self) -> None: """Test case for get_score_comments - List comments # noqa: E501 + List comments """ pass - def test_get_score_revision(self): + def test_get_score_revision(self) -> None: """Test case for get_score_revision - Get a score revision # noqa: E501 + Get a score revision """ pass - def test_get_score_revision_data(self): + def test_get_score_revision_data(self) -> None: """Test case for get_score_revision_data - Get a score revision data # noqa: E501 + Get a score revision data """ pass - def test_get_score_revisions(self): + def test_get_score_revisions(self) -> None: """Test case for get_score_revisions - List the revisions # noqa: E501 + List the revisions """ pass - def test_get_score_submissions(self): + def test_get_score_submissions(self) -> None: """Test case for get_score_submissions - List submissions related to the score # noqa: E501 + List submissions related to the score """ pass - def test_get_score_track(self): + def test_get_score_track(self) -> None: """Test case for get_score_track - Retrieve the details of an audio or video track linked to a score # noqa: E501 + Retrieve the details of an audio or video track linked to a score + """ + pass + + def test_get_user_likes(self) -> None: + """Test case for get_user_likes + + List liked scores """ pass - def test_get_user_scores(self): + def test_get_user_scores(self) -> None: """Test case for get_user_scores - List user's scores # noqa: E501 + List user's scores """ pass - def test_list_score_tracks(self): + def test_list_score_tracks(self) -> None: """Test case for list_score_tracks - List the audio or video tracks linked to a score # noqa: E501 + List the audio or video tracks linked to a score """ pass - def test_mark_score_comment_resolved(self): + def test_mark_score_comment_resolved(self) -> None: """Test case for mark_score_comment_resolved - Mark the comment as resolved # noqa: E501 + Mark the comment as resolved """ pass - def test_mark_score_comment_unresolved(self): + def test_mark_score_comment_unresolved(self) -> None: """Test case for mark_score_comment_unresolved - Mark the comment as unresolved # noqa: E501 + Mark the comment as unresolved """ pass - def test_post_score_comment(self): + def test_post_score_comment(self) -> None: """Test case for post_score_comment - Post a new comment # noqa: E501 + Post a new comment """ pass - def test_remove_score_collaborator(self): + def test_remove_score_collaborator(self) -> None: """Test case for remove_score_collaborator - Delete a collaborator # noqa: E501 + Delete a collaborator """ pass - def test_untrash_score(self): + def test_untrash_score(self) -> None: """Test case for untrash_score - Untrash a score # noqa: E501 + Untrash a score """ pass - def test_update_score_comment(self): + def test_update_score_comment(self) -> None: """Test case for update_score_comment - Update an existing comment # noqa: E501 + Update an existing comment """ pass - def test_update_score_track(self): + def test_update_score_track(self) -> None: """Test case for update_score_track - Update an audio or video track linked to a score # noqa: E501 + Update an audio or video track linked to a score """ pass diff --git a/test/test_score_comment.py b/test/test_score_comment.py index 6afe49a..89eae3c 100644 --- a/test/test_score_comment.py +++ b/test/test_score_comment.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comment_context import ScoreCommentContext -from flat_api.model.score_comment_moderation import ScoreCommentModeration -globals()['ScoreCommentContext'] = ScoreCommentContext -globals()['ScoreCommentModeration'] = ScoreCommentModeration -from flat_api.model.score_comment import ScoreComment +import unittest +from flat_api.models.score_comment import ScoreComment class TestScoreComment(unittest.TestCase): """ScoreComment unit test stubs""" @@ -29,12 +26,46 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreComment: + """Test ScoreComment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreComment` + """ + model = ScoreComment() + if include_optional: + return ScoreComment( + id = '', + type = 'document', + user = '', + score = '', + revision = '', + reply_to = '', + var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + comment = '', + raw_comment = '', + context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3}, + mentions = [ + '' + ], + resolved = True, + resolved_by = '', + moderation = flat_api.models.score_comment_moderation.ScoreComment_moderation( + hidden = True, + reason = 'spam', ), + spam = True + ) + else: + return ScoreComment( + ) + """ + def testScoreComment(self): """Test ScoreComment""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreComment() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_comment_context.py b/test/test_score_comment_context.py index 8ac29bb..bc6839c 100644 --- a/test/test_score_comment_context.py +++ b/test/test_score_comment_context.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comment_context import ScoreCommentContext +import unittest +from flat_api.models.score_comment_context import ScoreCommentContext class TestScoreCommentContext(unittest.TestCase): """ScoreCommentContext unit test stubs""" @@ -25,12 +26,44 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCommentContext: + """Test ScoreCommentContext + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCommentContext` + """ + model = ScoreCommentContext() + if include_optional: + return ScoreCommentContext( + part_uuid = '', + staff_idx = 1.337, + staff_uuid = '', + measure_uuids = [ + '' + ], + start_time_pos = 1.337, + stop_time_pos = 1.337, + start_dpq = 1.337, + stop_dpq = 1.337 + ) + else: + return ScoreCommentContext( + part_uuid = '', + measure_uuids = [ + '' + ], + start_time_pos = 1.337, + stop_time_pos = 1.337, + start_dpq = 1.337, + stop_dpq = 1.337, + ) + """ + def testScoreCommentContext(self): """Test ScoreCommentContext""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCommentContext() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_comment_creation.py b/test/test_score_comment_creation.py index d064bd8..4e38efc 100644 --- a/test/test_score_comment_creation.py +++ b/test/test_score_comment_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comment_context import ScoreCommentContext -globals()['ScoreCommentContext'] = ScoreCommentContext -from flat_api.model.score_comment_creation import ScoreCommentCreation +import unittest +from flat_api.models.score_comment_creation import ScoreCommentCreation class TestScoreCommentCreation(unittest.TestCase): """ScoreCommentCreation unit test stubs""" @@ -27,12 +26,35 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCommentCreation: + """Test ScoreCommentCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCommentCreation` + """ + model = ScoreCommentCreation() + if include_optional: + return ScoreCommentCreation( + revision = '', + comment = '', + raw_comment = '', + mentions = [ + '' + ], + reply_to = '', + context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3} + ) + else: + return ScoreCommentCreation( + comment = '', + ) + """ + def testScoreCommentCreation(self): """Test ScoreCommentCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCommentCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_comment_moderation.py b/test/test_score_comment_moderation.py index 48644d3..f08ca10 100644 --- a/test/test_score_comment_moderation.py +++ b/test/test_score_comment_moderation.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comment_moderation import ScoreCommentModeration +import unittest +from flat_api.models.score_comment_moderation import ScoreCommentModeration class TestScoreCommentModeration(unittest.TestCase): """ScoreCommentModeration unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCommentModeration: + """Test ScoreCommentModeration + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCommentModeration` + """ + model = ScoreCommentModeration() + if include_optional: + return ScoreCommentModeration( + hidden = True, + reason = 'spam' + ) + else: + return ScoreCommentModeration( + ) + """ + def testScoreCommentModeration(self): """Test ScoreCommentModeration""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCommentModeration() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_comment_update.py b/test/test_score_comment_update.py index b45cabb..a763ede 100644 --- a/test/test_score_comment_update.py +++ b/test/test_score_comment_update.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comment_context import ScoreCommentContext -globals()['ScoreCommentContext'] = ScoreCommentContext -from flat_api.model.score_comment_update import ScoreCommentUpdate +import unittest +from flat_api.models.score_comment_update import ScoreCommentUpdate class TestScoreCommentUpdate(unittest.TestCase): """ScoreCommentUpdate unit test stubs""" @@ -27,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCommentUpdate: + """Test ScoreCommentUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCommentUpdate` + """ + model = ScoreCommentUpdate() + if include_optional: + return ScoreCommentUpdate( + revision = '', + comment = '0', + raw_comment = '0', + context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3} + ) + else: + return ScoreCommentUpdate( + ) + """ + def testScoreCommentUpdate(self): """Test ScoreCommentUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCommentUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_comments_counts.py b/test/test_score_comments_counts.py index 7697cdf..e2b7f42 100644 --- a/test/test_score_comments_counts.py +++ b/test/test_score_comments_counts.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_comments_counts import ScoreCommentsCounts +import unittest +from flat_api.models.score_comments_counts import ScoreCommentsCounts class TestScoreCommentsCounts(unittest.TestCase): """ScoreCommentsCounts unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCommentsCounts: + """Test ScoreCommentsCounts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCommentsCounts` + """ + model = ScoreCommentsCounts() + if include_optional: + return ScoreCommentsCounts( + total = 1.337, + unique = 1.337, + weekly = 1.337, + monthly = 1.337 + ) + else: + return ScoreCommentsCounts( + ) + """ + def testScoreCommentsCounts(self): """Test ScoreCommentsCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCommentsCounts() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation.py b/test/test_score_creation.py index 15de76b..46ad268 100644 --- a/test/test_score_creation.py +++ b/test/test_score_creation.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_source import ScoreSource -globals()['ScoreCreationBuilderData'] = ScoreCreationBuilderData -globals()['ScorePrivacy'] = ScorePrivacy -globals()['ScoreSource'] = ScoreSource -from flat_api.model.score_creation import ScoreCreation +import unittest +from flat_api.models.score_creation import ScoreCreation class TestScoreCreation(unittest.TestCase): """ScoreCreation unit test stubs""" @@ -31,12 +26,58 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCreation: + """Test ScoreCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCreation` + """ + model = ScoreCreation() + if include_optional: + return ScoreCreation( + title = '', + privacy = 'private', + collection = '', + google_drive_folder = '', + builder_data = flat_api.models.score_creation_builder_data.ScoreCreation_builderData( + score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( + use_tab_staff = True, + use_chord_grid = True, + fifths = 1.337, + nb_beats = 1.337, + beat_type = 1.337, + instruments = [ + flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True, ) + ], ), + layout_data = flat_api.models.score_creation_builder_data_layout_data.ScoreCreation_builderData_layoutData( + notes_spacing_coeff = 1.337, + length_unit = 'cm', + page_height = 1.337, + page_width = 1.337, + page_margin_top = 1.337, + page_margin_bottom = 1.337, + page_margin_left = 1.337, + page_margin_right = 1.337, ), ), + filename = '', + data = '', + data_encoding = 'base64', + source = {"googleDrive":"0B-0000000000000001"} + ) + else: + return ScoreCreation( + ) + """ + def testScoreCreation(self): """Test ScoreCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation_builder_data.py b/test/test_score_creation_builder_data.py index 65320eb..37fab37 100644 --- a/test/test_score_creation_builder_data.py +++ b/test/test_score_creation_builder_data.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -globals()['ScoreCreationBuilderDataLayoutData'] = ScoreCreationBuilderDataLayoutData -globals()['ScoreCreationBuilderDataScoreData'] = ScoreCreationBuilderDataScoreData -from flat_api.model.score_creation_builder_data import ScoreCreationBuilderData +import unittest +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData class TestScoreCreationBuilderData(unittest.TestCase): """ScoreCreationBuilderData unit test stubs""" @@ -29,12 +26,63 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCreationBuilderData: + """Test ScoreCreationBuilderData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCreationBuilderData` + """ + model = ScoreCreationBuilderData() + if include_optional: + return ScoreCreationBuilderData( + score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( + use_tab_staff = True, + use_chord_grid = True, + fifths = 1.337, + nb_beats = 1.337, + beat_type = 1.337, + instruments = [ + flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True, ) + ], ), + layout_data = flat_api.models.score_creation_builder_data_layout_data.ScoreCreation_builderData_layoutData( + notes_spacing_coeff = 1.337, + length_unit = 'cm', + page_height = 1.337, + page_width = 1.337, + page_margin_top = 1.337, + page_margin_bottom = 1.337, + page_margin_left = 1.337, + page_margin_right = 1.337, ) + ) + else: + return ScoreCreationBuilderData( + score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( + use_tab_staff = True, + use_chord_grid = True, + fifths = 1.337, + nb_beats = 1.337, + beat_type = 1.337, + instruments = [ + flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True, ) + ], ), + ) + """ + def testScoreCreationBuilderData(self): """Test ScoreCreationBuilderData""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreationBuilderData() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation_builder_data_layout_data.py b/test/test_score_creation_builder_data_layout_data.py index c476990..84ab514 100644 --- a/test/test_score_creation_builder_data_layout_data.py +++ b/test/test_score_creation_builder_data_layout_data.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +import unittest +from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData class TestScoreCreationBuilderDataLayoutData(unittest.TestCase): """ScoreCreationBuilderDataLayoutData unit test stubs""" @@ -25,12 +26,34 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCreationBuilderDataLayoutData: + """Test ScoreCreationBuilderDataLayoutData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCreationBuilderDataLayoutData` + """ + model = ScoreCreationBuilderDataLayoutData() + if include_optional: + return ScoreCreationBuilderDataLayoutData( + notes_spacing_coeff = 1.337, + length_unit = 'cm', + page_height = 1.337, + page_width = 1.337, + page_margin_top = 1.337, + page_margin_bottom = 1.337, + page_margin_left = 1.337, + page_margin_right = 1.337 + ) + else: + return ScoreCreationBuilderDataLayoutData( + ) + """ + def testScoreCreationBuilderDataLayoutData(self): """Test ScoreCreationBuilderDataLayoutData""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreationBuilderDataLayoutData() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation_builder_data_score_data.py b/test/test_score_creation_builder_data_score_data.py index 4875062..98cc15b 100644 --- a/test/test_score_creation_builder_data_score_data.py +++ b/test/test_score_creation_builder_data_score_data.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner -globals()['ScoreCreationBuilderDataScoreDataInstrumentsInner'] = ScoreCreationBuilderDataScoreDataInstrumentsInner -from flat_api.model.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +import unittest +from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData class TestScoreCreationBuilderDataScoreData(unittest.TestCase): """ScoreCreationBuilderDataScoreData unit test stubs""" @@ -27,12 +26,47 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCreationBuilderDataScoreData: + """Test ScoreCreationBuilderDataScoreData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCreationBuilderDataScoreData` + """ + model = ScoreCreationBuilderDataScoreData() + if include_optional: + return ScoreCreationBuilderDataScoreData( + use_tab_staff = True, + use_chord_grid = True, + fifths = 1.337, + nb_beats = 1.337, + beat_type = 1.337, + instruments = [ + flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True, ) + ] + ) + else: + return ScoreCreationBuilderDataScoreData( + instruments = [ + flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True, ) + ], + ) + """ + def testScoreCreationBuilderDataScoreData(self): """Test ScoreCreationBuilderDataScoreData""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreationBuilderDataScoreData() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation_builder_data_score_data_instruments_inner.py b/test/test_score_creation_builder_data_score_data_instruments_inner.py index 064172b..a750190 100644 --- a/test/test_score_creation_builder_data_score_data_instruments_inner.py +++ b/test/test_score_creation_builder_data_score_data_instruments_inner.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +import unittest +from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner class TestScoreCreationBuilderDataScoreDataInstrumentsInner(unittest.TestCase): """ScoreCreationBuilderDataScoreDataInstrumentsInner unit test stubs""" @@ -25,12 +26,33 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreCreationBuilderDataScoreDataInstrumentsInner: + """Test ScoreCreationBuilderDataScoreDataInstrumentsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreCreationBuilderDataScoreDataInstrumentsInner` + """ + model = ScoreCreationBuilderDataScoreDataInstrumentsInner() + if include_optional: + return ScoreCreationBuilderDataScoreDataInstrumentsInner( + group = '', + instrument = '', + long_name = '', + short_name = '', + has_quarter_tone = True + ) + else: + return ScoreCreationBuilderDataScoreDataInstrumentsInner( + group = '', + instrument = '', + ) + """ + def testScoreCreationBuilderDataScoreDataInstrumentsInner(self): """Test ScoreCreationBuilderDataScoreDataInstrumentsInner""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreationBuilderDataScoreDataInstrumentsInner() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_creation_type.py b/test/test_score_creation_type.py index 83d3229..350a786 100644 --- a/test/test_score_creation_type.py +++ b/test/test_score_creation_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_type import ScoreCreationType +import unittest +from flat_api.models.score_creation_type import ScoreCreationType class TestScoreCreationType(unittest.TestCase): """ScoreCreationType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testScoreCreationType(self): """Test ScoreCreationType""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreCreationType() # noqa: E501 - pass - + # inst = ScoreCreationType() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_details.py b/test/test_score_details.py index 1bbb47c..6e0db09 100644 --- a/test/test_score_details.py +++ b/test/test_score_details.py @@ -1,40 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.resource_collaborator import ResourceCollaborator -from flat_api.model.resource_rights import ResourceRights -from flat_api.model.score_comments_counts import ScoreCommentsCounts -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_likes_counts import ScoreLikesCounts -from flat_api.model.score_plays_counts import ScorePlaysCounts -from flat_api.model.score_privacy import ScorePrivacy -from flat_api.model.score_views_counts import ScoreViewsCounts -from flat_api.model.user_public_summary import UserPublicSummary -globals()['ResourceCollaborator'] = ResourceCollaborator -globals()['ResourceRights'] = ResourceRights -globals()['ScoreCommentsCounts'] = ScoreCommentsCounts -globals()['ScoreCreationType'] = ScoreCreationType -globals()['ScoreLicense'] = ScoreLicense -globals()['ScoreLikesCounts'] = ScoreLikesCounts -globals()['ScorePlaysCounts'] = ScorePlaysCounts -globals()['ScorePrivacy'] = ScorePrivacy -globals()['ScoreViewsCounts'] = ScoreViewsCounts -globals()['UserPublicSummary'] = UserPublicSummary -from flat_api.model.score_details import ScoreDetails +import unittest +from flat_api.models.score_details import ScoreDetails class TestScoreDetails(unittest.TestCase): """ScoreDetails unit test stubs""" @@ -45,12 +26,191 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreDetails: + """Test ScoreDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreDetails` + """ + model = ScoreDetails() + if include_optional: + return ScoreDetails( + id = '', + sharing_key = '', + title = '', + privacy = 'private', + user = flat_api.models.user_public.UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), ), + html_url = '', + subtitle = '', + lyricist = '', + arranger = '', + composer = '', + description = '', + tags = [ + 'Cu2LC4aWwWL9Y864DZtaG' + ], + creation_type = 'original', + license = 'copyright', + license_text = '', + duration_time = 1.337, + number_measures = 56, + main_tempo_qpm = 1.337, + main_key_signature = 1.337, + rights = {"aclRead":true,"aclWrite":true,"aclAdmin":true,"isCollaborator":true}, + collaborators = [ + flat_api.models.resource_collaborator.ResourceCollaborator( + acl_read = True, + acl_write = True, + acl_admin = True, + is_collaborator = True, + collaborator_type = 'owner', + id = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + score = '', + collection = '', + user = flat_api.models.user_public.UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), ), + group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, + user_email = '', + invited = True, ) + ], + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + publication_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + highlighted_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization = '', + parent_score = '', + instruments = [ + '' + ], + samples = [ + '' + ], + google_drive_file_id = '', + likes = {"total":42,"weekly":10,"monthly":30}, + comments = {"total":42,"unique":35,"weekly":10,"monthly":30}, + views = {"total":42,"weekly":10,"monthly":30}, + plays = {"total":42,"weekly":10,"monthly":30}, + collections = [ + '' + ] + ) + else: + return ScoreDetails( + id = '', + title = '', + privacy = 'private', + user = flat_api.models.user_public.UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), ), + html_url = '', + ) + """ + def testScoreDetails(self): """Test ScoreDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreDetails() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_fork.py b/test/test_score_fork.py index be0abf2..8104244 100644 --- a/test/test_score_fork.py +++ b/test/test_score_fork.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_fork import ScoreFork +import unittest +from flat_api.models.score_fork import ScoreFork class TestScoreFork(unittest.TestCase): """ScoreFork unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreFork: + """Test ScoreFork + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreFork` + """ + model = ScoreFork() + if include_optional: + return ScoreFork( + collection = 'root', + google_drive_disabled = True, + keep_original_title = True + ) + else: + return ScoreFork( + ) + """ + def testScoreFork(self): """Test ScoreFork""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreFork() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_license.py b/test/test_score_license.py index cd194d4..a30d3e8 100644 --- a/test/test_score_license.py +++ b/test/test_score_license.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_license import ScoreLicense +import unittest +from flat_api.models.score_license import ScoreLicense class TestScoreLicense(unittest.TestCase): """ScoreLicense unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testScoreLicense(self): """Test ScoreLicense""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreLicense() # noqa: E501 - pass - + # inst = ScoreLicense() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_likes_counts.py b/test/test_score_likes_counts.py index f0ca1cb..51b7811 100644 --- a/test/test_score_likes_counts.py +++ b/test/test_score_likes_counts.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_likes_counts import ScoreLikesCounts +import unittest +from flat_api.models.score_likes_counts import ScoreLikesCounts class TestScoreLikesCounts(unittest.TestCase): """ScoreLikesCounts unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreLikesCounts: + """Test ScoreLikesCounts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreLikesCounts` + """ + model = ScoreLikesCounts() + if include_optional: + return ScoreLikesCounts( + total = 1.337, + weekly = 1.337, + monthly = 1.337 + ) + else: + return ScoreLikesCounts( + total = 1.337, + weekly = 1.337, + monthly = 1.337, + ) + """ + def testScoreLikesCounts(self): """Test ScoreLikesCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreLikesCounts() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_modification.py b/test/test_score_modification.py index 53f8c71..249cbf5 100644 --- a/test/test_score_modification.py +++ b/test/test_score_modification.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_creation_type import ScoreCreationType -from flat_api.model.score_license import ScoreLicense -from flat_api.model.score_privacy import ScorePrivacy -globals()['ScoreCreationType'] = ScoreCreationType -globals()['ScoreLicense'] = ScoreLicense -globals()['ScorePrivacy'] = ScorePrivacy -from flat_api.model.score_modification import ScoreModification +import unittest +from flat_api.models.score_modification import ScoreModification class TestScoreModification(unittest.TestCase): """ScoreModification unit test stubs""" @@ -31,12 +26,40 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreModification: + """Test ScoreModification + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreModification` + """ + model = ScoreModification() + if include_optional: + return ScoreModification( + title = '', + subtitle = '', + composer = '', + lyricist = '', + arranger = '', + privacy = 'private', + sharing_key = 'bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3', + description = '', + tags = [ + '' + ], + creation_type = 'original', + license = 'copyright', + license_text = '' + ) + else: + return ScoreModification( + ) + """ + def testScoreModification(self): """Test ScoreModification""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreModification() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_plays_counts.py b/test/test_score_plays_counts.py index abaffcd..083a7ee 100644 --- a/test/test_score_plays_counts.py +++ b/test/test_score_plays_counts.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_plays_counts import ScorePlaysCounts +import unittest +from flat_api.models.score_plays_counts import ScorePlaysCounts class TestScorePlaysCounts(unittest.TestCase): """ScorePlaysCounts unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScorePlaysCounts: + """Test ScorePlaysCounts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScorePlaysCounts` + """ + model = ScorePlaysCounts() + if include_optional: + return ScorePlaysCounts( + total = 1.337, + weekly = 1.337, + monthly = 1.337 + ) + else: + return ScorePlaysCounts( + ) + """ + def testScorePlaysCounts(self): """Test ScorePlaysCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = ScorePlaysCounts() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_privacy.py b/test/test_score_privacy.py index d3ee952..7702104 100644 --- a/test/test_score_privacy.py +++ b/test/test_score_privacy.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_privacy import ScorePrivacy +import unittest +from flat_api.models.score_privacy import ScorePrivacy class TestScorePrivacy(unittest.TestCase): """ScorePrivacy unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testScorePrivacy(self): """Test ScorePrivacy""" - # FIXME: construct object with mandatory attributes with example values - # model = ScorePrivacy() # noqa: E501 - pass - + # inst = ScorePrivacy() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_revision.py b/test/test_score_revision.py index 1f12689..38b19e4 100644 --- a/test/test_score_revision.py +++ b/test/test_score_revision.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_revision_statistics import ScoreRevisionStatistics -globals()['ScoreRevisionStatistics'] = ScoreRevisionStatistics -from flat_api.model.score_revision import ScoreRevision +import unittest +from flat_api.models.score_revision import ScoreRevision class TestScoreRevision(unittest.TestCase): """ScoreRevision unit test stubs""" @@ -27,12 +26,36 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreRevision: + """Test ScoreRevision + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreRevision` + """ + model = ScoreRevision() + if include_optional: + return ScoreRevision( + id = '', + user = '', + collaborators = [ + '' + ], + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + event = '', + description = '', + autosave = True, + statistics = {"additions":24,"deletions":5} + ) + else: + return ScoreRevision( + ) + """ + def testScoreRevision(self): """Test ScoreRevision""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreRevision() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_revision_creation.py b/test/test_score_revision_creation.py index d6fb564..61dd956 100644 --- a/test/test_score_revision_creation.py +++ b/test/test_score_revision_creation.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_revision_creation import ScoreRevisionCreation +import unittest +from flat_api.models.score_revision_creation import ScoreRevisionCreation class TestScoreRevisionCreation(unittest.TestCase): """ScoreRevisionCreation unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreRevisionCreation: + """Test ScoreRevisionCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreRevisionCreation` + """ + model = ScoreRevisionCreation() + if include_optional: + return ScoreRevisionCreation( + data = '', + data_encoding = 'base64', + autosave = True, + description = '' + ) + else: + return ScoreRevisionCreation( + data = '', + ) + """ + def testScoreRevisionCreation(self): """Test ScoreRevisionCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreRevisionCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_revision_statistics.py b/test/test_score_revision_statistics.py index 4d94cdd..cbc0794 100644 --- a/test/test_score_revision_statistics.py +++ b/test/test_score_revision_statistics.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_revision_statistics import ScoreRevisionStatistics +import unittest +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics class TestScoreRevisionStatistics(unittest.TestCase): """ScoreRevisionStatistics unit test stubs""" @@ -25,12 +26,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreRevisionStatistics: + """Test ScoreRevisionStatistics + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreRevisionStatistics` + """ + model = ScoreRevisionStatistics() + if include_optional: + return ScoreRevisionStatistics( + additions = 1.337, + deletions = 1.337, + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ScoreRevisionStatistics( + ) + """ + def testScoreRevisionStatistics(self): """Test ScoreRevisionStatistics""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreRevisionStatistics() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_source.py b/test/test_score_source.py index 0c305a9..2a31e2f 100644 --- a/test/test_score_source.py +++ b/test/test_score_source.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_source import ScoreSource +import unittest +from flat_api.models.score_source import ScoreSource class TestScoreSource(unittest.TestCase): """ScoreSource unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreSource: + """Test ScoreSource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreSource` + """ + model = ScoreSource() + if include_optional: + return ScoreSource( + google_drive = '' + ) + else: + return ScoreSource( + ) + """ + def testScoreSource(self): """Test ScoreSource""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreSource() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track.py b/test/test_score_track.py index 19cd2b2..19b65c0 100644 --- a/test/test_score_track.py +++ b/test/test_score_track.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -from flat_api.model.score_track_type import ScoreTrackType -globals()['ScoreTrackPoint'] = ScoreTrackPoint -globals()['ScoreTrackState'] = ScoreTrackState -globals()['ScoreTrackType'] = ScoreTrackType -from flat_api.model.score_track import ScoreTrack +import unittest +from flat_api.models.score_track import ScoreTrack class TestScoreTrack(unittest.TestCase): """ScoreTrack unit test stubs""" @@ -31,12 +26,50 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreTrack: + """Test ScoreTrack + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreTrack` + """ + model = ScoreTrack() + if include_optional: + return ScoreTrack( + id = '', + title = '', + score = '', + creator = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + default = True, + state = 'draft', + type = 'audio', + purpose = 'common', + url = '', + media_id = '', + synchronization_points = [ + {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} + ] + ) + else: + return ScoreTrack( + id = '', + score = '', + creator = '', + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + default = True, + state = 'draft', + type = 'audio', + purpose = 'common', + ) + """ + def testScoreTrack(self): """Test ScoreTrack""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrack() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track_creation.py b/test/test_score_track_creation.py index b35e722..2bd94c1 100644 --- a/test/test_score_track_creation.py +++ b/test/test_score_track_creation.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -globals()['ScoreTrackPoint'] = ScoreTrackPoint -globals()['ScoreTrackState'] = ScoreTrackState -from flat_api.model.score_track_creation import ScoreTrackCreation +import unittest +from flat_api.models.score_track_creation import ScoreTrackCreation class TestScoreTrackCreation(unittest.TestCase): """ScoreTrackCreation unit test stubs""" @@ -29,12 +26,34 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreTrackCreation: + """Test ScoreTrackCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreTrackCreation` + """ + model = ScoreTrackCreation() + if include_optional: + return ScoreTrackCreation( + title = '', + default = True, + state = 'draft', + purpose = 'common', + url = '', + synchronization_points = [ + {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} + ] + ) + else: + return ScoreTrackCreation( + ) + """ + def testScoreTrackCreation(self): """Test ScoreTrackCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrackCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track_point.py b/test/test_score_track_point.py index 3d6dac5..fb21e24 100644 --- a/test/test_score_track_point.py +++ b/test/test_score_track_point.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_point import ScoreTrackPoint +import unittest +from flat_api.models.score_track_point import ScoreTrackPoint class TestScoreTrackPoint(unittest.TestCase): """ScoreTrackPoint unit test stubs""" @@ -25,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreTrackPoint: + """Test ScoreTrackPoint + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreTrackPoint` + """ + model = ScoreTrackPoint() + if include_optional: + return ScoreTrackPoint( + type = 'measure', + measure_uuid = '', + time = 1.337 + ) + else: + return ScoreTrackPoint( + type = 'measure', + time = 1.337, + ) + """ + def testScoreTrackPoint(self): """Test ScoreTrackPoint""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrackPoint() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_edu_skills_focused.py b/test/test_score_track_purpose.py similarity index 78% rename from test/test_edu_skills_focused.py rename to test/test_score_track_purpose.py index 82f9cc5..5cdf693 100644 --- a/test/test_edu_skills_focused.py +++ b/test/test_score_track_purpose.py @@ -1,23 +1,24 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.edu_skills_focused import EduSkillsFocused +import unittest +from flat_api.models.score_track_purpose import ScoreTrackPurpose -class TestEduSkillsFocused(unittest.TestCase): - """EduSkillsFocused unit test stubs""" +class TestScoreTrackPurpose(unittest.TestCase): + """ScoreTrackPurpose unit test stubs""" def setUp(self): pass @@ -25,12 +26,9 @@ def setUp(self): def tearDown(self): pass - def testEduSkillsFocused(self): - """Test EduSkillsFocused""" - # FIXME: construct object with mandatory attributes with example values - # model = EduSkillsFocused() # noqa: E501 - pass - + def testScoreTrackPurpose(self): + """Test ScoreTrackPurpose""" + # inst = ScoreTrackPurpose() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track_state.py b/test/test_score_track_state.py index b7b58b2..521dc24 100644 --- a/test/test_score_track_state.py +++ b/test/test_score_track_state.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_state import ScoreTrackState +import unittest +from flat_api.models.score_track_state import ScoreTrackState class TestScoreTrackState(unittest.TestCase): """ScoreTrackState unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testScoreTrackState(self): """Test ScoreTrackState""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrackState() # noqa: E501 - pass - + # inst = ScoreTrackState() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track_type.py b/test/test_score_track_type.py index e5a69cd..7ce7c2c 100644 --- a/test/test_score_track_type.py +++ b/test/test_score_track_type.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_type import ScoreTrackType +import unittest +from flat_api.models.score_track_type import ScoreTrackType class TestScoreTrackType(unittest.TestCase): """ScoreTrackType unit test stubs""" @@ -27,10 +28,7 @@ def tearDown(self): def testScoreTrackType(self): """Test ScoreTrackType""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrackType() # noqa: E501 - pass - + # inst = ScoreTrackType() if __name__ == '__main__': unittest.main() diff --git a/test/test_score_track_update.py b/test/test_score_track_update.py index 0ae18e3..5134c9d 100644 --- a/test/test_score_track_update.py +++ b/test/test_score_track_update.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_track_point import ScoreTrackPoint -from flat_api.model.score_track_state import ScoreTrackState -globals()['ScoreTrackPoint'] = ScoreTrackPoint -globals()['ScoreTrackState'] = ScoreTrackState -from flat_api.model.score_track_update import ScoreTrackUpdate +import unittest +from flat_api.models.score_track_update import ScoreTrackUpdate class TestScoreTrackUpdate(unittest.TestCase): """ScoreTrackUpdate unit test stubs""" @@ -29,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreTrackUpdate: + """Test ScoreTrackUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreTrackUpdate` + """ + model = ScoreTrackUpdate() + if include_optional: + return ScoreTrackUpdate( + title = '', + default = True, + state = 'draft', + synchronization_points = [ + {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} + ] + ) + else: + return ScoreTrackUpdate( + ) + """ + def testScoreTrackUpdate(self): """Test ScoreTrackUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreTrackUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_score_views_counts.py b/test/test_score_views_counts.py index ce806b3..f612774 100644 --- a/test/test_score_views_counts.py +++ b/test/test_score_views_counts.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.score_views_counts import ScoreViewsCounts +import unittest +from flat_api.models.score_views_counts import ScoreViewsCounts class TestScoreViewsCounts(unittest.TestCase): """ScoreViewsCounts unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ScoreViewsCounts: + """Test ScoreViewsCounts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScoreViewsCounts` + """ + model = ScoreViewsCounts() + if include_optional: + return ScoreViewsCounts( + total = 1.337, + weekly = 1.337, + monthly = 1.337 + ) + else: + return ScoreViewsCounts( + ) + """ + def testScoreViewsCounts(self): """Test ScoreViewsCounts""" - # FIXME: construct object with mandatory attributes with example values - # model = ScoreViewsCounts() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_task.py b/test/test_task.py index fcdbb13..1dcf762 100644 --- a/test/test_task.py +++ b/test/test_task.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.task_progress import TaskProgress -from flat_api.model.task_result import TaskResult -globals()['TaskProgress'] = TaskProgress -globals()['TaskResult'] = TaskResult -from flat_api.model.task import Task +import unittest +from flat_api.models.task import Task class TestTask(unittest.TestCase): """Task unit test stubs""" @@ -29,12 +26,45 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Task: + """Test Task + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Task` + """ + model = Task() + if include_optional: + return Task( + id = '', + type = '', + state = 'created', + format = '', + score = '', + progress = flat_api.models.task_progress.Task_progress( + percent = 1.337, + text = '', ), + creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + done_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + result = flat_api.models.task_result.Task_result( + url = '', + error = '', ), + error_history = [ + '' + ] + ) + else: + return Task( + id = '', + state = 'created', + ) + """ + def testTask(self): """Test Task""" - # FIXME: construct object with mandatory attributes with example values - # model = Task() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_task_api.py b/test/test_task_api.py index fef75db..f2bcda7 100644 --- a/test/test_task_api.py +++ b/test/test_task_api.py @@ -1,33 +1,36 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.task_api import TaskApi # noqa: E501 +from flat_api.api.task_api import TaskApi class TestTaskApi(unittest.TestCase): """TaskApi unit test stubs""" - def setUp(self): - self.api = TaskApi() # noqa: E501 + def setUp(self) -> None: + self.api = TaskApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_get_task(self): + def test_get_task(self) -> None: """Test case for get_task - Get a task details # noqa: E501 + Get a task details """ pass diff --git a/test/test_task_export_options.py b/test/test_task_export_options.py index 19fe3c0..c4e6e5c 100644 --- a/test/test_task_export_options.py +++ b/test/test_task_export_options.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.task_export_options import TaskExportOptions +import unittest +from flat_api.models.task_export_options import TaskExportOptions class TestTaskExportOptions(unittest.TestCase): """TaskExportOptions unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TaskExportOptions: + """Test TaskExportOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TaskExportOptions` + """ + model = TaskExportOptions() + if include_optional: + return TaskExportOptions( + parts = [ + '' + ] + ) + else: + return TaskExportOptions( + ) + """ + def testTaskExportOptions(self): """Test TaskExportOptions""" - # FIXME: construct object with mandatory attributes with example values - # model = TaskExportOptions() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_task_progress.py b/test/test_task_progress.py index 89a2ab9..4da2d62 100644 --- a/test/test_task_progress.py +++ b/test/test_task_progress.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.task_progress import TaskProgress +import unittest +from flat_api.models.task_progress import TaskProgress class TestTaskProgress(unittest.TestCase): """TaskProgress unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TaskProgress: + """Test TaskProgress + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TaskProgress` + """ + model = TaskProgress() + if include_optional: + return TaskProgress( + percent = 1.337, + text = '' + ) + else: + return TaskProgress( + ) + """ + def testTaskProgress(self): """Test TaskProgress""" - # FIXME: construct object with mandatory attributes with example values - # model = TaskProgress() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_task_result.py b/test/test_task_result.py index 35950a8..48e7e95 100644 --- a/test/test_task_result.py +++ b/test/test_task_result.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.task_result import TaskResult +import unittest +from flat_api.models.task_result import TaskResult class TestTaskResult(unittest.TestCase): """TaskResult unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> TaskResult: + """Test TaskResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TaskResult` + """ + model = TaskResult() + if include_optional: + return TaskResult( + url = '', + error = '' + ) + else: + return TaskResult( + ) + """ + def testTaskResult(self): """Test TaskResult""" - # FIXME: construct object with mandatory attributes with example values - # model = TaskResult() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assignment_submission_update_comments.py b/test/test_tutteo_product.py similarity index 74% rename from test/test_assignment_submission_update_comments.py rename to test/test_tutteo_product.py index d5d280d..e7b383a 100644 --- a/test/test_assignment_submission_update_comments.py +++ b/test/test_tutteo_product.py @@ -1,23 +1,24 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.assignment_submission_update_comments import AssignmentSubmissionUpdateComments +import unittest +from flat_api.models.tutteo_product import TutteoProduct -class TestAssignmentSubmissionUpdateComments(unittest.TestCase): - """AssignmentSubmissionUpdateComments unit test stubs""" +class TestTutteoProduct(unittest.TestCase): + """TutteoProduct unit test stubs""" def setUp(self): pass @@ -25,12 +26,9 @@ def setUp(self): def tearDown(self): pass - def testAssignmentSubmissionUpdateComments(self): - """Test AssignmentSubmissionUpdateComments""" - # FIXME: construct object with mandatory attributes with example values - # model = AssignmentSubmissionUpdateComments() # noqa: E501 - pass - + def testTutteoProduct(self): + """Test TutteoProduct""" + # inst = TutteoProduct() if __name__ == '__main__': unittest.main() diff --git a/test/test_user_admin_update.py b/test/test_user_admin_update.py index 4bf63d7..fac05bf 100644 --- a/test/test_user_admin_update.py +++ b/test/test_user_admin_update.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.organization_roles import OrganizationRoles -globals()['OrganizationRoles'] = OrganizationRoles -from flat_api.model.user_admin_update import UserAdminUpdate +import unittest +from flat_api.models.user_admin_update import UserAdminUpdate class TestUserAdminUpdate(unittest.TestCase): """UserAdminUpdate unit test stubs""" @@ -27,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserAdminUpdate: + """Test UserAdminUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAdminUpdate` + """ + model = UserAdminUpdate() + if include_optional: + return UserAdminUpdate( + password = '012345', + organization_role = 'admin', + username = '20', + firstname = '', + lastname = '', + email = '' + ) + else: + return UserAdminUpdate( + ) + """ + def testUserAdminUpdate(self): """Test UserAdminUpdate""" - # FIXME: construct object with mandatory attributes with example values - # model = UserAdminUpdate() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py index d6a0065..ee680a6 100644 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -1,47 +1,50 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import unittest -import flat_api -from flat_api.api.user_api import UserApi # noqa: E501 +from flat_api.api.user_api import UserApi class TestUserApi(unittest.TestCase): """UserApi unit test stubs""" - def setUp(self): - self.api = UserApi() # noqa: E501 + def setUp(self) -> None: + self.api = UserApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_ger_user_likes(self): - """Test case for ger_user_likes + def test_get_user(self) -> None: + """Test case for get_user - List liked scores # noqa: E501 + Get a public user profile """ pass - def test_get_user(self): - """Test case for get_user + def test_get_user_likes(self) -> None: + """Test case for get_user_likes - Get a public user profile # noqa: E501 + List liked scores """ pass - def test_get_user_scores(self): + def test_get_user_scores(self) -> None: """Test case for get_user_scores - List user's scores # noqa: E501 + List user's scores """ pass diff --git a/test/test_user_azure_details.py b/test/test_user_azure_details.py index 5e8dee2..3eaaa30 100644 --- a/test/test_user_azure_details.py +++ b/test/test_user_azure_details.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.user_azure_details import UserAzureDetails +import unittest +from flat_api.models.user_azure_details import UserAzureDetails class TestUserAzureDetails(unittest.TestCase): """UserAzureDetails unit test stubs""" @@ -25,12 +26,29 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserAzureDetails: + """Test UserAzureDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAzureDetails` + """ + model = UserAzureDetails() + if include_optional: + return UserAzureDetails( + oid = '', + hd = '', + preferred_username = '' + ) + else: + return UserAzureDetails( + ) + """ + def testUserAzureDetails(self): """Test UserAzureDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = UserAzureDetails() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_community_profile_links.py b/test/test_user_community_profile_links.py index af6cb46..de2f5a1 100644 --- a/test/test_user_community_profile_links.py +++ b/test/test_user_community_profile_links.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks +import unittest +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks class TestUserCommunityProfileLinks(unittest.TestCase): """UserCommunityProfileLinks unit test stubs""" @@ -25,12 +26,32 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserCommunityProfileLinks: + """Test UserCommunityProfileLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCommunityProfileLinks` + """ + model = UserCommunityProfileLinks() + if include_optional: + return UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '' + ) + else: + return UserCommunityProfileLinks( + ) + """ + def testUserCommunityProfileLinks(self): """Test UserCommunityProfileLinks""" - # FIXME: construct object with mandatory attributes with example values - # model = UserCommunityProfileLinks() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_creation.py b/test/test_user_creation.py index 99cbfdf..b95abac 100644 --- a/test/test_user_creation.py +++ b/test/test_user_creation.py @@ -1,22 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.flat_locales import FlatLocales -globals()['FlatLocales'] = FlatLocales -from flat_api.model.user_creation import UserCreation +import unittest +from flat_api.models.user_creation import UserCreation class TestUserCreation(unittest.TestCase): """UserCreation unit test stubs""" @@ -27,12 +26,35 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserCreation: + """Test UserCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCreation` + """ + model = UserCreation() + if include_optional: + return UserCreation( + username = '20', + firstname = '', + lastname = '', + email = '', + password = '012345', + locale = 'en', + role = 'user' + ) + else: + return UserCreation( + username = '20', + password = '012345', + ) + """ + def testUserCreation(self): """Test UserCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = UserCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_details.py b/test/test_user_details.py index 94d21fc..fe1ba97 100644 --- a/test/test_user_details.py +++ b/test/test_user_details.py @@ -1,30 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_roles import ClassRoles -from flat_api.model.flat_locales import FlatLocales -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_azure_details import UserAzureDetails -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks -globals()['ClassRoles'] = ClassRoles -globals()['FlatLocales'] = FlatLocales -globals()['OrganizationRoles'] = OrganizationRoles -globals()['UserAzureDetails'] = UserAzureDetails -globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks -from flat_api.model.user_details import UserDetails +import unittest +from flat_api.models.user_details import UserDetails class TestUserDetails(unittest.TestCase): """UserDetails unit test stubs""" @@ -35,12 +26,76 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserDetails: + """Test UserDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDetails` + """ + model = UserDetails() + if include_optional: + return UserDetails( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ), + azure_details = flat_api.models.user_azure_details.UserAzureDetails( + oid = '', + hd = '', + preferred_username = '', ), + private_profile = True, + locale = 'en', + groups = [ + '' + ], + picture_file = '', + cover_picture_file = '' + ) + else: + return UserDetails( + id = '', + type = 'user', + product = 'flat', + username = '', + picture = '', + ) + """ + def testUserDetails(self): """Test UserDetails""" - # FIXME: construct object with mandatory attributes with example values - # model = UserDetails() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_details_admin.py b/test/test_user_details_admin.py index 64dba7d..37cd1ab 100644 --- a/test/test_user_details_admin.py +++ b/test/test_user_details_admin.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_details_admin_license import UserDetailsAdminLicense -globals()['ClassRoles'] = ClassRoles -globals()['OrganizationRoles'] = OrganizationRoles -globals()['UserDetailsAdminLicense'] = UserDetailsAdminLicense -from flat_api.model.user_details_admin import UserDetailsAdmin +import unittest +from flat_api.models.user_details_admin import UserDetailsAdmin class TestUserDetailsAdmin(unittest.TestCase): """UserDetailsAdmin unit test stubs""" @@ -31,12 +26,58 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserDetailsAdmin: + """Test UserDetailsAdmin + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDetailsAdmin` + """ + model = UserDetailsAdmin() + if include_optional: + return UserDetailsAdmin( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + email = '', + last_activity_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + license = flat_api.models.user_details_admin_license.UserDetailsAdmin_license( + id = '', + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + source = 'order', + mode = 'credit', + active = True, ), + groups = [ + '' + ] + ) + else: + return UserDetailsAdmin( + id = '', + type = 'user', + product = 'flat', + username = '', + picture = '', + ) + """ + def testUserDetailsAdmin(self): """Test UserDetailsAdmin""" - # FIXME: construct object with mandatory attributes with example values - # model = UserDetailsAdmin() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py index 69788a4..8cbb894 100644 --- a/test/test_user_details_admin_license.py +++ b/test/test_user_details_admin_license.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.license_mode import LicenseMode -from flat_api.model.license_sources import LicenseSources -globals()['LicenseMode'] = LicenseMode -globals()['LicenseSources'] = LicenseSources -from flat_api.model.user_details_admin_license import UserDetailsAdminLicense +import unittest +from flat_api.models.user_details_admin_license import UserDetailsAdminLicense class TestUserDetailsAdminLicense(unittest.TestCase): """UserDetailsAdminLicense unit test stubs""" @@ -29,12 +26,31 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserDetailsAdminLicense: + """Test UserDetailsAdminLicense + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDetailsAdminLicense` + """ + model = UserDetailsAdminLicense() + if include_optional: + return UserDetailsAdminLicense( + id = '', + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + source = 'order', + mode = 'credit', + active = True + ) + else: + return UserDetailsAdminLicense( + ) + """ + def testUserDetailsAdminLicense(self): """Test UserDetailsAdminLicense""" - # FIXME: construct object with mandatory attributes with example values - # model = UserDetailsAdminLicense() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_public.py b/test/test_user_public.py index 8563c5d..825087b 100644 --- a/test/test_user_public.py +++ b/test/test_user_public.py @@ -1,26 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles -from flat_api.model.user_community_profile_links import UserCommunityProfileLinks -globals()['ClassRoles'] = ClassRoles -globals()['OrganizationRoles'] = OrganizationRoles -globals()['UserCommunityProfileLinks'] = UserCommunityProfileLinks -from flat_api.model.user_public import UserPublic +import unittest +from flat_api.models.user_public import UserPublic class TestUserPublic(unittest.TestCase): """UserPublic unit test stubs""" @@ -31,12 +26,65 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserPublic: + """Test UserPublic + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserPublic` + """ + model = UserPublic() + if include_optional: + return UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '', + bio = '', + registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + liked_scores_count = 56, + followers_count = 56, + following_count = 56, + owned_public_scores_count = 56, + cover_picture = '', + profile_theme = '', + instruments = [ + '' + ], + links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( + spotify_url = '', + youtube_url = '', + soundcloud_url = '', + tiktok_url = '', + instagram_url = '', + website_url = '', ) + ) + else: + return UserPublic( + id = '', + type = 'user', + product = 'flat', + username = '', + picture = '', + ) + """ + def testUserPublic(self): """Test UserPublic""" - # FIXME: construct object with mandatory attributes with example values - # model = UserPublic() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_public_summary.py b/test/test_user_public_summary.py index 9a74243..7558209 100644 --- a/test/test_user_public_summary.py +++ b/test/test_user_public_summary.py @@ -1,24 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.class_roles import ClassRoles -from flat_api.model.organization_roles import OrganizationRoles -globals()['ClassRoles'] = ClassRoles -globals()['OrganizationRoles'] = OrganizationRoles -from flat_api.model.user_public_summary import UserPublicSummary +import unittest +from flat_api.models.user_public_summary import UserPublicSummary class TestUserPublicSummary(unittest.TestCase): """UserPublicSummary unit test stubs""" @@ -29,12 +26,47 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserPublicSummary: + """Test UserPublicSummary + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserPublicSummary` + """ + model = UserPublicSummary() + if include_optional: + return UserPublicSummary( + id = '', + type = 'user', + product = 'flat', + username = '', + printable_name = '', + firstname = '', + lastname = '', + name = '', + picture = '', + badges = [ + '' + ], + organization = '', + organization_role = 'admin', + class_role = 'teacher', + html_url = '' + ) + else: + return UserPublicSummary( + id = '', + type = 'user', + product = 'flat', + username = '', + picture = '', + ) + """ + def testUserPublicSummary(self): """Test UserPublicSummary""" - # FIXME: construct object with mandatory attributes with example values - # model = UserPublicSummary() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_signin_link.py b/test/test_user_signin_link.py index 73bdcaf..a6fa5c6 100644 --- a/test/test_user_signin_link.py +++ b/test/test_user_signin_link.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.user_signin_link import UserSigninLink +import unittest +from flat_api.models.user_signin_link import UserSigninLink class TestUserSigninLink(unittest.TestCase): """UserSigninLink unit test stubs""" @@ -25,12 +26,28 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserSigninLink: + """Test UserSigninLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSigninLink` + """ + model = UserSigninLink() + if include_optional: + return UserSigninLink( + url = '', + expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return UserSigninLink( + ) + """ + def testUserSigninLink(self): """Test UserSigninLink""" - # FIXME: construct object with mandatory attributes with example values - # model = UserSigninLink() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_signin_link_creation.py b/test/test_user_signin_link_creation.py index 0e10dea..7bf9dbd 100644 --- a/test/test_user_signin_link_creation.py +++ b/test/test_user_signin_link_creation.py @@ -1,20 +1,21 @@ +# coding: utf-8 + """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) # noqa: E501 + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.18.0 + The version of the OpenAPI document: 2.20.0 Contact: developers@flat.io - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import flat_api -from flat_api.model.user_signin_link_creation import UserSigninLinkCreation +import unittest +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation class TestUserSigninLinkCreation(unittest.TestCase): """UserSigninLinkCreation unit test stubs""" @@ -25,12 +26,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> UserSigninLinkCreation: + """Test UserSigninLinkCreation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserSigninLinkCreation` + """ + model = UserSigninLinkCreation() + if include_optional: + return UserSigninLinkCreation( + destination_path = '/' + ) + else: + return UserSigninLinkCreation( + ) + """ + def testUserSigninLinkCreation(self): """Test UserSigninLinkCreation""" - # FIXME: construct object with mandatory attributes with example values - # model = UserSigninLinkCreation() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() From 1412e12db893296861122cd50519c9ead496b774 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:13:05 +0100 Subject: [PATCH 25/46] chore: add .github/workflows/python-push.yml --- .github/workflows/python-push.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/python-push.yml diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml new file mode 100644 index 0000000..22fbd9e --- /dev/null +++ b/.github/workflows/python-push.yml @@ -0,0 +1,36 @@ +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + packages: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - uses: google-github-actions/release-please-action@v4 + with: + release-type: python + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + if: ${{ steps.release.outputs.release_created }} \ No newline at end of file From c997b4fbaa76bcdea9e15e6b60f6df8369ccaf8b Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:14:17 +0100 Subject: [PATCH 26/46] chore(gh): fix indent --- .github/workflows/python-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml index 22fbd9e..a992b60 100644 --- a/.github/workflows/python-push.yml +++ b/.github/workflows/python-push.yml @@ -27,7 +27,7 @@ jobs: run: python -m build - uses: google-github-actions/release-please-action@v4 with: - release-type: python + release-type: python - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: From 1af8fc61a13e12a599e019407c050f75b2543907 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:15:08 +0000 Subject: [PATCH 27/46] chore(master): release 1.1.0 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a73da..3af1196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.1.0](https://github.com/FlatIO/api-client-python/compare/v1.0.0...v1.1.0) (2024-03-08) + + +### Features + +* API 2.20.0 ([5f82d16](https://github.com/FlatIO/api-client-python/commit/5f82d16517bdcda447721026124fa8c2b6f6e077)) + + +### Documentation + +* Update ScoreApi.md ([770ff9d](https://github.com/FlatIO/api-client-python/commit/770ff9d0c6f22294b6b5c3d8f0bff248a8cbc160)) + ## 1.0.0 (API v2.18.0) * Updated API from v2.17.0 to v2.18.0 From 03ea4fbd53f52dda6f3c0abb45da3ab24b3e547d Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:17:06 +0100 Subject: [PATCH 28/46] fix(releasee): release-please-action -> simple --- .github/workflows/python-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml index a992b60..28e73fc 100644 --- a/.github/workflows/python-push.yml +++ b/.github/workflows/python-push.yml @@ -27,7 +27,7 @@ jobs: run: python -m build - uses: google-github-actions/release-please-action@v4 with: - release-type: python + release-type: simple - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: From 73192e7d65d678bf4bcedb21be636fac94a0cd51 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:18:02 +0000 Subject: [PATCH 29/46] chore(master): release 1.1.1 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3af1196..00c4efa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.1](https://github.com/FlatIO/api-client-python/compare/v1.1.0...v1.1.1) (2024-03-08) + + +### Bug Fixes + +* **releasee:** release-please-action -> simple ([03ea4fb](https://github.com/FlatIO/api-client-python/commit/03ea4fbd53f52dda6f3c0abb45da3ab24b3e547d)) + ## [1.1.0](https://github.com/FlatIO/api-client-python/compare/v1.0.0...v1.1.0) (2024-03-08) From 5635ca732a0ad6e671db5b7fd60f7ed5727b7b62 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:21:29 +0100 Subject: [PATCH 30/46] fix: bump version to 1.1.0 --- .github/workflows/python-push.yml | 4 +++- setup.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml index 28e73fc..8e75721 100644 --- a/.github/workflows/python-push.yml +++ b/.github/workflows/python-push.yml @@ -27,7 +27,9 @@ jobs: run: python -m build - uses: google-github-actions/release-please-action@v4 with: - release-type: simple + release-type: python + package-name: flat_api + bump-minor-pre-major: true - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/setup.py b/setup.py index 93033ec..9340317 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Flat API 2.17.0 + Flat API 2.20.0 OpenAPI spec version: Contact: developers@flat.io @@ -12,7 +12,7 @@ from setuptools import setup, find_packages NAME = "flat_api" -VERSION = "1.0.0" +VERSION = "1.1.0" # To install the library, run the following # # python setup.py install From e130408dd3fd9b937a3b5c3effb4b0ad21697ce0 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:23:26 +0100 Subject: [PATCH 31/46] fix(gh): missing action step id --- .github/workflows/python-push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml index 8e75721..6a19390 100644 --- a/.github/workflows/python-push.yml +++ b/.github/workflows/python-push.yml @@ -26,6 +26,7 @@ jobs: - name: Build package run: python -m build - uses: google-github-actions/release-please-action@v4 + id: release with: release-type: python package-name: flat_api From abe4b76a6653d446888c32f2f251c68e9cba26d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:24:28 +0000 Subject: [PATCH 32/46] chore(master): release 1.1.2 --- CHANGELOG.md | 8 ++++++++ flat_api/__init__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c4efa..5e9135a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.1.2](https://github.com/FlatIO/api-client-python/compare/v1.1.1...v1.1.2) (2024-03-08) + + +### Bug Fixes + +* bump version to 1.1.0 ([5635ca7](https://github.com/FlatIO/api-client-python/commit/5635ca732a0ad6e671db5b7fd60f7ed5727b7b62)) +* **gh:** missing action step id ([e130408](https://github.com/FlatIO/api-client-python/commit/e130408dd3fd9b937a3b5c3effb4b0ad21697ce0)) + ## [1.1.1](https://github.com/FlatIO/api-client-python/compare/v1.1.0...v1.1.1) (2024-03-08) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index dad1454..12aaa5b 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.1.0" +__version__ = "1.1.2" # import apis into sdk package from flat_api.api.account_api import AccountApi diff --git a/pyproject.toml b/pyproject.toml index f0817ad..2f404ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "flat_api" -version = "1.1.0" +version = "1.1.2" description = "Flat API" authors = ["Flat "] license = "NoLicense" From 4283976e180aa85425cabc5f624fa9bbc73be911 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:30:40 +0100 Subject: [PATCH 33/46] fix(release): import version from flat_api --- setup.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 9340317..573f836 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,14 @@ # coding: utf-8 """ - Flat API 2.20.0 - - OpenAPI spec version: - Contact: developers@flat.io + Flat API """ import sys from setuptools import setup, find_packages +from flat_api import __version__ -NAME = "flat_api" -VERSION = "1.1.0" # To install the library, run the following # # python setup.py install @@ -31,8 +27,8 @@ LONG_DESCRIPTION = open('README.md').read() setup( - name=NAME, - version=VERSION, + name="flat_api", + version=__version__, description="Flat API Client", author="The Flat Team (https://flat.io)", author_email="developers@flat.io", From bfde710d5a9dbaa900247af8478acf43645b5b84 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 8 Mar 2024 11:32:39 +0100 Subject: [PATCH 34/46] fix(gh): try fixing version bump by please-release --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 573f836..e3b5cf2 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,6 @@ import sys from setuptools import setup, find_packages -from flat_api import __version__ # To install the library, run the following # @@ -28,7 +27,7 @@ setup( name="flat_api", - version=__version__, + version="1.1.2", description="Flat API Client", author="The Flat Team (https://flat.io)", author_email="developers@flat.io", From df9128089e773d2fbf4595e3449caa7067de7e53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:33:28 +0000 Subject: [PATCH 35/46] chore(master): release 1.1.3 --- CHANGELOG.md | 8 ++++++++ flat_api/__init__.py | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9135a..f9b3d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.1.3](https://github.com/FlatIO/api-client-python/compare/v1.1.2...v1.1.3) (2024-03-08) + + +### Bug Fixes + +* **gh:** try fixing version bump by please-release ([bfde710](https://github.com/FlatIO/api-client-python/commit/bfde710d5a9dbaa900247af8478acf43645b5b84)) +* **release:** import version from flat_api ([4283976](https://github.com/FlatIO/api-client-python/commit/4283976e180aa85425cabc5f624fa9bbc73be911)) + ## [1.1.2](https://github.com/FlatIO/api-client-python/compare/v1.1.1...v1.1.2) (2024-03-08) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 12aaa5b..86aa239 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.1.2" +__version__ = "1.1.3" # import apis into sdk package from flat_api.api.account_api import AccountApi diff --git a/pyproject.toml b/pyproject.toml index 2f404ac..1315ced 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "flat_api" -version = "1.1.2" +version = "1.1.3" description = "Flat API" authors = ["Flat "] license = "NoLicense" diff --git a/setup.py b/setup.py index e3b5cf2..a1ed77d 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( name="flat_api", - version="1.1.2", + version="1.1.3", description="Flat API Client", author="The Flat Team (https://flat.io)", author_email="developers@flat.io", From 2eca6e51da9424273f2adf9800238dd0decc7c7f Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 10 Sep 2026 16:49:48 +0200 Subject: [PATCH 36/46] feat!: rebuild the client as 2.0.0 against API 2.26.0 Replaces the 1.x client, generated from Swagger Codegen against a 2020-era specification, with one regenerated from api-reference v2.26.0 through a pipeline that reproduces from this repository alone. 123 operations, the full public surface of API 2.26.0, against 119 before. `FlatClient` and `AsyncFlatClient`: the generator emits sync or async and never both, so tools/generate.sh runs it twice and merges the async client under `flat_api.aio`. Typed errors, a retry layer that understands Flat's rate limiting (HTTP 403 with the reset in `X-RateLimit-Reset`, not 429), cursor pagination that reads the undeclared `Link` header, `OAuth2Helper`, and a `py.typed` marker so a consumer's type checker stops ignoring the annotations. `SPEC_REF=v2.26.0 ./tools/generate.sh` fetches the specification by tag, runs openapi-generator pinned to an exact 7.24.0, wipes the zone `.sdkgen.yaml` declares generated, applies the post-generation patches and writes OPERATIONS.json. Two checks guard it: determinism, that the same inputs twice produce identical trees, and idempotency, that re-applying every patch changes nothing. Packaging was broken in two ways that a green build hid. `uv build` emitted `flat_api-0.0.0` and exited 0, because pyproject.toml still carried a `[tool.poetry]` table under a setuptools backend, so setuptools saw no `[project]` table and fell back to directory discovery for the name and 0.0.0 for the version; the only guard compared the tag against `cat VERSION`, which the build never read. And the dependency list omitted `httpx`, `aiohttp` and `aiohttp-retry`, all of which `flat_api/__init__` reaches through its own re-exports, so a clean install could not `import flat_api` at all. It is now a PEP 621 project with the version derived from VERSION, Apache-2.0 declared with its text, and `requires-python >=3.11` matching the tested matrix. The release-please workflows are removed. They published on every push to master with a long-lived token, taking their version from release-please's manifest rather than VERSION, which bypassed the merge gate, the tag, OIDC and provenance. Publishing is now the tag alone: tag-on-merge.yml creates it with SDK_RELEASE_TOKEN, since GitHub does not start a workflow run for an event created with the automatic GITHUB_TOKEN, and release.yml uploads to PyPI by trusted publishing with attestations. Verified: import and compileall on 3.11, 3.12 and 3.13; a clean install of the built wheel imports FlatClient, AsyncFlatClient and OAuth2Helper; the wheel carries py.typed, flat_api/aio/ and LICENSE and no tests or docs; 123 of 123 operations and 23 scopes with no internal leak; 100% documentation coverage; determinism, idempotency and zone checks pass; and all three LTI 1.3 modes deserialize to their own variant. --- .DS_Store | Bin 0 -> 8196 bytes .github/workflows/ci.yml | 36 + .github/workflows/python-push.yml | 39 - .github/workflows/python.yml | 38 - .github/workflows/release.yml | 50 + .github/workflows/tag-on-merge.yml | 38 + .gitignore | 9 + .openapi-generator/FILES | 801 +- .openapi-generator/VERSION | 2 +- .sdkgen.yaml | 36 + MIGRATION.md | 45 + OPERATIONS.json | 1218 +++ QUICKSTART.md | 64 + README.md | 400 +- VERSION | 1 + docs/AppScopes.md | 12 - docs/Assignment.md | 43 - docs/AssignmentCopyResponse.md | 43 - ...ponseCapabilitiesCanPublishInClassError.md | 31 - docs/AssignmentSubmissionPlaybackInner.md | 31 - docs/AssignmentType.md | 12 - docs/AssignmentUpdate.md | 40 - docs/ClassAssignment.md | 57 - docs/ClassAssignmentLti.md | 30 - docs/ClassAssignmentUpdate.md | 46 - docs/ClassAssignmentUpdateGoogleClassroom.md | 30 - docs/ClassAssignmentUpdateMicrosoftGraph.md | 30 - docs/CollectionPrivacy.md | 12 - docs/CollectionType.md | 12 - docs/EduResourceResource.md | 42 - docs/FlatLocales.md | 12 - docs/GroupApi.md | 239 - docs/GroupDetails.md | 36 - docs/GroupType.md | 12 - docs/LicenseSources.md | 12 - docs/LmsName.md | 12 - docs/MicrosoftGraphAssignment.md | 33 - docs/ScoreCreationBuilderData.md | 30 - docs/ScoreCreationBuilderDataScoreData.md | 34 - ...ionBuilderDataScoreDataInstrumentsInner.md | 33 - docs/ScoreLicense.md | 12 - docs/TutteoProduct.md | 12 - docs/{ => reference}/AccountApi.md | 3 +- docs/reference/AddGroupUser200Response.md | 29 + docs/reference/AddGroupUserRequest.md | 29 + docs/{ => reference}/ApiAccessToken.md | 4 +- docs/reference/AppScopes.md | 55 + docs/reference/Assignment.md | 54 + .../AssignmentCapabilities.md} | 18 +- ...nmentCapabilitiesCanPublishInClassError.md | 31 + docs/{ => reference}/AssignmentCopy.md | 4 +- docs/reference/AssignmentCopyResponse.md | 54 + docs/reference/AssignmentCopyToClass.md | 32 + .../AssignmentCopyToResourceLibrary.md | 31 + docs/reference/AssignmentGroup.md | 33 + docs/{ => reference}/AssignmentSubmission.md | 6 +- .../AssignmentSubmissionComment.md | 4 +- .../AssignmentSubmissionCommentCreation.md | 4 +- .../AssignmentSubmissionComments.md | 4 +- .../AssignmentSubmissionHistory.md | 4 +- .../AssignmentSubmissionHistoryAttachment.md | 4 +- .../AssignmentSubmissionHistoryState.md | 13 +- .../AssignmentSubmissionLti.md | 8 +- .../reference/AssignmentSubmissionPlayback.md | 31 + .../AssignmentSubmissionState.md | 11 +- .../AssignmentSubmissionStudentsMode.md | 13 + .../AssignmentSubmissionUpdate.md | 5 +- docs/reference/AssignmentType.md | 23 + docs/reference/AssignmentUpdate.md | 51 + docs/{ => reference}/ClassApi.md | 354 +- docs/reference/ClassAssignment.md | 69 + .../ClassAssignmentAllOfCanvas.md} | 16 +- docs/reference/ClassAssignmentAllOfLti.md | 30 + .../ClassAssignmentAllOfMfc.md} | 16 +- docs/reference/ClassAssignmentUpdate.md | 58 + ...assAssignmentUpdateAllOfGoogleClassroom.md | 30 + ...lassAssignmentUpdateAllOfMicrosoftGraph.md | 30 + .../ClassAttachmentCreation.md | 9 +- docs/{ => reference}/ClassCreation.md | 4 +- docs/{ => reference}/ClassDetails.md | 11 +- docs/{ => reference}/ClassDetailsCanvas.md | 4 +- docs/{ => reference}/ClassDetailsClever.md | 4 +- .../ClassDetailsGoogleClassroom.md | 4 +- .../ClassDetailsGoogleDrive.md | 4 +- docs/{ => reference}/ClassDetailsIssues.md | 4 +- .../ClassDetailsIssuesSyncInner.md | 4 +- docs/{ => reference}/ClassDetailsLti.md | 7 +- docs/{ => reference}/ClassDetailsMfc.md | 4 +- .../ClassDetailsMicrosoftGraph.md | 4 +- docs/{ => reference}/ClassGradeLevel.md | 13 +- docs/{ => reference}/ClassRoles.md | 7 +- docs/{ => reference}/ClassState.md | 11 +- docs/{ => reference}/ClassUpdate.md | 4 +- docs/{ => reference}/Collection.md | 20 +- docs/{ => reference}/CollectionApi.md | 94 +- docs/{ => reference}/CollectionApp.md | 4 +- .../{ => reference}/CollectionCapabilities.md | 4 +- docs/reference/CollectionContents.md | 30 + docs/{ => reference}/CollectionCreation.md | 8 +- .../{ => reference}/CollectionModification.md | 6 +- docs/reference/CollectionPrivacy.md | 11 + docs/reference/CollectionType.md | 23 + .../CreateLtiConfiguration200Response.md | 29 + docs/reference/CreditTransaction.md | 38 + docs/{ => reference}/EduLibrary.md | 12 +- docs/{ => reference}/EduResource.md | 10 +- .../EduResourceAssignmentCreation.md | 30 + .../EduResourceCapabilities.md | 5 +- docs/{ => reference}/EduResourceCopy.md | 4 +- docs/{ => reference}/EduResourceCreation.md | 7 +- docs/reference/EduResourceFolder.md | 32 + docs/{ => reference}/EduResourceLtiLink.md | 4 +- docs/{ => reference}/EduResourceMove.md | 4 +- docs/{ => reference}/EduResourcePrivacy.md | 9 +- docs/reference/EduResourceResource.md | 55 + docs/{ => reference}/EduResourceType.md | 7 +- docs/{ => reference}/EduResourceUpdate.md | 10 +- docs/{ => reference}/EduResourceUseInClass.md | 4 +- docs/{ => reference}/EduResourcesApi.md | 42 +- docs/{ => reference}/FlatErrorResponse.md | 5 +- .../GoogleClassroomCoursework.md | 4 +- .../GoogleClassroomSubmission.md | 4 +- docs/reference/Grade.md | 35 + docs/{ => reference}/Group.md | 6 +- docs/reference/GroupApi.md | 731 ++ docs/reference/GroupCreation.md | 32 + docs/reference/GroupDetails.md | 40 + docs/reference/GroupType.md | 19 + docs/{ => reference}/LicenseMode.md | 7 +- docs/reference/LicenseSources.md | 25 + docs/reference/LmsName.md | 25 + docs/reference/LtiConfiguration.md | 64 + docs/reference/LtiConfiguration1p1.md | 41 + .../reference/LtiConfiguration1p1AllOfTool.md | 35 + docs/reference/LtiConfiguration1p3.md | 60 + docs/reference/LtiConfiguration1p3Base.md | 43 + ...tiConfiguration1p3BaseSupportedServices.md | 32 + ...onfiguration1p3BaseSupportedServicesAgs.md | 33 + ...tion1p3BaseSupportedServicesDeepLinking.md | 31 + ...nfiguration1p3BaseSupportedServicesNrps.md | 32 + docs/reference/LtiConfiguration1p3BaseTool.md | 35 + .../LtiConfiguration1p3Deployment.md | 55 + docs/reference/LtiConfiguration1p3Dynamic.md | 55 + docs/reference/LtiConfiguration1p3Manual.md | 51 + docs/reference/LtiConfigurationBase.md | 36 + docs/reference/LtiConfigurationCreate.md | 44 + docs/reference/LtiConfigurationCreate1p1.md | 32 + .../LtiConfigurationCreate1p3Deployment.md | 34 + .../LtiConfigurationCreate1p3Dynamic.md | 32 + ...nfigurationCreate1p3DynamicPlatformInfo.md | 31 + .../LtiConfigurationCreate1p3Manual.md | 38 + docs/reference/LtiConfigurationUpdate.md | 38 + .../LtiConfigurationUpdateDeployment.md | 32 + .../LtiConfigurationUpdateStandalone.md | 37 + docs/{ => reference}/LtiCredentials.md | 5 +- .../{ => reference}/LtiCredentialsCreation.md | 4 +- docs/{ => reference}/MediaAttachment.md | 12 +- docs/{ => reference}/MediaScoreSharingMode.md | 11 +- docs/reference/MicrosoftGraphAssignment.md | 36 + .../MicrosoftGraphSubmission.md | 4 +- docs/reference/OMRApi.md | 1052 ++ docs/reference/OmrCapabilities.md | 43 + docs/reference/OmrDetailsStepData.md | 32 + docs/reference/OmrDetailsSubmission.md | 33 + docs/reference/OmrDetectedInstrument.md | 36 + docs/reference/OmrImportedMetadata.md | 33 + docs/reference/OmrInstrumentOverride.md | 34 + docs/reference/OmrJob.md | 45 + docs/reference/OmrJobCreation.md | 36 + docs/reference/OmrJobFileMetadata.md | 35 + docs/reference/OmrJobFileUpload.md | 31 + docs/reference/OmrJobFileUploadResult.md | 31 + docs/reference/OmrJobInputFile.md | 31 + docs/reference/OmrJobOutput.md | 13 + docs/reference/OmrJobProgress.md | 32 + docs/reference/OmrJobResult.md | 31 + docs/reference/OmrJobRetention.md | 31 + docs/reference/OmrJobStatus.md | 21 + docs/reference/OmrLocaleDetails.md | 31 + docs/reference/OmrPendingStep.md | 31 + docs/reference/OmrStepName.md | 11 + docs/{ => reference}/OrganizationApi.md | 346 +- .../{ => reference}/OrganizationInvitation.md | 5 +- .../OrganizationInvitationCreation.md | 4 +- docs/{ => reference}/OrganizationRoles.md | 11 +- .../OrganizationUserAccessTokenCreation.md | 4 +- docs/reference/RenameGroupRequest.md | 29 + docs/{ => reference}/ResourceCollaborator.md | 7 +- .../ResourceCollaboratorCreation.md | 4 +- docs/{ => reference}/ResourceRights.md | 6 +- docs/{ => reference}/ScoreApi.md | 212 +- docs/{ => reference}/ScoreComment.md | 18 +- docs/{ => reference}/ScoreCommentContext.md | 4 +- docs/{ => reference}/ScoreCommentCreation.md | 6 +- .../{ => reference}/ScoreCommentModeration.md | 4 +- docs/{ => reference}/ScoreCommentUpdate.md | 6 +- docs/{ => reference}/ScoreCommentsCounts.md | 7 +- docs/{ => reference}/ScoreCreation.md | 15 +- docs/reference/ScoreCreationBuilderData.md | 33 + ...coreCreationBuilderDataAllOfBuilderData.md | 30 + ...nBuilderDataAllOfBuilderDataLayoutData.md} | 16 +- ...ionBuilderDataAllOfBuilderDataScoreData.md | 34 + ...ataAllOfBuilderDataScoreDataInstruments.md | 33 + docs/reference/ScoreCreationCommon.md | 32 + docs/reference/ScoreCreationFileImport.md | 36 + .../ScoreCreationGoogleDriveImport.md | 33 + docs/{ => reference}/ScoreCreationType.md | 9 +- docs/{ => reference}/ScoreDetails.md | 19 +- docs/reference/ScoreDetailsAllOfMe.md | 31 + docs/{ => reference}/ScoreFork.md | 6 +- docs/reference/ScoreLicense.md | 25 + docs/{ => reference}/ScoreLikesCounts.md | 13 +- docs/{ => reference}/ScoreModification.md | 6 +- docs/{ => reference}/ScorePlaysCounts.md | 7 +- docs/{ => reference}/ScorePrivacy.md | 11 +- docs/{ => reference}/ScoreRevision.md | 9 +- docs/{ => reference}/ScoreRevisionCreation.md | 4 +- .../ScoreRevisionStatistics.md | 4 +- docs/{ => reference}/ScoreSource.md | 4 +- docs/reference/ScoreSummary.md | 35 + docs/{ => reference}/ScoreTrack.md | 10 +- docs/{ => reference}/ScoreTrackCreation.md | 8 +- docs/reference/ScoreTrackCreationResponse.md | 30 + docs/{ => reference}/ScoreTrackPoint.md | 6 +- docs/{ => reference}/ScoreTrackPurpose.md | 7 +- docs/{ => reference}/ScoreTrackState.md | 9 +- docs/{ => reference}/ScoreTrackType.md | 11 +- docs/{ => reference}/ScoreTrackUpdate.md | 7 +- docs/{ => reference}/ScoreViewsCounts.md | 7 +- docs/{ => reference}/Task.md | 9 +- docs/{ => reference}/TaskApi.md | 3 +- docs/{ => reference}/TaskExportOptions.md | 4 +- docs/{ => reference}/TaskProgress.md | 4 +- docs/{ => reference}/TaskResult.md | 4 +- docs/reference/TeachingTheme.md | 27 + docs/reference/TutteoProduct.md | 17 + docs/{ => reference}/UserAdminUpdate.md | 4 +- docs/{ => reference}/UserApi.md | 26 +- docs/{ => reference}/UserAzureDetails.md | 4 +- docs/reference/UserBasics.md | 38 + .../UserCommunityProfileLinks.md | 4 +- docs/{ => reference}/UserCreation.md | 6 +- docs/{ => reference}/UserDetails.md | 14 +- docs/{ => reference}/UserDetailsAdmin.md | 10 +- .../UserDetailsAdminAllOfLicense.md} | 18 +- docs/{ => reference}/UserPublic.md | 11 +- docs/{ => reference}/UserPublicSummary.md | 7 +- docs/{ => reference}/UserSigninLink.md | 5 +- .../{ => reference}/UserSigninLinkCreation.md | 4 +- flat_api/__init__.py | 640 +- flat_api/_retry.py | 67 + flat_api/aio/__init__.py | 461 + flat_api/aio/api/__init__.py | 14 + flat_api/aio/api/account_api.py | 305 + flat_api/aio/api/class_api.py | 9485 +++++++++++++++++ flat_api/aio/api/collection_api.py | 2803 +++++ flat_api/aio/api/edu_resources_api.py | 3509 ++++++ flat_api/aio/api/group_api.py | 2629 +++++ flat_api/aio/api/omr_api.py | 3646 +++++++ flat_api/aio/api/organization_api.py | 4997 +++++++++ flat_api/aio/api/score_api.py | 9310 ++++++++++++++++ flat_api/aio/api/task_api.py | 302 + flat_api/aio/api/user_api.py | 999 ++ flat_api/aio/api_client.py | 823 ++ flat_api/aio/api_response.py | 21 + flat_api/aio/configuration.py | 627 ++ flat_api/aio/exceptions.py | 219 + flat_api/aio/models/__init__.py | 214 + .../aio/models/add_group_user200_response.py | 102 + flat_api/aio/models/add_group_user_request.py | 102 + flat_api/aio/models/api_access_token.py | 114 + flat_api/aio/models/app_scopes.py | 59 + flat_api/aio/models/assignment.py | 184 + .../aio/models/assignment_capabilities.py | 114 + ...capabilities_can_publish_in_class_error.py | 104 + flat_api/aio/models/assignment_copy.py | 138 + .../aio/models/assignment_copy_response.py | 186 + .../aio/models/assignment_copy_to_class.py | 107 + .../assignment_copy_to_resource_library.py | 104 + flat_api/aio/models/assignment_group.py | 108 + flat_api/aio/models/assignment_submission.py | 181 + .../models/assignment_submission_comment.py | 115 + .../assignment_submission_comment_creation.py | 102 + .../models/assignment_submission_comments.py | 104 + .../models/assignment_submission_history.py | 142 + ...ssignment_submission_history_attachment.py | 106 + .../assignment_submission_history_state.py | 41 + .../aio/models/assignment_submission_lti.py | 111 + .../models/assignment_submission_playback.py | 104 + .../aio/models/assignment_submission_state.py | 40 + .../assignment_submission_students_mode.py | 38 + .../models/assignment_submission_update.py | 146 + flat_api/aio/models/assignment_type.py | 43 + flat_api/aio/models/assignment_update.py | 200 + flat_api/aio/models/class_assignment.py | 270 + .../models/class_assignment_all_of_canvas.py | 104 + .../aio/models/class_assignment_all_of_lti.py | 102 + .../aio/models/class_assignment_all_of_mfc.py | 104 + .../aio/models/class_assignment_update.py | 235 + ...signment_update_all_of_google_classroom.py | 107 + ...ssignment_update_all_of_microsoft_graph.py | 107 + .../aio/models/class_attachment_creation.py | 131 + flat_api/aio/models/class_creation.py | 128 + flat_api/aio/models/class_details.py | 208 + flat_api/aio/models/class_details_canvas.py | 104 + flat_api/aio/models/class_details_clever.py | 125 + .../models/class_details_google_classroom.py | 104 + .../aio/models/class_details_google_drive.py | 104 + flat_api/aio/models/class_details_issues.py | 110 + .../models/class_details_issues_sync_inner.py | 116 + flat_api/aio/models/class_details_lti.py | 108 + flat_api/aio/models/class_details_mfc.py | 104 + .../models/class_details_microsoft_graph.py | 102 + flat_api/aio/models/class_grade_level.py | 41 + flat_api/aio/models/class_roles.py | 38 + flat_api/aio/models/class_state.py | 40 + flat_api/aio/models/class_update.py | 128 + flat_api/aio/models/collection.py | 167 + flat_api/aio/models/collection_app.py | 106 + .../aio/models/collection_capabilities.py | 110 + flat_api/aio/models/collection_contents.py | 102 + flat_api/aio/models/collection_creation.py | 106 + .../aio/models/collection_modification.py | 106 + flat_api/aio/models/collection_privacy.py | 37 + flat_api/aio/models/collection_type.py | 43 + .../create_lti_configuration200_response.py | 155 + flat_api/aio/models/credit_transaction.py | 150 + flat_api/aio/models/edu_library.py | 122 + flat_api/aio/models/edu_resource.py | 143 + .../edu_resource_assignment_creation.py | 103 + .../aio/models/edu_resource_capabilities.py | 108 + flat_api/aio/models/edu_resource_copy.py | 102 + flat_api/aio/models/edu_resource_creation.py | 118 + flat_api/aio/models/edu_resource_folder.py | 107 + flat_api/aio/models/edu_resource_lti_link.py | 102 + flat_api/aio/models/edu_resource_move.py | 102 + flat_api/aio/models/edu_resource_privacy.py | 39 + flat_api/aio/models/edu_resource_resource.py | 138 + flat_api/aio/models/edu_resource_type.py | 38 + flat_api/aio/models/edu_resource_update.py | 116 + .../aio/models/edu_resource_use_in_class.py | 104 + flat_api/aio/models/flat_error_response.py | 110 + .../aio/models/google_classroom_coursework.py | 113 + .../aio/models/google_classroom_submission.py | 106 + flat_api/aio/models/grade.py | 49 + flat_api/aio/models/group.py | 116 + flat_api/aio/models/group_creation.py | 115 + flat_api/aio/models/group_details.py | 124 + flat_api/aio/models/group_type.py | 41 + flat_api/aio/models/license_mode.py | 38 + flat_api/aio/models/license_sources.py | 44 + flat_api/aio/models/lms_name.py | 44 + flat_api/aio/models/lti_configuration.py | 142 + flat_api/aio/models/lti_configuration1p1.py | 148 + .../lti_configuration1p1_all_of_tool.py | 112 + flat_api/aio/models/lti_configuration1p3.py | 152 + .../aio/models/lti_configuration1p3_base.py | 158 + ...onfiguration1p3_base_supported_services.py | 118 + ...guration1p3_base_supported_services_ags.py | 108 + ...p3_base_supported_services_deep_linking.py | 104 + ...uration1p3_base_supported_services_nrps.py | 106 + .../models/lti_configuration1p3_base_tool.py | 112 + .../models/lti_configuration1p3_deployment.py | 200 + .../models/lti_configuration1p3_dynamic.py | 205 + .../aio/models/lti_configuration1p3_manual.py | 192 + flat_api/aio/models/lti_configuration_base.py | 139 + .../aio/models/lti_configuration_create.py | 169 + .../aio/models/lti_configuration_create1p1.py | 113 + .../lti_configuration_create1p3_deployment.py | 117 + .../lti_configuration_create1p3_dynamic.py | 117 + ...uration_create1p3_dynamic_platform_info.py | 104 + .../lti_configuration_create1p3_manual.py | 125 + .../aio/models/lti_configuration_update.py | 135 + .../lti_configuration_update_deployment.py | 106 + .../lti_configuration_update_standalone.py | 116 + flat_api/aio/models/lti_credentials.py | 122 + .../aio/models/lti_credentials_creation.py | 106 + flat_api/aio/models/media_attachment.py | 156 + .../aio/models/media_score_sharing_mode.py | 40 + .../aio/models/microsoft_graph_assignment.py | 135 + .../aio/models/microsoft_graph_submission.py | 104 + flat_api/aio/models/omr_capabilities.py | 138 + flat_api/aio/models/omr_details_step_data.py | 121 + flat_api/aio/models/omr_details_submission.py | 111 + .../aio/models/omr_detected_instrument.py | 124 + flat_api/aio/models/omr_imported_metadata.py | 108 + .../aio/models/omr_instrument_override.py | 108 + flat_api/aio/models/omr_job.py | 162 + flat_api/aio/models/omr_job_creation.py | 124 + flat_api/aio/models/omr_job_file_metadata.py | 112 + flat_api/aio/models/omr_job_file_upload.py | 104 + .../aio/models/omr_job_file_upload_result.py | 104 + flat_api/aio/models/omr_job_input_file.py | 104 + flat_api/aio/models/omr_job_output.py | 38 + flat_api/aio/models/omr_job_progress.py | 106 + flat_api/aio/models/omr_job_result.py | 104 + flat_api/aio/models/omr_job_retention.py | 105 + flat_api/aio/models/omr_job_status.py | 42 + flat_api/aio/models/omr_locale_details.py | 104 + flat_api/aio/models/omr_pending_step.py | 109 + flat_api/aio/models/omr_step_name.py | 37 + .../aio/models/organization_invitation.py | 127 + .../organization_invitation_creation.py | 114 + flat_api/aio/models/organization_roles.py | 40 + ...organization_user_access_token_creation.py | 103 + flat_api/aio/models/rename_group_request.py | 102 + flat_api/aio/models/resource_collaborator.py | 145 + .../models/resource_collaborator_creation.py | 114 + flat_api/aio/models/resource_rights.py | 120 + flat_api/aio/models/score_comment.py | 148 + flat_api/aio/models/score_comment_context.py | 116 + flat_api/aio/models/score_comment_creation.py | 116 + .../aio/models/score_comment_moderation.py | 114 + flat_api/aio/models/score_comment_update.py | 113 + flat_api/aio/models/score_comments_counts.py | 110 + flat_api/aio/models/score_creation.py | 152 + .../aio/models/score_creation_builder_data.py | 115 + ...eation_builder_data_all_of_builder_data.py | 112 + ...r_data_all_of_builder_data_layout_data.py} | 40 +- ...der_data_all_of_builder_data_score_data.py | 120 + ...of_builder_data_score_data_instruments.py} | 42 +- flat_api/aio/models/score_creation_common.py | 109 + .../aio/models/score_creation_file_import.py | 127 + .../score_creation_google_drive_import.py | 115 + flat_api/aio/models/score_creation_type.py | 39 + flat_api/aio/models/score_details.py | 229 + .../aio/models/score_details_all_of_me.py | 104 + flat_api/aio/models/score_fork.py | 111 + flat_api/aio/models/score_license.py | 44 + flat_api/aio/models/score_likes_counts.py | 108 + flat_api/aio/models/score_modification.py | 178 + flat_api/aio/models/score_plays_counts.py | 108 + flat_api/aio/models/score_privacy.py | 40 + flat_api/aio/models/score_revision.py | 123 + .../aio/models/score_revision_creation.py | 118 + .../aio/models/score_revision_statistics.py | 109 + flat_api/aio/models/score_source.py | 102 + flat_api/aio/models/score_summary.py | 117 + flat_api/aio/models/score_track.py | 138 + flat_api/aio/models/score_track_creation.py | 122 + .../models/score_track_creation_response.py | 106 + flat_api/aio/models/score_track_point.py | 114 + flat_api/aio/models/score_track_purpose.py | 38 + flat_api/aio/models/score_track_state.py | 39 + flat_api/aio/models/score_track_type.py | 40 + flat_api/aio/models/score_track_update.py | 120 + flat_api/aio/models/score_views_counts.py | 108 + flat_api/aio/models/task.py | 155 + flat_api/aio/models/task_export_options.py | 102 + flat_api/aio/models/task_progress.py | 104 + flat_api/aio/models/task_result.py | 104 + flat_api/aio/models/teaching_theme.py | 45 + flat_api/aio/models/tutteo_product.py | 40 + flat_api/aio/models/user_admin_update.py | 114 + flat_api/aio/models/user_azure_details.py | 106 + flat_api/aio/models/user_basics.py | 133 + .../models/user_community_profile_links.py | 142 + flat_api/aio/models/user_creation.py | 125 + flat_api/aio/models/user_details.py | 195 + flat_api/aio/models/user_details_admin.py | 153 + .../user_details_admin_all_of_license.py | 113 + flat_api/aio/models/user_public.py | 172 + flat_api/aio/models/user_public_summary.py | 138 + flat_api/aio/models/user_signin_link.py | 107 + .../aio/models/user_signin_link_creation.py | 102 + flat_api/aio/rest.py | 264 + flat_api/api/__init__.py | 1 + flat_api/api/account_api.py | 25 +- flat_api/api/class_api.py | 2726 +++-- flat_api/api/collection_api.py | 388 +- flat_api/api/edu_resources_api.py | 313 +- flat_api/api/group_api.py | 2041 +++- flat_api/api/omr_api.py | 3646 +++++++ flat_api/api/organization_api.py | 1419 ++- flat_api/api/score_api.py | 827 +- flat_api/api/task_api.py | 25 +- flat_api/api/user_api.py | 186 +- flat_api/api_client.py | 183 +- flat_api/client.py | 78 + flat_api/configuration.py | 306 +- flat_api/errors.py | 137 + flat_api/exceptions.py | 33 +- flat_api/models/__init__.py | 97 +- flat_api/models/add_group_user200_response.py | 102 + flat_api/models/add_group_user_request.py | 102 + flat_api/models/api_access_token.py | 34 +- flat_api/models/app_scopes.py | 6 +- flat_api/models/assignment.py | 87 +- ...bilities.py => assignment_capabilities.py} | 46 +- ...capabilities_can_publish_in_class_error.py | 104 + flat_api/models/assignment_copy.py | 179 +- flat_api/models/assignment_copy_response.py | 85 +- ...capabilities_can_publish_in_class_error.py | 90 - flat_api/models/assignment_copy_to_class.py | 107 + .../assignment_copy_to_resource_library.py | 104 + flat_api/models/assignment_group.py | 108 + flat_api/models/assignment_submission.py | 52 +- .../models/assignment_submission_comment.py | 34 +- .../assignment_submission_comment_creation.py | 34 +- .../models/assignment_submission_comments.py | 34 +- .../models/assignment_submission_history.py | 34 +- ...ssignment_submission_history_attachment.py | 34 +- .../assignment_submission_history_state.py | 4 +- flat_api/models/assignment_submission_lti.py | 53 +- .../models/assignment_submission_playback.py | 104 + .../assignment_submission_playback_inner.py | 90 - .../models/assignment_submission_state.py | 4 +- .../assignment_submission_students_mode.py | 38 + .../models/assignment_submission_update.py | 52 +- flat_api/models/assignment_type.py | 5 +- flat_api/models/assignment_update.py | 81 +- flat_api/models/class_assignment.py | 126 +- .../models/class_assignment_all_of_canvas.py | 104 + .../models/class_assignment_all_of_lti.py | 102 + .../models/class_assignment_all_of_mfc.py | 104 + flat_api/models/class_assignment_canvas.py | 90 - flat_api/models/class_assignment_lti.py | 88 - flat_api/models/class_assignment_mfc.py | 90 - flat_api/models/class_assignment_update.py | 123 +- ...signment_update_all_of_google_classroom.py | 107 + ...ssignment_update_all_of_microsoft_graph.py | 107 + ...lass_assignment_update_google_classroom.py | 93 - ...class_assignment_update_microsoft_graph.py | 93 - flat_api/models/class_attachment_creation.py | 52 +- flat_api/models/class_creation.py | 34 +- flat_api/models/class_details.py | 44 +- flat_api/models/class_details_canvas.py | 34 +- flat_api/models/class_details_clever.py | 34 +- .../models/class_details_google_classroom.py | 34 +- flat_api/models/class_details_google_drive.py | 34 +- flat_api/models/class_details_issues.py | 40 +- .../models/class_details_issues_sync_inner.py | 38 +- flat_api/models/class_details_lti.py | 42 +- flat_api/models/class_details_mfc.py | 34 +- .../models/class_details_microsoft_graph.py | 34 +- flat_api/models/class_grade_level.py | 4 +- flat_api/models/class_roles.py | 4 +- flat_api/models/class_state.py | 5 +- flat_api/models/class_update.py | 34 +- flat_api/models/collection.py | 68 +- flat_api/models/collection_app.py | 34 +- flat_api/models/collection_capabilities.py | 34 +- flat_api/models/collection_contents.py | 102 + flat_api/models/collection_creation.py | 42 +- flat_api/models/collection_modification.py | 38 +- flat_api/models/collection_privacy.py | 6 +- flat_api/models/collection_type.py | 11 +- .../create_lti_configuration200_response.py | 155 + flat_api/models/credit_transaction.py | 150 + flat_api/models/edu_library.py | 54 +- flat_api/models/edu_resource.py | 52 +- .../edu_resource_assignment_creation.py | 103 + flat_api/models/edu_resource_capabilities.py | 40 +- flat_api/models/edu_resource_copy.py | 34 +- flat_api/models/edu_resource_creation.py | 48 +- flat_api/models/edu_resource_folder.py | 107 + flat_api/models/edu_resource_lti_link.py | 34 +- flat_api/models/edu_resource_move.py | 34 +- flat_api/models/edu_resource_privacy.py | 4 +- flat_api/models/edu_resource_resource.py | 219 +- flat_api/models/edu_resource_type.py | 4 +- flat_api/models/edu_resource_update.py | 52 +- flat_api/models/edu_resource_use_in_class.py | 34 +- flat_api/models/flat_error_response.py | 40 +- flat_api/models/flat_locales.py | 54 - .../models/google_classroom_coursework.py | 34 +- .../models/google_classroom_submission.py | 34 +- flat_api/models/grade.py | 49 + flat_api/models/group.py | 47 +- flat_api/models/group_creation.py | 115 + flat_api/models/group_details.py | 60 +- flat_api/models/group_type.py | 8 +- flat_api/models/license_mode.py | 4 +- flat_api/models/license_sources.py | 4 +- flat_api/models/lms_name.py | 4 +- flat_api/models/lti_configuration.py | 142 + flat_api/models/lti_configuration1p1.py | 148 + .../lti_configuration1p1_all_of_tool.py | 112 + flat_api/models/lti_configuration1p3.py | 152 + flat_api/models/lti_configuration1p3_base.py | 158 + ...onfiguration1p3_base_supported_services.py | 118 + ...guration1p3_base_supported_services_ags.py | 108 + ...p3_base_supported_services_deep_linking.py | 104 + ...uration1p3_base_supported_services_nrps.py | 106 + .../models/lti_configuration1p3_base_tool.py | 112 + .../models/lti_configuration1p3_deployment.py | 200 + .../models/lti_configuration1p3_dynamic.py | 205 + .../models/lti_configuration1p3_manual.py | 192 + flat_api/models/lti_configuration_base.py | 139 + flat_api/models/lti_configuration_create.py | 169 + .../models/lti_configuration_create1p1.py | 113 + .../lti_configuration_create1p3_deployment.py | 117 + .../lti_configuration_create1p3_dynamic.py | 117 + ...uration_create1p3_dynamic_platform_info.py | 104 + .../lti_configuration_create1p3_manual.py | 125 + flat_api/models/lti_configuration_update.py | 135 + .../lti_configuration_update_deployment.py | 106 + .../lti_configuration_update_standalone.py | 116 + flat_api/models/lti_credentials.py | 40 +- flat_api/models/lti_credentials_creation.py | 34 +- flat_api/models/media_attachment.py | 56 +- flat_api/models/media_score_sharing_mode.py | 4 +- flat_api/models/microsoft_graph_assignment.py | 75 +- flat_api/models/microsoft_graph_submission.py | 34 +- flat_api/models/omr_capabilities.py | 138 + flat_api/models/omr_details_step_data.py | 121 + flat_api/models/omr_details_submission.py | 111 + flat_api/models/omr_detected_instrument.py | 124 + flat_api/models/omr_imported_metadata.py | 108 + flat_api/models/omr_instrument_override.py | 108 + flat_api/models/omr_job.py | 162 + flat_api/models/omr_job_creation.py | 124 + flat_api/models/omr_job_file_metadata.py | 112 + flat_api/models/omr_job_file_upload.py | 104 + flat_api/models/omr_job_file_upload_result.py | 104 + flat_api/models/omr_job_input_file.py | 104 + flat_api/models/omr_job_output.py | 38 + flat_api/models/omr_job_progress.py | 106 + flat_api/models/omr_job_result.py | 104 + flat_api/models/omr_job_retention.py | 105 + flat_api/models/omr_job_status.py | 42 + flat_api/models/omr_locale_details.py | 104 + flat_api/models/omr_pending_step.py | 109 + flat_api/models/omr_step_name.py | 37 + flat_api/models/organization_invitation.py | 38 +- .../organization_invitation_creation.py | 38 +- flat_api/models/organization_roles.py | 6 +- ...organization_user_access_token_creation.py | 34 +- flat_api/models/rename_group_request.py | 102 + flat_api/models/resource_collaborator.py | 38 +- .../models/resource_collaborator_creation.py | 34 +- flat_api/models/resource_rights.py | 36 +- flat_api/models/score_comment.py | 51 +- flat_api/models/score_comment_context.py | 34 +- flat_api/models/score_comment_creation.py | 36 +- flat_api/models/score_comment_moderation.py | 34 +- flat_api/models/score_comment_update.py | 36 +- flat_api/models/score_comments_counts.py | 42 +- flat_api/models/score_creation.py | 219 +- .../models/score_creation_builder_data.py | 65 +- ...eation_builder_data_all_of_builder_data.py | 112 + ...er_data_all_of_builder_data_layout_data.py | 126 + ...der_data_all_of_builder_data_score_data.py | 120 + ..._of_builder_data_score_data_instruments.py | 110 + .../score_creation_builder_data_score_data.py | 106 - flat_api/models/score_creation_common.py | 109 + flat_api/models/score_creation_file_import.py | 127 + .../score_creation_google_drive_import.py | 115 + flat_api/models/score_creation_type.py | 5 +- flat_api/models/score_details.py | 68 +- flat_api/models/score_details_all_of_me.py | 104 + flat_api/models/score_fork.py | 38 +- flat_api/models/score_license.py | 5 +- flat_api/models/score_likes_counts.py | 54 +- flat_api/models/score_modification.py | 42 +- flat_api/models/score_plays_counts.py | 42 +- flat_api/models/score_privacy.py | 4 +- flat_api/models/score_revision.py | 44 +- flat_api/models/score_revision_creation.py | 36 +- flat_api/models/score_revision_statistics.py | 34 +- flat_api/models/score_source.py | 34 +- flat_api/models/score_summary.py | 117 + flat_api/models/score_track.py | 46 +- flat_api/models/score_track_creation.py | 48 +- .../models/score_track_creation_response.py | 106 + flat_api/models/score_track_point.py | 37 +- flat_api/models/score_track_purpose.py | 4 +- flat_api/models/score_track_state.py | 4 +- flat_api/models/score_track_type.py | 4 +- flat_api/models/score_track_update.py | 49 +- flat_api/models/score_views_counts.py | 42 +- flat_api/models/task.py | 61 +- flat_api/models/task_export_options.py | 34 +- flat_api/models/task_progress.py | 34 +- flat_api/models/task_result.py | 34 +- flat_api/models/teaching_theme.py | 45 + flat_api/models/tutteo_product.py | 6 +- flat_api/models/user_admin_update.py | 44 +- flat_api/models/user_azure_details.py | 34 +- flat_api/models/user_basics.py | 133 + .../models/user_community_profile_links.py | 34 +- flat_api/models/user_creation.py | 50 +- flat_api/models/user_details.py | 65 +- flat_api/models/user_details_admin.py | 55 +- .../user_details_admin_all_of_license.py | 113 + flat_api/models/user_details_admin_license.py | 99 - flat_api/models/user_public.py | 53 +- flat_api/models/user_public_summary.py | 43 +- flat_api/models/user_signin_link.py | 38 +- flat_api/models/user_signin_link_creation.py | 34 +- flat_api/oauth.py | 145 + flat_api/pagination.py | 73 + flat_api/rest.py | 76 +- pyproject.toml | 62 +- requirements.txt | 10 +- setup.cfg | 2 - setup.py | 60 - test-requirements.txt | 5 - test/__init__.py | 0 test/test_account_api.py | 39 - test/test_api_access_token.py | 59 - test/test_app_scopes.py | 34 - test/test_assignment.py | 88 - test/test_assignment_copy.py | 58 - test/test_assignment_copy_response.py | 89 - ...t_assignment_copy_response_capabilities.py | 62 - ...capabilities_can_publish_in_class_error.py | 55 - test/test_assignment_submission.py | 98 - test/test_assignment_submission_comment.py | 58 - ..._assignment_submission_comment_creation.py | 53 - test/test_assignment_submission_comments.py | 53 - test/test_assignment_submission_history.py | 73 - ...ssignment_submission_history_attachment.py | 54 - ...est_assignment_submission_history_state.py | 34 - test/test_assignment_submission_lti.py | 53 - ...st_assignment_submission_playback_inner.py | 55 - test/test_assignment_submission_state.py | 34 - test/test_assignment_submission_update.py | 61 - test/test_assignment_type.py | 34 - test/test_assignment_update.py | 64 - test/test_class_api.py | 242 - test/test_class_assignment.py | 112 - test/test_class_assignment_canvas.py | 53 - test/test_class_assignment_lti.py | 52 - test/test_class_assignment_mfc.py | 53 - test/test_class_assignment_update.py | 77 - ...lass_assignment_update_google_classroom.py | 52 - ...class_assignment_update_microsoft_graph.py | 54 - test/test_class_attachment_creation.py | 58 - test/test_class_creation.py | 59 - test/test_class_details.py | 103 - test/test_class_details_canvas.py | 53 - test/test_class_details_clever.py | 58 - test/test_class_details_google_classroom.py | 53 - test/test_class_details_google_drive.py | 53 - test/test_class_details_issues.py | 57 - test/test_class_details_issues_sync_inner.py | 54 - test/test_class_details_lti.py | 54 - test/test_class_details_mfc.py | 53 - test/test_class_details_microsoft_graph.py | 52 - test/test_class_grade_level.py | 34 - test/test_class_roles.py | 34 - test/test_class_state.py | 34 - test/test_class_update.py | 58 - test/test_collection.py | 146 - test/test_collection_api.py | 95 - test/test_collection_app.py | 54 - test/test_collection_capabilities.py | 61 - test/test_collection_creation.py | 55 - test/test_collection_modification.py | 53 - test/test_collection_privacy.py | 34 - test/test_collection_type.py | 34 - test/test_edu_library.py | 55 - test/test_edu_resource.py | 97 - test/test_edu_resource_capabilities.py | 54 - test/test_edu_resource_copy.py | 53 - test/test_edu_resource_creation.py | 56 - test/test_edu_resource_lti_link.py | 53 - test/test_edu_resource_move.py | 53 - test/test_edu_resource_privacy.py | 34 - test/test_edu_resource_resource.py | 88 - test/test_edu_resource_type.py | 34 - test/test_edu_resource_update.py | 53 - test/test_edu_resource_use_in_class.py | 54 - test/test_edu_resources_api.py | 116 - test/test_flat_error_response.py | 57 - test/test_flat_locales.py | 34 - test/test_google_classroom_coursework.py | 55 - test/test_google_classroom_submission.py | 57 - test/test_group.py | 58 - test/test_group_api.py | 53 - test/test_group_details.py | 58 - test/test_group_type.py | 34 - test/test_license_mode.py | 34 - test/test_license_sources.py | 34 - test/test_lms_name.py | 34 - test/test_lti_credentials.py | 60 - test/test_lti_credentials_creation.py | 55 - test/test_media_attachment.py | 74 - test/test_media_score_sharing_mode.py | 34 - test/test_microsoft_graph_assignment.py | 57 - test/test_microsoft_graph_submission.py | 55 - test/test_organization_api.py | 123 - test/test_organization_invitation.py | 66 - test/test_organization_invitation_creation.py | 53 - test/test_organization_roles.py | 34 - ...organization_user_access_token_creation.py | 57 - test/test_resource_collaborator.py | 102 - test/test_resource_collaborator_creation.py | 58 - test/test_resource_rights.py | 60 - test/test_score_api.py | 242 - test/test_score_comment.py | 71 - test/test_score_comment_context.py | 69 - test/test_score_comment_creation.py | 60 - test/test_score_comment_moderation.py | 53 - test/test_score_comment_update.py | 55 - test/test_score_comments_counts.py | 55 - test/test_score_creation.py | 83 - test/test_score_creation_builder_data.py | 88 - ...score_creation_builder_data_layout_data.py | 59 - ..._score_creation_builder_data_score_data.py | 72 - ...ilder_data_score_data_instruments_inner.py | 58 - test/test_score_creation_type.py | 34 - test/test_score_details.py | 216 - test/test_score_fork.py | 54 - test/test_score_license.py | 34 - test/test_score_likes_counts.py | 57 - test/test_score_modification.py | 65 - test/test_score_plays_counts.py | 54 - test/test_score_privacy.py | 34 - test/test_score_revision.py | 61 - test/test_score_revision_creation.py | 56 - test/test_score_revision_statistics.py | 55 - test/test_score_source.py | 52 - test/test_score_track.py | 75 - test/test_score_track_creation.py | 59 - test/test_score_track_point.py | 56 - test/test_score_track_purpose.py | 34 - test/test_score_track_state.py | 34 - test/test_score_track_type.py | 34 - test/test_score_track_update.py | 57 - test/test_score_views_counts.py | 54 - test/test_task.py | 70 - test/test_task_api.py | 39 - test/test_task_export_options.py | 54 - test/test_task_progress.py | 53 - test/test_task_result.py | 53 - test/test_tutteo_product.py | 34 - test/test_user_admin_update.py | 57 - test/test_user_api.py | 53 - test/test_user_azure_details.py | 54 - test/test_user_community_profile_links.py | 57 - test/test_user_creation.py | 60 - test/test_user_details.py | 101 - test/test_user_details_admin.py | 83 - test/test_user_details_admin_license.py | 56 - test/test_user_public.py | 90 - test/test_user_public_summary.py | 72 - test/test_user_signin_link.py | 53 - test/test_user_signin_link_creation.py | 52 - tools/emit_inventory.py | 112 + tools/generate.sh | 87 + tools/openapi-config-async.json | 9 + tools/openapi-config.json | 9 + tools/patches/10_async_merge.py | 42 + tools/patches/20_errors.py | 159 + tools/patches/30_retry.py | 77 + tools/patches/40_pagination.py | 83 + tools/patches/50_oauth.py | 155 + tools/patches/60_client.py | 88 + tools/patches/70_docs.py | 64 + tools/patches/80_user_agent.py | 56 + tools/patches/90_exports.py | 77 + tools/patches/95_py_typed.py | 24 + tools/smoke.py | 94 + tox.ini | 9 - 856 files changed, 95624 insertions(+), 15447 deletions(-) create mode 100644 .DS_Store create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/python-push.yml delete mode 100644 .github/workflows/python.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/tag-on-merge.yml create mode 100644 .sdkgen.yaml create mode 100644 MIGRATION.md create mode 100644 OPERATIONS.json create mode 100644 QUICKSTART.md create mode 100644 VERSION delete mode 100644 docs/AppScopes.md delete mode 100644 docs/Assignment.md delete mode 100644 docs/AssignmentCopyResponse.md delete mode 100644 docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md delete mode 100644 docs/AssignmentSubmissionPlaybackInner.md delete mode 100644 docs/AssignmentType.md delete mode 100644 docs/AssignmentUpdate.md delete mode 100644 docs/ClassAssignment.md delete mode 100644 docs/ClassAssignmentLti.md delete mode 100644 docs/ClassAssignmentUpdate.md delete mode 100644 docs/ClassAssignmentUpdateGoogleClassroom.md delete mode 100644 docs/ClassAssignmentUpdateMicrosoftGraph.md delete mode 100644 docs/CollectionPrivacy.md delete mode 100644 docs/CollectionType.md delete mode 100644 docs/EduResourceResource.md delete mode 100644 docs/FlatLocales.md delete mode 100644 docs/GroupApi.md delete mode 100644 docs/GroupDetails.md delete mode 100644 docs/GroupType.md delete mode 100644 docs/LicenseSources.md delete mode 100644 docs/LmsName.md delete mode 100644 docs/MicrosoftGraphAssignment.md delete mode 100644 docs/ScoreCreationBuilderData.md delete mode 100644 docs/ScoreCreationBuilderDataScoreData.md delete mode 100644 docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md delete mode 100644 docs/ScoreLicense.md delete mode 100644 docs/TutteoProduct.md rename docs/{ => reference}/AccountApi.md (97%) create mode 100644 docs/reference/AddGroupUser200Response.md create mode 100644 docs/reference/AddGroupUserRequest.md rename docs/{ => reference}/ApiAccessToken.md (92%) create mode 100644 docs/reference/AppScopes.md create mode 100644 docs/reference/Assignment.md rename docs/{AssignmentCopyResponseCapabilities.md => reference/AssignmentCapabilities.md} (51%) create mode 100644 docs/reference/AssignmentCapabilitiesCanPublishInClassError.md rename docs/{ => reference}/AssignmentCopy.md (93%) create mode 100644 docs/reference/AssignmentCopyResponse.md create mode 100644 docs/reference/AssignmentCopyToClass.md create mode 100644 docs/reference/AssignmentCopyToResourceLibrary.md create mode 100644 docs/reference/AssignmentGroup.md rename docs/{ => reference}/AssignmentSubmission.md (91%) rename docs/{ => reference}/AssignmentSubmissionComment.md (89%) rename docs/{ => reference}/AssignmentSubmissionCommentCreation.md (83%) rename docs/{ => reference}/AssignmentSubmissionComments.md (86%) rename docs/{ => reference}/AssignmentSubmissionHistory.md (93%) rename docs/{ => reference}/AssignmentSubmissionHistoryAttachment.md (85%) rename docs/{ => reference}/AssignmentSubmissionHistoryState.md (57%) rename docs/{ => reference}/AssignmentSubmissionLti.md (66%) create mode 100644 docs/reference/AssignmentSubmissionPlayback.md rename docs/{ => reference}/AssignmentSubmissionState.md (60%) create mode 100644 docs/reference/AssignmentSubmissionStudentsMode.md rename docs/{ => reference}/AssignmentSubmissionUpdate.md (85%) create mode 100644 docs/reference/AssignmentType.md create mode 100644 docs/reference/AssignmentUpdate.md rename docs/{ => reference}/ClassApi.md (87%) create mode 100644 docs/reference/ClassAssignment.md rename docs/{ClassAssignmentCanvas.md => reference/ClassAssignmentAllOfCanvas.md} (51%) create mode 100644 docs/reference/ClassAssignmentAllOfLti.md rename docs/{ClassAssignmentMfc.md => reference/ClassAssignmentAllOfMfc.md} (53%) create mode 100644 docs/reference/ClassAssignmentUpdate.md create mode 100644 docs/reference/ClassAssignmentUpdateAllOfGoogleClassroom.md create mode 100644 docs/reference/ClassAssignmentUpdateAllOfMicrosoftGraph.md rename docs/{ => reference}/ClassAttachmentCreation.md (80%) rename docs/{ => reference}/ClassCreation.md (91%) rename docs/{ => reference}/ClassDetails.md (89%) rename docs/{ => reference}/ClassDetailsCanvas.md (88%) rename docs/{ => reference}/ClassDetailsClever.md (91%) rename docs/{ => reference}/ClassDetailsGoogleClassroom.md (86%) rename docs/{ => reference}/ClassDetailsGoogleDrive.md (88%) rename docs/{ => reference}/ClassDetailsIssues.md (88%) rename docs/{ => reference}/ClassDetailsIssuesSyncInner.md (86%) rename docs/{ => reference}/ClassDetailsLti.md (77%) rename docs/{ => reference}/ClassDetailsMfc.md (89%) rename docs/{ => reference}/ClassDetailsMicrosoftGraph.md (85%) rename docs/{ => reference}/ClassGradeLevel.md (53%) rename docs/{ => reference}/ClassRoles.md (66%) rename docs/{ => reference}/ClassState.md (58%) rename docs/{ => reference}/ClassUpdate.md (92%) rename docs/{ => reference}/Collection.md (64%) rename docs/{ => reference}/CollectionApi.md (77%) rename docs/{ => reference}/CollectionApp.md (90%) rename docs/{ => reference}/CollectionCapabilities.md (92%) create mode 100644 docs/reference/CollectionContents.md rename docs/{ => reference}/CollectionCreation.md (77%) rename docs/{ => reference}/CollectionModification.md (83%) create mode 100644 docs/reference/CollectionPrivacy.md create mode 100644 docs/reference/CollectionType.md create mode 100644 docs/reference/CreateLtiConfiguration200Response.md create mode 100644 docs/reference/CreditTransaction.md rename docs/{ => reference}/EduLibrary.md (72%) rename docs/{ => reference}/EduResource.md (69%) create mode 100644 docs/reference/EduResourceAssignmentCreation.md rename docs/{ => reference}/EduResourceCapabilities.md (78%) rename docs/{ => reference}/EduResourceCopy.md (89%) rename docs/{ => reference}/EduResourceCreation.md (68%) create mode 100644 docs/reference/EduResourceFolder.md rename docs/{ => reference}/EduResourceLtiLink.md (87%) rename docs/{ => reference}/EduResourceMove.md (89%) rename docs/{ => reference}/EduResourcePrivacy.md (63%) create mode 100644 docs/reference/EduResourceResource.md rename docs/{ => reference}/EduResourceType.md (66%) rename docs/{ => reference}/EduResourceUpdate.md (55%) rename docs/{ => reference}/EduResourceUseInClass.md (88%) rename docs/{ => reference}/EduResourcesApi.md (89%) rename docs/{ => reference}/FlatErrorResponse.md (66%) rename docs/{ => reference}/GoogleClassroomCoursework.md (88%) rename docs/{ => reference}/GoogleClassroomSubmission.md (88%) create mode 100644 docs/reference/Grade.md rename docs/{ => reference}/Group.md (75%) create mode 100644 docs/reference/GroupApi.md create mode 100644 docs/reference/GroupCreation.md create mode 100644 docs/reference/GroupDetails.md create mode 100644 docs/reference/GroupType.md rename docs/{ => reference}/LicenseMode.md (64%) create mode 100644 docs/reference/LicenseSources.md create mode 100644 docs/reference/LmsName.md create mode 100644 docs/reference/LtiConfiguration.md create mode 100644 docs/reference/LtiConfiguration1p1.md create mode 100644 docs/reference/LtiConfiguration1p1AllOfTool.md create mode 100644 docs/reference/LtiConfiguration1p3.md create mode 100644 docs/reference/LtiConfiguration1p3Base.md create mode 100644 docs/reference/LtiConfiguration1p3BaseSupportedServices.md create mode 100644 docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md create mode 100644 docs/reference/LtiConfiguration1p3BaseSupportedServicesDeepLinking.md create mode 100644 docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md create mode 100644 docs/reference/LtiConfiguration1p3BaseTool.md create mode 100644 docs/reference/LtiConfiguration1p3Deployment.md create mode 100644 docs/reference/LtiConfiguration1p3Dynamic.md create mode 100644 docs/reference/LtiConfiguration1p3Manual.md create mode 100644 docs/reference/LtiConfigurationBase.md create mode 100644 docs/reference/LtiConfigurationCreate.md create mode 100644 docs/reference/LtiConfigurationCreate1p1.md create mode 100644 docs/reference/LtiConfigurationCreate1p3Deployment.md create mode 100644 docs/reference/LtiConfigurationCreate1p3Dynamic.md create mode 100644 docs/reference/LtiConfigurationCreate1p3DynamicPlatformInfo.md create mode 100644 docs/reference/LtiConfigurationCreate1p3Manual.md create mode 100644 docs/reference/LtiConfigurationUpdate.md create mode 100644 docs/reference/LtiConfigurationUpdateDeployment.md create mode 100644 docs/reference/LtiConfigurationUpdateStandalone.md rename docs/{ => reference}/LtiCredentials.md (70%) rename docs/{ => reference}/LtiCredentialsCreation.md (87%) rename docs/{ => reference}/MediaAttachment.md (81%) rename docs/{ => reference}/MediaScoreSharingMode.md (65%) create mode 100644 docs/reference/MicrosoftGraphAssignment.md rename docs/{ => reference}/MicrosoftGraphSubmission.md (86%) create mode 100644 docs/reference/OMRApi.md create mode 100644 docs/reference/OmrCapabilities.md create mode 100644 docs/reference/OmrDetailsStepData.md create mode 100644 docs/reference/OmrDetailsSubmission.md create mode 100644 docs/reference/OmrDetectedInstrument.md create mode 100644 docs/reference/OmrImportedMetadata.md create mode 100644 docs/reference/OmrInstrumentOverride.md create mode 100644 docs/reference/OmrJob.md create mode 100644 docs/reference/OmrJobCreation.md create mode 100644 docs/reference/OmrJobFileMetadata.md create mode 100644 docs/reference/OmrJobFileUpload.md create mode 100644 docs/reference/OmrJobFileUploadResult.md create mode 100644 docs/reference/OmrJobInputFile.md create mode 100644 docs/reference/OmrJobOutput.md create mode 100644 docs/reference/OmrJobProgress.md create mode 100644 docs/reference/OmrJobResult.md create mode 100644 docs/reference/OmrJobRetention.md create mode 100644 docs/reference/OmrJobStatus.md create mode 100644 docs/reference/OmrLocaleDetails.md create mode 100644 docs/reference/OmrPendingStep.md create mode 100644 docs/reference/OmrStepName.md rename docs/{ => reference}/OrganizationApi.md (73%) rename docs/{ => reference}/OrganizationInvitation.md (87%) rename docs/{ => reference}/OrganizationInvitationCreation.md (86%) rename docs/{ => reference}/OrganizationRoles.md (62%) rename docs/{ => reference}/OrganizationUserAccessTokenCreation.md (84%) create mode 100644 docs/reference/RenameGroupRequest.md rename docs/{ => reference}/ResourceCollaborator.md (87%) rename docs/{ => reference}/ResourceCollaboratorCreation.md (91%) rename docs/{ => reference}/ResourceRights.md (92%) rename docs/{ => reference}/ScoreApi.md (89%) rename docs/{ => reference}/ScoreComment.md (81%) rename docs/{ => reference}/ScoreCommentContext.md (91%) rename docs/{ => reference}/ScoreCommentCreation.md (79%) rename docs/{ => reference}/ScoreCommentModeration.md (88%) rename docs/{ => reference}/ScoreCommentUpdate.md (76%) rename docs/{ => reference}/ScoreCommentsCounts.md (75%) rename docs/{ => reference}/ScoreCreation.md (64%) create mode 100644 docs/reference/ScoreCreationBuilderData.md create mode 100644 docs/reference/ScoreCreationBuilderDataAllOfBuilderData.md rename docs/{ScoreCreationBuilderDataLayoutData.md => reference/ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md} (60%) create mode 100644 docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreData.md create mode 100644 docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md create mode 100644 docs/reference/ScoreCreationCommon.md create mode 100644 docs/reference/ScoreCreationFileImport.md create mode 100644 docs/reference/ScoreCreationGoogleDriveImport.md rename docs/{ => reference}/ScoreCreationType.md (67%) rename docs/{ => reference}/ScoreDetails.md (76%) create mode 100644 docs/reference/ScoreDetailsAllOfMe.md rename docs/{ => reference}/ScoreFork.md (76%) create mode 100644 docs/reference/ScoreLicense.md rename docs/{ => reference}/ScoreLikesCounts.md (73%) rename docs/{ => reference}/ScoreModification.md (91%) rename docs/{ => reference}/ScorePlaysCounts.md (77%) rename docs/{ => reference}/ScorePrivacy.md (89%) rename docs/{ => reference}/ScoreRevision.md (81%) rename docs/{ => reference}/ScoreRevisionCreation.md (92%) rename docs/{ => reference}/ScoreRevisionStatistics.md (89%) rename docs/{ => reference}/ScoreSource.md (90%) create mode 100644 docs/reference/ScoreSummary.md rename docs/{ => reference}/ScoreTrack.md (81%) rename docs/{ => reference}/ScoreTrackCreation.md (85%) create mode 100644 docs/reference/ScoreTrackCreationResponse.md rename docs/{ => reference}/ScoreTrackPoint.md (84%) rename docs/{ => reference}/ScoreTrackPurpose.md (66%) rename docs/{ => reference}/ScoreTrackState.md (65%) rename docs/{ => reference}/ScoreTrackType.md (60%) rename docs/{ => reference}/ScoreTrackUpdate.md (80%) rename docs/{ => reference}/ScoreViewsCounts.md (77%) rename docs/{ => reference}/Task.md (65%) rename docs/{ => reference}/TaskApi.md (98%) rename docs/{ => reference}/TaskExportOptions.md (87%) rename docs/{ => reference}/TaskProgress.md (90%) rename docs/{ => reference}/TaskResult.md (90%) create mode 100644 docs/reference/TeachingTheme.md create mode 100644 docs/reference/TutteoProduct.md rename docs/{ => reference}/UserAdminUpdate.md (91%) rename docs/{ => reference}/UserApi.md (76%) rename docs/{ => reference}/UserAzureDetails.md (89%) create mode 100644 docs/reference/UserBasics.md rename docs/{ => reference}/UserCommunityProfileLinks.md (89%) rename docs/{ => reference}/UserCreation.md (82%) rename docs/{ => reference}/UserDetails.md (70%) rename docs/{ => reference}/UserDetailsAdmin.md (76%) rename docs/{UserDetailsAdminLicense.md => reference/UserDetailsAdminAllOfLicense.md} (55%) rename docs/{ => reference}/UserPublic.md (83%) rename docs/{ => reference}/UserPublicSummary.md (88%) rename docs/{ => reference}/UserSigninLink.md (80%) rename docs/{ => reference}/UserSigninLinkCreation.md (86%) create mode 100644 flat_api/_retry.py create mode 100644 flat_api/aio/__init__.py create mode 100644 flat_api/aio/api/__init__.py create mode 100644 flat_api/aio/api/account_api.py create mode 100644 flat_api/aio/api/class_api.py create mode 100644 flat_api/aio/api/collection_api.py create mode 100644 flat_api/aio/api/edu_resources_api.py create mode 100644 flat_api/aio/api/group_api.py create mode 100644 flat_api/aio/api/omr_api.py create mode 100644 flat_api/aio/api/organization_api.py create mode 100644 flat_api/aio/api/score_api.py create mode 100644 flat_api/aio/api/task_api.py create mode 100644 flat_api/aio/api/user_api.py create mode 100644 flat_api/aio/api_client.py create mode 100644 flat_api/aio/api_response.py create mode 100644 flat_api/aio/configuration.py create mode 100644 flat_api/aio/exceptions.py create mode 100644 flat_api/aio/models/__init__.py create mode 100644 flat_api/aio/models/add_group_user200_response.py create mode 100644 flat_api/aio/models/add_group_user_request.py create mode 100644 flat_api/aio/models/api_access_token.py create mode 100644 flat_api/aio/models/app_scopes.py create mode 100644 flat_api/aio/models/assignment.py create mode 100644 flat_api/aio/models/assignment_capabilities.py create mode 100644 flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py create mode 100644 flat_api/aio/models/assignment_copy.py create mode 100644 flat_api/aio/models/assignment_copy_response.py create mode 100644 flat_api/aio/models/assignment_copy_to_class.py create mode 100644 flat_api/aio/models/assignment_copy_to_resource_library.py create mode 100644 flat_api/aio/models/assignment_group.py create mode 100644 flat_api/aio/models/assignment_submission.py create mode 100644 flat_api/aio/models/assignment_submission_comment.py create mode 100644 flat_api/aio/models/assignment_submission_comment_creation.py create mode 100644 flat_api/aio/models/assignment_submission_comments.py create mode 100644 flat_api/aio/models/assignment_submission_history.py create mode 100644 flat_api/aio/models/assignment_submission_history_attachment.py create mode 100644 flat_api/aio/models/assignment_submission_history_state.py create mode 100644 flat_api/aio/models/assignment_submission_lti.py create mode 100644 flat_api/aio/models/assignment_submission_playback.py create mode 100644 flat_api/aio/models/assignment_submission_state.py create mode 100644 flat_api/aio/models/assignment_submission_students_mode.py create mode 100644 flat_api/aio/models/assignment_submission_update.py create mode 100644 flat_api/aio/models/assignment_type.py create mode 100644 flat_api/aio/models/assignment_update.py create mode 100644 flat_api/aio/models/class_assignment.py create mode 100644 flat_api/aio/models/class_assignment_all_of_canvas.py create mode 100644 flat_api/aio/models/class_assignment_all_of_lti.py create mode 100644 flat_api/aio/models/class_assignment_all_of_mfc.py create mode 100644 flat_api/aio/models/class_assignment_update.py create mode 100644 flat_api/aio/models/class_assignment_update_all_of_google_classroom.py create mode 100644 flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py create mode 100644 flat_api/aio/models/class_attachment_creation.py create mode 100644 flat_api/aio/models/class_creation.py create mode 100644 flat_api/aio/models/class_details.py create mode 100644 flat_api/aio/models/class_details_canvas.py create mode 100644 flat_api/aio/models/class_details_clever.py create mode 100644 flat_api/aio/models/class_details_google_classroom.py create mode 100644 flat_api/aio/models/class_details_google_drive.py create mode 100644 flat_api/aio/models/class_details_issues.py create mode 100644 flat_api/aio/models/class_details_issues_sync_inner.py create mode 100644 flat_api/aio/models/class_details_lti.py create mode 100644 flat_api/aio/models/class_details_mfc.py create mode 100644 flat_api/aio/models/class_details_microsoft_graph.py create mode 100644 flat_api/aio/models/class_grade_level.py create mode 100644 flat_api/aio/models/class_roles.py create mode 100644 flat_api/aio/models/class_state.py create mode 100644 flat_api/aio/models/class_update.py create mode 100644 flat_api/aio/models/collection.py create mode 100644 flat_api/aio/models/collection_app.py create mode 100644 flat_api/aio/models/collection_capabilities.py create mode 100644 flat_api/aio/models/collection_contents.py create mode 100644 flat_api/aio/models/collection_creation.py create mode 100644 flat_api/aio/models/collection_modification.py create mode 100644 flat_api/aio/models/collection_privacy.py create mode 100644 flat_api/aio/models/collection_type.py create mode 100644 flat_api/aio/models/create_lti_configuration200_response.py create mode 100644 flat_api/aio/models/credit_transaction.py create mode 100644 flat_api/aio/models/edu_library.py create mode 100644 flat_api/aio/models/edu_resource.py create mode 100644 flat_api/aio/models/edu_resource_assignment_creation.py create mode 100644 flat_api/aio/models/edu_resource_capabilities.py create mode 100644 flat_api/aio/models/edu_resource_copy.py create mode 100644 flat_api/aio/models/edu_resource_creation.py create mode 100644 flat_api/aio/models/edu_resource_folder.py create mode 100644 flat_api/aio/models/edu_resource_lti_link.py create mode 100644 flat_api/aio/models/edu_resource_move.py create mode 100644 flat_api/aio/models/edu_resource_privacy.py create mode 100644 flat_api/aio/models/edu_resource_resource.py create mode 100644 flat_api/aio/models/edu_resource_type.py create mode 100644 flat_api/aio/models/edu_resource_update.py create mode 100644 flat_api/aio/models/edu_resource_use_in_class.py create mode 100644 flat_api/aio/models/flat_error_response.py create mode 100644 flat_api/aio/models/google_classroom_coursework.py create mode 100644 flat_api/aio/models/google_classroom_submission.py create mode 100644 flat_api/aio/models/grade.py create mode 100644 flat_api/aio/models/group.py create mode 100644 flat_api/aio/models/group_creation.py create mode 100644 flat_api/aio/models/group_details.py create mode 100644 flat_api/aio/models/group_type.py create mode 100644 flat_api/aio/models/license_mode.py create mode 100644 flat_api/aio/models/license_sources.py create mode 100644 flat_api/aio/models/lms_name.py create mode 100644 flat_api/aio/models/lti_configuration.py create mode 100644 flat_api/aio/models/lti_configuration1p1.py create mode 100644 flat_api/aio/models/lti_configuration1p1_all_of_tool.py create mode 100644 flat_api/aio/models/lti_configuration1p3.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base_supported_services.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py create mode 100644 flat_api/aio/models/lti_configuration1p3_base_tool.py create mode 100644 flat_api/aio/models/lti_configuration1p3_deployment.py create mode 100644 flat_api/aio/models/lti_configuration1p3_dynamic.py create mode 100644 flat_api/aio/models/lti_configuration1p3_manual.py create mode 100644 flat_api/aio/models/lti_configuration_base.py create mode 100644 flat_api/aio/models/lti_configuration_create.py create mode 100644 flat_api/aio/models/lti_configuration_create1p1.py create mode 100644 flat_api/aio/models/lti_configuration_create1p3_deployment.py create mode 100644 flat_api/aio/models/lti_configuration_create1p3_dynamic.py create mode 100644 flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py create mode 100644 flat_api/aio/models/lti_configuration_create1p3_manual.py create mode 100644 flat_api/aio/models/lti_configuration_update.py create mode 100644 flat_api/aio/models/lti_configuration_update_deployment.py create mode 100644 flat_api/aio/models/lti_configuration_update_standalone.py create mode 100644 flat_api/aio/models/lti_credentials.py create mode 100644 flat_api/aio/models/lti_credentials_creation.py create mode 100644 flat_api/aio/models/media_attachment.py create mode 100644 flat_api/aio/models/media_score_sharing_mode.py create mode 100644 flat_api/aio/models/microsoft_graph_assignment.py create mode 100644 flat_api/aio/models/microsoft_graph_submission.py create mode 100644 flat_api/aio/models/omr_capabilities.py create mode 100644 flat_api/aio/models/omr_details_step_data.py create mode 100644 flat_api/aio/models/omr_details_submission.py create mode 100644 flat_api/aio/models/omr_detected_instrument.py create mode 100644 flat_api/aio/models/omr_imported_metadata.py create mode 100644 flat_api/aio/models/omr_instrument_override.py create mode 100644 flat_api/aio/models/omr_job.py create mode 100644 flat_api/aio/models/omr_job_creation.py create mode 100644 flat_api/aio/models/omr_job_file_metadata.py create mode 100644 flat_api/aio/models/omr_job_file_upload.py create mode 100644 flat_api/aio/models/omr_job_file_upload_result.py create mode 100644 flat_api/aio/models/omr_job_input_file.py create mode 100644 flat_api/aio/models/omr_job_output.py create mode 100644 flat_api/aio/models/omr_job_progress.py create mode 100644 flat_api/aio/models/omr_job_result.py create mode 100644 flat_api/aio/models/omr_job_retention.py create mode 100644 flat_api/aio/models/omr_job_status.py create mode 100644 flat_api/aio/models/omr_locale_details.py create mode 100644 flat_api/aio/models/omr_pending_step.py create mode 100644 flat_api/aio/models/omr_step_name.py create mode 100644 flat_api/aio/models/organization_invitation.py create mode 100644 flat_api/aio/models/organization_invitation_creation.py create mode 100644 flat_api/aio/models/organization_roles.py create mode 100644 flat_api/aio/models/organization_user_access_token_creation.py create mode 100644 flat_api/aio/models/rename_group_request.py create mode 100644 flat_api/aio/models/resource_collaborator.py create mode 100644 flat_api/aio/models/resource_collaborator_creation.py create mode 100644 flat_api/aio/models/resource_rights.py create mode 100644 flat_api/aio/models/score_comment.py create mode 100644 flat_api/aio/models/score_comment_context.py create mode 100644 flat_api/aio/models/score_comment_creation.py create mode 100644 flat_api/aio/models/score_comment_moderation.py create mode 100644 flat_api/aio/models/score_comment_update.py create mode 100644 flat_api/aio/models/score_comments_counts.py create mode 100644 flat_api/aio/models/score_creation.py create mode 100644 flat_api/aio/models/score_creation_builder_data.py create mode 100644 flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py rename flat_api/{models/score_creation_builder_data_layout_data.py => aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py} (61%) create mode 100644 flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py rename flat_api/{models/score_creation_builder_data_score_data_instruments_inner.py => aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py} (50%) create mode 100644 flat_api/aio/models/score_creation_common.py create mode 100644 flat_api/aio/models/score_creation_file_import.py create mode 100644 flat_api/aio/models/score_creation_google_drive_import.py create mode 100644 flat_api/aio/models/score_creation_type.py create mode 100644 flat_api/aio/models/score_details.py create mode 100644 flat_api/aio/models/score_details_all_of_me.py create mode 100644 flat_api/aio/models/score_fork.py create mode 100644 flat_api/aio/models/score_license.py create mode 100644 flat_api/aio/models/score_likes_counts.py create mode 100644 flat_api/aio/models/score_modification.py create mode 100644 flat_api/aio/models/score_plays_counts.py create mode 100644 flat_api/aio/models/score_privacy.py create mode 100644 flat_api/aio/models/score_revision.py create mode 100644 flat_api/aio/models/score_revision_creation.py create mode 100644 flat_api/aio/models/score_revision_statistics.py create mode 100644 flat_api/aio/models/score_source.py create mode 100644 flat_api/aio/models/score_summary.py create mode 100644 flat_api/aio/models/score_track.py create mode 100644 flat_api/aio/models/score_track_creation.py create mode 100644 flat_api/aio/models/score_track_creation_response.py create mode 100644 flat_api/aio/models/score_track_point.py create mode 100644 flat_api/aio/models/score_track_purpose.py create mode 100644 flat_api/aio/models/score_track_state.py create mode 100644 flat_api/aio/models/score_track_type.py create mode 100644 flat_api/aio/models/score_track_update.py create mode 100644 flat_api/aio/models/score_views_counts.py create mode 100644 flat_api/aio/models/task.py create mode 100644 flat_api/aio/models/task_export_options.py create mode 100644 flat_api/aio/models/task_progress.py create mode 100644 flat_api/aio/models/task_result.py create mode 100644 flat_api/aio/models/teaching_theme.py create mode 100644 flat_api/aio/models/tutteo_product.py create mode 100644 flat_api/aio/models/user_admin_update.py create mode 100644 flat_api/aio/models/user_azure_details.py create mode 100644 flat_api/aio/models/user_basics.py create mode 100644 flat_api/aio/models/user_community_profile_links.py create mode 100644 flat_api/aio/models/user_creation.py create mode 100644 flat_api/aio/models/user_details.py create mode 100644 flat_api/aio/models/user_details_admin.py create mode 100644 flat_api/aio/models/user_details_admin_all_of_license.py create mode 100644 flat_api/aio/models/user_public.py create mode 100644 flat_api/aio/models/user_public_summary.py create mode 100644 flat_api/aio/models/user_signin_link.py create mode 100644 flat_api/aio/models/user_signin_link_creation.py create mode 100644 flat_api/aio/rest.py create mode 100644 flat_api/api/omr_api.py create mode 100644 flat_api/client.py create mode 100644 flat_api/errors.py create mode 100644 flat_api/models/add_group_user200_response.py create mode 100644 flat_api/models/add_group_user_request.py rename flat_api/models/{assignment_copy_response_capabilities.py => assignment_capabilities.py} (50%) create mode 100644 flat_api/models/assignment_capabilities_can_publish_in_class_error.py delete mode 100644 flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py create mode 100644 flat_api/models/assignment_copy_to_class.py create mode 100644 flat_api/models/assignment_copy_to_resource_library.py create mode 100644 flat_api/models/assignment_group.py create mode 100644 flat_api/models/assignment_submission_playback.py delete mode 100644 flat_api/models/assignment_submission_playback_inner.py create mode 100644 flat_api/models/assignment_submission_students_mode.py create mode 100644 flat_api/models/class_assignment_all_of_canvas.py create mode 100644 flat_api/models/class_assignment_all_of_lti.py create mode 100644 flat_api/models/class_assignment_all_of_mfc.py delete mode 100644 flat_api/models/class_assignment_canvas.py delete mode 100644 flat_api/models/class_assignment_lti.py delete mode 100644 flat_api/models/class_assignment_mfc.py create mode 100644 flat_api/models/class_assignment_update_all_of_google_classroom.py create mode 100644 flat_api/models/class_assignment_update_all_of_microsoft_graph.py delete mode 100644 flat_api/models/class_assignment_update_google_classroom.py delete mode 100644 flat_api/models/class_assignment_update_microsoft_graph.py create mode 100644 flat_api/models/collection_contents.py create mode 100644 flat_api/models/create_lti_configuration200_response.py create mode 100644 flat_api/models/credit_transaction.py create mode 100644 flat_api/models/edu_resource_assignment_creation.py create mode 100644 flat_api/models/edu_resource_folder.py delete mode 100644 flat_api/models/flat_locales.py create mode 100644 flat_api/models/grade.py create mode 100644 flat_api/models/group_creation.py create mode 100644 flat_api/models/lti_configuration.py create mode 100644 flat_api/models/lti_configuration1p1.py create mode 100644 flat_api/models/lti_configuration1p1_all_of_tool.py create mode 100644 flat_api/models/lti_configuration1p3.py create mode 100644 flat_api/models/lti_configuration1p3_base.py create mode 100644 flat_api/models/lti_configuration1p3_base_supported_services.py create mode 100644 flat_api/models/lti_configuration1p3_base_supported_services_ags.py create mode 100644 flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py create mode 100644 flat_api/models/lti_configuration1p3_base_supported_services_nrps.py create mode 100644 flat_api/models/lti_configuration1p3_base_tool.py create mode 100644 flat_api/models/lti_configuration1p3_deployment.py create mode 100644 flat_api/models/lti_configuration1p3_dynamic.py create mode 100644 flat_api/models/lti_configuration1p3_manual.py create mode 100644 flat_api/models/lti_configuration_base.py create mode 100644 flat_api/models/lti_configuration_create.py create mode 100644 flat_api/models/lti_configuration_create1p1.py create mode 100644 flat_api/models/lti_configuration_create1p3_deployment.py create mode 100644 flat_api/models/lti_configuration_create1p3_dynamic.py create mode 100644 flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py create mode 100644 flat_api/models/lti_configuration_create1p3_manual.py create mode 100644 flat_api/models/lti_configuration_update.py create mode 100644 flat_api/models/lti_configuration_update_deployment.py create mode 100644 flat_api/models/lti_configuration_update_standalone.py create mode 100644 flat_api/models/omr_capabilities.py create mode 100644 flat_api/models/omr_details_step_data.py create mode 100644 flat_api/models/omr_details_submission.py create mode 100644 flat_api/models/omr_detected_instrument.py create mode 100644 flat_api/models/omr_imported_metadata.py create mode 100644 flat_api/models/omr_instrument_override.py create mode 100644 flat_api/models/omr_job.py create mode 100644 flat_api/models/omr_job_creation.py create mode 100644 flat_api/models/omr_job_file_metadata.py create mode 100644 flat_api/models/omr_job_file_upload.py create mode 100644 flat_api/models/omr_job_file_upload_result.py create mode 100644 flat_api/models/omr_job_input_file.py create mode 100644 flat_api/models/omr_job_output.py create mode 100644 flat_api/models/omr_job_progress.py create mode 100644 flat_api/models/omr_job_result.py create mode 100644 flat_api/models/omr_job_retention.py create mode 100644 flat_api/models/omr_job_status.py create mode 100644 flat_api/models/omr_locale_details.py create mode 100644 flat_api/models/omr_pending_step.py create mode 100644 flat_api/models/omr_step_name.py create mode 100644 flat_api/models/rename_group_request.py create mode 100644 flat_api/models/score_creation_builder_data_all_of_builder_data.py create mode 100644 flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py create mode 100644 flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py create mode 100644 flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py delete mode 100644 flat_api/models/score_creation_builder_data_score_data.py create mode 100644 flat_api/models/score_creation_common.py create mode 100644 flat_api/models/score_creation_file_import.py create mode 100644 flat_api/models/score_creation_google_drive_import.py create mode 100644 flat_api/models/score_details_all_of_me.py create mode 100644 flat_api/models/score_summary.py create mode 100644 flat_api/models/score_track_creation_response.py create mode 100644 flat_api/models/teaching_theme.py create mode 100644 flat_api/models/user_basics.py create mode 100644 flat_api/models/user_details_admin_all_of_license.py delete mode 100644 flat_api/models/user_details_admin_license.py create mode 100644 flat_api/oauth.py create mode 100644 flat_api/pagination.py delete mode 100644 setup.cfg delete mode 100644 setup.py delete mode 100644 test-requirements.txt delete mode 100644 test/__init__.py delete mode 100644 test/test_account_api.py delete mode 100644 test/test_api_access_token.py delete mode 100644 test/test_app_scopes.py delete mode 100644 test/test_assignment.py delete mode 100644 test/test_assignment_copy.py delete mode 100644 test/test_assignment_copy_response.py delete mode 100644 test/test_assignment_copy_response_capabilities.py delete mode 100644 test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py delete mode 100644 test/test_assignment_submission.py delete mode 100644 test/test_assignment_submission_comment.py delete mode 100644 test/test_assignment_submission_comment_creation.py delete mode 100644 test/test_assignment_submission_comments.py delete mode 100644 test/test_assignment_submission_history.py delete mode 100644 test/test_assignment_submission_history_attachment.py delete mode 100644 test/test_assignment_submission_history_state.py delete mode 100644 test/test_assignment_submission_lti.py delete mode 100644 test/test_assignment_submission_playback_inner.py delete mode 100644 test/test_assignment_submission_state.py delete mode 100644 test/test_assignment_submission_update.py delete mode 100644 test/test_assignment_type.py delete mode 100644 test/test_assignment_update.py delete mode 100644 test/test_class_api.py delete mode 100644 test/test_class_assignment.py delete mode 100644 test/test_class_assignment_canvas.py delete mode 100644 test/test_class_assignment_lti.py delete mode 100644 test/test_class_assignment_mfc.py delete mode 100644 test/test_class_assignment_update.py delete mode 100644 test/test_class_assignment_update_google_classroom.py delete mode 100644 test/test_class_assignment_update_microsoft_graph.py delete mode 100644 test/test_class_attachment_creation.py delete mode 100644 test/test_class_creation.py delete mode 100644 test/test_class_details.py delete mode 100644 test/test_class_details_canvas.py delete mode 100644 test/test_class_details_clever.py delete mode 100644 test/test_class_details_google_classroom.py delete mode 100644 test/test_class_details_google_drive.py delete mode 100644 test/test_class_details_issues.py delete mode 100644 test/test_class_details_issues_sync_inner.py delete mode 100644 test/test_class_details_lti.py delete mode 100644 test/test_class_details_mfc.py delete mode 100644 test/test_class_details_microsoft_graph.py delete mode 100644 test/test_class_grade_level.py delete mode 100644 test/test_class_roles.py delete mode 100644 test/test_class_state.py delete mode 100644 test/test_class_update.py delete mode 100644 test/test_collection.py delete mode 100644 test/test_collection_api.py delete mode 100644 test/test_collection_app.py delete mode 100644 test/test_collection_capabilities.py delete mode 100644 test/test_collection_creation.py delete mode 100644 test/test_collection_modification.py delete mode 100644 test/test_collection_privacy.py delete mode 100644 test/test_collection_type.py delete mode 100644 test/test_edu_library.py delete mode 100644 test/test_edu_resource.py delete mode 100644 test/test_edu_resource_capabilities.py delete mode 100644 test/test_edu_resource_copy.py delete mode 100644 test/test_edu_resource_creation.py delete mode 100644 test/test_edu_resource_lti_link.py delete mode 100644 test/test_edu_resource_move.py delete mode 100644 test/test_edu_resource_privacy.py delete mode 100644 test/test_edu_resource_resource.py delete mode 100644 test/test_edu_resource_type.py delete mode 100644 test/test_edu_resource_update.py delete mode 100644 test/test_edu_resource_use_in_class.py delete mode 100644 test/test_edu_resources_api.py delete mode 100644 test/test_flat_error_response.py delete mode 100644 test/test_flat_locales.py delete mode 100644 test/test_google_classroom_coursework.py delete mode 100644 test/test_google_classroom_submission.py delete mode 100644 test/test_group.py delete mode 100644 test/test_group_api.py delete mode 100644 test/test_group_details.py delete mode 100644 test/test_group_type.py delete mode 100644 test/test_license_mode.py delete mode 100644 test/test_license_sources.py delete mode 100644 test/test_lms_name.py delete mode 100644 test/test_lti_credentials.py delete mode 100644 test/test_lti_credentials_creation.py delete mode 100644 test/test_media_attachment.py delete mode 100644 test/test_media_score_sharing_mode.py delete mode 100644 test/test_microsoft_graph_assignment.py delete mode 100644 test/test_microsoft_graph_submission.py delete mode 100644 test/test_organization_api.py delete mode 100644 test/test_organization_invitation.py delete mode 100644 test/test_organization_invitation_creation.py delete mode 100644 test/test_organization_roles.py delete mode 100644 test/test_organization_user_access_token_creation.py delete mode 100644 test/test_resource_collaborator.py delete mode 100644 test/test_resource_collaborator_creation.py delete mode 100644 test/test_resource_rights.py delete mode 100644 test/test_score_api.py delete mode 100644 test/test_score_comment.py delete mode 100644 test/test_score_comment_context.py delete mode 100644 test/test_score_comment_creation.py delete mode 100644 test/test_score_comment_moderation.py delete mode 100644 test/test_score_comment_update.py delete mode 100644 test/test_score_comments_counts.py delete mode 100644 test/test_score_creation.py delete mode 100644 test/test_score_creation_builder_data.py delete mode 100644 test/test_score_creation_builder_data_layout_data.py delete mode 100644 test/test_score_creation_builder_data_score_data.py delete mode 100644 test/test_score_creation_builder_data_score_data_instruments_inner.py delete mode 100644 test/test_score_creation_type.py delete mode 100644 test/test_score_details.py delete mode 100644 test/test_score_fork.py delete mode 100644 test/test_score_license.py delete mode 100644 test/test_score_likes_counts.py delete mode 100644 test/test_score_modification.py delete mode 100644 test/test_score_plays_counts.py delete mode 100644 test/test_score_privacy.py delete mode 100644 test/test_score_revision.py delete mode 100644 test/test_score_revision_creation.py delete mode 100644 test/test_score_revision_statistics.py delete mode 100644 test/test_score_source.py delete mode 100644 test/test_score_track.py delete mode 100644 test/test_score_track_creation.py delete mode 100644 test/test_score_track_point.py delete mode 100644 test/test_score_track_purpose.py delete mode 100644 test/test_score_track_state.py delete mode 100644 test/test_score_track_type.py delete mode 100644 test/test_score_track_update.py delete mode 100644 test/test_score_views_counts.py delete mode 100644 test/test_task.py delete mode 100644 test/test_task_api.py delete mode 100644 test/test_task_export_options.py delete mode 100644 test/test_task_progress.py delete mode 100644 test/test_task_result.py delete mode 100644 test/test_tutteo_product.py delete mode 100644 test/test_user_admin_update.py delete mode 100644 test/test_user_api.py delete mode 100644 test/test_user_azure_details.py delete mode 100644 test/test_user_community_profile_links.py delete mode 100644 test/test_user_creation.py delete mode 100644 test/test_user_details.py delete mode 100644 test/test_user_details_admin.py delete mode 100644 test/test_user_details_admin_license.py delete mode 100644 test/test_user_public.py delete mode 100644 test/test_user_public_summary.py delete mode 100644 test/test_user_signin_link.py delete mode 100644 test/test_user_signin_link_creation.py create mode 100755 tools/emit_inventory.py create mode 100755 tools/generate.sh create mode 100644 tools/openapi-config-async.json create mode 100644 tools/openapi-config.json create mode 100644 tools/patches/10_async_merge.py create mode 100644 tools/patches/20_errors.py create mode 100644 tools/patches/30_retry.py create mode 100644 tools/patches/40_pagination.py create mode 100644 tools/patches/50_oauth.py create mode 100644 tools/patches/60_client.py create mode 100644 tools/patches/70_docs.py create mode 100644 tools/patches/80_user_agent.py create mode 100644 tools/patches/90_exports.py create mode 100755 tools/patches/95_py_typed.py create mode 100644 tools/smoke.py delete mode 100644 tox.ini diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a5d6bf148c43bf1d69ce46624b4570d4d6633dda GIT binary patch literal 8196 zcmeHMziSjh6n+y|Z%qgU5l!c|7LlYoEo5_CY_1W~SebZxn;&}T9{C0776gez#6n0b zSftRx+QLE*;Xv?Dv9uDu`Ej{7?%r|Nh~gXA`S#|$H}9KoCbxNeM5Jo_ttFy)A_{S7 zoSQ*c(zIP)g*N3zBA`M%wKtbmldRJ%c*=k%APR^AqJStM3j8e!;F+ykIOMr+tzs|c__gSp7ONUrbO1tRSD8cFy>_Y0VuCX!No3E+yD6C$v`!QmEzBl7V`21gM z{^!B}!0gKb=c_*Up7~bJ@7;&n)9%c&c+RKXgXdR2zw7(~wQv#=+U41)@+Rdrp8L+x z)Bb*+#q!K$cAl4J*LB{IHmGgR;hH_4UjFL!w`D$@N40vdH+A`o{<|&A#rcf#^LW+X zYhFSBBzb%)4;Q$N^Ekfse4vLrg*<B~mdH(AikR}RDuE04PGOz3ZmErII zC!bg%L;+FYpHV;s_0@U}bX{#-Ag*ie2-i9;-LzkB(S)Eg3lNSL-2I)kBKdQhlVND%B literal 0 HcmV?d00001 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0190fd7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +# Build and load checks. Everything that needs a credential runs elsewhere and reports +# back as a commit status, so no secret is reachable from this workflow. + +on: + pull_request: + push: + branches: [master, main] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: build (python ${{ matrix.python }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python: ['3.11', '3.12', '3.13'] + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + - name: Import the installed package + # `--with .` installs this package into a throwaway environment, so this exercises the + # path a user takes and proves the dependency list in pyproject.toml is complete. Run + # from RUNNER_TEMP, or the import would resolve to the source directory instead of what + # was installed. + run: cd "$RUNNER_TEMP" && uv run --no-project --python ${{ matrix.python }} --with "$GITHUB_WORKSPACE" python -c "import flat_api; print(flat_api.__version__)" + - name: Compile every module + run: uv run --no-project --python ${{ matrix.python }} python -m compileall -q flat_api diff --git a/.github/workflows/python-push.yml b/.github/workflows/python-push.yml deleted file mode 100644 index 6a19390..0000000 --- a/.github/workflows/python-push.yml +++ /dev/null @@ -1,39 +0,0 @@ -on: - push: - branches: - - master - -permissions: - contents: write - pull-requests: write - packages: write - -name: release-please - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - uses: google-github-actions/release-please-action@v4 - id: release - with: - release-type: python - package-name: flat_api - bump-minor-pre-major: true - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - if: ${{ steps.release.outputs.release_created }} \ No newline at end of file diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml deleted file mode 100644 index 3db3c3f..0000000 --- a/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: flat_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..10e8d24 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +# Publishing is triggered by a version tag and nothing else (FR-019a). The tag is created by +# tag-on-merge.yml, so the approval -> merge -> tag -> publish ordering is enforced by the +# platform rather than by convention (FR-007f). + +on: + push: + tags: ['[0-9]+.[0-9]+.[0-9]+'] + +permissions: + contents: read + id-token: write # OIDC for PyPI trusted publishing and provenance (FR-021a, FR-021b) + +jobs: + publish: + runs-on: ubuntu-latest + environment: pypi + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + python-version: '3.12' + + - name: The tag must match the packaged version + run: | + TAG="${GITHUB_REF_NAME}" + PKG="$(cat VERSION)" + [ "$TAG" = "$PKG" ] || { echo "tag $TAG != VERSION $PKG"; exit 1; } + + - run: uv build + + # Assert the artifact, not just the file. setuptools derives the version from VERSION, but a + # broken pyproject.toml still builds: it silently produced flat_api-0.0.0 once. PyPI never + # lets a version be replaced, so this has to fail here rather than after the upload. + - name: The built artifact must carry the tagged version + run: | + TAG="${GITHUB_REF_NAME}" + test -f "dist/flat_api-${TAG}-py3-none-any.whl" || { + echo "no wheel for ${TAG}; dist/ holds:"; ls dist/; exit 1; + } + test -f "dist/flat_api-${TAG}.tar.gz" || { + echo "no sdist for ${TAG}; dist/ holds:"; ls dist/; exit 1; + } + + # No long-lived token exists: PyPI trusts this repository and workflow by OIDC. + - name: Publish to PyPI (trusted publishing) + uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true diff --git a/.github/workflows/tag-on-merge.yml b/.github/workflows/tag-on-merge.yml new file mode 100644 index 0000000..198952d --- /dev/null +++ b/.github/workflows/tag-on-merge.yml @@ -0,0 +1,38 @@ +name: Tag on merge + +# Merging is what creates the version tag, and the tag is what publishes (FR-007f, FR-019a). +# A breaking release waits for a human to merge, which is how the FR-019 approval is expressed. + +on: + push: + branches: [master, main] + +permissions: + contents: write + +jobs: + tag: + runs-on: ubuntu-latest + steps: + # SDK_RELEASE_TOKEN, not the automatic GITHUB_TOKEN. GitHub does not start a workflow run for + # an event created with GITHUB_TOKEN, so a tag pushed with it would never trigger release.yml + # and nothing would ever publish. That failure is silent: the tag appears, the release + # workflow simply never runs. Needs contents:write on this repository. + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.SDK_RELEASE_TOKEN }} + - name: Tag the version if it is new + run: | + test -n "${{ secrets.SDK_RELEASE_TOKEN }}" || { + echo "SDK_RELEASE_TOKEN is not set: the tag would not trigger release.yml"; exit 1; + } + VERSION="$(cat VERSION)" + if git rev-parse "$VERSION" >/dev/null 2>&1; then + echo "Tag $VERSION already exists, nothing to do." + exit 0 + fi + git config user.name "Flat SDK bot" + git config user.email "developers@flat.io" + git tag -a "$VERSION" -m "Release $VERSION" + git push origin "$VERSION" diff --git a/.gitignore b/.gitignore index 2fba2c4..6829ade 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,12 @@ target/ # Virtualenv .venv + +# generation scratch tree (tools/generate.sh) +.sdkgen-scratch/ +.openapi-spec.yaml + +# build and tooling artifacts +.venv/ +.pytest_cache/ +.coverage diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0844651..d93f826 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,147 +1,4 @@ -.github/workflows/python.yml -.gitlab-ci.yml -README.md -docs/AccountApi.md -docs/ApiAccessToken.md -docs/AppScopes.md -docs/Assignment.md -docs/AssignmentCopy.md -docs/AssignmentCopyResponse.md -docs/AssignmentCopyResponseCapabilities.md -docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md -docs/AssignmentSubmission.md -docs/AssignmentSubmissionComment.md -docs/AssignmentSubmissionCommentCreation.md -docs/AssignmentSubmissionComments.md -docs/AssignmentSubmissionHistory.md -docs/AssignmentSubmissionHistoryAttachment.md -docs/AssignmentSubmissionHistoryState.md -docs/AssignmentSubmissionLti.md -docs/AssignmentSubmissionPlaybackInner.md -docs/AssignmentSubmissionState.md -docs/AssignmentSubmissionUpdate.md -docs/AssignmentType.md -docs/AssignmentUpdate.md -docs/ClassApi.md -docs/ClassAssignment.md -docs/ClassAssignmentCanvas.md -docs/ClassAssignmentLti.md -docs/ClassAssignmentMfc.md -docs/ClassAssignmentUpdate.md -docs/ClassAssignmentUpdateGoogleClassroom.md -docs/ClassAssignmentUpdateMicrosoftGraph.md -docs/ClassAttachmentCreation.md -docs/ClassCreation.md -docs/ClassDetails.md -docs/ClassDetailsCanvas.md -docs/ClassDetailsClever.md -docs/ClassDetailsGoogleClassroom.md -docs/ClassDetailsGoogleDrive.md -docs/ClassDetailsIssues.md -docs/ClassDetailsIssuesSyncInner.md -docs/ClassDetailsLti.md -docs/ClassDetailsMfc.md -docs/ClassDetailsMicrosoftGraph.md -docs/ClassGradeLevel.md -docs/ClassRoles.md -docs/ClassState.md -docs/ClassUpdate.md -docs/Collection.md -docs/CollectionApi.md -docs/CollectionApp.md -docs/CollectionCapabilities.md -docs/CollectionCreation.md -docs/CollectionModification.md -docs/CollectionPrivacy.md -docs/CollectionType.md -docs/EduLibrary.md -docs/EduResource.md -docs/EduResourceCapabilities.md -docs/EduResourceCopy.md -docs/EduResourceCreation.md -docs/EduResourceLtiLink.md -docs/EduResourceMove.md -docs/EduResourcePrivacy.md -docs/EduResourceResource.md -docs/EduResourceType.md -docs/EduResourceUpdate.md -docs/EduResourceUseInClass.md -docs/EduResourcesApi.md -docs/FlatErrorResponse.md -docs/FlatLocales.md -docs/GoogleClassroomCoursework.md -docs/GoogleClassroomSubmission.md -docs/Group.md -docs/GroupApi.md -docs/GroupDetails.md -docs/GroupType.md -docs/LicenseMode.md -docs/LicenseSources.md -docs/LmsName.md -docs/LtiCredentials.md -docs/LtiCredentialsCreation.md -docs/MediaAttachment.md -docs/MediaScoreSharingMode.md -docs/MicrosoftGraphAssignment.md -docs/MicrosoftGraphSubmission.md -docs/OrganizationApi.md -docs/OrganizationInvitation.md -docs/OrganizationInvitationCreation.md -docs/OrganizationRoles.md -docs/OrganizationUserAccessTokenCreation.md -docs/ResourceCollaborator.md -docs/ResourceCollaboratorCreation.md -docs/ResourceRights.md -docs/ScoreApi.md -docs/ScoreComment.md -docs/ScoreCommentContext.md -docs/ScoreCommentCreation.md -docs/ScoreCommentModeration.md -docs/ScoreCommentUpdate.md -docs/ScoreCommentsCounts.md -docs/ScoreCreation.md -docs/ScoreCreationBuilderData.md -docs/ScoreCreationBuilderDataLayoutData.md -docs/ScoreCreationBuilderDataScoreData.md -docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md -docs/ScoreCreationType.md -docs/ScoreDetails.md -docs/ScoreFork.md -docs/ScoreLicense.md -docs/ScoreLikesCounts.md -docs/ScoreModification.md -docs/ScorePlaysCounts.md -docs/ScorePrivacy.md -docs/ScoreRevision.md -docs/ScoreRevisionCreation.md -docs/ScoreRevisionStatistics.md -docs/ScoreSource.md -docs/ScoreTrack.md -docs/ScoreTrackCreation.md -docs/ScoreTrackPoint.md -docs/ScoreTrackPurpose.md -docs/ScoreTrackState.md -docs/ScoreTrackType.md -docs/ScoreTrackUpdate.md -docs/ScoreViewsCounts.md -docs/Task.md -docs/TaskApi.md -docs/TaskExportOptions.md -docs/TaskProgress.md -docs/TaskResult.md -docs/TutteoProduct.md -docs/UserAdminUpdate.md -docs/UserApi.md -docs/UserAzureDetails.md -docs/UserCommunityProfileLinks.md -docs/UserCreation.md -docs/UserDetails.md -docs/UserDetailsAdmin.md -docs/UserDetailsAdminLicense.md -docs/UserPublic.md -docs/UserPublicSummary.md -docs/UserSigninLink.md -docs/UserSigninLinkCreation.md +.openapi-generator-ignore flat_api/__init__.py flat_api/api/__init__.py flat_api/api/account_api.py @@ -149,6 +6,7 @@ flat_api/api/class_api.py flat_api/api/collection_api.py flat_api/api/edu_resources_api.py flat_api/api/group_api.py +flat_api/api/omr_api.py flat_api/api/organization_api.py flat_api/api/score_api.py flat_api/api/task_api.py @@ -156,15 +14,227 @@ flat_api/api/user_api.py flat_api/api_client.py flat_api/api_response.py flat_api/configuration.py +flat_api/docs/AccountApi.md +flat_api/docs/AddGroupUser200Response.md +flat_api/docs/AddGroupUserRequest.md +flat_api/docs/ApiAccessToken.md +flat_api/docs/AppScopes.md +flat_api/docs/Assignment.md +flat_api/docs/AssignmentCapabilities.md +flat_api/docs/AssignmentCapabilitiesCanPublishInClassError.md +flat_api/docs/AssignmentCopy.md +flat_api/docs/AssignmentCopyResponse.md +flat_api/docs/AssignmentCopyToClass.md +flat_api/docs/AssignmentCopyToResourceLibrary.md +flat_api/docs/AssignmentGroup.md +flat_api/docs/AssignmentSubmission.md +flat_api/docs/AssignmentSubmissionComment.md +flat_api/docs/AssignmentSubmissionCommentCreation.md +flat_api/docs/AssignmentSubmissionComments.md +flat_api/docs/AssignmentSubmissionHistory.md +flat_api/docs/AssignmentSubmissionHistoryAttachment.md +flat_api/docs/AssignmentSubmissionHistoryState.md +flat_api/docs/AssignmentSubmissionLti.md +flat_api/docs/AssignmentSubmissionPlayback.md +flat_api/docs/AssignmentSubmissionState.md +flat_api/docs/AssignmentSubmissionStudentsMode.md +flat_api/docs/AssignmentSubmissionUpdate.md +flat_api/docs/AssignmentType.md +flat_api/docs/AssignmentUpdate.md +flat_api/docs/ClassApi.md +flat_api/docs/ClassAssignment.md +flat_api/docs/ClassAssignmentAllOfCanvas.md +flat_api/docs/ClassAssignmentAllOfLti.md +flat_api/docs/ClassAssignmentAllOfMfc.md +flat_api/docs/ClassAssignmentUpdate.md +flat_api/docs/ClassAssignmentUpdateAllOfGoogleClassroom.md +flat_api/docs/ClassAssignmentUpdateAllOfMicrosoftGraph.md +flat_api/docs/ClassAttachmentCreation.md +flat_api/docs/ClassCreation.md +flat_api/docs/ClassDetails.md +flat_api/docs/ClassDetailsCanvas.md +flat_api/docs/ClassDetailsClever.md +flat_api/docs/ClassDetailsGoogleClassroom.md +flat_api/docs/ClassDetailsGoogleDrive.md +flat_api/docs/ClassDetailsIssues.md +flat_api/docs/ClassDetailsIssuesSyncInner.md +flat_api/docs/ClassDetailsLti.md +flat_api/docs/ClassDetailsMfc.md +flat_api/docs/ClassDetailsMicrosoftGraph.md +flat_api/docs/ClassGradeLevel.md +flat_api/docs/ClassRoles.md +flat_api/docs/ClassState.md +flat_api/docs/ClassUpdate.md +flat_api/docs/Collection.md +flat_api/docs/CollectionApi.md +flat_api/docs/CollectionApp.md +flat_api/docs/CollectionCapabilities.md +flat_api/docs/CollectionContents.md +flat_api/docs/CollectionCreation.md +flat_api/docs/CollectionModification.md +flat_api/docs/CollectionPrivacy.md +flat_api/docs/CollectionType.md +flat_api/docs/CreateLtiConfiguration200Response.md +flat_api/docs/CreditTransaction.md +flat_api/docs/EduLibrary.md +flat_api/docs/EduResource.md +flat_api/docs/EduResourceAssignmentCreation.md +flat_api/docs/EduResourceCapabilities.md +flat_api/docs/EduResourceCopy.md +flat_api/docs/EduResourceCreation.md +flat_api/docs/EduResourceFolder.md +flat_api/docs/EduResourceLtiLink.md +flat_api/docs/EduResourceMove.md +flat_api/docs/EduResourcePrivacy.md +flat_api/docs/EduResourceResource.md +flat_api/docs/EduResourceType.md +flat_api/docs/EduResourceUpdate.md +flat_api/docs/EduResourceUseInClass.md +flat_api/docs/EduResourcesApi.md +flat_api/docs/FlatErrorResponse.md +flat_api/docs/GoogleClassroomCoursework.md +flat_api/docs/GoogleClassroomSubmission.md +flat_api/docs/Grade.md +flat_api/docs/Group.md +flat_api/docs/GroupApi.md +flat_api/docs/GroupCreation.md +flat_api/docs/GroupDetails.md +flat_api/docs/GroupType.md +flat_api/docs/LicenseMode.md +flat_api/docs/LicenseSources.md +flat_api/docs/LmsName.md +flat_api/docs/LtiConfiguration.md +flat_api/docs/LtiConfiguration1p1.md +flat_api/docs/LtiConfiguration1p1AllOfTool.md +flat_api/docs/LtiConfiguration1p3.md +flat_api/docs/LtiConfiguration1p3Base.md +flat_api/docs/LtiConfiguration1p3BaseSupportedServices.md +flat_api/docs/LtiConfiguration1p3BaseSupportedServicesAgs.md +flat_api/docs/LtiConfiguration1p3BaseSupportedServicesDeepLinking.md +flat_api/docs/LtiConfiguration1p3BaseSupportedServicesNrps.md +flat_api/docs/LtiConfiguration1p3BaseTool.md +flat_api/docs/LtiConfiguration1p3Deployment.md +flat_api/docs/LtiConfiguration1p3Dynamic.md +flat_api/docs/LtiConfiguration1p3Manual.md +flat_api/docs/LtiConfigurationBase.md +flat_api/docs/LtiConfigurationCreate.md +flat_api/docs/LtiConfigurationCreate1p1.md +flat_api/docs/LtiConfigurationCreate1p3Deployment.md +flat_api/docs/LtiConfigurationCreate1p3Dynamic.md +flat_api/docs/LtiConfigurationCreate1p3DynamicPlatformInfo.md +flat_api/docs/LtiConfigurationCreate1p3Manual.md +flat_api/docs/LtiConfigurationUpdate.md +flat_api/docs/LtiConfigurationUpdateDeployment.md +flat_api/docs/LtiConfigurationUpdateStandalone.md +flat_api/docs/LtiCredentials.md +flat_api/docs/LtiCredentialsCreation.md +flat_api/docs/MediaAttachment.md +flat_api/docs/MediaScoreSharingMode.md +flat_api/docs/MicrosoftGraphAssignment.md +flat_api/docs/MicrosoftGraphSubmission.md +flat_api/docs/OMRApi.md +flat_api/docs/OmrCapabilities.md +flat_api/docs/OmrDetailsStepData.md +flat_api/docs/OmrDetailsSubmission.md +flat_api/docs/OmrDetectedInstrument.md +flat_api/docs/OmrImportedMetadata.md +flat_api/docs/OmrInstrumentOverride.md +flat_api/docs/OmrJob.md +flat_api/docs/OmrJobCreation.md +flat_api/docs/OmrJobFileMetadata.md +flat_api/docs/OmrJobFileUpload.md +flat_api/docs/OmrJobFileUploadResult.md +flat_api/docs/OmrJobInputFile.md +flat_api/docs/OmrJobOutput.md +flat_api/docs/OmrJobProgress.md +flat_api/docs/OmrJobResult.md +flat_api/docs/OmrJobRetention.md +flat_api/docs/OmrJobStatus.md +flat_api/docs/OmrLocaleDetails.md +flat_api/docs/OmrPendingStep.md +flat_api/docs/OmrStepName.md +flat_api/docs/OrganizationApi.md +flat_api/docs/OrganizationInvitation.md +flat_api/docs/OrganizationInvitationCreation.md +flat_api/docs/OrganizationRoles.md +flat_api/docs/OrganizationUserAccessTokenCreation.md +flat_api/docs/RenameGroupRequest.md +flat_api/docs/ResourceCollaborator.md +flat_api/docs/ResourceCollaboratorCreation.md +flat_api/docs/ResourceRights.md +flat_api/docs/ScoreApi.md +flat_api/docs/ScoreComment.md +flat_api/docs/ScoreCommentContext.md +flat_api/docs/ScoreCommentCreation.md +flat_api/docs/ScoreCommentModeration.md +flat_api/docs/ScoreCommentUpdate.md +flat_api/docs/ScoreCommentsCounts.md +flat_api/docs/ScoreCreation.md +flat_api/docs/ScoreCreationBuilderData.md +flat_api/docs/ScoreCreationBuilderDataAllOfBuilderData.md +flat_api/docs/ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md +flat_api/docs/ScoreCreationBuilderDataAllOfBuilderDataScoreData.md +flat_api/docs/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md +flat_api/docs/ScoreCreationCommon.md +flat_api/docs/ScoreCreationFileImport.md +flat_api/docs/ScoreCreationGoogleDriveImport.md +flat_api/docs/ScoreCreationType.md +flat_api/docs/ScoreDetails.md +flat_api/docs/ScoreDetailsAllOfMe.md +flat_api/docs/ScoreFork.md +flat_api/docs/ScoreLicense.md +flat_api/docs/ScoreLikesCounts.md +flat_api/docs/ScoreModification.md +flat_api/docs/ScorePlaysCounts.md +flat_api/docs/ScorePrivacy.md +flat_api/docs/ScoreRevision.md +flat_api/docs/ScoreRevisionCreation.md +flat_api/docs/ScoreRevisionStatistics.md +flat_api/docs/ScoreSource.md +flat_api/docs/ScoreSummary.md +flat_api/docs/ScoreTrack.md +flat_api/docs/ScoreTrackCreation.md +flat_api/docs/ScoreTrackCreationResponse.md +flat_api/docs/ScoreTrackPoint.md +flat_api/docs/ScoreTrackPurpose.md +flat_api/docs/ScoreTrackState.md +flat_api/docs/ScoreTrackType.md +flat_api/docs/ScoreTrackUpdate.md +flat_api/docs/ScoreViewsCounts.md +flat_api/docs/Task.md +flat_api/docs/TaskApi.md +flat_api/docs/TaskExportOptions.md +flat_api/docs/TaskProgress.md +flat_api/docs/TaskResult.md +flat_api/docs/TeachingTheme.md +flat_api/docs/TutteoProduct.md +flat_api/docs/UserAdminUpdate.md +flat_api/docs/UserApi.md +flat_api/docs/UserAzureDetails.md +flat_api/docs/UserBasics.md +flat_api/docs/UserCommunityProfileLinks.md +flat_api/docs/UserCreation.md +flat_api/docs/UserDetails.md +flat_api/docs/UserDetailsAdmin.md +flat_api/docs/UserDetailsAdminAllOfLicense.md +flat_api/docs/UserPublic.md +flat_api/docs/UserPublicSummary.md +flat_api/docs/UserSigninLink.md +flat_api/docs/UserSigninLinkCreation.md flat_api/exceptions.py flat_api/models/__init__.py +flat_api/models/add_group_user200_response.py +flat_api/models/add_group_user_request.py flat_api/models/api_access_token.py flat_api/models/app_scopes.py flat_api/models/assignment.py +flat_api/models/assignment_capabilities.py +flat_api/models/assignment_capabilities_can_publish_in_class_error.py flat_api/models/assignment_copy.py flat_api/models/assignment_copy_response.py -flat_api/models/assignment_copy_response_capabilities.py -flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py +flat_api/models/assignment_copy_to_class.py +flat_api/models/assignment_copy_to_resource_library.py +flat_api/models/assignment_group.py flat_api/models/assignment_submission.py flat_api/models/assignment_submission_comment.py flat_api/models/assignment_submission_comment_creation.py @@ -173,18 +243,19 @@ flat_api/models/assignment_submission_history.py flat_api/models/assignment_submission_history_attachment.py flat_api/models/assignment_submission_history_state.py flat_api/models/assignment_submission_lti.py -flat_api/models/assignment_submission_playback_inner.py +flat_api/models/assignment_submission_playback.py flat_api/models/assignment_submission_state.py +flat_api/models/assignment_submission_students_mode.py flat_api/models/assignment_submission_update.py flat_api/models/assignment_type.py flat_api/models/assignment_update.py flat_api/models/class_assignment.py -flat_api/models/class_assignment_canvas.py -flat_api/models/class_assignment_lti.py -flat_api/models/class_assignment_mfc.py +flat_api/models/class_assignment_all_of_canvas.py +flat_api/models/class_assignment_all_of_lti.py +flat_api/models/class_assignment_all_of_mfc.py flat_api/models/class_assignment_update.py -flat_api/models/class_assignment_update_google_classroom.py -flat_api/models/class_assignment_update_microsoft_graph.py +flat_api/models/class_assignment_update_all_of_google_classroom.py +flat_api/models/class_assignment_update_all_of_microsoft_graph.py flat_api/models/class_attachment_creation.py flat_api/models/class_creation.py flat_api/models/class_details.py @@ -204,15 +275,20 @@ flat_api/models/class_update.py flat_api/models/collection.py flat_api/models/collection_app.py flat_api/models/collection_capabilities.py +flat_api/models/collection_contents.py flat_api/models/collection_creation.py flat_api/models/collection_modification.py flat_api/models/collection_privacy.py flat_api/models/collection_type.py +flat_api/models/create_lti_configuration200_response.py +flat_api/models/credit_transaction.py flat_api/models/edu_library.py flat_api/models/edu_resource.py +flat_api/models/edu_resource_assignment_creation.py flat_api/models/edu_resource_capabilities.py flat_api/models/edu_resource_copy.py flat_api/models/edu_resource_creation.py +flat_api/models/edu_resource_folder.py flat_api/models/edu_resource_lti_link.py flat_api/models/edu_resource_move.py flat_api/models/edu_resource_privacy.py @@ -221,25 +297,70 @@ flat_api/models/edu_resource_type.py flat_api/models/edu_resource_update.py flat_api/models/edu_resource_use_in_class.py flat_api/models/flat_error_response.py -flat_api/models/flat_locales.py flat_api/models/google_classroom_coursework.py flat_api/models/google_classroom_submission.py +flat_api/models/grade.py flat_api/models/group.py +flat_api/models/group_creation.py flat_api/models/group_details.py flat_api/models/group_type.py flat_api/models/license_mode.py flat_api/models/license_sources.py flat_api/models/lms_name.py +flat_api/models/lti_configuration.py +flat_api/models/lti_configuration1p1.py +flat_api/models/lti_configuration1p1_all_of_tool.py +flat_api/models/lti_configuration1p3.py +flat_api/models/lti_configuration1p3_base.py +flat_api/models/lti_configuration1p3_base_supported_services.py +flat_api/models/lti_configuration1p3_base_supported_services_ags.py +flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py +flat_api/models/lti_configuration1p3_base_supported_services_nrps.py +flat_api/models/lti_configuration1p3_base_tool.py +flat_api/models/lti_configuration1p3_deployment.py +flat_api/models/lti_configuration1p3_dynamic.py +flat_api/models/lti_configuration1p3_manual.py +flat_api/models/lti_configuration_base.py +flat_api/models/lti_configuration_create.py +flat_api/models/lti_configuration_create1p1.py +flat_api/models/lti_configuration_create1p3_deployment.py +flat_api/models/lti_configuration_create1p3_dynamic.py +flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py +flat_api/models/lti_configuration_create1p3_manual.py +flat_api/models/lti_configuration_update.py +flat_api/models/lti_configuration_update_deployment.py +flat_api/models/lti_configuration_update_standalone.py flat_api/models/lti_credentials.py flat_api/models/lti_credentials_creation.py flat_api/models/media_attachment.py flat_api/models/media_score_sharing_mode.py flat_api/models/microsoft_graph_assignment.py flat_api/models/microsoft_graph_submission.py +flat_api/models/omr_capabilities.py +flat_api/models/omr_details_step_data.py +flat_api/models/omr_details_submission.py +flat_api/models/omr_detected_instrument.py +flat_api/models/omr_imported_metadata.py +flat_api/models/omr_instrument_override.py +flat_api/models/omr_job.py +flat_api/models/omr_job_creation.py +flat_api/models/omr_job_file_metadata.py +flat_api/models/omr_job_file_upload.py +flat_api/models/omr_job_file_upload_result.py +flat_api/models/omr_job_input_file.py +flat_api/models/omr_job_output.py +flat_api/models/omr_job_progress.py +flat_api/models/omr_job_result.py +flat_api/models/omr_job_retention.py +flat_api/models/omr_job_status.py +flat_api/models/omr_locale_details.py +flat_api/models/omr_pending_step.py +flat_api/models/omr_step_name.py flat_api/models/organization_invitation.py flat_api/models/organization_invitation_creation.py flat_api/models/organization_roles.py flat_api/models/organization_user_access_token_creation.py +flat_api/models/rename_group_request.py flat_api/models/resource_collaborator.py flat_api/models/resource_collaborator_creation.py flat_api/models/resource_rights.py @@ -251,11 +372,16 @@ flat_api/models/score_comment_update.py flat_api/models/score_comments_counts.py flat_api/models/score_creation.py flat_api/models/score_creation_builder_data.py -flat_api/models/score_creation_builder_data_layout_data.py -flat_api/models/score_creation_builder_data_score_data.py -flat_api/models/score_creation_builder_data_score_data_instruments_inner.py +flat_api/models/score_creation_builder_data_all_of_builder_data.py +flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py +flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py +flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py +flat_api/models/score_creation_common.py +flat_api/models/score_creation_file_import.py +flat_api/models/score_creation_google_drive_import.py flat_api/models/score_creation_type.py flat_api/models/score_details.py +flat_api/models/score_details_all_of_me.py flat_api/models/score_fork.py flat_api/models/score_license.py flat_api/models/score_likes_counts.py @@ -266,8 +392,10 @@ flat_api/models/score_revision.py flat_api/models/score_revision_creation.py flat_api/models/score_revision_statistics.py flat_api/models/score_source.py +flat_api/models/score_summary.py flat_api/models/score_track.py flat_api/models/score_track_creation.py +flat_api/models/score_track_creation_response.py flat_api/models/score_track_point.py flat_api/models/score_track_purpose.py flat_api/models/score_track_state.py @@ -278,164 +406,227 @@ flat_api/models/task.py flat_api/models/task_export_options.py flat_api/models/task_progress.py flat_api/models/task_result.py +flat_api/models/teaching_theme.py flat_api/models/tutteo_product.py flat_api/models/user_admin_update.py flat_api/models/user_azure_details.py +flat_api/models/user_basics.py flat_api/models/user_community_profile_links.py flat_api/models/user_creation.py flat_api/models/user_details.py flat_api/models/user_details_admin.py -flat_api/models/user_details_admin_license.py +flat_api/models/user_details_admin_all_of_license.py flat_api/models/user_public.py flat_api/models/user_public_summary.py flat_api/models/user_signin_link.py flat_api/models/user_signin_link_creation.py -flat_api/py.typed flat_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -test-requirements.txt -test/__init__.py -test/test_account_api.py -test/test_api_access_token.py -test/test_app_scopes.py -test/test_assignment.py -test/test_assignment_copy.py -test/test_assignment_copy_response.py -test/test_assignment_copy_response_capabilities.py -test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py -test/test_assignment_submission.py -test/test_assignment_submission_comment.py -test/test_assignment_submission_comment_creation.py -test/test_assignment_submission_comments.py -test/test_assignment_submission_history.py -test/test_assignment_submission_history_attachment.py -test/test_assignment_submission_history_state.py -test/test_assignment_submission_lti.py -test/test_assignment_submission_playback_inner.py -test/test_assignment_submission_state.py -test/test_assignment_submission_update.py -test/test_assignment_type.py -test/test_assignment_update.py -test/test_class_api.py -test/test_class_assignment.py -test/test_class_assignment_canvas.py -test/test_class_assignment_lti.py -test/test_class_assignment_mfc.py -test/test_class_assignment_update.py -test/test_class_assignment_update_google_classroom.py -test/test_class_assignment_update_microsoft_graph.py -test/test_class_attachment_creation.py -test/test_class_creation.py -test/test_class_details.py -test/test_class_details_canvas.py -test/test_class_details_clever.py -test/test_class_details_google_classroom.py -test/test_class_details_google_drive.py -test/test_class_details_issues.py -test/test_class_details_issues_sync_inner.py -test/test_class_details_lti.py -test/test_class_details_mfc.py -test/test_class_details_microsoft_graph.py -test/test_class_grade_level.py -test/test_class_roles.py -test/test_class_state.py -test/test_class_update.py -test/test_collection.py -test/test_collection_api.py -test/test_collection_app.py -test/test_collection_capabilities.py -test/test_collection_creation.py -test/test_collection_modification.py -test/test_collection_privacy.py -test/test_collection_type.py -test/test_edu_library.py -test/test_edu_resource.py -test/test_edu_resource_capabilities.py -test/test_edu_resource_copy.py -test/test_edu_resource_creation.py -test/test_edu_resource_lti_link.py -test/test_edu_resource_move.py -test/test_edu_resource_privacy.py -test/test_edu_resource_resource.py -test/test_edu_resource_type.py -test/test_edu_resource_update.py -test/test_edu_resource_use_in_class.py -test/test_edu_resources_api.py -test/test_flat_error_response.py -test/test_flat_locales.py -test/test_google_classroom_coursework.py -test/test_google_classroom_submission.py -test/test_group.py -test/test_group_api.py -test/test_group_details.py -test/test_group_type.py -test/test_license_mode.py -test/test_license_sources.py -test/test_lms_name.py -test/test_lti_credentials.py -test/test_lti_credentials_creation.py -test/test_media_attachment.py -test/test_media_score_sharing_mode.py -test/test_microsoft_graph_assignment.py -test/test_microsoft_graph_submission.py -test/test_organization_api.py -test/test_organization_invitation.py -test/test_organization_invitation_creation.py -test/test_organization_roles.py -test/test_organization_user_access_token_creation.py -test/test_resource_collaborator.py -test/test_resource_collaborator_creation.py -test/test_resource_rights.py -test/test_score_api.py -test/test_score_comment.py -test/test_score_comment_context.py -test/test_score_comment_creation.py -test/test_score_comment_moderation.py -test/test_score_comment_update.py -test/test_score_comments_counts.py -test/test_score_creation.py -test/test_score_creation_builder_data.py -test/test_score_creation_builder_data_layout_data.py -test/test_score_creation_builder_data_score_data.py -test/test_score_creation_builder_data_score_data_instruments_inner.py -test/test_score_creation_type.py -test/test_score_details.py -test/test_score_fork.py -test/test_score_license.py -test/test_score_likes_counts.py -test/test_score_modification.py -test/test_score_plays_counts.py -test/test_score_privacy.py -test/test_score_revision.py -test/test_score_revision_creation.py -test/test_score_revision_statistics.py -test/test_score_source.py -test/test_score_track.py -test/test_score_track_creation.py -test/test_score_track_point.py -test/test_score_track_purpose.py -test/test_score_track_state.py -test/test_score_track_type.py -test/test_score_track_update.py -test/test_score_views_counts.py -test/test_task.py -test/test_task_api.py -test/test_task_export_options.py -test/test_task_progress.py -test/test_task_result.py -test/test_tutteo_product.py -test/test_user_admin_update.py -test/test_user_api.py -test/test_user_azure_details.py -test/test_user_community_profile_links.py -test/test_user_creation.py -test/test_user_details.py -test/test_user_details_admin.py -test/test_user_details_admin_license.py -test/test_user_public.py -test/test_user_public_summary.py -test/test_user_signin_link.py -test/test_user_signin_link_creation.py -tox.ini +flat_api/test/__init__.py +flat_api/test/test_account_api.py +flat_api/test/test_add_group_user200_response.py +flat_api/test/test_add_group_user_request.py +flat_api/test/test_api_access_token.py +flat_api/test/test_app_scopes.py +flat_api/test/test_assignment.py +flat_api/test/test_assignment_capabilities.py +flat_api/test/test_assignment_capabilities_can_publish_in_class_error.py +flat_api/test/test_assignment_copy.py +flat_api/test/test_assignment_copy_response.py +flat_api/test/test_assignment_copy_to_class.py +flat_api/test/test_assignment_copy_to_resource_library.py +flat_api/test/test_assignment_group.py +flat_api/test/test_assignment_submission.py +flat_api/test/test_assignment_submission_comment.py +flat_api/test/test_assignment_submission_comment_creation.py +flat_api/test/test_assignment_submission_comments.py +flat_api/test/test_assignment_submission_history.py +flat_api/test/test_assignment_submission_history_attachment.py +flat_api/test/test_assignment_submission_history_state.py +flat_api/test/test_assignment_submission_lti.py +flat_api/test/test_assignment_submission_playback.py +flat_api/test/test_assignment_submission_state.py +flat_api/test/test_assignment_submission_students_mode.py +flat_api/test/test_assignment_submission_update.py +flat_api/test/test_assignment_type.py +flat_api/test/test_assignment_update.py +flat_api/test/test_class_api.py +flat_api/test/test_class_assignment.py +flat_api/test/test_class_assignment_all_of_canvas.py +flat_api/test/test_class_assignment_all_of_lti.py +flat_api/test/test_class_assignment_all_of_mfc.py +flat_api/test/test_class_assignment_update.py +flat_api/test/test_class_assignment_update_all_of_google_classroom.py +flat_api/test/test_class_assignment_update_all_of_microsoft_graph.py +flat_api/test/test_class_attachment_creation.py +flat_api/test/test_class_creation.py +flat_api/test/test_class_details.py +flat_api/test/test_class_details_canvas.py +flat_api/test/test_class_details_clever.py +flat_api/test/test_class_details_google_classroom.py +flat_api/test/test_class_details_google_drive.py +flat_api/test/test_class_details_issues.py +flat_api/test/test_class_details_issues_sync_inner.py +flat_api/test/test_class_details_lti.py +flat_api/test/test_class_details_mfc.py +flat_api/test/test_class_details_microsoft_graph.py +flat_api/test/test_class_grade_level.py +flat_api/test/test_class_roles.py +flat_api/test/test_class_state.py +flat_api/test/test_class_update.py +flat_api/test/test_collection.py +flat_api/test/test_collection_api.py +flat_api/test/test_collection_app.py +flat_api/test/test_collection_capabilities.py +flat_api/test/test_collection_contents.py +flat_api/test/test_collection_creation.py +flat_api/test/test_collection_modification.py +flat_api/test/test_collection_privacy.py +flat_api/test/test_collection_type.py +flat_api/test/test_create_lti_configuration200_response.py +flat_api/test/test_credit_transaction.py +flat_api/test/test_edu_library.py +flat_api/test/test_edu_resource.py +flat_api/test/test_edu_resource_assignment_creation.py +flat_api/test/test_edu_resource_capabilities.py +flat_api/test/test_edu_resource_copy.py +flat_api/test/test_edu_resource_creation.py +flat_api/test/test_edu_resource_folder.py +flat_api/test/test_edu_resource_lti_link.py +flat_api/test/test_edu_resource_move.py +flat_api/test/test_edu_resource_privacy.py +flat_api/test/test_edu_resource_resource.py +flat_api/test/test_edu_resource_type.py +flat_api/test/test_edu_resource_update.py +flat_api/test/test_edu_resource_use_in_class.py +flat_api/test/test_edu_resources_api.py +flat_api/test/test_flat_error_response.py +flat_api/test/test_google_classroom_coursework.py +flat_api/test/test_google_classroom_submission.py +flat_api/test/test_grade.py +flat_api/test/test_group.py +flat_api/test/test_group_api.py +flat_api/test/test_group_creation.py +flat_api/test/test_group_details.py +flat_api/test/test_group_type.py +flat_api/test/test_license_mode.py +flat_api/test/test_license_sources.py +flat_api/test/test_lms_name.py +flat_api/test/test_lti_configuration.py +flat_api/test/test_lti_configuration1p1.py +flat_api/test/test_lti_configuration1p1_all_of_tool.py +flat_api/test/test_lti_configuration1p3.py +flat_api/test/test_lti_configuration1p3_base.py +flat_api/test/test_lti_configuration1p3_base_supported_services.py +flat_api/test/test_lti_configuration1p3_base_supported_services_ags.py +flat_api/test/test_lti_configuration1p3_base_supported_services_deep_linking.py +flat_api/test/test_lti_configuration1p3_base_supported_services_nrps.py +flat_api/test/test_lti_configuration1p3_base_tool.py +flat_api/test/test_lti_configuration1p3_deployment.py +flat_api/test/test_lti_configuration1p3_dynamic.py +flat_api/test/test_lti_configuration1p3_manual.py +flat_api/test/test_lti_configuration_base.py +flat_api/test/test_lti_configuration_create.py +flat_api/test/test_lti_configuration_create1p1.py +flat_api/test/test_lti_configuration_create1p3_deployment.py +flat_api/test/test_lti_configuration_create1p3_dynamic.py +flat_api/test/test_lti_configuration_create1p3_dynamic_platform_info.py +flat_api/test/test_lti_configuration_create1p3_manual.py +flat_api/test/test_lti_configuration_update.py +flat_api/test/test_lti_configuration_update_deployment.py +flat_api/test/test_lti_configuration_update_standalone.py +flat_api/test/test_lti_credentials.py +flat_api/test/test_lti_credentials_creation.py +flat_api/test/test_media_attachment.py +flat_api/test/test_media_score_sharing_mode.py +flat_api/test/test_microsoft_graph_assignment.py +flat_api/test/test_microsoft_graph_submission.py +flat_api/test/test_omr_api.py +flat_api/test/test_omr_capabilities.py +flat_api/test/test_omr_details_step_data.py +flat_api/test/test_omr_details_submission.py +flat_api/test/test_omr_detected_instrument.py +flat_api/test/test_omr_imported_metadata.py +flat_api/test/test_omr_instrument_override.py +flat_api/test/test_omr_job.py +flat_api/test/test_omr_job_creation.py +flat_api/test/test_omr_job_file_metadata.py +flat_api/test/test_omr_job_file_upload.py +flat_api/test/test_omr_job_file_upload_result.py +flat_api/test/test_omr_job_input_file.py +flat_api/test/test_omr_job_output.py +flat_api/test/test_omr_job_progress.py +flat_api/test/test_omr_job_result.py +flat_api/test/test_omr_job_retention.py +flat_api/test/test_omr_job_status.py +flat_api/test/test_omr_locale_details.py +flat_api/test/test_omr_pending_step.py +flat_api/test/test_omr_step_name.py +flat_api/test/test_organization_api.py +flat_api/test/test_organization_invitation.py +flat_api/test/test_organization_invitation_creation.py +flat_api/test/test_organization_roles.py +flat_api/test/test_organization_user_access_token_creation.py +flat_api/test/test_rename_group_request.py +flat_api/test/test_resource_collaborator.py +flat_api/test/test_resource_collaborator_creation.py +flat_api/test/test_resource_rights.py +flat_api/test/test_score_api.py +flat_api/test/test_score_comment.py +flat_api/test/test_score_comment_context.py +flat_api/test/test_score_comment_creation.py +flat_api/test/test_score_comment_moderation.py +flat_api/test/test_score_comment_update.py +flat_api/test/test_score_comments_counts.py +flat_api/test/test_score_creation.py +flat_api/test/test_score_creation_builder_data.py +flat_api/test/test_score_creation_builder_data_all_of_builder_data.py +flat_api/test/test_score_creation_builder_data_all_of_builder_data_layout_data.py +flat_api/test/test_score_creation_builder_data_all_of_builder_data_score_data.py +flat_api/test/test_score_creation_builder_data_all_of_builder_data_score_data_instruments.py +flat_api/test/test_score_creation_common.py +flat_api/test/test_score_creation_file_import.py +flat_api/test/test_score_creation_google_drive_import.py +flat_api/test/test_score_creation_type.py +flat_api/test/test_score_details.py +flat_api/test/test_score_details_all_of_me.py +flat_api/test/test_score_fork.py +flat_api/test/test_score_license.py +flat_api/test/test_score_likes_counts.py +flat_api/test/test_score_modification.py +flat_api/test/test_score_plays_counts.py +flat_api/test/test_score_privacy.py +flat_api/test/test_score_revision.py +flat_api/test/test_score_revision_creation.py +flat_api/test/test_score_revision_statistics.py +flat_api/test/test_score_source.py +flat_api/test/test_score_summary.py +flat_api/test/test_score_track.py +flat_api/test/test_score_track_creation.py +flat_api/test/test_score_track_creation_response.py +flat_api/test/test_score_track_point.py +flat_api/test/test_score_track_purpose.py +flat_api/test/test_score_track_state.py +flat_api/test/test_score_track_type.py +flat_api/test/test_score_track_update.py +flat_api/test/test_score_views_counts.py +flat_api/test/test_task.py +flat_api/test/test_task_api.py +flat_api/test/test_task_export_options.py +flat_api/test/test_task_progress.py +flat_api/test/test_task_result.py +flat_api/test/test_teaching_theme.py +flat_api/test/test_tutteo_product.py +flat_api/test/test_user_admin_update.py +flat_api/test/test_user_api.py +flat_api/test/test_user_azure_details.py +flat_api/test/test_user_basics.py +flat_api/test/test_user_community_profile_links.py +flat_api/test/test_user_creation.py +flat_api/test/test_user_details.py +flat_api/test/test_user_details_admin.py +flat_api/test/test_user_details_admin_all_of_license.py +flat_api/test/test_user_public.py +flat_api/test/test_user_public_summary.py +flat_api/test/test_user_signin_link.py +flat_api/test/test_user_signin_link_creation.py +flat_api_README.md diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 8b23b8d..0783219 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.3.0 \ No newline at end of file +7.24.0 diff --git a/.sdkgen.yaml b/.sdkgen.yaml new file mode 100644 index 0000000..577e278 --- /dev/null +++ b/.sdkgen.yaml @@ -0,0 +1,36 @@ +schema_version: 1 + +language: python +package_name: flat-api +registry: pypi + +generator: + name: python + version: 7.24.0 + config: tools/openapi-config.json + # The generator emits sync OR async, never both (T001 spike). The async pass is merged into the + # same package by tools/patches/ so the SDK exposes FlatClient and AsyncFlatClient. + extra_passes: + - name: python + config: tools/openapi-config-async.json + +generated_paths: + - flat_api/** + - docs/reference/** + - .openapi-generator/** + - OPERATIONS.json + +version_file: + path: flat_api/__init__.py + pattern: '__version__ = "(?P[0-9]+\.[0-9]+\.[0-9]+)"' + +runtime_matrix: + - version: '3.11' + upstream_eol: 2027-10-31 + - version: '3.12' + upstream_eol: 2028-10-31 + - version: '3.13' + upstream_eol: 2029-10-31 + +smoke: + entrypoint: tools/smoke.py diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..6f79d0b --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,45 @@ +# Migrating to 2.0.0 + +Version 2.0.0 is a full regeneration of this client against the current Flat API. The previous +release line (1.1.x) was generated in 2024 or earlier and is missing everything the API has +shipped since. + +The previous major stays installable and is deprecated on PyPI, not withdrawn. Nothing breaks +until you choose to upgrade. + +## Why upgrade + +- **Complete API coverage.** All 119 public operations, verified automatically on every release. + The old client predates a great deal of the API, including OMR. +- **It stays current.** Releases are now automatic, tied to specification releases. +- **Typed errors, retries, pagination and OAuth refresh**, none of which the old client had. +- **Modern runtimes and full type information.** + +## What breaks + +1. **Package layout changed.** Import from the package root rather than reaching into internals. +2. **Errors are typed.** Code that inspected status codes or parsed message strings should branch on + the error class instead. Note that rate limiting is HTTP 403, not 429. +3. **Supported runtimes moved up** to Python 3.11, 3.12 and 3.13. End-of-life runtimes are no longer supported. +4. **Manual pagination is unnecessary.** Hand-rolled cursor loops still work, but the built-in + iterator is correct in cases hand-rolled loops usually miss. +5. **Model names follow the specification.** A few renames follow schema names upstream. + +## How to upgrade + +1. Raise your runtime to a supported version. +2. Bump the dependency: `pip install flat-api`. +3. Replace status-code checks with typed error handling. +4. Replace manual paging loops with the built-in iterator. +5. Run your tests. Anything unresolved is likely a model rename; check + [the reference](docs/reference/). + +## Staying on 1.1.x + +It keeps working and stays installable. It will not receive new API capability, and it is not +regenerated when the API changes. If you need something added to the API after early 2024, you need +2.0.0. + +## Problems + +Open an issue on this repository, or email developers@flat.io. diff --git a/OPERATIONS.json b/OPERATIONS.json new file mode 100644 index 0000000..5e16041 --- /dev/null +++ b/OPERATIONS.json @@ -0,0 +1,1218 @@ +{ + "schema_version": 1, + "spec_version": "2.26.0", + "generator": { + "name": "python", + "version": "7.24.0" + }, + "operations": [ + { + "operation_id": "activateClass", + "method": "post", + "path": "/classes/{class}/activate", + "symbol": "class_api.activate_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "addClassUser", + "method": "put", + "path": "/classes/{class}/users/{user}", + "symbol": "class_api.add_class_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "addGroupUser", + "method": "post", + "path": "/groups/{group}/users", + "symbol": "group_api.add_group_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "addOmrJobFile", + "method": "post", + "path": "/omr/jobs/{job}/files", + "symbol": "omr_api.add_omr_job_file", + "paginated": false, + "documented": true + }, + { + "operation_id": "addScoreCollaborator", + "method": "post", + "path": "/scores/{score}/collaborators", + "symbol": "score_api.add_score_collaborator", + "paginated": false, + "documented": true + }, + { + "operation_id": "addScoreToCollection", + "method": "put", + "path": "/collections/{collection}/scores/{score}", + "symbol": "collection_api.add_score_to_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "addScoreTrack", + "method": "post", + "path": "/scores/{score}/tracks", + "symbol": "score_api.add_score_track", + "paginated": false, + "documented": true + }, + { + "operation_id": "archiveAssignment", + "method": "post", + "path": "/classes/{class}/assignments/{assignment}/archive", + "symbol": "class_api.archive_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "archiveClass", + "method": "post", + "path": "/classes/{class}/archive", + "symbol": "class_api.archive_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "cancelOmrJob", + "method": "post", + "path": "/omr/jobs/{job}/cancel", + "symbol": "omr_api.cancel_omr_job", + "paginated": false, + "documented": true + }, + { + "operation_id": "copyAssignment", + "method": "post", + "path": "/classes/{class}/assignments/{assignment}/copy", + "symbol": "class_api.copy_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "copyEduResource", + "method": "post", + "path": "/eduResources/{resource}/copy", + "symbol": "edu_resources_api.copy_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "copyEduResourceToDemoClass", + "method": "post", + "path": "/eduResources/{resource}/copyToDemoClass", + "symbol": "edu_resources_api.copy_edu_resource_to_demo_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "countOrgaUsers", + "method": "get", + "path": "/organizations/users/count", + "symbol": "organization_api.count_orga_users", + "paginated": false, + "documented": true + }, + { + "operation_id": "createClass", + "method": "post", + "path": "/classes", + "symbol": "class_api.create_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "createClassAssignment", + "method": "post", + "path": "/classes/{class}/assignments", + "symbol": "class_api.create_class_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "createCollection", + "method": "post", + "path": "/collections", + "symbol": "collection_api.create_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "createEduResource", + "method": "post", + "path": "/eduResources", + "symbol": "edu_resources_api.create_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "createEduResourceLtiLink", + "method": "post", + "path": "/eduResources/{resource}/createLtiLink", + "symbol": "edu_resources_api.create_edu_resource_lti_link", + "paginated": false, + "documented": true + }, + { + "operation_id": "createExportTask", + "method": "post", + "path": "/scores/{score}/revisions/{revision}/{format}/task", + "symbol": "score_api.create_export_task", + "paginated": false, + "documented": true + }, + { + "operation_id": "createGroup", + "method": "post", + "path": "/groups", + "symbol": "group_api.create_group", + "paginated": false, + "documented": true + }, + { + "operation_id": "createLtiConfiguration", + "method": "post", + "path": "/organizations/lti/configurations", + "symbol": "organization_api.create_lti_configuration", + "paginated": false, + "documented": true + }, + { + "operation_id": "createLtiCredentials", + "method": "post", + "path": "/organizations/lti/credentials", + "symbol": "organization_api.create_lti_credentials", + "paginated": false, + "documented": true + }, + { + "operation_id": "createOmrJob", + "method": "post", + "path": "/omr/jobs", + "symbol": "omr_api.create_omr_job", + "paginated": false, + "documented": true + }, + { + "operation_id": "createOrganizationInvitation", + "method": "post", + "path": "/organizations/invitations", + "symbol": "organization_api.create_organization_invitation", + "paginated": false, + "documented": true + }, + { + "operation_id": "createOrganizationUser", + "method": "post", + "path": "/organizations/users", + "symbol": "organization_api.create_organization_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "createOrganizationUserAccessToken", + "method": "post", + "path": "/organizations/users/{user}/accessToken", + "symbol": "organization_api.create_organization_user_access_token", + "paginated": false, + "documented": true + }, + { + "operation_id": "createOrganizationUserSigninLink", + "method": "post", + "path": "/organizations/users/{user}/signinLink", + "symbol": "organization_api.create_organization_user_signin_link", + "paginated": false, + "documented": true + }, + { + "operation_id": "createScore", + "method": "post", + "path": "/scores", + "symbol": "score_api.create_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "createScoreRevision", + "method": "post", + "path": "/scores/{score}/revisions", + "symbol": "score_api.create_score_revision", + "paginated": false, + "documented": true + }, + { + "operation_id": "createSubmission", + "method": "put", + "path": "/classes/{class}/assignments/{assignment}/submissions", + "symbol": "class_api.create_submission", + "paginated": false, + "documented": true + }, + { + "operation_id": "createTestStudentAccount", + "method": "post", + "path": "/classes/{class}/testStudent", + "symbol": "class_api.create_test_student_account", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteAssignment", + "method": "delete", + "path": "/classes/{class}/assignments/{assignment}", + "symbol": "class_api.delete_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteClassUser", + "method": "delete", + "path": "/classes/{class}/users/{user}", + "symbol": "class_api.delete_class_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteCollection", + "method": "delete", + "path": "/collections/{collection}", + "symbol": "collection_api.delete_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteEduResource", + "method": "delete", + "path": "/eduResources/{resource}", + "symbol": "edu_resources_api.delete_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteGroup", + "method": "delete", + "path": "/groups/{group}", + "symbol": "group_api.delete_group", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteLtiConfiguration", + "method": "delete", + "path": "/organizations/lti/configurations/{configuration}", + "symbol": "organization_api.delete_lti_configuration", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteOmrJob", + "method": "delete", + "path": "/omr/jobs/{job}", + "symbol": "omr_api.delete_omr_job", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteScore", + "method": "delete", + "path": "/scores/{score}", + "symbol": "score_api.delete_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteScoreComment", + "method": "delete", + "path": "/scores/{score}/comments/{comment}", + "symbol": "score_api.delete_score_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteScoreFromCollection", + "method": "delete", + "path": "/collections/{collection}/scores/{score}", + "symbol": "collection_api.delete_score_from_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteScoreTrack", + "method": "delete", + "path": "/scores/{score}/tracks/{track}", + "symbol": "score_api.delete_score_track", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteSubmission", + "method": "delete", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}", + "symbol": "class_api.delete_submission", + "paginated": false, + "documented": true + }, + { + "operation_id": "deleteSubmissionComment", + "method": "delete", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}", + "symbol": "class_api.delete_submission_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "editCollection", + "method": "put", + "path": "/collections/{collection}", + "symbol": "collection_api.edit_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "editScore", + "method": "put", + "path": "/scores/{score}", + "symbol": "score_api.edit_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "editSubmission", + "method": "put", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}", + "symbol": "class_api.edit_submission", + "paginated": false, + "documented": true + }, + { + "operation_id": "enrollClass", + "method": "post", + "path": "/classes/enroll/{enrollmentCode}", + "symbol": "class_api.enroll_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "exportSubmissionsReviewsAsCsv", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions/csv", + "symbol": "class_api.export_submissions_reviews_as_csv", + "paginated": false, + "documented": true + }, + { + "operation_id": "exportSubmissionsReviewsAsExcel", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions/excel", + "symbol": "class_api.export_submissions_reviews_as_excel", + "paginated": false, + "documented": true + }, + { + "operation_id": "forkScore", + "method": "post", + "path": "/scores/{score}/fork", + "symbol": "score_api.fork_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "getAssignment", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}", + "symbol": "class_api.get_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "getAuthenticatedUser", + "method": "get", + "path": "/me", + "symbol": "account_api.get_authenticated_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "getClass", + "method": "get", + "path": "/classes/{class}", + "symbol": "class_api.get_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "getCollection", + "method": "get", + "path": "/collections/{collection}", + "symbol": "collection_api.get_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "getEduResource", + "method": "get", + "path": "/eduResources/{resource}", + "symbol": "edu_resources_api.get_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "getGroupDetails", + "method": "get", + "path": "/groups/{group}", + "symbol": "group_api.get_group_details", + "paginated": false, + "documented": true + }, + { + "operation_id": "getGroupScores", + "method": "get", + "path": "/groups/{group}/scores", + "symbol": "score_api.get_group_scores", + "paginated": false, + "documented": true + }, + { + "operation_id": "getOmrCapabilities", + "method": "get", + "path": "/omr/capabilities", + "symbol": "omr_api.get_omr_capabilities", + "paginated": false, + "documented": true + }, + { + "operation_id": "getOmrJob", + "method": "get", + "path": "/omr/jobs/{job}", + "symbol": "omr_api.get_omr_job", + "paginated": false, + "documented": true + }, + { + "operation_id": "getOmrJobExport", + "method": "get", + "path": "/omr/jobs/{job}/exports/{format}", + "symbol": "omr_api.get_omr_job_export", + "paginated": false, + "documented": true + }, + { + "operation_id": "getOmrJobFile", + "method": "get", + "path": "/omr/jobs/{job}/files/{index}", + "symbol": "omr_api.get_omr_job_file", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScore", + "method": "get", + "path": "/scores/{score}", + "symbol": "score_api.get_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreCollaborator", + "method": "get", + "path": "/scores/{score}/collaborators/{collaborator}", + "symbol": "score_api.get_score_collaborator", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreCollaborators", + "method": "get", + "path": "/scores/{score}/collaborators", + "symbol": "score_api.get_score_collaborators", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreComments", + "method": "get", + "path": "/scores/{score}/comments", + "symbol": "score_api.get_score_comments", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreRevision", + "method": "get", + "path": "/scores/{score}/revisions/{revision}", + "symbol": "score_api.get_score_revision", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreRevisionData", + "method": "get", + "path": "/scores/{score}/revisions/{revision}/{format}", + "symbol": "score_api.get_score_revision_data", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreRevisions", + "method": "get", + "path": "/scores/{score}/revisions", + "symbol": "score_api.get_score_revisions", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreSubmissions", + "method": "get", + "path": "/scores/{score}/submissions", + "symbol": "score_api.get_score_submissions", + "paginated": false, + "documented": true + }, + { + "operation_id": "getScoreTrack", + "method": "get", + "path": "/scores/{score}/tracks/{track}", + "symbol": "score_api.get_score_track", + "paginated": false, + "documented": true + }, + { + "operation_id": "getSubmission", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}", + "symbol": "class_api.get_submission", + "paginated": false, + "documented": true + }, + { + "operation_id": "getSubmissionComments", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments", + "symbol": "class_api.get_submission_comments", + "paginated": false, + "documented": true + }, + { + "operation_id": "getSubmissionHistory", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}/history", + "symbol": "class_api.get_submission_history", + "paginated": false, + "documented": true + }, + { + "operation_id": "getSubmissions", + "method": "get", + "path": "/classes/{class}/assignments/{assignment}/submissions", + "symbol": "class_api.get_submissions", + "paginated": false, + "documented": true + }, + { + "operation_id": "getTask", + "method": "get", + "path": "/tasks/{task}", + "symbol": "task_api.get_task", + "paginated": false, + "documented": true + }, + { + "operation_id": "getUser", + "method": "get", + "path": "/users/{user}", + "symbol": "user_api.get_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "getUserLikes", + "method": "get", + "path": "/users/{user}/likes", + "symbol": "user_api.get_user_likes", + "paginated": true, + "documented": true + }, + { + "operation_id": "getUserScores", + "method": "get", + "path": "/users/{user}/scores", + "symbol": "user_api.get_user_scores", + "paginated": true, + "documented": true + }, + { + "operation_id": "listAssignments", + "method": "get", + "path": "/classes/{class}/assignments", + "symbol": "class_api.list_assignments", + "paginated": false, + "documented": true + }, + { + "operation_id": "listBillingCreditsHistory", + "method": "get", + "path": "/billing/credits/history", + "symbol": "omr_api.list_billing_credits_history", + "paginated": true, + "documented": true + }, + { + "operation_id": "listClassStudentSubmissions", + "method": "get", + "path": "/classes/{class}/students/{user}/submissions", + "symbol": "class_api.list_class_student_submissions", + "paginated": false, + "documented": true + }, + { + "operation_id": "listClasses", + "method": "get", + "path": "/classes", + "symbol": "class_api.list_classes", + "paginated": false, + "documented": true + }, + { + "operation_id": "listCollectionScores", + "method": "get", + "path": "/collections/{collection}/scores", + "symbol": "collection_api.list_collection_scores", + "paginated": true, + "documented": true + }, + { + "operation_id": "listCollections", + "method": "get", + "path": "/collections", + "symbol": "collection_api.list_collections", + "paginated": true, + "documented": true + }, + { + "operation_id": "listEduLibraries", + "method": "get", + "path": "/eduResources/libraries", + "symbol": "edu_resources_api.list_edu_libraries", + "paginated": false, + "documented": true + }, + { + "operation_id": "listEduResources", + "method": "get", + "path": "/eduResources", + "symbol": "edu_resources_api.list_edu_resources", + "paginated": true, + "documented": true + }, + { + "operation_id": "listGroupUsers", + "method": "get", + "path": "/groups/{group}/users", + "symbol": "group_api.list_group_users", + "paginated": false, + "documented": true + }, + { + "operation_id": "listGroups", + "method": "get", + "path": "/groups", + "symbol": "group_api.list_groups", + "paginated": false, + "documented": false + }, + { + "operation_id": "listLtiConfigurations", + "method": "get", + "path": "/organizations/lti/configurations", + "symbol": "organization_api.list_lti_configurations", + "paginated": false, + "documented": true + }, + { + "operation_id": "listLtiCredentials", + "method": "get", + "path": "/organizations/lti/credentials", + "symbol": "organization_api.list_lti_credentials", + "paginated": false, + "documented": true + }, + { + "operation_id": "listOmrJobs", + "method": "get", + "path": "/omr/jobs", + "symbol": "omr_api.list_omr_jobs", + "paginated": true, + "documented": true + }, + { + "operation_id": "listOrganizationInvitations", + "method": "get", + "path": "/organizations/invitations", + "symbol": "organization_api.list_organization_invitations", + "paginated": true, + "documented": true + }, + { + "operation_id": "listOrganizationUsers", + "method": "get", + "path": "/organizations/users", + "symbol": "organization_api.list_organization_users", + "paginated": true, + "documented": true + }, + { + "operation_id": "listScoreTracks", + "method": "get", + "path": "/scores/{score}/tracks", + "symbol": "score_api.list_score_tracks", + "paginated": false, + "documented": true + }, + { + "operation_id": "markScoreCommentResolved", + "method": "put", + "path": "/scores/{score}/comments/{comment}/resolved", + "symbol": "score_api.mark_score_comment_resolved", + "paginated": false, + "documented": true + }, + { + "operation_id": "markScoreCommentUnresolved", + "method": "delete", + "path": "/scores/{score}/comments/{comment}/resolved", + "symbol": "score_api.mark_score_comment_unresolved", + "paginated": false, + "documented": true + }, + { + "operation_id": "moveEduResource", + "method": "post", + "path": "/eduResources/{resource}/move", + "symbol": "edu_resources_api.move_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "postScoreComment", + "method": "post", + "path": "/scores/{score}/comments", + "symbol": "score_api.post_score_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "postSubmissionComment", + "method": "post", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments", + "symbol": "class_api.post_submission_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "removeGroupUser", + "method": "delete", + "path": "/groups/{group}/users/{user}", + "symbol": "group_api.remove_group_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "removeOrganizationInvitation", + "method": "delete", + "path": "/organizations/invitations/{invitation}", + "symbol": "organization_api.remove_organization_invitation", + "paginated": false, + "documented": true + }, + { + "operation_id": "removeOrganizationUser", + "method": "delete", + "path": "/organizations/users/{user}", + "symbol": "organization_api.remove_organization_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "removeScoreCollaborator", + "method": "delete", + "path": "/scores/{score}/collaborators/{collaborator}", + "symbol": "score_api.remove_score_collaborator", + "paginated": false, + "documented": true + }, + { + "operation_id": "renameGroup", + "method": "put", + "path": "/groups/{group}", + "symbol": "group_api.rename_group", + "paginated": false, + "documented": true + }, + { + "operation_id": "revokeLtiCredentials", + "method": "delete", + "path": "/organizations/lti/credentials/{credentials}", + "symbol": "organization_api.revoke_lti_credentials", + "paginated": false, + "documented": true + }, + { + "operation_id": "startOmrJob", + "method": "post", + "path": "/omr/jobs/{job}/start", + "symbol": "omr_api.start_omr_job", + "paginated": false, + "documented": true + }, + { + "operation_id": "submitOmrJobStep", + "method": "post", + "path": "/omr/jobs/{job}/steps/{step}", + "symbol": "omr_api.submit_omr_job_step", + "paginated": false, + "documented": true + }, + { + "operation_id": "unarchiveAssignment", + "method": "delete", + "path": "/classes/{class}/assignments/{assignment}/archive", + "symbol": "class_api.unarchive_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "unarchiveClass", + "method": "delete", + "path": "/classes/{class}/archive", + "symbol": "class_api.unarchive_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "untrashCollection", + "method": "post", + "path": "/collections/{collection}/untrash", + "symbol": "collection_api.untrash_collection", + "paginated": false, + "documented": true + }, + { + "operation_id": "untrashScore", + "method": "post", + "path": "/scores/{score}/untrash", + "symbol": "score_api.untrash_score", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateClass", + "method": "put", + "path": "/classes/{class}", + "symbol": "class_api.update_class", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateClassAssignment", + "method": "put", + "path": "/classes/{class}/assignments/{assignment}", + "symbol": "class_api.update_class_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateEduResource", + "method": "put", + "path": "/eduResources/{resource}", + "symbol": "edu_resources_api.update_edu_resource", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateEduResourceAssignment", + "method": "put", + "path": "/eduResources/{resource}/assignment", + "symbol": "edu_resources_api.update_edu_resource_assignment", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateLtiConfiguration", + "method": "put", + "path": "/organizations/lti/configurations/{configuration}", + "symbol": "organization_api.update_lti_configuration", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateOrganizationUser", + "method": "put", + "path": "/organizations/users/{user}", + "symbol": "organization_api.update_organization_user", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateScoreComment", + "method": "put", + "path": "/scores/{score}/comments/{comment}", + "symbol": "score_api.update_score_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateScoreTrack", + "method": "put", + "path": "/scores/{score}/tracks/{track}", + "symbol": "score_api.update_score_track", + "paginated": false, + "documented": true + }, + { + "operation_id": "updateSubmissionComment", + "method": "put", + "path": "/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}", + "symbol": "class_api.update_submission_comment", + "paginated": false, + "documented": true + }, + { + "operation_id": "useEduResourceInClass", + "method": "post", + "path": "/eduResources/{resource}/useInClass", + "symbol": "edu_resources_api.use_edu_resource_in_class", + "paginated": false, + "documented": true + } + ], + "models": [ + "AddGroupUser200Response", + "AddGroupUserRequest", + "ApiAccessToken", + "AppScopes", + "Assignment", + "AssignmentCapabilities", + "AssignmentCapabilitiesCanPublishInClassError", + "AssignmentCopy", + "AssignmentCopyResponse", + "AssignmentCopyToClass", + "AssignmentCopyToResourceLibrary", + "AssignmentGroup", + "AssignmentSubmission", + "AssignmentSubmissionComment", + "AssignmentSubmissionCommentCreation", + "AssignmentSubmissionComments", + "AssignmentSubmissionHistory", + "AssignmentSubmissionHistoryAttachment", + "AssignmentSubmissionHistoryState", + "AssignmentSubmissionLti", + "AssignmentSubmissionPlayback", + "AssignmentSubmissionState", + "AssignmentSubmissionStudentsMode", + "AssignmentSubmissionUpdate", + "AssignmentType", + "AssignmentUpdate", + "ClassAssignment", + "ClassAssignmentAllOfCanvas", + "ClassAssignmentAllOfLti", + "ClassAssignmentAllOfMfc", + "ClassAssignmentUpdate", + "ClassAssignmentUpdateAllOfGoogleClassroom", + "ClassAssignmentUpdateAllOfMicrosoftGraph", + "ClassAttachmentCreation", + "ClassCreation", + "ClassDetails", + "ClassDetailsCanvas", + "ClassDetailsClever", + "ClassDetailsGoogleClassroom", + "ClassDetailsGoogleDrive", + "ClassDetailsIssues", + "ClassDetailsIssuesSyncInner", + "ClassDetailsLti", + "ClassDetailsMfc", + "ClassDetailsMicrosoftGraph", + "ClassGradeLevel", + "ClassRoles", + "ClassState", + "ClassUpdate", + "Collection", + "CollectionApp", + "CollectionCapabilities", + "CollectionContents", + "CollectionCreation", + "CollectionModification", + "CollectionPrivacy", + "CollectionType", + "CreateLtiConfiguration200Response", + "CreditTransaction", + "EduLibrary", + "EduResource", + "EduResourceAssignmentCreation", + "EduResourceCapabilities", + "EduResourceCopy", + "EduResourceCreation", + "EduResourceFolder", + "EduResourceLtiLink", + "EduResourceMove", + "EduResourcePrivacy", + "EduResourceResource", + "EduResourceType", + "EduResourceUpdate", + "EduResourceUseInClass", + "FlatErrorResponse", + "GoogleClassroomCoursework", + "GoogleClassroomSubmission", + "Grade", + "Group", + "GroupCreation", + "GroupDetails", + "GroupType", + "LicenseMode", + "LicenseSources", + "LmsName", + "LtiConfiguration", + "LtiConfiguration1p1", + "LtiConfiguration1p1AllOfTool", + "LtiConfiguration1p3", + "LtiConfiguration1p3Base", + "LtiConfiguration1p3BaseSupportedServices", + "LtiConfiguration1p3BaseSupportedServicesAgs", + "LtiConfiguration1p3BaseSupportedServicesDeepLinking", + "LtiConfiguration1p3BaseSupportedServicesNrps", + "LtiConfiguration1p3BaseTool", + "LtiConfiguration1p3Deployment", + "LtiConfiguration1p3Dynamic", + "LtiConfiguration1p3Manual", + "LtiConfigurationBase", + "LtiConfigurationCreate", + "LtiConfigurationCreate1p1", + "LtiConfigurationCreate1p3Deployment", + "LtiConfigurationCreate1p3Dynamic", + "LtiConfigurationCreate1p3DynamicPlatformInfo", + "LtiConfigurationCreate1p3Manual", + "LtiConfigurationUpdate", + "LtiConfigurationUpdateDeployment", + "LtiConfigurationUpdateStandalone", + "LtiCredentials", + "LtiCredentialsCreation", + "MediaAttachment", + "MediaScoreSharingMode", + "MicrosoftGraphAssignment", + "MicrosoftGraphSubmission", + "OmrCapabilities", + "OmrDetailsStepData", + "OmrDetailsSubmission", + "OmrDetectedInstrument", + "OmrImportedMetadata", + "OmrInstrumentOverride", + "OmrJob", + "OmrJobCreation", + "OmrJobFileMetadata", + "OmrJobFileUpload", + "OmrJobFileUploadResult", + "OmrJobInputFile", + "OmrJobOutput", + "OmrJobProgress", + "OmrJobResult", + "OmrJobRetention", + "OmrJobStatus", + "OmrLocaleDetails", + "OmrPendingStep", + "OmrStepName", + "OrganizationInvitation", + "OrganizationInvitationCreation", + "OrganizationRoles", + "OrganizationUserAccessTokenCreation", + "RenameGroupRequest", + "ResourceCollaborator", + "ResourceCollaboratorCreation", + "ResourceRights", + "ScoreComment", + "ScoreCommentContext", + "ScoreCommentCreation", + "ScoreCommentModeration", + "ScoreCommentUpdate", + "ScoreCommentsCounts", + "ScoreCreation", + "ScoreCreationBuilderData", + "ScoreCreationBuilderDataAllOfBuilderData", + "ScoreCreationBuilderDataAllOfBuilderDataLayoutData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments", + "ScoreCreationCommon", + "ScoreCreationFileImport", + "ScoreCreationGoogleDriveImport", + "ScoreCreationType", + "ScoreDetails", + "ScoreDetailsAllOfMe", + "ScoreFork", + "ScoreLicense", + "ScoreLikesCounts", + "ScoreModification", + "ScorePlaysCounts", + "ScorePrivacy", + "ScoreRevision", + "ScoreRevisionCreation", + "ScoreRevisionStatistics", + "ScoreSource", + "ScoreSummary", + "ScoreTrack", + "ScoreTrackCreation", + "ScoreTrackCreationResponse", + "ScoreTrackPoint", + "ScoreTrackPurpose", + "ScoreTrackState", + "ScoreTrackType", + "ScoreTrackUpdate", + "ScoreViewsCounts", + "Task", + "TaskExportOptions", + "TaskProgress", + "TaskResult", + "TeachingTheme", + "TutteoProduct", + "UserAdminUpdate", + "UserAzureDetails", + "UserBasics", + "UserCommunityProfileLinks", + "UserCreation", + "UserDetails", + "UserDetailsAdmin", + "UserDetailsAdminAllOfLicense", + "UserPublic", + "UserPublicSummary", + "UserSigninLink", + "UserSigninLinkCreation" + ], + "scopes": [ + "account.education_profile", + "account.email", + "account.public_profile", + "collections", + "collections.add_scores", + "collections.readonly", + "edu.admin", + "edu.admin.lti", + "edu.admin.lti.readonly", + "edu.admin.users", + "edu.admin.users.readonly", + "edu.assignments", + "edu.assignments.readonly", + "edu.classes", + "edu.classes.readonly", + "edu.resources", + "edu.resources.readonly", + "notifications.readonly", + "omr", + "scores", + "scores.readonly", + "scores.social", + "tasks.readonly" + ] +} diff --git a/QUICKSTART.md b/QUICKSTART.md new file mode 100644 index 0000000..c17fd46 --- /dev/null +++ b/QUICKSTART.md @@ -0,0 +1,64 @@ +# Quickstart + +From nothing to your first authenticated call. + +## 1. Get a token + +Create a [Personal Access Token](https://flat.io/developers/apps). It behaves like an OAuth access +token scoped to your own account, which is all you need to start. + +## 2. Install + +```sh +pip install flat-api +``` + +Requires Python 3.11, 3.12 and 3.13. + +## 3. Call the API + +```python +from flat_api import FlatClient + +client = FlatClient(access_token="YOUR_TOKEN") +me = client.api_client # generated APIs hang off here +``` + +If that prints your account, you are done. + +## 4. Do something useful + +List your scores. The client handles paging for you: + +```python +from flat_api import paginate + +for score in paginate(api.get_user_scores_with_http_info, user="me"): + print(score.title) +``` + +## 5. Handle failure properly + +```python +from flat_api import FlatRateLimitError, FlatNotFoundError + +try: + ... +except FlatRateLimitError as exc: + print("retry after", exc.reset) +except FlatNotFoundError: + print("no such score") +``` + +Two things worth knowing about the Flat API specifically: + +- Rate limiting returns **403**, not 429, and carries no `Retry-After`. The reset time is in + `X-RateLimit-Reset`. The client already handles this; the note matters if you disable retries. +- The error `id` is only present on internal and backend errors. When you have one, quote it to + support: it makes diagnosis much faster. + +## Where next + +- [README](README.md) for the full feature tour +- [Per-operation reference](docs/reference/) +- [API documentation](https://flat.io/developers/docs/api/) diff --git a/README.md b/README.md index 6ab684f..1f73e49 100644 --- a/README.md +++ b/README.md @@ -1,372 +1,96 @@ -# Python Client for the Flat REST API +# Flat API client for Python -[![Python package](https://github.com/FlatIO/api-client-python/actions/workflows/python.yml/badge.svg)](https://github.com/FlatIO/api-client-python/actions/workflows/python.yml) - -The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: -- Creating and importing new music scores using MusicXML or MIDI files -- Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) -- Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. - -You can find the API reference including code samples and our OpenAPI Specification at the following url: [https://flat.io/developers/api/reference](https://flat.io/developers/api/reference). - -To request some API credentials, please visit [https://flat.io/developers](https://flat.io/developers). - -## Requirements. - -Python >= 3.7 - -## Installation & Usage -### pip install +Official client for the [Flat REST API](https://flat.io/developers/docs/api/), generated from Flat's +public OpenAPI specification and kept current automatically. ```sh -pip install flat_api +pip install flat-api ``` -or install from this repository +```python +from flat_api import FlatClient -```sh -pip install git+https://github.com/FlatIO/api-client-python.git +client = FlatClient(access_token="YOUR_TOKEN") +me = client.api_client # generated APIs hang off here ``` -Then import the package: -```python -import flat_api -``` +Get a token in seconds with a [Personal Access Token](https://flat.io/developers/apps); it works +exactly like an OAuth access token for your own account. -### Setuptools +## What this client does for you -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). +- **Typed errors.** Branch on the error, not the status code. Flat returns HTTP 403 for both rate + limiting and authorization failures, so status alone cannot tell them apart. +- **Automatic retries.** Rate limits and server errors are retried with backoff. Flat sends no + `Retry-After`, so the client reads `X-RateLimit-Reset` instead. +- **Automatic pagination.** Eight collection endpoints are cursor-paginated with the cursor in a + `Link` header. You get an iterator; you never touch a cursor. +- **OAuth2 built in.** Authorization URLs, code exchange and transparent token refresh. +- **Full type information**, so your editor and your coding assistant both know the API. -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) +### Pagination -Then import the package: ```python -import flat_api -``` +from flat_api import paginate -## Getting Started +for score in paginate(api.get_user_scores_with_http_info, user="me"): + print(score.title) +``` -Please follow the [installation procedure](#installation--usage) and then run the following: +### Errors ```python -from pprint import pprint -import flat_api -from flat_api.api import account_api - -configuration = flat_api.Configuration( - access_token = 'YOUR_ACCESS_TOKEN' -) - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = account_api.AccountApi(api_client) - - try: - # Get current user account - api_response = api_instance.get_authenticated_user() - pprint(api_response) - except flat_api.ApiException as e: - print("Exception when calling AccountApi->get_authenticated_user: %s\n" % e) +from flat_api import FlatRateLimitError, FlatNotFoundError + +try: + ... +except FlatRateLimitError as exc: + print("retry after", exc.reset) +except FlatNotFoundError: + print("no such score") ``` -## Documentation for API Endpoints - -All URIs are relative to *https://api.flat.io/v2* +### Asynchronous use -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**get_authenticated_user**](docs/AccountApi.md#get_authenticated_user) | **GET** /me | Get current user account -*ClassApi* | [**activate_class**](docs/ClassApi.md#activate_class) | **POST** /classes/{class}/activate | Activate the class -*ClassApi* | [**add_class_user**](docs/ClassApi.md#add_class_user) | **PUT** /classes/{class}/users/{user} | Add a user to the class -*ClassApi* | [**archive_assignment**](docs/ClassApi.md#archive_assignment) | **POST** /classes/{class}/assignments/{assignment}/archive | Archive the assignment -*ClassApi* | [**archive_class**](docs/ClassApi.md#archive_class) | **POST** /classes/{class}/archive | Archive the class -*ClassApi* | [**copy_assignment**](docs/ClassApi.md#copy_assignment) | **POST** /classes/{class}/assignments/{assignment}/copy | Copy an assignment -*ClassApi* | [**create_class**](docs/ClassApi.md#create_class) | **POST** /classes | Create a new class -*ClassApi* | [**create_class_assignment**](docs/ClassApi.md#create_class_assignment) | **POST** /classes/{class}/assignments | Assignment creation -*ClassApi* | [**create_submission**](docs/ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission -*ClassApi* | [**create_test_student_account**](docs/ClassApi.md#create_test_student_account) | **POST** /classes/{class}/testStudent | Create a test student account -*ClassApi* | [**delete_class_user**](docs/ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class -*ClassApi* | [**delete_submission**](docs/ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission -*ClassApi* | [**delete_submission_comment**](docs/ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission -*ClassApi* | [**edit_submission**](docs/ClassApi.md#edit_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission} | Edit a submission -*ClassApi* | [**enroll_class**](docs/ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class -*ClassApi* | [**export_submissions_reviews_as_csv**](docs/ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports -*ClassApi* | [**export_submissions_reviews_as_excel**](docs/ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports -*ClassApi* | [**get_class**](docs/ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class -*ClassApi* | [**get_score_submissions**](docs/ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -*ClassApi* | [**get_submission**](docs/ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission -*ClassApi* | [**get_submission_comments**](docs/ClassApi.md#get_submission_comments) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | List the feedback comments of a submission -*ClassApi* | [**get_submission_history**](docs/ClassApi.md#get_submission_history) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission}/history | Get the history of the submission -*ClassApi* | [**get_submissions**](docs/ClassApi.md#get_submissions) | **GET** /classes/{class}/assignments/{assignment}/submissions | List the students' submissions -*ClassApi* | [**list_assignments**](docs/ClassApi.md#list_assignments) | **GET** /classes/{class}/assignments | Assignments listing -*ClassApi* | [**list_class_student_submissions**](docs/ClassApi.md#list_class_student_submissions) | **GET** /classes/{class}/students/{user}/submissions | List the submissions for a student -*ClassApi* | [**list_classes**](docs/ClassApi.md#list_classes) | **GET** /classes | List the classes available for the current user -*ClassApi* | [**post_submission_comment**](docs/ClassApi.md#post_submission_comment) | **POST** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments | Add a feedback comment to a submission -*ClassApi* | [**unarchive_assignment**](docs/ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. -*ClassApi* | [**unarchive_class**](docs/ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class -*ClassApi* | [**update_class**](docs/ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class -*ClassApi* | [**update_submission_comment**](docs/ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission -*CollectionApi* | [**add_score_to_collection**](docs/CollectionApi.md#add_score_to_collection) | **PUT** /collections/{collection}/scores/{score} | Add a score to the collection -*CollectionApi* | [**create_collection**](docs/CollectionApi.md#create_collection) | **POST** /collections | Create a new collection -*CollectionApi* | [**delete_collection**](docs/CollectionApi.md#delete_collection) | **DELETE** /collections/{collection} | Delete the collection -*CollectionApi* | [**delete_score_from_collection**](docs/CollectionApi.md#delete_score_from_collection) | **DELETE** /collections/{collection}/scores/{score} | Delete a score from the collection -*CollectionApi* | [**edit_collection**](docs/CollectionApi.md#edit_collection) | **PUT** /collections/{collection} | Update a collection's metadata -*CollectionApi* | [**get_collection**](docs/CollectionApi.md#get_collection) | **GET** /collections/{collection} | Get collection details -*CollectionApi* | [**list_collection_scores**](docs/CollectionApi.md#list_collection_scores) | **GET** /collections/{collection}/scores | List the scores contained in a collection -*CollectionApi* | [**list_collections**](docs/CollectionApi.md#list_collections) | **GET** /collections | List the collections -*CollectionApi* | [**untrash_collection**](docs/CollectionApi.md#untrash_collection) | **POST** /collections/{collection}/untrash | Untrash a collection -*EduResourcesApi* | [**copy_edu_resource**](docs/EduResourcesApi.md#copy_edu_resource) | **POST** /eduResources/{resource}/copy | Copy an education resource to a Resource Library -*EduResourcesApi* | [**copy_edu_resource_to_demo_class**](docs/EduResourcesApi.md#copy_edu_resource_to_demo_class) | **POST** /eduResources/{resource}/copyToDemoClass | Copy an education assignment to a teacher demo class -*EduResourcesApi* | [**create_edu_resource**](docs/EduResourcesApi.md#create_edu_resource) | **POST** /eduResources | Create a new education resource -*EduResourcesApi* | [**delete_edu_resource**](docs/EduResourcesApi.md#delete_edu_resource) | **DELETE** /eduResources/{resource} | Delete an education resource -*EduResourcesApi* | [**get_edu_resource**](docs/EduResourcesApi.md#get_edu_resource) | **GET** /eduResources/{resource} | Get an education resource -*EduResourcesApi* | [**list_edu_libraries**](docs/EduResourcesApi.md#list_edu_libraries) | **GET** /eduResources/libraries | List the education libraries -*EduResourcesApi* | [**list_edu_resources**](docs/EduResourcesApi.md#list_edu_resources) | **GET** /eduResources | List education resources in a library or folder -*EduResourcesApi* | [**move_edu_resource**](docs/EduResourcesApi.md#move_edu_resource) | **POST** /eduResources/{resource}/move | Move an education resource -*EduResourcesApi* | [**update_edu_resource**](docs/EduResourcesApi.md#update_edu_resource) | **PUT** /eduResources/{resource} | Update an education resource metadata -*EduResourcesApi* | [**update_edu_resource_assignment**](docs/EduResourcesApi.md#update_edu_resource_assignment) | **PUT** /eduResources/{resource}/assignment | Update an education resource assignment -*EduResourcesApi* | [**use_edu_resource_in_class**](docs/EduResourcesApi.md#use_edu_resource_in_class) | **POST** /eduResources/{resource}/useInClass | Use an education resource in a class -*GroupApi* | [**get_group_details**](docs/GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information -*GroupApi* | [**get_group_scores**](docs/GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -*GroupApi* | [**list_group_users**](docs/GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users -*OrganizationApi* | [**count_orga_users**](docs/OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters -*OrganizationApi* | [**create_lti_credentials**](docs/OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials -*OrganizationApi* | [**create_organization_invitation**](docs/OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization -*OrganizationApi* | [**create_organization_user**](docs/OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account -*OrganizationApi* | [**create_organization_user_access_token**](docs/OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user -*OrganizationApi* | [**create_organization_user_signin_link**](docs/OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user -*OrganizationApi* | [**list_lti_credentials**](docs/OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials -*OrganizationApi* | [**list_organization_invitations**](docs/OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations -*OrganizationApi* | [**list_organization_users**](docs/OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users -*OrganizationApi* | [**remove_organization_invitation**](docs/OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation -*OrganizationApi* | [**remove_organization_user**](docs/OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat -*OrganizationApi* | [**revoke_lti_credentials**](docs/OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials -*OrganizationApi* | [**update_organization_user**](docs/OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information -*ScoreApi* | [**add_score_collaborator**](docs/ScoreApi.md#add_score_collaborator) | **POST** /scores/{score}/collaborators | Add a new collaborator -*ScoreApi* | [**add_score_track**](docs/ScoreApi.md#add_score_track) | **POST** /scores/{score}/tracks | Add a new video or audio track to the score -*ScoreApi* | [**create_export_task**](docs/ScoreApi.md#create_export_task) | **POST** /scores/{score}/revisions/{revision}/{format}/task | Create a new score export task -*ScoreApi* | [**create_score**](docs/ScoreApi.md#create_score) | **POST** /scores | Create a new score -*ScoreApi* | [**create_score_revision**](docs/ScoreApi.md#create_score_revision) | **POST** /scores/{score}/revisions | Create a new revision -*ScoreApi* | [**delete_score**](docs/ScoreApi.md#delete_score) | **DELETE** /scores/{score} | Delete a score -*ScoreApi* | [**delete_score_comment**](docs/ScoreApi.md#delete_score_comment) | **DELETE** /scores/{score}/comments/{comment} | Delete a comment -*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 -*ScoreApi* | [**edit_score**](docs/ScoreApi.md#edit_score) | **PUT** /scores/{score} | Edit a score's metadata -*ScoreApi* | [**fork_score**](docs/ScoreApi.md#fork_score) | **POST** /scores/{score}/fork | Fork a score -*ScoreApi* | [**ger_user_likes**](docs/ScoreApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -*ScoreApi* | [**get_group_scores**](docs/ScoreApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -*ScoreApi* | [**get_score**](docs/ScoreApi.md#get_score) | **GET** /scores/{score} | Get a score's metadata -*ScoreApi* | [**get_score_collaborator**](docs/ScoreApi.md#get_score_collaborator) | **GET** /scores/{score}/collaborators/{collaborator} | Get a collaborator -*ScoreApi* | [**get_score_collaborators**](docs/ScoreApi.md#get_score_collaborators) | **GET** /scores/{score}/collaborators | List the collaborators -*ScoreApi* | [**get_score_comments**](docs/ScoreApi.md#get_score_comments) | **GET** /scores/{score}/comments | List comments -*ScoreApi* | [**get_score_revision**](docs/ScoreApi.md#get_score_revision) | **GET** /scores/{score}/revisions/{revision} | Get a score revision -*ScoreApi* | [**get_score_revision_data**](docs/ScoreApi.md#get_score_revision_data) | **GET** /scores/{score}/revisions/{revision}/{format} | Get a score revision data -*ScoreApi* | [**get_score_revisions**](docs/ScoreApi.md#get_score_revisions) | **GET** /scores/{score}/revisions | List the revisions -*ScoreApi* | [**get_score_submissions**](docs/ScoreApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score -*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 -*ScoreApi* | [**get_user_scores**](docs/ScoreApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores -*ScoreApi* | [**list_score_tracks**](docs/ScoreApi.md#list_score_tracks) | **GET** /scores/{score}/tracks | List the audio or video tracks linked to a score -*ScoreApi* | [**mark_score_comment_resolved**](docs/ScoreApi.md#mark_score_comment_resolved) | **PUT** /scores/{score}/comments/{comment}/resolved | Mark the comment as resolved -*ScoreApi* | [**mark_score_comment_unresolved**](docs/ScoreApi.md#mark_score_comment_unresolved) | **DELETE** /scores/{score}/comments/{comment}/resolved | Mark the comment as unresolved -*ScoreApi* | [**post_score_comment**](docs/ScoreApi.md#post_score_comment) | **POST** /scores/{score}/comments | Post a new comment -*ScoreApi* | [**remove_score_collaborator**](docs/ScoreApi.md#remove_score_collaborator) | **DELETE** /scores/{score}/collaborators/{collaborator} | Delete a collaborator -*ScoreApi* | [**untrash_score**](docs/ScoreApi.md#untrash_score) | **POST** /scores/{score}/untrash | Untrash a score -*ScoreApi* | [**update_score_comment**](docs/ScoreApi.md#update_score_comment) | **PUT** /scores/{score}/comments/{comment} | Update an existing comment -*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 -*TaskApi* | [**get_task**](docs/TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details -*UserApi* | [**ger_user_likes**](docs/UserApi.md#ger_user_likes) | **GET** /users/{user}/likes | List liked scores -*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{user} | Get a public user profile -*UserApi* | [**get_user_scores**](docs/UserApi.md#get_user_scores) | **GET** /users/{user}/scores | List user's scores +```python\nfrom flat_api import AsyncFlatClient +client = AsyncFlatClient(access_token="YOUR_TOKEN") +# every operation is awaitable\n``` -## Documentation For Models +## Supported versions - - [ApiAccessToken](docs/ApiAccessToken.md) - - [AppScopes](docs/AppScopes.md) - - [Assignment](docs/Assignment.md) - - [AssignmentCopy](docs/AssignmentCopy.md) - - [AssignmentCopyResponse](docs/AssignmentCopyResponse.md) - - [AssignmentCopyResponseCapabilities](docs/AssignmentCopyResponseCapabilities.md) - - [AssignmentCopyResponseCapabilitiesCanPublishInClassError](docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) - - [AssignmentSubmission](docs/AssignmentSubmission.md) - - [AssignmentSubmissionComment](docs/AssignmentSubmissionComment.md) - - [AssignmentSubmissionCommentCreation](docs/AssignmentSubmissionCommentCreation.md) - - [AssignmentSubmissionHistory](docs/AssignmentSubmissionHistory.md) - - [AssignmentSubmissionHistoryAttachment](docs/AssignmentSubmissionHistoryAttachment.md) - - [AssignmentSubmissionHistoryState](docs/AssignmentSubmissionHistoryState.md) - - [AssignmentSubmissionState](docs/AssignmentSubmissionState.md) - - [AssignmentSubmissionUpdate](docs/AssignmentSubmissionUpdate.md) - - [AssignmentSubmissionUpdateComments](docs/AssignmentSubmissionUpdateComments.md) - - [AssignmentType](docs/AssignmentType.md) - - [AssignmentUpdate](docs/AssignmentUpdate.md) - - [ClassAssignment](docs/ClassAssignment.md) - - [ClassAssignmentCanvas](docs/ClassAssignmentCanvas.md) - - [ClassAssignmentLti](docs/ClassAssignmentLti.md) - - [ClassAssignmentMfc](docs/ClassAssignmentMfc.md) - - [ClassAssignmentUpdate](docs/ClassAssignmentUpdate.md) - - [ClassAssignmentUpdateGoogleClassroom](docs/ClassAssignmentUpdateGoogleClassroom.md) - - [ClassAssignmentUpdateMicrosoftGraph](docs/ClassAssignmentUpdateMicrosoftGraph.md) - - [ClassAttachmentCreation](docs/ClassAttachmentCreation.md) - - [ClassCreation](docs/ClassCreation.md) - - [ClassDetails](docs/ClassDetails.md) - - [ClassDetailsCanvas](docs/ClassDetailsCanvas.md) - - [ClassDetailsClever](docs/ClassDetailsClever.md) - - [ClassDetailsGoogleClassroom](docs/ClassDetailsGoogleClassroom.md) - - [ClassDetailsGoogleDrive](docs/ClassDetailsGoogleDrive.md) - - [ClassDetailsIssues](docs/ClassDetailsIssues.md) - - [ClassDetailsIssuesSyncInner](docs/ClassDetailsIssuesSyncInner.md) - - [ClassDetailsLti](docs/ClassDetailsLti.md) - - [ClassDetailsMfc](docs/ClassDetailsMfc.md) - - [ClassDetailsMicrosoftGraph](docs/ClassDetailsMicrosoftGraph.md) - - [ClassGradeLevel](docs/ClassGradeLevel.md) - - [ClassRoles](docs/ClassRoles.md) - - [ClassState](docs/ClassState.md) - - [ClassUpdate](docs/ClassUpdate.md) - - [Collection](docs/Collection.md) - - [CollectionApp](docs/CollectionApp.md) - - [CollectionCapabilities](docs/CollectionCapabilities.md) - - [CollectionCreation](docs/CollectionCreation.md) - - [CollectionModification](docs/CollectionModification.md) - - [CollectionPrivacy](docs/CollectionPrivacy.md) - - [CollectionType](docs/CollectionType.md) - - [EduLibrary](docs/EduLibrary.md) - - [EduResource](docs/EduResource.md) - - [EduResourceCapabilities](docs/EduResourceCapabilities.md) - - [EduResourceCopy](docs/EduResourceCopy.md) - - [EduResourceCreation](docs/EduResourceCreation.md) - - [EduResourceMove](docs/EduResourceMove.md) - - [EduResourcePrivacy](docs/EduResourcePrivacy.md) - - [EduResourceResource](docs/EduResourceResource.md) - - [EduResourceType](docs/EduResourceType.md) - - [EduResourceUpdate](docs/EduResourceUpdate.md) - - [EduResourceUseInClass](docs/EduResourceUseInClass.md) - - [EduSkillsFocused](docs/EduSkillsFocused.md) - - [FlatErrorResponse](docs/FlatErrorResponse.md) - - [FlatLocales](docs/FlatLocales.md) - - [GoogleClassroomCoursework](docs/GoogleClassroomCoursework.md) - - [GoogleClassroomSubmission](docs/GoogleClassroomSubmission.md) - - [Group](docs/Group.md) - - [GroupDetails](docs/GroupDetails.md) - - [GroupType](docs/GroupType.md) - - [LicenseMode](docs/LicenseMode.md) - - [LicenseSources](docs/LicenseSources.md) - - [LmsName](docs/LmsName.md) - - [LtiCredentials](docs/LtiCredentials.md) - - [LtiCredentialsCreation](docs/LtiCredentialsCreation.md) - - [MediaAttachment](docs/MediaAttachment.md) - - [MediaScoreSharingMode](docs/MediaScoreSharingMode.md) - - [MicrosoftGraphAssignment](docs/MicrosoftGraphAssignment.md) - - [MicrosoftGraphSubmission](docs/MicrosoftGraphSubmission.md) - - [OrganizationInvitation](docs/OrganizationInvitation.md) - - [OrganizationInvitationCreation](docs/OrganizationInvitationCreation.md) - - [OrganizationRoles](docs/OrganizationRoles.md) - - [OrganizationUserAccessTokenCreation](docs/OrganizationUserAccessTokenCreation.md) - - [ResourceCollaborator](docs/ResourceCollaborator.md) - - [ResourceCollaboratorCreation](docs/ResourceCollaboratorCreation.md) - - [ResourceRights](docs/ResourceRights.md) - - [ScoreComment](docs/ScoreComment.md) - - [ScoreCommentContext](docs/ScoreCommentContext.md) - - [ScoreCommentCreation](docs/ScoreCommentCreation.md) - - [ScoreCommentModeration](docs/ScoreCommentModeration.md) - - [ScoreCommentUpdate](docs/ScoreCommentUpdate.md) - - [ScoreCommentsCounts](docs/ScoreCommentsCounts.md) - - [ScoreCreation](docs/ScoreCreation.md) - - [ScoreCreationBuilderData](docs/ScoreCreationBuilderData.md) - - [ScoreCreationBuilderDataLayoutData](docs/ScoreCreationBuilderDataLayoutData.md) - - [ScoreCreationBuilderDataScoreData](docs/ScoreCreationBuilderDataScoreData.md) - - [ScoreCreationBuilderDataScoreDataInstrumentsInner](docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md) - - [ScoreCreationType](docs/ScoreCreationType.md) - - [ScoreDetails](docs/ScoreDetails.md) - - [ScoreFork](docs/ScoreFork.md) - - [ScoreLicense](docs/ScoreLicense.md) - - [ScoreLikesCounts](docs/ScoreLikesCounts.md) - - [ScoreModification](docs/ScoreModification.md) - - [ScorePlaysCounts](docs/ScorePlaysCounts.md) - - [ScorePrivacy](docs/ScorePrivacy.md) - - [ScoreRevision](docs/ScoreRevision.md) - - [ScoreRevisionCreation](docs/ScoreRevisionCreation.md) - - [ScoreRevisionStatistics](docs/ScoreRevisionStatistics.md) - - [ScoreSource](docs/ScoreSource.md) - - [ScoreTrack](docs/ScoreTrack.md) - - [ScoreTrackCreation](docs/ScoreTrackCreation.md) - - [ScoreTrackPoint](docs/ScoreTrackPoint.md) - - [ScoreTrackState](docs/ScoreTrackState.md) - - [ScoreTrackType](docs/ScoreTrackType.md) - - [ScoreTrackUpdate](docs/ScoreTrackUpdate.md) - - [ScoreViewsCounts](docs/ScoreViewsCounts.md) - - [Task](docs/Task.md) - - [TaskExportOptions](docs/TaskExportOptions.md) - - [TaskProgress](docs/TaskProgress.md) - - [TaskResult](docs/TaskResult.md) - - [UserAdminUpdate](docs/UserAdminUpdate.md) - - [UserAzureDetails](docs/UserAzureDetails.md) - - [UserCommunityProfileLinks](docs/UserCommunityProfileLinks.md) - - [UserCreation](docs/UserCreation.md) - - [UserDetails](docs/UserDetails.md) - - [UserDetailsAdmin](docs/UserDetailsAdmin.md) - - [UserDetailsAdminLicense](docs/UserDetailsAdminLicense.md) - - [UserPublic](docs/UserPublic.md) - - [UserPublicSummary](docs/UserPublicSummary.md) - - [UserSigninLink](docs/UserSigninLink.md) - - [UserSigninLinkCreation](docs/UserSigninLinkCreation.md) +Python 3.11, 3.12 and 3.13. Versions past their upstream end of life are not supported; see +[MIGRATION.md](MIGRATION.md) if you are on an older runtime. +## Documentation -## Documentation For Authorization +- [Quickstart](QUICKSTART.md), install to first call +- [Per-operation reference](docs/reference/), generated +- [API documentation](https://flat.io/developers/docs/api/) +- [Migrating from 1.1.x](MIGRATION.md) +## Verifying this package -## OAuth2 +Every release carries a signed provenance attestation linking the package back to the commit, the +workflow run that built it, and the API specification version it was generated from. -- **Type**: OAuth -- **Flow**: accessCode -- **Authorization URL**: https://flat.io/auth/oauth -- **Scopes**: - - **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. - - **account.email**: Provices access to the person's email. - - **account.education_profile**: Provides access to the basic person's education profile and public organization information. - - **scores.readonly**: Allows read-only access to all a user's scores. You won't need this scope to read public scores. - - **scores.social**: Allow to post comments and like scores - - **scores**: Full, permissive scope to access all of a user's scores. - - **collections.readonly**: Allow read-only access to a user's collections. - - **collections.add_scores**: Allow to add scores to a user's collections. - - **collections**: Full, permissive scope to access all of a user's collections. - - **edu.resources**: Read-write access to the resource library. - - **edu.resources.readonly**: Read-only access to the resource library. - - **edu.classes**: Full, permissive scope to manage the classes. - - **edu.classes.readonly**: Read-only access to the classes. - - **edu.assignments**: Read-write access to the assignments and submissions. - - **edu.assignments.readonly**: Read-only access to the assignments and submissions. - - **edu.admin**: Full, permissive scope to manage all the admin of an organization. - - **edu.admin.lti**: Access and manage the LTI Credentials for an organization. - - **edu.admin.lti.readonly**: Read-only access to the LTI Credentials of an organization. - - **edu.admin.users**: Access and manage the users and invitations of the organization. - - **edu.admin.users.readonly**: Read-only access to the users and invitations of the organization. - - **tasks.readonly**: Read-only access to export tasks created by this account. - - -## Author +```sh +pip download --no-deps flat-api +gh attestation verify flat_api-*.whl --repo FlatIO/api-client-python +``` -developers@flat.io +Published through PyPI trusted publishing: no long-lived token exists that could publish under this +name. +## How this client is maintained -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in flat_api.apis and flat_api.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: +Generated from the public specification published at +[FlatIO/api-reference](https://github.com/FlatIO/api-reference). A new specification release +regenerates, validates and publishes this package automatically, so it never drifts from the API. -Solution 1: -Use specific imports for apis and models like: -- `from flat_api.api.default_api import DefaultApi` -- `from flat_api.model.pet import Pet` +Files under `docs/reference/` and the client sources are generated: edit the generator configuration +in `tools/`, not the output. -Solution 2: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import flat_api -from flat_api.apis import * -from flat_api.models import * -``` +## License +Apache 2.0. See [LICENSE](LICENSE). diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..227cea2 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.0.0 diff --git a/docs/AppScopes.md b/docs/AppScopes.md deleted file mode 100644 index 0f80a9a..0000000 --- a/docs/AppScopes.md +++ /dev/null @@ -1,12 +0,0 @@ -# AppScopes - -Available scopes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Assignment.md b/docs/Assignment.md deleted file mode 100644 index 3d984e9..0000000 --- a/docs/Assignment.md +++ /dev/null @@ -1,43 +0,0 @@ -# Assignment - -Assignment details - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | -**type** | [**AssignmentType**](AssignmentType.md) | | -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | -**title** | **str** | Title of the assignment | -**description** | **str** | Description and content of the assignment | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | -**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] - -## Example - -```python -from flat_api.models.assignment import Assignment - -# TODO update the JSON string below -json = "{}" -# create an instance of Assignment from a JSON string -assignment_instance = Assignment.from_json(json) -# print the JSON string representation of the object -print Assignment.to_json() - -# convert the object into a dict -assignment_dict = assignment_instance.to_dict() -# create an instance of Assignment from a dict -assignment_form_dict = assignment.from_dict(assignment_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCopyResponse.md b/docs/AssignmentCopyResponse.md deleted file mode 100644 index 61c427f..0000000 --- a/docs/AssignmentCopyResponse.md +++ /dev/null @@ -1,43 +0,0 @@ -# AssignmentCopyResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | -**type** | [**AssignmentType**](AssignmentType.md) | | -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | -**title** | **str** | Title of the assignment | -**description** | **str** | Description and content of the assignment | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | -**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**resource** | **str** | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] - -## Example - -```python -from flat_api.models.assignment_copy_response import AssignmentCopyResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of AssignmentCopyResponse from a JSON string -assignment_copy_response_instance = AssignmentCopyResponse.from_json(json) -# print the JSON string representation of the object -print AssignmentCopyResponse.to_json() - -# convert the object into a dict -assignment_copy_response_dict = assignment_copy_response_instance.to_dict() -# create an instance of AssignmentCopyResponse from a dict -assignment_copy_response_form_dict = assignment_copy_response.from_dict(assignment_copy_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md b/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md deleted file mode 100644 index b9b420b..0000000 --- a/docs/AssignmentCopyResponseCapabilitiesCanPublishInClassError.md +++ /dev/null @@ -1,31 +0,0 @@ -# AssignmentCopyResponseCapabilitiesCanPublishInClassError - -If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | A corresponding code for this error | -**message** | **str** | A printable and localized message for this error | - -## Example - -```python -from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError - -# TODO update the JSON string below -json = "{}" -# create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a JSON string -assignment_copy_response_capabilities_can_publish_in_class_error_instance = AssignmentCopyResponseCapabilitiesCanPublishInClassError.from_json(json) -# print the JSON string representation of the object -print AssignmentCopyResponseCapabilitiesCanPublishInClassError.to_json() - -# convert the object into a dict -assignment_copy_response_capabilities_can_publish_in_class_error_dict = assignment_copy_response_capabilities_can_publish_in_class_error_instance.to_dict() -# create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a dict -assignment_copy_response_capabilities_can_publish_in_class_error_form_dict = assignment_copy_response_capabilities_can_publish_in_class_error.from_dict(assignment_copy_response_capabilities_can_publish_in_class_error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentSubmissionPlaybackInner.md b/docs/AssignmentSubmissionPlaybackInner.md deleted file mode 100644 index ad92cd1..0000000 --- a/docs/AssignmentSubmissionPlaybackInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# AssignmentSubmissionPlaybackInner - -Playback used by student in this submission (used to limit the playback for the assignment) - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**score** | **str** | The score unique identifier | -**nb_play_attempt** | **float** | The number of playback used by the student | - -## Example - -```python -from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner - -# TODO update the JSON string below -json = "{}" -# create an instance of AssignmentSubmissionPlaybackInner from a JSON string -assignment_submission_playback_inner_instance = AssignmentSubmissionPlaybackInner.from_json(json) -# print the JSON string representation of the object -print AssignmentSubmissionPlaybackInner.to_json() - -# convert the object into a dict -assignment_submission_playback_inner_dict = assignment_submission_playback_inner_instance.to_dict() -# create an instance of AssignmentSubmissionPlaybackInner from a dict -assignment_submission_playback_inner_form_dict = assignment_submission_playback_inner.from_dict(assignment_submission_playback_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentType.md b/docs/AssignmentType.md deleted file mode 100644 index 83e5742..0000000 --- a/docs/AssignmentType.md +++ /dev/null @@ -1,12 +0,0 @@ -# AssignmentType - -Type of the assignment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssignmentUpdate.md b/docs/AssignmentUpdate.md deleted file mode 100644 index 560191c..0000000 --- a/docs/AssignmentUpdate.md +++ /dev/null @@ -1,40 +0,0 @@ -# AssignmentUpdate - -Assignment Resource Editing - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**title** | **str** | Title of the assignment | [optional] -**description** | **str** | Description and content of the assignment | [optional] -**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] - -## Example - -```python -from flat_api.models.assignment_update import AssignmentUpdate - -# TODO update the JSON string below -json = "{}" -# create an instance of AssignmentUpdate from a JSON string -assignment_update_instance = AssignmentUpdate.from_json(json) -# print the JSON string representation of the object -print AssignmentUpdate.to_json() - -# convert the object into a dict -assignment_update_dict = assignment_update_instance.to_dict() -# create an instance of AssignmentUpdate from a dict -assignment_update_form_dict = assignment_update.from_dict(assignment_update_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassAssignment.md b/docs/ClassAssignment.md deleted file mode 100644 index 1fe39f6..0000000 --- a/docs/ClassAssignment.md +++ /dev/null @@ -1,57 +0,0 @@ -# ClassAssignment - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | -**type** | [**AssignmentType**](AssignmentType.md) | | -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | -**title** | **str** | Title of the assignment | -**description** | **str** | Description and content of the assignment | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | -**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**creator** | **str** | The User unique identifier of the creator of this assignment | [optional] -**state** | **str** | State of the assignment | [optional] -**classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] -**creation_date** | **datetime** | The creation date of this assignment | [optional] -**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] -**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] -**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] -**submissions** | [**List[AssignmentSubmission]**](AssignmentSubmission.md) | | [optional] -**google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] -**microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] -**mfc** | [**ClassAssignmentMfc**](ClassAssignmentMfc.md) | | [optional] -**canvas** | [**ClassAssignmentCanvas**](ClassAssignmentCanvas.md) | | [optional] -**lti** | [**ClassAssignmentLti**](ClassAssignmentLti.md) | | [optional] -**issue** | **str** | Detected issue for this assignment | [optional] - -## Example - -```python -from flat_api.models.class_assignment import ClassAssignment - -# TODO update the JSON string below -json = "{}" -# create an instance of ClassAssignment from a JSON string -class_assignment_instance = ClassAssignment.from_json(json) -# print the JSON string representation of the object -print ClassAssignment.to_json() - -# convert the object into a dict -class_assignment_dict = class_assignment_instance.to_dict() -# create an instance of ClassAssignment from a dict -class_assignment_form_dict = class_assignment.from_dict(class_assignment_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassAssignmentLti.md b/docs/ClassAssignmentLti.md deleted file mode 100644 index 908aad6..0000000 --- a/docs/ClassAssignmentLti.md +++ /dev/null @@ -1,30 +0,0 @@ -# ClassAssignmentLti - -An LTI assignment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Resource ID in the LMS | [optional] - -## Example - -```python -from flat_api.models.class_assignment_lti import ClassAssignmentLti - -# TODO update the JSON string below -json = "{}" -# create an instance of ClassAssignmentLti from a JSON string -class_assignment_lti_instance = ClassAssignmentLti.from_json(json) -# print the JSON string representation of the object -print ClassAssignmentLti.to_json() - -# convert the object into a dict -class_assignment_lti_dict = class_assignment_lti_instance.to_dict() -# create an instance of ClassAssignmentLti from a dict -class_assignment_lti_form_dict = class_assignment_lti.from_dict(class_assignment_lti_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassAssignmentUpdate.md b/docs/ClassAssignmentUpdate.md deleted file mode 100644 index 3860e0f..0000000 --- a/docs/ClassAssignmentUpdate.md +++ /dev/null @@ -1,46 +0,0 @@ -# ClassAssignmentUpdate - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**AssignmentType**](AssignmentType.md) | | [optional] -**title** | **str** | Title of the assignment | [optional] -**description** | **str** | Description and content of the assignment | [optional] -**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] -**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**state** | **str** | State of the assignment | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] -**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] -**google_classroom** | [**ClassAssignmentUpdateGoogleClassroom**](ClassAssignmentUpdateGoogleClassroom.md) | | [optional] -**microsoft_graph** | [**ClassAssignmentUpdateMicrosoftGraph**](ClassAssignmentUpdateMicrosoftGraph.md) | | [optional] -**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] -**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] - -## Example - -```python -from flat_api.models.class_assignment_update import ClassAssignmentUpdate - -# TODO update the JSON string below -json = "{}" -# create an instance of ClassAssignmentUpdate from a JSON string -class_assignment_update_instance = ClassAssignmentUpdate.from_json(json) -# print the JSON string representation of the object -print ClassAssignmentUpdate.to_json() - -# convert the object into a dict -class_assignment_update_dict = class_assignment_update_instance.to_dict() -# create an instance of ClassAssignmentUpdate from a dict -class_assignment_update_form_dict = class_assignment_update.from_dict(class_assignment_update_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassAssignmentUpdateGoogleClassroom.md b/docs/ClassAssignmentUpdateGoogleClassroom.md deleted file mode 100644 index 456dcc9..0000000 --- a/docs/ClassAssignmentUpdateGoogleClassroom.md +++ /dev/null @@ -1,30 +0,0 @@ -# ClassAssignmentUpdateGoogleClassroom - -Google Classroom options for this assignment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] - -## Example - -```python -from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom - -# TODO update the JSON string below -json = "{}" -# create an instance of ClassAssignmentUpdateGoogleClassroom from a JSON string -class_assignment_update_google_classroom_instance = ClassAssignmentUpdateGoogleClassroom.from_json(json) -# print the JSON string representation of the object -print ClassAssignmentUpdateGoogleClassroom.to_json() - -# convert the object into a dict -class_assignment_update_google_classroom_dict = class_assignment_update_google_classroom_instance.to_dict() -# create an instance of ClassAssignmentUpdateGoogleClassroom from a dict -class_assignment_update_google_classroom_form_dict = class_assignment_update_google_classroom.from_dict(class_assignment_update_google_classroom_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ClassAssignmentUpdateMicrosoftGraph.md b/docs/ClassAssignmentUpdateMicrosoftGraph.md deleted file mode 100644 index 2d88948..0000000 --- a/docs/ClassAssignmentUpdateMicrosoftGraph.md +++ /dev/null @@ -1,30 +0,0 @@ -# ClassAssignmentUpdateMicrosoftGraph - -Microsoft Graph options for this assignment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**categories** | **List[str]** | List of categories this assignment belongs to | [optional] - -## Example - -```python -from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph - -# TODO update the JSON string below -json = "{}" -# create an instance of ClassAssignmentUpdateMicrosoftGraph from a JSON string -class_assignment_update_microsoft_graph_instance = ClassAssignmentUpdateMicrosoftGraph.from_json(json) -# print the JSON string representation of the object -print ClassAssignmentUpdateMicrosoftGraph.to_json() - -# convert the object into a dict -class_assignment_update_microsoft_graph_dict = class_assignment_update_microsoft_graph_instance.to_dict() -# create an instance of ClassAssignmentUpdateMicrosoftGraph from a dict -class_assignment_update_microsoft_graph_form_dict = class_assignment_update_microsoft_graph.from_dict(class_assignment_update_microsoft_graph_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionPrivacy.md b/docs/CollectionPrivacy.md deleted file mode 100644 index 827a33f..0000000 --- a/docs/CollectionPrivacy.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollectionPrivacy - -The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CollectionType.md b/docs/CollectionType.md deleted file mode 100644 index 9b14a6e..0000000 --- a/docs/CollectionType.md +++ /dev/null @@ -1,12 +0,0 @@ -# CollectionType - -Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EduResourceResource.md b/docs/EduResourceResource.md deleted file mode 100644 index a245757..0000000 --- a/docs/EduResourceResource.md +++ /dev/null @@ -1,42 +0,0 @@ -# EduResourceResource - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the assignment | -**type** | [**AssignmentType**](AssignmentType.md) | | -**capabilities** | [**AssignmentCopyResponseCapabilities**](AssignmentCopyResponseCapabilities.md) | | -**title** | **str** | Title of the folder | -**description** | **str** | Description and content of the assignment | [optional] -**cover** | **str** | The URL of the cover to display | [optional] -**cover_file** | **str** | The id of the cover to display | [optional] -**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | | -**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] -**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] -**toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] - -## Example - -```python -from flat_api.models.edu_resource_resource import EduResourceResource - -# TODO update the JSON string below -json = "{}" -# create an instance of EduResourceResource from a JSON string -edu_resource_resource_instance = EduResourceResource.from_json(json) -# print the JSON string representation of the object -print EduResourceResource.to_json() - -# convert the object into a dict -edu_resource_resource_dict = edu_resource_resource_instance.to_dict() -# create an instance of EduResourceResource from a dict -edu_resource_resource_form_dict = edu_resource_resource.from_dict(edu_resource_resource_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlatLocales.md b/docs/FlatLocales.md deleted file mode 100644 index 19b9340..0000000 --- a/docs/FlatLocales.md +++ /dev/null @@ -1,12 +0,0 @@ -# FlatLocales - -The user language - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupApi.md b/docs/GroupApi.md deleted file mode 100644 index 3af3f5e..0000000 --- a/docs/GroupApi.md +++ /dev/null @@ -1,239 +0,0 @@ -# flat_api.GroupApi - -All URIs are relative to *https://api.flat.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_group_details**](GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information -[**get_group_scores**](GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores -[**list_group_users**](GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users - - -# **get_group_details** -> GroupDetails get_group_details(group) - -Get group information - -### Example - -* OAuth Authentication (OAuth2): - -```python -import flat_api -from flat_api.models.group_details import GroupDetails -from flat_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -configuration.access_token = os.environ["ACCESS_TOKEN"] - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group - - try: - # Get group information - api_response = api_instance.get_group_details(group) - print("The response of GroupApi->get_group_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GroupApi->get_group_details: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - -### Return type - -[**GroupDetails**](GroupDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The group details | - | -**0** | Error | - | - -[[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) - -# **get_group_scores** -> List[ScoreDetails] get_group_scores(group, parent=parent) - -List group's scores - -Get the list of scores shared with a group. - -### Example - -* OAuth Authentication (OAuth2): - -```python -import flat_api -from flat_api.models.score_details import ScoreDetails -from flat_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -configuration.access_token = os.environ["ACCESS_TOKEN"] - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group - parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) - - try: - # List group's scores - api_response = api_instance.get_group_scores(group, parent=parent) - print("The response of GroupApi->get_group_scores:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GroupApi->get_group_scores: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] - -### Return type - -[**List[ScoreDetails]**](ScoreDetails.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The group's scores | - | -**0** | Error | - | - -[[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) - -# **list_group_users** -> List[UserPublic] list_group_users(group, source=source) - -List group's users - -### Example - -* OAuth Authentication (OAuth2): - -```python -import flat_api -from flat_api.models.user_public import UserPublic -from flat_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.flat.io/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = flat_api.Configuration( - host = "https://api.flat.io/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -configuration.access_token = os.environ["ACCESS_TOKEN"] - -# Enter a context with an instance of the API client -with flat_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flat_api.GroupApi(api_client) - group = 'group_example' # str | Unique identifier of a Flat group - source = 'source_example' # str | Filter the users by their source (optional) - - try: - # List group's users - api_response = api_instance.list_group_users(group, source=source) - print("The response of GroupApi->list_group_users:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling GroupApi->list_group_users: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | **str**| Unique identifier of a Flat group | - **source** | **str**| Filter the users by their source | [optional] - -### Return type - -[**List[UserPublic]**](UserPublic.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The list of users member of the group | - | -**0** | Error | - | - -[[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) - diff --git a/docs/GroupDetails.md b/docs/GroupDetails.md deleted file mode 100644 index ddb4f0e..0000000 --- a/docs/GroupDetails.md +++ /dev/null @@ -1,36 +0,0 @@ -# GroupDetails - -The details of a group - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the group | [optional] -**name** | **str** | The displayable name of the group | [optional] -**type** | [**GroupType**](GroupType.md) | | [optional] -**organization** | **str** | The unique identifier of the Organization owning the group | [optional] -**creation_date** | **datetime** | The date when the group was create | [optional] -**users_count** | **float** | The number of students in this group | [optional] -**read_only** | **bool** | `true` if the properties and members of this group are in in read-only | [optional] - -## Example - -```python -from flat_api.models.group_details import GroupDetails - -# TODO update the JSON string below -json = "{}" -# create an instance of GroupDetails from a JSON string -group_details_instance = GroupDetails.from_json(json) -# print the JSON string representation of the object -print GroupDetails.to_json() - -# convert the object into a dict -group_details_dict = group_details_instance.to_dict() -# create an instance of GroupDetails from a dict -group_details_form_dict = group_details.from_dict(group_details_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GroupType.md b/docs/GroupType.md deleted file mode 100644 index dcc0f2c..0000000 --- a/docs/GroupType.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupType - -The type of the group - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LicenseSources.md b/docs/LicenseSources.md deleted file mode 100644 index 300e50f..0000000 --- a/docs/LicenseSources.md +++ /dev/null @@ -1,12 +0,0 @@ -# LicenseSources - -Source of the license - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LmsName.md b/docs/LmsName.md deleted file mode 100644 index c5390ae..0000000 --- a/docs/LmsName.md +++ /dev/null @@ -1,12 +0,0 @@ -# LmsName - -LMS name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/MicrosoftGraphAssignment.md b/docs/MicrosoftGraphAssignment.md deleted file mode 100644 index b9b2ca3..0000000 --- a/docs/MicrosoftGraphAssignment.md +++ /dev/null @@ -1,33 +0,0 @@ -# MicrosoftGraphAssignment - -A Microsoft Teams asignment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the assignement assigned by Microsoft Teams | [optional] -**state** | **str** | State of the assignment | [optional] -**alternate_link** | **str** | Absolute link to this assignement in the Microsoft Teams web UI | [optional] -**categories** | **List[str]** | List of categories where this assignment is published under | [optional] - -## Example - -```python -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment - -# TODO update the JSON string below -json = "{}" -# create an instance of MicrosoftGraphAssignment from a JSON string -microsoft_graph_assignment_instance = MicrosoftGraphAssignment.from_json(json) -# print the JSON string representation of the object -print MicrosoftGraphAssignment.to_json() - -# convert the object into a dict -microsoft_graph_assignment_dict = microsoft_graph_assignment_instance.to_dict() -# create an instance of MicrosoftGraphAssignment from a dict -microsoft_graph_assignment_form_dict = microsoft_graph_assignment.from_dict(microsoft_graph_assignment_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderData.md b/docs/ScoreCreationBuilderData.md deleted file mode 100644 index 865b4f2..0000000 --- a/docs/ScoreCreationBuilderData.md +++ /dev/null @@ -1,30 +0,0 @@ -# ScoreCreationBuilderData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**score_data** | [**ScoreCreationBuilderDataScoreData**](ScoreCreationBuilderDataScoreData.md) | | -**layout_data** | [**ScoreCreationBuilderDataLayoutData**](ScoreCreationBuilderDataLayoutData.md) | | [optional] - -## Example - -```python -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData - -# TODO update the JSON string below -json = "{}" -# create an instance of ScoreCreationBuilderData from a JSON string -score_creation_builder_data_instance = ScoreCreationBuilderData.from_json(json) -# print the JSON string representation of the object -print ScoreCreationBuilderData.to_json() - -# convert the object into a dict -score_creation_builder_data_dict = score_creation_builder_data_instance.to_dict() -# create an instance of ScoreCreationBuilderData from a dict -score_creation_builder_data_form_dict = score_creation_builder_data.from_dict(score_creation_builder_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderDataScoreData.md b/docs/ScoreCreationBuilderDataScoreData.md deleted file mode 100644 index b027f63..0000000 --- a/docs/ScoreCreationBuilderDataScoreData.md +++ /dev/null @@ -1,34 +0,0 @@ -# ScoreCreationBuilderDataScoreData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] -**use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] -**fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] -**nb_beats** | **float** | The number of beats in the measure | [optional] -**beat_type** | **float** | The duration of a beat in the measure | [optional] -**instruments** | [**List[ScoreCreationBuilderDataScoreDataInstrumentsInner]**](ScoreCreationBuilderDataScoreDataInstrumentsInner.md) | The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. | - -## Example - -```python -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData - -# TODO update the JSON string below -json = "{}" -# create an instance of ScoreCreationBuilderDataScoreData from a JSON string -score_creation_builder_data_score_data_instance = ScoreCreationBuilderDataScoreData.from_json(json) -# print the JSON string representation of the object -print ScoreCreationBuilderDataScoreData.to_json() - -# convert the object into a dict -score_creation_builder_data_score_data_dict = score_creation_builder_data_score_data_instance.to_dict() -# create an instance of ScoreCreationBuilderDataScoreData from a dict -score_creation_builder_data_score_data_form_dict = score_creation_builder_data_score_data.from_dict(score_creation_builder_data_score_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md b/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md deleted file mode 100644 index 7d0e25c..0000000 --- a/docs/ScoreCreationBuilderDataScoreDataInstrumentsInner.md +++ /dev/null @@ -1,33 +0,0 @@ -# ScoreCreationBuilderDataScoreDataInstrumentsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | -**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | -**long_name** | **str** | The full name of the instrument | [optional] -**short_name** | **str** | The abbreviation of the name of the instrument | [optional] -**has_quarter_tone** | **bool** | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] - -## Example - -```python -from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a JSON string -score_creation_builder_data_score_data_instruments_inner_instance = ScoreCreationBuilderDataScoreDataInstrumentsInner.from_json(json) -# print the JSON string representation of the object -print ScoreCreationBuilderDataScoreDataInstrumentsInner.to_json() - -# convert the object into a dict -score_creation_builder_data_score_data_instruments_inner_dict = score_creation_builder_data_score_data_instruments_inner_instance.to_dict() -# create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a dict -score_creation_builder_data_score_data_instruments_inner_form_dict = score_creation_builder_data_score_data_instruments_inner.from_dict(score_creation_builder_data_score_data_instruments_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ScoreLicense.md b/docs/ScoreLicense.md deleted file mode 100644 index 4e42188..0000000 --- a/docs/ScoreLicense.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScoreLicense - -License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TutteoProduct.md b/docs/TutteoProduct.md deleted file mode 100644 index 355771f..0000000 --- a/docs/TutteoProduct.md +++ /dev/null @@ -1,12 +0,0 @@ -# TutteoProduct - -The Tutteo product used by the user account - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AccountApi.md b/docs/reference/AccountApi.md similarity index 97% rename from docs/AccountApi.md rename to docs/reference/AccountApi.md index 91f225c..d18e50a 100644 --- a/docs/AccountApi.md +++ b/docs/reference/AccountApi.md @@ -12,7 +12,8 @@ Method | HTTP request | Description Get current user account -Get details about the current authenticated User. +Get details about the current authenticated User. + ### Example diff --git a/docs/reference/AddGroupUser200Response.md b/docs/reference/AddGroupUser200Response.md new file mode 100644 index 0000000..54e2831 --- /dev/null +++ b/docs/reference/AddGroupUser200Response.md @@ -0,0 +1,29 @@ +# AddGroupUser200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | User ID that was added | [optional] + +## Example + +```python +from flat_api.models.add_group_user200_response import AddGroupUser200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of AddGroupUser200Response from a JSON string +add_group_user200_response_instance = AddGroupUser200Response.from_json(json) +# print the JSON string representation of the object +print(AddGroupUser200Response.to_json()) + +# convert the object into a dict +add_group_user200_response_dict = add_group_user200_response_instance.to_dict() +# create an instance of AddGroupUser200Response from a dict +add_group_user200_response_from_dict = AddGroupUser200Response.from_dict(add_group_user200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/AddGroupUserRequest.md b/docs/reference/AddGroupUserRequest.md new file mode 100644 index 0000000..1ea7926 --- /dev/null +++ b/docs/reference/AddGroupUserRequest.md @@ -0,0 +1,29 @@ +# AddGroupUserRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | ID of the student to add | + +## Example + +```python +from flat_api.models.add_group_user_request import AddGroupUserRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddGroupUserRequest from a JSON string +add_group_user_request_instance = AddGroupUserRequest.from_json(json) +# print the JSON string representation of the object +print(AddGroupUserRequest.to_json()) + +# convert the object into a dict +add_group_user_request_dict = add_group_user_request_instance.to_dict() +# create an instance of AddGroupUserRequest from a dict +add_group_user_request_from_dict = AddGroupUserRequest.from_dict(add_group_user_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiAccessToken.md b/docs/reference/ApiAccessToken.md similarity index 92% rename from docs/ApiAccessToken.md rename to docs/reference/ApiAccessToken.md index 5689596..14d1422 100644 --- a/docs/ApiAccessToken.md +++ b/docs/reference/ApiAccessToken.md @@ -23,12 +23,12 @@ json = "{}" # create an instance of ApiAccessToken from a JSON string api_access_token_instance = ApiAccessToken.from_json(json) # print the JSON string representation of the object -print ApiAccessToken.to_json() +print(ApiAccessToken.to_json()) # convert the object into a dict api_access_token_dict = api_access_token_instance.to_dict() # create an instance of ApiAccessToken from a dict -api_access_token_form_dict = api_access_token.from_dict(api_access_token_dict) +api_access_token_from_dict = ApiAccessToken.from_dict(api_access_token_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AppScopes.md b/docs/reference/AppScopes.md new file mode 100644 index 0000000..fb17b22 --- /dev/null +++ b/docs/reference/AppScopes.md @@ -0,0 +1,55 @@ +# AppScopes + +Available scopes + +## Enum + +* `ACCOUNT_DOT_PUBLIC_PROFILE` (value: `'account.public_profile'`) + +* `ACCOUNT_DOT_EMAIL` (value: `'account.email'`) + +* `ACCOUNT_DOT_EDUCATION_PROFILE` (value: `'account.education_profile'`) + +* `SCORES_DOT_READONLY` (value: `'scores.readonly'`) + +* `SCORES_DOT_SOCIAL` (value: `'scores.social'`) + +* `SCORES` (value: `'scores'`) + +* `COLLECTIONS_DOT_READONLY` (value: `'collections.readonly'`) + +* `COLLECTIONS_DOT_ADD_SCORES` (value: `'collections.add_scores'`) + +* `COLLECTIONS` (value: `'collections'`) + +* `NOTIFICATIONS_DOT_READONLY` (value: `'notifications.readonly'`) + +* `EDU_DOT_RESOURCES` (value: `'edu.resources'`) + +* `EDU_DOT_RESOURCES_DOT_READONLY` (value: `'edu.resources.readonly'`) + +* `EDU_DOT_CLASSES` (value: `'edu.classes'`) + +* `EDU_DOT_CLASSES_DOT_READONLY` (value: `'edu.classes.readonly'`) + +* `EDU_DOT_ASSIGNMENTS` (value: `'edu.assignments'`) + +* `EDU_DOT_ASSIGNMENTS_DOT_READONLY` (value: `'edu.assignments.readonly'`) + +* `EDU_DOT_ADMIN` (value: `'edu.admin'`) + +* `EDU_DOT_ADMIN_DOT_LTI` (value: `'edu.admin.lti'`) + +* `EDU_DOT_ADMIN_DOT_LTI_DOT_READONLY` (value: `'edu.admin.lti.readonly'`) + +* `EDU_DOT_ADMIN_DOT_USERS` (value: `'edu.admin.users'`) + +* `EDU_DOT_ADMIN_DOT_USERS_DOT_READONLY` (value: `'edu.admin.users.readonly'`) + +* `TASKS_DOT_READONLY` (value: `'tasks.readonly'`) + +* `OMR` (value: `'omr'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/Assignment.md b/docs/reference/Assignment.md new file mode 100644 index 0000000..9b2bc79 --- /dev/null +++ b/docs/reference/Assignment.md @@ -0,0 +1,54 @@ +# Assignment + +Assignment details + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCapabilities**](AssignmentCapabilities.md) | | +**title** | **str** | Title of the assignment | +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] + +## Example + +```python +from flat_api.models.assignment import Assignment + +# TODO update the JSON string below +json = "{}" +# create an instance of Assignment from a JSON string +assignment_instance = Assignment.from_json(json) +# print the JSON string representation of the object +print(Assignment.to_json()) + +# convert the object into a dict +assignment_dict = assignment_instance.to_dict() +# create an instance of Assignment from a dict +assignment_from_dict = Assignment.from_dict(assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopyResponseCapabilities.md b/docs/reference/AssignmentCapabilities.md similarity index 51% rename from docs/AssignmentCopyResponseCapabilities.md rename to docs/reference/AssignmentCapabilities.md index 803c171..8e5df85 100644 --- a/docs/AssignmentCopyResponseCapabilities.md +++ b/docs/reference/AssignmentCapabilities.md @@ -1,4 +1,4 @@ -# AssignmentCopyResponseCapabilities +# AssignmentCapabilities Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. @@ -8,26 +8,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **can_edit** | **bool** | Whether the current user can edit the assignment | **can_publish_in_class** | **bool** | Whether this assignment can be published in a class | -**can_publish_in_class_error** | [**AssignmentCopyResponseCapabilitiesCanPublishInClassError**](AssignmentCopyResponseCapabilitiesCanPublishInClassError.md) | | [optional] +**can_publish_in_class_error** | [**AssignmentCapabilitiesCanPublishInClassError**](AssignmentCapabilitiesCanPublishInClassError.md) | | [optional] **can_archive** | **bool** | Whether the current user can archive the assignment | **can_unarchive** | **bool** | Whether the current user can unarchive the assignment | ## Example ```python -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_capabilities import AssignmentCapabilities # TODO update the JSON string below json = "{}" -# create an instance of AssignmentCopyResponseCapabilities from a JSON string -assignment_copy_response_capabilities_instance = AssignmentCopyResponseCapabilities.from_json(json) +# create an instance of AssignmentCapabilities from a JSON string +assignment_capabilities_instance = AssignmentCapabilities.from_json(json) # print the JSON string representation of the object -print AssignmentCopyResponseCapabilities.to_json() +print(AssignmentCapabilities.to_json()) # convert the object into a dict -assignment_copy_response_capabilities_dict = assignment_copy_response_capabilities_instance.to_dict() -# create an instance of AssignmentCopyResponseCapabilities from a dict -assignment_copy_response_capabilities_form_dict = assignment_copy_response_capabilities.from_dict(assignment_copy_response_capabilities_dict) +assignment_capabilities_dict = assignment_capabilities_instance.to_dict() +# create an instance of AssignmentCapabilities from a dict +assignment_capabilities_from_dict = AssignmentCapabilities.from_dict(assignment_capabilities_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AssignmentCapabilitiesCanPublishInClassError.md b/docs/reference/AssignmentCapabilitiesCanPublishInClassError.md new file mode 100644 index 0000000..3041412 --- /dev/null +++ b/docs/reference/AssignmentCapabilitiesCanPublishInClassError.md @@ -0,0 +1,31 @@ +# AssignmentCapabilitiesCanPublishInClassError + +If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | A corresponding code for this error | +**message** | **str** | A printable and localized message for this error | + +## Example + +```python +from flat_api.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCapabilitiesCanPublishInClassError from a JSON string +assignment_capabilities_can_publish_in_class_error_instance = AssignmentCapabilitiesCanPublishInClassError.from_json(json) +# print the JSON string representation of the object +print(AssignmentCapabilitiesCanPublishInClassError.to_json()) + +# convert the object into a dict +assignment_capabilities_can_publish_in_class_error_dict = assignment_capabilities_can_publish_in_class_error_instance.to_dict() +# create an instance of AssignmentCapabilitiesCanPublishInClassError from a dict +assignment_capabilities_can_publish_in_class_error_from_dict = AssignmentCapabilitiesCanPublishInClassError.from_dict(assignment_capabilities_can_publish_in_class_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentCopy.md b/docs/reference/AssignmentCopy.md similarity index 93% rename from docs/AssignmentCopy.md rename to docs/reference/AssignmentCopy.md index 6dae1a9..2becab4 100644 --- a/docs/AssignmentCopy.md +++ b/docs/reference/AssignmentCopy.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of AssignmentCopy from a JSON string assignment_copy_instance = AssignmentCopy.from_json(json) # print the JSON string representation of the object -print AssignmentCopy.to_json() +print(AssignmentCopy.to_json()) # convert the object into a dict assignment_copy_dict = assignment_copy_instance.to_dict() # create an instance of AssignmentCopy from a dict -assignment_copy_form_dict = assignment_copy.from_dict(assignment_copy_dict) +assignment_copy_from_dict = AssignmentCopy.from_dict(assignment_copy_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AssignmentCopyResponse.md b/docs/reference/AssignmentCopyResponse.md new file mode 100644 index 0000000..32e16f0 --- /dev/null +++ b/docs/reference/AssignmentCopyResponse.md @@ -0,0 +1,54 @@ +# AssignmentCopyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCapabilities**](AssignmentCapabilities.md) | | +**title** | **str** | Title of the assignment | +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] +**resource** | **str** | If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource. | [optional] + +## Example + +```python +from flat_api.models.assignment_copy_response import AssignmentCopyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyResponse from a JSON string +assignment_copy_response_instance = AssignmentCopyResponse.from_json(json) +# print the JSON string representation of the object +print(AssignmentCopyResponse.to_json()) + +# convert the object into a dict +assignment_copy_response_dict = assignment_copy_response_instance.to_dict() +# create an instance of AssignmentCopyResponse from a dict +assignment_copy_response_from_dict = AssignmentCopyResponse.from_dict(assignment_copy_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/AssignmentCopyToClass.md b/docs/reference/AssignmentCopyToClass.md new file mode 100644 index 0000000..d964d93 --- /dev/null +++ b/docs/reference/AssignmentCopyToClass.md @@ -0,0 +1,32 @@ +# AssignmentCopyToClass + +Copy the assignment to a class + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classroom** | **str** | The destination classroom where the assignment will be copied | +**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] + +## Example + +```python +from flat_api.models.assignment_copy_to_class import AssignmentCopyToClass + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyToClass from a JSON string +assignment_copy_to_class_instance = AssignmentCopyToClass.from_json(json) +# print the JSON string representation of the object +print(AssignmentCopyToClass.to_json()) + +# convert the object into a dict +assignment_copy_to_class_dict = assignment_copy_to_class_instance.to_dict() +# create an instance of AssignmentCopyToClass from a dict +assignment_copy_to_class_from_dict = AssignmentCopyToClass.from_dict(assignment_copy_to_class_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/AssignmentCopyToResourceLibrary.md b/docs/reference/AssignmentCopyToResourceLibrary.md new file mode 100644 index 0000000..2eab45e --- /dev/null +++ b/docs/reference/AssignmentCopyToResourceLibrary.md @@ -0,0 +1,31 @@ +# AssignmentCopyToResourceLibrary + +Copy the assignment to the EDU Resource Library + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | +**verify_if_not_already_in_resource_library** | **bool** | Option to check if the assignment is already in Resource Library | [optional] + +## Example + +```python +from flat_api.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentCopyToResourceLibrary from a JSON string +assignment_copy_to_resource_library_instance = AssignmentCopyToResourceLibrary.from_json(json) +# print the JSON string representation of the object +print(AssignmentCopyToResourceLibrary.to_json()) + +# convert the object into a dict +assignment_copy_to_resource_library_dict = assignment_copy_to_resource_library_instance.to_dict() +# create an instance of AssignmentCopyToResourceLibrary from a dict +assignment_copy_to_resource_library_from_dict = AssignmentCopyToResourceLibrary.from_dict(assignment_copy_to_resource_library_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/AssignmentGroup.md b/docs/reference/AssignmentGroup.md new file mode 100644 index 0000000..35baddf --- /dev/null +++ b/docs/reference/AssignmentGroup.md @@ -0,0 +1,33 @@ +# AssignmentGroup + +A group assigned to an assignment for shared writing assignments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the group | +**name** | **str** | The display name of the group | +**parent** | **str** | The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted. | [optional] +**members** | **List[str]** | Array of user IDs that are members of this group | + +## Example + +```python +from flat_api.models.assignment_group import AssignmentGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentGroup from a JSON string +assignment_group_instance = AssignmentGroup.from_json(json) +# print the JSON string representation of the object +print(AssignmentGroup.to_json()) + +# convert the object into a dict +assignment_group_dict = assignment_group_instance.to_dict() +# create an instance of AssignmentGroup from a dict +assignment_group_from_dict = AssignmentGroup.from_dict(assignment_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmission.md b/docs/reference/AssignmentSubmission.md similarity index 91% rename from docs/AssignmentSubmission.md rename to docs/reference/AssignmentSubmission.md index 046a326..64a4665 100644 --- a/docs/AssignmentSubmission.md +++ b/docs/reference/AssignmentSubmission.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] **max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] **exercises_ids** | **List[str]** | The ids of exercises when they need to be in a specific order | [optional] -**playback** | [**List[AssignmentSubmissionPlaybackInner]**](AssignmentSubmissionPlaybackInner.md) | | +**playback** | [**List[AssignmentSubmissionPlayback]**](AssignmentSubmissionPlayback.md) | | **comments** | [**AssignmentSubmissionComments**](AssignmentSubmissionComments.md) | | **google_classroom** | [**GoogleClassroomSubmission**](GoogleClassroomSubmission.md) | | [optional] **microsoft_graph** | [**MicrosoftGraphSubmission**](MicrosoftGraphSubmission.md) | | [optional] @@ -36,12 +36,12 @@ json = "{}" # create an instance of AssignmentSubmission from a JSON string assignment_submission_instance = AssignmentSubmission.from_json(json) # print the JSON string representation of the object -print AssignmentSubmission.to_json() +print(AssignmentSubmission.to_json()) # convert the object into a dict assignment_submission_dict = assignment_submission_instance.to_dict() # create an instance of AssignmentSubmission from a dict -assignment_submission_form_dict = assignment_submission.from_dict(assignment_submission_dict) +assignment_submission_from_dict = AssignmentSubmission.from_dict(assignment_submission_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionComment.md b/docs/reference/AssignmentSubmissionComment.md similarity index 89% rename from docs/AssignmentSubmissionComment.md rename to docs/reference/AssignmentSubmissionComment.md index ee903be..5944b32 100644 --- a/docs/AssignmentSubmissionComment.md +++ b/docs/reference/AssignmentSubmissionComment.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of AssignmentSubmissionComment from a JSON string assignment_submission_comment_instance = AssignmentSubmissionComment.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionComment.to_json() +print(AssignmentSubmissionComment.to_json()) # convert the object into a dict assignment_submission_comment_dict = assignment_submission_comment_instance.to_dict() # create an instance of AssignmentSubmissionComment from a dict -assignment_submission_comment_form_dict = assignment_submission_comment.from_dict(assignment_submission_comment_dict) +assignment_submission_comment_from_dict = AssignmentSubmissionComment.from_dict(assignment_submission_comment_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionCommentCreation.md b/docs/reference/AssignmentSubmissionCommentCreation.md similarity index 83% rename from docs/AssignmentSubmissionCommentCreation.md rename to docs/reference/AssignmentSubmissionCommentCreation.md index 68a7471..9956c8b 100644 --- a/docs/AssignmentSubmissionCommentCreation.md +++ b/docs/reference/AssignmentSubmissionCommentCreation.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of AssignmentSubmissionCommentCreation from a JSON string assignment_submission_comment_creation_instance = AssignmentSubmissionCommentCreation.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionCommentCreation.to_json() +print(AssignmentSubmissionCommentCreation.to_json()) # convert the object into a dict assignment_submission_comment_creation_dict = assignment_submission_comment_creation_instance.to_dict() # create an instance of AssignmentSubmissionCommentCreation from a dict -assignment_submission_comment_creation_form_dict = assignment_submission_comment_creation.from_dict(assignment_submission_comment_creation_dict) +assignment_submission_comment_creation_from_dict = AssignmentSubmissionCommentCreation.from_dict(assignment_submission_comment_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionComments.md b/docs/reference/AssignmentSubmissionComments.md similarity index 86% rename from docs/AssignmentSubmissionComments.md rename to docs/reference/AssignmentSubmissionComments.md index 900dc34..3f37ff6 100644 --- a/docs/AssignmentSubmissionComments.md +++ b/docs/reference/AssignmentSubmissionComments.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of AssignmentSubmissionComments from a JSON string assignment_submission_comments_instance = AssignmentSubmissionComments.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionComments.to_json() +print(AssignmentSubmissionComments.to_json()) # convert the object into a dict assignment_submission_comments_dict = assignment_submission_comments_instance.to_dict() # create an instance of AssignmentSubmissionComments from a dict -assignment_submission_comments_form_dict = assignment_submission_comments.from_dict(assignment_submission_comments_dict) +assignment_submission_comments_from_dict = AssignmentSubmissionComments.from_dict(assignment_submission_comments_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionHistory.md b/docs/reference/AssignmentSubmissionHistory.md similarity index 93% rename from docs/AssignmentSubmissionHistory.md rename to docs/reference/AssignmentSubmissionHistory.md index d3a3b57..4fe0149 100644 --- a/docs/AssignmentSubmissionHistory.md +++ b/docs/reference/AssignmentSubmissionHistory.md @@ -30,12 +30,12 @@ json = "{}" # create an instance of AssignmentSubmissionHistory from a JSON string assignment_submission_history_instance = AssignmentSubmissionHistory.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionHistory.to_json() +print(AssignmentSubmissionHistory.to_json()) # convert the object into a dict assignment_submission_history_dict = assignment_submission_history_instance.to_dict() # create an instance of AssignmentSubmissionHistory from a dict -assignment_submission_history_form_dict = assignment_submission_history.from_dict(assignment_submission_history_dict) +assignment_submission_history_from_dict = AssignmentSubmissionHistory.from_dict(assignment_submission_history_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionHistoryAttachment.md b/docs/reference/AssignmentSubmissionHistoryAttachment.md similarity index 85% rename from docs/AssignmentSubmissionHistoryAttachment.md rename to docs/reference/AssignmentSubmissionHistoryAttachment.md index 047e17f..cda916f 100644 --- a/docs/AssignmentSubmissionHistoryAttachment.md +++ b/docs/reference/AssignmentSubmissionHistoryAttachment.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of AssignmentSubmissionHistoryAttachment from a JSON string assignment_submission_history_attachment_instance = AssignmentSubmissionHistoryAttachment.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionHistoryAttachment.to_json() +print(AssignmentSubmissionHistoryAttachment.to_json()) # convert the object into a dict assignment_submission_history_attachment_dict = assignment_submission_history_attachment_instance.to_dict() # create an instance of AssignmentSubmissionHistoryAttachment from a dict -assignment_submission_history_attachment_form_dict = assignment_submission_history_attachment.from_dict(assignment_submission_history_attachment_dict) +assignment_submission_history_attachment_from_dict = AssignmentSubmissionHistoryAttachment.from_dict(assignment_submission_history_attachment_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionHistoryState.md b/docs/reference/AssignmentSubmissionHistoryState.md similarity index 57% rename from docs/AssignmentSubmissionHistoryState.md rename to docs/reference/AssignmentSubmissionHistoryState.md index 93bd1c7..c9f2a33 100644 --- a/docs/AssignmentSubmissionHistoryState.md +++ b/docs/reference/AssignmentSubmissionHistoryState.md @@ -2,10 +2,17 @@ State of the submission history -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `CREATED` (value: `'created'`) + +* `TURNEDIN` (value: `'turnedIn'`) + +* `RETURNED` (value: `'returned'`) + +* `GRADED` (value: `'graded'`) + +* `RESET` (value: `'reset'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssignmentSubmissionLti.md b/docs/reference/AssignmentSubmissionLti.md similarity index 66% rename from docs/AssignmentSubmissionLti.md rename to docs/reference/AssignmentSubmissionLti.md index a7068d6..ccc5e59 100644 --- a/docs/AssignmentSubmissionLti.md +++ b/docs/reference/AssignmentSubmissionLti.md @@ -1,11 +1,13 @@ # AssignmentSubmissionLti +If set, this submission has a linked LTI 1.3 AGS or LTI 1.1 Outcomes ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourcedid** | **str** | The sourcedid of the LTI submission when using LTI Outcomes | +**grade_service** | **str** | The kind of grading service available for this submission: - `ags2p0`: LTI 1.3 Assignment and Grade Services 2.0 - `outcomes1p1`: LTI 1.1 Outcomes 1.1 | +**sourcedid** | **str** | The sourcedid of the LTI submission when using LTI Outcomes | [optional] ## Example @@ -17,12 +19,12 @@ json = "{}" # create an instance of AssignmentSubmissionLti from a JSON string assignment_submission_lti_instance = AssignmentSubmissionLti.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionLti.to_json() +print(AssignmentSubmissionLti.to_json()) # convert the object into a dict assignment_submission_lti_dict = assignment_submission_lti_instance.to_dict() # create an instance of AssignmentSubmissionLti from a dict -assignment_submission_lti_form_dict = assignment_submission_lti.from_dict(assignment_submission_lti_dict) +assignment_submission_lti_from_dict = AssignmentSubmissionLti.from_dict(assignment_submission_lti_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AssignmentSubmissionPlayback.md b/docs/reference/AssignmentSubmissionPlayback.md new file mode 100644 index 0000000..b82e46b --- /dev/null +++ b/docs/reference/AssignmentSubmissionPlayback.md @@ -0,0 +1,31 @@ +# AssignmentSubmissionPlayback + +Playback used by a student for an assignment submission. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **str** | The score unique identifier | +**nb_play_attempt** | **float** | Number of times the score was played | + +## Example + +```python +from flat_api.models.assignment_submission_playback import AssignmentSubmissionPlayback + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentSubmissionPlayback from a JSON string +assignment_submission_playback_instance = AssignmentSubmissionPlayback.from_json(json) +# print the JSON string representation of the object +print(AssignmentSubmissionPlayback.to_json()) + +# convert the object into a dict +assignment_submission_playback_dict = assignment_submission_playback_instance.to_dict() +# create an instance of AssignmentSubmissionPlayback from a dict +assignment_submission_playback_from_dict = AssignmentSubmissionPlayback.from_dict(assignment_submission_playback_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionState.md b/docs/reference/AssignmentSubmissionState.md similarity index 60% rename from docs/AssignmentSubmissionState.md rename to docs/reference/AssignmentSubmissionState.md index 950f780..8477fcd 100644 --- a/docs/AssignmentSubmissionState.md +++ b/docs/reference/AssignmentSubmissionState.md @@ -2,10 +2,15 @@ State of the submission -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `CREATED` (value: `'created'`) + +* `TURNEDIN` (value: `'turnedIn'`) + +* `RETURNED` (value: `'returned'`) + +* `GRADED` (value: `'graded'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AssignmentSubmissionStudentsMode.md b/docs/reference/AssignmentSubmissionStudentsMode.md new file mode 100644 index 0000000..1457272 --- /dev/null +++ b/docs/reference/AssignmentSubmissionStudentsMode.md @@ -0,0 +1,13 @@ +# AssignmentSubmissionStudentsMode + +Submission mode for assignments: - \"single\": Individual submissions (default) - \"group\": Group submissions (for shared writing assignments) + +## Enum + +* `SINGLE` (value: `'single'`) + +* `GROUP` (value: `'group'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignmentSubmissionUpdate.md b/docs/reference/AssignmentSubmissionUpdate.md similarity index 85% rename from docs/AssignmentSubmissionUpdate.md rename to docs/reference/AssignmentSubmissionUpdate.md index 71c8c69..57c1166 100644 --- a/docs/AssignmentSubmissionUpdate.md +++ b/docs/reference/AssignmentSubmissionUpdate.md @@ -7,6 +7,7 @@ Assignment Submission creation Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] +**playback** | [**List[AssignmentSubmissionPlayback]**](AssignmentSubmissionPlayback.md) | | [optional] **submit** | **bool** | If `true`, the submission will be marked as done | [optional] **draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] **grade** | **float** | Optional grade. If unset, no grade was set. | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of AssignmentSubmissionUpdate from a JSON string assignment_submission_update_instance = AssignmentSubmissionUpdate.from_json(json) # print the JSON string representation of the object -print AssignmentSubmissionUpdate.to_json() +print(AssignmentSubmissionUpdate.to_json()) # convert the object into a dict assignment_submission_update_dict = assignment_submission_update_instance.to_dict() # create an instance of AssignmentSubmissionUpdate from a dict -assignment_submission_update_form_dict = assignment_submission_update.from_dict(assignment_submission_update_dict) +assignment_submission_update_from_dict = AssignmentSubmissionUpdate.from_dict(assignment_submission_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/AssignmentType.md b/docs/reference/AssignmentType.md new file mode 100644 index 0000000..38a4606 --- /dev/null +++ b/docs/reference/AssignmentType.md @@ -0,0 +1,23 @@ +# AssignmentType + +Type of the assignment + +## Enum + +* `NONE` (value: `'none'`) + +* `NEWSCORE` (value: `'newScore'`) + +* `SCORETEMPLATE` (value: `'scoreTemplate'`) + +* `SHAREDWRITING` (value: `'sharedWriting'`) + +* `WORKSHEET` (value: `'worksheet'`) + +* `WORKSHEETTEXT` (value: `'worksheetText'`) + +* `PERFORMANCE` (value: `'performance'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/AssignmentUpdate.md b/docs/reference/AssignmentUpdate.md new file mode 100644 index 0000000..8de92e4 --- /dev/null +++ b/docs/reference/AssignmentUpdate.md @@ -0,0 +1,51 @@ +# AssignmentUpdate + +Assignment Resource Editing + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions (plain text) | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] +**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] + +## Example + +```python +from flat_api.models.assignment_update import AssignmentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignmentUpdate from a JSON string +assignment_update_instance = AssignmentUpdate.from_json(json) +# print the JSON string representation of the object +print(AssignmentUpdate.to_json()) + +# convert the object into a dict +assignment_update_dict = assignment_update_instance.to_dict() +# create an instance of AssignmentUpdate from a dict +assignment_update_from_dict = AssignmentUpdate.from_dict(assignment_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassApi.md b/docs/reference/ClassApi.md similarity index 87% rename from docs/ClassApi.md rename to docs/reference/ClassApi.md index b9eaabe..94a9039 100644 --- a/docs/ClassApi.md +++ b/docs/reference/ClassApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**create_class_assignment**](ClassApi.md#create_class_assignment) | **POST** /classes/{class}/assignments | Assignment creation [**create_submission**](ClassApi.md#create_submission) | **PUT** /classes/{class}/assignments/{assignment}/submissions | Create or edit a submission [**create_test_student_account**](ClassApi.md#create_test_student_account) | **POST** /classes/{class}/testStudent | Create a test student account +[**delete_assignment**](ClassApi.md#delete_assignment) | **DELETE** /classes/{class}/assignments/{assignment} | Delete an assignment [**delete_class_user**](ClassApi.md#delete_class_user) | **DELETE** /classes/{class}/users/{user} | Remove a user from the class [**delete_submission**](ClassApi.md#delete_submission) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission} | Reset a submission [**delete_submission_comment**](ClassApi.md#delete_submission_comment) | **DELETE** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Delete a feedback comment to a submission @@ -20,6 +21,7 @@ Method | HTTP request | Description [**enroll_class**](ClassApi.md#enroll_class) | **POST** /classes/enroll/{enrollmentCode} | Join a class [**export_submissions_reviews_as_csv**](ClassApi.md#export_submissions_reviews_as_csv) | **GET** /classes/{class}/assignments/{assignment}/submissions/csv | CSV Grades exports [**export_submissions_reviews_as_excel**](ClassApi.md#export_submissions_reviews_as_excel) | **GET** /classes/{class}/assignments/{assignment}/submissions/excel | Excel Grades exports +[**get_assignment**](ClassApi.md#get_assignment) | **GET** /classes/{class}/assignments/{assignment} | Get an assignment [**get_class**](ClassApi.md#get_class) | **GET** /classes/{class} | Get the details of a single class [**get_score_submissions**](ClassApi.md#get_score_submissions) | **GET** /scores/{score}/submissions | List submissions related to the score [**get_submission**](ClassApi.md#get_submission) | **GET** /classes/{class}/assignments/{assignment}/submissions/{submission} | Get a student submission @@ -33,6 +35,7 @@ Method | HTTP request | Description [**unarchive_assignment**](ClassApi.md#unarchive_assignment) | **DELETE** /classes/{class}/assignments/{assignment}/archive | Unarchive the assignment. [**unarchive_class**](ClassApi.md#unarchive_class) | **DELETE** /classes/{class}/archive | Unarchive the class [**update_class**](ClassApi.md#update_class) | **PUT** /classes/{class} | Update the class +[**update_class_assignment**](ClassApi.md#update_class_assignment) | **PUT** /classes/{class}/assignments/{assignment} | Update an assignment [**update_submission_comment**](ClassApi.md#update_submission_comment) | **PUT** /classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment} | Update a feedback comment to a submission @@ -41,7 +44,8 @@ Method | HTTP request | Description Activate the class -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. +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. + ### Example @@ -117,7 +121,12 @@ Name | Type | Description | Notes Add a user to the class -This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. +This method can be used by a teacher of the class to enroll another Flat user into the class. + +Only users that are part of your Organization can be enrolled in a class of this same Organization. + +When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + ### Example @@ -192,7 +201,8 @@ void (empty response body) Archive the assignment -Archive the assignment +Archive the assignment + ### Example @@ -270,7 +280,8 @@ Name | Type | Description | Notes Archive the class -Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. +Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + ### Example @@ -346,7 +357,12 @@ Name | Type | Description | Notes Copy an assignment -Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. +Copy an assignment to a specified class or the resource library + +For class assignments: +- If the original assignment has a due date in the past, this new assignment will be created without a due date. +- If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + ### Example @@ -427,7 +443,14 @@ Name | Type | Description | Notes Create a new class -Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. +Classrooms on Flat allow you to create activities with assignments and post content to a specific group. + +When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. + +If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. + +You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + ### Example @@ -505,7 +528,10 @@ Name | Type | Description | Notes Assignment creation -Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. +Use this method as a teacher to create and post a new assignment to a class. + +If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + ### Example @@ -584,7 +610,10 @@ Name | Type | Description | Notes Create or edit a submission -Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. +Use this method as a student to create, update and submit a submission related to an assignment. +Students can only set `attachments` and `submit`. +Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + ### Example @@ -665,7 +694,12 @@ Name | Type | Description | Notes Create a test student account -Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. +Test students account can be created by teachers an admin and be used to experiment the assignments. + +- They are automatically added to the class. +- They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). +- These accounts don't use a user license. + ### Example @@ -738,12 +772,101 @@ Name | Type | Description | Notes [[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) +# **delete_assignment** +> delete_assignment(var_class, assignment) + +Delete an assignment + +Delete an assignment. This cannot be undone, and it removes a good deal more than the +assignment itself: every submission made against it, the students' dedicated copies of the +attached scores, the related class stream posts and notifications, and the editor toolset. + +When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is +deleted there too. + +Requires the teacher role on the class, and the class must not be archived. + +`archiveAssignment` is almost always what you want instead: it takes the assignment out of +the class stream and keeps the submissions and their grades. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + + try: + # Delete an assignment + api_instance.delete_assignment(var_class, assignment) + except Exception as e: + print("Exception when calling ClassApi->delete_assignment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The assignment has been deleted | - | +**0** | Error | - | + +[[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) + # **delete_class_user** > delete_class_user(var_class, user) Remove a user from the class -This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. +This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. + +Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + ### Example @@ -818,7 +941,8 @@ void (empty response body) Reset a submission -Use this method as a teacher to reset a submission and allow student to start over the assignment +Use this method as a teacher to reset a submission and allow student to start over the assignment + ### Example @@ -975,7 +1099,9 @@ void (empty response body) Edit a submission -Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` +Use this method as a teacher to update the different submission and give feedback. +Teachers can only set `return`, `draftGrade` and `grade` + ### Example @@ -1058,7 +1184,10 @@ Name | Type | Description | Notes Join a class -Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. +Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. + +Flat will automatically add the user to the corresponding class group based on this role in the organization. + ### Example @@ -1130,7 +1259,7 @@ Name | Type | Description | Notes [[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) # **export_submissions_reviews_as_csv** -> bytearray export_submissions_reviews_as_csv(var_class, assignment) +> bytes export_submissions_reviews_as_csv(var_class, assignment) CSV Grades exports @@ -1186,7 +1315,7 @@ Name | Type | Description | Notes ### Return type -**bytearray** +**bytes** ### Authorization @@ -1207,7 +1336,7 @@ Name | Type | Description | Notes [[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) # **export_submissions_reviews_as_excel** -> bytearray export_submissions_reviews_as_excel(var_class, assignment) +> bytes export_submissions_reviews_as_excel(var_class, assignment) Excel Grades exports @@ -1263,7 +1392,7 @@ Name | Type | Description | Notes ### Return type -**bytearray** +**bytes** ### Authorization @@ -1283,6 +1412,89 @@ Name | Type | Description | Notes [[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) +# **get_assignment** +> Assignment get_assignment(var_class, assignment) + +Get an assignment + +Retrieve a single assignment, including its attachments, its toolset and its grading +settings. Use `listAssignments` to enumerate the assignments of a class. + +A teacher of the class sees the assignment as authored. A student sees the same document +with the teacher-only fields omitted, `teacherInstructions` among them. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.assignment import Assignment +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + + try: + # Get an assignment + api_response = api_instance.get_assignment(var_class, assignment) + print("The response of ClassApi->get_assignment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClassApi->get_assignment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment has been retrieved | - | +**0** | Error | - | + +[[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) + # **get_class** > ClassDetails get_class(var_class) @@ -1362,7 +1574,8 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -1596,7 +1809,8 @@ Name | Type | Description | Notes Get the history of the submission -For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. +For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + ### Example @@ -1828,7 +2042,8 @@ Name | Type | Description | Notes List the submissions for a student -Use this method as a teacher to list all the assignment submissions sent by a student of the class +Use this method as a teacher to list all the assignment submissions sent by a student of the class + ### Example @@ -2063,7 +2278,8 @@ Name | Type | Description | Notes Unarchive the assignment. -Mark the assignment as `active`. +Mark the assignment as `active`. + ### Example @@ -2141,7 +2357,8 @@ Name | Type | Description | Notes Unarchive the class -Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. +Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + ### Example @@ -2217,7 +2434,8 @@ Name | Type | Description | Notes Update the class -Update the meta information of the class +Update the meta information of the class + ### Example @@ -2291,6 +2509,96 @@ Name | Type | Description | Notes [[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) +# **update_class_assignment** +> Assignment update_class_assignment(var_class, assignment, body) + +Update an assignment + +Update an assignment. Only the properties present in the request body are modified, so a +partial body leaves everything else as it was. `attachments` is the exception: when present +it replaces the whole list. + +Requires the teacher role on the class. The class must not be archived, and an assignment +that is already `active` cannot be moved back to `draft`. + +Editing an assignment that students have already started does not reset their submissions. +To take an assignment out of circulation while keeping the work, use `archiveAssignment`. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.assignment import Assignment +from flat_api.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.ClassApi(api_client) + var_class = 'var_class_example' # str | Unique identifier of the class + assignment = 'assignment_example' # str | Unique identifier of the assignment + body = flat_api.ClassAssignmentUpdate() # ClassAssignmentUpdate | + + try: + # Update an assignment + api_response = api_instance.update_class_assignment(var_class, assignment, body) + print("The response of ClassApi->update_class_assignment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClassApi->update_class_assignment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **var_class** | **str**| Unique identifier of the class | + **assignment** | **str**| Unique identifier of the assignment | + **body** | [**ClassAssignmentUpdate**](ClassAssignmentUpdate.md)| | + +### Return type + +[**Assignment**](Assignment.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assignment has been updated | - | +**0** | Error | - | + +[[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) + # **update_submission_comment** > AssignmentSubmissionComment update_submission_comment(var_class, assignment, submission, comment, assignment_submission_comment_creation) diff --git a/docs/reference/ClassAssignment.md b/docs/reference/ClassAssignment.md new file mode 100644 index 0000000..83d60d9 --- /dev/null +++ b/docs/reference/ClassAssignment.md @@ -0,0 +1,69 @@ +# ClassAssignment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCapabilities**](AssignmentCapabilities.md) | | +**title** | **str** | Title of the assignment | +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] +**creator** | **str** | The User unique identifier of the creator of this assignment | [optional] +**state** | **str** | State of the assignment | +**classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] +**creation_date** | **datetime** | The creation date of this assignment | +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] +**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] +**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] +**assigned_groups** | [**List[AssignmentGroup]**](AssignmentGroup.md) | Groups that have access to the assignment (for shared writing assignments) | [optional] +**submissions** | [**List[AssignmentSubmission]**](AssignmentSubmission.md) | | +**google_classroom** | [**GoogleClassroomCoursework**](GoogleClassroomCoursework.md) | | [optional] +**microsoft_graph** | [**MicrosoftGraphAssignment**](MicrosoftGraphAssignment.md) | | [optional] +**mfc** | [**ClassAssignmentAllOfMfc**](ClassAssignmentAllOfMfc.md) | | [optional] +**canvas** | [**ClassAssignmentAllOfCanvas**](ClassAssignmentAllOfCanvas.md) | | [optional] +**lti** | [**ClassAssignmentAllOfLti**](ClassAssignmentAllOfLti.md) | | [optional] +**issue** | **str** | Detected issue for this assignment | [optional] + +## Example + +```python +from flat_api.models.class_assignment import ClassAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignment from a JSON string +class_assignment_instance = ClassAssignment.from_json(json) +# print the JSON string representation of the object +print(ClassAssignment.to_json()) + +# convert the object into a dict +class_assignment_dict = class_assignment_instance.to_dict() +# create an instance of ClassAssignment from a dict +class_assignment_from_dict = ClassAssignment.from_dict(class_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentCanvas.md b/docs/reference/ClassAssignmentAllOfCanvas.md similarity index 51% rename from docs/ClassAssignmentCanvas.md rename to docs/reference/ClassAssignmentAllOfCanvas.md index f659c0d..31a09c1 100644 --- a/docs/ClassAssignmentCanvas.md +++ b/docs/reference/ClassAssignmentAllOfCanvas.md @@ -1,4 +1,4 @@ -# ClassAssignmentCanvas +# ClassAssignmentAllOfCanvas A Canvas LMS assignment @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas +from flat_api.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas # TODO update the JSON string below json = "{}" -# create an instance of ClassAssignmentCanvas from a JSON string -class_assignment_canvas_instance = ClassAssignmentCanvas.from_json(json) +# create an instance of ClassAssignmentAllOfCanvas from a JSON string +class_assignment_all_of_canvas_instance = ClassAssignmentAllOfCanvas.from_json(json) # print the JSON string representation of the object -print ClassAssignmentCanvas.to_json() +print(ClassAssignmentAllOfCanvas.to_json()) # convert the object into a dict -class_assignment_canvas_dict = class_assignment_canvas_instance.to_dict() -# create an instance of ClassAssignmentCanvas from a dict -class_assignment_canvas_form_dict = class_assignment_canvas.from_dict(class_assignment_canvas_dict) +class_assignment_all_of_canvas_dict = class_assignment_all_of_canvas_instance.to_dict() +# create an instance of ClassAssignmentAllOfCanvas from a dict +class_assignment_all_of_canvas_from_dict = ClassAssignmentAllOfCanvas.from_dict(class_assignment_all_of_canvas_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ClassAssignmentAllOfLti.md b/docs/reference/ClassAssignmentAllOfLti.md new file mode 100644 index 0000000..faa6978 --- /dev/null +++ b/docs/reference/ClassAssignmentAllOfLti.md @@ -0,0 +1,30 @@ +# ClassAssignmentAllOfLti + +An LTI assignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Resource ID in the LMS | [optional] + +## Example + +```python +from flat_api.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentAllOfLti from a JSON string +class_assignment_all_of_lti_instance = ClassAssignmentAllOfLti.from_json(json) +# print the JSON string representation of the object +print(ClassAssignmentAllOfLti.to_json()) + +# convert the object into a dict +class_assignment_all_of_lti_dict = class_assignment_all_of_lti_instance.to_dict() +# create an instance of ClassAssignmentAllOfLti from a dict +class_assignment_all_of_lti_from_dict = ClassAssignmentAllOfLti.from_dict(class_assignment_all_of_lti_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAssignmentMfc.md b/docs/reference/ClassAssignmentAllOfMfc.md similarity index 53% rename from docs/ClassAssignmentMfc.md rename to docs/reference/ClassAssignmentAllOfMfc.md index b7aef23..7347513 100644 --- a/docs/ClassAssignmentMfc.md +++ b/docs/reference/ClassAssignmentAllOfMfc.md @@ -1,4 +1,4 @@ -# ClassAssignmentMfc +# ClassAssignmentAllOfMfc A MusicFirst Classroom assignment @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc # TODO update the JSON string below json = "{}" -# create an instance of ClassAssignmentMfc from a JSON string -class_assignment_mfc_instance = ClassAssignmentMfc.from_json(json) +# create an instance of ClassAssignmentAllOfMfc from a JSON string +class_assignment_all_of_mfc_instance = ClassAssignmentAllOfMfc.from_json(json) # print the JSON string representation of the object -print ClassAssignmentMfc.to_json() +print(ClassAssignmentAllOfMfc.to_json()) # convert the object into a dict -class_assignment_mfc_dict = class_assignment_mfc_instance.to_dict() -# create an instance of ClassAssignmentMfc from a dict -class_assignment_mfc_form_dict = class_assignment_mfc.from_dict(class_assignment_mfc_dict) +class_assignment_all_of_mfc_dict = class_assignment_all_of_mfc_instance.to_dict() +# create an instance of ClassAssignmentAllOfMfc from a dict +class_assignment_all_of_mfc_from_dict = ClassAssignmentAllOfMfc.from_dict(class_assignment_all_of_mfc_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ClassAssignmentUpdate.md b/docs/reference/ClassAssignmentUpdate.md new file mode 100644 index 0000000..222228a --- /dev/null +++ b/docs/reference/ClassAssignmentUpdate.md @@ -0,0 +1,58 @@ +# ClassAssignmentUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] +**title** | **str** | Title of the assignment | [optional] +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions (plain text) | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] +**attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] +**state** | **str** | State of the assignment | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] +**scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] +**google_classroom** | [**ClassAssignmentUpdateAllOfGoogleClassroom**](ClassAssignmentUpdateAllOfGoogleClassroom.md) | | [optional] +**microsoft_graph** | [**ClassAssignmentUpdateAllOfMicrosoftGraph**](ClassAssignmentUpdateAllOfMicrosoftGraph.md) | | [optional] +**assignee_mode** | **str** | Possible modes of assigning assignments | [optional] +**assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] +**class_group_ids** | **List[str]** | Optional list of specific class group IDs to apply to the assignment. When transitioning to active state with group submission mode: - If provided: Only these specific groups will be applied - If not provided: All class groups will be applied, or randomized groups created if none exist | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update import ClassAssignmentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdate from a JSON string +class_assignment_update_instance = ClassAssignmentUpdate.from_json(json) +# print the JSON string representation of the object +print(ClassAssignmentUpdate.to_json()) + +# convert the object into a dict +class_assignment_update_dict = class_assignment_update_instance.to_dict() +# create an instance of ClassAssignmentUpdate from a dict +class_assignment_update_from_dict = ClassAssignmentUpdate.from_dict(class_assignment_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ClassAssignmentUpdateAllOfGoogleClassroom.md b/docs/reference/ClassAssignmentUpdateAllOfGoogleClassroom.md new file mode 100644 index 0000000..a55a0be --- /dev/null +++ b/docs/reference/ClassAssignmentUpdateAllOfGoogleClassroom.md @@ -0,0 +1,30 @@ +# ClassAssignmentUpdateAllOfGoogleClassroom + +Google Classroom options for this assignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic_id** | **str** | Identifier of the topic where the assignment is created | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a JSON string +class_assignment_update_all_of_google_classroom_instance = ClassAssignmentUpdateAllOfGoogleClassroom.from_json(json) +# print the JSON string representation of the object +print(ClassAssignmentUpdateAllOfGoogleClassroom.to_json()) + +# convert the object into a dict +class_assignment_update_all_of_google_classroom_dict = class_assignment_update_all_of_google_classroom_instance.to_dict() +# create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a dict +class_assignment_update_all_of_google_classroom_from_dict = ClassAssignmentUpdateAllOfGoogleClassroom.from_dict(class_assignment_update_all_of_google_classroom_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ClassAssignmentUpdateAllOfMicrosoftGraph.md b/docs/reference/ClassAssignmentUpdateAllOfMicrosoftGraph.md new file mode 100644 index 0000000..4832556 --- /dev/null +++ b/docs/reference/ClassAssignmentUpdateAllOfMicrosoftGraph.md @@ -0,0 +1,30 @@ +# ClassAssignmentUpdateAllOfMicrosoftGraph + +Microsoft Graph options for this assignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | **List[str]** | List of categories this assignment belongs to | [optional] + +## Example + +```python +from flat_api.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph + +# TODO update the JSON string below +json = "{}" +# create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a JSON string +class_assignment_update_all_of_microsoft_graph_instance = ClassAssignmentUpdateAllOfMicrosoftGraph.from_json(json) +# print the JSON string representation of the object +print(ClassAssignmentUpdateAllOfMicrosoftGraph.to_json()) + +# convert the object into a dict +class_assignment_update_all_of_microsoft_graph_dict = class_assignment_update_all_of_microsoft_graph_instance.to_dict() +# create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a dict +class_assignment_update_all_of_microsoft_graph_from_dict = ClassAssignmentUpdateAllOfMicrosoftGraph.from_dict(class_assignment_update_all_of_microsoft_graph_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClassAttachmentCreation.md b/docs/reference/ClassAttachmentCreation.md similarity index 80% rename from docs/ClassAttachmentCreation.md rename to docs/reference/ClassAttachmentCreation.md index 311b0d3..4d73e3e 100644 --- a/docs/ClassAttachmentCreation.md +++ b/docs/reference/ClassAttachmentCreation.md @@ -9,10 +9,13 @@ Name | Type | Description | Notes **type** | **str** | The type of the attachment posted: * `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] **score** | **str** | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] **worksheet** | **str** | An unique worksheet identifier | [optional] -**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**revision** | **str** | An unique revision identifier of a score | [optional] +**part_uuid** | **str** | The UUID of the instrument part selected for this attachment (for performance submissions) | [optional] +**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] [default to MediaScoreSharingMode.READ] **lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] **url** | **str** | The URL of the attachment. | [optional] **google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] +**teacher_only** | **bool** | Flag indicating if this attachment should only be visible to teachers | [optional] [default to False] ## Example @@ -24,12 +27,12 @@ json = "{}" # create an instance of ClassAttachmentCreation from a JSON string class_attachment_creation_instance = ClassAttachmentCreation.from_json(json) # print the JSON string representation of the object -print ClassAttachmentCreation.to_json() +print(ClassAttachmentCreation.to_json()) # convert the object into a dict class_attachment_creation_dict = class_attachment_creation_instance.to_dict() # create an instance of ClassAttachmentCreation from a dict -class_attachment_creation_form_dict = class_attachment_creation.from_dict(class_attachment_creation_dict) +class_attachment_creation_from_dict = ClassAttachmentCreation.from_dict(class_attachment_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassCreation.md b/docs/reference/ClassCreation.md similarity index 91% rename from docs/ClassCreation.md rename to docs/reference/ClassCreation.md index e3e1c6b..2e52279 100644 --- a/docs/ClassCreation.md +++ b/docs/reference/ClassCreation.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of ClassCreation from a JSON string class_creation_instance = ClassCreation.from_json(json) # print the JSON string representation of the object -print ClassCreation.to_json() +print(ClassCreation.to_json()) # convert the object into a dict class_creation_dict = class_creation_instance.to_dict() # create an instance of ClassCreation from a dict -class_creation_form_dict = class_creation.from_dict(class_creation_dict) +class_creation_from_dict = ClassCreation.from_dict(class_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetails.md b/docs/reference/ClassDetails.md similarity index 89% rename from docs/ClassDetails.md rename to docs/reference/ClassDetails.md index cc2886a..38ec572 100644 --- a/docs/ClassDetails.md +++ b/docs/reference/ClassDetails.md @@ -7,13 +7,14 @@ A classroom Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the class | -**state** | [**ClassState**](ClassState.md) | | [optional] -**name** | **str** | The name of the class | [optional] +**state** | [**ClassState**](ClassState.md) | | +**name** | **str** | The name of the class | **section** | **str** | The section of the class | [optional] **description** | **str** | An optionnal description for this class | [optional] **organization** | **str** | The unique identifier of the Organization owning this class | [optional] **owner** | **str** | The unique identifier of the User owning this class | [optional] -**creation_date** | **datetime** | The date when the class was create | [optional] +**creation_date** | **datetime** | The date when the class was create | +**modification_date** | **datetime** | The date when the class was last modified | [optional] **enrollment_code** | **str** | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] **theme** | **str** | The theme identifier using in Flat User Interface | [optional] **assignments_count** | **float** | The number of assignments created in the class | [optional] @@ -41,12 +42,12 @@ json = "{}" # create an instance of ClassDetails from a JSON string class_details_instance = ClassDetails.from_json(json) # print the JSON string representation of the object -print ClassDetails.to_json() +print(ClassDetails.to_json()) # convert the object into a dict class_details_dict = class_details_instance.to_dict() # create an instance of ClassDetails from a dict -class_details_form_dict = class_details.from_dict(class_details_dict) +class_details_from_dict = ClassDetails.from_dict(class_details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsCanvas.md b/docs/reference/ClassDetailsCanvas.md similarity index 88% rename from docs/ClassDetailsCanvas.md rename to docs/reference/ClassDetailsCanvas.md index a7bbe6e..b77e052 100644 --- a/docs/ClassDetailsCanvas.md +++ b/docs/reference/ClassDetailsCanvas.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ClassDetailsCanvas from a JSON string class_details_canvas_instance = ClassDetailsCanvas.from_json(json) # print the JSON string representation of the object -print ClassDetailsCanvas.to_json() +print(ClassDetailsCanvas.to_json()) # convert the object into a dict class_details_canvas_dict = class_details_canvas_instance.to_dict() # create an instance of ClassDetailsCanvas from a dict -class_details_canvas_form_dict = class_details_canvas.from_dict(class_details_canvas_dict) +class_details_canvas_from_dict = ClassDetailsCanvas.from_dict(class_details_canvas_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsClever.md b/docs/reference/ClassDetailsClever.md similarity index 91% rename from docs/ClassDetailsClever.md rename to docs/reference/ClassDetailsClever.md index 54bd20f..04b454a 100644 --- a/docs/ClassDetailsClever.md +++ b/docs/reference/ClassDetailsClever.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of ClassDetailsClever from a JSON string class_details_clever_instance = ClassDetailsClever.from_json(json) # print the JSON string representation of the object -print ClassDetailsClever.to_json() +print(ClassDetailsClever.to_json()) # convert the object into a dict class_details_clever_dict = class_details_clever_instance.to_dict() # create an instance of ClassDetailsClever from a dict -class_details_clever_form_dict = class_details_clever.from_dict(class_details_clever_dict) +class_details_clever_from_dict = ClassDetailsClever.from_dict(class_details_clever_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleClassroom.md b/docs/reference/ClassDetailsGoogleClassroom.md similarity index 86% rename from docs/ClassDetailsGoogleClassroom.md rename to docs/reference/ClassDetailsGoogleClassroom.md index 5fd4657..dfd6630 100644 --- a/docs/ClassDetailsGoogleClassroom.md +++ b/docs/reference/ClassDetailsGoogleClassroom.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ClassDetailsGoogleClassroom from a JSON string class_details_google_classroom_instance = ClassDetailsGoogleClassroom.from_json(json) # print the JSON string representation of the object -print ClassDetailsGoogleClassroom.to_json() +print(ClassDetailsGoogleClassroom.to_json()) # convert the object into a dict class_details_google_classroom_dict = class_details_google_classroom_instance.to_dict() # create an instance of ClassDetailsGoogleClassroom from a dict -class_details_google_classroom_form_dict = class_details_google_classroom.from_dict(class_details_google_classroom_dict) +class_details_google_classroom_from_dict = ClassDetailsGoogleClassroom.from_dict(class_details_google_classroom_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsGoogleDrive.md b/docs/reference/ClassDetailsGoogleDrive.md similarity index 88% rename from docs/ClassDetailsGoogleDrive.md rename to docs/reference/ClassDetailsGoogleDrive.md index 8f14e17..092fa64 100644 --- a/docs/ClassDetailsGoogleDrive.md +++ b/docs/reference/ClassDetailsGoogleDrive.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ClassDetailsGoogleDrive from a JSON string class_details_google_drive_instance = ClassDetailsGoogleDrive.from_json(json) # print the JSON string representation of the object -print ClassDetailsGoogleDrive.to_json() +print(ClassDetailsGoogleDrive.to_json()) # convert the object into a dict class_details_google_drive_dict = class_details_google_drive_instance.to_dict() # create an instance of ClassDetailsGoogleDrive from a dict -class_details_google_drive_form_dict = class_details_google_drive.from_dict(class_details_google_drive_dict) +class_details_google_drive_from_dict = ClassDetailsGoogleDrive.from_dict(class_details_google_drive_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsIssues.md b/docs/reference/ClassDetailsIssues.md similarity index 88% rename from docs/ClassDetailsIssues.md rename to docs/reference/ClassDetailsIssues.md index 9e9e7b9..f9303c7 100644 --- a/docs/ClassDetailsIssues.md +++ b/docs/reference/ClassDetailsIssues.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of ClassDetailsIssues from a JSON string class_details_issues_instance = ClassDetailsIssues.from_json(json) # print the JSON string representation of the object -print ClassDetailsIssues.to_json() +print(ClassDetailsIssues.to_json()) # convert the object into a dict class_details_issues_dict = class_details_issues_instance.to_dict() # create an instance of ClassDetailsIssues from a dict -class_details_issues_form_dict = class_details_issues.from_dict(class_details_issues_dict) +class_details_issues_from_dict = ClassDetailsIssues.from_dict(class_details_issues_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsIssuesSyncInner.md b/docs/reference/ClassDetailsIssuesSyncInner.md similarity index 86% rename from docs/ClassDetailsIssuesSyncInner.md rename to docs/reference/ClassDetailsIssuesSyncInner.md index e171491..29c586a 100644 --- a/docs/ClassDetailsIssuesSyncInner.md +++ b/docs/reference/ClassDetailsIssuesSyncInner.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of ClassDetailsIssuesSyncInner from a JSON string class_details_issues_sync_inner_instance = ClassDetailsIssuesSyncInner.from_json(json) # print the JSON string representation of the object -print ClassDetailsIssuesSyncInner.to_json() +print(ClassDetailsIssuesSyncInner.to_json()) # convert the object into a dict class_details_issues_sync_inner_dict = class_details_issues_sync_inner_instance.to_dict() # create an instance of ClassDetailsIssuesSyncInner from a dict -class_details_issues_sync_inner_form_dict = class_details_issues_sync_inner.from_dict(class_details_issues_sync_inner_dict) +class_details_issues_sync_inner_from_dict = ClassDetailsIssuesSyncInner.from_dict(class_details_issues_sync_inner_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsLti.md b/docs/reference/ClassDetailsLti.md similarity index 77% rename from docs/ClassDetailsLti.md rename to docs/reference/ClassDetailsLti.md index ddf6c0a..f18cd57 100644 --- a/docs/ClassDetailsLti.md +++ b/docs/reference/ClassDetailsLti.md @@ -1,6 +1,6 @@ # ClassDetailsLti -Meta information provided by the LTI consumer +Info about LTI context (1.1 and 1.3) ## Properties @@ -9,6 +9,7 @@ Name | Type | Description | Notes **context_id** | **str** | Unique context identifier provided | [optional] **context_title** | **str** | Context title | [optional] **context_label** | **str** | Context label | [optional] +**has_nrps_service** | **bool** | If true, the class has been synchronized with the LTI 1.3 NRPS 2.0 service | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of ClassDetailsLti from a JSON string class_details_lti_instance = ClassDetailsLti.from_json(json) # print the JSON string representation of the object -print ClassDetailsLti.to_json() +print(ClassDetailsLti.to_json()) # convert the object into a dict class_details_lti_dict = class_details_lti_instance.to_dict() # create an instance of ClassDetailsLti from a dict -class_details_lti_form_dict = class_details_lti.from_dict(class_details_lti_dict) +class_details_lti_from_dict = ClassDetailsLti.from_dict(class_details_lti_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsMfc.md b/docs/reference/ClassDetailsMfc.md similarity index 89% rename from docs/ClassDetailsMfc.md rename to docs/reference/ClassDetailsMfc.md index ff9f8ef..55e8ea3 100644 --- a/docs/ClassDetailsMfc.md +++ b/docs/reference/ClassDetailsMfc.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ClassDetailsMfc from a JSON string class_details_mfc_instance = ClassDetailsMfc.from_json(json) # print the JSON string representation of the object -print ClassDetailsMfc.to_json() +print(ClassDetailsMfc.to_json()) # convert the object into a dict class_details_mfc_dict = class_details_mfc_instance.to_dict() # create an instance of ClassDetailsMfc from a dict -class_details_mfc_form_dict = class_details_mfc.from_dict(class_details_mfc_dict) +class_details_mfc_from_dict = ClassDetailsMfc.from_dict(class_details_mfc_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassDetailsMicrosoftGraph.md b/docs/reference/ClassDetailsMicrosoftGraph.md similarity index 85% rename from docs/ClassDetailsMicrosoftGraph.md rename to docs/reference/ClassDetailsMicrosoftGraph.md index 67ec4c6..38ca8ae 100644 --- a/docs/ClassDetailsMicrosoftGraph.md +++ b/docs/reference/ClassDetailsMicrosoftGraph.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of ClassDetailsMicrosoftGraph from a JSON string class_details_microsoft_graph_instance = ClassDetailsMicrosoftGraph.from_json(json) # print the JSON string representation of the object -print ClassDetailsMicrosoftGraph.to_json() +print(ClassDetailsMicrosoftGraph.to_json()) # convert the object into a dict class_details_microsoft_graph_dict = class_details_microsoft_graph_instance.to_dict() # create an instance of ClassDetailsMicrosoftGraph from a dict -class_details_microsoft_graph_form_dict = class_details_microsoft_graph.from_dict(class_details_microsoft_graph_dict) +class_details_microsoft_graph_from_dict = ClassDetailsMicrosoftGraph.from_dict(class_details_microsoft_graph_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassGradeLevel.md b/docs/reference/ClassGradeLevel.md similarity index 53% rename from docs/ClassGradeLevel.md rename to docs/reference/ClassGradeLevel.md index f421f03..4ef8f02 100644 --- a/docs/ClassGradeLevel.md +++ b/docs/reference/ClassGradeLevel.md @@ -2,10 +2,17 @@ Class grade level -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ELEMENTARY` (value: `'elementary'`) + +* `MIDDLE` (value: `'middle'`) + +* `HIGH` (value: `'high'`) + +* `UNIVERSITY` (value: `'university'`) + +* `OTHER` (value: `'other'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassRoles.md b/docs/reference/ClassRoles.md similarity index 66% rename from docs/ClassRoles.md rename to docs/reference/ClassRoles.md index d98de6b..3fc5a27 100644 --- a/docs/ClassRoles.md +++ b/docs/reference/ClassRoles.md @@ -2,10 +2,11 @@ User's Class Role (for Edu users only) -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `TEACHER` (value: `'teacher'`) + +* `STUDENT` (value: `'student'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassState.md b/docs/reference/ClassState.md similarity index 58% rename from docs/ClassState.md rename to docs/reference/ClassState.md index b7a0e58..50c7594 100644 --- a/docs/ClassState.md +++ b/docs/reference/ClassState.md @@ -2,10 +2,15 @@ The state of a classroom -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ACTIVE` (value: `'active'`) + +* `INACTIVE` (value: `'inactive'`) + +* `ARCHIVED` (value: `'archived'`) + +* `DELETED` (value: `'deleted'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClassUpdate.md b/docs/reference/ClassUpdate.md similarity index 92% rename from docs/ClassUpdate.md rename to docs/reference/ClassUpdate.md index 9f0a8b0..9c3d502 100644 --- a/docs/ClassUpdate.md +++ b/docs/reference/ClassUpdate.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of ClassUpdate from a JSON string class_update_instance = ClassUpdate.from_json(json) # print the JSON string representation of the object -print ClassUpdate.to_json() +print(ClassUpdate.to_json()) # convert the object into a dict class_update_dict = class_update_instance.to_dict() # create an instance of ClassUpdate from a dict -class_update_form_dict = class_update.from_dict(class_update_dict) +class_update_from_dict = ClassUpdate.from_dict(class_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Collection.md b/docs/reference/Collection.md similarity index 64% rename from docs/Collection.md rename to docs/reference/Collection.md index 9c29fab..6c57507 100644 --- a/docs/Collection.md +++ b/docs/reference/Collection.md @@ -6,18 +6,22 @@ Collection of scores Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the collection | [optional] -**title** | **str** | The title of the collection | [optional] -**html_url** | **str** | The url where the collection can be viewed in a web browser | [optional] -**type** | [**CollectionType**](CollectionType.md) | | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**id** | **str** | Unique identifier of the collection | +**title** | **str** | The title of the collection | +**html_url** | **str** | The url where the collection can be viewed in a web browser | +**type** | [**CollectionType**](CollectionType.md) | | +**label_key** | **str** | Product-specific translation key for the collection type. Only set for specific collection types: * For `regular` type: `playlist` (Flat) or `collection` (Flat for Education) * For `collaborations` type: `collaboration` (Flat) or `shared-scores` (Flat for Education) Not set for other collection types. | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [default to CollectionPrivacy.PRIVATE] **sharing_key** | **str** | The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`) | [optional] **app** | [**CollectionApp**](CollectionApp.md) | | [optional] -**creation_date** | **datetime** | The date when the collection was created | [optional] +**creation_date** | **datetime** | The date when the collection was created | +**modification_date** | **datetime** | The date when the collection was last modified | [optional] **user** | [**UserPublicSummary**](UserPublicSummary.md) | | [optional] **organization** | **str** | If the score has been created in an organization, the identifier of this organization. | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] **collaborators** | [**List[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the collection | [optional] +**is_pinned** | **bool** | Whether the collection is pinned by the owner | [optional] +**contents** | [**CollectionContents**](CollectionContents.md) | | **capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | **collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] @@ -31,12 +35,12 @@ json = "{}" # create an instance of Collection from a JSON string collection_instance = Collection.from_json(json) # print the JSON string representation of the object -print Collection.to_json() +print(Collection.to_json()) # convert the object into a dict collection_dict = collection_instance.to_dict() # create an instance of Collection from a dict -collection_form_dict = collection.from_dict(collection_dict) +collection_from_dict = Collection.from_dict(collection_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionApi.md b/docs/reference/CollectionApi.md similarity index 77% rename from docs/CollectionApi.md rename to docs/reference/CollectionApi.md index 6deb8e8..fedd5d9 100644 --- a/docs/CollectionApi.md +++ b/docs/reference/CollectionApi.md @@ -20,7 +20,9 @@ Method | HTTP request | Description Add a score to the collection -This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. +This operation will add a score to a collection. The default behavior will make the score available across multiple collections. +You must have the capability `canAddScores` on the provided `collection` to perform the action. + ### Example @@ -49,7 +51,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) @@ -69,7 +71,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted | **score** | **str**| 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`). | **sharing_key** | **str**| 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] @@ -83,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ### HTTP response details @@ -102,7 +104,8 @@ Name | Type | Description | Notes Create a new collection -This method will create a new collection and add it to your `root` collection. +This method will create a new collection in your account. + ### Example @@ -180,7 +183,8 @@ Name | Type | Description | Notes Delete the collection -This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. +This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + ### Example @@ -208,7 +212,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores try: # Delete the collection @@ -224,7 +228,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores | ### Return type @@ -251,11 +255,13 @@ void (empty response body) [[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) # **delete_score_from_collection** -> delete_score_from_collection(collection, score, sharing_key=sharing_key) +> delete_score_from_collection(collection, score, event_properties=event_properties, sharing_key=sharing_key) Delete a score from the collection -This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. +This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. +This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + ### Example @@ -283,13 +289,14 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) sharing_key = 'sharing_key_example' # str | 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) try: # Delete a score from the collection - api_instance.delete_score_from_collection(collection, score, sharing_key=sharing_key) + api_instance.delete_score_from_collection(collection, score, event_properties=event_properties, sharing_key=sharing_key) except Exception as e: print("Exception when calling CollectionApi->delete_score_from_collection: %s\n" % e) ``` @@ -301,8 +308,9 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted | **score** | **str**| 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`). | + **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] **sharing_key** | **str**| 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] ### Return type @@ -315,7 +323,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ### HTTP response details @@ -362,7 +370,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores body = flat_api.CollectionModification() # CollectionModification | try: @@ -381,7 +389,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores | **body** | [**CollectionModification**](CollectionModification.md)| | ### Return type @@ -440,7 +448,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores sharing_key = 'sharing_key_example' # str | 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) try: @@ -459,7 +467,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores | **sharing_key** | **str**| 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] ### Return type @@ -487,11 +495,15 @@ Name | Type | Description | Notes [[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) # **list_collection_scores** -> List[ScoreDetails] list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) +> List[ScoreDetails] list_collection_scores(collection, sort=sort, direction=direction, limit=limit, next=next, previous=previous, sharing_key=sharing_key) List the scores contained in a collection -Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. +Use this method to list the scores contained in a collection. +If no sort option is provided, the scores are sorted by `modificationDate` `desc`. + +For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + ### Example @@ -520,17 +532,17 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted - sharing_key = 'sharing_key_example' # str | 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) + collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + sharing_key = 'sharing_key_example' # str | 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) try: # List the scores contained in a collection - api_response = api_instance.list_collection_scores(collection, sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + api_response = api_instance.list_collection_scores(collection, sort=sort, direction=direction, limit=limit, next=next, previous=previous, sharing_key=sharing_key) print("The response of CollectionApi->list_collection_scores:\n") pprint(api_response) except Exception as e: @@ -544,13 +556,13 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | - **sharing_key** | **str**| 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] + **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores | **sort** | **str**| Sort | [optional] **direction** | **str**| Sort direction | [optional] **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **sharing_key** | **str**| 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] ### Return type @@ -579,7 +591,13 @@ Name | Type | Description | Notes List the collections -Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. +Use this method to list the user's collections. +If no sort option is provided, the collections are sorted by `creationDate` `desc`. + +By default (`parent=user`), this returns all user account collections with virtual collections on the first page. + +To fetch your app collection details, you can use `GET /v2/collections/app`. + ### Example @@ -608,7 +626,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - parent = 'root' # str | List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. (optional) (default to 'root') + parent = 'user' # str | List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. (optional) (default to 'user') sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) @@ -631,7 +649,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. | [optional] [default to 'root'] + **parent** | **str**| List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. | [optional] [default to 'user'] **sort** | **str**| Sort | [optional] **direction** | **str**| Sort direction | [optional] **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] @@ -661,11 +679,12 @@ Name | Type | Description | Notes [[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) # **untrash_collection** -> untrash_collection(collection) +> FlatErrorResponse untrash_collection(collection) Untrash a collection -This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. +**DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + ### Example @@ -673,6 +692,7 @@ This method will restore the collection by removing it from the `trash` and add ```python import flat_api +from flat_api.models.flat_error_response import FlatErrorResponse from flat_api.rest import ApiException from pprint import pprint @@ -693,11 +713,13 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.CollectionApi(api_client) - collection = 'collection_example' # str | Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted + collection = 'collection_example' # str | Unique identifier of the collection. try: # Untrash a collection - api_instance.untrash_collection(collection) + api_response = api_instance.untrash_collection(collection) + print("The response of CollectionApi->untrash_collection:\n") + pprint(api_response) except Exception as e: print("Exception when calling CollectionApi->untrash_collection: %s\n" % e) ``` @@ -709,11 +731,11 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collection** | **str**| Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted | + **collection** | **str**| Unique identifier of the collection. | ### Return type -void (empty response body) +[**FlatErrorResponse**](FlatErrorResponse.md) ### Authorization @@ -728,9 +750,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | The score has been untrashed | - | -**403** | Not granted to manage this score | - | -**404** | Score not found | - | +**400** | Bad request - Operation no longer supported | - | **0** | Error | - | [[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) diff --git a/docs/CollectionApp.md b/docs/reference/CollectionApp.md similarity index 90% rename from docs/CollectionApp.md rename to docs/reference/CollectionApp.md index d6ce65e..dd598de 100644 --- a/docs/CollectionApp.md +++ b/docs/reference/CollectionApp.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of CollectionApp from a JSON string collection_app_instance = CollectionApp.from_json(json) # print the JSON string representation of the object -print CollectionApp.to_json() +print(CollectionApp.to_json()) # convert the object into a dict collection_app_dict = collection_app_instance.to_dict() # create an instance of CollectionApp from a dict -collection_app_form_dict = collection_app.from_dict(collection_app_dict) +collection_app_from_dict = CollectionApp.from_dict(collection_app_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionCapabilities.md b/docs/reference/CollectionCapabilities.md similarity index 92% rename from docs/CollectionCapabilities.md rename to docs/reference/CollectionCapabilities.md index 9e05b64..aa7ce79 100644 --- a/docs/CollectionCapabilities.md +++ b/docs/reference/CollectionCapabilities.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of CollectionCapabilities from a JSON string collection_capabilities_instance = CollectionCapabilities.from_json(json) # print the JSON string representation of the object -print CollectionCapabilities.to_json() +print(CollectionCapabilities.to_json()) # convert the object into a dict collection_capabilities_dict = collection_capabilities_instance.to_dict() # create an instance of CollectionCapabilities from a dict -collection_capabilities_form_dict = collection_capabilities.from_dict(collection_capabilities_dict) +collection_capabilities_from_dict = CollectionCapabilities.from_dict(collection_capabilities_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/CollectionContents.md b/docs/reference/CollectionContents.md new file mode 100644 index 0000000..1baed88 --- /dev/null +++ b/docs/reference/CollectionContents.md @@ -0,0 +1,30 @@ +# CollectionContents + +The contents of the collection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scores_count** | **int** | The number of scores in the collection | + +## Example + +```python +from flat_api.models.collection_contents import CollectionContents + +# TODO update the JSON string below +json = "{}" +# create an instance of CollectionContents from a JSON string +collection_contents_instance = CollectionContents.from_json(json) +# print the JSON string representation of the object +print(CollectionContents.to_json()) + +# convert the object into a dict +collection_contents_dict = collection_contents_instance.to_dict() +# create an instance of CollectionContents from a dict +collection_contents_from_dict = CollectionContents.from_dict(collection_contents_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CollectionCreation.md b/docs/reference/CollectionCreation.md similarity index 77% rename from docs/CollectionCreation.md rename to docs/reference/CollectionCreation.md index c482f21..c29b185 100644 --- a/docs/CollectionCreation.md +++ b/docs/reference/CollectionCreation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | The title of the collection | -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | +**title** | **str** | The title of the collection | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] [default to CollectionPrivacy.PRIVATE] ## Example @@ -18,12 +18,12 @@ json = "{}" # create an instance of CollectionCreation from a JSON string collection_creation_instance = CollectionCreation.from_json(json) # print the JSON string representation of the object -print CollectionCreation.to_json() +print(CollectionCreation.to_json()) # convert the object into a dict collection_creation_dict = collection_creation_instance.to_dict() # create an instance of CollectionCreation from a dict -collection_creation_form_dict = collection_creation.from_dict(collection_creation_dict) +collection_creation_from_dict = CollectionCreation.from_dict(collection_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionModification.md b/docs/reference/CollectionModification.md similarity index 83% rename from docs/CollectionModification.md rename to docs/reference/CollectionModification.md index 4b8891f..32c79bc 100644 --- a/docs/CollectionModification.md +++ b/docs/reference/CollectionModification.md @@ -7,7 +7,7 @@ Edit the collection metadata Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the collection | [optional] -**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] +**privacy** | [**CollectionPrivacy**](CollectionPrivacy.md) | | [optional] [default to CollectionPrivacy.PRIVATE] ## Example @@ -19,12 +19,12 @@ json = "{}" # create an instance of CollectionModification from a JSON string collection_modification_instance = CollectionModification.from_json(json) # print the JSON string representation of the object -print CollectionModification.to_json() +print(CollectionModification.to_json()) # convert the object into a dict collection_modification_dict = collection_modification_instance.to_dict() # create an instance of CollectionModification from a dict -collection_modification_form_dict = collection_modification.from_dict(collection_modification_dict) +collection_modification_from_dict = CollectionModification.from_dict(collection_modification_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/CollectionPrivacy.md b/docs/reference/CollectionPrivacy.md new file mode 100644 index 0000000..7cf273c --- /dev/null +++ b/docs/reference/CollectionPrivacy.md @@ -0,0 +1,11 @@ +# CollectionPrivacy + +The collection main privacy mode. - `private`: The collection is private and can only be accessed, modified, and administered by specified collaborators. + +## Enum + +* `PRIVATE` (value: `'private'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/CollectionType.md b/docs/reference/CollectionType.md new file mode 100644 index 0000000..7d329fd --- /dev/null +++ b/docs/reference/CollectionType.md @@ -0,0 +1,23 @@ +# CollectionType + +Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores + +## Enum + +* `ROOT` (value: `'root'`) + +* `REGULAR` (value: `'regular'`) + +* `APP` (value: `'app'`) + +* `TRASH` (value: `'trash'`) + +* `ALLSCORES` (value: `'allScores'`) + +* `COLLABORATIONS` (value: `'collaborations'`) + +* `LIKES` (value: `'likes'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/CreateLtiConfiguration200Response.md b/docs/reference/CreateLtiConfiguration200Response.md new file mode 100644 index 0000000..aa21da1 --- /dev/null +++ b/docs/reference/CreateLtiConfiguration200Response.md @@ -0,0 +1,29 @@ +# CreateLtiConfiguration200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_url** | **str** | One-time registration URL (only for dynamic registration) | [optional] + +## Example + +```python +from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateLtiConfiguration200Response from a JSON string +create_lti_configuration200_response_instance = CreateLtiConfiguration200Response.from_json(json) +# print the JSON string representation of the object +print(CreateLtiConfiguration200Response.to_json()) + +# convert the object into a dict +create_lti_configuration200_response_dict = create_lti_configuration200_response_instance.to_dict() +# create an instance of CreateLtiConfiguration200Response from a dict +create_lti_configuration200_response_from_dict = CreateLtiConfiguration200Response.from_dict(create_lti_configuration200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/CreditTransaction.md b/docs/reference/CreditTransaction.md new file mode 100644 index 0000000..727ad02 --- /dev/null +++ b/docs/reference/CreditTransaction.md @@ -0,0 +1,38 @@ +# CreditTransaction + +A single credit ledger entry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the credit transaction | +**type** | **str** | Credit category. `ai` covers every AI-powered feature. | +**feature** | **str** | Which product the credits relate to. Set on deductions and on the credits a refund returns, absent on credit-pack top-ups, which are not tied to a single feature. | [optional] +**amount** | **int** | How many credits this entry moved, signed: positive for top-ups (`+30` from a credit pack), negative for deductions (`-2` for a two-page import). Sum only entries whose `state` is `active`. | +**source** | **str** | Which pool the credits came from: * `subscription`: the plan's periodic allowance * `purchase`: credits bought as a pack, which do not expire with the billing period * `free_tier`: promotional grants * `support`: a manual adjustment made by Flat's support team A single import can produce two entries when it spans two pools: the plan allowance is drawn down first, and the remainder comes from `purchase`. | +**state** | **str** | Whether the entry still counts: * `active`: in effect * `canceled`: reversed, and no longer affecting the balance. Deductions are canceled when the import they paid for fails or is refunded. | +**job** | **str** | Identifier of the import this entry belongs to, when it relates to one. Present on an import's deduction, on its reversal, and on credits returned when an import is refunded. Absent on credit-pack top-ups and manual adjustments. | [optional] +**creation_date** | **datetime** | When the transaction was created | +**modification_date** | **datetime** | When the transaction was last modified | + +## Example + +```python +from flat_api.models.credit_transaction import CreditTransaction + +# TODO update the JSON string below +json = "{}" +# create an instance of CreditTransaction from a JSON string +credit_transaction_instance = CreditTransaction.from_json(json) +# print the JSON string representation of the object +print(CreditTransaction.to_json()) + +# convert the object into a dict +credit_transaction_dict = credit_transaction_instance.to_dict() +# create an instance of CreditTransaction from a dict +credit_transaction_from_dict = CreditTransaction.from_dict(credit_transaction_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduLibrary.md b/docs/reference/EduLibrary.md similarity index 72% rename from docs/EduLibrary.md rename to docs/reference/EduLibrary.md index 77929d2..8bc6f18 100644 --- a/docs/EduLibrary.md +++ b/docs/reference/EduLibrary.md @@ -6,10 +6,10 @@ A Flat for Education Library Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | [optional] -**name** | **str** | Name of the lirbary | [optional] -**type** | **str** | Type of the library | [optional] -**visibility** | **str** | Visibility of the library | [optional] +**id** | **str** | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | +**name** | **str** | Name of the lirbary | +**type** | **str** | Type of the library | +**visibility** | **str** | Visibility of the library | ## Example @@ -21,12 +21,12 @@ json = "{}" # create an instance of EduLibrary from a JSON string edu_library_instance = EduLibrary.from_json(json) # print the JSON string representation of the object -print EduLibrary.to_json() +print(EduLibrary.to_json()) # convert the object into a dict edu_library_dict = edu_library_instance.to_dict() # create an instance of EduLibrary from a dict -edu_library_form_dict = edu_library.from_dict(edu_library_dict) +edu_library_from_dict = EduLibrary.from_dict(edu_library_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResource.md b/docs/reference/EduResource.md similarity index 69% rename from docs/EduResource.md rename to docs/reference/EduResource.md index 95eefb0..5b4ef2e 100644 --- a/docs/EduResource.md +++ b/docs/reference/EduResource.md @@ -9,14 +9,18 @@ Name | Type | Description | Notes **id** | **str** | Resource unique identifier | **creator** | **str** | The User identifier of the resource creator | [optional] **type** | [**EduResourceType**](EduResourceType.md) | | -**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] +**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] [default to EduResourcePrivacy.PRIVATE] **tags** | **List[str]** | Specific attributes for the resource (e.g. sample resources with custom design) | [optional] **parent** | **str** | Identifier of the parent resource, e.g. a folder or root | [optional] **title** | **str** | Title of the resource | +**sharing_description** | **str** | Sharing description of this resource | [optional] +**sharing_description_html** | **str** | HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. | [optional] **creation_date** | **datetime** | The date when the resource was created | [optional] **update_date** | **datetime** | The date when the resource was updated | [optional] **resource** | [**EduResourceResource**](EduResourceResource.md) | | [optional] **capabilities** | [**EduResourceCapabilities**](EduResourceCapabilities.md) | | +**subjects** | [**List[TeachingTheme]**](TeachingTheme.md) | The subjects of this resource, or the subjects of the resources included in the folder | [optional] +**grades** | [**List[Grade]**](Grade.md) | The grades of this resource, or the grades of the resources included in the folder. | [optional] ## Example @@ -28,12 +32,12 @@ json = "{}" # create an instance of EduResource from a JSON string edu_resource_instance = EduResource.from_json(json) # print the JSON string representation of the object -print EduResource.to_json() +print(EduResource.to_json()) # convert the object into a dict edu_resource_dict = edu_resource_instance.to_dict() # create an instance of EduResource from a dict -edu_resource_form_dict = edu_resource.from_dict(edu_resource_dict) +edu_resource_from_dict = EduResource.from_dict(edu_resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/EduResourceAssignmentCreation.md b/docs/reference/EduResourceAssignmentCreation.md new file mode 100644 index 0000000..e98109d --- /dev/null +++ b/docs/reference/EduResourceAssignmentCreation.md @@ -0,0 +1,30 @@ +# EduResourceAssignmentCreation + +Assignment-specific creation options. Only applicable when creating a resource with `type: assignment`. If `type` is not provided, defaults to `none`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] + +## Example + +```python +from flat_api.models.edu_resource_assignment_creation import EduResourceAssignmentCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceAssignmentCreation from a JSON string +edu_resource_assignment_creation_instance = EduResourceAssignmentCreation.from_json(json) +# print the JSON string representation of the object +print(EduResourceAssignmentCreation.to_json()) + +# convert the object into a dict +edu_resource_assignment_creation_dict = edu_resource_assignment_creation_instance.to_dict() +# create an instance of EduResourceAssignmentCreation from a dict +edu_resource_assignment_creation_from_dict = EduResourceAssignmentCreation.from_dict(edu_resource_assignment_creation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceCapabilities.md b/docs/reference/EduResourceCapabilities.md similarity index 78% rename from docs/EduResourceCapabilities.md rename to docs/reference/EduResourceCapabilities.md index 87ae32f..ea14593 100644 --- a/docs/EduResourceCapabilities.md +++ b/docs/reference/EduResourceCapabilities.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **can_edit** | **bool** | Whether the current user can modify this resource | [optional] **can_add_resources** | **bool** | Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) | [optional] **can_add_folders** | **bool** | Whether the current user can add folders within this resource (e.g. `folder` inside `root`) | [optional] +**can_change_privacy** | **bool** | Whether the current user can change the privacy of this resource (e.g. to share as `organizationPublic` or unshare it with `private`) | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of EduResourceCapabilities from a JSON string edu_resource_capabilities_instance = EduResourceCapabilities.from_json(json) # print the JSON string representation of the object -print EduResourceCapabilities.to_json() +print(EduResourceCapabilities.to_json()) # convert the object into a dict edu_resource_capabilities_dict = edu_resource_capabilities_instance.to_dict() # create an instance of EduResourceCapabilities from a dict -edu_resource_capabilities_form_dict = edu_resource_capabilities.from_dict(edu_resource_capabilities_dict) +edu_resource_capabilities_from_dict = EduResourceCapabilities.from_dict(edu_resource_capabilities_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceCopy.md b/docs/reference/EduResourceCopy.md similarity index 89% rename from docs/EduResourceCopy.md rename to docs/reference/EduResourceCopy.md index 3360bd3..e42d39c 100644 --- a/docs/EduResourceCopy.md +++ b/docs/reference/EduResourceCopy.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of EduResourceCopy from a JSON string edu_resource_copy_instance = EduResourceCopy.from_json(json) # print the JSON string representation of the object -print EduResourceCopy.to_json() +print(EduResourceCopy.to_json()) # convert the object into a dict edu_resource_copy_dict = edu_resource_copy_instance.to_dict() # create an instance of EduResourceCopy from a dict -edu_resource_copy_form_dict = edu_resource_copy.from_dict(edu_resource_copy_dict) +edu_resource_copy_from_dict = EduResourceCopy.from_dict(edu_resource_copy_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceCreation.md b/docs/reference/EduResourceCreation.md similarity index 68% rename from docs/EduResourceCreation.md rename to docs/reference/EduResourceCreation.md index ee25f7e..4903a20 100644 --- a/docs/EduResourceCreation.md +++ b/docs/reference/EduResourceCreation.md @@ -9,6 +9,9 @@ Name | Type | Description | Notes **type** | [**EduResourceType**](EduResourceType.md) | | **title** | **str** | Title of the resource | **parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] [default to 'root'] +**sharing_description** | **str** | Sharing description of the resource | [optional] +**sharing_description_html** | **str** | HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. | [optional] +**resource** | [**EduResourceAssignmentCreation**](EduResourceAssignmentCreation.md) | | [optional] ## Example @@ -20,12 +23,12 @@ json = "{}" # create an instance of EduResourceCreation from a JSON string edu_resource_creation_instance = EduResourceCreation.from_json(json) # print the JSON string representation of the object -print EduResourceCreation.to_json() +print(EduResourceCreation.to_json()) # convert the object into a dict edu_resource_creation_dict = edu_resource_creation_instance.to_dict() # create an instance of EduResourceCreation from a dict -edu_resource_creation_form_dict = edu_resource_creation.from_dict(edu_resource_creation_dict) +edu_resource_creation_from_dict = EduResourceCreation.from_dict(edu_resource_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/EduResourceFolder.md b/docs/reference/EduResourceFolder.md new file mode 100644 index 0000000..0db18e5 --- /dev/null +++ b/docs/reference/EduResourceFolder.md @@ -0,0 +1,32 @@ +# EduResourceFolder + +Education resources folder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Title of the folder | [optional] +**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment type of the resources that are included in the folder, | [optional] +**resources_count** | **float** | The number of resources inside the folder | [optional] + +## Example + +```python +from flat_api.models.edu_resource_folder import EduResourceFolder + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceFolder from a JSON string +edu_resource_folder_instance = EduResourceFolder.from_json(json) +# print the JSON string representation of the object +print(EduResourceFolder.to_json()) + +# convert the object into a dict +edu_resource_folder_dict = edu_resource_folder_instance.to_dict() +# create an instance of EduResourceFolder from a dict +edu_resource_folder_from_dict = EduResourceFolder.from_dict(edu_resource_folder_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceLtiLink.md b/docs/reference/EduResourceLtiLink.md similarity index 87% rename from docs/EduResourceLtiLink.md rename to docs/reference/EduResourceLtiLink.md index 2150036..08efc2e 100644 --- a/docs/EduResourceLtiLink.md +++ b/docs/reference/EduResourceLtiLink.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of EduResourceLtiLink from a JSON string edu_resource_lti_link_instance = EduResourceLtiLink.from_json(json) # print the JSON string representation of the object -print EduResourceLtiLink.to_json() +print(EduResourceLtiLink.to_json()) # convert the object into a dict edu_resource_lti_link_dict = edu_resource_lti_link_instance.to_dict() # create an instance of EduResourceLtiLink from a dict -edu_resource_lti_link_form_dict = edu_resource_lti_link.from_dict(edu_resource_lti_link_dict) +edu_resource_lti_link_from_dict = EduResourceLtiLink.from_dict(edu_resource_lti_link_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceMove.md b/docs/reference/EduResourceMove.md similarity index 89% rename from docs/EduResourceMove.md rename to docs/reference/EduResourceMove.md index aec4e89..618516a 100644 --- a/docs/EduResourceMove.md +++ b/docs/reference/EduResourceMove.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of EduResourceMove from a JSON string edu_resource_move_instance = EduResourceMove.from_json(json) # print the JSON string representation of the object -print EduResourceMove.to_json() +print(EduResourceMove.to_json()) # convert the object into a dict edu_resource_move_dict = edu_resource_move_instance.to_dict() # create an instance of EduResourceMove from a dict -edu_resource_move_form_dict = edu_resource_move.from_dict(edu_resource_move_dict) +edu_resource_move_from_dict = EduResourceMove.from_dict(edu_resource_move_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourcePrivacy.md b/docs/reference/EduResourcePrivacy.md similarity index 63% rename from docs/EduResourcePrivacy.md rename to docs/reference/EduResourcePrivacy.md index 7cb4d0e..806c277 100644 --- a/docs/EduResourcePrivacy.md +++ b/docs/reference/EduResourcePrivacy.md @@ -2,10 +2,13 @@ The Education resource privacy mode. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `PRIVATE` (value: `'private'`) + +* `ORGANIZATIONPUBLIC` (value: `'organizationPublic'`) + +* `PUBLIC` (value: `'public'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/EduResourceResource.md b/docs/reference/EduResourceResource.md new file mode 100644 index 0000000..a435239 --- /dev/null +++ b/docs/reference/EduResourceResource.md @@ -0,0 +1,55 @@ +# EduResourceResource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the assignment | +**type** | [**AssignmentType**](AssignmentType.md) | | +**capabilities** | [**AssignmentCapabilities**](AssignmentCapabilities.md) | | +**title** | **str** | Title of the folder | +**description** | **str** | Student instructions and content of the assignment (plain text) | [optional] +**description_html** | **str** | HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**teacher_instructions** | **str** | Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. | [optional] +**teacher_instructions_html** | **str** | HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. | [optional] +**cover** | **str** | The URL of the cover to display | [optional] +**cover_file** | **str** | The id of the cover to display | [optional] +**attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | +**use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] +**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**toolset** | **str** | The id of the associated toolset | [optional] +**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] +**restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] +**submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] +**recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] +**allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] +**allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] +**allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] +**free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] +**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment type of the resources that are included in the folder, | [optional] +**resources_count** | **float** | The number of resources inside the folder | [optional] + +## Example + +```python +from flat_api.models.edu_resource_resource import EduResourceResource + +# TODO update the JSON string below +json = "{}" +# create an instance of EduResourceResource from a JSON string +edu_resource_resource_instance = EduResourceResource.from_json(json) +# print the JSON string representation of the object +print(EduResourceResource.to_json()) + +# convert the object into a dict +edu_resource_resource_dict = edu_resource_resource_instance.to_dict() +# create an instance of EduResourceResource from a dict +edu_resource_resource_from_dict = EduResourceResource.from_dict(edu_resource_resource_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EduResourceType.md b/docs/reference/EduResourceType.md similarity index 66% rename from docs/EduResourceType.md rename to docs/reference/EduResourceType.md index 054007f..c77ea4b 100644 --- a/docs/EduResourceType.md +++ b/docs/reference/EduResourceType.md @@ -2,10 +2,11 @@ Type of an education resource -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ASSIGNMENT` (value: `'assignment'`) + +* `FOLDER` (value: `'folder'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceUpdate.md b/docs/reference/EduResourceUpdate.md similarity index 55% rename from docs/EduResourceUpdate.md rename to docs/reference/EduResourceUpdate.md index c32c521..95e9971 100644 --- a/docs/EduResourceUpdate.md +++ b/docs/reference/EduResourceUpdate.md @@ -7,7 +7,11 @@ Update of an education resource Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the resource | [optional] -**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] +**sharing_description** | **str** | Sharing description of the resource | [optional] +**sharing_description_html** | **str** | HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. | [optional] +**privacy** | [**EduResourcePrivacy**](EduResourcePrivacy.md) | | [optional] [default to EduResourcePrivacy.PRIVATE] +**subjects** | [**List[TeachingTheme]**](TeachingTheme.md) | The subjects of this resource, or the subjects of the resources included in the folder | [optional] +**grades** | [**List[Grade]**](Grade.md) | The grades of this resource, or the grades of the resources included in the folder. | [optional] ## Example @@ -19,12 +23,12 @@ json = "{}" # create an instance of EduResourceUpdate from a JSON string edu_resource_update_instance = EduResourceUpdate.from_json(json) # print the JSON string representation of the object -print EduResourceUpdate.to_json() +print(EduResourceUpdate.to_json()) # convert the object into a dict edu_resource_update_dict = edu_resource_update_instance.to_dict() # create an instance of EduResourceUpdate from a dict -edu_resource_update_form_dict = edu_resource_update.from_dict(edu_resource_update_dict) +edu_resource_update_from_dict = EduResourceUpdate.from_dict(edu_resource_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourceUseInClass.md b/docs/reference/EduResourceUseInClass.md similarity index 88% rename from docs/EduResourceUseInClass.md rename to docs/reference/EduResourceUseInClass.md index a5adf64..6552440 100644 --- a/docs/EduResourceUseInClass.md +++ b/docs/reference/EduResourceUseInClass.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of EduResourceUseInClass from a JSON string edu_resource_use_in_class_instance = EduResourceUseInClass.from_json(json) # print the JSON string representation of the object -print EduResourceUseInClass.to_json() +print(EduResourceUseInClass.to_json()) # convert the object into a dict edu_resource_use_in_class_dict = edu_resource_use_in_class_instance.to_dict() # create an instance of EduResourceUseInClass from a dict -edu_resource_use_in_class_form_dict = edu_resource_use_in_class.from_dict(edu_resource_use_in_class_dict) +edu_resource_use_in_class_from_dict = EduResourceUseInClass.from_dict(edu_resource_use_in_class_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EduResourcesApi.md b/docs/reference/EduResourcesApi.md similarity index 89% rename from docs/EduResourcesApi.md rename to docs/reference/EduResourcesApi.md index caf6a3b..ba4f5c7 100644 --- a/docs/EduResourcesApi.md +++ b/docs/reference/EduResourcesApi.md @@ -100,7 +100,13 @@ Name | Type | Description | Notes Copy an education assignment to a teacher demo class -Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. +Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), +this endpoint can be used for the feature "View as student". + +It will ensure the teacher has a demo class, then copy the assignment to the demo class. +You can then use `POST /classes/{class}/testStudent` to create a testing student account +in the demo class. + ### Example @@ -251,7 +257,9 @@ Name | Type | Description | Notes Create an LTI link for an education resource -This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. +This endpoint will return an LTI link that can be used to launch Flat for Education. +The link, in a context from a class, will ensure the assignment has been copied in the class. + ### Example @@ -538,7 +546,7 @@ This endpoint does not need any parameter. [[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) # **list_edu_resources** -> List[EduResource] list_edu_resources(parent=parent, type=type, sort=sort, direction=direction, limit=limit, next=next, previous=previous) +> List[EduResource] list_edu_resources(parent=parent, without_subfolders_resources=without_subfolders_resources, type=type, subjects=subjects, assignment_types=assignment_types, grades=grades, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List education resources in a library or folder @@ -548,7 +556,10 @@ List education resources in a library or folder ```python import flat_api +from flat_api.models.assignment_type import AssignmentType from flat_api.models.edu_resource import EduResource +from flat_api.models.grade import Grade +from flat_api.models.teaching_theme import TeachingTheme from flat_api.rest import ApiException from pprint import pprint @@ -569,8 +580,12 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.EduResourcesApi(api_client) - parent = 'root' # str | List the resources contained in this `parent` library or folder (optional) (default to 'root') + parent = 'root' # str | List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization (optional) (default to 'root') + without_subfolders_resources = True # bool | For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. (optional) type = 'type_example' # str | Filter the returned resources by type (optional) + subjects = [flat_api.TeachingTheme()] # List[TeachingTheme] | Filter the returned resources by subjects (optional) + assignment_types = [flat_api.AssignmentType()] # List[AssignmentType] | Filter the returned resources by assignment types (optional) + grades = [flat_api.Grade()] # List[Grade] | Filter the returned resources by grades (optional) sort = 'creationDate' # str | Sort (optional) (default to 'creationDate') direction = 'direction_example' # str | Sort direction (optional) limit = 25 # int | This is the maximum number of resources that may be returned (optional) (default to 25) @@ -579,7 +594,7 @@ with flat_api.ApiClient(configuration) as api_client: try: # List education resources in a library or folder - api_response = api_instance.list_edu_resources(parent=parent, type=type, sort=sort, direction=direction, limit=limit, next=next, previous=previous) + api_response = api_instance.list_edu_resources(parent=parent, without_subfolders_resources=without_subfolders_resources, type=type, subjects=subjects, assignment_types=assignment_types, grades=grades, sort=sort, direction=direction, limit=limit, next=next, previous=previous) print("The response of EduResourcesApi->list_edu_resources:\n") pprint(api_response) except Exception as e: @@ -593,8 +608,12 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **parent** | **str**| List the resources contained in this `parent` library or folder | [optional] [default to 'root'] + **parent** | **str**| List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization | [optional] [default to 'root'] + **without_subfolders_resources** | **bool**| For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. | [optional] **type** | **str**| Filter the returned resources by type | [optional] + **subjects** | [**List[TeachingTheme]**](TeachingTheme.md)| Filter the returned resources by subjects | [optional] + **assignment_types** | [**List[AssignmentType]**](AssignmentType.md)| Filter the returned resources by assignment types | [optional] + **grades** | [**List[Grade]**](Grade.md)| Filter the returned resources by grades | [optional] **sort** | **str**| Sort | [optional] [default to 'creationDate'] **direction** | **str**| Sort direction | [optional] **limit** | **int**| This is the maximum number of resources that may be returned | [optional] [default to 25] @@ -618,7 +637,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | List of resources | - | +**200** | List of resources | * X-Total-Assignments-Count - Total number of assignments
* X-Total-Folders-Count - Total number of folders
| **0** | Error | - | [[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) @@ -705,7 +724,10 @@ Name | Type | Description | Notes Update an education resource metadata -Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. +Update any resources metadata (e.g. title). + +Use this method to rename education resources folders or assignments. + ### Example @@ -861,7 +883,9 @@ Name | Type | Description | Notes Use an education resource in a class -This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). +This endpoint will copy a resource and the underlying resources. +The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + ### Example diff --git a/docs/FlatErrorResponse.md b/docs/reference/FlatErrorResponse.md similarity index 66% rename from docs/FlatErrorResponse.md rename to docs/reference/FlatErrorResponse.md index 948005b..39a64b0 100644 --- a/docs/FlatErrorResponse.md +++ b/docs/reference/FlatErrorResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **message** | **str** | A printable message for this error | **id** | **str** | An unique error identifier generated for the request | [optional] **param** | **str** | The related parameter that caused the error | [optional] +**provider_message** | **str** | The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. | [optional] ## Example @@ -21,12 +22,12 @@ json = "{}" # create an instance of FlatErrorResponse from a JSON string flat_error_response_instance = FlatErrorResponse.from_json(json) # print the JSON string representation of the object -print FlatErrorResponse.to_json() +print(FlatErrorResponse.to_json()) # convert the object into a dict flat_error_response_dict = flat_error_response_instance.to_dict() # create an instance of FlatErrorResponse from a dict -flat_error_response_form_dict = flat_error_response.from_dict(flat_error_response_dict) +flat_error_response_from_dict = FlatErrorResponse.from_dict(flat_error_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GoogleClassroomCoursework.md b/docs/reference/GoogleClassroomCoursework.md similarity index 88% rename from docs/GoogleClassroomCoursework.md rename to docs/reference/GoogleClassroomCoursework.md index d3a8377..12f12b6 100644 --- a/docs/GoogleClassroomCoursework.md +++ b/docs/reference/GoogleClassroomCoursework.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of GoogleClassroomCoursework from a JSON string google_classroom_coursework_instance = GoogleClassroomCoursework.from_json(json) # print the JSON string representation of the object -print GoogleClassroomCoursework.to_json() +print(GoogleClassroomCoursework.to_json()) # convert the object into a dict google_classroom_coursework_dict = google_classroom_coursework_instance.to_dict() # create an instance of GoogleClassroomCoursework from a dict -google_classroom_coursework_form_dict = google_classroom_coursework.from_dict(google_classroom_coursework_dict) +google_classroom_coursework_from_dict = GoogleClassroomCoursework.from_dict(google_classroom_coursework_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GoogleClassroomSubmission.md b/docs/reference/GoogleClassroomSubmission.md similarity index 88% rename from docs/GoogleClassroomSubmission.md rename to docs/reference/GoogleClassroomSubmission.md index c7920ed..644c04a 100644 --- a/docs/GoogleClassroomSubmission.md +++ b/docs/reference/GoogleClassroomSubmission.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of GoogleClassroomSubmission from a JSON string google_classroom_submission_instance = GoogleClassroomSubmission.from_json(json) # print the JSON string representation of the object -print GoogleClassroomSubmission.to_json() +print(GoogleClassroomSubmission.to_json()) # convert the object into a dict google_classroom_submission_dict = google_classroom_submission_instance.to_dict() # create an instance of GoogleClassroomSubmission from a dict -google_classroom_submission_form_dict = google_classroom_submission.from_dict(google_classroom_submission_dict) +google_classroom_submission_from_dict = GoogleClassroomSubmission.from_dict(google_classroom_submission_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/Grade.md b/docs/reference/Grade.md new file mode 100644 index 0000000..43f0c6b --- /dev/null +++ b/docs/reference/Grade.md @@ -0,0 +1,35 @@ +# Grade + +Class grade of the resource + +## Enum + +* `ENUM_1` (value: `'1'`) + +* `ENUM_2` (value: `'2'`) + +* `ENUM_3` (value: `'3'`) + +* `ENUM_4` (value: `'4'`) + +* `ENUM_5` (value: `'5'`) + +* `ENUM_6` (value: `'6'`) + +* `ENUM_7` (value: `'7'`) + +* `ENUM_8` (value: `'8'`) + +* `ENUM_9` (value: `'9'`) + +* `ENUM_10` (value: `'10'`) + +* `ENUM_11` (value: `'11'`) + +* `ENUM_12` (value: `'12'`) + +* `UNIVERSITY` (value: `'university'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Group.md b/docs/reference/Group.md similarity index 75% rename from docs/Group.md rename to docs/reference/Group.md index 48aa80c..b065638 100644 --- a/docs/Group.md +++ b/docs/reference/Group.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the group | [optional] **name** | **str** | The display name of the group | [optional] -**type** | **str** | The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class | [optional] +**type** | [**GroupType**](GroupType.md) | | [optional] **users_count** | **float** | The number of users in this group | [optional] **read_only** | **bool** | `True` if the group is set in read-only | [optional] **organization** | **str** | If the group is related to an organization, this field will contain the unique identifier of the organization | [optional] @@ -24,12 +24,12 @@ json = "{}" # create an instance of Group from a JSON string group_instance = Group.from_json(json) # print the JSON string representation of the object -print Group.to_json() +print(Group.to_json()) # convert the object into a dict group_dict = group_instance.to_dict() # create an instance of Group from a dict -group_form_dict = group.from_dict(group_dict) +group_from_dict = Group.from_dict(group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/GroupApi.md b/docs/reference/GroupApi.md new file mode 100644 index 0000000..8047740 --- /dev/null +++ b/docs/reference/GroupApi.md @@ -0,0 +1,731 @@ +# flat_api.GroupApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_group_user**](GroupApi.md#add_group_user) | **POST** /groups/{group}/users | Add a student to a group +[**create_group**](GroupApi.md#create_group) | **POST** /groups | Create a new group +[**delete_group**](GroupApi.md#delete_group) | **DELETE** /groups/{group} | Delete a group +[**get_group_details**](GroupApi.md#get_group_details) | **GET** /groups/{group} | Get group information +[**get_group_scores**](GroupApi.md#get_group_scores) | **GET** /groups/{group}/scores | List group's scores +[**list_group_users**](GroupApi.md#list_group_users) | **GET** /groups/{group}/users | List group's users +[**list_groups**](GroupApi.md#list_groups) | **GET** /groups | List groups +[**remove_group_user**](GroupApi.md#remove_group_user) | **DELETE** /groups/{group}/users/{user} | Remove a student from a class group +[**rename_group**](GroupApi.md#rename_group) | **PUT** /groups/{group} | Rename a group + + +# **add_group_user** +> AddGroupUser200Response add_group_user(group, add_group_user_request) + +Add a student to a group + +Add a student to the specified group (must be in the same class) + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.add_group_user200_response import AddGroupUser200Response +from flat_api.models.add_group_user_request import AddGroupUserRequest +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + add_group_user_request = flat_api.AddGroupUserRequest() # AddGroupUserRequest | + + try: + # Add a student to a group + api_response = api_instance.add_group_user(group, add_group_user_request) + print("The response of GroupApi->add_group_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->add_group_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **add_group_user_request** | [**AddGroupUserRequest**](AddGroupUserRequest.md)| | + +### Return type + +[**AddGroupUser200Response**](AddGroupUser200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Membership created | - | +**400** | Bad Request - Invalid user ID or user not enrolled in class | - | +**403** | Forbidden - Insufficient permissions or invalid group type | - | +**404** | Not Found - Group not found or user not found | - | +**0** | Error | - | + +[[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) + +# **create_group** +> GroupDetails create_group(group_creation) + +Create a new group + +Create a group of the given type, tied to a classroom, optionally with initial members. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.group_creation import GroupCreation +from flat_api.models.group_details import GroupDetails +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group_creation = flat_api.GroupCreation() # GroupCreation | + + try: + # Create a new group + api_response = api_instance.create_group(group_creation) + print("The response of GroupApi->create_group:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->create_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_creation** | [**GroupCreation**](GroupCreation.md)| | + +### Return type + +[**GroupDetails**](GroupDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The new group | - | +**400** | Bad Request - Invalid type or missing required parameters | - | +**403** | Forbidden - Insufficient permissions | - | +**409** | Conflict - Group name already exists | - | +**0** | Error | - | + +[[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) + +# **delete_group** +> delete_group(group) + +Delete a group + +Delete a group. Only available to teachers of the classroom. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + + try: + # Delete a group + api_instance.delete_group(group) + except Exception as e: + print("Exception when calling GroupApi->delete_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Group deleted | - | +**403** | Forbidden - Insufficient permissions or invalid group type | - | +**404** | Not Found - Group not found | - | +**0** | Error | - | + +[[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) + +# **get_group_details** +> GroupDetails get_group_details(group) + +Get group information + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.group_details import GroupDetails +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + + try: + # Get group information + api_response = api_instance.get_group_details(group) + print("The response of GroupApi->get_group_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->get_group_details: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + +### Return type + +[**GroupDetails**](GroupDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group details | - | +**404** | Not Found - Group not found or insufficient permissions | - | +**0** | Error | - | + +[[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) + +# **get_group_scores** +> List[ScoreDetails] get_group_scores(group, parent=parent) + +List group's scores + +Get the list of scores shared with a group. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.score_details import ScoreDetails +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) + + try: + # List group's scores + api_response = api_instance.get_group_scores(group, parent=parent) + print("The response of GroupApi->get_group_scores:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->get_group_scores: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + +### Return type + +[**List[ScoreDetails]**](ScoreDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The group's scores | - | +**404** | Not Found - Group not found or user not member of group | - | +**0** | Error | - | + +[[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) + +# **list_group_users** +> List[UserPublic] list_group_users(group, source=source) + +List group's users + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.user_public import UserPublic +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + source = 'source_example' # str | Filter the users by their source (optional) + + try: + # List group's users + api_response = api_instance.list_group_users(group, source=source) + print("The response of GroupApi->list_group_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->list_group_users: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **source** | **str**| Filter the users by their source | [optional] + +### Return type + +[**List[UserPublic]**](UserPublic.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of users member of the group | - | +**404** | Not Found - Group not found or insufficient permissions | - | +**0** | Error | - | + +[[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) + +# **list_groups** +> List[GroupDetails] list_groups(type, classroom=classroom, assignment=assignment) + +List groups + +List all groups of a given type, filtered by either a classroom or an assignment. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.group_details import GroupDetails +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + type = 'type_example' # str | + classroom = 'classroom_example' # str | Classroom ID to filter by (optional) + assignment = 'assignment_example' # str | Assignment ID to filter by (optional) + + try: + # List groups + api_response = api_instance.list_groups(type, classroom=classroom, assignment=assignment) + print("The response of GroupApi->list_groups:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->list_groups: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| | + **classroom** | **str**| Classroom ID to filter by | [optional] + **assignment** | **str**| Assignment ID to filter by | [optional] + +### Return type + +[**List[GroupDetails]**](GroupDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of groups | - | +**400** | Bad Request - Invalid type or missing required parameters | - | +**403** | Forbidden - Insufficient permissions | - | +**404** | Not Found - Classroom or assignment not found | - | +**0** | Error | - | + +[[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) + +# **remove_group_user** +> remove_group_user(group, user) + +Remove a student from a class group + +Remove a student from a class group + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + user = 'user_example' # str | User ID + + try: + # Remove a student from a class group + api_instance.remove_group_user(group, user) + except Exception as e: + print("Exception when calling GroupApi->remove_group_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **user** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Membership removed | - | +**403** | Forbidden - Insufficient permissions or invalid group type | - | +**404** | Not Found - Group not found or user not found | - | +**0** | Error | - | + +[[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) + +# **rename_group** +> GroupDetails rename_group(group, rename_group_request) + +Rename a group + +Rename a sub-group. Only available for class student groups. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.group_details import GroupDetails +from flat_api.models.rename_group_request import RenameGroupRequest +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.GroupApi(api_client) + group = 'group_example' # str | Unique identifier of a Flat group + rename_group_request = flat_api.RenameGroupRequest() # RenameGroupRequest | + + try: + # Rename a group + api_response = api_instance.rename_group(group, rename_group_request) + print("The response of GroupApi->rename_group:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupApi->rename_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| Unique identifier of a Flat group | + **rename_group_request** | [**RenameGroupRequest**](RenameGroupRequest.md)| | + +### Return type + +[**GroupDetails**](GroupDetails.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated group | - | +**400** | Bad Request - Invalid group ID or missing name | - | +**403** | Forbidden - Insufficient permissions | - | +**404** | Not Found - Group not found | - | +**409** | Conflict - Group name already exists | - | +**0** | Error | - | + +[[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) + diff --git a/docs/reference/GroupCreation.md b/docs/reference/GroupCreation.md new file mode 100644 index 0000000..bd2ca7d --- /dev/null +++ b/docs/reference/GroupCreation.md @@ -0,0 +1,32 @@ +# GroupCreation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of group (currently only classStudentsSubGroup is supported) | +**classroom** | **str** | Classroom ID | +**name** | **str** | Name of the group (optional - auto-generated if not provided). **Special names:** * `edu:testing-students`: Creates a group tagged for test student accounts. The display name will be localized (e.g., \"Test Students\") and the group will be tagged with `edu:testing-students`. | [optional] +**members** | **List[str]** | Array of student IDs to add to the group | [optional] + +## Example + +```python +from flat_api.models.group_creation import GroupCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupCreation from a JSON string +group_creation_instance = GroupCreation.from_json(json) +# print the JSON string representation of the object +print(GroupCreation.to_json()) + +# convert the object into a dict +group_creation_dict = group_creation_instance.to_dict() +# create an instance of GroupCreation from a dict +group_creation_from_dict = GroupCreation.from_dict(group_creation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/GroupDetails.md b/docs/reference/GroupDetails.md new file mode 100644 index 0000000..1a89487 --- /dev/null +++ b/docs/reference/GroupDetails.md @@ -0,0 +1,40 @@ +# GroupDetails + +The details of a group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the group | +**name** | **str** | The displayable name of the group | +**type** | [**GroupType**](GroupType.md) | | +**organization** | **str** | The unique identifier of the Organization owning the group | [optional] +**classroom** | **str** | The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup' | [optional] +**assignment** | **str** | The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'. | [optional] +**parent** | **str** | The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted. | [optional] +**creation_date** | **datetime** | The date when the group was create | +**users_count** | **float** | The number of students in this group | +**read_only** | **bool** | `true` if the properties and members of this group are in in read-only | +**tags** | **List[str]** | Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts | + +## Example + +```python +from flat_api.models.group_details import GroupDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupDetails from a JSON string +group_details_instance = GroupDetails.from_json(json) +# print the JSON string representation of the object +print(GroupDetails.to_json()) + +# convert the object into a dict +group_details_dict = group_details_instance.to_dict() +# create an instance of GroupDetails from a dict +group_details_from_dict = GroupDetails.from_dict(group_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/GroupType.md b/docs/reference/GroupType.md new file mode 100644 index 0000000..a341904 --- /dev/null +++ b/docs/reference/GroupType.md @@ -0,0 +1,19 @@ +# GroupType + +The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. + +## Enum + +* `GENERIC` (value: `'generic'`) + +* `CLASSTEACHERS` (value: `'classTeachers'`) + +* `CLASSSTUDENTS` (value: `'classStudents'`) + +* `CLASSSTUDENTSSUBGROUP` (value: `'classStudentsSubGroup'`) + +* `ASSIGNMENTSTUDENTSSUBGROUP` (value: `'assignmentStudentsSubGroup'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LicenseMode.md b/docs/reference/LicenseMode.md similarity index 64% rename from docs/LicenseMode.md rename to docs/reference/LicenseMode.md index 2bd237c..266fa97 100644 --- a/docs/LicenseMode.md +++ b/docs/reference/LicenseMode.md @@ -2,10 +2,11 @@ Mode of the license -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `CREDIT` (value: `'credit'`) + +* `SITE` (value: `'site'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/LicenseSources.md b/docs/reference/LicenseSources.md new file mode 100644 index 0000000..a487211 --- /dev/null +++ b/docs/reference/LicenseSources.md @@ -0,0 +1,25 @@ +# LicenseSources + +Source of the license + +## Enum + +* `ORDER` (value: `'order'`) + +* `TRIAL` (value: `'trial'`) + +* `VOUCHER` (value: `'voucher'`) + +* `DISTRIBUTOR` (value: `'distributor'`) + +* `SUBSCRIPTION` (value: `'subscription'`) + +* `APPSTORE` (value: `'appStore'`) + +* `PLAYSTORE` (value: `'playStore'`) + +* `MUSICFIRST` (value: `'musicfirst'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LmsName.md b/docs/reference/LmsName.md new file mode 100644 index 0000000..5633b10 --- /dev/null +++ b/docs/reference/LmsName.md @@ -0,0 +1,25 @@ +# LmsName + +LMS name + +## Enum + +* `CANVAS` (value: `'canvas'`) + +* `MOODLE` (value: `'moodle'`) + +* `SCHOOLOGY` (value: `'schoology'`) + +* `BLACKBOARD` (value: `'blackboard'`) + +* `DESIRE2LEARN` (value: `'desire2learn'`) + +* `SAKAI` (value: `'sakai'`) + +* `SCHOOLBOX` (value: `'schoolbox'`) + +* `OTHER` (value: `'other'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration.md b/docs/reference/LtiConfiguration.md new file mode 100644 index 0000000..3b0b8d0 --- /dev/null +++ b/docs/reference/LtiConfiguration.md @@ -0,0 +1,64 @@ +# LtiConfiguration + +LTI configuration details (unified 1.1 and 1.3) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.3) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**consumer_key** | **str** | LTI 1.1 consumer key | [optional] +**consumer_secret** | **str** | LTI 1.1 consumer secret (only included for admins) | [optional] +**lms** | **str** | LMS type | [optional] +**name** | **str** | Configuration name | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**mode** | **str** | Dynamic registration LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] +**parent_id** | **str** | Parent configuration ID (for deployment-based configs) | [optional] +**deployment_key** | **str** | Deployment key (e.g., schoology, classlink) | [optional] +**deployment_breakdown_by** | **str** | Custom claim used for tenant identification (parent platforms only, read-only) | [optional] +**deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (child platforms only) | [optional] +**registration_token** | **str** | Only included for admins | [optional] +**registration_url** | **str** | Dynamic registration URL (only included for admins when available) | [optional] +**registration_token_used** | **bool** | Whether dynamic registration token has been used | [optional] +**registration_completion_date** | **datetime** | Date when dynamic registration completed (null when not completed) | [optional] + +## Example + +```python +from flat_api.models.lti_configuration import LtiConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration from a JSON string +lti_configuration_instance = LtiConfiguration.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration.to_json()) + +# convert the object into a dict +lti_configuration_dict = lti_configuration_instance.to_dict() +# create an instance of LtiConfiguration from a dict +lti_configuration_from_dict = LtiConfiguration.from_dict(lti_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p1.md b/docs/reference/LtiConfiguration1p1.md new file mode 100644 index 0000000..c520f80 --- /dev/null +++ b/docs/reference/LtiConfiguration1p1.md @@ -0,0 +1,41 @@ +# LtiConfiguration1p1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.1) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**consumer_key** | **str** | LTI 1.1 consumer key | [optional] +**consumer_secret** | **str** | LTI 1.1 consumer secret (only included for admins) | [optional] +**lms** | **str** | LMS type | [optional] +**name** | **str** | Configuration name | [optional] +**tool** | [**LtiConfiguration1p1AllOfTool**](LtiConfiguration1p1AllOfTool.md) | | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p1 import LtiConfiguration1p1 + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p1 from a JSON string +lti_configuration1p1_instance = LtiConfiguration1p1.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p1.to_json()) + +# convert the object into a dict +lti_configuration1p1_dict = lti_configuration1p1_instance.to_dict() +# create an instance of LtiConfiguration1p1 from a dict +lti_configuration1p1_from_dict = LtiConfiguration1p1.from_dict(lti_configuration1p1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p1AllOfTool.md b/docs/reference/LtiConfiguration1p1AllOfTool.md new file mode 100644 index 0000000..a201f6c --- /dev/null +++ b/docs/reference/LtiConfiguration1p1AllOfTool.md @@ -0,0 +1,35 @@ +# LtiConfiguration1p1AllOfTool + +Platform/tool product information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | **str** | Product family code (e.g., canvas, moodle, schoology) | [optional] +**version** | **str** | Platform version string | [optional] +**instance_name** | **str** | Instance display name | [optional] +**instance_guid** | **str** | Unique instance identifier | [optional] +**instance_contact** | **str** | Contact email or handle for the instance | [optional] +**instance_domain** | **str** | Instance root domain | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p1AllOfTool from a JSON string +lti_configuration1p1_all_of_tool_instance = LtiConfiguration1p1AllOfTool.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p1AllOfTool.to_json()) + +# convert the object into a dict +lti_configuration1p1_all_of_tool_dict = lti_configuration1p1_all_of_tool_instance.to_dict() +# create an instance of LtiConfiguration1p1AllOfTool from a dict +lti_configuration1p1_all_of_tool_from_dict = LtiConfiguration1p1AllOfTool.from_dict(lti_configuration1p1_all_of_tool_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3.md b/docs/reference/LtiConfiguration1p3.md new file mode 100644 index 0000000..d777bae --- /dev/null +++ b/docs/reference/LtiConfiguration1p3.md @@ -0,0 +1,60 @@ +# LtiConfiguration1p3 + +LTI 1.3 configuration details + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.3) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**mode** | **str** | Dynamic registration LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] +**parent_id** | **str** | Parent configuration ID (for deployment-based configs) | [optional] +**deployment_key** | **str** | Deployment key (e.g., schoology, classlink) | [optional] +**deployment_breakdown_by** | **str** | Custom claim used for tenant identification (parent platforms only, read-only) | [optional] +**deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (child platforms only) | [optional] +**registration_token** | **str** | Only included for admins | [optional] +**registration_url** | **str** | Dynamic registration URL (only included for admins when available) | [optional] +**registration_token_used** | **bool** | Whether dynamic registration token has been used | [optional] +**registration_completion_date** | **datetime** | Date when dynamic registration completed (null when not completed) | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3 import LtiConfiguration1p3 + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3 from a JSON string +lti_configuration1p3_instance = LtiConfiguration1p3.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3.to_json()) + +# convert the object into a dict +lti_configuration1p3_dict = lti_configuration1p3_instance.to_dict() +# create an instance of LtiConfiguration1p3 from a dict +lti_configuration1p3_from_dict = LtiConfiguration1p3.from_dict(lti_configuration1p3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3Base.md b/docs/reference/LtiConfiguration1p3Base.md new file mode 100644 index 0000000..1985ac8 --- /dev/null +++ b/docs/reference/LtiConfiguration1p3Base.md @@ -0,0 +1,43 @@ +# LtiConfiguration1p3Base + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base import LtiConfiguration1p3Base + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3Base from a JSON string +lti_configuration1p3_base_instance = LtiConfiguration1p3Base.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3Base.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_dict = lti_configuration1p3_base_instance.to_dict() +# create an instance of LtiConfiguration1p3Base from a dict +lti_configuration1p3_base_from_dict = LtiConfiguration1p3Base.from_dict(lti_configuration1p3_base_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServices.md b/docs/reference/LtiConfiguration1p3BaseSupportedServices.md new file mode 100644 index 0000000..89ed2d6 --- /dev/null +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServices.md @@ -0,0 +1,32 @@ +# LtiConfiguration1p3BaseSupportedServices + +LTI services support information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ags** | [**LtiConfiguration1p3BaseSupportedServicesAgs**](LtiConfiguration1p3BaseSupportedServicesAgs.md) | | [optional] +**nrps** | [**LtiConfiguration1p3BaseSupportedServicesNrps**](LtiConfiguration1p3BaseSupportedServicesNrps.md) | | [optional] +**deep_linking** | [**LtiConfiguration1p3BaseSupportedServicesDeepLinking**](LtiConfiguration1p3BaseSupportedServicesDeepLinking.md) | | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3BaseSupportedServices from a JSON string +lti_configuration1p3_base_supported_services_instance = LtiConfiguration1p3BaseSupportedServices.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3BaseSupportedServices.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_supported_services_dict = lti_configuration1p3_base_supported_services_instance.to_dict() +# create an instance of LtiConfiguration1p3BaseSupportedServices from a dict +lti_configuration1p3_base_supported_services_from_dict = LtiConfiguration1p3BaseSupportedServices.from_dict(lti_configuration1p3_base_supported_services_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md b/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md new file mode 100644 index 0000000..ed0789e --- /dev/null +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md @@ -0,0 +1,33 @@ +# LtiConfiguration1p3BaseSupportedServicesAgs + +Assignment and Grade Services support + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | Whether AGS claims were detected in launches from this platform | [optional] +**version** | **str** | AGS version supported (e.g., \"2.0\") | [optional] +**enabled** | **bool** | Whether we have AGS enabled for this platform | [optional] +**lineitems_url** | **str** | Base URL for line items operations as provided by the platform | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a JSON string +lti_configuration1p3_base_supported_services_ags_instance = LtiConfiguration1p3BaseSupportedServicesAgs.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3BaseSupportedServicesAgs.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_supported_services_ags_dict = lti_configuration1p3_base_supported_services_ags_instance.to_dict() +# create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a dict +lti_configuration1p3_base_supported_services_ags_from_dict = LtiConfiguration1p3BaseSupportedServicesAgs.from_dict(lti_configuration1p3_base_supported_services_ags_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServicesDeepLinking.md b/docs/reference/LtiConfiguration1p3BaseSupportedServicesDeepLinking.md new file mode 100644 index 0000000..16d363e --- /dev/null +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServicesDeepLinking.md @@ -0,0 +1,31 @@ +# LtiConfiguration1p3BaseSupportedServicesDeepLinking + +Deep Linking support + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | Whether Deep Linking claims were detected in launches from this platform | [optional] +**version** | **str** | Deep Linking version supported (e.g., \"2.0\") | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a JSON string +lti_configuration1p3_base_supported_services_deep_linking_instance = LtiConfiguration1p3BaseSupportedServicesDeepLinking.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3BaseSupportedServicesDeepLinking.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_supported_services_deep_linking_dict = lti_configuration1p3_base_supported_services_deep_linking_instance.to_dict() +# create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a dict +lti_configuration1p3_base_supported_services_deep_linking_from_dict = LtiConfiguration1p3BaseSupportedServicesDeepLinking.from_dict(lti_configuration1p3_base_supported_services_deep_linking_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md b/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md new file mode 100644 index 0000000..d5b44c2 --- /dev/null +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md @@ -0,0 +1,32 @@ +# LtiConfiguration1p3BaseSupportedServicesNrps + +Names and Role Provisioning Services support + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | Whether NRPS claims were detected in launches from this platform | [optional] +**version** | **str** | NRPS version supported (e.g., \"2.0\") | [optional] +**enabled** | **bool** | Whether we have NRPS enabled for this platform | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a JSON string +lti_configuration1p3_base_supported_services_nrps_instance = LtiConfiguration1p3BaseSupportedServicesNrps.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3BaseSupportedServicesNrps.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_supported_services_nrps_dict = lti_configuration1p3_base_supported_services_nrps_instance.to_dict() +# create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a dict +lti_configuration1p3_base_supported_services_nrps_from_dict = LtiConfiguration1p3BaseSupportedServicesNrps.from_dict(lti_configuration1p3_base_supported_services_nrps_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3BaseTool.md b/docs/reference/LtiConfiguration1p3BaseTool.md new file mode 100644 index 0000000..83b656c --- /dev/null +++ b/docs/reference/LtiConfiguration1p3BaseTool.md @@ -0,0 +1,35 @@ +# LtiConfiguration1p3BaseTool + +Platform/tool product information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | **str** | Product family code (e.g., canvas, moodle, schoology) | [optional] +**version** | **str** | Platform version string | [optional] +**instance_name** | **str** | Instance name (e.g., 'My University Canvas') | [optional] +**instance_guid** | **str** | Unique instance identifier | [optional] +**instance_contact** | **str** | Contact email or handle for the instance | [optional] +**instance_domain** | **str** | Instance root domain | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3BaseTool from a JSON string +lti_configuration1p3_base_tool_instance = LtiConfiguration1p3BaseTool.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3BaseTool.to_json()) + +# convert the object into a dict +lti_configuration1p3_base_tool_dict = lti_configuration1p3_base_tool_instance.to_dict() +# create an instance of LtiConfiguration1p3BaseTool from a dict +lti_configuration1p3_base_tool_from_dict = LtiConfiguration1p3BaseTool.from_dict(lti_configuration1p3_base_tool_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3Deployment.md b/docs/reference/LtiConfiguration1p3Deployment.md new file mode 100644 index 0000000..8b0e22d --- /dev/null +++ b/docs/reference/LtiConfiguration1p3Deployment.md @@ -0,0 +1,55 @@ +# LtiConfiguration1p3Deployment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.3) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**mode** | **str** | Deployment-based LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] +**parent_id** | **str** | Parent configuration ID (for deployment-based configs) | [optional] +**deployment_key** | **str** | Deployment key (e.g., schoology, classlink) | [optional] +**deployment_breakdown_by** | **str** | Custom claim used for tenant identification (parent platforms only, read-only) | [optional] +**deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (child platforms only) | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3Deployment from a JSON string +lti_configuration1p3_deployment_instance = LtiConfiguration1p3Deployment.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3Deployment.to_json()) + +# convert the object into a dict +lti_configuration1p3_deployment_dict = lti_configuration1p3_deployment_instance.to_dict() +# create an instance of LtiConfiguration1p3Deployment from a dict +lti_configuration1p3_deployment_from_dict = LtiConfiguration1p3Deployment.from_dict(lti_configuration1p3_deployment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3Dynamic.md b/docs/reference/LtiConfiguration1p3Dynamic.md new file mode 100644 index 0000000..fecb324 --- /dev/null +++ b/docs/reference/LtiConfiguration1p3Dynamic.md @@ -0,0 +1,55 @@ +# LtiConfiguration1p3Dynamic + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.3) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**mode** | **str** | Dynamic registration LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] +**registration_token** | **str** | Only included for admins | [optional] +**registration_url** | **str** | Dynamic registration URL (only included for admins when available) | [optional] +**registration_token_used** | **bool** | Whether dynamic registration token has been used | [optional] +**registration_completion_date** | **datetime** | Date when dynamic registration completed (null when not completed) | [optional] + +## Example + +```python +from flat_api.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3Dynamic from a JSON string +lti_configuration1p3_dynamic_instance = LtiConfiguration1p3Dynamic.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3Dynamic.to_json()) + +# convert the object into a dict +lti_configuration1p3_dynamic_dict = lti_configuration1p3_dynamic_instance.to_dict() +# create an instance of LtiConfiguration1p3Dynamic from a dict +lti_configuration1p3_dynamic_from_dict = LtiConfiguration1p3Dynamic.from_dict(lti_configuration1p3_dynamic_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfiguration1p3Manual.md b/docs/reference/LtiConfiguration1p3Manual.md new file mode 100644 index 0000000..4881a47 --- /dev/null +++ b/docs/reference/LtiConfiguration1p3Manual.md @@ -0,0 +1,51 @@ +# LtiConfiguration1p3Manual + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version (1.3) | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] +**mode** | **str** | Manual LTI 1.3 configuration mode | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment ID linking the tool to a tenant/class (varies by platform) | [optional] +**access_token_url** | **str** | OAuth2 token endpoint (for AGS/NRPS) | [optional] +**authorization_url** | **str** | OIDC authorization/login endpoint | [optional] +**jwks_url** | **str** | Platform JWKS endpoint (public keys) | [optional] +**deployment_mode** | **str** | Deployment mode (single for organization-specific, multi for shared parent platforms) | [optional] +**supported_services** | [**LtiConfiguration1p3BaseSupportedServices**](LtiConfiguration1p3BaseSupportedServices.md) | | [optional] +**tool** | [**LtiConfiguration1p3BaseTool**](LtiConfiguration1p3BaseTool.md) | | [optional] +**public_keyset_url** | **str** | Public keyset URL for the platform to retrieve Flat's public keys | [optional] +**initiate_login_url** | **str** | URL for the platform to initiate LTI login | [optional] +**redirect_uris** | **List[str]** | Allowed redirect URIs for LTI launches | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] + +## Example + +```python +from flat_api.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfiguration1p3Manual from a JSON string +lti_configuration1p3_manual_instance = LtiConfiguration1p3Manual.from_json(json) +# print the JSON string representation of the object +print(LtiConfiguration1p3Manual.to_json()) + +# convert the object into a dict +lti_configuration1p3_manual_dict = lti_configuration1p3_manual_instance.to_dict() +# create an instance of LtiConfiguration1p3Manual from a dict +lti_configuration1p3_manual_from_dict = LtiConfiguration1p3Manual.from_dict(lti_configuration1p3_manual_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationBase.md b/docs/reference/LtiConfigurationBase.md new file mode 100644 index 0000000..81d07d1 --- /dev/null +++ b/docs/reference/LtiConfigurationBase.md @@ -0,0 +1,36 @@ +# LtiConfigurationBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Configuration ID | +**lti_version** | **str** | LTI version | +**organization_id** | **str** | Organization ID | [optional] +**organization_name** | **str** | Organization name | [optional] +**creator_id** | **str** | ID of the user who created this configuration | [optional] +**creation_date** | **datetime** | Configuration creation date | +**last_used_date** | **datetime** | Last time this configuration was used | [optional] +**status** | **str** | Configuration status indicator | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_base import LtiConfigurationBase + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationBase from a JSON string +lti_configuration_base_instance = LtiConfigurationBase.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationBase.to_json()) + +# convert the object into a dict +lti_configuration_base_dict = lti_configuration_base_instance.to_dict() +# create an instance of LtiConfigurationBase from a dict +lti_configuration_base_from_dict = LtiConfigurationBase.from_dict(lti_configuration_base_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate.md b/docs/reference/LtiConfigurationCreate.md new file mode 100644 index 0000000..a8ab2a7 --- /dev/null +++ b/docs/reference/LtiConfigurationCreate.md @@ -0,0 +1,44 @@ +# LtiConfigurationCreate + +Request to create a new LTI configuration (unified 1.1 and 1.3) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.3 manual creation mode | +**name** | **str** | Display name for LTI 1.1 credentials | [optional] +**lms** | **str** | LMS identifier for LTI 1.1 credentials | [optional] +**platform_info** | [**LtiConfigurationCreate1p3DynamicPlatformInfo**](LtiConfigurationCreate1p3DynamicPlatformInfo.md) | | [optional] +**locale** | **str** | Optional locale code for registration URL. Input values will be automatically normalized to a supported locale code. | [optional] +**deployment_type** | **str** | Parent platform key (e.g., canvas, blackboard, schoology, classlink) | +**deployment_id** | **str** | Deployment identifier provided by the platform | +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology) | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**access_token_url** | **str** | Platform access token endpoint URL | [optional] +**authorization_url** | **str** | Platform OIDC authorization endpoint URL | [optional] +**jwks_url** | **str** | Platform JWKS endpoint URL for public keys | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create import LtiConfigurationCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate from a JSON string +lti_configuration_create_instance = LtiConfigurationCreate.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate.to_json()) + +# convert the object into a dict +lti_configuration_create_dict = lti_configuration_create_instance.to_dict() +# create an instance of LtiConfigurationCreate from a dict +lti_configuration_create_from_dict = LtiConfigurationCreate.from_dict(lti_configuration_create_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate1p1.md b/docs/reference/LtiConfigurationCreate1p1.md new file mode 100644 index 0000000..72d285e --- /dev/null +++ b/docs/reference/LtiConfigurationCreate1p1.md @@ -0,0 +1,32 @@ +# LtiConfigurationCreate1p1 + +LTI 1.1 manual configuration creation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.1 manual creation mode | +**name** | **str** | Display name for LTI 1.1 credentials | [optional] +**lms** | **str** | LMS identifier for LTI 1.1 credentials | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate1p1 from a JSON string +lti_configuration_create1p1_instance = LtiConfigurationCreate1p1.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate1p1.to_json()) + +# convert the object into a dict +lti_configuration_create1p1_dict = lti_configuration_create1p1_instance.to_dict() +# create an instance of LtiConfigurationCreate1p1 from a dict +lti_configuration_create1p1_from_dict = LtiConfigurationCreate1p1.from_dict(lti_configuration_create1p1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate1p3Deployment.md b/docs/reference/LtiConfigurationCreate1p3Deployment.md new file mode 100644 index 0000000..8999622 --- /dev/null +++ b/docs/reference/LtiConfigurationCreate1p3Deployment.md @@ -0,0 +1,34 @@ +# LtiConfigurationCreate1p3Deployment + +LTI 1.3 deployment-based configuration creation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.3 deployment-based creation mode | +**deployment_type** | **str** | Parent platform key (e.g., canvas, blackboard, schoology, classlink) | +**deployment_id** | **str** | Deployment identifier provided by the platform | +**client_id** | **str** | OAuth2 client_id for the tenant; required for ClassLink deployments | [optional] +**deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology) | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate1p3Deployment from a JSON string +lti_configuration_create1p3_deployment_instance = LtiConfigurationCreate1p3Deployment.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate1p3Deployment.to_json()) + +# convert the object into a dict +lti_configuration_create1p3_deployment_dict = lti_configuration_create1p3_deployment_instance.to_dict() +# create an instance of LtiConfigurationCreate1p3Deployment from a dict +lti_configuration_create1p3_deployment_from_dict = LtiConfigurationCreate1p3Deployment.from_dict(lti_configuration_create1p3_deployment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate1p3Dynamic.md b/docs/reference/LtiConfigurationCreate1p3Dynamic.md new file mode 100644 index 0000000..07c6d1c --- /dev/null +++ b/docs/reference/LtiConfigurationCreate1p3Dynamic.md @@ -0,0 +1,32 @@ +# LtiConfigurationCreate1p3Dynamic + +LTI 1.3 dynamic registration configuration creation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.3 dynamic registration mode | +**platform_info** | [**LtiConfigurationCreate1p3DynamicPlatformInfo**](LtiConfigurationCreate1p3DynamicPlatformInfo.md) | | [optional] +**locale** | **str** | Optional locale code for registration URL. Input values will be automatically normalized to a supported locale code. | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate1p3Dynamic from a JSON string +lti_configuration_create1p3_dynamic_instance = LtiConfigurationCreate1p3Dynamic.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate1p3Dynamic.to_json()) + +# convert the object into a dict +lti_configuration_create1p3_dynamic_dict = lti_configuration_create1p3_dynamic_instance.to_dict() +# create an instance of LtiConfigurationCreate1p3Dynamic from a dict +lti_configuration_create1p3_dynamic_from_dict = LtiConfigurationCreate1p3Dynamic.from_dict(lti_configuration_create1p3_dynamic_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate1p3DynamicPlatformInfo.md b/docs/reference/LtiConfigurationCreate1p3DynamicPlatformInfo.md new file mode 100644 index 0000000..7e8b0ae --- /dev/null +++ b/docs/reference/LtiConfigurationCreate1p3DynamicPlatformInfo.md @@ -0,0 +1,31 @@ +# LtiConfigurationCreate1p3DynamicPlatformInfo + +Optional platform information for dynamic registration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Platform display name | [optional] +**url** | **str** | Optional platform homepage or admin URL for reference | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a JSON string +lti_configuration_create1p3_dynamic_platform_info_instance = LtiConfigurationCreate1p3DynamicPlatformInfo.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate1p3DynamicPlatformInfo.to_json()) + +# convert the object into a dict +lti_configuration_create1p3_dynamic_platform_info_dict = lti_configuration_create1p3_dynamic_platform_info_instance.to_dict() +# create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a dict +lti_configuration_create1p3_dynamic_platform_info_from_dict = LtiConfigurationCreate1p3DynamicPlatformInfo.from_dict(lti_configuration_create1p3_dynamic_platform_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationCreate1p3Manual.md b/docs/reference/LtiConfigurationCreate1p3Manual.md new file mode 100644 index 0000000..c2de4a4 --- /dev/null +++ b/docs/reference/LtiConfigurationCreate1p3Manual.md @@ -0,0 +1,38 @@ +# LtiConfigurationCreate1p3Manual + +LTI 1.3 manual configuration creation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **str** | LTI 1.3 manual creation mode | +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**deployment_id** | **str** | Deployment identifier provided by the platform | [optional] +**access_token_url** | **str** | Platform access token endpoint URL | [optional] +**authorization_url** | **str** | Platform OIDC authorization endpoint URL | [optional] +**jwks_url** | **str** | Platform JWKS endpoint URL for public keys | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationCreate1p3Manual from a JSON string +lti_configuration_create1p3_manual_instance = LtiConfigurationCreate1p3Manual.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationCreate1p3Manual.to_json()) + +# convert the object into a dict +lti_configuration_create1p3_manual_dict = lti_configuration_create1p3_manual_instance.to_dict() +# create an instance of LtiConfigurationCreate1p3Manual from a dict +lti_configuration_create1p3_manual_from_dict = LtiConfigurationCreate1p3Manual.from_dict(lti_configuration_create1p3_manual_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationUpdate.md b/docs/reference/LtiConfigurationUpdate.md new file mode 100644 index 0000000..c68b899 --- /dev/null +++ b/docs/reference/LtiConfigurationUpdate.md @@ -0,0 +1,38 @@ +# LtiConfigurationUpdate + +Update an existing LTI 1.3 configuration (deployment clone or standalone) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deployment_id** | **str** | Deployment identifier provided by the platform | [optional] +**deployment_breakdown_id** | **str** | Specific tenant identifier for multi-tenant platforms | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**access_token_url** | **str** | Platform access token endpoint URL | [optional] +**authorization_url** | **str** | Platform OIDC authorization endpoint URL | [optional] +**jwks_url** | **str** | Platform JWKS endpoint URL for public keys | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_update import LtiConfigurationUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationUpdate from a JSON string +lti_configuration_update_instance = LtiConfigurationUpdate.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationUpdate.to_json()) + +# convert the object into a dict +lti_configuration_update_dict = lti_configuration_update_instance.to_dict() +# create an instance of LtiConfigurationUpdate from a dict +lti_configuration_update_from_dict = LtiConfigurationUpdate.from_dict(lti_configuration_update_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationUpdateDeployment.md b/docs/reference/LtiConfigurationUpdateDeployment.md new file mode 100644 index 0000000..5a2cda6 --- /dev/null +++ b/docs/reference/LtiConfigurationUpdateDeployment.md @@ -0,0 +1,32 @@ +# LtiConfigurationUpdateDeployment + +Update fields allowed for deployment-based configurations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deployment_id** | **str** | Deployment identifier provided by the platform | [optional] +**deployment_breakdown_id** | **str** | Specific tenant identifier for multi-tenant platforms | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationUpdateDeployment from a JSON string +lti_configuration_update_deployment_instance = LtiConfigurationUpdateDeployment.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationUpdateDeployment.to_json()) + +# convert the object into a dict +lti_configuration_update_deployment_dict = lti_configuration_update_deployment_instance.to_dict() +# create an instance of LtiConfigurationUpdateDeployment from a dict +lti_configuration_update_deployment_from_dict = LtiConfigurationUpdateDeployment.from_dict(lti_configuration_update_deployment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/LtiConfigurationUpdateStandalone.md b/docs/reference/LtiConfigurationUpdateStandalone.md new file mode 100644 index 0000000..4039a21 --- /dev/null +++ b/docs/reference/LtiConfigurationUpdateStandalone.md @@ -0,0 +1,37 @@ +# LtiConfigurationUpdateStandalone + +Update fields allowed for standalone (manual/dynamic) configurations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deployment_id** | **str** | Deployment identifier provided by the platform | [optional] +**platform_iss** | **str** | Platform issuer URL | [optional] +**platform_name** | **str** | Platform display name | [optional] +**client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] +**access_token_url** | **str** | Platform access token endpoint URL | [optional] +**authorization_url** | **str** | Platform OIDC authorization endpoint URL | [optional] +**jwks_url** | **str** | Platform JWKS endpoint URL for public keys | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication | [optional] + +## Example + +```python +from flat_api.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone + +# TODO update the JSON string below +json = "{}" +# create an instance of LtiConfigurationUpdateStandalone from a JSON string +lti_configuration_update_standalone_instance = LtiConfigurationUpdateStandalone.from_json(json) +# print the JSON string representation of the object +print(LtiConfigurationUpdateStandalone.to_json()) + +# convert the object into a dict +lti_configuration_update_standalone_dict = lti_configuration_update_standalone_instance.to_dict() +# create an instance of LtiConfigurationUpdateStandalone from a dict +lti_configuration_update_standalone_from_dict = LtiConfigurationUpdateStandalone.from_dict(lti_configuration_update_standalone_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LtiCredentials.md b/docs/reference/LtiCredentials.md similarity index 70% rename from docs/LtiCredentials.md rename to docs/reference/LtiCredentials.md index 8429659..afb3743 100644 --- a/docs/LtiCredentials.md +++ b/docs/reference/LtiCredentials.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **last_usage** | **datetime** | The last time these credentials were used | [optional] **consumer_key** | **str** | OAuth 1 Consumer Key | [optional] **consumer_secret** | **str** | OAuth 1 Consumer Secret | [optional] +**enable_email_matching** | **bool** | Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. | [optional] [default to True] ## Example @@ -26,12 +27,12 @@ json = "{}" # create an instance of LtiCredentials from a JSON string lti_credentials_instance = LtiCredentials.from_json(json) # print the JSON string representation of the object -print LtiCredentials.to_json() +print(LtiCredentials.to_json()) # convert the object into a dict lti_credentials_dict = lti_credentials_instance.to_dict() # create an instance of LtiCredentials from a dict -lti_credentials_form_dict = lti_credentials.from_dict(lti_credentials_dict) +lti_credentials_from_dict = LtiCredentials.from_dict(lti_credentials_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LtiCredentialsCreation.md b/docs/reference/LtiCredentialsCreation.md similarity index 87% rename from docs/LtiCredentialsCreation.md rename to docs/reference/LtiCredentialsCreation.md index 894f13c..f587d6e 100644 --- a/docs/LtiCredentialsCreation.md +++ b/docs/reference/LtiCredentialsCreation.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of LtiCredentialsCreation from a JSON string lti_credentials_creation_instance = LtiCredentialsCreation.from_json(json) # print the JSON string representation of the object -print LtiCredentialsCreation.to_json() +print(LtiCredentialsCreation.to_json()) # convert the object into a dict lti_credentials_creation_dict = lti_credentials_creation_instance.to_dict() # create an instance of LtiCredentialsCreation from a dict -lti_credentials_creation_form_dict = lti_credentials_creation.from_dict(lti_credentials_creation_dict) +lti_credentials_creation_from_dict = LtiCredentialsCreation.from_dict(lti_credentials_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MediaAttachment.md b/docs/reference/MediaAttachment.md similarity index 81% rename from docs/MediaAttachment.md rename to docs/reference/MediaAttachment.md index 5397355..0c76378 100644 --- a/docs/MediaAttachment.md +++ b/docs/reference/MediaAttachment.md @@ -12,13 +12,14 @@ Name | Type | Description | Notes **worksheet** | **str** | An unique worksheet identifier | [optional] **dedicated** | **bool** | True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment | [optional] **track** | **str** | A unique track identifier | [optional] -**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] +**part_uuid** | **str** | The UUID of the instrument part selected for this attachment (for performance submissions) | [optional] +**sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] [default to MediaScoreSharingMode.READ] **lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] **title** | **str** | The resolved title of the attachment | [optional] **description** | **str** | The resolved description of the attachment | [optional] **html** | **str** | If the attachment type is `rich` or `video`, the HTML code of the media to display | [optional] -**html_width** | **str** | If the `html` is available, the width of the widget | [optional] -**html_height** | **str** | If the `html` is available, the height of the widget | [optional] +**html_width** | **float** | If the `html` is available, the width of the widget | [optional] +**html_height** | **float** | If the `html` is available, the height of the widget | [optional] **url** | **str** | The url of the attachment | [optional] **thumbnail_url** | **str** | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] **thumbnail_width** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] @@ -28,6 +29,7 @@ Name | Type | Description | Notes **icon_url** | **str** | The URL of the icon | [optional] **mime_type** | **str** | The mine type of the file | [optional] **google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] +**teacher_only** | **bool** | If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. | [optional] [default to False] ## Example @@ -39,12 +41,12 @@ json = "{}" # create an instance of MediaAttachment from a JSON string media_attachment_instance = MediaAttachment.from_json(json) # print the JSON string representation of the object -print MediaAttachment.to_json() +print(MediaAttachment.to_json()) # convert the object into a dict media_attachment_dict = media_attachment_instance.to_dict() # create an instance of MediaAttachment from a dict -media_attachment_form_dict = media_attachment.from_dict(media_attachment_dict) +media_attachment_from_dict = MediaAttachment.from_dict(media_attachment_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MediaScoreSharingMode.md b/docs/reference/MediaScoreSharingMode.md similarity index 65% rename from docs/MediaScoreSharingMode.md rename to docs/reference/MediaScoreSharingMode.md index 3d64f8f..4269686 100644 --- a/docs/MediaScoreSharingMode.md +++ b/docs/reference/MediaScoreSharingMode.md @@ -2,10 +2,15 @@ The sharing mode of the score for classes post and assignments -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `READ` (value: `'read'`) + +* `WRITE` (value: `'write'`) + +* `COPY` (value: `'copy'`) + +* `PERFORMANCE` (value: `'performance'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/MicrosoftGraphAssignment.md b/docs/reference/MicrosoftGraphAssignment.md new file mode 100644 index 0000000..1c522ce --- /dev/null +++ b/docs/reference/MicrosoftGraphAssignment.md @@ -0,0 +1,36 @@ +# MicrosoftGraphAssignment + +A Microsoft Teams assignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the assignment assigned by Microsoft Teams | [optional] +**state** | **str** | State of the assignment on Microsoft Teams. * `draft`: Assignment is in draft mode * `scheduled`: Assignment is scheduled to be published at a future date * `published`: Assignment has been published to students * `assigned`: Assignment has been assigned (legacy status) * `inactive`: Assignment is inactive | [optional] +**alternate_link** | **str** | Absolute link to this assignment in the Microsoft Teams web UI | [optional] +**assign_date_time** | **datetime** | The date when the assignment will become active on Microsoft Teams. If set to a future date, the assignment will have status `scheduled` and won't be visible to students until this date. | [optional] +**categories** | **List[str]** | List of categories where this assignment is published under | [optional] +**assign_to_type** | **str** | Recipient configuration for this assignment on Microsoft Teams. * `class`: Assignment is visible to all students in the class * `individual`: Assignment is visible only to specific assigned students | [optional] +**assigned_students_ms_ids** | **List[str]** | When assignToType is 'individual', array of Microsoft Azure user IDs of students assigned to this assignment. These are the students who can see and submit to this assignment on Teams. | [optional] + +## Example + +```python +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of MicrosoftGraphAssignment from a JSON string +microsoft_graph_assignment_instance = MicrosoftGraphAssignment.from_json(json) +# print the JSON string representation of the object +print(MicrosoftGraphAssignment.to_json()) + +# convert the object into a dict +microsoft_graph_assignment_dict = microsoft_graph_assignment_instance.to_dict() +# create an instance of MicrosoftGraphAssignment from a dict +microsoft_graph_assignment_from_dict = MicrosoftGraphAssignment.from_dict(microsoft_graph_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MicrosoftGraphSubmission.md b/docs/reference/MicrosoftGraphSubmission.md similarity index 86% rename from docs/MicrosoftGraphSubmission.md rename to docs/reference/MicrosoftGraphSubmission.md index 78dbe27..c013c41 100644 --- a/docs/MicrosoftGraphSubmission.md +++ b/docs/reference/MicrosoftGraphSubmission.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of MicrosoftGraphSubmission from a JSON string microsoft_graph_submission_instance = MicrosoftGraphSubmission.from_json(json) # print the JSON string representation of the object -print MicrosoftGraphSubmission.to_json() +print(MicrosoftGraphSubmission.to_json()) # convert the object into a dict microsoft_graph_submission_dict = microsoft_graph_submission_instance.to_dict() # create an instance of MicrosoftGraphSubmission from a dict -microsoft_graph_submission_form_dict = microsoft_graph_submission.from_dict(microsoft_graph_submission_dict) +microsoft_graph_submission_from_dict = MicrosoftGraphSubmission.from_dict(microsoft_graph_submission_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/OMRApi.md b/docs/reference/OMRApi.md new file mode 100644 index 0000000..9ebe02e --- /dev/null +++ b/docs/reference/OMRApi.md @@ -0,0 +1,1052 @@ +# flat_api.OMRApi + +All URIs are relative to *https://api.flat.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_omr_job_file**](OMRApi.md#add_omr_job_file) | **POST** /omr/jobs/{job}/files | Add a file to an OMR job +[**cancel_omr_job**](OMRApi.md#cancel_omr_job) | **POST** /omr/jobs/{job}/cancel | Cancel an OMR job +[**create_omr_job**](OMRApi.md#create_omr_job) | **POST** /omr/jobs | Create an OMR job +[**delete_omr_job**](OMRApi.md#delete_omr_job) | **DELETE** /omr/jobs/{job} | Delete an OMR job's data +[**get_omr_capabilities**](OMRApi.md#get_omr_capabilities) | **GET** /omr/capabilities | OMR capabilities and limits +[**get_omr_job**](OMRApi.md#get_omr_job) | **GET** /omr/jobs/{job} | Get an OMR job +[**get_omr_job_export**](OMRApi.md#get_omr_job_export) | **GET** /omr/jobs/{job}/exports/{format} | Download the finalized result +[**get_omr_job_file**](OMRApi.md#get_omr_job_file) | **GET** /omr/jobs/{job}/files/{index} | Get an input page image +[**list_billing_credits_history**](OMRApi.md#list_billing_credits_history) | **GET** /billing/credits/history | List credit history +[**list_omr_jobs**](OMRApi.md#list_omr_jobs) | **GET** /omr/jobs | List OMR jobs +[**start_omr_job**](OMRApi.md#start_omr_job) | **POST** /omr/jobs/{job}/start | Start an OMR job +[**submit_omr_job_step**](OMRApi.md#submit_omr_job_step) | **POST** /omr/jobs/{job}/steps/{step} | Submit an interactive step + + +# **add_omr_job_file** +> OmrJobFileUploadResult add_omr_job_file(job, omr_job_file_upload, x_flat_locale=x_flat_locale) + +Add a file to an OMR job + +Add one image or PDF to a draft job. Call once per file; files keep their upload order. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job_file_upload import OmrJobFileUpload +from flat_api.models.omr_job_file_upload_result import OmrJobFileUploadResult +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + omr_job_file_upload = flat_api.OmrJobFileUpload() # OmrJobFileUpload | + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Add a file to an OMR job + api_response = api_instance.add_omr_job_file(job, omr_job_file_upload, x_flat_locale=x_flat_locale) + print("The response of OMRApi->add_omr_job_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->add_omr_job_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **omr_job_file_upload** | [**OmrJobFileUpload**](OmrJobFileUpload.md)| | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJobFileUploadResult**](OmrJobFileUploadResult.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | File added | - | +**409** | Job is not in draft state | - | +**0** | Error | - | + +[[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) + +# **cancel_omr_job** +> OmrJob cancel_omr_job(job, x_flat_locale=x_flat_locale) + +Cancel an OMR job + +Cancel a draft or in-flight job. Any charged credits are reversed. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Cancel an OMR job + api_response = api_instance.cancel_omr_job(job, x_flat_locale=x_flat_locale) + print("The response of OMRApi->cancel_omr_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->cancel_omr_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Canceled | - | +**0** | Error | - | + +[[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) + +# **create_omr_job** +> OmrJob create_omr_job(omr_job_creation, x_flat_locale=x_flat_locale) + +Create an OMR job + +Create an Optical Music Recognition job. There are two ways to call this endpoint: + +* **Draft:** send the parameters without `files` to create an empty job, then add + files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple + images or incremental mobile capture. +* **One-shot:** include `files` and `autoStart: true` to import in a single request. + Best for a single PDF or a third-party integration. + +Declare the interactive steps your client supports in `interactiveSteps`: the pipeline +runs fully automatically and only pauses at the steps you list. Steps you do not list, +including ones added in the future, are auto-resolved with server defaults, so older +clients never break. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.models.omr_job_creation import OmrJobCreation +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + omr_job_creation = flat_api.OmrJobCreation() # OmrJobCreation | + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Create an OMR job + api_response = api_instance.create_omr_job(omr_job_creation, x_flat_locale=x_flat_locale) + print("The response of OMRApi->create_omr_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->create_omr_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **omr_job_creation** | [**OmrJobCreation**](OmrJobCreation.md)| | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Draft created | - | +**202** | One-shot job started (files provided with autoStart) | - | +**402** | Account overquota or feature not included | - | +**0** | Error | - | + +[[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) + +# **delete_omr_job** +> OmrJob delete_omr_job(job, x_flat_locale=x_flat_locale) + +Delete an OMR job's data + +Erase a job's uploaded files and recognition results now, instead of waiting for its +retention deadline. Use this to serve a deletion request from your own end user. + +Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps +the `status` it finished with, stays listable, and reports `retention.expiredDate`. +Downloads then fail with `OMR_JOB_EXPIRED`. + +Only available for jobs whose `output` is `musicxml`. Library imports are not covered +by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the +resulting score instead. + +The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job +is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never +cancels on your behalf, because cancellation reverses charged credits and that must +not happen as a side effect of erasing data. + +Calling this again on an already-erased job succeeds and changes nothing. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Delete an OMR job's data + api_response = api_instance.delete_omr_job(job, x_flat_locale=x_flat_locale) + print("The response of OMRApi->delete_omr_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->delete_omr_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Job data erased | - | +**403** | Not the owner of this job | - | +**404** | Job not found | - | +**409** | Job is not covered by the retention policy, or has not finished yet | - | +**0** | Error | - | + +[[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) + +# **get_omr_capabilities** +> OmrCapabilities get_omr_capabilities(x_flat_locale=x_flat_locale) + +OMR capabilities and limits + +Advertises the supported steps, export formats, limits, cost-per-page, remaining +credits and locales, so clients can feature-detect instead of hardcoding behavior. + +Authentication is optional: called without an account, the limits are those of the +free plan and `remainingCredits` is omitted. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_capabilities import OmrCapabilities +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # OMR capabilities and limits + api_response = api_instance.get_omr_capabilities(x_flat_locale=x_flat_locale) + print("The response of OMRApi->get_omr_capabilities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->get_omr_capabilities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrCapabilities**](OmrCapabilities.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Capabilities | - | +**0** | Error | - | + +[[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) + +# **get_omr_job** +> OmrJob get_omr_job(job, wait=wait, x_flat_locale=x_flat_locale) + +Get an OMR job + +Get the current state of an OMR job. This is the primary polling endpoint. Pass +`wait` to long-poll until the state changes. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + wait = 56 # int | Long-poll up to this many seconds for a state change before returning. (optional) + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Get an OMR job + api_response = api_instance.get_omr_job(job, wait=wait, x_flat_locale=x_flat_locale) + print("The response of OMRApi->get_omr_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->get_omr_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **wait** | **int**| Long-poll up to this many seconds for a state change before returning. | [optional] + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Job state | - | +**404** | Job not found | - | +**0** | Error | - | + +[[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) + +# **get_omr_job_export** +> bytes get_omr_job_export(job, format, x_flat_locale=x_flat_locale) + +Download the finalized result + +Stream the finalized result in the requested format. Available once the job is `done`. +For `output: musicxml` jobs this is the primary way to retrieve the result; no library +score is created. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + format = 'format_example' # str | Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Download the finalized result + api_response = api_instance.get_omr_job_export(job, format, x_flat_locale=x_flat_locale) + print("The response of OMRApi->get_omr_job_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->get_omr_job_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **format** | **str**| Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +**bytes** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Exported file (content type depends on the requested format) | * Content-Disposition - Attachment disposition carrying the recommended filename, derived from the score's resolved work title (RFC 5987 encoded for non-ASCII titles). Clients should use this filename when saving the download.
| +**404** | Format not available for this job | - | +**409** | Job is not finished yet (`OMR_JOB_NOT_DONE`), or its files have been erased by the data retention policy (`OMR_JOB_EXPIRED`). | - | +**0** | Error | - | + +[[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) + +# **get_omr_job_file** +> bytes get_omr_job_file(job, index, x_flat_locale=x_flat_locale) + +Get an input page image + +Fetch one of the job's input files (a page image or PDF) by index, for the review UI. + +Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read +`retention.expiredDate` on the job to tell that case apart before requesting a file. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + index = 56 # int | 0-based index of the input file (page) to fetch. + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Get an input page image + api_response = api_instance.get_omr_job_file(job, index, x_flat_locale=x_flat_locale) + print("The response of OMRApi->get_omr_job_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->get_omr_job_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **index** | **int**| 0-based index of the input file (page) to fetch. | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +**bytes** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: image/jpeg, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Page image | - | +**404** | Not found | - | +**409** | The job's files have been erased by the data retention policy | - | +**0** | Error | - | + +[[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) + +# **list_billing_credits_history** +> List[CreditTransaction] list_billing_credits_history(limit=limit, next=next, previous=previous) + +List credit history + +The credit ledger of the authenticated account, sorted by creation date descending +(most recent entry first). + +Every entry that moved the balance is listed: the deductions taken when an import +runs, and the top-ups added by a credit pack. + +Reversing a deduction does not add an entry, it flips the original one's `state` to +`canceled`. Canceled entries stay in the list, so an import that was charged and then +failed still shows its deduction rather than disappearing. Read `state` to tell the two +apart, and sum only `active` entries. A refund can additionally add a positive entry +when cancelling alone could not restore the full cost, for instance because the plan's +allowance has since reset. + +The current balance is not computed from this list: read it from `getOmrCapabilities`. + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.credit_transaction import CreditTransaction +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + + try: + # List credit history + api_response = api_instance.list_billing_credits_history(limit=limit, next=next, previous=previous) + print("The response of OMRApi->list_billing_credits_history:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->list_billing_credits_history: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 50] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + +### Return type + +[**List[CreditTransaction]**](CreditTransaction.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of credit transactions | * Link - Pagination links (next, previous)
| +**0** | Error | - | + +[[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) + +# **list_omr_jobs** +> List[OmrJob] list_omr_jobs(status=status, expired=expired, limit=limit, next=next, previous=previous, x_flat_locale=x_flat_locale) + +List OMR jobs + +List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.models.omr_job_status import OmrJobStatus +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + status = flat_api.OmrJobStatus() # OmrJobStatus | Filter jobs by status (optional) + expired = True # bool | Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. (optional) + limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # List OMR jobs + api_response = api_instance.list_omr_jobs(status=status, expired=expired, limit=limit, next=next, previous=previous, x_flat_locale=x_flat_locale) + print("The response of OMRApi->list_omr_jobs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->list_omr_jobs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**OmrJobStatus**](.md)| Filter jobs by status | [optional] + **expired** | **bool**| Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 50] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**List[OmrJob]**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of OMR jobs | * Link - Pagination links (next, previous)
| +**0** | Error | - | + +[[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) + +# **start_omr_job** +> OmrJob start_omr_job(job, x_flat_locale=x_flat_locale) + +Start an OMR job + +Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_job import OmrJob +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Start an OMR job + api_response = api_instance.start_omr_job(job, x_flat_locale=x_flat_locale) + print("The response of OMRApi->start_omr_job:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->start_omr_job: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Processing started | - | +**400** | No files attached | - | +**402** | Insufficient credits or quota | - | +**0** | Error | - | + +[[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) + +# **submit_omr_job_step** +> OmrJob submit_omr_job_step(job, step, body, x_flat_locale=x_flat_locale) + +Submit an interactive step + +Resolve the step the job is currently awaiting and resume the pipeline. The request +body shape depends on `step` (a `oneOf` discriminated by the step name). + + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.omr_details_submission import OmrDetailsSubmission +from flat_api.models.omr_job import OmrJob +from flat_api.models.omr_step_name import OmrStepName +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OMRApi(api_client) + job = 'job_example' # str | Unique identifier of the OMR job + step = flat_api.OmrStepName() # OmrStepName | The pending step being submitted + body = flat_api.OmrDetailsSubmission() # OmrDetailsSubmission | + x_flat_locale = 'fr' # str | Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. (optional) + + try: + # Submit an interactive step + api_response = api_instance.submit_omr_job_step(job, step, body, x_flat_locale=x_flat_locale) + print("The response of OMRApi->submit_omr_job_step:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OMRApi->submit_omr_job_step: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **job** | **str**| Unique identifier of the OMR job | + **step** | [**OmrStepName**](.md)| The pending step being submitted | + **body** | **OmrDetailsSubmission**| | + **x_flat_locale** | **str**| Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. | [optional] + +### Return type + +[**OmrJob**](OmrJob.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Step accepted, processing resumed | - | +**409** | Job is not awaiting this step | - | +**0** | Error | - | + +[[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) + diff --git a/docs/reference/OmrCapabilities.md b/docs/reference/OmrCapabilities.md new file mode 100644 index 0000000..a3b63c7 --- /dev/null +++ b/docs/reference/OmrCapabilities.md @@ -0,0 +1,43 @@ +# OmrCapabilities + +What the account or app can do, for client feature-detection. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**steps** | [**List[OmrStepName]**](OmrStepName.md) | Interactive steps this server supports. | +**formats** | **List[str]** | Export formats available via `getOmrJobExport`. | +**outputs** | [**List[OmrJobOutput]**](OmrJobOutput.md) | Output destinations the account can use when creating a job. | +**max_files** | **int** | Maximum number of input files that can be added to a single job. | +**max_pages** | **int** | Maximum number of pages allowed across all input files of a single job. | +**max_parallel_jobs** | **int** | Maximum number of OMR jobs that can run in parallel for this account. | +**max_file_size** | **int** | Maximum size of a single file, in bytes. | +**accepted_mime_types** | **List[str]** | MIME types accepted for input files: PDF, plus the raster image formats. Drive the file picker from this list rather than hardcoding it, so newly supported formats need no client release. A file is identified by its content, so its declared type and its extension do not have to match. A multi-page input counts as several pages against `maxPages` and is charged accordingly. That covers PDFs and, among the image formats, multi-page TIFF and animated GIF/WebP. | +**accepted_extensions** | **List[str]** | Filename extensions the accepted types appear under, for building a file picker. Use these alongside `acceptedMimeTypes` in an `accept` attribute: browsers and native file dialogs filter unreliably on some of the image types, so a valid file can be greyed out when only its MIME type is offered. Longer than `acceptedMimeTypes`, because one type arrives under several extensions (`.jpg` and `.jpeg`, `.tif` and `.tiff`, `.heic` and `.heif`). Picker metadata only. A file is identified by its content, so its extension never decides whether an upload is accepted. | +**cost_per_page** | **int** | Credits charged per page. | [optional] +**remaining_credits** | **int** | OMR credits remaining for the account. | [optional] +**retention_days** | **int** | How many days a `musicxml` job's uploaded files and results are kept before erasure. Reflects the account's own period when one has been set, otherwise the platform default. Read-only: contact support to change it. Jobs with `output: library` are not covered by the retention policy and are unaffected by this value. | [optional] +**locales** | **List[str]** | Locales selectable for OCR, as BCP 47 codes sorted alphabetically. These are the locales the recognition pipeline can actually read, which is neither the list of Flat interface locales nor a fixed set: new languages are added over time. Clients should default to the user's own locale when it appears here. | +**locales_details** | [**List[OmrLocaleDetails]**](OmrLocaleDetails.md) | The same locales as `locales`, each with its English display name, sorted alphabetically by `name` and ready to bind to a language picker. Prefer this over `locales` when rendering a selector: it saves clients from shipping their own code-to-label table. | + +## Example + +```python +from flat_api.models.omr_capabilities import OmrCapabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrCapabilities from a JSON string +omr_capabilities_instance = OmrCapabilities.from_json(json) +# print the JSON string representation of the object +print(OmrCapabilities.to_json()) + +# convert the object into a dict +omr_capabilities_dict = omr_capabilities_instance.to_dict() +# create an instance of OmrCapabilities from a dict +omr_capabilities_from_dict = OmrCapabilities.from_dict(omr_capabilities_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrDetailsStepData.md b/docs/reference/OmrDetailsStepData.md new file mode 100644 index 0000000..5127348 --- /dev/null +++ b/docs/reference/OmrDetailsStepData.md @@ -0,0 +1,32 @@ +# OmrDetailsStepData + +Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**step** | **str** | Discriminator for `OmrPendingStep.data`; always `details` for this payload. | +**title** | **str** | OCR-detected work title. | [optional] +**instruments** | [**List[OmrDetectedInstrument]**](OmrDetectedInstrument.md) | | + +## Example + +```python +from flat_api.models.omr_details_step_data import OmrDetailsStepData + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrDetailsStepData from a JSON string +omr_details_step_data_instance = OmrDetailsStepData.from_json(json) +# print the JSON string representation of the object +print(OmrDetailsStepData.to_json()) + +# convert the object into a dict +omr_details_step_data_dict = omr_details_step_data_instance.to_dict() +# create an instance of OmrDetailsStepData from a dict +omr_details_step_data_from_dict = OmrDetailsStepData.from_dict(omr_details_step_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrDetailsSubmission.md b/docs/reference/OmrDetailsSubmission.md new file mode 100644 index 0000000..9ccccf6 --- /dev/null +++ b/docs/reference/OmrDetailsSubmission.md @@ -0,0 +1,33 @@ +# OmrDetailsSubmission + +Overrides for the `details` step. Omitted fields keep the server's detected values. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**step** | **str** | Discriminator for `OmrStepSubmission`; always `details` for this submission. | +**title** | **str** | Override the detected work title. | [optional] +**main_language** | **str** | Override the main language (BCP 47) used for lyric and text reading on resume. Defaults to the job locale (`locales`); set this to correct it on the review screen. | [optional] +**instruments** | [**List[OmrInstrumentOverride]**](OmrInstrumentOverride.md) | Per-part overrides, each matched to a detected part by `index`. | [optional] + +## Example + +```python +from flat_api.models.omr_details_submission import OmrDetailsSubmission + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrDetailsSubmission from a JSON string +omr_details_submission_instance = OmrDetailsSubmission.from_json(json) +# print the JSON string representation of the object +print(OmrDetailsSubmission.to_json()) + +# convert the object into a dict +omr_details_submission_dict = omr_details_submission_instance.to_dict() +# create an instance of OmrDetailsSubmission from a dict +omr_details_submission_from_dict = OmrDetailsSubmission.from_dict(omr_details_submission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrDetectedInstrument.md b/docs/reference/OmrDetectedInstrument.md new file mode 100644 index 0000000..d50e44f --- /dev/null +++ b/docs/reference/OmrDetectedInstrument.md @@ -0,0 +1,36 @@ +# OmrDetectedInstrument + +One detected part. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | 0-based position of the part in the score. | +**part_name** | **str** | Verbatim part name read from the score. | [optional] +**instrument_id** | **str** | Flat instrument ID in dotted `<group>.<instrument>` form, for example `brass.horn` or `vocals.voice-oohs`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments). Always the canonical (non-premium) ID. | [optional] +**instrument_name** | **str** | Localized display name, resolved server-side so the client needs no instruments dictionary. | [optional] +**midi_program** | **int** | General MIDI program number. | [optional] +**transpose_key** | **str** | Transposition or written key shown in the UI, for example `F` for Horn in F. | [optional] +**resolved_confidence** | **str** | Server confidence in the resolved instrument match. | [optional] + +## Example + +```python +from flat_api.models.omr_detected_instrument import OmrDetectedInstrument + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrDetectedInstrument from a JSON string +omr_detected_instrument_instance = OmrDetectedInstrument.from_json(json) +# print the JSON string representation of the object +print(OmrDetectedInstrument.to_json()) + +# convert the object into a dict +omr_detected_instrument_dict = omr_detected_instrument_instance.to_dict() +# create an instance of OmrDetectedInstrument from a dict +omr_detected_instrument_from_dict = OmrDetectedInstrument.from_dict(omr_detected_instrument_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrImportedMetadata.md b/docs/reference/OmrImportedMetadata.md new file mode 100644 index 0000000..e435e78 --- /dev/null +++ b/docs/reference/OmrImportedMetadata.md @@ -0,0 +1,33 @@ +# OmrImportedMetadata + +Metadata extracted from the recognized score. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instruments** | **List[str]** | Instrument IDs of the assembled parts. | [optional] +**number_measures** | **int** | Number of measures in the recognized score. | [optional] +**main_tempo_qpm** | **float** | Main tempo, in quarter notes per minute. | [optional] +**main_key_signature** | **int** | Main key signature as a fifths count (negative for flats, positive for sharps, 0 for C major / A minor). | [optional] + +## Example + +```python +from flat_api.models.omr_imported_metadata import OmrImportedMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrImportedMetadata from a JSON string +omr_imported_metadata_instance = OmrImportedMetadata.from_json(json) +# print the JSON string representation of the object +print(OmrImportedMetadata.to_json()) + +# convert the object into a dict +omr_imported_metadata_dict = omr_imported_metadata_instance.to_dict() +# create an instance of OmrImportedMetadata from a dict +omr_imported_metadata_from_dict = OmrImportedMetadata.from_dict(omr_imported_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrInstrumentOverride.md b/docs/reference/OmrInstrumentOverride.md new file mode 100644 index 0000000..9ac242c --- /dev/null +++ b/docs/reference/OmrInstrumentOverride.md @@ -0,0 +1,34 @@ +# OmrInstrumentOverride + +Override for a single detected part, matched by `index`. Omitted fields keep the detected value. To set the instrument you may use **either** `instrumentId` (Flat's instrument id) **or** `midiProgram` (a standard General MIDI program) — whichever your integration prefers; you do not need both. If both are sent, `instrumentId` wins; otherwise `midiProgram` is resolved to the matching instrument; otherwise the detected instrument is kept. `transposeKey` and `partName` apply independently on top. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | 0-based position of the part to override, matching the `index` of the detected part. | +**instrument_id** | **str** | Override the resolved instrument with this Flat instrument id, for example `brass.horn`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for valid values. Both the dotted `<group>.<instrument>` form (`brass.horn`) and the bare instrument key (`horn`) are accepted. Use this or `midiProgram`. Takes precedence over `midiProgram` when both are set. | [optional] +**part_name** | **str** | Override the part name. | [optional] +**transpose_key** | **str** | Override the transposition / written key: a pitch class as a letter `A`-`G` with an optional accidental. For example `F` for Horn in F or `Bb` for a B flat clarinet. The accidental may be ASCII `b` (flat) or `#` (sharp), or the Unicode music glyphs `♭` (U+266D) and `♯` (U+266F). Unicode accidentals are normalized to their ASCII equivalent, so `B♭` is stored and returned as `Bb`. | [optional] +**midi_program** | **int** | Override the instrument with a standard General MIDI program number (0-127), resolved server-side to the matching Flat instrument. Use this when you do not want to map Flat instrument ids. Ignored if `instrumentId` is also set. | [optional] + +## Example + +```python +from flat_api.models.omr_instrument_override import OmrInstrumentOverride + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrInstrumentOverride from a JSON string +omr_instrument_override_instance = OmrInstrumentOverride.from_json(json) +# print the JSON string representation of the object +print(OmrInstrumentOverride.to_json()) + +# convert the object into a dict +omr_instrument_override_dict = omr_instrument_override_instance.to_dict() +# create an instance of OmrInstrumentOverride from a dict +omr_instrument_override_from_dict = OmrInstrumentOverride.from_dict(omr_instrument_override_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJob.md b/docs/reference/OmrJob.md new file mode 100644 index 0000000..6547237 --- /dev/null +++ b/docs/reference/OmrJob.md @@ -0,0 +1,45 @@ +# OmrJob + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the OMR job. | +**status** | [**OmrJobStatus**](OmrJobStatus.md) | | +**output** | [**OmrJobOutput**](OmrJobOutput.md) | | [default to OmrJobOutput.LIBRARY] +**interactive_steps** | [**List[OmrStepName]**](OmrStepName.md) | Steps this job pauses at for client input, echoing the value set at creation. | +**locales** | **List[str]** | Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. | [optional] +**current_step** | [**OmrStepName**](OmrStepName.md) | The pending step when `status` is `awaitingInput`. Omitted otherwise. | [optional] +**pending_step** | [**OmrPendingStep**](OmrPendingStep.md) | | [optional] +**estimated_credits** | **int** | Credits that will be or were charged at start (page-based), so a client can show a confirmation before charging. | [optional] +**progress** | [**OmrJobProgress**](OmrJobProgress.md) | | [optional] +**original_file_metadata** | [**OmrJobFileMetadata**](OmrJobFileMetadata.md) | | [optional] +**imported_metadata** | [**OmrImportedMetadata**](OmrImportedMetadata.md) | | [optional] +**result** | [**OmrJobResult**](OmrJobResult.md) | | [optional] +**retention** | [**OmrJobRetention**](OmrJobRetention.md) | | [optional] +**error_code** | **str** | Stable, engine-agnostic failure code, present when `status` is `error`. Branch on this for custom handling, and render `errorMessage` for the user-facing text. This is an open string: new codes may be added over time, so keep a generic fallback and never hardcode an exhaustive switch. Current values: * `NO_MUSIC_DETECTED`: no musical content found (poor scan, rotated page, or tablature). * `CORRUPTED_FILE`: the input file is corrupted and could not be read. * `UNSUPPORTED_FORMAT`: the file format or notation is not supported yet. * `UNSUPPORTED_TABLATURE`: the file is guitar tablature, not supported yet. * `ENCRYPTED_PDF`: the PDF is password-protected. * `TOO_LARGE`: the document is too large or has an unusual shape to process. * `ENGINE_TIMEOUT`: recognition took longer than expected and was stopped. * `GENERIC`: unspecified failure. | [optional] +**error_message** | **str** | Localized, user-facing error message, present when `status` is `error`. Rendered in the caller's locale and safe to display as-is. Pair with `errorCode` for branching. | [optional] +**creation_date** | **datetime** | When the job was created. | [optional] +**modification_date** | **datetime** | When the job was last updated. | [optional] + +## Example + +```python +from flat_api.models.omr_job import OmrJob + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJob from a JSON string +omr_job_instance = OmrJob.from_json(json) +# print the JSON string representation of the object +print(OmrJob.to_json()) + +# convert the object into a dict +omr_job_dict = omr_job_instance.to_dict() +# create an instance of OmrJob from a dict +omr_job_from_dict = OmrJob.from_dict(omr_job_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobCreation.md b/docs/reference/OmrJobCreation.md new file mode 100644 index 0000000..97e7e21 --- /dev/null +++ b/docs/reference/OmrJobCreation.md @@ -0,0 +1,36 @@ +# OmrJobCreation + +Parameters to create an OMR job. Send without `files` to create a draft (then add files with `addOmrJobFile` and run `startOmrJob`), or include `files` and `autoStart: true` to import in a single request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**output** | [**OmrJobOutput**](OmrJobOutput.md) | | [optional] [default to OmrJobOutput.LIBRARY] +**interactive_steps** | [**List[OmrStepName]**](OmrStepName.md) | Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. | [optional] [default to []] +**locales** | **List[str]** | Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. | [optional] +**collection** | **str** | Target collection ID. Only used when `output` is `library`. | [optional] +**idempotency_key** | **str** | Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. | [optional] +**files** | [**List[OmrJobInputFile]**](OmrJobInputFile.md) | Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`. | [optional] +**auto_start** | **bool** | Start processing immediately. Only valid when `files` is provided. | [optional] + +## Example + +```python +from flat_api.models.omr_job_creation import OmrJobCreation + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobCreation from a JSON string +omr_job_creation_instance = OmrJobCreation.from_json(json) +# print the JSON string representation of the object +print(OmrJobCreation.to_json()) + +# convert the object into a dict +omr_job_creation_dict = omr_job_creation_instance.to_dict() +# create an instance of OmrJobCreation from a dict +omr_job_creation_from_dict = OmrJobCreation.from_dict(omr_job_creation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobFileMetadata.md b/docs/reference/OmrJobFileMetadata.md new file mode 100644 index 0000000..6c51447 --- /dev/null +++ b/docs/reference/OmrJobFileMetadata.md @@ -0,0 +1,35 @@ +# OmrJobFileMetadata + +Metadata about the uploaded input. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_pages** | **int** | Total number of pages across all input files. | [optional] +**file_count** | **int** | Number of input files attached. | [optional] +**filename** | **str** | Original filename of the input as uploaded (of the first file when several were combined). | [optional] +**file_size** | **int** | Combined size of the input files, in bytes. | [optional] +**mime_type** | **str** | MIME type of the input (of the first file when several were combined). | [optional] +**file_extension** | **str** | File extension of the input, without the leading dot (for example `pdf`). | [optional] + +## Example + +```python +from flat_api.models.omr_job_file_metadata import OmrJobFileMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobFileMetadata from a JSON string +omr_job_file_metadata_instance = OmrJobFileMetadata.from_json(json) +# print the JSON string representation of the object +print(OmrJobFileMetadata.to_json()) + +# convert the object into a dict +omr_job_file_metadata_dict = omr_job_file_metadata_instance.to_dict() +# create an instance of OmrJobFileMetadata from a dict +omr_job_file_metadata_from_dict = OmrJobFileMetadata.from_dict(omr_job_file_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobFileUpload.md b/docs/reference/OmrJobFileUpload.md new file mode 100644 index 0000000..eef4135 --- /dev/null +++ b/docs/reference/OmrJobFileUpload.md @@ -0,0 +1,31 @@ +# OmrJobFileUpload + +One image or PDF added to a draft job. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | **bytes** | File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. | +**filename** | **str** | Optional original filename, kept for display. | [optional] + +## Example + +```python +from flat_api.models.omr_job_file_upload import OmrJobFileUpload + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobFileUpload from a JSON string +omr_job_file_upload_instance = OmrJobFileUpload.from_json(json) +# print the JSON string representation of the object +print(OmrJobFileUpload.to_json()) + +# convert the object into a dict +omr_job_file_upload_dict = omr_job_file_upload_instance.to_dict() +# create an instance of OmrJobFileUpload from a dict +omr_job_file_upload_from_dict = OmrJobFileUpload.from_dict(omr_job_file_upload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobFileUploadResult.md b/docs/reference/OmrJobFileUploadResult.md new file mode 100644 index 0000000..cdf991e --- /dev/null +++ b/docs/reference/OmrJobFileUploadResult.md @@ -0,0 +1,31 @@ +# OmrJobFileUploadResult + +Result of adding a file to a draft job. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_index** | **int** | 0-based index assigned to the uploaded file. | [optional] +**file_count** | **int** | Total number of files now attached to the job. | [optional] + +## Example + +```python +from flat_api.models.omr_job_file_upload_result import OmrJobFileUploadResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobFileUploadResult from a JSON string +omr_job_file_upload_result_instance = OmrJobFileUploadResult.from_json(json) +# print the JSON string representation of the object +print(OmrJobFileUploadResult.to_json()) + +# convert the object into a dict +omr_job_file_upload_result_dict = omr_job_file_upload_result_instance.to_dict() +# create an instance of OmrJobFileUploadResult from a dict +omr_job_file_upload_result_from_dict = OmrJobFileUploadResult.from_dict(omr_job_file_upload_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobInputFile.md b/docs/reference/OmrJobInputFile.md new file mode 100644 index 0000000..fe74a57 --- /dev/null +++ b/docs/reference/OmrJobInputFile.md @@ -0,0 +1,31 @@ +# OmrJobInputFile + +A single image or PDF input, base64-encoded. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | **bytes** | File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. | +**filename** | **str** | Optional original filename, kept for display. | [optional] + +## Example + +```python +from flat_api.models.omr_job_input_file import OmrJobInputFile + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobInputFile from a JSON string +omr_job_input_file_instance = OmrJobInputFile.from_json(json) +# print the JSON string representation of the object +print(OmrJobInputFile.to_json()) + +# convert the object into a dict +omr_job_input_file_dict = omr_job_input_file_instance.to_dict() +# create an instance of OmrJobInputFile from a dict +omr_job_input_file_from_dict = OmrJobInputFile.from_dict(omr_job_input_file_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobOutput.md b/docs/reference/OmrJobOutput.md new file mode 100644 index 0000000..1275fba --- /dev/null +++ b/docs/reference/OmrJobOutput.md @@ -0,0 +1,13 @@ +# OmrJobOutput + +Where the result of the job goes. * `library`: import the result into the Flat Library and create a score (default). * `musicxml`: finalize the result only, downloadable via `getOmrJobExport`. No score is created, for third-party integrations that do not use the Library. + +## Enum + +* `LIBRARY` (value: `'library'`) + +* `MUSICXML` (value: `'musicxml'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobProgress.md b/docs/reference/OmrJobProgress.md new file mode 100644 index 0000000..268f18b --- /dev/null +++ b/docs/reference/OmrJobProgress.md @@ -0,0 +1,32 @@ +# OmrJobProgress + +Live progress while the job is processing. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**percent** | **float** | Completion percentage (0-100). | [optional] +**text** | **str** | Localized progress message, ready to display. | [optional] +**key** | **str** | Stable progress key (for example `OMR_QUEUED`, `OMR_PROCESSING_PAGE`, `OMR_CREATING_SCORE`), for matching the current phase in a stepper UI independent of locale. | [optional] + +## Example + +```python +from flat_api.models.omr_job_progress import OmrJobProgress + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobProgress from a JSON string +omr_job_progress_instance = OmrJobProgress.from_json(json) +# print the JSON string representation of the object +print(OmrJobProgress.to_json()) + +# convert the object into a dict +omr_job_progress_dict = omr_job_progress_instance.to_dict() +# create an instance of OmrJobProgress from a dict +omr_job_progress_from_dict = OmrJobProgress.from_dict(omr_job_progress_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobResult.md b/docs/reference/OmrJobResult.md new file mode 100644 index 0000000..534695d --- /dev/null +++ b/docs/reference/OmrJobResult.md @@ -0,0 +1,31 @@ +# OmrJobResult + +The outcome of a finished job. Present when `status` is `done`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **str** | Created score ID, when `output` is `library`. | [optional] +**exports** | **List[str]** | Formats available via `getOmrJobExport`, for example `[\"musicxml\", \"mxl\", \"midi\"]`. | [optional] + +## Example + +```python +from flat_api.models.omr_job_result import OmrJobResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobResult from a JSON string +omr_job_result_instance = OmrJobResult.from_json(json) +# print the JSON string representation of the object +print(OmrJobResult.to_json()) + +# convert the object into a dict +omr_job_result_dict = omr_job_result_instance.to_dict() +# create an instance of OmrJobResult from a dict +omr_job_result_from_dict = OmrJobResult.from_dict(omr_job_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobRetention.md b/docs/reference/OmrJobRetention.md new file mode 100644 index 0000000..49b68e4 --- /dev/null +++ b/docs/reference/OmrJobRetention.md @@ -0,0 +1,31 @@ +# OmrJobRetention + +Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expiry_date** | **datetime** | When this job's uploaded files and recognition results become eligible for erasure. Fixed when the job is created: changing the account's retention period does not move the deadline of jobs that already exist. | +**expired_date** | **datetime** | When the job's stored files were actually erased. Present only once that happened. An expired job keeps the `status` it finished with and stays listable, but its `result` is no longer served and downloads fail with `OMR_JOB_EXPIRED`. | [optional] + +## Example + +```python +from flat_api.models.omr_job_retention import OmrJobRetention + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrJobRetention from a JSON string +omr_job_retention_instance = OmrJobRetention.from_json(json) +# print the JSON string representation of the object +print(OmrJobRetention.to_json()) + +# convert the object into a dict +omr_job_retention_dict = omr_job_retention_instance.to_dict() +# create an instance of OmrJobRetention from a dict +omr_job_retention_from_dict = OmrJobRetention.from_dict(omr_job_retention_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrJobStatus.md b/docs/reference/OmrJobStatus.md new file mode 100644 index 0000000..a278a5a --- /dev/null +++ b/docs/reference/OmrJobStatus.md @@ -0,0 +1,21 @@ +# OmrJobStatus + +Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. + +## Enum + +* `DRAFT` (value: `'draft'`) + +* `PROCESSING` (value: `'processing'`) + +* `AWAITINGINPUT` (value: `'awaitingInput'`) + +* `DONE` (value: `'done'`) + +* `ERROR` (value: `'error'`) + +* `CANCELED` (value: `'canceled'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrLocaleDetails.md b/docs/reference/OmrLocaleDetails.md new file mode 100644 index 0000000..601aa3a --- /dev/null +++ b/docs/reference/OmrLocaleDetails.md @@ -0,0 +1,31 @@ +# OmrLocaleDetails + +An OCR-selectable locale with its English name. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | BCP 47 locale code. Always one of the codes listed in `locales`. | +**name** | **str** | English name of the language, for display in a picker. | + +## Example + +```python +from flat_api.models.omr_locale_details import OmrLocaleDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrLocaleDetails from a JSON string +omr_locale_details_instance = OmrLocaleDetails.from_json(json) +# print the JSON string representation of the object +print(OmrLocaleDetails.to_json()) + +# convert the object into a dict +omr_locale_details_dict = omr_locale_details_instance.to_dict() +# create an instance of OmrLocaleDetails from a dict +omr_locale_details_from_dict = OmrLocaleDetails.from_dict(omr_locale_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrPendingStep.md b/docs/reference/OmrPendingStep.md new file mode 100644 index 0000000..147c1fe --- /dev/null +++ b/docs/reference/OmrPendingStep.md @@ -0,0 +1,31 @@ +# OmrPendingStep + +The step currently awaiting client input. The `data` shape is keyed by `step`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**step** | [**OmrStepName**](OmrStepName.md) | | +**data** | [**OmrDetailsStepData**](OmrDetailsStepData.md) | | + +## Example + +```python +from flat_api.models.omr_pending_step import OmrPendingStep + +# TODO update the JSON string below +json = "{}" +# create an instance of OmrPendingStep from a JSON string +omr_pending_step_instance = OmrPendingStep.from_json(json) +# print the JSON string representation of the object +print(OmrPendingStep.to_json()) + +# convert the object into a dict +omr_pending_step_dict = omr_pending_step_instance.to_dict() +# create an instance of OmrPendingStep from a dict +omr_pending_step_from_dict = OmrPendingStep.from_dict(omr_pending_step_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/OmrStepName.md b/docs/reference/OmrStepName.md new file mode 100644 index 0000000..544dc5d --- /dev/null +++ b/docs/reference/OmrStepName.md @@ -0,0 +1,11 @@ +# OmrStepName + +Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. + +## Enum + +* `DETAILS` (value: `'details'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationApi.md b/docs/reference/OrganizationApi.md similarity index 73% rename from docs/OrganizationApi.md rename to docs/reference/OrganizationApi.md index da7c65b..5747b10 100644 --- a/docs/OrganizationApi.md +++ b/docs/reference/OrganizationApi.md @@ -5,22 +5,26 @@ All URIs are relative to *https://api.flat.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**count_orga_users**](OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters +[**create_lti_configuration**](OrganizationApi.md#create_lti_configuration) | **POST** /organizations/lti/configurations | Create a new LTI configuration (1.1 or 1.3) [**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials [**create_organization_invitation**](OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization [**create_organization_user**](OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account [**create_organization_user_access_token**](OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user [**create_organization_user_signin_link**](OrganizationApi.md#create_organization_user_signin_link) | **POST** /organizations/users/{user}/signinLink | Create a sign in link for an organization user +[**delete_lti_configuration**](OrganizationApi.md#delete_lti_configuration) | **DELETE** /organizations/lti/configurations/{configuration} | Delete an LTI configuration +[**list_lti_configurations**](OrganizationApi.md#list_lti_configurations) | **GET** /organizations/lti/configurations | List LTI configurations (1.1 and 1.3) [**list_lti_credentials**](OrganizationApi.md#list_lti_credentials) | **GET** /organizations/lti/credentials | List LTI 1.x credentials [**list_organization_invitations**](OrganizationApi.md#list_organization_invitations) | **GET** /organizations/invitations | List the organization invitations [**list_organization_users**](OrganizationApi.md#list_organization_users) | **GET** /organizations/users | List the organization users [**remove_organization_invitation**](OrganizationApi.md#remove_organization_invitation) | **DELETE** /organizations/invitations/{invitation} | Remove an organization invitation [**remove_organization_user**](OrganizationApi.md#remove_organization_user) | **DELETE** /organizations/users/{user} | Remove an account from Flat [**revoke_lti_credentials**](OrganizationApi.md#revoke_lti_credentials) | **DELETE** /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials +[**update_lti_configuration**](OrganizationApi.md#update_lti_configuration) | **PUT** /organizations/lti/configurations/{configuration} | Update an existing LTI configuration (edit 1.3; 1.1 not editable) [**update_organization_user**](OrganizationApi.md#update_organization_user) | **PUT** /organizations/users/{user} | Update account information # **count_orga_users** -> List[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) +> int count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license, test_accounts=test_accounts) Count the organization users using the provided filters @@ -30,7 +34,6 @@ Count the organization users using the provided filters ```python import flat_api -from flat_api.models.user_details_admin import UserDetailsAdmin from flat_api.rest import ApiException from pprint import pprint @@ -55,10 +58,11 @@ with flat_api.ApiClient(configuration) as api_client: q = 'q_example' # str | The query to search (optional) group = ['group_example'] # List[str] | Filter users by group (optional) no_active_license = True # bool | Filter users who don't have an active license (optional) + test_accounts = 'test_accounts_example' # str | Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. (optional) try: # Count the organization users using the provided filters - api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license) + api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license, test_accounts=test_accounts) print("The response of OrganizationApi->count_orga_users:\n") pprint(api_response) except Exception as e: @@ -76,10 +80,11 @@ Name | Type | Description | Notes **q** | **str**| The query to search | [optional] **group** | [**List[str]**](str.md)| Filter users by group | [optional] **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **test_accounts** | **str**| Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. | [optional] ### Return type -[**List[UserDetailsAdmin]**](UserDetailsAdmin.md) +**int** ### Authorization @@ -99,12 +104,91 @@ Name | Type | Description | Notes [[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) +# **create_lti_configuration** +> CreateLtiConfiguration200Response create_lti_configuration(lti_configuration_create) + +Create a new LTI configuration (1.1 or 1.3) + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.models.lti_configuration_create import LtiConfigurationCreate +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + lti_configuration_create = flat_api.LtiConfigurationCreate() # LtiConfigurationCreate | + + try: + # Create a new LTI configuration (1.1 or 1.3) + api_response = api_instance.create_lti_configuration(lti_configuration_create) + print("The response of OrganizationApi->create_lti_configuration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OrganizationApi->create_lti_configuration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lti_configuration_create** | [**LtiConfigurationCreate**](LtiConfigurationCreate.md)| | + +### Return type + +[**CreateLtiConfiguration200Response**](CreateLtiConfiguration200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created LTI configuration | - | +**0** | Error | - | + +[[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) + # **create_lti_credentials** > LtiCredentials create_lti_credentials(body) Create a new couple of LTI 1.x credentials -Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). +DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. +Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + +Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + ### Example @@ -182,7 +266,12 @@ Name | Type | Description | Notes Create a new invitation to join the organization -This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. +This method creates and sends invitation for teachers and admins. + +Invitations can only be used by new Flat users or users who are not part of the organization yet. + +If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + ### Example @@ -334,7 +423,9 @@ Name | Type | Description | Notes Create a delegated API access token for an organization user -This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. +This operation will create an API access token for a chosen organization user. +This token will be valid for a limited time and can be used to access the API as the organization user. + ### Example @@ -485,11 +576,156 @@ Name | Type | Description | Notes [[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) +# **delete_lti_configuration** +> delete_lti_configuration(configuration) + +Delete an LTI configuration + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + configuration = 'configuration_example' # str | Configuration unique identifier + + try: + # Delete an LTI configuration + api_instance.delete_lti_configuration(configuration) + except Exception as e: + print("Exception when calling OrganizationApi->delete_lti_configuration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configuration** | **str**| Configuration unique identifier | + +### Return type + +void (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Configuration deleted | - | +**0** | Error | - | + +[[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) + +# **list_lti_configurations** +> List[LtiConfiguration] list_lti_configurations() + +List LTI configurations (1.1 and 1.3) + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.lti_configuration import LtiConfiguration +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + + try: + # List LTI configurations (1.1 and 1.3) + api_response = api_instance.list_lti_configurations() + print("The response of OrganizationApi->list_lti_configurations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OrganizationApi->list_lti_configurations: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[LtiConfiguration]**](LtiConfiguration.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of LTI configurations for the caller's organization | - | +**0** | Error | - | + +[[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) + # **list_lti_credentials** > List[LtiCredentials] list_lti_credentials() List LTI 1.x credentials +DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. +Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + ### Example * OAuth Authentication (OAuth2): @@ -637,7 +873,7 @@ Name | Type | Description | Notes [[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) # **list_organization_users** -> List[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) +> List[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, test_accounts=test_accounts, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) List the organization users @@ -668,7 +904,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.OrganizationApi(api_client) - sort = ['sort_example'] # List[str] | The order to sort the user list (optional) + sort = 'sort_example' # str | The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. (optional) direction = 'direction_example' # str | Sort direction (optional) next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) @@ -676,13 +912,14 @@ with flat_api.ApiClient(configuration) as api_client: q = 'q_example' # str | The query to search (optional) group = ['group_example'] # List[str] | Filter users by group (optional) no_active_license = True # bool | Filter users who don't have an active license (optional) + test_accounts = 'test_accounts_example' # str | Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. (optional) license_expiration_date = ['license_expiration_date_example'] # List[str] | Filter users by license expiration date or `active` / `notActive` (optional) only_ids = True # bool | Return only user ids (optional) limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) try: # List the organization users - api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) + api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, test_accounts=test_accounts, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit) print("The response of OrganizationApi->list_organization_users:\n") pprint(api_response) except Exception as e: @@ -696,7 +933,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sort** | [**List[str]**](str.md)| The order to sort the user list | [optional] + **sort** | **str**| The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. | [optional] **direction** | **str**| Sort direction | [optional] **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] @@ -704,6 +941,7 @@ Name | Type | Description | Notes **q** | **str**| The query to search | [optional] **group** | [**List[str]**](str.md)| Filter users by group | [optional] **no_active_license** | **bool**| Filter users who don't have an active license | [optional] + **test_accounts** | **str**| Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. | [optional] **license_expiration_date** | [**List[str]**](str.md)| Filter users by license expiration date or `active` / `notActive` | [optional] **only_ids** | **bool**| Return only user ids | [optional] **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] @@ -806,7 +1044,10 @@ void (empty response body) Remove an account from Flat -This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) +This operation removes an account from Flat and its data, including: +* The music scores created by this user (documents, history, comments, collaboration information) +* Education related data (assignments and classroom information) + ### Example @@ -881,6 +1122,10 @@ void (empty response body) Revoke LTI 1.x credentials +DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. +Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + ### Example * OAuth Authentication (OAuth2): @@ -949,6 +1194,83 @@ void (empty response body) [[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) +# **update_lti_configuration** +> LtiConfiguration update_lti_configuration(configuration, lti_configuration_update) + +Update an existing LTI configuration (edit 1.3; 1.1 not editable) + +### Example + +* OAuth Authentication (OAuth2): + +```python +import flat_api +from flat_api.models.lti_configuration import LtiConfiguration +from flat_api.models.lti_configuration_update import LtiConfigurationUpdate +from flat_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.flat.io/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = flat_api.Configuration( + host = "https://api.flat.io/v2" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with flat_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flat_api.OrganizationApi(api_client) + configuration = 'configuration_example' # str | Configuration unique identifier + lti_configuration_update = flat_api.LtiConfigurationUpdate() # LtiConfigurationUpdate | + + try: + # Update an existing LTI configuration (edit 1.3; 1.1 not editable) + api_response = api_instance.update_lti_configuration(configuration, lti_configuration_update) + print("The response of OrganizationApi->update_lti_configuration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OrganizationApi->update_lti_configuration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configuration** | **str**| Configuration unique identifier | + **lti_configuration_update** | [**LtiConfigurationUpdate**](LtiConfigurationUpdate.md)| | + +### Return type + +[**LtiConfiguration**](LtiConfiguration.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated configuration | - | +**0** | Error | - | + +[[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) + # **update_organization_user** > UserDetailsAdmin update_organization_user(user, body) diff --git a/docs/OrganizationInvitation.md b/docs/reference/OrganizationInvitation.md similarity index 87% rename from docs/OrganizationInvitation.md rename to docs/reference/OrganizationInvitation.md index 142e227..50489e7 100644 --- a/docs/OrganizationInvitation.md +++ b/docs/reference/OrganizationInvitation.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **custom_code** | **str** | Enrollment code to use when joining this organization | **email** | **str** | The email address this invitation was sent to | [optional] **invited_by** | **str** | The unique identifier of the User who created this invitation | [optional] +**html_url** | **str** | URL to join the organization using this invitation | [optional] **allow_multiple_use** | **bool** | If true, the invitation can be used multiple times. If false, the invitation can only be used once. | **used_by** | **List[str]** | List of users who used this invitation | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of OrganizationInvitation from a JSON string organization_invitation_instance = OrganizationInvitation.from_json(json) # print the JSON string representation of the object -print OrganizationInvitation.to_json() +print(OrganizationInvitation.to_json()) # convert the object into a dict organization_invitation_dict = organization_invitation_instance.to_dict() # create an instance of OrganizationInvitation from a dict -organization_invitation_form_dict = organization_invitation.from_dict(organization_invitation_dict) +organization_invitation_from_dict = OrganizationInvitation.from_dict(organization_invitation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationInvitationCreation.md b/docs/reference/OrganizationInvitationCreation.md similarity index 86% rename from docs/OrganizationInvitationCreation.md rename to docs/reference/OrganizationInvitationCreation.md index 74b2d6e..756cada 100644 --- a/docs/OrganizationInvitationCreation.md +++ b/docs/reference/OrganizationInvitationCreation.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of OrganizationInvitationCreation from a JSON string organization_invitation_creation_instance = OrganizationInvitationCreation.from_json(json) # print the JSON string representation of the object -print OrganizationInvitationCreation.to_json() +print(OrganizationInvitationCreation.to_json()) # convert the object into a dict organization_invitation_creation_dict = organization_invitation_creation_instance.to_dict() # create an instance of OrganizationInvitationCreation from a dict -organization_invitation_creation_form_dict = organization_invitation_creation.from_dict(organization_invitation_creation_dict) +organization_invitation_creation_from_dict = OrganizationInvitationCreation.from_dict(organization_invitation_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationRoles.md b/docs/reference/OrganizationRoles.md similarity index 62% rename from docs/OrganizationRoles.md rename to docs/reference/OrganizationRoles.md index 0f91a74..d21b15a 100644 --- a/docs/OrganizationRoles.md +++ b/docs/reference/OrganizationRoles.md @@ -2,10 +2,15 @@ User's Organization Role (for Edu users only) -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ADMIN` (value: `'admin'`) + +* `ACCOUNTADMIN` (value: `'accountAdmin'`) + +* `TEACHER` (value: `'teacher'`) + +* `USER` (value: `'user'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationUserAccessTokenCreation.md b/docs/reference/OrganizationUserAccessTokenCreation.md similarity index 84% rename from docs/OrganizationUserAccessTokenCreation.md rename to docs/reference/OrganizationUserAccessTokenCreation.md index 86a142f..df48fbe 100644 --- a/docs/OrganizationUserAccessTokenCreation.md +++ b/docs/reference/OrganizationUserAccessTokenCreation.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of OrganizationUserAccessTokenCreation from a JSON string organization_user_access_token_creation_instance = OrganizationUserAccessTokenCreation.from_json(json) # print the JSON string representation of the object -print OrganizationUserAccessTokenCreation.to_json() +print(OrganizationUserAccessTokenCreation.to_json()) # convert the object into a dict organization_user_access_token_creation_dict = organization_user_access_token_creation_instance.to_dict() # create an instance of OrganizationUserAccessTokenCreation from a dict -organization_user_access_token_creation_form_dict = organization_user_access_token_creation.from_dict(organization_user_access_token_creation_dict) +organization_user_access_token_creation_from_dict = OrganizationUserAccessTokenCreation.from_dict(organization_user_access_token_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/RenameGroupRequest.md b/docs/reference/RenameGroupRequest.md new file mode 100644 index 0000000..b82a4fd --- /dev/null +++ b/docs/reference/RenameGroupRequest.md @@ -0,0 +1,29 @@ +# RenameGroupRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New name for the group | + +## Example + +```python +from flat_api.models.rename_group_request import RenameGroupRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RenameGroupRequest from a JSON string +rename_group_request_instance = RenameGroupRequest.from_json(json) +# print the JSON string representation of the object +print(RenameGroupRequest.to_json()) + +# convert the object into a dict +rename_group_request_dict = rename_group_request_instance.to_dict() +# create an instance of RenameGroupRequest from a dict +rename_group_request_from_dict = RenameGroupRequest.from_dict(rename_group_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCollaborator.md b/docs/reference/ResourceCollaborator.md similarity index 87% rename from docs/ResourceCollaborator.md rename to docs/reference/ResourceCollaborator.md index 1fda2b8..0e1edbe 100644 --- a/docs/ResourceCollaborator.md +++ b/docs/reference/ResourceCollaborator.md @@ -1,5 +1,6 @@ # ResourceCollaborator +A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). ## Properties @@ -8,7 +9,7 @@ Name | Type | Description | Notes **acl_read** | **bool** | `True` if the current user can read the current document | [default to False] **acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] **acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] **collaborator_type** | **str** | The type of the collaborator for the resource | [optional] **id** | **str** | The unique identifier of the permission | [optional] **var_date** | **datetime** | The date when the permission was added | [optional] @@ -29,12 +30,12 @@ json = "{}" # create an instance of ResourceCollaborator from a JSON string resource_collaborator_instance = ResourceCollaborator.from_json(json) # print the JSON string representation of the object -print ResourceCollaborator.to_json() +print(ResourceCollaborator.to_json()) # convert the object into a dict resource_collaborator_dict = resource_collaborator_instance.to_dict() # create an instance of ResourceCollaborator from a dict -resource_collaborator_form_dict = resource_collaborator.from_dict(resource_collaborator_dict) +resource_collaborator_from_dict = ResourceCollaborator.from_dict(resource_collaborator_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceCollaboratorCreation.md b/docs/reference/ResourceCollaboratorCreation.md similarity index 91% rename from docs/ResourceCollaboratorCreation.md rename to docs/reference/ResourceCollaboratorCreation.md index e44aa3a..989a97c 100644 --- a/docs/ResourceCollaboratorCreation.md +++ b/docs/reference/ResourceCollaboratorCreation.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of ResourceCollaboratorCreation from a JSON string resource_collaborator_creation_instance = ResourceCollaboratorCreation.from_json(json) # print the JSON string representation of the object -print ResourceCollaboratorCreation.to_json() +print(ResourceCollaboratorCreation.to_json()) # convert the object into a dict resource_collaborator_creation_dict = resource_collaborator_creation_instance.to_dict() # create an instance of ResourceCollaboratorCreation from a dict -resource_collaborator_creation_form_dict = resource_collaborator_creation.from_dict(resource_collaborator_creation_dict) +resource_collaborator_creation_from_dict = ResourceCollaboratorCreation.from_dict(resource_collaborator_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRights.md b/docs/reference/ResourceRights.md similarity index 92% rename from docs/ResourceRights.md rename to docs/reference/ResourceRights.md index ff93d65..70139a1 100644 --- a/docs/ResourceRights.md +++ b/docs/reference/ResourceRights.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **acl_read** | **bool** | `True` if the current user can read the current document | [default to False] **acl_write** | **bool** | `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] **acl_admin** | **bool** | `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. | [default to False] -**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [default to False] +**is_collaborator** | **bool** | `True` if the current user is a collaborator of the current document (direct or via group). | [optional] [default to False] **collaborator_type** | **str** | The type of the collaborator for the resource | [optional] ## Example @@ -22,12 +22,12 @@ json = "{}" # create an instance of ResourceRights from a JSON string resource_rights_instance = ResourceRights.from_json(json) # print the JSON string representation of the object -print ResourceRights.to_json() +print(ResourceRights.to_json()) # convert the object into a dict resource_rights_dict = resource_rights_instance.to_dict() # create an instance of ResourceRights from a dict -resource_rights_form_dict = resource_rights.from_dict(resource_rights_dict) +resource_rights_from_dict = ResourceRights.from_dict(resource_rights_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreApi.md b/docs/reference/ScoreApi.md similarity index 89% rename from docs/ScoreApi.md rename to docs/reference/ScoreApi.md index 85b9f2c..867e84d 100644 --- a/docs/ScoreApi.md +++ b/docs/reference/ScoreApi.md @@ -41,7 +41,12 @@ Method | HTTP request | Description 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. +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. + ### Example @@ -119,11 +124,13 @@ Name | Type | Description | Notes [[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) # **add_score_track** -> ScoreTrack add_score_track(score, body) +> ScoreTrackCreationResponse add_score_track(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. +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. + ### Example @@ -131,8 +138,8 @@ Use this method to add new track to the score. This track can then be played on ```python import flat_api -from flat_api.models.score_track import ScoreTrack from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_creation_response import ScoreTrackCreationResponse from flat_api.rest import ApiException from pprint import pprint @@ -177,7 +184,7 @@ Name | Type | Description | Notes ### Return type -[**ScoreTrack**](ScoreTrack.md) +[**ScoreTrackCreationResponse**](ScoreTrackCreationResponse.md) ### Authorization @@ -204,7 +211,9 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -292,7 +301,54 @@ Name | Type | Description | Notes 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. +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}`. + ### Example @@ -359,9 +415,10 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Score created | - | +**200** | Score created | * x-flat-score-revision -
* x-flat-score-revision-date -
| +**202** | Score will be imported using an asynchronous task (the API client has set `supportsTasks` to true) | - | **400** | Bad score creation request | - | -**402** | Account overquota | - | +**402** | Account overquota or feature not included in plan | - | **0** | Error | - | [[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) @@ -371,7 +428,8 @@ Name | Type | Description | Notes Create a new revision -Update a score by uploading a new revision for this one. +Update a score by uploading a new revision for this one. + ### Example @@ -453,7 +511,12 @@ Name | Type | Description | Notes 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). +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. + ### Example @@ -526,7 +589,7 @@ void (empty response body) [[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) # **delete_score_comment** -> delete_score_comment(score, comment, sharing_key=sharing_key) +> delete_score_comment(score, comment, event_properties=event_properties, sharing_key=sharing_key) Delete a comment @@ -558,11 +621,12 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) sharing_key = 'sharing_key_example' # str | 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) try: # Delete a comment - api_instance.delete_score_comment(score, comment, sharing_key=sharing_key) + api_instance.delete_score_comment(score, comment, event_properties=event_properties, sharing_key=sharing_key) except Exception as e: print("Exception when calling ScoreApi->delete_score_comment: %s\n" % e) ``` @@ -576,6 +640,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | + **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] **sharing_key** | **str**| 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] ### Return type @@ -588,7 +653,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ### HTTP response details @@ -682,7 +747,13 @@ void (empty response 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`, `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. +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. + ### Example @@ -764,7 +835,10 @@ Name | Type | Description | Notes 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. +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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + ### Example @@ -848,7 +922,8 @@ Name | Type | Description | Notes List group's scores -Get the list of scores shared with a group. +Get the list of scores shared with a group. + ### Example @@ -917,6 +992,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The group's scores | - | +**404** | Not Found - Group not found or user not member of group | - | **0** | Error | - | [[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) @@ -926,7 +1002,9 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -1007,7 +1085,8 @@ Name | Type | Description | Notes Get a collaborator -Get the information about a collaborator (User or Group). +Get the information about a collaborator (User or Group). + ### Example @@ -1090,7 +1169,10 @@ Name | Type | Description | Notes 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). +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). + ### Example @@ -1167,7 +1249,7 @@ Name | Type | Description | Notes [[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) # **get_score_comments** -> List[ScoreComment] get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) +> List[ScoreComment] get_score_comments(score, type=type, sort=sort, direction=direction, sharing_key=sharing_key) List comments @@ -1201,14 +1283,14 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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`). - sharing_key = 'sharing_key_example' # str | 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 = 'type_example' # str | Filter the comments by type (optional) sort = 'sort_example' # str | Sort (optional) direction = 'direction_example' # str | Sort direction (optional) + sharing_key = 'sharing_key_example' # str | 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) try: # List comments - api_response = api_instance.get_score_comments(score, sharing_key=sharing_key, type=type, sort=sort, direction=direction) + api_response = api_instance.get_score_comments(score, type=type, sort=sort, direction=direction, sharing_key=sharing_key) print("The response of ScoreApi->get_score_comments:\n") pprint(api_response) except Exception as e: @@ -1223,10 +1305,10 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **sharing_key** | **str**| 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** | **str**| Filter the comments by type | [optional] **sort** | **str**| Sort | [optional] **direction** | **str**| Sort direction | [optional] + **sharing_key** | **str**| 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] ### Return type @@ -1258,7 +1340,9 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -1337,11 +1421,17 @@ Name | Type | Description | Notes [[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) # **get_score_revision_data** -> bytearray get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) +> bytes get_score_revision_data(score, revision, format, sharing_key=sharing_key, parts=parts, default_track=default_track, url=url) 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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. +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. + ### Example @@ -1403,7 +1493,7 @@ Name | Type | Description | Notes ### Return type -**bytearray** +**bytes** ### Authorization @@ -1412,13 +1502,13 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png + - **Accept**: application/json, application/vnd.recordare.musicxml+xml, application/vnd.recordare.musicxml, audio/mp3, audio/wav, audio/midi, image/png, application/octet-stream ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Revision data | - | +**200** | Revision data | * x-flat-score-revision -
* x-flat-score-revision-date -
| **402** | Account overquota | - | **403** | Not granted to access to this score | - | **404** | Score or associated file not found | - | @@ -1431,7 +1521,10 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -1512,7 +1605,8 @@ Name | Type | Description | Notes 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. +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. + ### Example @@ -1746,11 +1840,14 @@ Name | Type | Description | Notes [[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) # **get_user_scores** -> List[ScoreDetails] get_user_scores(user, parent=parent) +> List[ScoreDetails] get_user_scores(user, paginate=paginate, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List user's scores -Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. +Get the list of public scores owned by a User. +If you want to access to private scores, please use the [Collections API](#tag/Collection). +For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + ### Example @@ -1780,11 +1877,16 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.ScoreApi(api_client) user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) + paginate = False # bool | When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (optional) (default to False) + sort = 'sort_example' # str | Sort (optional) + direction = 'direction_example' # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) try: # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) + api_response = api_instance.get_user_scores(user, paginate=paginate, sort=sort, direction=direction, limit=limit, next=next, previous=previous) print("The response of ScoreApi->get_user_scores:\n") pprint(api_response) except Exception as e: @@ -1799,7 +1901,12 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **paginate** | **bool**| When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. | [optional] [default to False] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type @@ -1828,6 +1935,18 @@ Name | Type | Description | Notes 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. + + ### Example * OAuth Authentication (OAuth2): @@ -2064,7 +2183,10 @@ void (empty response body) 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`. +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`. + ### Example @@ -2144,11 +2266,12 @@ Name | Type | Description | Notes [[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) # **remove_score_collaborator** -> remove_score_collaborator(score, collaborator) +> remove_score_collaborator(score, collaborator, event_properties=event_properties) Delete a collaborator -Remove the specified collaborator from the score +Remove the specified collaborator from the score + ### Example @@ -2178,10 +2301,11 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) try: # Delete a collaborator - api_instance.remove_score_collaborator(score, collaborator) + api_instance.remove_score_collaborator(score, collaborator, event_properties=event_properties) except Exception as e: print("Exception when calling ScoreApi->remove_score_collaborator: %s\n" % e) ``` @@ -2195,6 +2319,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | + **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] ### Return type @@ -2206,7 +2331,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ### HTTP response details @@ -2225,7 +2350,8 @@ void (empty response body) 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. +This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + ### Example diff --git a/docs/ScoreComment.md b/docs/reference/ScoreComment.md similarity index 81% rename from docs/ScoreComment.md rename to docs/reference/ScoreComment.md index eeb7d29..a9be2e4 100644 --- a/docs/ScoreComment.md +++ b/docs/reference/ScoreComment.md @@ -6,16 +6,16 @@ Comment added on a sheet music Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The comment unique identifier | [optional] -**type** | **str** | The type of the comment | [optional] -**user** | **str** | The author unique identifier | [optional] -**score** | **str** | The unique identifier of the score where the comment was posted | [optional] +**id** | **str** | The comment unique identifier | +**type** | **str** | The type of the comment | +**user** | **str** | The author unique identifier | +**score** | **str** | The unique identifier of the score where the comment was posted | **revision** | **str** | The unique identifier of revision the comment was posted | [optional] **reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] -**var_date** | **datetime** | The date when the comment was posted | [optional] +**var_date** | **datetime** | The date when the comment was posted | **modification_date** | **datetime** | The date of the last comment modification | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] -**raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | [optional] +**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | +**raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] **mentions** | **List[str]** | The list of user identifier mentioned on the score | [optional] **resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] @@ -33,12 +33,12 @@ json = "{}" # create an instance of ScoreComment from a JSON string score_comment_instance = ScoreComment.from_json(json) # print the JSON string representation of the object -print ScoreComment.to_json() +print(ScoreComment.to_json()) # convert the object into a dict score_comment_dict = score_comment_instance.to_dict() # create an instance of ScoreComment from a dict -score_comment_form_dict = score_comment.from_dict(score_comment_dict) +score_comment_from_dict = ScoreComment.from_dict(score_comment_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentContext.md b/docs/reference/ScoreCommentContext.md similarity index 91% rename from docs/ScoreCommentContext.md rename to docs/reference/ScoreCommentContext.md index db3aed3..843e4ef 100644 --- a/docs/ScoreCommentContext.md +++ b/docs/reference/ScoreCommentContext.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of ScoreCommentContext from a JSON string score_comment_context_instance = ScoreCommentContext.from_json(json) # print the JSON string representation of the object -print ScoreCommentContext.to_json() +print(ScoreCommentContext.to_json()) # convert the object into a dict score_comment_context_dict = score_comment_context_instance.to_dict() # create an instance of ScoreCommentContext from a dict -score_comment_context_form_dict = score_comment_context.from_dict(score_comment_context_dict) +score_comment_context_from_dict = ScoreCommentContext.from_dict(score_comment_context_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentCreation.md b/docs/reference/ScoreCommentCreation.md similarity index 79% rename from docs/ScoreCommentCreation.md rename to docs/reference/ScoreCommentCreation.md index f9133da..ae522f2 100644 --- a/docs/ScoreCommentCreation.md +++ b/docs/reference/ScoreCommentCreation.md @@ -6,7 +6,7 @@ Creation of a comment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**revision** | **str** | The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] **comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] **mentions** | **List[str]** | The list of user identifiers mentioned in this comment | [optional] @@ -23,12 +23,12 @@ json = "{}" # create an instance of ScoreCommentCreation from a JSON string score_comment_creation_instance = ScoreCommentCreation.from_json(json) # print the JSON string representation of the object -print ScoreCommentCreation.to_json() +print(ScoreCommentCreation.to_json()) # convert the object into a dict score_comment_creation_dict = score_comment_creation_instance.to_dict() # create an instance of ScoreCommentCreation from a dict -score_comment_creation_form_dict = score_comment_creation.from_dict(score_comment_creation_dict) +score_comment_creation_from_dict = ScoreCommentCreation.from_dict(score_comment_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentModeration.md b/docs/reference/ScoreCommentModeration.md similarity index 88% rename from docs/ScoreCommentModeration.md rename to docs/reference/ScoreCommentModeration.md index 279922b..576be45 100644 --- a/docs/ScoreCommentModeration.md +++ b/docs/reference/ScoreCommentModeration.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ScoreCommentModeration from a JSON string score_comment_moderation_instance = ScoreCommentModeration.from_json(json) # print the JSON string representation of the object -print ScoreCommentModeration.to_json() +print(ScoreCommentModeration.to_json()) # convert the object into a dict score_comment_moderation_dict = score_comment_moderation_instance.to_dict() # create an instance of ScoreCommentModeration from a dict -score_comment_moderation_form_dict = score_comment_moderation.from_dict(score_comment_moderation_dict) +score_comment_moderation_from_dict = ScoreCommentModeration.from_dict(score_comment_moderation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentUpdate.md b/docs/reference/ScoreCommentUpdate.md similarity index 76% rename from docs/ScoreCommentUpdate.md rename to docs/reference/ScoreCommentUpdate.md index 87f4673..40ec275 100644 --- a/docs/ScoreCommentUpdate.md +++ b/docs/reference/ScoreCommentUpdate.md @@ -6,7 +6,7 @@ Update of a comment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**revision** | **str** | The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] +**revision** | **str** | The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] **comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] @@ -21,12 +21,12 @@ json = "{}" # create an instance of ScoreCommentUpdate from a JSON string score_comment_update_instance = ScoreCommentUpdate.from_json(json) # print the JSON string representation of the object -print ScoreCommentUpdate.to_json() +print(ScoreCommentUpdate.to_json()) # convert the object into a dict score_comment_update_dict = score_comment_update_instance.to_dict() # create an instance of ScoreCommentUpdate from a dict -score_comment_update_form_dict = score_comment_update.from_dict(score_comment_update_dict) +score_comment_update_from_dict = ScoreCommentUpdate.from_dict(score_comment_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCommentsCounts.md b/docs/reference/ScoreCommentsCounts.md similarity index 75% rename from docs/ScoreCommentsCounts.md rename to docs/reference/ScoreCommentsCounts.md index 6c8117f..66a055b 100644 --- a/docs/ScoreCommentsCounts.md +++ b/docs/reference/ScoreCommentsCounts.md @@ -1,6 +1,6 @@ # ScoreCommentsCounts -A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). +A computed version of the total, unique, weekly, monthly and yearly number of comments added on the documents (this doesn't include inline comments). ## Properties @@ -10,6 +10,7 @@ Name | Type | Description | Notes **unique** | **float** | The unique (1/user) number of comments added to the score | [optional] **weekly** | **float** | The weekly unique number of comments added to the score | [optional] **monthly** | **float** | The monthly unique number of comments added to the score | [optional] +**yearly** | **float** | The yearly unique number of comments added to the score | [optional] ## Example @@ -21,12 +22,12 @@ json = "{}" # create an instance of ScoreCommentsCounts from a JSON string score_comments_counts_instance = ScoreCommentsCounts.from_json(json) # print the JSON string representation of the object -print ScoreCommentsCounts.to_json() +print(ScoreCommentsCounts.to_json()) # convert the object into a dict score_comments_counts_dict = score_comments_counts_instance.to_dict() # create an instance of ScoreCommentsCounts from a dict -score_comments_counts_form_dict = score_comments_counts.from_dict(score_comments_counts_dict) +score_comments_counts_from_dict = ScoreCommentsCounts.from_dict(score_comments_counts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreCreation.md b/docs/reference/ScoreCreation.md similarity index 64% rename from docs/ScoreCreation.md rename to docs/reference/ScoreCreation.md index 1760f2c..66c52d0 100644 --- a/docs/ScoreCreation.md +++ b/docs/reference/ScoreCreation.md @@ -6,14 +6,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] -**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] **google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] -**builder_data** | [**ScoreCreationBuilderData**](ScoreCreationBuilderData.md) | | [optional] +**builder_data** | [**ScoreCreationBuilderDataAllOfBuilderData**](ScoreCreationBuilderDataAllOfBuilderData.md) | | **filename** | **str** | If this is an imported file, its filename | [optional] -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | [optional] +**data** | **str** | The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | **data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] -**source** | [**ScoreSource**](ScoreSource.md) | | [optional] +**supports_tasks** | **bool** | Set this to `true` if the client supports asynchronous task flows. When importing a score that requires OMR processing (a PDF or a page image), the API will return a 202 Accepted response along with a task reference. The client can then check the task status using the endpoint `GET /v2/tasks/{task}`. | [optional] +**source** | [**ScoreSource**](ScoreSource.md) | | ## Example @@ -25,12 +26,12 @@ json = "{}" # create an instance of ScoreCreation from a JSON string score_creation_instance = ScoreCreation.from_json(json) # print the JSON string representation of the object -print ScoreCreation.to_json() +print(ScoreCreation.to_json()) # convert the object into a dict score_creation_dict = score_creation_instance.to_dict() # create an instance of ScoreCreation from a dict -score_creation_form_dict = score_creation.from_dict(score_creation_dict) +score_creation_from_dict = ScoreCreation.from_dict(score_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreCreationBuilderData.md b/docs/reference/ScoreCreationBuilderData.md new file mode 100644 index 0000000..b511cc8 --- /dev/null +++ b/docs/reference/ScoreCreationBuilderData.md @@ -0,0 +1,33 @@ +# ScoreCreationBuilderData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**builder_data** | [**ScoreCreationBuilderDataAllOfBuilderData**](ScoreCreationBuilderDataAllOfBuilderData.md) | | + +## Example + +```python +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderData from a JSON string +score_creation_builder_data_instance = ScoreCreationBuilderData.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationBuilderData.to_json()) + +# convert the object into a dict +score_creation_builder_data_dict = score_creation_builder_data_instance.to_dict() +# create an instance of ScoreCreationBuilderData from a dict +score_creation_builder_data_from_dict = ScoreCreationBuilderData.from_dict(score_creation_builder_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ScoreCreationBuilderDataAllOfBuilderData.md b/docs/reference/ScoreCreationBuilderDataAllOfBuilderData.md new file mode 100644 index 0000000..1cb972f --- /dev/null +++ b/docs/reference/ScoreCreationBuilderDataAllOfBuilderData.md @@ -0,0 +1,30 @@ +# ScoreCreationBuilderDataAllOfBuilderData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score_data** | [**ScoreCreationBuilderDataAllOfBuilderDataScoreData**](ScoreCreationBuilderDataAllOfBuilderDataScoreData.md) | | +**layout_data** | [**ScoreCreationBuilderDataAllOfBuilderDataLayoutData**](ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md) | | [optional] + +## Example + +```python +from flat_api.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataAllOfBuilderData from a JSON string +score_creation_builder_data_all_of_builder_data_instance = ScoreCreationBuilderDataAllOfBuilderData.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationBuilderDataAllOfBuilderData.to_json()) + +# convert the object into a dict +score_creation_builder_data_all_of_builder_data_dict = score_creation_builder_data_all_of_builder_data_instance.to_dict() +# create an instance of ScoreCreationBuilderDataAllOfBuilderData from a dict +score_creation_builder_data_all_of_builder_data_from_dict = ScoreCreationBuilderDataAllOfBuilderData.from_dict(score_creation_builder_data_all_of_builder_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationBuilderDataLayoutData.md b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md similarity index 60% rename from docs/ScoreCreationBuilderDataLayoutData.md rename to docs/reference/ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md index a67db30..3f575bb 100644 --- a/docs/ScoreCreationBuilderDataLayoutData.md +++ b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataLayoutData.md @@ -1,4 +1,4 @@ -# ScoreCreationBuilderDataLayoutData +# ScoreCreationBuilderDataAllOfBuilderDataLayoutData Control the appearance of the score. If missing, default values are used. @@ -18,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData # TODO update the JSON string below json = "{}" -# create an instance of ScoreCreationBuilderDataLayoutData from a JSON string -score_creation_builder_data_layout_data_instance = ScoreCreationBuilderDataLayoutData.from_json(json) +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a JSON string +score_creation_builder_data_all_of_builder_data_layout_data_instance = ScoreCreationBuilderDataAllOfBuilderDataLayoutData.from_json(json) # print the JSON string representation of the object -print ScoreCreationBuilderDataLayoutData.to_json() +print(ScoreCreationBuilderDataAllOfBuilderDataLayoutData.to_json()) # convert the object into a dict -score_creation_builder_data_layout_data_dict = score_creation_builder_data_layout_data_instance.to_dict() -# create an instance of ScoreCreationBuilderDataLayoutData from a dict -score_creation_builder_data_layout_data_form_dict = score_creation_builder_data_layout_data.from_dict(score_creation_builder_data_layout_data_dict) +score_creation_builder_data_all_of_builder_data_layout_data_dict = score_creation_builder_data_all_of_builder_data_layout_data_instance.to_dict() +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a dict +score_creation_builder_data_all_of_builder_data_layout_data_from_dict = ScoreCreationBuilderDataAllOfBuilderDataLayoutData.from_dict(score_creation_builder_data_all_of_builder_data_layout_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreData.md b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreData.md new file mode 100644 index 0000000..0860166 --- /dev/null +++ b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreData.md @@ -0,0 +1,34 @@ +# ScoreCreationBuilderDataAllOfBuilderDataScoreData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**use_tab_staff** | **bool** | true if the TAB staff is displayed with fretted instruments | [optional] +**use_chord_grid** | **bool** | true if the chord grid must be displayed with fretted instruments | [optional] +**fifths** | **float** | The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided. | [optional] +**nb_beats** | **float** | The number of beats in the measure | [optional] +**beat_type** | **float** | The duration of a beat in the measure | [optional] +**instruments** | [**List[ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments]**](ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md) | The list of instruments to add to the score. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for the possible values for `group` and `instrument` (also available as the [`@flat/instruments`](https://www.npmjs.com/package/@flat/instruments) package). | + +## Example + +```python +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a JSON string +score_creation_builder_data_all_of_builder_data_score_data_instance = ScoreCreationBuilderDataAllOfBuilderDataScoreData.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationBuilderDataAllOfBuilderDataScoreData.to_json()) + +# convert the object into a dict +score_creation_builder_data_all_of_builder_data_score_data_dict = score_creation_builder_data_all_of_builder_data_score_data_instance.to_dict() +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a dict +score_creation_builder_data_all_of_builder_data_score_data_from_dict = ScoreCreationBuilderDataAllOfBuilderDataScoreData.from_dict(score_creation_builder_data_all_of_builder_data_score_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md new file mode 100644 index 0000000..bf09535 --- /dev/null +++ b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md @@ -0,0 +1,33 @@ +# ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | +**instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | +**long_name** | **str** | The full name of the instrument | [optional] +**short_name** | **str** | The abbreviation of the name of the instrument | [optional] +**has_quarter_tone** | **bool** | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] + +## Example + +```python +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a JSON string +score_creation_builder_data_all_of_builder_data_score_data_instruments_instance = ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.to_json()) + +# convert the object into a dict +score_creation_builder_data_all_of_builder_data_score_data_instruments_dict = score_creation_builder_data_all_of_builder_data_score_data_instruments_instance.to_dict() +# create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a dict +score_creation_builder_data_all_of_builder_data_score_data_instruments_from_dict = ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.from_dict(score_creation_builder_data_all_of_builder_data_score_data_instruments_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ScoreCreationCommon.md b/docs/reference/ScoreCreationCommon.md new file mode 100644 index 0000000..ecd02d3 --- /dev/null +++ b/docs/reference/ScoreCreationCommon.md @@ -0,0 +1,32 @@ +# ScoreCreationCommon + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] + +## Example + +```python +from flat_api.models.score_creation_common import ScoreCreationCommon + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationCommon from a JSON string +score_creation_common_instance = ScoreCreationCommon.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationCommon.to_json()) + +# convert the object into a dict +score_creation_common_dict = score_creation_common_instance.to_dict() +# create an instance of ScoreCreationCommon from a dict +score_creation_common_from_dict = ScoreCreationCommon.from_dict(score_creation_common_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ScoreCreationFileImport.md b/docs/reference/ScoreCreationFileImport.md new file mode 100644 index 0000000..8356711 --- /dev/null +++ b/docs/reference/ScoreCreationFileImport.md @@ -0,0 +1,36 @@ +# ScoreCreationFileImport + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**filename** | **str** | If this is an imported file, its filename | [optional] +**data** | **str** | The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | +**data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] +**supports_tasks** | **bool** | Set this to `true` if the client supports asynchronous task flows. When importing a score that requires OMR processing (a PDF or a page image), the API will return a 202 Accepted response along with a task reference. The client can then check the task status using the endpoint `GET /v2/tasks/{task}`. | [optional] + +## Example + +```python +from flat_api.models.score_creation_file_import import ScoreCreationFileImport + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationFileImport from a JSON string +score_creation_file_import_instance = ScoreCreationFileImport.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationFileImport.to_json()) + +# convert the object into a dict +score_creation_file_import_dict = score_creation_file_import_instance.to_dict() +# create an instance of ScoreCreationFileImport from a dict +score_creation_file_import_from_dict = ScoreCreationFileImport.from_dict(score_creation_file_import_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/ScoreCreationGoogleDriveImport.md b/docs/reference/ScoreCreationGoogleDriveImport.md new file mode 100644 index 0000000..8fbd201 --- /dev/null +++ b/docs/reference/ScoreCreationGoogleDriveImport.md @@ -0,0 +1,33 @@ +# ScoreCreationGoogleDriveImport + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] +**collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**source** | [**ScoreSource**](ScoreSource.md) | | + +## Example + +```python +from flat_api.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreCreationGoogleDriveImport from a JSON string +score_creation_google_drive_import_instance = ScoreCreationGoogleDriveImport.from_json(json) +# print the JSON string representation of the object +print(ScoreCreationGoogleDriveImport.to_json()) + +# convert the object into a dict +score_creation_google_drive_import_dict = score_creation_google_drive_import_instance.to_dict() +# create an instance of ScoreCreationGoogleDriveImport from a dict +score_creation_google_drive_import_from_dict = ScoreCreationGoogleDriveImport.from_dict(score_creation_google_drive_import_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreCreationType.md b/docs/reference/ScoreCreationType.md similarity index 67% rename from docs/ScoreCreationType.md rename to docs/reference/ScoreCreationType.md index 62ce471..976af5a 100644 --- a/docs/ScoreCreationType.md +++ b/docs/reference/ScoreCreationType.md @@ -2,10 +2,13 @@ The type of creation (an orginal, an arrangement) -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ORIGINAL` (value: `'original'`) + +* `ARRANGEMENT` (value: `'arrangement'`) + +* `OTHER` (value: `'other'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreDetails.md b/docs/reference/ScoreDetails.md similarity index 76% rename from docs/ScoreDetails.md rename to docs/reference/ScoreDetails.md index dc11ce5..609c7c0 100644 --- a/docs/ScoreDetails.md +++ b/docs/reference/ScoreDetails.md @@ -1,5 +1,6 @@ # ScoreDetails +The score and all its details ## Properties @@ -8,9 +9,10 @@ Name | Type | Description | Notes **id** | **str** | The unique identifier of the score | **sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] **title** | **str** | The title of the score | -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [default to ScorePrivacy.PRIVATE] **user** | [**UserPublic**](UserPublic.md) | | **html_url** | **str** | The url where the score can be viewed in a web browser | +**edit_html_url** | **str** | The url where the score can be edited in a web browser | **subtitle** | **str** | Subtitle of the score | [optional] **lyricist** | **str** | Lyricist of the score | [optional] **arranger** | **str** | Arranger of the score | [optional] @@ -25,21 +27,24 @@ Name | Type | Description | Notes **main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] **main_key_signature** | **float** | The main key signature of the score (expressed between -7 and 7). | [optional] **rights** | [**ResourceRights**](ResourceRights.md) | | [optional] -**collaborators** | [**List[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | [optional] -**creation_date** | **datetime** | The date when the score was created | [optional] +**collaborators** | [**List[ResourceCollaborator]**](ResourceCollaborator.md) | The list of the collaborators of the score | +**creation_date** | **datetime** | The date when the score was created | **modification_date** | **datetime** | The date of the last revision of the score | [optional] **publication_date** | **datetime** | The date when the score was published on Flat | [optional] +**scheduled_deletion_date** | **datetime** | The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. | [optional] **highlighted_date** | **datetime** | The date when the score was highlighted (featured) on our community | [optional] **organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] **parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] -**instruments** | **List[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] -**samples** | **List[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | [optional] +**instruments** | **List[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | +**instruments_names** | **List[str]** | An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. | +**samples** | **List[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | **google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] **likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] **comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] **views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] **plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] **collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**me** | [**ScoreDetailsAllOfMe**](ScoreDetailsAllOfMe.md) | | [optional] ## Example @@ -51,12 +56,12 @@ json = "{}" # create an instance of ScoreDetails from a JSON string score_details_instance = ScoreDetails.from_json(json) # print the JSON string representation of the object -print ScoreDetails.to_json() +print(ScoreDetails.to_json()) # convert the object into a dict score_details_dict = score_details_instance.to_dict() # create an instance of ScoreDetails from a dict -score_details_form_dict = score_details.from_dict(score_details_dict) +score_details_from_dict = ScoreDetails.from_dict(score_details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreDetailsAllOfMe.md b/docs/reference/ScoreDetailsAllOfMe.md new file mode 100644 index 0000000..c117d10 --- /dev/null +++ b/docs/reference/ScoreDetailsAllOfMe.md @@ -0,0 +1,31 @@ +# ScoreDetailsAllOfMe + +Information about the authenticated user and this score + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_liked** | **bool** | True if the current user likes this score | +**is_in_library** | **bool** | True if the score is stored in one of the user's collections | + +## Example + +```python +from flat_api.models.score_details_all_of_me import ScoreDetailsAllOfMe + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreDetailsAllOfMe from a JSON string +score_details_all_of_me_instance = ScoreDetailsAllOfMe.from_json(json) +# print the JSON string representation of the object +print(ScoreDetailsAllOfMe.to_json()) + +# convert the object into a dict +score_details_all_of_me_dict = score_details_all_of_me_instance.to_dict() +# create an instance of ScoreDetailsAllOfMe from a dict +score_details_all_of_me_from_dict = ScoreDetailsAllOfMe.from_dict(score_details_all_of_me_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreFork.md b/docs/reference/ScoreFork.md similarity index 76% rename from docs/ScoreFork.md rename to docs/reference/ScoreFork.md index da7055f..05fa80e 100644 --- a/docs/ScoreFork.md +++ b/docs/reference/ScoreFork.md @@ -6,7 +6,7 @@ Options to fork the score Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections | [optional] [default to 'root'] +**collection** | **str** | Unique identifier of a collection where the score will be copied. If no collection identifier is provided, a virtual collection is used, or `null` is provided, the score won't be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] **google_drive_disabled** | **bool** | If set to `true`, the API won't create the score on Google Drive | [optional] [default to False] **keep_original_title** | **bool** | Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). | [optional] @@ -20,12 +20,12 @@ json = "{}" # create an instance of ScoreFork from a JSON string score_fork_instance = ScoreFork.from_json(json) # print the JSON string representation of the object -print ScoreFork.to_json() +print(ScoreFork.to_json()) # convert the object into a dict score_fork_dict = score_fork_instance.to_dict() # create an instance of ScoreFork from a dict -score_fork_form_dict = score_fork.from_dict(score_fork_dict) +score_fork_from_dict = ScoreFork.from_dict(score_fork_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreLicense.md b/docs/reference/ScoreLicense.md new file mode 100644 index 0000000..c13bd48 --- /dev/null +++ b/docs/reference/ScoreLicense.md @@ -0,0 +1,25 @@ +# ScoreLicense + +License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + +## Enum + +* `COPYRIGHT` (value: `'copyright'`) + +* `CC0` (value: `'cc0'`) + +* `CC_MINUS_BY` (value: `'cc-by'`) + +* `CC_MINUS_BY_MINUS_SA` (value: `'cc-by-sa'`) + +* `CC_MINUS_BY_MINUS_ND` (value: `'cc-by-nd'`) + +* `CC_MINUS_BY_MINUS_NC` (value: `'cc-by-nc'`) + +* `CC_MINUS_BY_MINUS_NC_MINUS_SA` (value: `'cc-by-nc-sa'`) + +* `CC_MINUS_BY_MINUS_NC_MINUS_ND` (value: `'cc-by-nc-nd'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreLikesCounts.md b/docs/reference/ScoreLikesCounts.md similarity index 73% rename from docs/ScoreLikesCounts.md rename to docs/reference/ScoreLikesCounts.md index 40aad8e..c017f28 100644 --- a/docs/ScoreLikesCounts.md +++ b/docs/reference/ScoreLikesCounts.md @@ -1,14 +1,15 @@ # ScoreLikesCounts -A computed version of the weekly, monthly and total of number of likes for a score +A computed version of the weekly, monthly, yearly and total number of likes for a score ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **float** | The total number of likes of the score | [default to 0] -**weekly** | **float** | The number of new likes during the last week | [default to 0] -**monthly** | **float** | The number of new likes during the last month | [default to 0] +**total** | **float** | The total number of likes of the score | [optional] +**weekly** | **float** | The number of new likes during the last week | [optional] +**monthly** | **float** | The number of new likes during the last month | [optional] +**yearly** | **float** | The number of new likes during the last year | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of ScoreLikesCounts from a JSON string score_likes_counts_instance = ScoreLikesCounts.from_json(json) # print the JSON string representation of the object -print ScoreLikesCounts.to_json() +print(ScoreLikesCounts.to_json()) # convert the object into a dict score_likes_counts_dict = score_likes_counts_instance.to_dict() # create an instance of ScoreLikesCounts from a dict -score_likes_counts_form_dict = score_likes_counts.from_dict(score_likes_counts_dict) +score_likes_counts_from_dict = ScoreLikesCounts.from_dict(score_likes_counts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreModification.md b/docs/reference/ScoreModification.md similarity index 91% rename from docs/ScoreModification.md rename to docs/reference/ScoreModification.md index ec46914..8ec3448 100644 --- a/docs/ScoreModification.md +++ b/docs/reference/ScoreModification.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **composer** | **str** | The composer of the score | [optional] **lyricist** | **str** | The lyricist of the score | [optional] **arranger** | **str** | The arranger of the score | [optional] -**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **sharing_key** | **str** | When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated. | [optional] **description** | **str** | Description of the creation | [optional] **tags** | **List[str]** | Tags describing the score | [optional] @@ -29,12 +29,12 @@ json = "{}" # create an instance of ScoreModification from a JSON string score_modification_instance = ScoreModification.from_json(json) # print the JSON string representation of the object -print ScoreModification.to_json() +print(ScoreModification.to_json()) # convert the object into a dict score_modification_dict = score_modification_instance.to_dict() # create an instance of ScoreModification from a dict -score_modification_form_dict = score_modification.from_dict(score_modification_dict) +score_modification_from_dict = ScoreModification.from_dict(score_modification_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorePlaysCounts.md b/docs/reference/ScorePlaysCounts.md similarity index 77% rename from docs/ScorePlaysCounts.md rename to docs/reference/ScorePlaysCounts.md index f05b4a8..1b064fa 100644 --- a/docs/ScorePlaysCounts.md +++ b/docs/reference/ScorePlaysCounts.md @@ -1,6 +1,6 @@ # ScorePlaysCounts -A computed version of the total, weekly, and monthly number of plays of the score +A computed version of the total, weekly, monthly, and yearly number of plays of the score ## Properties @@ -9,6 +9,7 @@ Name | Type | Description | Notes **total** | **float** | The total number of plays of the score | [optional] **weekly** | **float** | The weekly number of plays of the score | [optional] **monthly** | **float** | The monthly number of plays of the score | [optional] +**yearly** | **float** | The yearly number of plays of the score | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of ScorePlaysCounts from a JSON string score_plays_counts_instance = ScorePlaysCounts.from_json(json) # print the JSON string representation of the object -print ScorePlaysCounts.to_json() +print(ScorePlaysCounts.to_json()) # convert the object into a dict score_plays_counts_dict = score_plays_counts_instance.to_dict() # create an instance of ScorePlaysCounts from a dict -score_plays_counts_form_dict = score_plays_counts.from_dict(score_plays_counts_dict) +score_plays_counts_from_dict = ScorePlaysCounts.from_dict(score_plays_counts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScorePrivacy.md b/docs/reference/ScorePrivacy.md similarity index 89% rename from docs/ScorePrivacy.md rename to docs/reference/ScorePrivacy.md index 7eed374..6fc865e 100644 --- a/docs/ScorePrivacy.md +++ b/docs/reference/ScorePrivacy.md @@ -2,10 +2,15 @@ The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `PUBLIC` (value: `'public'`) + +* `PRIVATE` (value: `'private'`) + +* `ORGANIZATIONPUBLIC` (value: `'organizationPublic'`) + +* `PRIVATELINK` (value: `'privateLink'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevision.md b/docs/reference/ScoreRevision.md similarity index 81% rename from docs/ScoreRevision.md rename to docs/reference/ScoreRevision.md index faa9878..dc513b2 100644 --- a/docs/ScoreRevision.md +++ b/docs/reference/ScoreRevision.md @@ -6,10 +6,11 @@ A score revision metadata Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the revision. | [optional] +**id** | **str** | The unique identifier of the revision. | **user** | **str** | The user identifier who created the revision | [optional] +**score** | **str** | The score identifier | **collaborators** | **List[str]** | | [optional] -**creation_date** | **datetime** | The date when this revision was created | [optional] +**var_date** | **datetime** | The date when this revision was created | **event** | **str** | The last event (action id) of the revision | [optional] **description** | **str** | A description associated to the revision | [optional] **autosave** | **bool** | True if this revision was automatically generated by Flat and not on purpose by the user. | [optional] @@ -25,12 +26,12 @@ json = "{}" # create an instance of ScoreRevision from a JSON string score_revision_instance = ScoreRevision.from_json(json) # print the JSON string representation of the object -print ScoreRevision.to_json() +print(ScoreRevision.to_json()) # convert the object into a dict score_revision_dict = score_revision_instance.to_dict() # create an instance of ScoreRevision from a dict -score_revision_form_dict = score_revision.from_dict(score_revision_dict) +score_revision_from_dict = ScoreRevision.from_dict(score_revision_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevisionCreation.md b/docs/reference/ScoreRevisionCreation.md similarity index 92% rename from docs/ScoreRevisionCreation.md rename to docs/reference/ScoreRevisionCreation.md index 05b9b6e..7fd51c4 100644 --- a/docs/ScoreRevisionCreation.md +++ b/docs/reference/ScoreRevisionCreation.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of ScoreRevisionCreation from a JSON string score_revision_creation_instance = ScoreRevisionCreation.from_json(json) # print the JSON string representation of the object -print ScoreRevisionCreation.to_json() +print(ScoreRevisionCreation.to_json()) # convert the object into a dict score_revision_creation_dict = score_revision_creation_instance.to_dict() # create an instance of ScoreRevisionCreation from a dict -score_revision_creation_form_dict = score_revision_creation.from_dict(score_revision_creation_dict) +score_revision_creation_from_dict = ScoreRevisionCreation.from_dict(score_revision_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreRevisionStatistics.md b/docs/reference/ScoreRevisionStatistics.md similarity index 89% rename from docs/ScoreRevisionStatistics.md rename to docs/reference/ScoreRevisionStatistics.md index aec7fc7..fb3c122 100644 --- a/docs/ScoreRevisionStatistics.md +++ b/docs/reference/ScoreRevisionStatistics.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of ScoreRevisionStatistics from a JSON string score_revision_statistics_instance = ScoreRevisionStatistics.from_json(json) # print the JSON string representation of the object -print ScoreRevisionStatistics.to_json() +print(ScoreRevisionStatistics.to_json()) # convert the object into a dict score_revision_statistics_dict = score_revision_statistics_instance.to_dict() # create an instance of ScoreRevisionStatistics from a dict -score_revision_statistics_form_dict = score_revision_statistics.from_dict(score_revision_statistics_dict) +score_revision_statistics_from_dict = ScoreRevisionStatistics.from_dict(score_revision_statistics_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreSource.md b/docs/reference/ScoreSource.md similarity index 90% rename from docs/ScoreSource.md rename to docs/reference/ScoreSource.md index 794a423..473a5f6 100644 --- a/docs/ScoreSource.md +++ b/docs/reference/ScoreSource.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of ScoreSource from a JSON string score_source_instance = ScoreSource.from_json(json) # print the JSON string representation of the object -print ScoreSource.to_json() +print(ScoreSource.to_json()) # convert the object into a dict score_source_dict = score_source_instance.to_dict() # create an instance of ScoreSource from a dict -score_source_form_dict = score_source.from_dict(score_source_dict) +score_source_from_dict = ScoreSource.from_dict(score_source_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreSummary.md b/docs/reference/ScoreSummary.md new file mode 100644 index 0000000..b10aa84 --- /dev/null +++ b/docs/reference/ScoreSummary.md @@ -0,0 +1,35 @@ +# ScoreSummary + +A summary of the score details + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the score | +**sharing_key** | **str** | The private sharing key of the score (available when the `privacy` mode is set to `privateLink`) | [optional] +**title** | **str** | The title of the score | +**privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [default to ScorePrivacy.PRIVATE] +**user** | [**UserPublic**](UserPublic.md) | | +**html_url** | **str** | The url where the score can be viewed in a web browser | + +## Example + +```python +from flat_api.models.score_summary import ScoreSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreSummary from a JSON string +score_summary_instance = ScoreSummary.from_json(json) +# print the JSON string representation of the object +print(ScoreSummary.to_json()) + +# convert the object into a dict +score_summary_dict = score_summary_instance.to_dict() +# create an instance of ScoreSummary from a dict +score_summary_from_dict = ScoreSummary.from_dict(score_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrack.md b/docs/reference/ScoreTrack.md similarity index 81% rename from docs/ScoreTrack.md rename to docs/reference/ScoreTrack.md index 7113f3e..53ad324 100644 --- a/docs/ScoreTrack.md +++ b/docs/reference/ScoreTrack.md @@ -8,14 +8,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the score track | **title** | **str** | Title of the track | [optional] -**score** | **str** | The unique identifier of the score | +**score** | **str** | The unique identifier of the score. Absent for Free Record performance submissions, which are recorded without an attached score. | [optional] **creator** | **str** | The unique identifier of the track creator | **creation_date** | **datetime** | The creation date of the track | **modification_date** | **datetime** | The modification date of the track | **default** | **bool** | True if the track should be used as default audio source | -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [default to ScoreTrackState.DRAFT] **type** | [**ScoreTrackType**](ScoreTrackType.md) | | -**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | +**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | [default to ScoreTrackPurpose.COMMON] **url** | **str** | The URL of the track | [optional] **media_id** | **str** | The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` | [optional] **synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] @@ -30,12 +30,12 @@ json = "{}" # create an instance of ScoreTrack from a JSON string score_track_instance = ScoreTrack.from_json(json) # print the JSON string representation of the object -print ScoreTrack.to_json() +print(ScoreTrack.to_json()) # convert the object into a dict score_track_dict = score_track_instance.to_dict() # create an instance of ScoreTrack from a dict -score_track_form_dict = score_track.from_dict(score_track_dict) +score_track_from_dict = ScoreTrack.from_dict(score_track_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackCreation.md b/docs/reference/ScoreTrackCreation.md similarity index 85% rename from docs/ScoreTrackCreation.md rename to docs/reference/ScoreTrackCreation.md index f07feb4..f49123d 100644 --- a/docs/ScoreTrackCreation.md +++ b/docs/reference/ScoreTrackCreation.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the track | [optional] **default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] -**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] [default to ScoreTrackState.DRAFT] +**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | [optional] [default to ScoreTrackPurpose.COMMON] **url** | **str** | The URL of the track | [optional] **synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] @@ -23,12 +23,12 @@ json = "{}" # create an instance of ScoreTrackCreation from a JSON string score_track_creation_instance = ScoreTrackCreation.from_json(json) # print the JSON string representation of the object -print ScoreTrackCreation.to_json() +print(ScoreTrackCreation.to_json()) # convert the object into a dict score_track_creation_dict = score_track_creation_instance.to_dict() # create an instance of ScoreTrackCreation from a dict -score_track_creation_form_dict = score_track_creation.from_dict(score_track_creation_dict) +score_track_creation_from_dict = ScoreTrackCreation.from_dict(score_track_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/ScoreTrackCreationResponse.md b/docs/reference/ScoreTrackCreationResponse.md new file mode 100644 index 0000000..216af53 --- /dev/null +++ b/docs/reference/ScoreTrackCreationResponse.md @@ -0,0 +1,30 @@ +# ScoreTrackCreationResponse + +Response for track creation including optional upload information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**track** | [**ScoreTrack**](ScoreTrack.md) | | + +## Example + +```python +from flat_api.models.score_track_creation_response import ScoreTrackCreationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ScoreTrackCreationResponse from a JSON string +score_track_creation_response_instance = ScoreTrackCreationResponse.from_json(json) +# print the JSON string representation of the object +print(ScoreTrackCreationResponse.to_json()) + +# convert the object into a dict +score_track_creation_response_dict = score_track_creation_response_instance.to_dict() +# create an instance of ScoreTrackCreationResponse from a dict +score_track_creation_response_from_dict = ScoreTrackCreationResponse.from_dict(score_track_creation_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreTrackPoint.md b/docs/reference/ScoreTrackPoint.md similarity index 84% rename from docs/ScoreTrackPoint.md rename to docs/reference/ScoreTrackPoint.md index b817616..68cea4f 100644 --- a/docs/ScoreTrackPoint.md +++ b/docs/reference/ScoreTrackPoint.md @@ -7,7 +7,7 @@ A track synchronization point Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid` | -**measure_uuid** | **str** | The measure unique identifier | [optional] +**measure_uuid** | **UUID** | The measure unique identifier | [optional] **time** | **float** | The corresponding time in seconds | ## Example @@ -20,12 +20,12 @@ json = "{}" # create an instance of ScoreTrackPoint from a JSON string score_track_point_instance = ScoreTrackPoint.from_json(json) # print the JSON string representation of the object -print ScoreTrackPoint.to_json() +print(ScoreTrackPoint.to_json()) # convert the object into a dict score_track_point_dict = score_track_point_instance.to_dict() # create an instance of ScoreTrackPoint from a dict -score_track_point_form_dict = score_track_point.from_dict(score_track_point_dict) +score_track_point_from_dict = ScoreTrackPoint.from_dict(score_track_point_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackPurpose.md b/docs/reference/ScoreTrackPurpose.md similarity index 66% rename from docs/ScoreTrackPurpose.md rename to docs/reference/ScoreTrackPurpose.md index f7747e0..4032fba 100644 --- a/docs/ScoreTrackPurpose.md +++ b/docs/reference/ScoreTrackPurpose.md @@ -2,10 +2,11 @@ The purpose of the audio track -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `COMMON` (value: `'common'`) + +* `PERFORMANCESUBMISSION` (value: `'performanceSubmission'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackState.md b/docs/reference/ScoreTrackState.md similarity index 65% rename from docs/ScoreTrackState.md rename to docs/reference/ScoreTrackState.md index 8aa8259..ec09aa3 100644 --- a/docs/ScoreTrackState.md +++ b/docs/reference/ScoreTrackState.md @@ -2,10 +2,13 @@ State of the track -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `DRAFT` (value: `'draft'`) + +* `COMPLETED` (value: `'completed'`) + +* `DELETED` (value: `'deleted'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackType.md b/docs/reference/ScoreTrackType.md similarity index 60% rename from docs/ScoreTrackType.md rename to docs/reference/ScoreTrackType.md index a975b2c..30363bd 100644 --- a/docs/ScoreTrackType.md +++ b/docs/reference/ScoreTrackType.md @@ -2,10 +2,15 @@ The type of an audio track -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUDIO` (value: `'audio'`) + +* `SOUNDCLOUD` (value: `'soundcloud'`) + +* `YOUTUBE` (value: `'youtube'`) + +* `VIMEO` (value: `'vimeo'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreTrackUpdate.md b/docs/reference/ScoreTrackUpdate.md similarity index 80% rename from docs/ScoreTrackUpdate.md rename to docs/reference/ScoreTrackUpdate.md index d734275..56e4db1 100644 --- a/docs/ScoreTrackUpdate.md +++ b/docs/reference/ScoreTrackUpdate.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the track | [optional] **default** | **bool** | True if the track should be used as default audio source | [optional] -**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] +**state** | [**ScoreTrackState**](ScoreTrackState.md) | | [optional] [default to ScoreTrackState.DRAFT] +**purpose** | [**ScoreTrackPurpose**](ScoreTrackPurpose.md) | | [optional] [default to ScoreTrackPurpose.COMMON] **synchronization_points** | [**List[ScoreTrackPoint]**](ScoreTrackPoint.md) | | [optional] ## Example @@ -21,12 +22,12 @@ json = "{}" # create an instance of ScoreTrackUpdate from a JSON string score_track_update_instance = ScoreTrackUpdate.from_json(json) # print the JSON string representation of the object -print ScoreTrackUpdate.to_json() +print(ScoreTrackUpdate.to_json()) # convert the object into a dict score_track_update_dict = score_track_update_instance.to_dict() # create an instance of ScoreTrackUpdate from a dict -score_track_update_form_dict = score_track_update.from_dict(score_track_update_dict) +score_track_update_from_dict = ScoreTrackUpdate.from_dict(score_track_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ScoreViewsCounts.md b/docs/reference/ScoreViewsCounts.md similarity index 77% rename from docs/ScoreViewsCounts.md rename to docs/reference/ScoreViewsCounts.md index 5988f15..269f207 100644 --- a/docs/ScoreViewsCounts.md +++ b/docs/reference/ScoreViewsCounts.md @@ -1,6 +1,6 @@ # ScoreViewsCounts -A computed version of the total, weekly, and monthly number of views of the score +A computed version of the total, weekly, monthly, and yearly number of views of the score ## Properties @@ -9,6 +9,7 @@ Name | Type | Description | Notes **total** | **float** | The total number of views of the score | [optional] **weekly** | **float** | The weekly number of views of the score | [optional] **monthly** | **float** | The monthly number of views of the score | [optional] +**yearly** | **float** | The yearly number of views of the score | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of ScoreViewsCounts from a JSON string score_views_counts_instance = ScoreViewsCounts.from_json(json) # print the JSON string representation of the object -print ScoreViewsCounts.to_json() +print(ScoreViewsCounts.to_json()) # convert the object into a dict score_views_counts_dict = score_views_counts_instance.to_dict() # create an instance of ScoreViewsCounts from a dict -score_views_counts_form_dict = score_views_counts.from_dict(score_views_counts_dict) +score_views_counts_from_dict = ScoreViewsCounts.from_dict(score_views_counts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Task.md b/docs/reference/Task.md similarity index 65% rename from docs/Task.md rename to docs/reference/Task.md index c156d1c..3da49d4 100644 --- a/docs/Task.md +++ b/docs/reference/Task.md @@ -7,16 +7,19 @@ An asynchronous task Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the task | -**type** | **str** | Type of the task (e.g. audio-export) | [optional] +**type** | **str** | Type of the task: * `audio-export`: Exports a score to audio format (MP3, WAV) * `score-save`: Saves or updates a score document * `import-omr`: Processes a PDF through OMR (Optical Music Recognition) and imports it as a score | [optional] **state** | **str** | State of the Task | **format** | **str** | For files processing, the file format (e.g. `mp3`, `wav`) | [optional] **score** | **str** | The score unique identifier for tasks related to scores | [optional] +**revision** | **str** | The score revision identifier for tasks related to scores | [optional] **progress** | [**TaskProgress**](TaskProgress.md) | | [optional] **creation_date** | **datetime** | The creation date of the task | [optional] **modification_date** | **datetime** | The last modification date of the task | [optional] **done_date** | **datetime** | The date when the task has been completed | [optional] **result** | [**TaskResult**](TaskResult.md) | | [optional] **error_history** | **List[str]** | If any errors happened when processing this task, the list of errors identifiers | [optional] +**is_cancellable** | **bool** | Whether the task can be canceled by the user. Only `true` when the task is in `created` state (waiting to be processed). | [optional] [readonly] +**children** | [**List[Task]**](Task.md) | Child tasks for hierarchical task structures (e.g., conversion subtasks) | [optional] ## Example @@ -28,12 +31,12 @@ json = "{}" # create an instance of Task from a JSON string task_instance = Task.from_json(json) # print the JSON string representation of the object -print Task.to_json() +print(Task.to_json()) # convert the object into a dict task_dict = task_instance.to_dict() # create an instance of Task from a dict -task_form_dict = task.from_dict(task_dict) +task_from_dict = Task.from_dict(task_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskApi.md b/docs/reference/TaskApi.md similarity index 98% rename from docs/TaskApi.md rename to docs/reference/TaskApi.md index 29bdcf5..859c91f 100644 --- a/docs/TaskApi.md +++ b/docs/reference/TaskApi.md @@ -12,7 +12,8 @@ Method | HTTP request | Description Get a task details -This method can be used to follow a task progression, for example while a score is being exported. +This method can be used to follow a task progression, for example while a score is being exported. + ### Example diff --git a/docs/TaskExportOptions.md b/docs/reference/TaskExportOptions.md similarity index 87% rename from docs/TaskExportOptions.md rename to docs/reference/TaskExportOptions.md index 1c60b2f..863b4a3 100644 --- a/docs/TaskExportOptions.md +++ b/docs/reference/TaskExportOptions.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of TaskExportOptions from a JSON string task_export_options_instance = TaskExportOptions.from_json(json) # print the JSON string representation of the object -print TaskExportOptions.to_json() +print(TaskExportOptions.to_json()) # convert the object into a dict task_export_options_dict = task_export_options_instance.to_dict() # create an instance of TaskExportOptions from a dict -task_export_options_form_dict = task_export_options.from_dict(task_export_options_dict) +task_export_options_from_dict = TaskExportOptions.from_dict(task_export_options_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskProgress.md b/docs/reference/TaskProgress.md similarity index 90% rename from docs/TaskProgress.md rename to docs/reference/TaskProgress.md index 2846d7e..903b81d 100644 --- a/docs/TaskProgress.md +++ b/docs/reference/TaskProgress.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TaskProgress from a JSON string task_progress_instance = TaskProgress.from_json(json) # print the JSON string representation of the object -print TaskProgress.to_json() +print(TaskProgress.to_json()) # convert the object into a dict task_progress_dict = task_progress_instance.to_dict() # create an instance of TaskProgress from a dict -task_progress_form_dict = task_progress.from_dict(task_progress_dict) +task_progress_from_dict = TaskProgress.from_dict(task_progress_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TaskResult.md b/docs/reference/TaskResult.md similarity index 90% rename from docs/TaskResult.md rename to docs/reference/TaskResult.md index bc2cebd..c2639ad 100644 --- a/docs/TaskResult.md +++ b/docs/reference/TaskResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TaskResult from a JSON string task_result_instance = TaskResult.from_json(json) # print the JSON string representation of the object -print TaskResult.to_json() +print(TaskResult.to_json()) # convert the object into a dict task_result_dict = task_result_instance.to_dict() # create an instance of TaskResult from a dict -task_result_form_dict = task_result.from_dict(task_result_dict) +task_result_from_dict = TaskResult.from_dict(task_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/TeachingTheme.md b/docs/reference/TeachingTheme.md new file mode 100644 index 0000000..4a05a01 --- /dev/null +++ b/docs/reference/TeachingTheme.md @@ -0,0 +1,27 @@ +# TeachingTheme + +Teaching theme + +## Enum + +* `COMPOSITION` (value: `'composition'`) + +* `MUSIC_MINUS_THEORY` (value: `'music-theory'`) + +* `GENERAL_MINUS_MUSIC` (value: `'general-music'`) + +* `BAND` (value: `'band'`) + +* `CHOIR` (value: `'choir'`) + +* `ORCHESTRA` (value: `'orchestra'`) + +* `JAZZ_MINUS_ENSEMBLE` (value: `'jazz-ensemble'`) + +* `MUSIC_MINUS_TECHNOLOGY` (value: `'music-technology'`) + +* `OTHER` (value: `'other'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/reference/TutteoProduct.md b/docs/reference/TutteoProduct.md new file mode 100644 index 0000000..7b4538a --- /dev/null +++ b/docs/reference/TutteoProduct.md @@ -0,0 +1,17 @@ +# TutteoProduct + +A Tutteo product. * `flat`: [Flat](https://flat.io) - Music notation software for individual users * `flatEdu`: [Flat for Education](https://flat.io/edu) - Music notation software for schools and educators * `msnippet`: [Music Snippet](https://musicsnippet.com) - Embeddable music snippets for websites * `embed`: [Flat Embed](https://flat.io/developers/embed) - Embeddable music notation editor + +## Enum + +* `FLAT` (value: `'flat'`) + +* `FLATEDU` (value: `'flatEdu'`) + +* `MSNIPPET` (value: `'msnippet'`) + +* `EMBED` (value: `'embed'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAdminUpdate.md b/docs/reference/UserAdminUpdate.md similarity index 91% rename from docs/UserAdminUpdate.md rename to docs/reference/UserAdminUpdate.md index c754b5b..cfcddd8 100644 --- a/docs/UserAdminUpdate.md +++ b/docs/reference/UserAdminUpdate.md @@ -23,12 +23,12 @@ json = "{}" # create an instance of UserAdminUpdate from a JSON string user_admin_update_instance = UserAdminUpdate.from_json(json) # print the JSON string representation of the object -print UserAdminUpdate.to_json() +print(UserAdminUpdate.to_json()) # convert the object into a dict user_admin_update_dict = user_admin_update_instance.to_dict() # create an instance of UserAdminUpdate from a dict -user_admin_update_form_dict = user_admin_update.from_dict(user_admin_update_dict) +user_admin_update_from_dict = UserAdminUpdate.from_dict(user_admin_update_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/reference/UserApi.md similarity index 76% rename from docs/UserApi.md rename to docs/reference/UserApi.md index b0897be..035aa91 100644 --- a/docs/UserApi.md +++ b/docs/reference/UserApi.md @@ -14,7 +14,8 @@ Method | HTTP request | Description Get a public user profile -Get a profile of a Flat or Flat for Education User. +Get a profile of a Flat or Flat for Education User. + ### Example @@ -168,11 +169,14 @@ Name | Type | Description | Notes [[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) # **get_user_scores** -> List[ScoreDetails] get_user_scores(user, parent=parent) +> List[ScoreDetails] get_user_scores(user, paginate=paginate, sort=sort, direction=direction, limit=limit, next=next, previous=previous) List user's scores -Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. +Get the list of public scores owned by a User. +If you want to access to private scores, please use the [Collections API](#tag/Collection). +For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + ### Example @@ -202,11 +206,16 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.UserApi(api_client) user = 'user_example' # str | Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. - parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) + paginate = False # bool | When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (optional) (default to False) + sort = 'sort_example' # str | Sort (optional) + direction = 'direction_example' # str | Sort direction (optional) + limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25) + next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) + previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional) try: # List user's scores - api_response = api_instance.get_user_scores(user, parent=parent) + api_response = api_instance.get_user_scores(user, paginate=paginate, sort=sort, direction=direction, limit=limit, next=next, previous=previous) print("The response of UserApi->get_user_scores:\n") pprint(api_response) except Exception as e: @@ -221,7 +230,12 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user** | **str**| Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **paginate** | **bool**| When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. | [optional] [default to False] + **sort** | **str**| Sort | [optional] + **direction** | **str**| Sort direction | [optional] + **limit** | **int**| This is the maximum number of objects that may be returned | [optional] [default to 25] + **next** | **str**| An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] + **previous** | **str**| An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] ### Return type diff --git a/docs/UserAzureDetails.md b/docs/reference/UserAzureDetails.md similarity index 89% rename from docs/UserAzureDetails.md rename to docs/reference/UserAzureDetails.md index d3dc906..5ddd467 100644 --- a/docs/UserAzureDetails.md +++ b/docs/reference/UserAzureDetails.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of UserAzureDetails from a JSON string user_azure_details_instance = UserAzureDetails.from_json(json) # print the JSON string representation of the object -print UserAzureDetails.to_json() +print(UserAzureDetails.to_json()) # convert the object into a dict user_azure_details_dict = user_azure_details_instance.to_dict() # create an instance of UserAzureDetails from a dict -user_azure_details_form_dict = user_azure_details.from_dict(user_azure_details_dict) +user_azure_details_from_dict = UserAzureDetails.from_dict(user_azure_details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/reference/UserBasics.md b/docs/reference/UserBasics.md new file mode 100644 index 0000000..5cbbf03 --- /dev/null +++ b/docs/reference/UserBasics.md @@ -0,0 +1,38 @@ +# UserBasics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The user unique identifier | +**type** | **str** | The type of user account | +**product** | [**TutteoProduct**](TutteoProduct.md) | | [default to TutteoProduct.FLAT] +**username** | **str** | The user name (unique for the organization) | +**printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] +**firstname** | **str** | Firstname of the user (for education users) | [optional] +**lastname** | **str** | Lastname of the user (for education users) | [optional] +**name** | **str** | A displayable name for the user (for consumer users) | [optional] +**picture** | **str** | The URL of the picture to display | +**badges** | **List[str]** | List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` | [optional] + +## Example + +```python +from flat_api.models.user_basics import UserBasics + +# TODO update the JSON string below +json = "{}" +# create an instance of UserBasics from a JSON string +user_basics_instance = UserBasics.from_json(json) +# print the JSON string representation of the object +print(UserBasics.to_json()) + +# convert the object into a dict +user_basics_dict = user_basics_instance.to_dict() +# create an instance of UserBasics from a dict +user_basics_from_dict = UserBasics.from_dict(user_basics_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserCommunityProfileLinks.md b/docs/reference/UserCommunityProfileLinks.md similarity index 89% rename from docs/UserCommunityProfileLinks.md rename to docs/reference/UserCommunityProfileLinks.md index 52f79a8..c176122 100644 --- a/docs/UserCommunityProfileLinks.md +++ b/docs/reference/UserCommunityProfileLinks.md @@ -23,12 +23,12 @@ json = "{}" # create an instance of UserCommunityProfileLinks from a JSON string user_community_profile_links_instance = UserCommunityProfileLinks.from_json(json) # print the JSON string representation of the object -print UserCommunityProfileLinks.to_json() +print(UserCommunityProfileLinks.to_json()) # convert the object into a dict user_community_profile_links_dict = user_community_profile_links_instance.to_dict() # create an instance of UserCommunityProfileLinks from a dict -user_community_profile_links_form_dict = user_community_profile_links.from_dict(user_community_profile_links_dict) +user_community_profile_links_from_dict = UserCommunityProfileLinks.from_dict(user_community_profile_links_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCreation.md b/docs/reference/UserCreation.md similarity index 82% rename from docs/UserCreation.md rename to docs/reference/UserCreation.md index 62a38b8..1e60190 100644 --- a/docs/UserCreation.md +++ b/docs/reference/UserCreation.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **lastname** | **str** | Last name of the user | [optional] **email** | **str** | Email of the new account | [optional] **password** | **str** | Password of the new account | -**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**locale** | **str** | User language. Input values will be automatically normalized to a supported locale code. | [optional] [default to 'en'] **role** | **str** | Role of the new account | [optional] [default to 'user'] ## Example @@ -24,12 +24,12 @@ json = "{}" # create an instance of UserCreation from a JSON string user_creation_instance = UserCreation.from_json(json) # print the JSON string representation of the object -print UserCreation.to_json() +print(UserCreation.to_json()) # convert the object into a dict user_creation_dict = user_creation_instance.to_dict() # create an instance of UserCreation from a dict -user_creation_form_dict = user_creation.from_dict(user_creation_dict) +user_creation_from_dict = UserCreation.from_dict(user_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetails.md b/docs/reference/UserDetails.md similarity index 70% rename from docs/UserDetails.md rename to docs/reference/UserDetails.md index 393c52e..61a18cd 100644 --- a/docs/UserDetails.md +++ b/docs/reference/UserDetails.md @@ -1,5 +1,6 @@ # UserDetails +User details ## Properties @@ -7,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The user unique identifier | **type** | **str** | The type of user account | -**product** | [**TutteoProduct**](TutteoProduct.md) | | +**product** | [**TutteoProduct**](TutteoProduct.md) | | [default to TutteoProduct.FLAT] **username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] @@ -25,13 +26,16 @@ Name | Type | Description | Notes **followers_count** | **int** | Number of followers the user have | [optional] **following_count** | **int** | Number of people the user follow | [optional] **owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**all_public_scores_count** | **int** | Total number of public scores the user participates in (owned + joined) | [optional] +**likes_count** | **int** | Number of likes on the user published scores | [optional] +**plays_count** | **int** | Number of plays on the user published scores | [optional] **cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] -**instruments** | **List[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] +**is_email_verified** | **bool** | Whether the user's email address has been verified | [optional] **azure_details** | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] **private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] -**locale** | [**FlatLocales**](FlatLocales.md) | | [optional] +**locale** | **str** | The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` | [optional] [default to 'en'] **groups** | **List[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] **picture_file** | **str** | The ID of the user profile picture | [optional] **cover_picture_file** | **str** | The ID of the user profile cover picture | [optional] @@ -46,12 +50,12 @@ json = "{}" # create an instance of UserDetails from a JSON string user_details_instance = UserDetails.from_json(json) # print the JSON string representation of the object -print UserDetails.to_json() +print(UserDetails.to_json()) # convert the object into a dict user_details_dict = user_details_instance.to_dict() # create an instance of UserDetails from a dict -user_details_form_dict = user_details.from_dict(user_details_dict) +user_details_from_dict = UserDetails.from_dict(user_details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdmin.md b/docs/reference/UserDetailsAdmin.md similarity index 76% rename from docs/UserDetailsAdmin.md rename to docs/reference/UserDetailsAdmin.md index 7939a9d..4d0a98f 100644 --- a/docs/UserDetailsAdmin.md +++ b/docs/reference/UserDetailsAdmin.md @@ -1,5 +1,6 @@ # UserDetailsAdmin +User details (view for organization teacher / admin) ## Properties @@ -7,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The user unique identifier | **type** | **str** | The type of user account | -**product** | [**TutteoProduct**](TutteoProduct.md) | | +**product** | [**TutteoProduct**](TutteoProduct.md) | | [default to TutteoProduct.FLAT] **username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] @@ -21,8 +22,9 @@ Name | Type | Description | Notes **html_url** | **str** | Link to user profile (for Indiv. users only) | [optional] **email** | **str** | Email of the user | [optional] **last_activity_date** | **datetime** | Date of the last user activity | [optional] -**license** | [**UserDetailsAdminLicense**](UserDetailsAdminLicense.md) | | [optional] +**license** | [**UserDetailsAdminAllOfLicense**](UserDetailsAdminAllOfLicense.md) | | [optional] **groups** | **List[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] +**is_edu_testing_student** | **bool** | Indicates if the user account is marked as a testing student account. Testing students are typically excluded from certain educational integrations and workflows. This field helps API clients distinguish between regular students and testing accounts. | [optional] ## Example @@ -34,12 +36,12 @@ json = "{}" # create an instance of UserDetailsAdmin from a JSON string user_details_admin_instance = UserDetailsAdmin.from_json(json) # print the JSON string representation of the object -print UserDetailsAdmin.to_json() +print(UserDetailsAdmin.to_json()) # convert the object into a dict user_details_admin_dict = user_details_admin_instance.to_dict() # create an instance of UserDetailsAdmin from a dict -user_details_admin_form_dict = user_details_admin.from_dict(user_details_admin_dict) +user_details_admin_from_dict = UserDetailsAdmin.from_dict(user_details_admin_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserDetailsAdminLicense.md b/docs/reference/UserDetailsAdminAllOfLicense.md similarity index 55% rename from docs/UserDetailsAdminLicense.md rename to docs/reference/UserDetailsAdminAllOfLicense.md index 7c08b34..9f172e0 100644 --- a/docs/UserDetailsAdminLicense.md +++ b/docs/reference/UserDetailsAdminAllOfLicense.md @@ -1,4 +1,4 @@ -# UserDetailsAdminLicense +# UserDetailsAdminAllOfLicense Current active license of the user @@ -8,26 +8,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | ID of the current license | [optional] **expiration_date** | **datetime** | Date when the license expires | [optional] -**source** | [**LicenseSources**](LicenseSources.md) | | [optional] +**source** | [**LicenseSources**](LicenseSources.md) | | [optional] [default to LicenseSources.ORDER] **mode** | [**LicenseMode**](LicenseMode.md) | | [optional] **active** | **bool** | ID of the current license | [optional] ## Example ```python -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from flat_api.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense # TODO update the JSON string below json = "{}" -# create an instance of UserDetailsAdminLicense from a JSON string -user_details_admin_license_instance = UserDetailsAdminLicense.from_json(json) +# create an instance of UserDetailsAdminAllOfLicense from a JSON string +user_details_admin_all_of_license_instance = UserDetailsAdminAllOfLicense.from_json(json) # print the JSON string representation of the object -print UserDetailsAdminLicense.to_json() +print(UserDetailsAdminAllOfLicense.to_json()) # convert the object into a dict -user_details_admin_license_dict = user_details_admin_license_instance.to_dict() -# create an instance of UserDetailsAdminLicense from a dict -user_details_admin_license_form_dict = user_details_admin_license.from_dict(user_details_admin_license_dict) +user_details_admin_all_of_license_dict = user_details_admin_all_of_license_instance.to_dict() +# create an instance of UserDetailsAdminAllOfLicense from a dict +user_details_admin_all_of_license_from_dict = UserDetailsAdminAllOfLicense.from_dict(user_details_admin_all_of_license_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserPublic.md b/docs/reference/UserPublic.md similarity index 83% rename from docs/UserPublic.md rename to docs/reference/UserPublic.md index 8a068e3..9d95c47 100644 --- a/docs/UserPublic.md +++ b/docs/reference/UserPublic.md @@ -1,5 +1,6 @@ # UserPublic +Public User details ## Properties @@ -7,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The user unique identifier | **type** | **str** | The type of user account | -**product** | [**TutteoProduct**](TutteoProduct.md) | | +**product** | [**TutteoProduct**](TutteoProduct.md) | | [default to TutteoProduct.FLAT] **username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] @@ -25,9 +26,11 @@ Name | Type | Description | Notes **followers_count** | **int** | Number of followers the user have | [optional] **following_count** | **int** | Number of people the user follow | [optional] **owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**all_public_scores_count** | **int** | Total number of public scores the user participates in (owned + joined) | [optional] +**likes_count** | **int** | Number of likes on the user published scores | [optional] +**plays_count** | **int** | Number of plays on the user published scores | [optional] **cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] -**instruments** | **List[str]** | An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] ## Example @@ -40,12 +43,12 @@ json = "{}" # create an instance of UserPublic from a JSON string user_public_instance = UserPublic.from_json(json) # print the JSON string representation of the object -print UserPublic.to_json() +print(UserPublic.to_json()) # convert the object into a dict user_public_dict = user_public_instance.to_dict() # create an instance of UserPublic from a dict -user_public_form_dict = user_public.from_dict(user_public_dict) +user_public_from_dict = UserPublic.from_dict(user_public_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserPublicSummary.md b/docs/reference/UserPublicSummary.md similarity index 88% rename from docs/UserPublicSummary.md rename to docs/reference/UserPublicSummary.md index 1e35c1b..720e7c8 100644 --- a/docs/UserPublicSummary.md +++ b/docs/reference/UserPublicSummary.md @@ -1,5 +1,6 @@ # UserPublicSummary +Public User details summary ## Properties @@ -7,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The user unique identifier | **type** | **str** | The type of user account | -**product** | [**TutteoProduct**](TutteoProduct.md) | | +**product** | [**TutteoProduct**](TutteoProduct.md) | | [default to TutteoProduct.FLAT] **username** | **str** | The user name (unique for the organization) | **printable_name** | **str** | The name that can be directly printed (name, firstname & lastname, or username) | [optional] **firstname** | **str** | Firstname of the user (for education users) | [optional] @@ -30,12 +31,12 @@ json = "{}" # create an instance of UserPublicSummary from a JSON string user_public_summary_instance = UserPublicSummary.from_json(json) # print the JSON string representation of the object -print UserPublicSummary.to_json() +print(UserPublicSummary.to_json()) # convert the object into a dict user_public_summary_dict = user_public_summary_instance.to_dict() # create an instance of UserPublicSummary from a dict -user_public_summary_form_dict = user_public_summary.from_dict(user_public_summary_dict) +user_public_summary_from_dict = UserPublicSummary.from_dict(user_public_summary_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSigninLink.md b/docs/reference/UserSigninLink.md similarity index 80% rename from docs/UserSigninLink.md rename to docs/reference/UserSigninLink.md index 0c10014..f888803 100644 --- a/docs/UserSigninLink.md +++ b/docs/reference/UserSigninLink.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | URL to use to sign in to this account | [optional] +**token** | **str** | Raw sign-in token, can be used to build custom URLs (e.g. deep links) | [optional] **expiration_date** | **datetime** | Date when the link expires | [optional] ## Example @@ -18,12 +19,12 @@ json = "{}" # create an instance of UserSigninLink from a JSON string user_signin_link_instance = UserSigninLink.from_json(json) # print the JSON string representation of the object -print UserSigninLink.to_json() +print(UserSigninLink.to_json()) # convert the object into a dict user_signin_link_dict = user_signin_link_instance.to_dict() # create an instance of UserSigninLink from a dict -user_signin_link_form_dict = user_signin_link.from_dict(user_signin_link_dict) +user_signin_link_from_dict = UserSigninLink.from_dict(user_signin_link_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSigninLinkCreation.md b/docs/reference/UserSigninLinkCreation.md similarity index 86% rename from docs/UserSigninLinkCreation.md rename to docs/reference/UserSigninLinkCreation.md index ca0ec5a..0a15746 100644 --- a/docs/UserSigninLinkCreation.md +++ b/docs/reference/UserSigninLinkCreation.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of UserSigninLinkCreation from a JSON string user_signin_link_creation_instance = UserSigninLinkCreation.from_json(json) # print the JSON string representation of the object -print UserSigninLinkCreation.to_json() +print(UserSigninLinkCreation.to_json()) # convert the object into a dict user_signin_link_creation_dict = user_signin_link_creation_instance.to_dict() # create an instance of UserSigninLinkCreation from a dict -user_signin_link_creation_form_dict = user_signin_link_creation.from_dict(user_signin_link_creation_dict) +user_signin_link_creation_from_dict = UserSigninLinkCreation.from_dict(user_signin_link_creation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 86aa239..f842e5a 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -1,3 +1,50 @@ +"""Flat API client. + + from flat_api import FlatClient + client = FlatClient(access_token="...") + +Async: + + from flat_api import AsyncFlatClient + client = AsyncFlatClient(access_token="...") +""" + +# --- flat_api ergonomic surface (tools/patches/90_exports.py) --- +__version__ = "2.0.0" + +from flat_api.client import AsyncFlatClient, FlatClient +from flat_api.errors import ( + FlatAuthenticationError, + FlatAuthorizationError, + FlatError, + FlatNotFoundError, + FlatQuotaError, + FlatRateLimitError, + FlatServerError, + FlatValidationError, +) +from flat_api.oauth import OAuth2Helper, Tokens +from flat_api.pagination import paginate +from flat_api._retry import RetryPolicy + +__all__ = [ + "AsyncFlatClient", + "FlatClient", + "FlatAuthenticationError", + "FlatAuthorizationError", + "FlatError", + "FlatNotFoundError", + "FlatQuotaError", + "FlatRateLimitError", + "FlatServerError", + "FlatValidationError", + "OAuth2Helper", + "RetryPolicy", + "Tokens", + "paginate", + "__version__", +] +# --- end --- # coding: utf-8 # flake8: noqa @@ -5,9 +52,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,160 +62,447 @@ """ # noqa: E501 -__version__ = "1.1.3" +__version__ = "2.0.0" + +# Define package exports +__all__ = [ + "AccountApi", + "ClassApi", + "CollectionApi", + "EduResourcesApi", + "GroupApi", + "OMRApi", + "OrganizationApi", + "ScoreApi", + "TaskApi", + "UserApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AddGroupUser200Response", + "AddGroupUserRequest", + "ApiAccessToken", + "AppScopes", + "Assignment", + "AssignmentCapabilities", + "AssignmentCapabilitiesCanPublishInClassError", + "AssignmentCopy", + "AssignmentCopyResponse", + "AssignmentCopyToClass", + "AssignmentCopyToResourceLibrary", + "AssignmentGroup", + "AssignmentSubmission", + "AssignmentSubmissionComment", + "AssignmentSubmissionCommentCreation", + "AssignmentSubmissionComments", + "AssignmentSubmissionHistory", + "AssignmentSubmissionHistoryAttachment", + "AssignmentSubmissionHistoryState", + "AssignmentSubmissionLti", + "AssignmentSubmissionPlayback", + "AssignmentSubmissionState", + "AssignmentSubmissionStudentsMode", + "AssignmentSubmissionUpdate", + "AssignmentType", + "AssignmentUpdate", + "ClassAssignment", + "ClassAssignmentAllOfCanvas", + "ClassAssignmentAllOfLti", + "ClassAssignmentAllOfMfc", + "ClassAssignmentUpdate", + "ClassAssignmentUpdateAllOfGoogleClassroom", + "ClassAssignmentUpdateAllOfMicrosoftGraph", + "ClassAttachmentCreation", + "ClassCreation", + "ClassDetails", + "ClassDetailsCanvas", + "ClassDetailsClever", + "ClassDetailsGoogleClassroom", + "ClassDetailsGoogleDrive", + "ClassDetailsIssues", + "ClassDetailsIssuesSyncInner", + "ClassDetailsLti", + "ClassDetailsMfc", + "ClassDetailsMicrosoftGraph", + "ClassGradeLevel", + "ClassRoles", + "ClassState", + "ClassUpdate", + "Collection", + "CollectionApp", + "CollectionCapabilities", + "CollectionContents", + "CollectionCreation", + "CollectionModification", + "CollectionPrivacy", + "CollectionType", + "CreateLtiConfiguration200Response", + "CreditTransaction", + "EduLibrary", + "EduResource", + "EduResourceAssignmentCreation", + "EduResourceCapabilities", + "EduResourceCopy", + "EduResourceCreation", + "EduResourceFolder", + "EduResourceLtiLink", + "EduResourceMove", + "EduResourcePrivacy", + "EduResourceResource", + "EduResourceType", + "EduResourceUpdate", + "EduResourceUseInClass", + "FlatErrorResponse", + "GoogleClassroomCoursework", + "GoogleClassroomSubmission", + "Grade", + "Group", + "GroupCreation", + "GroupDetails", + "GroupType", + "LicenseMode", + "LicenseSources", + "LmsName", + "LtiConfiguration", + "LtiConfiguration1p1", + "LtiConfiguration1p1AllOfTool", + "LtiConfiguration1p3", + "LtiConfiguration1p3Base", + "LtiConfiguration1p3BaseSupportedServices", + "LtiConfiguration1p3BaseSupportedServicesAgs", + "LtiConfiguration1p3BaseSupportedServicesDeepLinking", + "LtiConfiguration1p3BaseSupportedServicesNrps", + "LtiConfiguration1p3BaseTool", + "LtiConfiguration1p3Deployment", + "LtiConfiguration1p3Dynamic", + "LtiConfiguration1p3Manual", + "LtiConfigurationBase", + "LtiConfigurationCreate", + "LtiConfigurationCreate1p1", + "LtiConfigurationCreate1p3Deployment", + "LtiConfigurationCreate1p3Dynamic", + "LtiConfigurationCreate1p3DynamicPlatformInfo", + "LtiConfigurationCreate1p3Manual", + "LtiConfigurationUpdate", + "LtiConfigurationUpdateDeployment", + "LtiConfigurationUpdateStandalone", + "LtiCredentials", + "LtiCredentialsCreation", + "MediaAttachment", + "MediaScoreSharingMode", + "MicrosoftGraphAssignment", + "MicrosoftGraphSubmission", + "OmrCapabilities", + "OmrDetailsStepData", + "OmrDetailsSubmission", + "OmrDetectedInstrument", + "OmrImportedMetadata", + "OmrInstrumentOverride", + "OmrJob", + "OmrJobCreation", + "OmrJobFileMetadata", + "OmrJobFileUpload", + "OmrJobFileUploadResult", + "OmrJobInputFile", + "OmrJobOutput", + "OmrJobProgress", + "OmrJobResult", + "OmrJobRetention", + "OmrJobStatus", + "OmrLocaleDetails", + "OmrPendingStep", + "OmrStepName", + "OrganizationInvitation", + "OrganizationInvitationCreation", + "OrganizationRoles", + "OrganizationUserAccessTokenCreation", + "RenameGroupRequest", + "ResourceCollaborator", + "ResourceCollaboratorCreation", + "ResourceRights", + "ScoreComment", + "ScoreCommentContext", + "ScoreCommentCreation", + "ScoreCommentModeration", + "ScoreCommentUpdate", + "ScoreCommentsCounts", + "ScoreCreation", + "ScoreCreationBuilderData", + "ScoreCreationBuilderDataAllOfBuilderData", + "ScoreCreationBuilderDataAllOfBuilderDataLayoutData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments", + "ScoreCreationCommon", + "ScoreCreationFileImport", + "ScoreCreationGoogleDriveImport", + "ScoreCreationType", + "ScoreDetails", + "ScoreDetailsAllOfMe", + "ScoreFork", + "ScoreLicense", + "ScoreLikesCounts", + "ScoreModification", + "ScorePlaysCounts", + "ScorePrivacy", + "ScoreRevision", + "ScoreRevisionCreation", + "ScoreRevisionStatistics", + "ScoreSource", + "ScoreSummary", + "ScoreTrack", + "ScoreTrackCreation", + "ScoreTrackCreationResponse", + "ScoreTrackPoint", + "ScoreTrackPurpose", + "ScoreTrackState", + "ScoreTrackType", + "ScoreTrackUpdate", + "ScoreViewsCounts", + "Task", + "TaskExportOptions", + "TaskProgress", + "TaskResult", + "TeachingTheme", + "TutteoProduct", + "UserAdminUpdate", + "UserAzureDetails", + "UserBasics", + "UserCommunityProfileLinks", + "UserCreation", + "UserDetails", + "UserDetailsAdmin", + "UserDetailsAdminAllOfLicense", + "UserPublic", + "UserPublicSummary", + "UserSigninLink", + "UserSigninLinkCreation", +] # import apis into sdk package -from flat_api.api.account_api import AccountApi -from flat_api.api.class_api import ClassApi -from flat_api.api.collection_api import CollectionApi -from flat_api.api.edu_resources_api import EduResourcesApi -from flat_api.api.group_api import GroupApi -from flat_api.api.organization_api import OrganizationApi -from flat_api.api.score_api import ScoreApi -from flat_api.api.task_api import TaskApi -from flat_api.api.user_api import UserApi +from flat_api.api.account_api import AccountApi as AccountApi +from flat_api.api.class_api import ClassApi as ClassApi +from flat_api.api.collection_api import CollectionApi as CollectionApi +from flat_api.api.edu_resources_api import EduResourcesApi as EduResourcesApi +from flat_api.api.group_api import GroupApi as GroupApi +from flat_api.api.omr_api import OMRApi as OMRApi +from flat_api.api.organization_api import OrganizationApi as OrganizationApi +from flat_api.api.score_api import ScoreApi as ScoreApi +from flat_api.api.task_api import TaskApi as TaskApi +from flat_api.api.user_api import UserApi as UserApi # import ApiClient -from flat_api.api_response import ApiResponse -from flat_api.api_client import ApiClient -from flat_api.configuration import Configuration -from flat_api.exceptions import OpenApiException -from flat_api.exceptions import ApiTypeError -from flat_api.exceptions import ApiValueError -from flat_api.exceptions import ApiKeyError -from flat_api.exceptions import ApiAttributeError -from flat_api.exceptions import ApiException +from flat_api.api_response import ApiResponse as ApiResponse +from flat_api.api_client import ApiClient as ApiClient +from flat_api.configuration import Configuration as Configuration +from flat_api.exceptions import OpenApiException as OpenApiException +from flat_api.exceptions import ApiTypeError as ApiTypeError +from flat_api.exceptions import ApiValueError as ApiValueError +from flat_api.exceptions import ApiKeyError as ApiKeyError +from flat_api.exceptions import ApiAttributeError as ApiAttributeError +from flat_api.exceptions import ApiException as ApiException # import models into sdk package -from flat_api.models.api_access_token import ApiAccessToken -from flat_api.models.app_scopes import AppScopes -from flat_api.models.assignment import Assignment -from flat_api.models.assignment_copy import AssignmentCopy -from flat_api.models.assignment_copy_response import AssignmentCopyResponse -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError -from flat_api.models.assignment_submission import AssignmentSubmission -from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment -from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation -from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments -from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory -from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment -from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState -from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti -from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner -from flat_api.models.assignment_submission_state import AssignmentSubmissionState -from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate -from flat_api.models.assignment_type import AssignmentType -from flat_api.models.assignment_update import AssignmentUpdate -from flat_api.models.class_assignment import ClassAssignment -from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas -from flat_api.models.class_assignment_lti import ClassAssignmentLti -from flat_api.models.class_assignment_mfc import ClassAssignmentMfc -from flat_api.models.class_assignment_update import ClassAssignmentUpdate -from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom -from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph -from flat_api.models.class_attachment_creation import ClassAttachmentCreation -from flat_api.models.class_creation import ClassCreation -from flat_api.models.class_details import ClassDetails -from flat_api.models.class_details_canvas import ClassDetailsCanvas -from flat_api.models.class_details_clever import ClassDetailsClever -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive -from flat_api.models.class_details_issues import ClassDetailsIssues -from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner -from flat_api.models.class_details_lti import ClassDetailsLti -from flat_api.models.class_details_mfc import ClassDetailsMfc -from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph -from flat_api.models.class_grade_level import ClassGradeLevel -from flat_api.models.class_roles import ClassRoles -from flat_api.models.class_state import ClassState -from flat_api.models.class_update import ClassUpdate -from flat_api.models.collection import Collection -from flat_api.models.collection_app import CollectionApp -from flat_api.models.collection_capabilities import CollectionCapabilities -from flat_api.models.collection_creation import CollectionCreation -from flat_api.models.collection_modification import CollectionModification -from flat_api.models.collection_privacy import CollectionPrivacy -from flat_api.models.collection_type import CollectionType -from flat_api.models.edu_library import EduLibrary -from flat_api.models.edu_resource import EduResource -from flat_api.models.edu_resource_capabilities import EduResourceCapabilities -from flat_api.models.edu_resource_copy import EduResourceCopy -from flat_api.models.edu_resource_creation import EduResourceCreation -from flat_api.models.edu_resource_lti_link import EduResourceLtiLink -from flat_api.models.edu_resource_move import EduResourceMove -from flat_api.models.edu_resource_privacy import EduResourcePrivacy -from flat_api.models.edu_resource_resource import EduResourceResource -from flat_api.models.edu_resource_type import EduResourceType -from flat_api.models.edu_resource_update import EduResourceUpdate -from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass -from flat_api.models.flat_error_response import FlatErrorResponse -from flat_api.models.flat_locales import FlatLocales -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission -from flat_api.models.group import Group -from flat_api.models.group_details import GroupDetails -from flat_api.models.group_type import GroupType -from flat_api.models.license_mode import LicenseMode -from flat_api.models.license_sources import LicenseSources -from flat_api.models.lms_name import LmsName -from flat_api.models.lti_credentials import LtiCredentials -from flat_api.models.lti_credentials_creation import LtiCredentialsCreation -from flat_api.models.media_attachment import MediaAttachment -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment -from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission -from flat_api.models.organization_invitation import OrganizationInvitation -from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation -from flat_api.models.organization_roles import OrganizationRoles -from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation -from flat_api.models.resource_collaborator import ResourceCollaborator -from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation -from flat_api.models.resource_rights import ResourceRights -from flat_api.models.score_comment import ScoreComment -from flat_api.models.score_comment_context import ScoreCommentContext -from flat_api.models.score_comment_creation import ScoreCommentCreation -from flat_api.models.score_comment_moderation import ScoreCommentModeration -from flat_api.models.score_comment_update import ScoreCommentUpdate -from flat_api.models.score_comments_counts import ScoreCommentsCounts -from flat_api.models.score_creation import ScoreCreation -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner -from flat_api.models.score_creation_type import ScoreCreationType -from flat_api.models.score_details import ScoreDetails -from flat_api.models.score_fork import ScoreFork -from flat_api.models.score_license import ScoreLicense -from flat_api.models.score_likes_counts import ScoreLikesCounts -from flat_api.models.score_modification import ScoreModification -from flat_api.models.score_plays_counts import ScorePlaysCounts -from flat_api.models.score_privacy import ScorePrivacy -from flat_api.models.score_revision import ScoreRevision -from flat_api.models.score_revision_creation import ScoreRevisionCreation -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics -from flat_api.models.score_source import ScoreSource -from flat_api.models.score_track import ScoreTrack -from flat_api.models.score_track_creation import ScoreTrackCreation -from flat_api.models.score_track_point import ScoreTrackPoint -from flat_api.models.score_track_purpose import ScoreTrackPurpose -from flat_api.models.score_track_state import ScoreTrackState -from flat_api.models.score_track_type import ScoreTrackType -from flat_api.models.score_track_update import ScoreTrackUpdate -from flat_api.models.score_views_counts import ScoreViewsCounts -from flat_api.models.task import Task -from flat_api.models.task_export_options import TaskExportOptions -from flat_api.models.task_progress import TaskProgress -from flat_api.models.task_result import TaskResult -from flat_api.models.tutteo_product import TutteoProduct -from flat_api.models.user_admin_update import UserAdminUpdate -from flat_api.models.user_azure_details import UserAzureDetails -from flat_api.models.user_community_profile_links import UserCommunityProfileLinks -from flat_api.models.user_creation import UserCreation -from flat_api.models.user_details import UserDetails -from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense -from flat_api.models.user_public import UserPublic -from flat_api.models.user_public_summary import UserPublicSummary -from flat_api.models.user_signin_link import UserSigninLink -from flat_api.models.user_signin_link_creation import UserSigninLinkCreation +from flat_api.models.add_group_user200_response import AddGroupUser200Response as AddGroupUser200Response +from flat_api.models.add_group_user_request import AddGroupUserRequest as AddGroupUserRequest +from flat_api.models.api_access_token import ApiAccessToken as ApiAccessToken +from flat_api.models.app_scopes import AppScopes as AppScopes +from flat_api.models.assignment import Assignment as Assignment +from flat_api.models.assignment_capabilities import AssignmentCapabilities as AssignmentCapabilities +from flat_api.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError as AssignmentCapabilitiesCanPublishInClassError +from flat_api.models.assignment_copy import AssignmentCopy as AssignmentCopy +from flat_api.models.assignment_copy_response import AssignmentCopyResponse as AssignmentCopyResponse +from flat_api.models.assignment_copy_to_class import AssignmentCopyToClass as AssignmentCopyToClass +from flat_api.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary as AssignmentCopyToResourceLibrary +from flat_api.models.assignment_group import AssignmentGroup as AssignmentGroup +from flat_api.models.assignment_submission import AssignmentSubmission as AssignmentSubmission +from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment as AssignmentSubmissionComment +from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation as AssignmentSubmissionCommentCreation +from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments as AssignmentSubmissionComments +from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory as AssignmentSubmissionHistory +from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment as AssignmentSubmissionHistoryAttachment +from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState as AssignmentSubmissionHistoryState +from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti as AssignmentSubmissionLti +from flat_api.models.assignment_submission_playback import AssignmentSubmissionPlayback as AssignmentSubmissionPlayback +from flat_api.models.assignment_submission_state import AssignmentSubmissionState as AssignmentSubmissionState +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode as AssignmentSubmissionStudentsMode +from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate as AssignmentSubmissionUpdate +from flat_api.models.assignment_type import AssignmentType as AssignmentType +from flat_api.models.assignment_update import AssignmentUpdate as AssignmentUpdate +from flat_api.models.class_assignment import ClassAssignment as ClassAssignment +from flat_api.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas as ClassAssignmentAllOfCanvas +from flat_api.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti as ClassAssignmentAllOfLti +from flat_api.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc as ClassAssignmentAllOfMfc +from flat_api.models.class_assignment_update import ClassAssignmentUpdate as ClassAssignmentUpdate +from flat_api.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom as ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph as ClassAssignmentUpdateAllOfMicrosoftGraph +from flat_api.models.class_attachment_creation import ClassAttachmentCreation as ClassAttachmentCreation +from flat_api.models.class_creation import ClassCreation as ClassCreation +from flat_api.models.class_details import ClassDetails as ClassDetails +from flat_api.models.class_details_canvas import ClassDetailsCanvas as ClassDetailsCanvas +from flat_api.models.class_details_clever import ClassDetailsClever as ClassDetailsClever +from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom as ClassDetailsGoogleClassroom +from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive as ClassDetailsGoogleDrive +from flat_api.models.class_details_issues import ClassDetailsIssues as ClassDetailsIssues +from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner as ClassDetailsIssuesSyncInner +from flat_api.models.class_details_lti import ClassDetailsLti as ClassDetailsLti +from flat_api.models.class_details_mfc import ClassDetailsMfc as ClassDetailsMfc +from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph as ClassDetailsMicrosoftGraph +from flat_api.models.class_grade_level import ClassGradeLevel as ClassGradeLevel +from flat_api.models.class_roles import ClassRoles as ClassRoles +from flat_api.models.class_state import ClassState as ClassState +from flat_api.models.class_update import ClassUpdate as ClassUpdate +from flat_api.models.collection import Collection as Collection +from flat_api.models.collection_app import CollectionApp as CollectionApp +from flat_api.models.collection_capabilities import CollectionCapabilities as CollectionCapabilities +from flat_api.models.collection_contents import CollectionContents as CollectionContents +from flat_api.models.collection_creation import CollectionCreation as CollectionCreation +from flat_api.models.collection_modification import CollectionModification as CollectionModification +from flat_api.models.collection_privacy import CollectionPrivacy as CollectionPrivacy +from flat_api.models.collection_type import CollectionType as CollectionType +from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response as CreateLtiConfiguration200Response +from flat_api.models.credit_transaction import CreditTransaction as CreditTransaction +from flat_api.models.edu_library import EduLibrary as EduLibrary +from flat_api.models.edu_resource import EduResource as EduResource +from flat_api.models.edu_resource_assignment_creation import EduResourceAssignmentCreation as EduResourceAssignmentCreation +from flat_api.models.edu_resource_capabilities import EduResourceCapabilities as EduResourceCapabilities +from flat_api.models.edu_resource_copy import EduResourceCopy as EduResourceCopy +from flat_api.models.edu_resource_creation import EduResourceCreation as EduResourceCreation +from flat_api.models.edu_resource_folder import EduResourceFolder as EduResourceFolder +from flat_api.models.edu_resource_lti_link import EduResourceLtiLink as EduResourceLtiLink +from flat_api.models.edu_resource_move import EduResourceMove as EduResourceMove +from flat_api.models.edu_resource_privacy import EduResourcePrivacy as EduResourcePrivacy +from flat_api.models.edu_resource_resource import EduResourceResource as EduResourceResource +from flat_api.models.edu_resource_type import EduResourceType as EduResourceType +from flat_api.models.edu_resource_update import EduResourceUpdate as EduResourceUpdate +from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass as EduResourceUseInClass +from flat_api.models.flat_error_response import FlatErrorResponse as FlatErrorResponse +from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework as GoogleClassroomCoursework +from flat_api.models.google_classroom_submission import GoogleClassroomSubmission as GoogleClassroomSubmission +from flat_api.models.grade import Grade as Grade +from flat_api.models.group import Group as Group +from flat_api.models.group_creation import GroupCreation as GroupCreation +from flat_api.models.group_details import GroupDetails as GroupDetails +from flat_api.models.group_type import GroupType as GroupType +from flat_api.models.license_mode import LicenseMode as LicenseMode +from flat_api.models.license_sources import LicenseSources as LicenseSources +from flat_api.models.lms_name import LmsName as LmsName +from flat_api.models.lti_configuration import LtiConfiguration as LtiConfiguration +from flat_api.models.lti_configuration1p1 import LtiConfiguration1p1 as LtiConfiguration1p1 +from flat_api.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool as LtiConfiguration1p1AllOfTool +from flat_api.models.lti_configuration1p3 import LtiConfiguration1p3 as LtiConfiguration1p3 +from flat_api.models.lti_configuration1p3_base import LtiConfiguration1p3Base as LtiConfiguration1p3Base +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices as LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs as LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking as LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps as LtiConfiguration1p3BaseSupportedServicesNrps +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool as LtiConfiguration1p3BaseTool +from flat_api.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment as LtiConfiguration1p3Deployment +from flat_api.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic as LtiConfiguration1p3Dynamic +from flat_api.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual as LtiConfiguration1p3Manual +from flat_api.models.lti_configuration_base import LtiConfigurationBase as LtiConfigurationBase +from flat_api.models.lti_configuration_create import LtiConfigurationCreate as LtiConfigurationCreate +from flat_api.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 as LtiConfigurationCreate1p1 +from flat_api.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment as LtiConfigurationCreate1p3Deployment +from flat_api.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic as LtiConfigurationCreate1p3Dynamic +from flat_api.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo as LtiConfigurationCreate1p3DynamicPlatformInfo +from flat_api.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual as LtiConfigurationCreate1p3Manual +from flat_api.models.lti_configuration_update import LtiConfigurationUpdate as LtiConfigurationUpdate +from flat_api.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment as LtiConfigurationUpdateDeployment +from flat_api.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone as LtiConfigurationUpdateStandalone +from flat_api.models.lti_credentials import LtiCredentials as LtiCredentials +from flat_api.models.lti_credentials_creation import LtiCredentialsCreation as LtiCredentialsCreation +from flat_api.models.media_attachment import MediaAttachment as MediaAttachment +from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode as MediaScoreSharingMode +from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment as MicrosoftGraphAssignment +from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission as MicrosoftGraphSubmission +from flat_api.models.omr_capabilities import OmrCapabilities as OmrCapabilities +from flat_api.models.omr_details_step_data import OmrDetailsStepData as OmrDetailsStepData +from flat_api.models.omr_details_submission import OmrDetailsSubmission as OmrDetailsSubmission +from flat_api.models.omr_detected_instrument import OmrDetectedInstrument as OmrDetectedInstrument +from flat_api.models.omr_imported_metadata import OmrImportedMetadata as OmrImportedMetadata +from flat_api.models.omr_instrument_override import OmrInstrumentOverride as OmrInstrumentOverride +from flat_api.models.omr_job import OmrJob as OmrJob +from flat_api.models.omr_job_creation import OmrJobCreation as OmrJobCreation +from flat_api.models.omr_job_file_metadata import OmrJobFileMetadata as OmrJobFileMetadata +from flat_api.models.omr_job_file_upload import OmrJobFileUpload as OmrJobFileUpload +from flat_api.models.omr_job_file_upload_result import OmrJobFileUploadResult as OmrJobFileUploadResult +from flat_api.models.omr_job_input_file import OmrJobInputFile as OmrJobInputFile +from flat_api.models.omr_job_output import OmrJobOutput as OmrJobOutput +from flat_api.models.omr_job_progress import OmrJobProgress as OmrJobProgress +from flat_api.models.omr_job_result import OmrJobResult as OmrJobResult +from flat_api.models.omr_job_retention import OmrJobRetention as OmrJobRetention +from flat_api.models.omr_job_status import OmrJobStatus as OmrJobStatus +from flat_api.models.omr_locale_details import OmrLocaleDetails as OmrLocaleDetails +from flat_api.models.omr_pending_step import OmrPendingStep as OmrPendingStep +from flat_api.models.omr_step_name import OmrStepName as OmrStepName +from flat_api.models.organization_invitation import OrganizationInvitation as OrganizationInvitation +from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation as OrganizationInvitationCreation +from flat_api.models.organization_roles import OrganizationRoles as OrganizationRoles +from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation as OrganizationUserAccessTokenCreation +from flat_api.models.rename_group_request import RenameGroupRequest as RenameGroupRequest +from flat_api.models.resource_collaborator import ResourceCollaborator as ResourceCollaborator +from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation as ResourceCollaboratorCreation +from flat_api.models.resource_rights import ResourceRights as ResourceRights +from flat_api.models.score_comment import ScoreComment as ScoreComment +from flat_api.models.score_comment_context import ScoreCommentContext as ScoreCommentContext +from flat_api.models.score_comment_creation import ScoreCommentCreation as ScoreCommentCreation +from flat_api.models.score_comment_moderation import ScoreCommentModeration as ScoreCommentModeration +from flat_api.models.score_comment_update import ScoreCommentUpdate as ScoreCommentUpdate +from flat_api.models.score_comments_counts import ScoreCommentsCounts as ScoreCommentsCounts +from flat_api.models.score_creation import ScoreCreation as ScoreCreation +from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData as ScoreCreationBuilderData +from flat_api.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData as ScoreCreationBuilderDataAllOfBuilderData +from flat_api.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData as ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData as ScoreCreationBuilderDataAllOfBuilderDataScoreData +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments as ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from flat_api.models.score_creation_common import ScoreCreationCommon as ScoreCreationCommon +from flat_api.models.score_creation_file_import import ScoreCreationFileImport as ScoreCreationFileImport +from flat_api.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport as ScoreCreationGoogleDriveImport +from flat_api.models.score_creation_type import ScoreCreationType as ScoreCreationType +from flat_api.models.score_details import ScoreDetails as ScoreDetails +from flat_api.models.score_details_all_of_me import ScoreDetailsAllOfMe as ScoreDetailsAllOfMe +from flat_api.models.score_fork import ScoreFork as ScoreFork +from flat_api.models.score_license import ScoreLicense as ScoreLicense +from flat_api.models.score_likes_counts import ScoreLikesCounts as ScoreLikesCounts +from flat_api.models.score_modification import ScoreModification as ScoreModification +from flat_api.models.score_plays_counts import ScorePlaysCounts as ScorePlaysCounts +from flat_api.models.score_privacy import ScorePrivacy as ScorePrivacy +from flat_api.models.score_revision import ScoreRevision as ScoreRevision +from flat_api.models.score_revision_creation import ScoreRevisionCreation as ScoreRevisionCreation +from flat_api.models.score_revision_statistics import ScoreRevisionStatistics as ScoreRevisionStatistics +from flat_api.models.score_source import ScoreSource as ScoreSource +from flat_api.models.score_summary import ScoreSummary as ScoreSummary +from flat_api.models.score_track import ScoreTrack as ScoreTrack +from flat_api.models.score_track_creation import ScoreTrackCreation as ScoreTrackCreation +from flat_api.models.score_track_creation_response import ScoreTrackCreationResponse as ScoreTrackCreationResponse +from flat_api.models.score_track_point import ScoreTrackPoint as ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose as ScoreTrackPurpose +from flat_api.models.score_track_state import ScoreTrackState as ScoreTrackState +from flat_api.models.score_track_type import ScoreTrackType as ScoreTrackType +from flat_api.models.score_track_update import ScoreTrackUpdate as ScoreTrackUpdate +from flat_api.models.score_views_counts import ScoreViewsCounts as ScoreViewsCounts +from flat_api.models.task import Task as Task +from flat_api.models.task_export_options import TaskExportOptions as TaskExportOptions +from flat_api.models.task_progress import TaskProgress as TaskProgress +from flat_api.models.task_result import TaskResult as TaskResult +from flat_api.models.teaching_theme import TeachingTheme as TeachingTheme +from flat_api.models.tutteo_product import TutteoProduct as TutteoProduct +from flat_api.models.user_admin_update import UserAdminUpdate as UserAdminUpdate +from flat_api.models.user_azure_details import UserAzureDetails as UserAzureDetails +from flat_api.models.user_basics import UserBasics as UserBasics +from flat_api.models.user_community_profile_links import UserCommunityProfileLinks as UserCommunityProfileLinks +from flat_api.models.user_creation import UserCreation as UserCreation +from flat_api.models.user_details import UserDetails as UserDetails +from flat_api.models.user_details_admin import UserDetailsAdmin as UserDetailsAdmin +from flat_api.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense as UserDetailsAdminAllOfLicense +from flat_api.models.user_public import UserPublic as UserPublic +from flat_api.models.user_public_summary import UserPublicSummary as UserPublicSummary +from flat_api.models.user_signin_link import UserSigninLink as UserSigninLink +from flat_api.models.user_signin_link_creation import UserSigninLinkCreation as UserSigninLinkCreation + diff --git a/flat_api/_retry.py b/flat_api/_retry.py new file mode 100644 index 0000000..eb59cf5 --- /dev/null +++ b/flat_api/_retry.py @@ -0,0 +1,67 @@ +"""Retry policy for the Flat API. + +Flat does not follow the usual conventions, and getting this wrong is silent: + + * rate limiting returns **403**, not 429 + * there is **no Retry-After header**; the reset time is ``X-RateLimit-Reset``, UTC epoch seconds + * a plain 403 is a genuine authorization failure and must never be retried + +So the policy keys on the response body's ``code``, not on the status alone. +""" + +from __future__ import annotations + +import random +import time +from dataclasses import dataclass + +from flat_api.errors import FlatError, FlatRateLimitError, FlatServerError + +#: Methods safe to replay. A non-idempotent request that may already have been applied is not. +IDEMPOTENT_METHODS = frozenset({"GET", "HEAD", "OPTIONS", "PUT", "DELETE"}) + +MAX_RATE_LIMIT_WAIT = 300.0 + + +@dataclass(frozen=True) +class RetryPolicy: + """How the client retries. Pass ``RetryPolicy.disabled()`` to opt out entirely.""" + + attempts: int = 3 + backoff_base: float = 0.5 + backoff_max: float = 30.0 + jitter: float = 0.25 + respect_rate_limit_reset: bool = True + + @classmethod + def disabled(cls) -> "RetryPolicy": + """No retries. Errors still arrive typed, and a rate-limit error still carries its reset.""" + return cls(attempts=1) + + @property + def enabled(self) -> bool: + return self.attempts > 1 + + def should_retry(self, error: BaseException, method: str, attempt: int) -> bool: + if attempt >= self.attempts: + return False + if method.upper() not in IDEMPOTENT_METHODS: + return False + if isinstance(error, FlatRateLimitError): + return True + if isinstance(error, FlatServerError): + return True + # A transport failure before the request was sent is safe to replay. + return isinstance(error, OSError) and not isinstance(error, FlatError) + + def delay_for(self, error: BaseException, attempt: int) -> float: + if ( + self.respect_rate_limit_reset + and isinstance(error, FlatRateLimitError) + and error.reset is not None + ): + wait = error.reset - time.time() + if wait > 0: + return min(wait + random.uniform(0, self.jitter), MAX_RATE_LIMIT_WAIT) + exponential = min(self.backoff_base * (2 ** (attempt - 1)), self.backoff_max) + return exponential + random.uniform(0, self.jitter * exponential) diff --git a/flat_api/aio/__init__.py b/flat_api/aio/__init__.py new file mode 100644 index 0000000..4740288 --- /dev/null +++ b/flat_api/aio/__init__.py @@ -0,0 +1,461 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "2.0.0" + +# Define package exports +__all__ = [ + "AccountApi", + "ClassApi", + "CollectionApi", + "EduResourcesApi", + "GroupApi", + "OMRApi", + "OrganizationApi", + "ScoreApi", + "TaskApi", + "UserApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AddGroupUser200Response", + "AddGroupUserRequest", + "ApiAccessToken", + "AppScopes", + "Assignment", + "AssignmentCapabilities", + "AssignmentCapabilitiesCanPublishInClassError", + "AssignmentCopy", + "AssignmentCopyResponse", + "AssignmentCopyToClass", + "AssignmentCopyToResourceLibrary", + "AssignmentGroup", + "AssignmentSubmission", + "AssignmentSubmissionComment", + "AssignmentSubmissionCommentCreation", + "AssignmentSubmissionComments", + "AssignmentSubmissionHistory", + "AssignmentSubmissionHistoryAttachment", + "AssignmentSubmissionHistoryState", + "AssignmentSubmissionLti", + "AssignmentSubmissionPlayback", + "AssignmentSubmissionState", + "AssignmentSubmissionStudentsMode", + "AssignmentSubmissionUpdate", + "AssignmentType", + "AssignmentUpdate", + "ClassAssignment", + "ClassAssignmentAllOfCanvas", + "ClassAssignmentAllOfLti", + "ClassAssignmentAllOfMfc", + "ClassAssignmentUpdate", + "ClassAssignmentUpdateAllOfGoogleClassroom", + "ClassAssignmentUpdateAllOfMicrosoftGraph", + "ClassAttachmentCreation", + "ClassCreation", + "ClassDetails", + "ClassDetailsCanvas", + "ClassDetailsClever", + "ClassDetailsGoogleClassroom", + "ClassDetailsGoogleDrive", + "ClassDetailsIssues", + "ClassDetailsIssuesSyncInner", + "ClassDetailsLti", + "ClassDetailsMfc", + "ClassDetailsMicrosoftGraph", + "ClassGradeLevel", + "ClassRoles", + "ClassState", + "ClassUpdate", + "Collection", + "CollectionApp", + "CollectionCapabilities", + "CollectionContents", + "CollectionCreation", + "CollectionModification", + "CollectionPrivacy", + "CollectionType", + "CreateLtiConfiguration200Response", + "CreditTransaction", + "EduLibrary", + "EduResource", + "EduResourceAssignmentCreation", + "EduResourceCapabilities", + "EduResourceCopy", + "EduResourceCreation", + "EduResourceFolder", + "EduResourceLtiLink", + "EduResourceMove", + "EduResourcePrivacy", + "EduResourceResource", + "EduResourceType", + "EduResourceUpdate", + "EduResourceUseInClass", + "FlatErrorResponse", + "GoogleClassroomCoursework", + "GoogleClassroomSubmission", + "Grade", + "Group", + "GroupCreation", + "GroupDetails", + "GroupType", + "LicenseMode", + "LicenseSources", + "LmsName", + "LtiConfiguration", + "LtiConfiguration1p1", + "LtiConfiguration1p1AllOfTool", + "LtiConfiguration1p3", + "LtiConfiguration1p3Base", + "LtiConfiguration1p3BaseSupportedServices", + "LtiConfiguration1p3BaseSupportedServicesAgs", + "LtiConfiguration1p3BaseSupportedServicesDeepLinking", + "LtiConfiguration1p3BaseSupportedServicesNrps", + "LtiConfiguration1p3BaseTool", + "LtiConfiguration1p3Deployment", + "LtiConfiguration1p3Dynamic", + "LtiConfiguration1p3Manual", + "LtiConfigurationBase", + "LtiConfigurationCreate", + "LtiConfigurationCreate1p1", + "LtiConfigurationCreate1p3Deployment", + "LtiConfigurationCreate1p3Dynamic", + "LtiConfigurationCreate1p3DynamicPlatformInfo", + "LtiConfigurationCreate1p3Manual", + "LtiConfigurationUpdate", + "LtiConfigurationUpdateDeployment", + "LtiConfigurationUpdateStandalone", + "LtiCredentials", + "LtiCredentialsCreation", + "MediaAttachment", + "MediaScoreSharingMode", + "MicrosoftGraphAssignment", + "MicrosoftGraphSubmission", + "OmrCapabilities", + "OmrDetailsStepData", + "OmrDetailsSubmission", + "OmrDetectedInstrument", + "OmrImportedMetadata", + "OmrInstrumentOverride", + "OmrJob", + "OmrJobCreation", + "OmrJobFileMetadata", + "OmrJobFileUpload", + "OmrJobFileUploadResult", + "OmrJobInputFile", + "OmrJobOutput", + "OmrJobProgress", + "OmrJobResult", + "OmrJobRetention", + "OmrJobStatus", + "OmrLocaleDetails", + "OmrPendingStep", + "OmrStepName", + "OrganizationInvitation", + "OrganizationInvitationCreation", + "OrganizationRoles", + "OrganizationUserAccessTokenCreation", + "RenameGroupRequest", + "ResourceCollaborator", + "ResourceCollaboratorCreation", + "ResourceRights", + "ScoreComment", + "ScoreCommentContext", + "ScoreCommentCreation", + "ScoreCommentModeration", + "ScoreCommentUpdate", + "ScoreCommentsCounts", + "ScoreCreation", + "ScoreCreationBuilderData", + "ScoreCreationBuilderDataAllOfBuilderData", + "ScoreCreationBuilderDataAllOfBuilderDataLayoutData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreData", + "ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments", + "ScoreCreationCommon", + "ScoreCreationFileImport", + "ScoreCreationGoogleDriveImport", + "ScoreCreationType", + "ScoreDetails", + "ScoreDetailsAllOfMe", + "ScoreFork", + "ScoreLicense", + "ScoreLikesCounts", + "ScoreModification", + "ScorePlaysCounts", + "ScorePrivacy", + "ScoreRevision", + "ScoreRevisionCreation", + "ScoreRevisionStatistics", + "ScoreSource", + "ScoreSummary", + "ScoreTrack", + "ScoreTrackCreation", + "ScoreTrackCreationResponse", + "ScoreTrackPoint", + "ScoreTrackPurpose", + "ScoreTrackState", + "ScoreTrackType", + "ScoreTrackUpdate", + "ScoreViewsCounts", + "Task", + "TaskExportOptions", + "TaskProgress", + "TaskResult", + "TeachingTheme", + "TutteoProduct", + "UserAdminUpdate", + "UserAzureDetails", + "UserBasics", + "UserCommunityProfileLinks", + "UserCreation", + "UserDetails", + "UserDetailsAdmin", + "UserDetailsAdminAllOfLicense", + "UserPublic", + "UserPublicSummary", + "UserSigninLink", + "UserSigninLinkCreation", +] + +# import apis into sdk package +from flat_api.aio.api.account_api import AccountApi as AccountApi +from flat_api.aio.api.class_api import ClassApi as ClassApi +from flat_api.aio.api.collection_api import CollectionApi as CollectionApi +from flat_api.aio.api.edu_resources_api import EduResourcesApi as EduResourcesApi +from flat_api.aio.api.group_api import GroupApi as GroupApi +from flat_api.aio.api.omr_api import OMRApi as OMRApi +from flat_api.aio.api.organization_api import OrganizationApi as OrganizationApi +from flat_api.aio.api.score_api import ScoreApi as ScoreApi +from flat_api.aio.api.task_api import TaskApi as TaskApi +from flat_api.aio.api.user_api import UserApi as UserApi + +# import ApiClient +from flat_api.aio.api_response import ApiResponse as ApiResponse +from flat_api.aio.api_client import ApiClient as ApiClient +from flat_api.aio.configuration import Configuration as Configuration +from flat_api.aio.exceptions import OpenApiException as OpenApiException +from flat_api.aio.exceptions import ApiTypeError as ApiTypeError +from flat_api.aio.exceptions import ApiValueError as ApiValueError +from flat_api.aio.exceptions import ApiKeyError as ApiKeyError +from flat_api.aio.exceptions import ApiAttributeError as ApiAttributeError +from flat_api.aio.exceptions import ApiException as ApiException + +# import models into sdk package +from flat_api.aio.models.add_group_user200_response import AddGroupUser200Response as AddGroupUser200Response +from flat_api.aio.models.add_group_user_request import AddGroupUserRequest as AddGroupUserRequest +from flat_api.aio.models.api_access_token import ApiAccessToken as ApiAccessToken +from flat_api.aio.models.app_scopes import AppScopes as AppScopes +from flat_api.aio.models.assignment import Assignment as Assignment +from flat_api.aio.models.assignment_capabilities import AssignmentCapabilities as AssignmentCapabilities +from flat_api.aio.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError as AssignmentCapabilitiesCanPublishInClassError +from flat_api.aio.models.assignment_copy import AssignmentCopy as AssignmentCopy +from flat_api.aio.models.assignment_copy_response import AssignmentCopyResponse as AssignmentCopyResponse +from flat_api.aio.models.assignment_copy_to_class import AssignmentCopyToClass as AssignmentCopyToClass +from flat_api.aio.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary as AssignmentCopyToResourceLibrary +from flat_api.aio.models.assignment_group import AssignmentGroup as AssignmentGroup +from flat_api.aio.models.assignment_submission import AssignmentSubmission as AssignmentSubmission +from flat_api.aio.models.assignment_submission_comment import AssignmentSubmissionComment as AssignmentSubmissionComment +from flat_api.aio.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation as AssignmentSubmissionCommentCreation +from flat_api.aio.models.assignment_submission_comments import AssignmentSubmissionComments as AssignmentSubmissionComments +from flat_api.aio.models.assignment_submission_history import AssignmentSubmissionHistory as AssignmentSubmissionHistory +from flat_api.aio.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment as AssignmentSubmissionHistoryAttachment +from flat_api.aio.models.assignment_submission_history_state import AssignmentSubmissionHistoryState as AssignmentSubmissionHistoryState +from flat_api.aio.models.assignment_submission_lti import AssignmentSubmissionLti as AssignmentSubmissionLti +from flat_api.aio.models.assignment_submission_playback import AssignmentSubmissionPlayback as AssignmentSubmissionPlayback +from flat_api.aio.models.assignment_submission_state import AssignmentSubmissionState as AssignmentSubmissionState +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode as AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_submission_update import AssignmentSubmissionUpdate as AssignmentSubmissionUpdate +from flat_api.aio.models.assignment_type import AssignmentType as AssignmentType +from flat_api.aio.models.assignment_update import AssignmentUpdate as AssignmentUpdate +from flat_api.aio.models.class_assignment import ClassAssignment as ClassAssignment +from flat_api.aio.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas as ClassAssignmentAllOfCanvas +from flat_api.aio.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti as ClassAssignmentAllOfLti +from flat_api.aio.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc as ClassAssignmentAllOfMfc +from flat_api.aio.models.class_assignment_update import ClassAssignmentUpdate as ClassAssignmentUpdate +from flat_api.aio.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom as ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.aio.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph as ClassAssignmentUpdateAllOfMicrosoftGraph +from flat_api.aio.models.class_attachment_creation import ClassAttachmentCreation as ClassAttachmentCreation +from flat_api.aio.models.class_creation import ClassCreation as ClassCreation +from flat_api.aio.models.class_details import ClassDetails as ClassDetails +from flat_api.aio.models.class_details_canvas import ClassDetailsCanvas as ClassDetailsCanvas +from flat_api.aio.models.class_details_clever import ClassDetailsClever as ClassDetailsClever +from flat_api.aio.models.class_details_google_classroom import ClassDetailsGoogleClassroom as ClassDetailsGoogleClassroom +from flat_api.aio.models.class_details_google_drive import ClassDetailsGoogleDrive as ClassDetailsGoogleDrive +from flat_api.aio.models.class_details_issues import ClassDetailsIssues as ClassDetailsIssues +from flat_api.aio.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner as ClassDetailsIssuesSyncInner +from flat_api.aio.models.class_details_lti import ClassDetailsLti as ClassDetailsLti +from flat_api.aio.models.class_details_mfc import ClassDetailsMfc as ClassDetailsMfc +from flat_api.aio.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph as ClassDetailsMicrosoftGraph +from flat_api.aio.models.class_grade_level import ClassGradeLevel as ClassGradeLevel +from flat_api.aio.models.class_roles import ClassRoles as ClassRoles +from flat_api.aio.models.class_state import ClassState as ClassState +from flat_api.aio.models.class_update import ClassUpdate as ClassUpdate +from flat_api.aio.models.collection import Collection as Collection +from flat_api.aio.models.collection_app import CollectionApp as CollectionApp +from flat_api.aio.models.collection_capabilities import CollectionCapabilities as CollectionCapabilities +from flat_api.aio.models.collection_contents import CollectionContents as CollectionContents +from flat_api.aio.models.collection_creation import CollectionCreation as CollectionCreation +from flat_api.aio.models.collection_modification import CollectionModification as CollectionModification +from flat_api.aio.models.collection_privacy import CollectionPrivacy as CollectionPrivacy +from flat_api.aio.models.collection_type import CollectionType as CollectionType +from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response as CreateLtiConfiguration200Response +from flat_api.aio.models.credit_transaction import CreditTransaction as CreditTransaction +from flat_api.aio.models.edu_library import EduLibrary as EduLibrary +from flat_api.aio.models.edu_resource import EduResource as EduResource +from flat_api.aio.models.edu_resource_assignment_creation import EduResourceAssignmentCreation as EduResourceAssignmentCreation +from flat_api.aio.models.edu_resource_capabilities import EduResourceCapabilities as EduResourceCapabilities +from flat_api.aio.models.edu_resource_copy import EduResourceCopy as EduResourceCopy +from flat_api.aio.models.edu_resource_creation import EduResourceCreation as EduResourceCreation +from flat_api.aio.models.edu_resource_folder import EduResourceFolder as EduResourceFolder +from flat_api.aio.models.edu_resource_lti_link import EduResourceLtiLink as EduResourceLtiLink +from flat_api.aio.models.edu_resource_move import EduResourceMove as EduResourceMove +from flat_api.aio.models.edu_resource_privacy import EduResourcePrivacy as EduResourcePrivacy +from flat_api.aio.models.edu_resource_resource import EduResourceResource as EduResourceResource +from flat_api.aio.models.edu_resource_type import EduResourceType as EduResourceType +from flat_api.aio.models.edu_resource_update import EduResourceUpdate as EduResourceUpdate +from flat_api.aio.models.edu_resource_use_in_class import EduResourceUseInClass as EduResourceUseInClass +from flat_api.aio.models.flat_error_response import FlatErrorResponse as FlatErrorResponse +from flat_api.aio.models.google_classroom_coursework import GoogleClassroomCoursework as GoogleClassroomCoursework +from flat_api.aio.models.google_classroom_submission import GoogleClassroomSubmission as GoogleClassroomSubmission +from flat_api.aio.models.grade import Grade as Grade +from flat_api.aio.models.group import Group as Group +from flat_api.aio.models.group_creation import GroupCreation as GroupCreation +from flat_api.aio.models.group_details import GroupDetails as GroupDetails +from flat_api.aio.models.group_type import GroupType as GroupType +from flat_api.aio.models.license_mode import LicenseMode as LicenseMode +from flat_api.aio.models.license_sources import LicenseSources as LicenseSources +from flat_api.aio.models.lms_name import LmsName as LmsName +from flat_api.aio.models.lti_configuration import LtiConfiguration as LtiConfiguration +from flat_api.aio.models.lti_configuration1p1 import LtiConfiguration1p1 as LtiConfiguration1p1 +from flat_api.aio.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool as LtiConfiguration1p1AllOfTool +from flat_api.aio.models.lti_configuration1p3 import LtiConfiguration1p3 as LtiConfiguration1p3 +from flat_api.aio.models.lti_configuration1p3_base import LtiConfiguration1p3Base as LtiConfiguration1p3Base +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices as LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs as LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.aio.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking as LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.aio.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps as LtiConfiguration1p3BaseSupportedServicesNrps +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool as LtiConfiguration1p3BaseTool +from flat_api.aio.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment as LtiConfiguration1p3Deployment +from flat_api.aio.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic as LtiConfiguration1p3Dynamic +from flat_api.aio.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual as LtiConfiguration1p3Manual +from flat_api.aio.models.lti_configuration_base import LtiConfigurationBase as LtiConfigurationBase +from flat_api.aio.models.lti_configuration_create import LtiConfigurationCreate as LtiConfigurationCreate +from flat_api.aio.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 as LtiConfigurationCreate1p1 +from flat_api.aio.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment as LtiConfigurationCreate1p3Deployment +from flat_api.aio.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic as LtiConfigurationCreate1p3Dynamic +from flat_api.aio.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo as LtiConfigurationCreate1p3DynamicPlatformInfo +from flat_api.aio.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual as LtiConfigurationCreate1p3Manual +from flat_api.aio.models.lti_configuration_update import LtiConfigurationUpdate as LtiConfigurationUpdate +from flat_api.aio.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment as LtiConfigurationUpdateDeployment +from flat_api.aio.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone as LtiConfigurationUpdateStandalone +from flat_api.aio.models.lti_credentials import LtiCredentials as LtiCredentials +from flat_api.aio.models.lti_credentials_creation import LtiCredentialsCreation as LtiCredentialsCreation +from flat_api.aio.models.media_attachment import MediaAttachment as MediaAttachment +from flat_api.aio.models.media_score_sharing_mode import MediaScoreSharingMode as MediaScoreSharingMode +from flat_api.aio.models.microsoft_graph_assignment import MicrosoftGraphAssignment as MicrosoftGraphAssignment +from flat_api.aio.models.microsoft_graph_submission import MicrosoftGraphSubmission as MicrosoftGraphSubmission +from flat_api.aio.models.omr_capabilities import OmrCapabilities as OmrCapabilities +from flat_api.aio.models.omr_details_step_data import OmrDetailsStepData as OmrDetailsStepData +from flat_api.aio.models.omr_details_submission import OmrDetailsSubmission as OmrDetailsSubmission +from flat_api.aio.models.omr_detected_instrument import OmrDetectedInstrument as OmrDetectedInstrument +from flat_api.aio.models.omr_imported_metadata import OmrImportedMetadata as OmrImportedMetadata +from flat_api.aio.models.omr_instrument_override import OmrInstrumentOverride as OmrInstrumentOverride +from flat_api.aio.models.omr_job import OmrJob as OmrJob +from flat_api.aio.models.omr_job_creation import OmrJobCreation as OmrJobCreation +from flat_api.aio.models.omr_job_file_metadata import OmrJobFileMetadata as OmrJobFileMetadata +from flat_api.aio.models.omr_job_file_upload import OmrJobFileUpload as OmrJobFileUpload +from flat_api.aio.models.omr_job_file_upload_result import OmrJobFileUploadResult as OmrJobFileUploadResult +from flat_api.aio.models.omr_job_input_file import OmrJobInputFile as OmrJobInputFile +from flat_api.aio.models.omr_job_output import OmrJobOutput as OmrJobOutput +from flat_api.aio.models.omr_job_progress import OmrJobProgress as OmrJobProgress +from flat_api.aio.models.omr_job_result import OmrJobResult as OmrJobResult +from flat_api.aio.models.omr_job_retention import OmrJobRetention as OmrJobRetention +from flat_api.aio.models.omr_job_status import OmrJobStatus as OmrJobStatus +from flat_api.aio.models.omr_locale_details import OmrLocaleDetails as OmrLocaleDetails +from flat_api.aio.models.omr_pending_step import OmrPendingStep as OmrPendingStep +from flat_api.aio.models.omr_step_name import OmrStepName as OmrStepName +from flat_api.aio.models.organization_invitation import OrganizationInvitation as OrganizationInvitation +from flat_api.aio.models.organization_invitation_creation import OrganizationInvitationCreation as OrganizationInvitationCreation +from flat_api.aio.models.organization_roles import OrganizationRoles as OrganizationRoles +from flat_api.aio.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation as OrganizationUserAccessTokenCreation +from flat_api.aio.models.rename_group_request import RenameGroupRequest as RenameGroupRequest +from flat_api.aio.models.resource_collaborator import ResourceCollaborator as ResourceCollaborator +from flat_api.aio.models.resource_collaborator_creation import ResourceCollaboratorCreation as ResourceCollaboratorCreation +from flat_api.aio.models.resource_rights import ResourceRights as ResourceRights +from flat_api.aio.models.score_comment import ScoreComment as ScoreComment +from flat_api.aio.models.score_comment_context import ScoreCommentContext as ScoreCommentContext +from flat_api.aio.models.score_comment_creation import ScoreCommentCreation as ScoreCommentCreation +from flat_api.aio.models.score_comment_moderation import ScoreCommentModeration as ScoreCommentModeration +from flat_api.aio.models.score_comment_update import ScoreCommentUpdate as ScoreCommentUpdate +from flat_api.aio.models.score_comments_counts import ScoreCommentsCounts as ScoreCommentsCounts +from flat_api.aio.models.score_creation import ScoreCreation as ScoreCreation +from flat_api.aio.models.score_creation_builder_data import ScoreCreationBuilderData as ScoreCreationBuilderData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData as ScoreCreationBuilderDataAllOfBuilderData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData as ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData as ScoreCreationBuilderDataAllOfBuilderDataScoreData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments as ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from flat_api.aio.models.score_creation_common import ScoreCreationCommon as ScoreCreationCommon +from flat_api.aio.models.score_creation_file_import import ScoreCreationFileImport as ScoreCreationFileImport +from flat_api.aio.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport as ScoreCreationGoogleDriveImport +from flat_api.aio.models.score_creation_type import ScoreCreationType as ScoreCreationType +from flat_api.aio.models.score_details import ScoreDetails as ScoreDetails +from flat_api.aio.models.score_details_all_of_me import ScoreDetailsAllOfMe as ScoreDetailsAllOfMe +from flat_api.aio.models.score_fork import ScoreFork as ScoreFork +from flat_api.aio.models.score_license import ScoreLicense as ScoreLicense +from flat_api.aio.models.score_likes_counts import ScoreLikesCounts as ScoreLikesCounts +from flat_api.aio.models.score_modification import ScoreModification as ScoreModification +from flat_api.aio.models.score_plays_counts import ScorePlaysCounts as ScorePlaysCounts +from flat_api.aio.models.score_privacy import ScorePrivacy as ScorePrivacy +from flat_api.aio.models.score_revision import ScoreRevision as ScoreRevision +from flat_api.aio.models.score_revision_creation import ScoreRevisionCreation as ScoreRevisionCreation +from flat_api.aio.models.score_revision_statistics import ScoreRevisionStatistics as ScoreRevisionStatistics +from flat_api.aio.models.score_source import ScoreSource as ScoreSource +from flat_api.aio.models.score_summary import ScoreSummary as ScoreSummary +from flat_api.aio.models.score_track import ScoreTrack as ScoreTrack +from flat_api.aio.models.score_track_creation import ScoreTrackCreation as ScoreTrackCreation +from flat_api.aio.models.score_track_creation_response import ScoreTrackCreationResponse as ScoreTrackCreationResponse +from flat_api.aio.models.score_track_point import ScoreTrackPoint as ScoreTrackPoint +from flat_api.aio.models.score_track_purpose import ScoreTrackPurpose as ScoreTrackPurpose +from flat_api.aio.models.score_track_state import ScoreTrackState as ScoreTrackState +from flat_api.aio.models.score_track_type import ScoreTrackType as ScoreTrackType +from flat_api.aio.models.score_track_update import ScoreTrackUpdate as ScoreTrackUpdate +from flat_api.aio.models.score_views_counts import ScoreViewsCounts as ScoreViewsCounts +from flat_api.aio.models.task import Task as Task +from flat_api.aio.models.task_export_options import TaskExportOptions as TaskExportOptions +from flat_api.aio.models.task_progress import TaskProgress as TaskProgress +from flat_api.aio.models.task_result import TaskResult as TaskResult +from flat_api.aio.models.teaching_theme import TeachingTheme as TeachingTheme +from flat_api.aio.models.tutteo_product import TutteoProduct as TutteoProduct +from flat_api.aio.models.user_admin_update import UserAdminUpdate as UserAdminUpdate +from flat_api.aio.models.user_azure_details import UserAzureDetails as UserAzureDetails +from flat_api.aio.models.user_basics import UserBasics as UserBasics +from flat_api.aio.models.user_community_profile_links import UserCommunityProfileLinks as UserCommunityProfileLinks +from flat_api.aio.models.user_creation import UserCreation as UserCreation +from flat_api.aio.models.user_details import UserDetails as UserDetails +from flat_api.aio.models.user_details_admin import UserDetailsAdmin as UserDetailsAdmin +from flat_api.aio.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense as UserDetailsAdminAllOfLicense +from flat_api.aio.models.user_public import UserPublic as UserPublic +from flat_api.aio.models.user_public_summary import UserPublicSummary as UserPublicSummary +from flat_api.aio.models.user_signin_link import UserSigninLink as UserSigninLink +from flat_api.aio.models.user_signin_link_creation import UserSigninLinkCreation as UserSigninLinkCreation + diff --git a/flat_api/aio/api/__init__.py b/flat_api/aio/api/__init__.py new file mode 100644 index 0000000..de44471 --- /dev/null +++ b/flat_api/aio/api/__init__.py @@ -0,0 +1,14 @@ +# flake8: noqa + +# import apis into api package +from flat_api.aio.api.account_api import AccountApi +from flat_api.aio.api.class_api import ClassApi +from flat_api.aio.api.collection_api import CollectionApi +from flat_api.aio.api.edu_resources_api import EduResourcesApi +from flat_api.aio.api.group_api import GroupApi +from flat_api.aio.api.omr_api import OMRApi +from flat_api.aio.api.organization_api import OrganizationApi +from flat_api.aio.api.score_api import ScoreApi +from flat_api.aio.api.task_api import TaskApi +from flat_api.aio.api.user_api import UserApi + diff --git a/flat_api/aio/api/account_api.py b/flat_api/aio/api/account_api.py new file mode 100644 index 0000000..0383108 --- /dev/null +++ b/flat_api/aio/api/account_api.py @@ -0,0 +1,305 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool +from typing import Optional +from typing_extensions import Annotated +from flat_api.aio.models.user_details import UserDetails + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class AccountApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def get_authenticated_user( + self, + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetails: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_authenticated_user_with_http_info( + self, + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetails]: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_authenticated_user_without_preload_content( + self, + only_id: Annotated[Optional[StrictBool], Field(description="Only return the user id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get current user account + + Get details about the current authenticated User. + + :param only_id: Only return the user id + :type only_id: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_authenticated_user_serialize( + only_id=only_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_authenticated_user_serialize( + self, + only_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if only_id is not None: + + _query_params.append(('onlyId', only_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/class_api.py b/flat_api/aio/api/class_api.py new file mode 100644 index 0000000..c7771c8 --- /dev/null +++ b/flat_api/aio/api/class_api.py @@ -0,0 +1,9485 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from flat_api.aio.models.assignment import Assignment +from flat_api.aio.models.assignment_copy import AssignmentCopy +from flat_api.aio.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.aio.models.assignment_submission import AssignmentSubmission +from flat_api.aio.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.aio.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.aio.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.aio.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.aio.models.class_assignment import ClassAssignment +from flat_api.aio.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.aio.models.class_creation import ClassCreation +from flat_api.aio.models.class_details import ClassDetails +from flat_api.aio.models.class_update import ClassUpdate +from flat_api.aio.models.user_details import UserDetails + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class ClassApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def activate_class( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def activate_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def activate_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Activate the class + + 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. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _activate_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/activate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_class_user( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_class_user_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_class_user_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a user to the class + + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_class_user_serialize( + self, + var_class, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def archive_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def archive_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def archive_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive the assignment + + Archive the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _archive_assignment_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def archive_class( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def archive_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def archive_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive the class + + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._archive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _archive_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def copy_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentCopyResponse: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def copy_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentCopyResponse]: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def copy_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an assignment + + Copy an assignment to a specified class or the resource library For class assignments: - If the original assignment has a due date in the past, this new assignment will be created without a due date. - If the class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_assignment_serialize( + self, + var_class, + assignment, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_class( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_class_with_http_info( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_class_without_preload_content( + self, + body: ClassCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new class + + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + + :param body: (required) + :type body: ClassCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_class_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_class_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_class_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_class_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assignment creation + + Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_class_assignment_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_class_assignment_serialize( + self, + var_class, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_submission( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create or edit a submission + + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_submission_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_submission_serialize( + self, + var_class, + assignment, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_test_student_account( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetails: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_test_student_account_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetails]: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_test_student_account_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + reset: Annotated[Optional[StrictBool], Field(description="If true, the testing account will be re-created. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a test student account + + Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param reset: If true, the testing account will be re-created. + :type reset: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_test_student_account_serialize( + var_class=var_class, + reset=reset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_test_student_account_serialize( + self, + var_class, + reset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + if reset is not None: + + _query_params.append(('reset', reset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/testStudent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an assignment + + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an assignment + + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an assignment + + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_assignment_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_class_user( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_class_user_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_class_user_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a user from the class + + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_class_user_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_class_user_serialize( + self, + var_class, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_submission( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reset a submission + + Use this method as a teacher to reset a submission and allow student to start over the assignment + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_submission_serialize( + self, + var_class, + assignment, + submission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_submission_comment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_submission_comment_serialize( + self, + var_class, + assignment, + submission, + comment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def edit_submission( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def edit_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def edit_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_submission_serialize( + self, + var_class, + assignment, + submission, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def enroll_class( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def enroll_class_with_http_info( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def enroll_class_without_preload_content( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enroll_class_serialize( + self, + enrollment_code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if enrollment_code is not None: + _path_params['enrollmentCode'] = enrollment_code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/enroll/{enrollmentCode}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def export_submissions_reviews_as_csv( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def export_submissions_reviews_as_csv_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def export_submissions_reviews_as_csv_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_submissions_reviews_as_csv_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/csv' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/csv', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def export_submissions_reviews_as_excel( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def export_submissions_reviews_as_excel_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def export_submissions_reviews_as_excel_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_submissions_reviews_as_excel_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/excel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Get an assignment + + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Get an assignment + + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an assignment + + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_assignment_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_class( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the details of a single class + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_submissions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_submissions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_submissions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List submissions related to the score + + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_submissions_serialize( + self, + score, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_submission( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmission: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a student submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_serialize( + self, + var_class, + assignment, + submission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_submission_comments( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmissionComment]: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_submission_comments_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmissionComment]]: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_submission_comments_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the feedback comments of a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_comments_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_comments_serialize( + self, + var_class, + assignment, + submission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_submission_history( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmissionHistory]: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_submission_history_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmissionHistory]]: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_submission_history_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the history of the submission + + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submission_history_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmissionHistory]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submission_history_serialize( + self, + var_class, + assignment, + submission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_submissions( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmission]: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_submissions_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_submissions_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the students' submissions + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_submissions_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_submissions_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_assignments( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ClassAssignment]: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_assignments_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ClassAssignment]]: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_assignments_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assignments listing + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_assignments_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_assignments_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_class_student_submissions( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AssignmentSubmission]: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_class_student_submissions_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_class_student_submissions_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the submissions for a student + + Use this method as a teacher to list all the assignment submissions sent by a student of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_class_student_submissions_serialize( + var_class=var_class, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_class_student_submissions_serialize( + self, + var_class, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/students/{user}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_classes( + self, + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ClassDetails]: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_classes_with_http_info( + self, + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ClassDetails]]: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_classes_without_preload_content( + self, + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the classes available for the current user + + + :param state: Filter the classes by state + :type state: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_classes_serialize( + state=state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_classes_serialize( + self, + state, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if state is not None: + + _query_params.append(('state', state)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def post_submission_comment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmissionComment: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def post_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmissionComment]: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def post_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_submission_comment_serialize( + self, + var_class, + assignment, + submission, + assignment_submission_comment_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_submission_comment_creation is not None: + _body_params = assignment_submission_comment_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def unarchive_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def unarchive_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def unarchive_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unarchive the assignment. + + Mark the assignment as `active`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_assignment_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unarchive_assignment_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def unarchive_class( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def unarchive_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def unarchive_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unarchive the class + + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unarchive_class_serialize( + var_class=var_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unarchive_class_serialize( + self, + var_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/classes/{class}/archive', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_class( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_class_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_class_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update the class + + Update the meta information of the class + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_serialize( + var_class=var_class, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_class_serialize( + self, + var_class, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_class_assignment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Update an assignment + + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_class_assignment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Update an assignment + + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_class_assignment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an assignment + + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_class_assignment_serialize( + var_class=var_class, + assignment=assignment, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_class_assignment_serialize( + self, + var_class, + assignment, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_submission_comment( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignmentSubmissionComment: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_submission_comment_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmissionComment]: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_submission_comment_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a feedback comment to a submission + + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param comment: Unique identifier of the comment (required) + :type comment: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + comment=comment, + assignment_submission_comment_creation=assignment_submission_comment_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_submission_comment_serialize( + self, + var_class, + assignment, + submission, + comment, + assignment_submission_comment_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_submission_comment_creation is not None: + _body_params = assignment_submission_comment_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/collection_api.py b/flat_api/aio/api/collection_api.py new file mode 100644 index 0000000..fc23944 --- /dev/null +++ b/flat_api/aio/api/collection_api.py @@ -0,0 +1,2803 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.collection import Collection +from flat_api.aio.models.collection_creation import CollectionCreation +from flat_api.aio.models.collection_modification import CollectionModification +from flat_api.aio.models.flat_error_response import FlatErrorResponse +from flat_api.aio.models.score_details import ScoreDetails + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class CollectionApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def add_score_to_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreDetails: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_score_to_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreDetails]: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_score_to_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a score to the collection + + This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_to_collection_serialize( + collection=collection, + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_to_collection_serialize( + self, + collection, + score, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/collections/{collection}/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_collection( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Create a new collection + + This method will create a new collection in your account. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_collection_with_http_info( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Create a new collection + + This method will create a new collection in your account. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_collection_without_preload_content( + self, + body: CollectionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new collection + + This method will create a new collection in your account. + + :param body: (required) + :type body: CollectionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_collection_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_collection_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete the collection + + This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_collection_serialize( + self, + collection, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_score_from_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_score_from_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_score_from_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], + score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a score from the collection + + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) + :type collection: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_from_collection_serialize( + collection=collection, + score=score, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_from_collection_serialize( + self, + collection, + score, + event_properties, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + if score is not None: + _path_params['score'] = score + # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/collections/{collection}/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def edit_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def edit_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def edit_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + body: CollectionModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a collection's metadata + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param body: (required) + :type body: CollectionModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_collection_serialize( + collection=collection, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_collection_serialize( + self, + collection, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Collection: + """Get collection details + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Collection]: + """Get collection details + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get collection details + + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_collection_serialize( + collection=collection, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Collection", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_collection_serialize( + self, + collection, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections/{collection}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_collection_scores( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_collection_scores_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_collection_scores_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the scores contained in a collection + + Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. + + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) + :type collection: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collection_scores_serialize( + collection=collection, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_collection_scores_serialize( + self, + collection, + sort, + direction, + limit, + next, + previous, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections/{collection}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_collections( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Collection]: + """List the collections + + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_collections_with_http_info( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Collection]]: + """List the collections + + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_collections_without_preload_content( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the collections + + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. + + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. + :type parent: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_collections_serialize( + parent=parent, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Collection]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_collections_serialize( + self, + parent, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def untrash_collection( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FlatErrorResponse: + """(Deprecated) Untrash a collection + + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def untrash_collection_with_http_info( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FlatErrorResponse]: + """(Deprecated) Untrash a collection + + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def untrash_collection_without_preload_content( + self, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Untrash a collection + + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + + :param collection: Unique identifier of the collection. (required) + :type collection: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) + + _param = self._untrash_collection_serialize( + collection=collection, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _untrash_collection_serialize( + self, + collection, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if collection is not None: + _path_params['collection'] = collection + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/collections/{collection}/untrash', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/edu_resources_api.py b/flat_api/aio/api/edu_resources_api.py new file mode 100644 index 0000000..9aa3c3c --- /dev/null +++ b/flat_api/aio/api/edu_resources_api.py @@ -0,0 +1,3509 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.assignment import Assignment +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.assignment_update import AssignmentUpdate +from flat_api.aio.models.class_assignment import ClassAssignment +from flat_api.aio.models.edu_library import EduLibrary +from flat_api.aio.models.edu_resource import EduResource +from flat_api.aio.models.edu_resource_copy import EduResourceCopy +from flat_api.aio.models.edu_resource_creation import EduResourceCreation +from flat_api.aio.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.aio.models.edu_resource_move import EduResourceMove +from flat_api.aio.models.edu_resource_update import EduResourceUpdate +from flat_api.aio.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.aio.models.grade import Grade +from flat_api.aio.models.teaching_theme import TeachingTheme + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class EduResourcesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def copy_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def copy_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def copy_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_copy: EduResourceCopy, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an education resource to a Resource Library + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_copy: (required) + :type edu_resource_copy: EduResourceCopy + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_serialize( + resource=resource, + edu_resource_copy=edu_resource_copy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_edu_resource_serialize( + self, + resource, + edu_resource_copy, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_copy is not None: + _body_params = edu_resource_copy + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def copy_edu_resource_to_demo_class( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassAssignment: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def copy_edu_resource_to_demo_class_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassAssignment]: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def copy_edu_resource_to_demo_class_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy an education assignment to a teacher demo class + + Once a resource library can be published to a class (`Assignment.capabilities.canPublishInClass = true`), this endpoint can be used for the feature \"View as student\". It will ensure the teacher has a demo class, then copy the assignment to the demo class. You can then use `POST /classes/{class}/testStudent` to create a testing student account in the demo class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._copy_edu_resource_to_demo_class_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _copy_edu_resource_to_demo_class_serialize( + self, + resource, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/copyToDemoClass', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_edu_resource( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_edu_resource_with_http_info( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_edu_resource_without_preload_content( + self, + edu_resource_creation: EduResourceCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new education resource + + + :param edu_resource_creation: (required) + :type edu_resource_creation: EduResourceCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_serialize( + edu_resource_creation=edu_resource_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_edu_resource_serialize( + self, + edu_resource_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_creation is not None: + _body_params = edu_resource_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_edu_resource_lti_link( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResourceLtiLink: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_edu_resource_lti_link_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResourceLtiLink]: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_edu_resource_lti_link_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an LTI link for an education resource + + This endpoint will return an LTI link that can be used to launch Flat for Education. The link, in a context from a class, will ensure the assignment has been copied in the class. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_edu_resource_lti_link_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_edu_resource_lti_link_serialize( + self, + resource, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/createLtiLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_edu_resource_serialize( + self, + resource, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_edu_resource_serialize( + resource=resource, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_edu_resource_serialize( + self, + resource, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_edu_libraries( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[EduLibrary]: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_edu_libraries_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[EduLibrary]]: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_edu_libraries_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the education libraries + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_libraries_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_edu_libraries_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources/libraries', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_edu_resources( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[EduResource]: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization + :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool + :param type: Filter the returned resources by type + :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + without_subfolders_resources=without_subfolders_resources, + type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_edu_resources_with_http_info( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[EduResource]]: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization + :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool + :param type: Filter the returned resources by type + :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + without_subfolders_resources=without_subfolders_resources, + type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_edu_resources_without_preload_content( + self, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List education resources in a library or folder + + + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization + :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool + :param type: Filter the returned resources by type + :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of resources that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_edu_resources_serialize( + parent=parent, + without_subfolders_resources=without_subfolders_resources, + type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[EduResource]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_edu_resources_serialize( + self, + parent, + without_subfolders_resources, + type, + subjects, + assignment_types, + grades, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'subjects': 'multi', + 'assignmentTypes': 'multi', + 'grades': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + if without_subfolders_resources is not None: + + _query_params.append(('withoutSubfoldersResources', without_subfolders_resources)) + + if type is not None: + + _query_params.append(('type', type)) + + if subjects is not None: + + _query_params.append(('subjects', subjects)) + + if assignment_types is not None: + + _query_params.append(('assignmentTypes', assignment_types)) + + if grades is not None: + + _query_params.append(('grades', grades)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/eduResources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def move_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def move_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def move_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_move: EduResourceMove, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Move an education resource + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_move: (required) + :type edu_resource_move: EduResourceMove + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._move_edu_resource_serialize( + resource=resource, + edu_resource_move=edu_resource_move, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _move_edu_resource_serialize( + self, + resource, + edu_resource_move, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_move is not None: + _body_params = edu_resource_move + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/move', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_edu_resource( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EduResource: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_edu_resource_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EduResource]: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_edu_resource_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_update: EduResourceUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an education resource metadata + + Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_update: (required) + :type edu_resource_update: EduResourceUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_serialize( + resource=resource, + edu_resource_update=edu_resource_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EduResource", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_edu_resource_serialize( + self, + resource, + edu_resource_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_update is not None: + _body_params = edu_resource_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/eduResources/{resource}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_edu_resource_assignment( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignment: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_edu_resource_assignment_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assignment]: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_edu_resource_assignment_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + assignment_update: AssignmentUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an education resource assignment + + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param assignment_update: (required) + :type assignment_update: AssignmentUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_edu_resource_assignment_serialize( + resource=resource, + assignment_update=assignment_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_edu_resource_assignment_serialize( + self, + resource, + assignment_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assignment_update is not None: + _body_params = assignment_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/eduResources/{resource}/assignment', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def use_edu_resource_in_class( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassAssignment: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def use_edu_resource_in_class_with_http_info( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassAssignment]: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def use_edu_resource_in_class_without_preload_content( + self, + resource: Annotated[StrictStr, Field(description="Unique identifier of the resource")], + edu_resource_use_in_class: EduResourceUseInClass, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Use an education resource in a class + + This endpoint will copy a resource and the underlying resources. The assignment will be created as a draft that can be completed with other options before publishing (e.g. due date, publication date for scheduling, etc.). + + :param resource: Unique identifier of the resource (required) + :type resource: str + :param edu_resource_use_in_class: (required) + :type edu_resource_use_in_class: EduResourceUseInClass + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._use_edu_resource_in_class_serialize( + resource=resource, + edu_resource_use_in_class=edu_resource_use_in_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassAssignment", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _use_edu_resource_in_class_serialize( + self, + resource, + edu_resource_use_in_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource is not None: + _path_params['resource'] = resource + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edu_resource_use_in_class is not None: + _body_params = edu_resource_use_in_class + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/eduResources/{resource}/useInClass', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/group_api.py b/flat_api/aio/api/group_api.py new file mode 100644 index 0000000..706d233 --- /dev/null +++ b/flat_api/aio/api/group_api.py @@ -0,0 +1,2629 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.add_group_user200_response import AddGroupUser200Response +from flat_api.aio.models.add_group_user_request import AddGroupUserRequest +from flat_api.aio.models.group_creation import GroupCreation +from flat_api.aio.models.group_details import GroupDetails +from flat_api.aio.models.rename_group_request import RenameGroupRequest +from flat_api.aio.models.score_details import ScoreDetails +from flat_api.aio.models.user_public import UserPublic + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class GroupApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def add_group_user( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddGroupUser200Response: + """Add a student to a group + + Add a student to the specified group (must be in the same class) + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_user_serialize( + group=group, + add_group_user_request=add_group_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_group_user_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddGroupUser200Response]: + """Add a student to a group + + Add a student to the specified group (must be in the same class) + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_user_serialize( + group=group, + add_group_user_request=add_group_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_group_user_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a student to a group + + Add a student to the specified group (must be in the same class) + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_group_user_serialize( + group=group, + add_group_user_request=add_group_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_group_user_serialize( + self, + group, + add_group_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_group_user_request is not None: + _body_params = add_group_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/groups/{group}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_group( + self, + group_creation: GroupCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Create a new group + + Create a group of the given type, tied to a classroom, optionally with initial members. + + :param group_creation: (required) + :type group_creation: GroupCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_group_serialize( + group_creation=group_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_group_with_http_info( + self, + group_creation: GroupCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Create a new group + + Create a group of the given type, tied to a classroom, optionally with initial members. + + :param group_creation: (required) + :type group_creation: GroupCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_group_serialize( + group_creation=group_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_group_without_preload_content( + self, + group_creation: GroupCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new group + + Create a group of the given type, tied to a classroom, optionally with initial members. + + :param group_creation: (required) + :type group_creation: GroupCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_group_serialize( + group_creation=group_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_group_serialize( + self, + group_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if group_creation is not None: + _body_params = group_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/groups', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_group( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a group + + Delete a group. Only available to teachers of the classroom. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_group_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a group + + Delete a group. Only available to teachers of the classroom. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_group_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a group + + Delete a group. Only available to teachers of the classroom. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_group_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_group_serialize( + self, + group, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_group_details( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_group_details_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_group_details_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_details_serialize( + self, + group, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_group_scores( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_group_scores_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_group_scores_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_scores_serialize( + self, + group, + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_group_users( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserPublic]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_group_users_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserPublic]]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_group_users_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_group_users_serialize( + self, + group, + source, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if source is not None: + + _query_params.append(('source', source)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_groups( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GroupDetails]: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_groups_with_http_info( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GroupDetails]]: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_groups_without_preload_content( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_groups_serialize( + self, + type, + classroom, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if classroom is not None: + + _query_params.append(('classroom', classroom)) + + if assignment is not None: + + _query_params.append(('assignment', assignment)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def remove_group_user( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def remove_group_user_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def remove_group_user_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_group_user_serialize( + self, + group, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/groups/{group}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def rename_group( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def rename_group_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def rename_group_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _rename_group_serialize( + self, + group, + rename_group_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if rename_group_request is not None: + _body_params = rename_group_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/omr_api.py b/flat_api/aio/api/omr_api.py new file mode 100644 index 0000000..8274555 --- /dev/null +++ b/flat_api/aio/api/omr_api.py @@ -0,0 +1,3646 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from flat_api.aio.models.credit_transaction import CreditTransaction +from flat_api.aio.models.omr_capabilities import OmrCapabilities +from flat_api.aio.models.omr_details_submission import OmrDetailsSubmission +from flat_api.aio.models.omr_job import OmrJob +from flat_api.aio.models.omr_job_creation import OmrJobCreation +from flat_api.aio.models.omr_job_file_upload import OmrJobFileUpload +from flat_api.aio.models.omr_job_file_upload_result import OmrJobFileUploadResult +from flat_api.aio.models.omr_job_status import OmrJobStatus +from flat_api.aio.models.omr_step_name import OmrStepName + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class OMRApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def add_omr_job_file( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJobFileUploadResult: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_omr_job_file_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJobFileUploadResult]: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_omr_job_file_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_omr_job_file_serialize( + self, + job, + omr_job_file_upload, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if omr_job_file_upload is not None: + _body_params = omr_job_file_upload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/files', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def cancel_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def cancel_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def cancel_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_omr_job( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_omr_job_with_http_info( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_omr_job_without_preload_content( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_omr_job_serialize( + self, + omr_job_creation, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if omr_job_creation is not None: + _body_params = omr_job_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/omr/jobs/{job}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_omr_capabilities( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrCapabilities: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_omr_capabilities_with_http_info( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrCapabilities]: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_omr_capabilities_without_preload_content( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_capabilities_serialize( + self, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/capabilities', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_serialize( + self, + job, + wait, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + if wait is not None: + + _query_params.append(('wait', wait)) + + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_omr_job_export( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_omr_job_export_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_omr_job_export_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_export_serialize( + self, + job, + format, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if format is not None: + _path_params['format'] = format + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}/exports/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_omr_job_file( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_omr_job_file_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_omr_job_file_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_file_serialize( + self, + job, + index, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if index is not None: + _path_params['index'] = index + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'image/jpeg', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}/files/{index}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_billing_credits_history( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[CreditTransaction]: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_billing_credits_history_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[CreditTransaction]]: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_billing_credits_history_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_billing_credits_history_serialize( + self, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/billing/credits/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_omr_jobs( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OmrJob]: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_omr_jobs_with_http_info( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OmrJob]]: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_omr_jobs_without_preload_content( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_omr_jobs_serialize( + self, + status, + expired, + limit, + next, + previous, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if status is not None: + + _query_params.append(('status', status.value)) + + if expired is not None: + + _query_params.append(('expired', expired)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def start_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def start_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def start_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def submit_omr_job_step( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def submit_omr_job_step_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def submit_omr_job_step_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _submit_omr_job_step_serialize( + self, + job, + step, + body, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if step is not None: + _path_params['step'] = step.value + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/steps/{step}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/organization_api.py b/flat_api/aio/api/organization_api.py new file mode 100644 index 0000000..3ef50b2 --- /dev/null +++ b/flat_api/aio/api/organization_api.py @@ -0,0 +1,4997 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.api_access_token import ApiAccessToken +from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.aio.models.lti_configuration import LtiConfiguration +from flat_api.aio.models.lti_configuration_create import LtiConfigurationCreate +from flat_api.aio.models.lti_configuration_update import LtiConfigurationUpdate +from flat_api.aio.models.lti_credentials import LtiCredentials +from flat_api.aio.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.aio.models.organization_invitation import OrganizationInvitation +from flat_api.aio.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.aio.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.aio.models.user_admin_update import UserAdminUpdate +from flat_api.aio.models.user_creation import UserCreation +from flat_api.aio.models.user_details_admin import UserDetailsAdmin +from flat_api.aio.models.user_signin_link import UserSigninLink +from flat_api.aio.models.user_signin_link_creation import UserSigninLinkCreation + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class OrganizationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def count_orga_users( + self, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> int: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "int", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def count_orga_users_with_http_info( + self, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[int]: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "int", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def count_orga_users_without_preload_content( + self, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Count the organization users using the provided filters + + + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._count_orga_users_serialize( + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "int", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _count_orga_users_serialize( + self, + role, + q, + group, + no_active_license, + test_accounts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'role': 'multi', + 'group': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if role is not None: + + _query_params.append(('role', role)) + + if q is not None: + + _query_params.append(('q', q)) + + if group is not None: + + _query_params.append(('group', group)) + + if no_active_license is not None: + + _query_params.append(('noActiveLicense', no_active_license)) + + if test_accounts is not None: + + _query_params.append(('testAccounts', test_accounts)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/users/count', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_lti_configuration( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateLtiConfiguration200Response: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_lti_configuration_with_http_info( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateLtiConfiguration200Response]: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_lti_configuration_without_preload_content( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lti_configuration_serialize( + self, + lti_configuration_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if lti_configuration_create is not None: + _body_params = lti_configuration_create + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/lti/configurations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_lti_credentials( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LtiCredentials: + """(Deprecated) Create a new couple of LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_lti_credentials_with_http_info( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LtiCredentials]: + """(Deprecated) Create a new couple of LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_lti_credentials_without_preload_content( + self, + body: LtiCredentialsCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a new couple of LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + + :param body: (required) + :type body: LtiCredentialsCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._create_lti_credentials_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiCredentials", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lti_credentials_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/lti/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_organization_invitation( + self, + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OrganizationInvitation: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_organization_invitation_with_http_info( + self, + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OrganizationInvitation]: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_organization_invitation_without_preload_content( + self, + body: OrganizationInvitationCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new invitation to join the organization + + This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + + :param body: (required) + :type body: OrganizationInvitationCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_invitation_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_invitation_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_organization_user( + self, + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetailsAdmin: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_organization_user_with_http_info( + self, + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetailsAdmin]: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_organization_user_without_preload_content( + self, + body: UserCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new user account + + + :param body: (required) + :type body: UserCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_organization_user_access_token( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiAccessToken: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_organization_user_access_token_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiAccessToken]: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_organization_user_access_token_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + organization_user_access_token_creation: OrganizationUserAccessTokenCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a delegated API access token for an organization user + + This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user. + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param organization_user_access_token_creation: (required) + :type organization_user_access_token_creation: OrganizationUserAccessTokenCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_access_token_serialize( + user=user, + organization_user_access_token_creation=organization_user_access_token_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiAccessToken", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_access_token_serialize( + self, + user, + organization_user_access_token_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if organization_user_access_token_creation is not None: + _body_params = organization_user_access_token_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users/{user}/accessToken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_organization_user_signin_link( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserSigninLink: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_organization_user_signin_link_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserSigninLink]: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_organization_user_signin_link_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + user_signin_link_creation: UserSigninLinkCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a sign in link for an organization user + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param user_signin_link_creation: (required) + :type user_signin_link_creation: UserSigninLinkCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_user_signin_link_serialize( + user=user, + user_signin_link_creation=user_signin_link_creation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSigninLink", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_user_signin_link_serialize( + self, + user, + user_signin_link_creation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_signin_link_creation is not None: + _body_params = user_signin_link_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/users/{user}/signinLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_lti_configuration( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_lti_configuration_with_http_info( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_lti_configuration_without_preload_content( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_lti_configuration_serialize( + self, + configuration, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if configuration is not None: + _path_params['configuration'] = configuration + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/lti/configurations/{configuration}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_lti_configurations( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LtiConfiguration]: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_lti_configurations_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LtiConfiguration]]: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_lti_configurations_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_lti_configurations_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/lti/configurations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_lti_credentials( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LtiCredentials]: + """(Deprecated) List LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_lti_credentials_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LtiCredentials]]: + """(Deprecated) List LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_lti_credentials_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) + + _param = self._list_lti_credentials_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiCredentials]", + '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_lti_credentials_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/lti/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_organization_invitations( + self, + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OrganizationInvitation]: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_organization_invitations_with_http_info( + self, + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OrganizationInvitation]]: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_organization_invitations_without_preload_content( + self, + role: Annotated[Optional[StrictStr], Field(description="Filter users by role")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the organization invitations + + + :param role: Filter users by role + :type role: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_invitations_serialize( + role=role, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_invitations_serialize( + self, + role, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if role is not None: + + _query_params.append(('role', role)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/invitations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_organization_users( + self, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserDetailsAdmin]: + """List the organization users + + + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_organization_users_with_http_info( + self, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserDetailsAdmin]]: + """List the organization users + + + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_organization_users_without_preload_content( + self, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + role: Annotated[Optional[List[StrictStr]], Field(description="Filter users by role")] = None, + q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, + group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, + no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, + license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, + only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the organization users + + + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str + :param direction: Sort direction + :type direction: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param role: Filter users by role + :type role: List[str] + :param q: The query to search + :type q: str + :param group: Filter users by group + :type group: List[str] + :param no_active_license: Filter users who don't have an active license + :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str + :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` + :type license_expiration_date: List[str] + :param only_ids: Return only user ids + :type only_ids: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_users_serialize( + sort=sort, + direction=direction, + next=next, + previous=previous, + role=role, + q=q, + group=group, + no_active_license=no_active_license, + test_accounts=test_accounts, + license_expiration_date=license_expiration_date, + only_ids=only_ids, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_users_serialize( + self, + sort, + direction, + next, + previous, + role, + q, + group, + no_active_license, + test_accounts, + license_expiration_date, + only_ids, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'role': 'multi', + 'group': 'multi', + 'licenseExpirationDate': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if role is not None: + + _query_params.append(('role', role)) + + if q is not None: + + _query_params.append(('q', q)) + + if group is not None: + + _query_params.append(('group', group)) + + if no_active_license is not None: + + _query_params.append(('noActiveLicense', no_active_license)) + + if test_accounts is not None: + + _query_params.append(('testAccounts', test_accounts)) + + if license_expiration_date is not None: + + _query_params.append(('licenseExpirationDate', license_expiration_date)) + + if only_ids is not None: + + _query_params.append(('onlyIds', only_ids)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def remove_organization_invitation( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def remove_organization_invitation_with_http_info( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def remove_organization_invitation_without_preload_content( + self, + invitation: Annotated[StrictStr, Field(description="Unique identifier of the invitation")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an organization invitation + + + :param invitation: Unique identifier of the invitation (required) + :type invitation: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_invitation_serialize( + invitation=invitation, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_invitation_serialize( + self, + invitation, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if invitation is not None: + _path_params['invitation'] = invitation + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/invitations/{invitation}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def remove_organization_user( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def remove_organization_user_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def remove_organization_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an account from Flat + + This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information) + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :type convert_to_individual: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_organization_user_serialize( + user=user, + convert_to_individual=convert_to_individual, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_user_serialize( + self, + user, + convert_to_individual, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if convert_to_individual is not None: + + _query_params.append(('convertToIndividual', convert_to_individual)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def revoke_lti_credentials( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Revoke LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def revoke_lti_credentials_with_http_info( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Revoke LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def revoke_lti_credentials_without_preload_content( + self, + credentials: Annotated[StrictStr, Field(description="Credentials unique identifier ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Revoke LTI 1.x credentials + + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. + + :param credentials: Credentials unique identifier (required) + :type credentials: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) + + _param = self._revoke_lti_credentials_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_lti_credentials_serialize( + self, + credentials, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if credentials is not None: + _path_params['credentials'] = credentials + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/lti/credentials/{credentials}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_lti_configuration( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LtiConfiguration: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_lti_configuration_with_http_info( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LtiConfiguration]: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_lti_configuration_without_preload_content( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_lti_configuration_serialize( + self, + configuration, + lti_configuration_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if configuration is not None: + _path_params['configuration'] = configuration + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if lti_configuration_update is not None: + _body_params = lti_configuration_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/organizations/lti/configurations/{configuration}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_organization_user( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDetailsAdmin: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_organization_user_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDetailsAdmin]: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_organization_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], + body: UserAdminUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update account information + + + :param user: Unique identifier of the Flat account (required) + :type user: str + :param body: (required) + :type body: UserAdminUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_user_serialize( + user=user, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_organization_user_serialize( + self, + user, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/organizations/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/score_api.py b/flat_api/aio/api/score_api.py new file mode 100644 index 0000000..879baab --- /dev/null +++ b/flat_api/aio/api/score_api.py @@ -0,0 +1,9310 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from flat_api.aio.models.assignment_submission import AssignmentSubmission +from flat_api.aio.models.resource_collaborator import ResourceCollaborator +from flat_api.aio.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.aio.models.score_comment import ScoreComment +from flat_api.aio.models.score_comment_creation import ScoreCommentCreation +from flat_api.aio.models.score_comment_update import ScoreCommentUpdate +from flat_api.aio.models.score_creation import ScoreCreation +from flat_api.aio.models.score_details import ScoreDetails +from flat_api.aio.models.score_fork import ScoreFork +from flat_api.aio.models.score_modification import ScoreModification +from flat_api.aio.models.score_revision import ScoreRevision +from flat_api.aio.models.score_revision_creation import ScoreRevisionCreation +from flat_api.aio.models.score_track import ScoreTrack +from flat_api.aio.models.score_track_creation import ScoreTrackCreation +from flat_api.aio.models.score_track_creation_response import ScoreTrackCreationResponse +from flat_api.aio.models.score_track_update import ScoreTrackUpdate +from flat_api.aio.models.task import Task +from flat_api.aio.models.task_export_options import TaskExportOptions + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class ScoreApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def add_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ResourceCollaboratorCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a new collaborator + + Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ResourceCollaboratorCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_collaborator_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_collaborator_serialize( + self, + score, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/collaborators', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def add_score_track( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrackCreationResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def add_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrackCreationResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def add_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreTrackCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a new video or audio track to the score + + Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreTrackCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_score_track_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrackCreationResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_score_track_serialize( + self, + score, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/tracks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_export_task( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_export_task_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_export_task_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file that will be generated or the target service name where the file will be exported")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + body: Optional[TaskExportOptions] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file that will be generated or the target service name where the file will be exported (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param body: + :type body: TaskExportOptions + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_export_task_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_export_task_serialize( + self, + score, + revision, + format, + sharing_key, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + if format is not None: + _path_params['format'] = format + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/revisions/{revision}/{format}/task', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_score( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '202': "Task", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_score_with_http_info( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '202': "Task", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_score_without_preload_content( + self, + body: ScoreCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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}`. + + :param body: (required) + :type body: ScoreCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '202': "Task", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_score_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def create_score_revision( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreRevision: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_score_revision_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreRevision]: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_score_revision_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreRevisionCreation, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new revision + + Update a score by uploading a new revision for this one. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreRevisionCreation + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_score_revision_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_score_revision_serialize( + self, + score, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/revisions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param now: If `true`, the score deletion will be scheduled to be done ASAP + :type now: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_serialize( + score=score, + now=now, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_serialize( + self, + score, + now, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if now is not None: + + _query_params.append(('now', now)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_comment_serialize( + score=score, + comment=comment, + event_properties=event_properties, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_comment_serialize( + self, + score, + comment, + event_properties, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an audio or video track linked to the score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_score_track_serialize( + score=score, + track=track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_score_track_serialize( + self, + score, + track, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def edit_score( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def edit_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def edit_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreModification, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreModification + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_score_serialize( + score=score, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_score_serialize( + self, + score, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def fork_score( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def fork_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def fork_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreFork, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreFork + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._fork_score_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _fork_score_serialize( + self, + score, + body, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/fork', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_group_scores( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_group_scores_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_group_scores_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_scores_serialize( + self, + group, + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a score's metadata + + Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreDetails", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_serialize( + self, + score, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceCollaborator: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResourceCollaborator]: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a collaborator + + Get the information about a collaborator (User or Group). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborator_serialize( + score=score, + collaborator=collaborator, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceCollaborator", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_collaborator_serialize( + self, + score, + collaborator, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if collaborator is not None: + _path_params['collaborator'] = collaborator + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/collaborators/{collaborator}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_collaborators( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_collaborators_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_collaborators_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the collaborators + + This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated). + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_collaborators_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ResourceCollaborator]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_collaborators_serialize( + self, + score, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/collaborators', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_comments( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreComment]: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + type=type, + sort=sort, + direction=direction, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_comments_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreComment]]: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + type=type, + sort=sort, + direction=direction, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_comments_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List comments + + This method lists the different comments added on a music score (documents and inline) sorted by their post dates. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param type: Filter the comments by type + :type type: str + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_comments_serialize( + score=score, + type=type, + sort=sort, + direction=direction, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreComment]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_comments_serialize( + self, + score, + type, + sort, + direction, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_revision( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_revision_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_revision_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a score revision + + When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_serialize( + score=score, + revision=revision, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreRevision", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revision_serialize( + self, + score, + revision, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions/{revision}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_revision_data( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_revision_data_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_revision_data_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], + format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, + url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param revision: Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. (required) + :type revision: str + :param format: The format of the file you will retrieve (required) + :type format: str + :param sharing_key: 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 sharing_key: str + :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :type parts: str + :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. + :type default_track: bool + :param url: Returns a json with the `url` in it instead of redirecting + :type url: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revision_data_serialize( + score=score, + revision=revision, + format=format, + sharing_key=sharing_key, + parts=parts, + default_track=default_track, + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revision_data_serialize( + self, + score, + revision, + format, + sharing_key, + parts, + default_track, + url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if revision is not None: + _path_params['revision'] = revision + if format is not None: + _path_params['format'] = format + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if parts is not None: + + _query_params.append(('parts', parts)) + + if default_track is not None: + + _query_params.append(('defaultTrack', default_track)) + + if url is not None: + + _query_params.append(('url', url)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.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' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions/{revision}/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_revisions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_revisions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_revisions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List the revisions + + When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_revisions_serialize( + score=score, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreRevision]", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_revisions_serialize( + self, + score, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/revisions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_submissions( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_submissions_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_submissions_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List submissions related to the score + + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_submissions_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_submissions_serialize( + self, + score, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/submissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreTrack: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreTrack]: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve the details of an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_score_track_serialize( + score=score, + track=track, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_score_track_serialize( + self, + score, + track, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_user_likes( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_likes_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_likes_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_likes_serialize( + self, + user, + next, + previous, + limit, + ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if ids is not None: + + _query_params.append(('ids', ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/likes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_user_scores( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_scores_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_scores_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_scores_serialize( + self, + user, + paginate, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if paginate is not None: + + _query_params.append(('paginate', paginate)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_score_tracks( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_score_tracks_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_score_tracks_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param sharing_key: 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 sharing_key: str + :param assignment: An assignment id with which all the tracks returned will be related to + :type assignment: str + :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :type list_auto_track: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_score_tracks_serialize( + score=score, + sharing_key=sharing_key, + assignment=assignment, + list_auto_track=list_auto_track, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreTrack]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_score_tracks_serialize( + self, + score, + sharing_key, + assignment, + list_auto_track, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + if assignment is not None: + + _query_params.append(('assignment', assignment)) + + if list_auto_track is not None: + + _query_params.append(('listAutoTrack', list_auto_track)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/scores/{score}/tracks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def mark_score_comment_resolved( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def mark_score_comment_resolved_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def mark_score_comment_resolved_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Mark the comment as resolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_resolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _mark_score_comment_resolved_serialize( + self, + score, + comment, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/comments/{comment}/resolved', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def mark_score_comment_unresolved( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def mark_score_comment_unresolved_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def mark_score_comment_unresolved_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Mark the comment as unresolved + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._mark_score_comment_unresolved_serialize( + score=score, + comment=comment, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _mark_score_comment_unresolved_serialize( + self, + score, + comment, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/comments/{comment}/resolved', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def post_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> 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`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def post_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[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`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def post_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: ScoreCommentCreation, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Post a new comment + + Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param body: (required) + :type body: ScoreCommentCreation + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_score_comment_serialize( + score=score, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_score_comment_serialize( + self, + score, + body, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def remove_score_collaborator( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + event_properties=event_properties, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def remove_score_collaborator_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + event_properties=event_properties, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def remove_score_collaborator_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a collaborator + + Remove the specified collaborator from the score + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) + :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_score_collaborator_serialize( + score=score, + collaborator=collaborator, + event_properties=event_properties, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_score_collaborator_serialize( + self, + score, + collaborator, + event_properties, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if collaborator is not None: + _path_params['collaborator'] = collaborator + # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/scores/{score}/collaborators/{collaborator}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def untrash_score( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def untrash_score_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def untrash_score_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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`). ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Untrash a score + + This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections. + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._untrash_score_serialize( + score=score, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _untrash_score_serialize( + self, + score, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/scores/{score}/untrash', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_score_comment( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreComment: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_score_comment_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreComment]: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_score_comment_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + body: ScoreCommentUpdate, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an existing comment + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param comment: Unique identifier of a sheet music comment (required) + :type comment: str + :param body: (required) + :type body: ScoreCommentUpdate + :param sharing_key: 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 sharing_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_comment_serialize( + score=score, + comment=comment, + body=body, + sharing_key=sharing_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreComment", + '402': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_score_comment_serialize( + self, + score, + comment, + body, + sharing_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if comment is not None: + _path_params['comment'] = comment + # process the query parameters + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/comments/{comment}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def update_score_track( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ScoreTrack: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def update_score_track_with_http_info( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScoreTrack]: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def update_score_track_without_preload_content( + self, + score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a score audio track ")], + body: ScoreTrackUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an audio or video track linked to a score + + + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str + :param track: Unique identifier of a score audio track (required) + :type track: str + :param body: (required) + :type body: ScoreTrackUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_score_track_serialize( + score=score, + track=track, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScoreTrack", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_score_track_serialize( + self, + score, + track, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if score is not None: + _path_params['score'] = score + if track is not None: + _path_params['track'] = track + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/scores/{score}/tracks/{track}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/task_api.py b/flat_api/aio/api/task_api.py new file mode 100644 index 0000000..640f7bb --- /dev/null +++ b/flat_api/aio/api/task_api.py @@ -0,0 +1,302 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from flat_api.aio.models.task import Task + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class TaskApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def get_task( + self, + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Task: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_task_with_http_info( + self, + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Task]: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_task_without_preload_content( + self, + task: Annotated[StrictStr, Field(description="Unique identifier for the task")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a task details + + This method can be used to follow a task progression, for example while a score is being exported. + + :param task: Unique identifier for the task (required) + :type task: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_task_serialize( + task=task, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Task", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_task_serialize( + self, + task, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task is not None: + _path_params['task'] = task + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/tasks/{task}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api/user_api.py b/flat_api/aio/api/user_api.py new file mode 100644 index 0000000..9113164 --- /dev/null +++ b/flat_api/aio/api/user_api.py @@ -0,0 +1,999 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.score_details import ScoreDetails +from flat_api.aio.models.user_public import UserPublic + +from flat_api.aio.api_client import ApiClient, RequestSerialized +from flat_api.aio.api_response import ApiResponse +from flat_api.aio.rest import RESTResponseType + + +class UserApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def get_user( + self, + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserPublic: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_with_http_info( + self, + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserPublic]: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a public user profile + + Get a profile of a Flat or Flat for Education User. + + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserPublic", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_serialize( + self, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_user_likes( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_likes_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_likes_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + ids: Annotated[Optional[StrictBool], Field(description="Return only the identifiers of the scores")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List liked scores + + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param ids: Return only the identifiers of the scores + :type ids: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_likes_serialize( + user=user, + next=next, + previous=previous, + limit=limit, + ids=ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_likes_serialize( + self, + user, + next, + previous, + limit, + ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if ids is not None: + + _query_params.append(('ids', ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/likes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_user_scores( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_user_scores_with_http_info( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_user_scores_without_preload_content( + self, + user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + + :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) + :type user: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_scores_serialize( + user=user, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_scores_serialize( + self, + user, + paginate, + sort, + direction, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user is not None: + _path_params['user'] = user + # process the query parameters + if paginate is not None: + + _query_params.append(('paginate', paginate)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/aio/api_client.py b/flat_api/aio/api_client.py new file mode 100644 index 0000000..f1bfeb1 --- /dev/null +++ b/flat_api/aio/api_client.py @@ -0,0 +1,823 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile +import uuid + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from flat_api.aio.configuration import Configuration +from flat_api.aio.api_response import ApiResponse, T as ApiResponseT +import flat_api.aio.models +from flat_api.aio import rest +from flat_api.aio.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/2.0.0/python' + self.client_side_validation = configuration.client_side_validation + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_value, traceback): + await self.close() + + async def close(self): + await self.rest_client.close() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + async def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = await self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] + + # deserialize response data + response_text = None + return_data = None + try: + if response_type in ("bytearray", "bytes"): + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.headers.get('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, uuid.UUID): + return str(obj) + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + elif isinstance(obj, dict): + return { + key: self.sanitize_for_serialization(val) + for key, val in obj.items() + } + + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return self.sanitize_for_serialization(obj_dict) + + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(flat_api.aio.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass is object: + return self.__deserialize_object(data) + elif klass is datetime.date: + return self.__deserialize_date(data) + elif klass is datetime.datetime: + return self.__deserialize_datetime(data) + elif klass is decimal.Decimal: + return decimal.Decimal(data) + elif klass is uuid.UUID: + return uuid.UUID(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + if not 'Cookie' in headers: + headers['Cookie'] = "" + else: + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.headers.get("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = os.path.basename(m.group(1)) # Strip any directory traversal + if filename in ("", ".", ".."): # fall back to tmp filename + filename = os.path.basename(path) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/flat_api/aio/api_response.py b/flat_api/aio/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/flat_api/aio/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/flat_api/aio/configuration.py b/flat_api/aio/configuration.py new file mode 100644 index 0000000..465523f --- /dev/null +++ b/flat_api/aio/configuration.py @@ -0,0 +1,627 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import aiohttp +import aiohttp_retry +import base64 +import copy +import http.client as httplib +import logging +from logging import FileHandler +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "OAuth2": OAuth2AuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: int | aiohttp_retry.RetryOptionsBase - Retry configuration. + :param trace_configs: list of aiohttp.TraceConfig instances forwarded to + aiohttp.ClientSession for tracing/instrumentation (e.g. OpenTelemetry). + :param tcp_connector_limit_per_host: Per-host concurrency cap forwarded to + aiohttp.TCPConnector(limit_per_host=...). None leaves aiohttp's default (0 = unlimited). + :param client_session_kwargs: Extra keyword arguments merged into + aiohttp.ClientSession(**kwargs) (e.g. json_serialize=orjson.dumps, + cookie_jar=aiohttp.DummyCookieJar()). + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[Union[int, aiohttp_retry.RetryOptionsBase]] = None, + trace_configs: Optional[List[aiohttp.TraceConfig]] = None, + tcp_connector_limit_per_host: Optional[int] = None, + client_session_kwargs: Optional[Dict[str, Any]] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.flat.io/v2" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("flat_api_async") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = verify_ssl + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file + """client certificate file + """ + self.key_file = key_file + """client key file + """ + self.assert_hostname = assert_hostname + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = tls_server_name + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100 + """This value is passed to the aiohttp to limit simultaneous connections. + None in the constructor is coerced to default 100. + """ + + self.proxy = proxy + """Proxy URL + """ + self.proxy_headers = proxy_headers + """Proxy headers + """ + self.safe_chars_for_path_param = safe_chars_for_path_param + """Safe chars for path_param + """ + self.retries = retries + """Retry configuration + """ + self.trace_configs = trace_configs + """aiohttp.TraceConfig list forwarded to ClientSession for tracing. + """ + self.tcp_connector_limit_per_host = tcp_connector_limit_per_host + """Per-host concurrency cap forwarded to TCPConnector. + """ + self.client_session_kwargs = client_session_kwargs + """Extra kwargs merged into aiohttp.ClientSession(**kwargs). + + """ + # Enable client side validation + self.client_side_validation = client_side_validation + + self.socket_options = socket_options + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = datetime_format + """datetime format + """ + + self.date_format = date_format + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setter to re-create the file handler (excluded from __dict__ copy) + result.logger_file = self.logger_file + + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get( + identifier, self.api_key_prefix.get(alias) if alias is not None else None) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + + return "Basic " + base64.b64encode( + (username + ":" + password).encode('utf-8') + ).decode('utf-8') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['OAuth2'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 2.26.0\n"\ + "SDK Package Version: 2.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.flat.io/v2", + 'description': "No description provided", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and variable['enum_values'] \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/flat_api/aio/exceptions.py b/flat_api/aio/exceptions.py new file mode 100644 index 0000000..005a786 --- /dev/null +++ b/flat_api/aio/exceptions.py @@ -0,0 +1,219 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.headers + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + if self.data: + error_message += "HTTP response data: {0}\n".format(self.data) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/flat_api/aio/models/__init__.py b/flat_api/aio/models/__init__.py new file mode 100644 index 0000000..153edd0 --- /dev/null +++ b/flat_api/aio/models/__init__.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +# flake8: noqa +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +# import models into model package +from flat_api.aio.models.add_group_user200_response import AddGroupUser200Response +from flat_api.aio.models.add_group_user_request import AddGroupUserRequest +from flat_api.aio.models.api_access_token import ApiAccessToken +from flat_api.aio.models.app_scopes import AppScopes +from flat_api.aio.models.assignment import Assignment +from flat_api.aio.models.assignment_capabilities import AssignmentCapabilities +from flat_api.aio.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError +from flat_api.aio.models.assignment_copy import AssignmentCopy +from flat_api.aio.models.assignment_copy_response import AssignmentCopyResponse +from flat_api.aio.models.assignment_copy_to_class import AssignmentCopyToClass +from flat_api.aio.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary +from flat_api.aio.models.assignment_group import AssignmentGroup +from flat_api.aio.models.assignment_submission import AssignmentSubmission +from flat_api.aio.models.assignment_submission_comment import AssignmentSubmissionComment +from flat_api.aio.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation +from flat_api.aio.models.assignment_submission_comments import AssignmentSubmissionComments +from flat_api.aio.models.assignment_submission_history import AssignmentSubmissionHistory +from flat_api.aio.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.aio.models.assignment_submission_history_state import AssignmentSubmissionHistoryState +from flat_api.aio.models.assignment_submission_lti import AssignmentSubmissionLti +from flat_api.aio.models.assignment_submission_playback import AssignmentSubmissionPlayback +from flat_api.aio.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_submission_update import AssignmentSubmissionUpdate +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.assignment_update import AssignmentUpdate +from flat_api.aio.models.class_assignment import ClassAssignment +from flat_api.aio.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas +from flat_api.aio.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti +from flat_api.aio.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc +from flat_api.aio.models.class_assignment_update import ClassAssignmentUpdate +from flat_api.aio.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.aio.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph +from flat_api.aio.models.class_attachment_creation import ClassAttachmentCreation +from flat_api.aio.models.class_creation import ClassCreation +from flat_api.aio.models.class_details import ClassDetails +from flat_api.aio.models.class_details_canvas import ClassDetailsCanvas +from flat_api.aio.models.class_details_clever import ClassDetailsClever +from flat_api.aio.models.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.aio.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.aio.models.class_details_issues import ClassDetailsIssues +from flat_api.aio.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from flat_api.aio.models.class_details_lti import ClassDetailsLti +from flat_api.aio.models.class_details_mfc import ClassDetailsMfc +from flat_api.aio.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.aio.models.class_grade_level import ClassGradeLevel +from flat_api.aio.models.class_roles import ClassRoles +from flat_api.aio.models.class_state import ClassState +from flat_api.aio.models.class_update import ClassUpdate +from flat_api.aio.models.collection import Collection +from flat_api.aio.models.collection_app import CollectionApp +from flat_api.aio.models.collection_capabilities import CollectionCapabilities +from flat_api.aio.models.collection_contents import CollectionContents +from flat_api.aio.models.collection_creation import CollectionCreation +from flat_api.aio.models.collection_modification import CollectionModification +from flat_api.aio.models.collection_privacy import CollectionPrivacy +from flat_api.aio.models.collection_type import CollectionType +from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.aio.models.credit_transaction import CreditTransaction +from flat_api.aio.models.edu_library import EduLibrary +from flat_api.aio.models.edu_resource import EduResource +from flat_api.aio.models.edu_resource_assignment_creation import EduResourceAssignmentCreation +from flat_api.aio.models.edu_resource_capabilities import EduResourceCapabilities +from flat_api.aio.models.edu_resource_copy import EduResourceCopy +from flat_api.aio.models.edu_resource_creation import EduResourceCreation +from flat_api.aio.models.edu_resource_folder import EduResourceFolder +from flat_api.aio.models.edu_resource_lti_link import EduResourceLtiLink +from flat_api.aio.models.edu_resource_move import EduResourceMove +from flat_api.aio.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.aio.models.edu_resource_resource import EduResourceResource +from flat_api.aio.models.edu_resource_type import EduResourceType +from flat_api.aio.models.edu_resource_update import EduResourceUpdate +from flat_api.aio.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.aio.models.flat_error_response import FlatErrorResponse +from flat_api.aio.models.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.aio.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.aio.models.grade import Grade +from flat_api.aio.models.group import Group +from flat_api.aio.models.group_creation import GroupCreation +from flat_api.aio.models.group_details import GroupDetails +from flat_api.aio.models.group_type import GroupType +from flat_api.aio.models.license_mode import LicenseMode +from flat_api.aio.models.license_sources import LicenseSources +from flat_api.aio.models.lms_name import LmsName +from flat_api.aio.models.lti_configuration import LtiConfiguration +from flat_api.aio.models.lti_configuration1p1 import LtiConfiguration1p1 +from flat_api.aio.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool +from flat_api.aio.models.lti_configuration1p3 import LtiConfiguration1p3 +from flat_api.aio.models.lti_configuration1p3_base import LtiConfiguration1p3Base +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.aio.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.aio.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from flat_api.aio.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment +from flat_api.aio.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic +from flat_api.aio.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual +from flat_api.aio.models.lti_configuration_base import LtiConfigurationBase +from flat_api.aio.models.lti_configuration_create import LtiConfigurationCreate +from flat_api.aio.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 +from flat_api.aio.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment +from flat_api.aio.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic +from flat_api.aio.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo +from flat_api.aio.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual +from flat_api.aio.models.lti_configuration_update import LtiConfigurationUpdate +from flat_api.aio.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment +from flat_api.aio.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone +from flat_api.aio.models.lti_credentials import LtiCredentials +from flat_api.aio.models.lti_credentials_creation import LtiCredentialsCreation +from flat_api.aio.models.media_attachment import MediaAttachment +from flat_api.aio.models.media_score_sharing_mode import MediaScoreSharingMode +from flat_api.aio.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from flat_api.aio.models.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api.aio.models.omr_capabilities import OmrCapabilities +from flat_api.aio.models.omr_details_step_data import OmrDetailsStepData +from flat_api.aio.models.omr_details_submission import OmrDetailsSubmission +from flat_api.aio.models.omr_detected_instrument import OmrDetectedInstrument +from flat_api.aio.models.omr_imported_metadata import OmrImportedMetadata +from flat_api.aio.models.omr_instrument_override import OmrInstrumentOverride +from flat_api.aio.models.omr_job import OmrJob +from flat_api.aio.models.omr_job_creation import OmrJobCreation +from flat_api.aio.models.omr_job_file_metadata import OmrJobFileMetadata +from flat_api.aio.models.omr_job_file_upload import OmrJobFileUpload +from flat_api.aio.models.omr_job_file_upload_result import OmrJobFileUploadResult +from flat_api.aio.models.omr_job_input_file import OmrJobInputFile +from flat_api.aio.models.omr_job_output import OmrJobOutput +from flat_api.aio.models.omr_job_progress import OmrJobProgress +from flat_api.aio.models.omr_job_result import OmrJobResult +from flat_api.aio.models.omr_job_retention import OmrJobRetention +from flat_api.aio.models.omr_job_status import OmrJobStatus +from flat_api.aio.models.omr_locale_details import OmrLocaleDetails +from flat_api.aio.models.omr_pending_step import OmrPendingStep +from flat_api.aio.models.omr_step_name import OmrStepName +from flat_api.aio.models.organization_invitation import OrganizationInvitation +from flat_api.aio.models.organization_invitation_creation import OrganizationInvitationCreation +from flat_api.aio.models.organization_roles import OrganizationRoles +from flat_api.aio.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.aio.models.rename_group_request import RenameGroupRequest +from flat_api.aio.models.resource_collaborator import ResourceCollaborator +from flat_api.aio.models.resource_collaborator_creation import ResourceCollaboratorCreation +from flat_api.aio.models.resource_rights import ResourceRights +from flat_api.aio.models.score_comment import ScoreComment +from flat_api.aio.models.score_comment_context import ScoreCommentContext +from flat_api.aio.models.score_comment_creation import ScoreCommentCreation +from flat_api.aio.models.score_comment_moderation import ScoreCommentModeration +from flat_api.aio.models.score_comment_update import ScoreCommentUpdate +from flat_api.aio.models.score_comments_counts import ScoreCommentsCounts +from flat_api.aio.models.score_creation import ScoreCreation +from flat_api.aio.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from flat_api.aio.models.score_creation_common import ScoreCreationCommon +from flat_api.aio.models.score_creation_file_import import ScoreCreationFileImport +from flat_api.aio.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport +from flat_api.aio.models.score_creation_type import ScoreCreationType +from flat_api.aio.models.score_details import ScoreDetails +from flat_api.aio.models.score_details_all_of_me import ScoreDetailsAllOfMe +from flat_api.aio.models.score_fork import ScoreFork +from flat_api.aio.models.score_license import ScoreLicense +from flat_api.aio.models.score_likes_counts import ScoreLikesCounts +from flat_api.aio.models.score_modification import ScoreModification +from flat_api.aio.models.score_plays_counts import ScorePlaysCounts +from flat_api.aio.models.score_privacy import ScorePrivacy +from flat_api.aio.models.score_revision import ScoreRevision +from flat_api.aio.models.score_revision_creation import ScoreRevisionCreation +from flat_api.aio.models.score_revision_statistics import ScoreRevisionStatistics +from flat_api.aio.models.score_source import ScoreSource +from flat_api.aio.models.score_summary import ScoreSummary +from flat_api.aio.models.score_track import ScoreTrack +from flat_api.aio.models.score_track_creation import ScoreTrackCreation +from flat_api.aio.models.score_track_creation_response import ScoreTrackCreationResponse +from flat_api.aio.models.score_track_point import ScoreTrackPoint +from flat_api.aio.models.score_track_purpose import ScoreTrackPurpose +from flat_api.aio.models.score_track_state import ScoreTrackState +from flat_api.aio.models.score_track_type import ScoreTrackType +from flat_api.aio.models.score_track_update import ScoreTrackUpdate +from flat_api.aio.models.score_views_counts import ScoreViewsCounts +from flat_api.aio.models.task import Task +from flat_api.aio.models.task_export_options import TaskExportOptions +from flat_api.aio.models.task_progress import TaskProgress +from flat_api.aio.models.task_result import TaskResult +from flat_api.aio.models.teaching_theme import TeachingTheme +from flat_api.aio.models.tutteo_product import TutteoProduct +from flat_api.aio.models.user_admin_update import UserAdminUpdate +from flat_api.aio.models.user_azure_details import UserAzureDetails +from flat_api.aio.models.user_basics import UserBasics +from flat_api.aio.models.user_community_profile_links import UserCommunityProfileLinks +from flat_api.aio.models.user_creation import UserCreation +from flat_api.aio.models.user_details import UserDetails +from flat_api.aio.models.user_details_admin import UserDetailsAdmin +from flat_api.aio.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense +from flat_api.aio.models.user_public import UserPublic +from flat_api.aio.models.user_public_summary import UserPublicSummary +from flat_api.aio.models.user_signin_link import UserSigninLink +from flat_api.aio.models.user_signin_link_creation import UserSigninLinkCreation + diff --git a/flat_api/aio/models/add_group_user200_response.py b/flat_api/aio/models/add_group_user200_response.py new file mode 100644 index 0000000..a1ec49e --- /dev/null +++ b/flat_api/aio/models/add_group_user200_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AddGroupUser200Response(BaseModel): + """ + AddGroupUser200Response + """ # noqa: E501 + user: Optional[StrictStr] = Field(default=None, description="User ID that was added") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGroupUser200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGroupUser200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/add_group_user_request.py b/flat_api/aio/models/add_group_user_request.py new file mode 100644 index 0000000..b9ddd17 --- /dev/null +++ b/flat_api/aio/models/add_group_user_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AddGroupUserRequest(BaseModel): + """ + AddGroupUserRequest + """ # noqa: E501 + user: StrictStr = Field(description="ID of the student to add") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGroupUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGroupUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/api_access_token.py b/flat_api/aio/models/api_access_token.py new file mode 100644 index 0000000..2372074 --- /dev/null +++ b/flat_api/aio/models/api_access_token.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.app_scopes import AppScopes +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ApiAccessToken(BaseModel): + """ + An API access token + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of this private token") + name: Optional[StrictStr] = Field(default=None, description="Name of the personal access token") + token: Optional[StrictStr] = Field(default=None, description="The token. This token will only be returned once, then only the first 4 characters will be returned. ") + issued_date: Optional[datetime] = Field(default=None, description="The date then this token was issued ", alias="issuedDate") + expiration_date: Optional[datetime] = Field(default=None, description="The date then this token will expire ", alias="expirationDate") + scopes: Optional[List[AppScopes]] = Field(default=None, description="The list of scopes associated to the token ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "token", "issuedDate", "expirationDate", "scopes"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAccessToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAccessToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "token": obj.get("token"), + "issuedDate": obj.get("issuedDate"), + "expirationDate": obj.get("expirationDate"), + "scopes": obj.get("scopes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/app_scopes.py b/flat_api/aio/models/app_scopes.py new file mode 100644 index 0000000..412161a --- /dev/null +++ b/flat_api/aio/models/app_scopes.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AppScopes(str, Enum): + """ + Available scopes + """ + + """ + allowed enum values + """ + ACCOUNT_DOT_PUBLIC_PROFILE = 'account.public_profile' + ACCOUNT_DOT_EMAIL = 'account.email' + ACCOUNT_DOT_EDUCATION_PROFILE = 'account.education_profile' + SCORES_DOT_READONLY = 'scores.readonly' + SCORES_DOT_SOCIAL = 'scores.social' + SCORES = 'scores' + COLLECTIONS_DOT_READONLY = 'collections.readonly' + COLLECTIONS_DOT_ADD_SCORES = 'collections.add_scores' + COLLECTIONS = 'collections' + NOTIFICATIONS_DOT_READONLY = 'notifications.readonly' + EDU_DOT_RESOURCES = 'edu.resources' + EDU_DOT_RESOURCES_DOT_READONLY = 'edu.resources.readonly' + EDU_DOT_CLASSES = 'edu.classes' + EDU_DOT_CLASSES_DOT_READONLY = 'edu.classes.readonly' + EDU_DOT_ASSIGNMENTS = 'edu.assignments' + EDU_DOT_ASSIGNMENTS_DOT_READONLY = 'edu.assignments.readonly' + EDU_DOT_ADMIN = 'edu.admin' + EDU_DOT_ADMIN_DOT_LTI = 'edu.admin.lti' + EDU_DOT_ADMIN_DOT_LTI_DOT_READONLY = 'edu.admin.lti.readonly' + EDU_DOT_ADMIN_DOT_USERS = 'edu.admin.users' + EDU_DOT_ADMIN_DOT_USERS_DOT_READONLY = 'edu.admin.users.readonly' + TASKS_DOT_READONLY = 'tasks.readonly' + OMR = 'omr' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppScopes from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/assignment.py b/flat_api/aio/models/assignment.py new file mode 100644 index 0000000..a5ea9de --- /dev/null +++ b/flat_api/aio/models/assignment.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_capabilities import AssignmentCapabilities +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.media_attachment import MediaAttachment +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Assignment(BaseModel): + """ + Assignment details + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Assignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_capabilities.py b/flat_api/aio/models/assignment_capabilities.py new file mode 100644 index 0000000..fd54a61 --- /dev/null +++ b/flat_api/aio/models/assignment_capabilities.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCapabilities(BaseModel): + """ + Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. + """ # noqa: E501 + can_edit: StrictBool = Field(description="Whether the current user can edit the assignment ", alias="canEdit") + can_publish_in_class: StrictBool = Field(description="Whether this assignment can be published in a class ", alias="canPublishInClass") + can_publish_in_class_error: Optional[AssignmentCapabilitiesCanPublishInClassError] = Field(default=None, alias="canPublishInClassError") + can_archive: StrictBool = Field(description="Whether the current user can archive the assignment ", alias="canArchive") + can_unarchive: StrictBool = Field(description="Whether the current user can unarchive the assignment ", alias="canUnarchive") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of can_publish_in_class_error + if self.can_publish_in_class_error: + _dict['canPublishInClassError'] = self.can_publish_in_class_error.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canPublishInClass": obj.get("canPublishInClass"), + "canPublishInClassError": AssignmentCapabilitiesCanPublishInClassError.from_dict(obj["canPublishInClassError"]) if obj.get("canPublishInClassError") is not None else None, + "canArchive": obj.get("canArchive"), + "canUnarchive": obj.get("canUnarchive") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py b/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py new file mode 100644 index 0000000..90571c7 --- /dev/null +++ b/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCapabilitiesCanPublishInClassError(BaseModel): + """ + If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + """ # noqa: E501 + code: StrictStr = Field(description="A corresponding code for this error") + message: StrictStr = Field(description="A printable and localized message for this error") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCapabilitiesCanPublishInClassError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCapabilitiesCanPublishInClassError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_copy.py b/flat_api/aio/models/assignment_copy.py new file mode 100644 index 0000000..b7e5247 --- /dev/null +++ b/flat_api/aio/models/assignment_copy.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.assignment_copy_to_class import AssignmentCopyToClass +from flat_api.aio.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ASSIGNMENTCOPY_ONE_OF_SCHEMAS = ["AssignmentCopyToClass", "AssignmentCopyToResourceLibrary"] + +class AssignmentCopy(BaseModel): + """ + AssignmentCopy + """ + # data type: AssignmentCopyToClass + oneof_schema_1_validator: Optional[AssignmentCopyToClass] = None + # data type: AssignmentCopyToResourceLibrary + oneof_schema_2_validator: Optional[AssignmentCopyToResourceLibrary] = None + actual_instance: Optional[Union[AssignmentCopyToClass, AssignmentCopyToResourceLibrary]] = None + one_of_schemas: Set[str] = { "AssignmentCopyToClass", "AssignmentCopyToResourceLibrary" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AssignmentCopy.model_construct() + error_messages = [] + match = 0 + # validate data type: AssignmentCopyToClass + if not isinstance(v, AssignmentCopyToClass): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssignmentCopyToClass`") + else: + match += 1 + # validate data type: AssignmentCopyToResourceLibrary + if not isinstance(v, AssignmentCopyToResourceLibrary): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssignmentCopyToResourceLibrary`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AssignmentCopyToClass + try: + instance.actual_instance = AssignmentCopyToClass.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssignmentCopyToResourceLibrary + try: + instance.actual_instance = AssignmentCopyToResourceLibrary.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AssignmentCopyToClass, AssignmentCopyToResourceLibrary]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/assignment_copy_response.py b/flat_api/aio/models/assignment_copy_response.py new file mode 100644 index 0000000..43c3e02 --- /dev/null +++ b/flat_api/aio/models/assignment_copy_response.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_capabilities import AssignmentCapabilities +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.media_attachment import MediaAttachment +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCopyResponse(BaseModel): + """ + AssignmentCopyResponse + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + resource: Optional[StrictStr] = Field(default=None, description="If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "resource"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), + "resource": obj.get("resource") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_copy_to_class.py b/flat_api/aio/models/assignment_copy_to_class.py new file mode 100644 index 0000000..f931c0a --- /dev/null +++ b/flat_api/aio/models/assignment_copy_to_class.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCopyToClass(BaseModel): + """ + Copy the assignment to a class + """ # noqa: E501 + classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyToClass from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyToClass from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "scheduledDate": obj.get("scheduledDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_copy_to_resource_library.py b/flat_api/aio/models/assignment_copy_to_resource_library.py new file mode 100644 index 0000000..e3a0e30 --- /dev/null +++ b/flat_api/aio/models/assignment_copy_to_resource_library.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCopyToResourceLibrary(BaseModel): + """ + Copy the assignment to the EDU Resource Library + """ # noqa: E501 + library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") + verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["libraryParent", "verifyIfNotAlreadyInResourceLibrary"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyToResourceLibrary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyToResourceLibrary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "libraryParent": obj.get("libraryParent"), + "verifyIfNotAlreadyInResourceLibrary": obj.get("verifyIfNotAlreadyInResourceLibrary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_group.py b/flat_api/aio/models/assignment_group.py new file mode 100644 index 0000000..d4b3685 --- /dev/null +++ b/flat_api/aio/models/assignment_group.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentGroup(BaseModel): + """ + A group assigned to an assignment for shared writing assignments + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the group") + name: StrictStr = Field(description="The display name of the group") + parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") + members: List[StrictStr] = Field(description="Array of user IDs that are members of this group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "parent", "members"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "parent": obj.get("parent"), + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission.py b/flat_api/aio/models/assignment_submission.py new file mode 100644 index 0000000..d0c1147 --- /dev/null +++ b/flat_api/aio/models/assignment_submission.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_submission_comments import AssignmentSubmissionComments +from flat_api.aio.models.assignment_submission_lti import AssignmentSubmissionLti +from flat_api.aio.models.assignment_submission_playback import AssignmentSubmissionPlayback +from flat_api.aio.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.aio.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.aio.models.media_attachment import MediaAttachment +from flat_api.aio.models.microsoft_graph_submission import MicrosoftGraphSubmission +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmission(BaseModel): + """ + Assignment Submission + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the submission") + state: AssignmentSubmissionState + classroom: StrictStr = Field(description="Unique identifier of the classroom where the assignment was posted ") + assignment: StrictStr = Field(description="Unique identifier of the assignment") + creator: StrictStr = Field(description="The User identifier of the student who created the submission") + creation_date: StrictStr = Field(description="The date when the submission was created", alias="creationDate") + attachments: List[MediaAttachment] + submission_date: Optional[StrictStr] = Field(default=None, description="The date when the student submitted their work", alias="submissionDate") + return_date: Optional[StrictStr] = Field(default=None, description="The date when the teacher returned the work", alias="returnDate") + return_creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the teacher who returned the submission ", alias="returnCreator") + grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set.") + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.", alias="maxPoints") + exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") + playback: List[AssignmentSubmissionPlayback] + comments: AssignmentSubmissionComments + google_classroom: Optional[GoogleClassroomSubmission] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[MicrosoftGraphSubmission] = Field(default=None, alias="microsoftGraph") + lti: Optional[AssignmentSubmissionLti] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "classroom", "assignment", "creator", "creationDate", "attachments", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "playback", "comments", "googleClassroom", "microsoftGraph", "lti"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in playback (list) + _items = [] + if self.playback: + for _item_playback in self.playback: + if _item_playback: + _items.append(_item_playback.to_dict()) + _dict['playback'] = _items + # override the default output from pydantic by calling `to_dict()` of comments + if self.comments: + _dict['comments'] = self.comments.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if grade (nullable) is None + # and model_fields_set contains the field + if self.grade is None and "grade" in self.model_fields_set: + _dict['grade'] = None + + # set to None if draft_grade (nullable) is None + # and model_fields_set contains the field + if self.draft_grade is None and "draft_grade" in self.model_fields_set: + _dict['draftGrade'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "submissionDate": obj.get("submissionDate"), + "returnDate": obj.get("returnDate"), + "returnCreator": obj.get("returnCreator"), + "grade": obj.get("grade"), + "draftGrade": obj.get("draftGrade"), + "maxPoints": obj.get("maxPoints"), + "exercisesIds": obj.get("exercisesIds"), + "playback": [AssignmentSubmissionPlayback.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, + "comments": AssignmentSubmissionComments.from_dict(obj["comments"]) if obj.get("comments") is not None else None, + "googleClassroom": GoogleClassroomSubmission.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": MicrosoftGraphSubmission.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "lti": AssignmentSubmissionLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_comment.py b/flat_api/aio/models/assignment_submission_comment.py new file mode 100644 index 0000000..56983e4 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_comment.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionComment(BaseModel): + """ + Feedback comment added to an assignment submission + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The comment unique identifier") + user: Optional[StrictStr] = Field(default=None, description="The author unique identifier") + submission: Optional[StrictStr] = Field(default=None, description="The submission unique identifier") + var_date: Optional[datetime] = Field(default=None, description="The date when the comment was posted", alias="date") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") + comment: Optional[StrictStr] = Field(default=None, description="The comment text") + unread: Optional[StrictBool] = Field(default=None, description="True if the comment is unread by the current user") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "user", "submission", "date", "modificationDate", "comment", "unread"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user": obj.get("user"), + "submission": obj.get("submission"), + "date": obj.get("date"), + "modificationDate": obj.get("modificationDate"), + "comment": obj.get("comment"), + "unread": obj.get("unread") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_comment_creation.py b/flat_api/aio/models/assignment_submission_comment_creation.py new file mode 100644 index 0000000..f3e3f6f --- /dev/null +++ b/flat_api/aio/models/assignment_submission_comment_creation.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionCommentCreation(BaseModel): + """ + Creation of a assignment submission comment + """ # noqa: E501 + comment: StrictStr = Field(description="The comment text") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["comment"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionCommentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionCommentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comment": obj.get("comment") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_comments.py b/flat_api/aio/models/assignment_submission_comments.py new file mode 100644 index 0000000..b499aa9 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_comments.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionComments(BaseModel): + """ + AssignmentSubmissionComments + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the submission") + unread: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of unread comments for the current user") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "unread"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionComments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "unread": obj.get("unread") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_history.py b/flat_api/aio/models/assignment_submission_history.py new file mode 100644 index 0000000..f0e68a1 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_history.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment +from flat_api.aio.models.assignment_submission_history_state import AssignmentSubmissionHistoryState +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionHistory(BaseModel): + """ + History item of the submission + """ # noqa: E501 + var_date: datetime = Field(description="The date when the submission was changed", alias="date") + classroom: Optional[StrictStr] = Field(default=None, description="The classroom unique identifier where the submission was changed") + assignment: Optional[StrictStr] = Field(default=None, description="The assignment unique identifier where the submission was changed") + submission: Optional[StrictStr] = Field(default=None, description="The submission unique identifier") + users: List[StrictStr] = Field(description="The user(s) unique identifier(s) who made the change") + source: Optional[StrictStr] = Field(default=None, description="The source of the change if the change was made by a third-party software") + state: Optional[AssignmentSubmissionHistoryState] = None + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The numerator of the grade at this time in the submission grade history", alias="draftGrade") + grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The numerator of the grade at this time in the submission grade history") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The denominator of the grade at this time in the submission grade history", alias="maxPoints") + comment: Optional[StrictStr] = Field(default=None, description="The comment that is made to this submission") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment", alias="dueDate") + attachment: Optional[AssignmentSubmissionHistoryAttachment] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["date", "classroom", "assignment", "submission", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['lti', 'googleClassroom', 'microsoftGraph']): + raise ValueError("must be one of enum values ('lti', 'googleClassroom', 'microsoftGraph')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of attachment + if self.attachment: + _dict['attachment'] = self.attachment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "submission": obj.get("submission"), + "users": obj.get("users"), + "source": obj.get("source"), + "state": obj.get("state"), + "draftGrade": obj.get("draftGrade"), + "grade": obj.get("grade"), + "maxPoints": obj.get("maxPoints"), + "comment": obj.get("comment"), + "dueDate": obj.get("dueDate"), + "attachment": AssignmentSubmissionHistoryAttachment.from_dict(obj["attachment"]) if obj.get("attachment") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_history_attachment.py b/flat_api/aio/models/assignment_submission_history_attachment.py new file mode 100644 index 0000000..12c1edf --- /dev/null +++ b/flat_api/aio/models/assignment_submission_history_attachment.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionHistoryAttachment(BaseModel): + """ + AssignmentSubmissionHistoryAttachment + """ # noqa: E501 + score: Optional[StrictStr] = Field(default=None, description="The score identifier that changed") + revision: Optional[StrictStr] = Field(default=None, description="The revision identifier that changed") + title: Optional[StrictStr] = Field(default=None, description="The title of the score that changed") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["score", "revision", "title"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistoryAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionHistoryAttachment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "revision": obj.get("revision"), + "title": obj.get("title") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_history_state.py b/flat_api/aio/models/assignment_submission_history_state.py new file mode 100644 index 0000000..64ee184 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_history_state.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionHistoryState(str, Enum): + """ + State of the submission history + """ + + """ + allowed enum values + """ + CREATED = 'created' + TURNEDIN = 'turnedIn' + RETURNED = 'returned' + GRADED = 'graded' + RESET = 'reset' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionHistoryState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/assignment_submission_lti.py b/flat_api/aio/models/assignment_submission_lti.py new file mode 100644 index 0000000..8f1add3 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_lti.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionLti(BaseModel): + """ + If set, this submission has a linked LTI 1.3 AGS or LTI 1.1 Outcomes + """ # noqa: E501 + grade_service: StrictStr = Field(description="The kind of grading service available for this submission: - `ags2p0`: LTI 1.3 Assignment and Grade Services 2.0 - `outcomes1p1`: LTI 1.1 Outcomes 1.1 ", alias="gradeService") + sourcedid: Optional[StrictStr] = Field(default=None, description="The sourcedid of the LTI submission when using LTI Outcomes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["gradeService", "sourcedid"] + + @field_validator('grade_service') + def grade_service_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ags2p0', 'outcomes1p1']): + raise ValueError("must be one of enum values ('ags2p0', 'outcomes1p1')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "gradeService": obj.get("gradeService"), + "sourcedid": obj.get("sourcedid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_playback.py b/flat_api/aio/models/assignment_submission_playback.py new file mode 100644 index 0000000..e950918 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_playback.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionPlayback(BaseModel): + """ + Playback used by a student for an assignment submission. + """ # noqa: E501 + score: StrictStr = Field(description="The score unique identifier") + nb_play_attempt: Union[StrictFloat, StrictInt] = Field(description="Number of times the score was played", alias="nbPlayAttempt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["score", "nbPlayAttempt"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlayback from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlayback from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "nbPlayAttempt": obj.get("nbPlayAttempt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_submission_state.py b/flat_api/aio/models/assignment_submission_state.py new file mode 100644 index 0000000..a1a2230 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionState(str, Enum): + """ + State of the submission + """ + + """ + allowed enum values + """ + CREATED = 'created' + TURNEDIN = 'turnedIn' + RETURNED = 'returned' + GRADED = 'graded' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/assignment_submission_students_mode.py b/flat_api/aio/models/assignment_submission_students_mode.py new file mode 100644 index 0000000..ba298d3 --- /dev/null +++ b/flat_api/aio/models/assignment_submission_students_mode.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionStudentsMode(str, Enum): + """ + Submission mode for assignments: - \"single\": Individual submissions (default) - \"group\": Group submissions (for shared writing assignments) + """ + + """ + allowed enum values + """ + SINGLE = 'single' + GROUP = 'group' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionStudentsMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/assignment_submission_update.py b/flat_api/aio/models/assignment_submission_update.py new file mode 100644 index 0000000..97abb1a --- /dev/null +++ b/flat_api/aio/models/assignment_submission_update.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.assignment_submission_playback import AssignmentSubmissionPlayback +from flat_api.aio.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionUpdate(BaseModel): + """ + Assignment Submission creation + """ # noqa: E501 + attachments: Optional[List[ClassAttachmentCreation]] = None + playback: Optional[List[AssignmentSubmissionPlayback]] = None + submit: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done") + draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set.") + exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") + var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done", alias="return") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["attachments", "playback", "submit", "draftGrade", "grade", "exercisesIds", "return"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in playback (list) + _items = [] + if self.playback: + for _item_playback in self.playback: + if _item_playback: + _items.append(_item_playback.to_dict()) + _dict['playback'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if draft_grade (nullable) is None + # and model_fields_set contains the field + if self.draft_grade is None and "draft_grade" in self.model_fields_set: + _dict['draftGrade'] = None + + # set to None if grade (nullable) is None + # and model_fields_set contains the field + if self.grade is None and "grade" in self.model_fields_set: + _dict['grade'] = None + + # set to None if exercises_ids (nullable) is None + # and model_fields_set contains the field + if self.exercises_ids is None and "exercises_ids" in self.model_fields_set: + _dict['exercisesIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "playback": [AssignmentSubmissionPlayback.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, + "submit": obj.get("submit"), + "draftGrade": obj.get("draftGrade"), + "grade": obj.get("grade"), + "exercisesIds": obj.get("exercisesIds"), + "return": obj.get("return") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/assignment_type.py b/flat_api/aio/models/assignment_type.py new file mode 100644 index 0000000..77eef64 --- /dev/null +++ b/flat_api/aio/models/assignment_type.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentType(str, Enum): + """ + Type of the assignment + """ + + """ + allowed enum values + """ + NONE = 'none' + NEWSCORE = 'newScore' + SCORETEMPLATE = 'scoreTemplate' + SHAREDWRITING = 'sharedWriting' + WORKSHEET = 'worksheet' + WORKSHEETTEXT = 'worksheetText' + PERFORMANCE = 'performance' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/assignment_update.py b/flat_api/aio/models/assignment_update.py new file mode 100644 index 0000000..9b0196c --- /dev/null +++ b/flat_api/aio/models/assignment_update.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentUpdate(BaseModel): + """ + Assignment Resource Editing + """ # noqa: E501 + type: Optional[AssignmentType] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") + description: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="descriptionHtml") + teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") + teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") + attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "attachments", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if nb_playback_authorized (nullable) is None + # and model_fields_set contains the field + if self.nb_playback_authorized is None and "nb_playback_authorized" in self.model_fields_set: + _dict['nbPlaybackAuthorized'] = None + + # set to None if toolset (nullable) is None + # and model_fields_set contains the field + if self.toolset is None and "toolset" in self.model_fields_set: + _dict['toolset'] = None + + # set to None if cover_file (nullable) is None + # and model_fields_set contains the field + if self.cover_file is None and "cover_file" in self.model_fields_set: + _dict['coverFile'] = None + + # set to None if cover (nullable) is None + # and model_fields_set contains the field + if self.cover is None and "cover" in self.model_fields_set: + _dict['cover'] = None + + # set to None if max_points (nullable) is None + # and model_fields_set contains the field + if self.max_points is None and "max_points" in self.model_fields_set: + _dict['maxPoints'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "toolset": obj.get("toolset"), + "coverFile": obj.get("coverFile"), + "cover": obj.get("cover"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment.py b/flat_api/aio/models/class_assignment.py new file mode 100644 index 0000000..6511923 --- /dev/null +++ b/flat_api/aio/models/class_assignment.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_capabilities import AssignmentCapabilities +from flat_api.aio.models.assignment_group import AssignmentGroup +from flat_api.aio.models.assignment_submission import AssignmentSubmission +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas +from flat_api.aio.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti +from flat_api.aio.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc +from flat_api.aio.models.google_classroom_coursework import GoogleClassroomCoursework +from flat_api.aio.models.media_attachment import MediaAttachment +from flat_api.aio.models.microsoft_graph_assignment import MicrosoftGraphAssignment +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignment(BaseModel): + """ + ClassAssignment + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the assignment") + type: AssignmentType + capabilities: AssignmentCapabilities + title: StrictStr = Field(description="Title of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") + use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the creator of this assignment ") + state: StrictStr = Field(description="State of the assignment") + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the class where this assignment was posted") + creation_date: datetime = Field(description="The creation date of this assignment", alias="creationDate") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. ", alias="dueDate") + assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") + assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") + assigned_groups: Optional[List[AssignmentGroup]] = Field(default=None, description="Groups that have access to the assignment (for shared writing assignments)", alias="assignedGroups") + submissions: List[AssignmentSubmission] + google_classroom: Optional[GoogleClassroomCoursework] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[MicrosoftGraphAssignment] = Field(default=None, alias="microsoftGraph") + mfc: Optional[ClassAssignmentAllOfMfc] = None + canvas: Optional[ClassAssignmentAllOfCanvas] = None + lti: Optional[ClassAssignmentAllOfLti] = None + issue: Optional[StrictStr] = Field(default=None, description="Detected issue for this assignment") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "assignedGroups", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['draft', 'active', 'archived']): + raise ValueError("must be one of enum values ('draft', 'active', 'archived')") + return value + + @field_validator('assignee_mode') + def assignee_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['everyone', 'selected']): + raise ValueError("must be one of enum values ('everyone', 'selected')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in assigned_groups (list) + _items = [] + if self.assigned_groups: + for _item_assigned_groups in self.assigned_groups: + if _item_assigned_groups: + _items.append(_item_assigned_groups.to_dict()) + _dict['assignedGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in submissions (list) + _items = [] + if self.submissions: + for _item_submissions in self.submissions: + if _item_submissions: + _items.append(_item_submissions.to_dict()) + _dict['submissions'] = _items + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfc + if self.mfc: + _dict['mfc'] = self.mfc.to_dict() + # override the default output from pydantic by calling `to_dict()` of canvas + if self.canvas: + _dict['canvas'] = self.canvas.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), + "cover": obj.get("cover"), + "coverFile": obj.get("coverFile"), + "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "useDedicatedAttachments": obj.get("useDedicatedAttachments"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "toolset": obj.get("toolset"), + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), + "creator": obj.get("creator"), + "state": obj.get("state"), + "classroom": obj.get("classroom"), + "creationDate": obj.get("creationDate"), + "scheduledDate": obj.get("scheduledDate"), + "dueDate": obj.get("dueDate"), + "assigneeMode": obj.get("assigneeMode"), + "assignedStudents": obj.get("assignedStudents"), + "assignedGroups": [AssignmentGroup.from_dict(_item) for _item in obj["assignedGroups"]] if obj.get("assignedGroups") is not None else None, + "submissions": [AssignmentSubmission.from_dict(_item) for _item in obj["submissions"]] if obj.get("submissions") is not None else None, + "googleClassroom": GoogleClassroomCoursework.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": MicrosoftGraphAssignment.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "mfc": ClassAssignmentAllOfMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, + "canvas": ClassAssignmentAllOfCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, + "lti": ClassAssignmentAllOfLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, + "issue": obj.get("issue") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_all_of_canvas.py b/flat_api/aio/models/class_assignment_all_of_canvas.py new file mode 100644 index 0000000..b2a3149 --- /dev/null +++ b/flat_api/aio/models/class_assignment_all_of_canvas.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfCanvas(BaseModel): + """ + A Canvas LMS assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfCanvas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfCanvas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_all_of_lti.py b/flat_api/aio/models/class_assignment_all_of_lti.py new file mode 100644 index 0000000..3b0a866 --- /dev/null +++ b/flat_api/aio/models/class_assignment_all_of_lti.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfLti(BaseModel): + """ + An LTI assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Resource ID in the LMS") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_all_of_mfc.py b/flat_api/aio/models/class_assignment_all_of_mfc.py new file mode 100644 index 0000000..0a55224 --- /dev/null +++ b/flat_api/aio/models/class_assignment_all_of_mfc.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfMfc(BaseModel): + """ + A MusicFirst Classroom assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfMfc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfMfc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_update.py b/flat_api/aio/models/class_assignment_update.py new file mode 100644 index 0000000..d9aaa1f --- /dev/null +++ b/flat_api/aio/models/class_assignment_update.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode +from flat_api.aio.models.assignment_type import AssignmentType +from flat_api.aio.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.aio.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph +from flat_api.aio.models.class_attachment_creation import ClassAttachmentCreation +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentUpdate(BaseModel): + """ + ClassAssignmentUpdate + """ # noqa: E501 + type: Optional[AssignmentType] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") + description: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="descriptionHtml") + teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") + teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") + attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") + cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") + cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. ", alias="dueDate") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") + google_classroom: Optional[ClassAssignmentUpdateAllOfGoogleClassroom] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[ClassAssignmentUpdateAllOfMicrosoftGraph] = Field(default=None, alias="microsoftGraph") + assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") + assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") + class_group_ids: Optional[List[StrictStr]] = Field(default=None, description="Optional list of specific class group IDs to apply to the assignment. When transitioning to active state with group submission mode: - If provided: Only these specific groups will be applied - If not provided: All class groups will be applied, or randomized groups created if none exist ", alias="classGroupIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "attachments", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", "classGroupIds"] + + @field_validator('release_grades') + def release_grades_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['auto', 'manual']): + raise ValueError("must be one of enum values ('auto', 'manual')") + return value + + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'active']): + raise ValueError("must be one of enum values ('draft', 'active')") + return value + + @field_validator('assignee_mode') + def assignee_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['everyone', 'selected']): + raise ValueError("must be one of enum values ('everyone', 'selected')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if due_date (nullable) is None + # and model_fields_set contains the field + if self.due_date is None and "due_date" in self.model_fields_set: + _dict['dueDate'] = None + + # set to None if scheduled_date (nullable) is None + # and model_fields_set contains the field + if self.scheduled_date is None and "scheduled_date" in self.model_fields_set: + _dict['scheduledDate'] = None + + # set to None if class_group_ids (nullable) is None + # and model_fields_set contains the field + if self.class_group_ids is None and "class_group_ids" in self.model_fields_set: + _dict['classGroupIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), + "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "toolset": obj.get("toolset"), + "coverFile": obj.get("coverFile"), + "cover": obj.get("cover"), + "maxPoints": obj.get("maxPoints"), + "releaseGrades": obj.get("releaseGrades"), + "shuffleExercises": obj.get("shuffleExercises"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), + "state": obj.get("state"), + "dueDate": obj.get("dueDate"), + "scheduledDate": obj.get("scheduledDate"), + "googleClassroom": ClassAssignmentUpdateAllOfGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": ClassAssignmentUpdateAllOfMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "assigneeMode": obj.get("assigneeMode"), + "assignedStudents": obj.get("assignedStudents"), + "classGroupIds": obj.get("classGroupIds") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py b/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py new file mode 100644 index 0000000..b203ce2 --- /dev/null +++ b/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentUpdateAllOfGoogleClassroom(BaseModel): + """ + Google Classroom options for this assignment + """ # noqa: E501 + topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["topicId"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if topic_id (nullable) is None + # and model_fields_set contains the field + if self.topic_id is None and "topic_id" in self.model_fields_set: + _dict['topicId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "topicId": obj.get("topicId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py b/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py new file mode 100644 index 0000000..de42c4b --- /dev/null +++ b/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentUpdateAllOfMicrosoftGraph(BaseModel): + """ + Microsoft Graph options for this assignment + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories this assignment belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["categories"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_attachment_creation.py b/flat_api/aio/models/class_attachment_creation.py new file mode 100644 index 0000000..51bc54d --- /dev/null +++ b/flat_api/aio/models/class_attachment_creation.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.media_score_sharing_mode import MediaScoreSharingMode +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAttachmentCreation(BaseModel): + """ + Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The type of the attachment posted: * `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. ") + score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. ") + worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") + lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") + url: Optional[StrictStr] = Field(default=None, description="The URL of the attachment.") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") + teacher_only: Optional[StrictBool] = Field(default=False, description="Flag indicating if this attachment should only be visible to teachers", alias="teacherOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "score", "worksheet", "revision", "partUuid", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", "teacherOnly"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAttachmentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAttachmentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "score": obj.get("score"), + "worksheet": obj.get("worksheet"), + "revision": obj.get("revision"), + "partUuid": obj.get("partUuid"), + "sharingMode": obj.get("sharingMode") if obj.get("sharingMode") is not None else MediaScoreSharingMode.READ, + "lockScoreTemplate": obj.get("lockScoreTemplate"), + "url": obj.get("url"), + "googleDriveFileId": obj.get("googleDriveFileId"), + "teacherOnly": obj.get("teacherOnly") if obj.get("teacherOnly") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_creation.py b/flat_api/aio/models/class_creation.py new file mode 100644 index 0000000..a8dcf66 --- /dev/null +++ b/flat_api/aio/models/class_creation.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.class_grade_level import ClassGradeLevel +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassCreation(BaseModel): + """ + Creation of a classroom + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the new class") + section: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The section of the new class") + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "section": obj.get("section"), + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details.py b/flat_api/aio/models/class_details.py new file mode 100644 index 0000000..92d846f --- /dev/null +++ b/flat_api/aio/models/class_details.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.class_details_canvas import ClassDetailsCanvas +from flat_api.aio.models.class_details_clever import ClassDetailsClever +from flat_api.aio.models.class_details_google_classroom import ClassDetailsGoogleClassroom +from flat_api.aio.models.class_details_google_drive import ClassDetailsGoogleDrive +from flat_api.aio.models.class_details_issues import ClassDetailsIssues +from flat_api.aio.models.class_details_lti import ClassDetailsLti +from flat_api.aio.models.class_details_mfc import ClassDetailsMfc +from flat_api.aio.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph +from flat_api.aio.models.class_grade_level import ClassGradeLevel +from flat_api.aio.models.class_state import ClassState +from flat_api.aio.models.group_details import GroupDetails +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetails(BaseModel): + """ + A classroom + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the class") + state: ClassState + name: StrictStr = Field(description="The name of the class") + section: Optional[StrictStr] = Field(default=None, description="The section of the class") + description: Optional[StrictStr] = Field(default=None, description="An optionnal description for this class") + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning this class") + owner: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User owning this class") + creation_date: datetime = Field(description="The date when the class was create", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date when the class was last modified", alias="modificationDate") + enrollment_code: Optional[StrictStr] = Field(default=None, description="[Teachers only] The enrollment code that can be used by the students to join the class ", alias="enrollmentCode") + theme: Optional[StrictStr] = Field(default=None, description="The theme identifier using in Flat User Interface") + assignments_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of assignments created in the class", alias="assignmentsCount") + students_group: Optional[GroupDetails] = Field(default=None, alias="studentsGroup") + teachers_group: Optional[GroupDetails] = Field(default=None, alias="teachersGroup") + issues: Optional[ClassDetailsIssues] = None + google_classroom: Optional[ClassDetailsGoogleClassroom] = Field(default=None, alias="googleClassroom") + google_drive: Optional[ClassDetailsGoogleDrive] = Field(default=None, alias="googleDrive") + microsoft_graph: Optional[ClassDetailsMicrosoftGraph] = Field(default=None, alias="microsoftGraph") + lti: Optional[ClassDetailsLti] = None + canvas: Optional[ClassDetailsCanvas] = None + mfc: Optional[ClassDetailsMfc] = None + clever: Optional[ClassDetailsClever] = None + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of students in the classroom") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "modificationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of students_group + if self.students_group: + _dict['studentsGroup'] = self.students_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of teachers_group + if self.teachers_group: + _dict['teachersGroup'] = self.teachers_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of issues + if self.issues: + _dict['issues'] = self.issues.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_classroom + if self.google_classroom: + _dict['googleClassroom'] = self.google_classroom.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_drive + if self.google_drive: + _dict['googleDrive'] = self.google_drive.to_dict() + # override the default output from pydantic by calling `to_dict()` of microsoft_graph + if self.microsoft_graph: + _dict['microsoftGraph'] = self.microsoft_graph.to_dict() + # override the default output from pydantic by calling `to_dict()` of lti + if self.lti: + _dict['lti'] = self.lti.to_dict() + # override the default output from pydantic by calling `to_dict()` of canvas + if self.canvas: + _dict['canvas'] = self.canvas.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfc + if self.mfc: + _dict['mfc'] = self.mfc.to_dict() + # override the default output from pydantic by calling `to_dict()` of clever + if self.clever: + _dict['clever'] = self.clever.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "name": obj.get("name"), + "section": obj.get("section"), + "description": obj.get("description"), + "organization": obj.get("organization"), + "owner": obj.get("owner"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "enrollmentCode": obj.get("enrollmentCode"), + "theme": obj.get("theme"), + "assignmentsCount": obj.get("assignmentsCount"), + "studentsGroup": GroupDetails.from_dict(obj["studentsGroup"]) if obj.get("studentsGroup") is not None else None, + "teachersGroup": GroupDetails.from_dict(obj["teachersGroup"]) if obj.get("teachersGroup") is not None else None, + "issues": ClassDetailsIssues.from_dict(obj["issues"]) if obj.get("issues") is not None else None, + "googleClassroom": ClassDetailsGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "googleDrive": ClassDetailsGoogleDrive.from_dict(obj["googleDrive"]) if obj.get("googleDrive") is not None else None, + "microsoftGraph": ClassDetailsMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "lti": ClassDetailsLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, + "canvas": ClassDetailsCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, + "mfc": ClassDetailsMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, + "clever": ClassDetailsClever.from_dict(obj["clever"]) if obj.get("clever") is not None else None, + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_canvas.py b/flat_api/aio/models/class_details_canvas.py new file mode 100644 index 0000000..cbf2502 --- /dev/null +++ b/flat_api/aio/models/class_details_canvas.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsCanvas(BaseModel): + """ + Meta information provided by Canvs LMS + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas") + domain: Optional[StrictStr] = Field(default=None, description="Canvas instance domain (e.g. \"canvas.instructure.com\")") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "domain"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsCanvas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsCanvas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "domain": obj.get("domain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_clever.py b/flat_api/aio/models/class_details_clever.py new file mode 100644 index 0000000..8b3e893 --- /dev/null +++ b/flat_api/aio/models/class_details_clever.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsClever(BaseModel): + """ + Clever.com section-related information + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Clever section unique identifier") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the section on clever", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The last modification date of the section on clever", alias="modificationDate") + subject: Optional[StrictStr] = Field(default=None, description="Normalized subject of the course") + term_name: Optional[StrictStr] = Field(default=None, description="Name of the term when this course happens", alias="termName") + term_start_date: Optional[datetime] = Field(default=None, description="Beginning date of the term", alias="termStartDate") + term_end_date: Optional[datetime] = Field(default=None, description="End date of the term", alias="termEndDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate"] + + @field_validator('subject') + def subject_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['english/language arts', 'math', 'science', 'social studies', 'language', 'homeroom/advisory', 'interventions/online learning', 'technology and engineering', 'PE and health', 'arts and music', 'other']): + raise ValueError("must be one of enum values ('english/language arts', 'math', 'science', 'social studies', 'language', 'homeroom/advisory', 'interventions/online learning', 'technology and engineering', 'PE and health', 'arts and music', 'other')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsClever from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsClever from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "subject": obj.get("subject"), + "termName": obj.get("termName"), + "termStartDate": obj.get("termStartDate"), + "termEndDate": obj.get("termEndDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_google_classroom.py b/flat_api/aio/models/class_details_google_classroom.py new file mode 100644 index 0000000..82a3bd1 --- /dev/null +++ b/flat_api/aio/models/class_details_google_classroom.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsGoogleClassroom(BaseModel): + """ + Google Classroom course-related information + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The course identifier on Google Classroom") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this course in the Classroom web UI", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleClassroom from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleClassroom from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_google_drive.py b/flat_api/aio/models/class_details_google_drive.py new file mode 100644 index 0000000..d6b9c49 --- /dev/null +++ b/flat_api/aio/models/class_details_google_drive.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsGoogleDrive(BaseModel): + """ + Google Drive course-related information provided by Google Classroom + """ # noqa: E501 + teacher_folder_id: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive directory identifier of the teachers' folder ", alias="teacherFolderId") + teacher_folder_alternate_link: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive URL of the teachers' folder ", alias="teacherFolderAlternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["teacherFolderId", "teacherFolderAlternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleDrive from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsGoogleDrive from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "teacherFolderId": obj.get("teacherFolderId"), + "teacherFolderAlternateLink": obj.get("teacherFolderAlternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_issues.py b/flat_api/aio/models/class_details_issues.py new file mode 100644 index 0000000..412d81c --- /dev/null +++ b/flat_api/aio/models/class_details_issues.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsIssues(BaseModel): + """ + Detected issues for this class + """ # noqa: E501 + sync: Optional[List[ClassDetailsIssuesSyncInner]] = Field(default=None, description="Synchronization issues for the class") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sync"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsIssues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sync (list) + _items = [] + if self.sync: + for _item_sync in self.sync: + if _item_sync: + _items.append(_item_sync.to_dict()) + _dict['sync'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsIssues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sync": [ClassDetailsIssuesSyncInner.from_dict(_item) for _item in obj["sync"]] if obj.get("sync") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_issues_sync_inner.py b/flat_api/aio/models/class_details_issues_sync_inner.py new file mode 100644 index 0000000..42c8098 --- /dev/null +++ b/flat_api/aio/models/class_details_issues_sync_inner.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsIssuesSyncInner(BaseModel): + """ + A sync issue + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The account user identifier") + email: Optional[StrictStr] = Field(default=None, description="The email address of the user concerned by this sync issue") + reason: Optional[StrictStr] = Field(default=None, description="The reason why the account cannot be synced") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "email", "reason"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['otherOrgnanization', 'productMigration', 'disabledAccount']): + raise ValueError("must be one of enum values ('otherOrgnanization', 'productMigration', 'disabledAccount')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsIssuesSyncInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsIssuesSyncInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "reason": obj.get("reason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_lti.py b/flat_api/aio/models/class_details_lti.py new file mode 100644 index 0000000..e53098e --- /dev/null +++ b/flat_api/aio/models/class_details_lti.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsLti(BaseModel): + """ + Info about LTI context (1.1 and 1.3) + """ # noqa: E501 + context_id: Optional[StrictStr] = Field(default=None, description="Unique context identifier provided", alias="contextId") + context_title: Optional[StrictStr] = Field(default=None, description="Context title", alias="contextTitle") + context_label: Optional[StrictStr] = Field(default=None, description="Context label", alias="contextLabel") + has_nrps_service: Optional[StrictBool] = Field(default=None, description="If true, the class has been synchronized with the LTI 1.3 NRPS 2.0 service", alias="hasNrpsService") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["contextId", "contextTitle", "contextLabel", "hasNrpsService"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "contextId": obj.get("contextId"), + "contextTitle": obj.get("contextTitle"), + "contextLabel": obj.get("contextLabel"), + "hasNrpsService": obj.get("hasNrpsService") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_mfc.py b/flat_api/aio/models/class_details_mfc.py new file mode 100644 index 0000000..f21f807 --- /dev/null +++ b/flat_api/aio/models/class_details_mfc.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsMfc(BaseModel): + """ + Meta information provided by Canvs LMS + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Classroom") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom class", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsMfc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsMfc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_details_microsoft_graph.py b/flat_api/aio/models/class_details_microsoft_graph.py new file mode 100644 index 0000000..edd2e3c --- /dev/null +++ b/flat_api/aio/models/class_details_microsoft_graph.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassDetailsMicrosoftGraph(BaseModel): + """ + ClassDetailsMicrosoftGraph + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The course identifier on Microsoft Graph") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassDetailsMicrosoftGraph from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassDetailsMicrosoftGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/class_grade_level.py b/flat_api/aio/models/class_grade_level.py new file mode 100644 index 0000000..112409e --- /dev/null +++ b/flat_api/aio/models/class_grade_level.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassGradeLevel(str, Enum): + """ + Class grade level + """ + + """ + allowed enum values + """ + ELEMENTARY = 'elementary' + MIDDLE = 'middle' + HIGH = 'high' + UNIVERSITY = 'university' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassGradeLevel from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/class_roles.py b/flat_api/aio/models/class_roles.py new file mode 100644 index 0000000..b1c6f03 --- /dev/null +++ b/flat_api/aio/models/class_roles.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassRoles(str, Enum): + """ + User's Class Role (for Edu users only) + """ + + """ + allowed enum values + """ + TEACHER = 'teacher' + STUDENT = 'student' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassRoles from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/class_state.py b/flat_api/aio/models/class_state.py new file mode 100644 index 0000000..51d66f3 --- /dev/null +++ b/flat_api/aio/models/class_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClassState(str, Enum): + """ + The state of a classroom + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + INACTIVE = 'inactive' + ARCHIVED = 'archived' + DELETED = 'deleted' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClassState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/class_update.py b/flat_api/aio/models/class_update.py new file mode 100644 index 0000000..d354427 --- /dev/null +++ b/flat_api/aio/models/class_update.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.class_grade_level import ClassGradeLevel +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassUpdate(BaseModel): + """ + Update of a classroom + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The name of the class") + section: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The section of the class") + level: Optional[ClassGradeLevel] = None + skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") + size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] + + @field_validator('skills_focused') + def skills_focused_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other']): + raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "section": obj.get("section"), + "level": obj.get("level"), + "skillsFocused": obj.get("skillsFocused"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection.py b/flat_api/aio/models/collection.py new file mode 100644 index 0000000..0c4172a --- /dev/null +++ b/flat_api/aio/models/collection.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.collection_app import CollectionApp +from flat_api.aio.models.collection_capabilities import CollectionCapabilities +from flat_api.aio.models.collection_contents import CollectionContents +from flat_api.aio.models.collection_privacy import CollectionPrivacy +from flat_api.aio.models.collection_type import CollectionType +from flat_api.aio.models.resource_collaborator import ResourceCollaborator +from flat_api.aio.models.resource_rights import ResourceRights +from flat_api.aio.models.user_public_summary import UserPublicSummary +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Collection(BaseModel): + """ + Collection of scores + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the collection") + title: StrictStr = Field(description="The title of the collection") + html_url: StrictStr = Field(description="The url where the collection can be viewed in a web browser", alias="htmlUrl") + type: CollectionType + label_key: Optional[StrictStr] = Field(default=None, description="Product-specific translation key for the collection type. Only set for specific collection types: * For `regular` type: `playlist` (Flat) or `collection` (Flat for Education) * For `collaborations` type: `collaboration` (Flat) or `shared-scores` (Flat for Education) Not set for other collection types. ", alias="labelKey") + privacy: CollectionPrivacy + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + app: Optional[CollectionApp] = None + creation_date: datetime = Field(description="The date when the collection was created", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date when the collection was last modified", alias="modificationDate") + user: Optional[UserPublicSummary] = None + organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. ") + rights: Optional[ResourceRights] = None + collaborators: Optional[List[ResourceCollaborator]] = Field(default=None, description="The list of the collaborators of the collection") + is_pinned: Optional[StrictBool] = Field(default=None, description="Whether the collection is pinned by the owner", alias="isPinned") + contents: CollectionContents + capabilities: CollectionCapabilities + collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "labelKey", "privacy", "sharingKey", "app", "creationDate", "modificationDate", "user", "organization", "rights", "collaborators", "isPinned", "contents", "capabilities", "collections"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Collection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of app + if self.app: + _dict['app'] = self.app.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of rights + if self.rights: + _dict['rights'] = self.rights.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) + _items = [] + if self.collaborators: + for _item_collaborators in self.collaborators: + if _item_collaborators: + _items.append(_item_collaborators.to_dict()) + _dict['collaborators'] = _items + # override the default output from pydantic by calling `to_dict()` of contents + if self.contents: + _dict['contents'] = self.contents.to_dict() + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Collection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "htmlUrl": obj.get("htmlUrl"), + "type": obj.get("type"), + "labelKey": obj.get("labelKey"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE, + "sharingKey": obj.get("sharingKey"), + "app": CollectionApp.from_dict(obj["app"]) if obj.get("app") is not None else None, + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "user": UserPublicSummary.from_dict(obj["user"]) if obj.get("user") is not None else None, + "organization": obj.get("organization"), + "rights": ResourceRights.from_dict(obj["rights"]) if obj.get("rights") is not None else None, + "collaborators": [ResourceCollaborator.from_dict(_item) for _item in obj["collaborators"]] if obj.get("collaborators") is not None else None, + "isPinned": obj.get("isPinned"), + "contents": CollectionContents.from_dict(obj["contents"]) if obj.get("contents") is not None else None, + "capabilities": CollectionCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "collections": obj.get("collections") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_app.py b/flat_api/aio/models/collection_app.py new file mode 100644 index 0000000..c057ae5 --- /dev/null +++ b/flat_api/aio/models/collection_app.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionApp(BaseModel): + """ + For App collections, the details of the app that created the collection + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The app unique identifier") + name: Optional[StrictStr] = Field(default=None, description="The name of the app") + logo: Optional[StrictStr] = Field(default=None, description="The app logo url") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "logo"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionApp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionApp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "logo": obj.get("logo") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_capabilities.py b/flat_api/aio/models/collection_capabilities.py new file mode 100644 index 0000000..1d9a09e --- /dev/null +++ b/flat_api/aio/models/collection_capabilities.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionCapabilities(BaseModel): + """ + Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take. + """ # noqa: E501 + can_edit: StrictBool = Field(description="Whether the current user can modify the metadata for the collection ", alias="canEdit") + can_share: StrictBool = Field(description="Whether the current user can modify the sharing settings for the collection ", alias="canShare") + can_delete: StrictBool = Field(description="Whether the current user can delete the collection ", alias="canDelete") + can_add_scores: StrictBool = Field(description="Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. ", alias="canAddScores") + can_delete_scores: StrictBool = Field(description="Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. ", alias="canDeleteScores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canShare": obj.get("canShare"), + "canDelete": obj.get("canDelete"), + "canAddScores": obj.get("canAddScores"), + "canDeleteScores": obj.get("canDeleteScores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_contents.py b/flat_api/aio/models/collection_contents.py new file mode 100644 index 0000000..9d8933b --- /dev/null +++ b/flat_api/aio/models/collection_contents.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionContents(BaseModel): + """ + The contents of the collection + """ # noqa: E501 + scores_count: StrictInt = Field(description="The number of scores in the collection", alias="scoresCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scoresCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionContents from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionContents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scoresCount": obj.get("scoresCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_creation.py b/flat_api/aio/models/collection_creation.py new file mode 100644 index 0000000..7357433 --- /dev/null +++ b/flat_api/aio/models/collection_creation.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.collection_privacy import CollectionPrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionCreation(BaseModel): + """ + CollectionCreation + """ # noqa: E501 + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field(default=None, description="The title of the collection") + privacy: Optional[CollectionPrivacy] = CollectionPrivacy.PRIVATE + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_modification.py b/flat_api/aio/models/collection_modification.py new file mode 100644 index 0000000..1b742c1 --- /dev/null +++ b/flat_api/aio/models/collection_modification.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.collection_privacy import CollectionPrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionModification(BaseModel): + """ + Edit the collection metadata + """ # noqa: E501 + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field(default=None, description="The title of the collection") + privacy: Optional[CollectionPrivacy] = CollectionPrivacy.PRIVATE + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionModification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionModification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/collection_privacy.py b/flat_api/aio/models/collection_privacy.py new file mode 100644 index 0000000..46d5eca --- /dev/null +++ b/flat_api/aio/models/collection_privacy.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CollectionPrivacy(str, Enum): + """ + The collection main privacy mode. - `private`: The collection is private and can only be accessed, modified, and administered by specified collaborators. + """ + + """ + allowed enum values + """ + PRIVATE = 'private' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CollectionPrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/collection_type.py b/flat_api/aio/models/collection_type.py new file mode 100644 index 0000000..7a49bda --- /dev/null +++ b/flat_api/aio/models/collection_type.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CollectionType(str, Enum): + """ + Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores + """ + + """ + allowed enum values + """ + ROOT = 'root' + REGULAR = 'regular' + APP = 'app' + TRASH = 'trash' + ALLSCORES = 'allScores' + COLLABORATIONS = 'collaborations' + LIKES = 'likes' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CollectionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/create_lti_configuration200_response.py b/flat_api/aio/models/create_lti_configuration200_response.py new file mode 100644 index 0000000..87b0b3b --- /dev/null +++ b/flat_api/aio/models/create_lti_configuration200_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration import LtiConfiguration +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateLtiConfiguration200Response(LtiConfiguration): + """ + CreateLtiConfiguration200Response + """ # noqa: E501 + registration_url: Optional[StrictStr] = Field(default=None, description="One-time registration URL (only for dynamic registration)", alias="registrationUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateLtiConfiguration200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if last_used_date (nullable) is None + # and model_fields_set contains the field + if self.last_used_date is None and "last_used_date" in self.model_fields_set: + _dict['lastUsedDate'] = None + + # set to None if registration_completion_date (nullable) is None + # and model_fields_set contains the field + if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: + _dict['registrationCompletionDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateLtiConfiguration200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret"), + "lms": obj.get("lms"), + "name": obj.get("name"), + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "parentId": obj.get("parentId"), + "deploymentKey": obj.get("deploymentKey"), + "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId"), + "registrationToken": obj.get("registrationToken"), + "registrationUrl": obj.get("registrationUrl"), + "registrationTokenUsed": obj.get("registrationTokenUsed"), + "registrationCompletionDate": obj.get("registrationCompletionDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/credit_transaction.py b/flat_api/aio/models/credit_transaction.py new file mode 100644 index 0000000..e4ebbaf --- /dev/null +++ b/flat_api/aio/models/credit_transaction.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreditTransaction(BaseModel): + """ + A single credit ledger entry + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the credit transaction") + type: StrictStr = Field(description="Credit category. `ai` covers every AI-powered feature.") + feature: Optional[StrictStr] = Field(default=None, description="Which product the credits relate to. Set on deductions and on the credits a refund returns, absent on credit-pack top-ups, which are not tied to a single feature. ") + amount: StrictInt = Field(description="How many credits this entry moved, signed: positive for top-ups (`+30` from a credit pack), negative for deductions (`-2` for a two-page import). Sum only entries whose `state` is `active`. ") + source: StrictStr = Field(description="Which pool the credits came from: * `subscription`: the plan's periodic allowance * `purchase`: credits bought as a pack, which do not expire with the billing period * `free_tier`: promotional grants * `support`: a manual adjustment made by Flat's support team A single import can produce two entries when it spans two pools: the plan allowance is drawn down first, and the remainder comes from `purchase`. ") + state: StrictStr = Field(description="Whether the entry still counts: * `active`: in effect * `canceled`: reversed, and no longer affecting the balance. Deductions are canceled when the import they paid for fails or is refunded. ") + job: Optional[StrictStr] = Field(default=None, description="Identifier of the import this entry belongs to, when it relates to one. Present on an import's deduction, on its reversal, and on credits returned when an import is refunded. Absent on credit-pack top-ups and manual adjustments. ") + creation_date: datetime = Field(description="When the transaction was created", alias="creationDate") + modification_date: datetime = Field(description="When the transaction was last modified", alias="modificationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "feature", "amount", "source", "state", "job", "creationDate", "modificationDate"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ai']): + raise ValueError("must be one of enum values ('ai')") + return value + + @field_validator('feature') + def feature_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['omr']): + raise ValueError("must be one of enum values ('omr')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['subscription', 'purchase', 'free_tier', 'support']): + raise ValueError("must be one of enum values ('subscription', 'purchase', 'free_tier', 'support')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'canceled']): + raise ValueError("must be one of enum values ('active', 'canceled')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreditTransaction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreditTransaction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "feature": obj.get("feature"), + "amount": obj.get("amount"), + "source": obj.get("source"), + "state": obj.get("state"), + "job": obj.get("job"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_library.py b/flat_api/aio/models/edu_library.py new file mode 100644 index 0000000..610e62b --- /dev/null +++ b/flat_api/aio/models/edu_library.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduLibrary(BaseModel): + """ + A Flat for Education Library + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") + name: StrictStr = Field(description="Name of the lirbary") + type: StrictStr = Field(description="Type of the library") + visibility: StrictStr = Field(description="Visibility of the library") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "type", "visibility"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['myResources', 'organizationResources', 'flatEduContent']): + raise ValueError("must be one of enum values ('myResources', 'organizationResources', 'flatEduContent')") + return value + + @field_validator('visibility') + def visibility_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['private', 'organization', 'public']): + raise ValueError("must be one of enum values ('private', 'organization', 'public')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduLibrary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduLibrary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "visibility": obj.get("visibility") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource.py b/flat_api/aio/models/edu_resource.py new file mode 100644 index 0000000..14c771a --- /dev/null +++ b/flat_api/aio/models/edu_resource.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.edu_resource_capabilities import EduResourceCapabilities +from flat_api.aio.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.aio.models.edu_resource_resource import EduResourceResource +from flat_api.aio.models.edu_resource_type import EduResourceType +from flat_api.aio.models.grade import Grade +from flat_api.aio.models.teaching_theme import TeachingTheme +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResource(BaseModel): + """ + A Flat for Education resource contained in a resources library + """ # noqa: E501 + id: StrictStr = Field(description="Resource unique identifier") + creator: Optional[StrictStr] = Field(default=None, description="The User identifier of the resource creator") + type: EduResourceType + privacy: Optional[EduResourcePrivacy] = EduResourcePrivacy.PRIVATE + tags: Optional[List[StrictStr]] = Field(default=None, description="Specific attributes for the resource (e.g. sample resources with custom design)") + parent: Optional[StrictStr] = Field(default=None, description="Identifier of the parent resource, e.g. a folder or root") + title: StrictStr = Field(description="Title of the resource") + sharing_description: Optional[StrictStr] = Field(default=None, description="Sharing description of this resource", alias="sharingDescription") + sharing_description_html: Optional[StrictStr] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") + creation_date: Optional[datetime] = Field(default=None, description="The date when the resource was created", alias="creationDate") + update_date: Optional[datetime] = Field(default=None, description="The date when the resource was updated", alias="updateDate") + resource: Optional[EduResourceResource] = None + capabilities: EduResourceCapabilities + subjects: Optional[List[TeachingTheme]] = Field(default=None, description="The subjects of this resource, or the subjects of the resources included in the folder") + grades: Optional[List[Grade]] = Field(default=None, description="The grades of this resource, or the grades of the resources included in the folder.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creator", "type", "privacy", "tags", "parent", "title", "sharingDescription", "sharingDescriptionHtml", "creationDate", "updateDate", "resource", "capabilities", "subjects", "grades"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict['capabilities'] = self.capabilities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creator": obj.get("creator"), + "type": obj.get("type"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else EduResourcePrivacy.PRIVATE, + "tags": obj.get("tags"), + "parent": obj.get("parent"), + "title": obj.get("title"), + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), + "creationDate": obj.get("creationDate"), + "updateDate": obj.get("updateDate"), + "resource": EduResourceResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "capabilities": EduResourceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "subjects": obj.get("subjects"), + "grades": obj.get("grades") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_assignment_creation.py b/flat_api/aio/models/edu_resource_assignment_creation.py new file mode 100644 index 0000000..0760582 --- /dev/null +++ b/flat_api/aio/models/edu_resource_assignment_creation.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.assignment_type import AssignmentType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceAssignmentCreation(BaseModel): + """ + Assignment-specific creation options. Only applicable when creating a resource with `type: assignment`. If `type` is not provided, defaults to `none`. + """ # noqa: E501 + type: Optional[AssignmentType] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceAssignmentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceAssignmentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_capabilities.py b/flat_api/aio/models/edu_resource_capabilities.py new file mode 100644 index 0000000..183bea9 --- /dev/null +++ b/flat_api/aio/models/edu_resource_capabilities.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceCapabilities(BaseModel): + """ + Capabilities available for this resource + """ # noqa: E501 + can_edit: Optional[StrictBool] = Field(default=None, description="Whether the current user can modify this resource ", alias="canEdit") + can_add_resources: Optional[StrictBool] = Field(default=None, description="Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) ", alias="canAddResources") + can_add_folders: Optional[StrictBool] = Field(default=None, description="Whether the current user can add folders within this resource (e.g. `folder` inside `root`) ", alias="canAddFolders") + can_change_privacy: Optional[StrictBool] = Field(default=None, description="Whether the current user can change the privacy of this resource (e.g. to share as `organizationPublic` or unshare it with `private`) ", alias="canChangePrivacy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["canEdit", "canAddResources", "canAddFolders", "canChangePrivacy"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "canEdit": obj.get("canEdit"), + "canAddResources": obj.get("canAddResources"), + "canAddFolders": obj.get("canAddFolders"), + "canChangePrivacy": obj.get("canChangePrivacy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_copy.py b/flat_api/aio/models/edu_resource_copy.py new file mode 100644 index 0000000..5ef7a15 --- /dev/null +++ b/flat_api/aio/models/edu_resource_copy.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceCopy(BaseModel): + """ + Copy an education resource + """ # noqa: E501 + destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["destination"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCopy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCopy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination": obj.get("destination") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_creation.py b/flat_api/aio/models/edu_resource_creation.py new file mode 100644 index 0000000..3fe21ce --- /dev/null +++ b/flat_api/aio/models/edu_resource_creation.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.edu_resource_assignment_creation import EduResourceAssignmentCreation +from flat_api.aio.models.edu_resource_type import EduResourceType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceCreation(BaseModel): + """ + Creation of an education resource + """ # noqa: E501 + type: EduResourceType + title: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="Title of the resource") + parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`") + sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") + sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") + resource: Optional[EduResourceAssignmentCreation] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "parent", "sharingDescription", "sharingDescriptionHtml", "resource"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "parent": obj.get("parent") if obj.get("parent") is not None else 'root', + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), + "resource": EduResourceAssignmentCreation.from_dict(obj["resource"]) if obj.get("resource") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_folder.py b/flat_api/aio/models/edu_resource_folder.py new file mode 100644 index 0000000..2cd4282 --- /dev/null +++ b/flat_api/aio/models/edu_resource_folder.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.assignment_type import AssignmentType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceFolder(BaseModel): + """ + Education resources folder + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the folder") + assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment type of the resources that are included in the folder,", alias="assignmentsTypes") + resources_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of resources inside the folder", alias="resourcesCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "assignmentsTypes", "resourcesCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceFolder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceFolder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "assignmentsTypes": obj.get("assignmentsTypes"), + "resourcesCount": obj.get("resourcesCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_lti_link.py b/flat_api/aio/models/edu_resource_lti_link.py new file mode 100644 index 0000000..21c2e76 --- /dev/null +++ b/flat_api/aio/models/edu_resource_lti_link.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceLtiLink(BaseModel): + """ + LTI Link details for the class + """ # noqa: E501 + lti_url: StrictStr = Field(description="An URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ltiUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceLtiLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceLtiLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ltiUrl": obj.get("ltiUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_move.py b/flat_api/aio/models/edu_resource_move.py new file mode 100644 index 0000000..8212436 --- /dev/null +++ b/flat_api/aio/models/edu_resource_move.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceMove(BaseModel): + """ + Move an education resource + """ # noqa: E501 + destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["destination"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceMove from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceMove from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destination": obj.get("destination") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_privacy.py b/flat_api/aio/models/edu_resource_privacy.py new file mode 100644 index 0000000..21354b8 --- /dev/null +++ b/flat_api/aio/models/edu_resource_privacy.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EduResourcePrivacy(str, Enum): + """ + The Education resource privacy mode. + """ + + """ + allowed enum values + """ + PRIVATE = 'private' + ORGANIZATIONPUBLIC = 'organizationPublic' + PUBLIC = 'public' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EduResourcePrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/edu_resource_resource.py b/flat_api/aio/models/edu_resource_resource.py new file mode 100644 index 0000000..d4b2f34 --- /dev/null +++ b/flat_api/aio/models/edu_resource_resource.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.assignment import Assignment +from flat_api.aio.models.edu_resource_folder import EduResourceFolder +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +EDURESOURCERESOURCE_ONE_OF_SCHEMAS = ["Assignment", "EduResourceFolder"] + +class EduResourceResource(BaseModel): + """ + EduResourceResource + """ + # data type: Assignment + oneof_schema_1_validator: Optional[Assignment] = None + # data type: EduResourceFolder + oneof_schema_2_validator: Optional[EduResourceFolder] = None + actual_instance: Optional[Union[Assignment, EduResourceFolder]] = None + one_of_schemas: Set[str] = { "Assignment", "EduResourceFolder" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EduResourceResource.model_construct() + error_messages = [] + match = 0 + # validate data type: Assignment + if not isinstance(v, Assignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `Assignment`") + else: + match += 1 + # validate data type: EduResourceFolder + if not isinstance(v, EduResourceFolder): + error_messages.append(f"Error! Input type `{type(v)}` is not `EduResourceFolder`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Assignment + try: + instance.actual_instance = Assignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EduResourceFolder + try: + instance.actual_instance = EduResourceFolder.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Assignment, EduResourceFolder]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/edu_resource_type.py b/flat_api/aio/models/edu_resource_type.py new file mode 100644 index 0000000..ca62b58 --- /dev/null +++ b/flat_api/aio/models/edu_resource_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EduResourceType(str, Enum): + """ + Type of an education resource + """ + + """ + allowed enum values + """ + ASSIGNMENT = 'assignment' + FOLDER = 'folder' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EduResourceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/edu_resource_update.py b/flat_api/aio/models/edu_resource_update.py new file mode 100644 index 0000000..9d175c9 --- /dev/null +++ b/flat_api/aio/models/edu_resource_update.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.aio.models.grade import Grade +from flat_api.aio.models.teaching_theme import TeachingTheme +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceUpdate(BaseModel): + """ + Update of an education resource + """ # noqa: E501 + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the resource") + sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") + sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") + privacy: Optional[EduResourcePrivacy] = EduResourcePrivacy.PRIVATE + subjects: Optional[List[TeachingTheme]] = Field(default=None, description="The subjects of this resource, or the subjects of the resources included in the folder") + grades: Optional[List[Grade]] = Field(default=None, description="The grades of this resource, or the grades of the resources included in the folder.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "sharingDescription", "sharingDescriptionHtml", "privacy", "subjects", "grades"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else EduResourcePrivacy.PRIVATE, + "subjects": obj.get("subjects"), + "grades": obj.get("grades") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/edu_resource_use_in_class.py b/flat_api/aio/models/edu_resource_use_in_class.py new file mode 100644 index 0000000..2a2c70e --- /dev/null +++ b/flat_api/aio/models/edu_resource_use_in_class.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceUseInClass(BaseModel): + """ + Use an education resource in class + """ # noqa: E501 + classroom: StrictStr = Field(description="The destination classroom where the resource will be copied.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["classroom", "assignment"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceUseInClass from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceUseInClass from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/flat_error_response.py b/flat_api/aio/models/flat_error_response.py new file mode 100644 index 0000000..cd87fc5 --- /dev/null +++ b/flat_api/aio/models/flat_error_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FlatErrorResponse(BaseModel): + """ + An API Error response + """ # noqa: E501 + code: StrictStr = Field(description="A corresponding code for this error") + message: StrictStr = Field(description="A printable message for this error") + id: Optional[StrictStr] = Field(default=None, description="An unique error identifier generated for the request") + param: Optional[StrictStr] = Field(default=None, description="The related parameter that caused the error") + provider_message: Optional[StrictStr] = Field(default=None, description="The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. ", alias="providerMessage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "id", "param", "providerMessage"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlatErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlatErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "id": obj.get("id"), + "param": obj.get("param"), + "providerMessage": obj.get("providerMessage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/google_classroom_coursework.py b/flat_api/aio/models/google_classroom_coursework.py new file mode 100644 index 0000000..cb8191c --- /dev/null +++ b/flat_api/aio/models/google_classroom_coursework.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GoogleClassroomCoursework(BaseModel): + """ + A coursework on Google Classroom + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the coursework assigned by Classroom") + state: Optional[StrictStr] = Field(default=None, description="State of the coursework") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") + topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "topicId"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GoogleClassroomCoursework from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if topic_id (nullable) is None + # and model_fields_set contains the field + if self.topic_id is None and "topic_id" in self.model_fields_set: + _dict['topicId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GoogleClassroomCoursework from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink"), + "topicId": obj.get("topicId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/google_classroom_submission.py b/flat_api/aio/models/google_classroom_submission.py new file mode 100644 index 0000000..6975dde --- /dev/null +++ b/flat_api/aio/models/google_classroom_submission.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GoogleClassroomSubmission(BaseModel): + """ + A coursework submission on Google Classroom + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the coursework submission assigned by Classroom") + state: StrictStr = Field(description="State of the submission on Google Classroom") + alternate_link: StrictStr = Field(description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GoogleClassroomSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GoogleClassroomSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/grade.py b/flat_api/aio/models/grade.py new file mode 100644 index 0000000..16a122a --- /dev/null +++ b/flat_api/aio/models/grade.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Grade(str, Enum): + """ + Class grade of the resource + """ + + """ + allowed enum values + """ + ENUM_1 = '1' + ENUM_2 = '2' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + ENUM_7 = '7' + ENUM_8 = '8' + ENUM_9 = '9' + ENUM_10 = '10' + ENUM_11 = '11' + ENUM_12 = '12' + UNIVERSITY = 'university' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Grade from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/group.py b/flat_api/aio/models/group.py new file mode 100644 index 0000000..e79a3d0 --- /dev/null +++ b/flat_api/aio/models/group.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.group_type import GroupType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Group(BaseModel): + """ + A group of users + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group") + name: Optional[StrictStr] = Field(default=None, description="The display name of the group") + type: Optional[GroupType] = None + users_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of users in this group", alias="usersCount") + read_only: Optional[StrictBool] = Field(default=None, description="`True` if the group is set in read-only ", alias="readOnly") + organization: Optional[StrictStr] = Field(default=None, description="If the group is related to an organization, this field will contain the unique identifier of the organization ") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the group", alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Group from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Group from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "usersCount": obj.get("usersCount"), + "readOnly": obj.get("readOnly"), + "organization": obj.get("organization"), + "creationDate": obj.get("creationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/group_creation.py b/flat_api/aio/models/group_creation.py new file mode 100644 index 0000000..cbcbe9d --- /dev/null +++ b/flat_api/aio/models/group_creation.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GroupCreation(BaseModel): + """ + GroupCreation + """ # noqa: E501 + type: StrictStr = Field(description="Type of group (currently only classStudentsSubGroup is supported)") + classroom: StrictStr = Field(description="Classroom ID") + name: Optional[StrictStr] = Field(default=None, description="Name of the group (optional - auto-generated if not provided). **Special names:** * `edu:testing-students`: Creates a group tagged for test student accounts. The display name will be localized (e.g., \"Test Students\") and the group will be tagged with `edu:testing-students`. ") + members: Optional[List[StrictStr]] = Field(default=None, description="Array of student IDs to add to the group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "classroom", "name", "members"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['classStudentsSubGroup']): + raise ValueError("must be one of enum values ('classStudentsSubGroup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "classroom": obj.get("classroom"), + "name": obj.get("name"), + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/group_details.py b/flat_api/aio/models/group_details.py new file mode 100644 index 0000000..6f5bd55 --- /dev/null +++ b/flat_api/aio/models/group_details.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.group_type import GroupType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GroupDetails(BaseModel): + """ + The details of a group + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the group") + name: StrictStr = Field(description="The displayable name of the group") + type: GroupType + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning the group") + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup'") + assignment: Optional[StrictStr] = Field(default=None, description="The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'.") + parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") + creation_date: datetime = Field(description="The date when the group was create", alias="creationDate") + users_count: Union[StrictFloat, StrictInt] = Field(description="The number of students in this group", alias="usersCount") + read_only: StrictBool = Field(description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") + tags: List[StrictStr] = Field(description="Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "classroom", "assignment", "parent", "creationDate", "usersCount", "readOnly", "tags"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "organization": obj.get("organization"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "parent": obj.get("parent"), + "creationDate": obj.get("creationDate"), + "usersCount": obj.get("usersCount"), + "readOnly": obj.get("readOnly"), + "tags": obj.get("tags") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/group_type.py b/flat_api/aio/models/group_type.py new file mode 100644 index 0000000..c9e76a9 --- /dev/null +++ b/flat_api/aio/models/group_type.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class GroupType(str, Enum): + """ + The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. + """ + + """ + allowed enum values + """ + GENERIC = 'generic' + CLASSTEACHERS = 'classTeachers' + CLASSSTUDENTS = 'classStudents' + CLASSSTUDENTSSUBGROUP = 'classStudentsSubGroup' + ASSIGNMENTSTUDENTSSUBGROUP = 'assignmentStudentsSubGroup' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GroupType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/license_mode.py b/flat_api/aio/models/license_mode.py new file mode 100644 index 0000000..7758678 --- /dev/null +++ b/flat_api/aio/models/license_mode.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LicenseMode(str, Enum): + """ + Mode of the license + """ + + """ + allowed enum values + """ + CREDIT = 'credit' + SITE = 'site' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LicenseMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/license_sources.py b/flat_api/aio/models/license_sources.py new file mode 100644 index 0000000..0ab0988 --- /dev/null +++ b/flat_api/aio/models/license_sources.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LicenseSources(str, Enum): + """ + Source of the license + """ + + """ + allowed enum values + """ + ORDER = 'order' + TRIAL = 'trial' + VOUCHER = 'voucher' + DISTRIBUTOR = 'distributor' + SUBSCRIPTION = 'subscription' + APPSTORE = 'appStore' + PLAYSTORE = 'playStore' + MUSICFIRST = 'musicfirst' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LicenseSources from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/lms_name.py b/flat_api/aio/models/lms_name.py new file mode 100644 index 0000000..5648b1b --- /dev/null +++ b/flat_api/aio/models/lms_name.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class LmsName(str, Enum): + """ + LMS name + """ + + """ + allowed enum values + """ + CANVAS = 'canvas' + MOODLE = 'moodle' + SCHOOLOGY = 'schoology' + BLACKBOARD = 'blackboard' + DESIRE2LEARN = 'desire2learn' + SAKAI = 'sakai' + SCHOOLBOX = 'schoolbox' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LmsName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/lti_configuration.py b/flat_api/aio/models/lti_configuration.py new file mode 100644 index 0000000..46a8973 --- /dev/null +++ b/flat_api/aio/models/lti_configuration.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.lti_configuration1p1 import LtiConfiguration1p1 +from flat_api.aio.models.lti_configuration1p3 import LtiConfiguration1p3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATION_ONE_OF_SCHEMAS = ["LtiConfiguration1p1", "LtiConfiguration1p3"] + +class LtiConfiguration(BaseModel): + """ + LTI configuration details (unified 1.1 and 1.3) + """ + # data type: LtiConfiguration1p1 + oneof_schema_1_validator: Optional[LtiConfiguration1p1] = None + # data type: LtiConfiguration1p3 + oneof_schema_2_validator: Optional[LtiConfiguration1p3] = None + actual_instance: Optional[Union[LtiConfiguration1p1, LtiConfiguration1p3]] = None + one_of_schemas: Set[str] = { "LtiConfiguration1p1", "LtiConfiguration1p3" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + 'createLtiConfiguration_200_response': 'CreateLtiConfiguration200Response' + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfiguration.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfiguration1p1 + if not isinstance(v, LtiConfiguration1p1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p1`") + else: + match += 1 + # validate data type: LtiConfiguration1p3 + if not isinstance(v, LtiConfiguration1p3): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfiguration1p1 + try: + instance.actual_instance = LtiConfiguration1p1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3 + try: + instance.actual_instance = LtiConfiguration1p3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfiguration1p1, LtiConfiguration1p3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/lti_configuration1p1.py b/flat_api/aio/models/lti_configuration1p1.py new file mode 100644 index 0000000..f2dab43 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p1.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p1(BaseModel): + """ + LtiConfiguration1p1 + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.1)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + consumer_key: Optional[StrictStr] = Field(default=None, description="LTI 1.1 consumer key", alias="consumerKey") + consumer_secret: Optional[StrictStr] = Field(default=None, description="LTI 1.1 consumer secret (only included for admins)", alias="consumerSecret") + lms: Optional[StrictStr] = Field(default=None, description="LMS type") + name: Optional[StrictStr] = Field(default=None, description="Configuration name") + tool: Optional[LtiConfiguration1p1AllOfTool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1']): + raise ValueError("must be one of enum values ('1p1')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret"), + "lms": obj.get("lms"), + "name": obj.get("name"), + "tool": LtiConfiguration1p1AllOfTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p1_all_of_tool.py b/flat_api/aio/models/lti_configuration1p1_all_of_tool.py new file mode 100644 index 0000000..39bbbbc --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p1_all_of_tool.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p1AllOfTool(BaseModel): + """ + Platform/tool product information + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Product family code (e.g., canvas, moodle, schoology)") + version: Optional[StrictStr] = Field(default=None, description="Platform version string") + instance_name: Optional[StrictStr] = Field(default=None, description="Instance display name", alias="instanceName") + instance_guid: Optional[StrictStr] = Field(default=None, description="Unique instance identifier", alias="instanceGuid") + instance_contact: Optional[StrictStr] = Field(default=None, description="Contact email or handle for the instance", alias="instanceContact") + instance_domain: Optional[StrictStr] = Field(default=None, description="Instance root domain", alias="instanceDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product", "version", "instanceName", "instanceGuid", "instanceContact", "instanceDomain"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1AllOfTool from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1AllOfTool from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product"), + "version": obj.get("version"), + "instanceName": obj.get("instanceName"), + "instanceGuid": obj.get("instanceGuid"), + "instanceContact": obj.get("instanceContact"), + "instanceDomain": obj.get("instanceDomain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3.py b/flat_api/aio/models/lti_configuration1p3.py new file mode 100644 index 0000000..e770f6e --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment +from flat_api.aio.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic +from flat_api.aio.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATION1P3_ONE_OF_SCHEMAS = ["LtiConfiguration1p3Deployment", "LtiConfiguration1p3Dynamic", "LtiConfiguration1p3Manual"] + +class LtiConfiguration1p3(BaseModel): + """ + LTI 1.3 configuration details + """ + # data type: LtiConfiguration1p3Manual + oneof_schema_1_validator: Optional[LtiConfiguration1p3Manual] = None + # data type: LtiConfiguration1p3Deployment + oneof_schema_2_validator: Optional[LtiConfiguration1p3Deployment] = None + # data type: LtiConfiguration1p3Dynamic + oneof_schema_3_validator: Optional[LtiConfiguration1p3Dynamic] = None + actual_instance: Optional[Union[LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual]] = None + one_of_schemas: Set[str] = { "LtiConfiguration1p3Deployment", "LtiConfiguration1p3Dynamic", "LtiConfiguration1p3Manual" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfiguration1p3.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfiguration1p3Manual + if not isinstance(v, LtiConfiguration1p3Manual): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Manual`") + else: + match += 1 + # validate data type: LtiConfiguration1p3Deployment + if not isinstance(v, LtiConfiguration1p3Deployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Deployment`") + else: + match += 1 + # validate data type: LtiConfiguration1p3Dynamic + if not isinstance(v, LtiConfiguration1p3Dynamic): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Dynamic`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfiguration1p3Manual + try: + instance.actual_instance = LtiConfiguration1p3Manual.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3Deployment + try: + instance.actual_instance = LtiConfiguration1p3Deployment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3Dynamic + try: + instance.actual_instance = LtiConfiguration1p3Dynamic.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/lti_configuration1p3_base.py b/flat_api/aio/models/lti_configuration1p3_base.py new file mode 100644 index 0000000..100f49e --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Base(BaseModel): + """ + LtiConfiguration1p3Base + """ # noqa: E501 + mode: Optional[StrictStr] = Field(default=None, description="LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-manual', '1p3-deployment', '1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-manual', '1p3-deployment', '1p3-dynamic')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Base from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Base from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services.py new file mode 100644 index 0000000..5a6cfd1 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.aio.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.aio.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServices(BaseModel): + """ + LTI services support information + """ # noqa: E501 + ags: Optional[LtiConfiguration1p3BaseSupportedServicesAgs] = None + nrps: Optional[LtiConfiguration1p3BaseSupportedServicesNrps] = None + deep_linking: Optional[LtiConfiguration1p3BaseSupportedServicesDeepLinking] = Field(default=None, alias="deepLinking") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ags", "nrps", "deepLinking"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServices from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ags + if self.ags: + _dict['ags'] = self.ags.to_dict() + # override the default output from pydantic by calling `to_dict()` of nrps + if self.nrps: + _dict['nrps'] = self.nrps.to_dict() + # override the default output from pydantic by calling `to_dict()` of deep_linking + if self.deep_linking: + _dict['deepLinking'] = self.deep_linking.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServices from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ags": LtiConfiguration1p3BaseSupportedServicesAgs.from_dict(obj["ags"]) if obj.get("ags") is not None else None, + "nrps": LtiConfiguration1p3BaseSupportedServicesNrps.from_dict(obj["nrps"]) if obj.get("nrps") is not None else None, + "deepLinking": LtiConfiguration1p3BaseSupportedServicesDeepLinking.from_dict(obj["deepLinking"]) if obj.get("deepLinking") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py new file mode 100644 index 0000000..30cc3b5 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesAgs(BaseModel): + """ + Assignment and Grade Services support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether AGS claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="AGS version supported (e.g., \"2.0\")") + enabled: Optional[StrictBool] = Field(default=None, description="Whether we have AGS enabled for this platform") + lineitems_url: Optional[StrictStr] = Field(default=None, description="Base URL for line items operations as provided by the platform", alias="lineitemsUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version", "enabled", "lineitemsUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version"), + "enabled": obj.get("enabled"), + "lineitemsUrl": obj.get("lineitemsUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py new file mode 100644 index 0000000..a92f835 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesDeepLinking(BaseModel): + """ + Deep Linking support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether Deep Linking claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="Deep Linking version supported (e.g., \"2.0\")") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py new file mode 100644 index 0000000..580fff9 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesNrps(BaseModel): + """ + Names and Role Provisioning Services support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether NRPS claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="NRPS version supported (e.g., \"2.0\")") + enabled: Optional[StrictBool] = Field(default=None, description="Whether we have NRPS enabled for this platform") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version", "enabled"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_base_tool.py b/flat_api/aio/models/lti_configuration1p3_base_tool.py new file mode 100644 index 0000000..9fd38e6 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_base_tool.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseTool(BaseModel): + """ + Platform/tool product information + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Product family code (e.g., canvas, moodle, schoology)") + version: Optional[StrictStr] = Field(default=None, description="Platform version string") + instance_name: Optional[StrictStr] = Field(default=None, description="Instance name (e.g., 'My University Canvas')", alias="instanceName") + instance_guid: Optional[StrictStr] = Field(default=None, description="Unique instance identifier", alias="instanceGuid") + instance_contact: Optional[StrictStr] = Field(default=None, description="Contact email or handle for the instance", alias="instanceContact") + instance_domain: Optional[StrictStr] = Field(default=None, description="Instance root domain", alias="instanceDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product", "version", "instanceName", "instanceGuid", "instanceContact", "instanceDomain"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseTool from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseTool from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product"), + "version": obj.get("version"), + "instanceName": obj.get("instanceName"), + "instanceGuid": obj.get("instanceGuid"), + "instanceContact": obj.get("instanceContact"), + "instanceDomain": obj.get("instanceDomain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_deployment.py b/flat_api/aio/models/lti_configuration1p3_deployment.py new file mode 100644 index 0000000..f248c5d --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_deployment.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Deployment(BaseModel): + """ + LtiConfiguration1p3Deployment + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Deployment-based LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + parent_id: Optional[StrictStr] = Field(default=None, description="Parent configuration ID (for deployment-based configs)", alias="parentId") + deployment_key: Optional[StrictStr] = Field(default=None, description="Deployment key (e.g., schoology, classlink)", alias="deploymentKey") + deployment_breakdown_by: Optional[StrictStr] = Field(default=None, description="Custom claim used for tenant identification (parent platforms only, read-only)", alias="deploymentBreakdownBy") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (child platforms only)", alias="deploymentBreakdownId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-deployment']): + raise ValueError("must be one of enum values ('1p3-deployment')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Deployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Deployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "parentId": obj.get("parentId"), + "deploymentKey": obj.get("deploymentKey"), + "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_dynamic.py b/flat_api/aio/models/lti_configuration1p3_dynamic.py new file mode 100644 index 0000000..772cad1 --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_dynamic.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Dynamic(BaseModel): + """ + LtiConfiguration1p3Dynamic + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Dynamic registration LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + registration_token: Optional[StrictStr] = Field(default=None, description="Only included for admins", alias="registrationToken") + registration_url: Optional[StrictStr] = Field(default=None, description="Dynamic registration URL (only included for admins when available)", alias="registrationUrl") + registration_token_used: Optional[StrictBool] = Field(default=None, description="Whether dynamic registration token has been used", alias="registrationTokenUsed") + registration_completion_date: Optional[datetime] = Field(default=None, description="Date when dynamic registration completed (null when not completed)", alias="registrationCompletionDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-dynamic')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Dynamic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if registration_completion_date (nullable) is None + # and model_fields_set contains the field + if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: + _dict['registrationCompletionDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Dynamic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "registrationToken": obj.get("registrationToken"), + "registrationUrl": obj.get("registrationUrl"), + "registrationTokenUsed": obj.get("registrationTokenUsed"), + "registrationCompletionDate": obj.get("registrationCompletionDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration1p3_manual.py b/flat_api/aio/models/lti_configuration1p3_manual.py new file mode 100644 index 0000000..4ef9ebd --- /dev/null +++ b/flat_api/aio/models/lti_configuration1p3_manual.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Manual(BaseModel): + """ + LtiConfiguration1p3Manual + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Manual LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-manual']): + raise ValueError("must be one of enum values ('1p3-manual')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Manual from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Manual from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_base.py b/flat_api/aio/models/lti_configuration_base.py new file mode 100644 index 0000000..876e041 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_base.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationBase(BaseModel): + """ + LtiConfigurationBase + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1', '1p3']): + raise ValueError("must be one of enum values ('1p1', '1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if last_used_date (nullable) is None + # and model_fields_set contains the field + if self.last_used_date is None and "last_used_date" in self.model_fields_set: + _dict['lastUsedDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_create.py b/flat_api/aio/models/lti_configuration_create.py new file mode 100644 index 0000000..a9bb2c4 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 +from flat_api.aio.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment +from flat_api.aio.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic +from flat_api.aio.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATIONCREATE_ONE_OF_SCHEMAS = ["LtiConfigurationCreate1p1", "LtiConfigurationCreate1p3Deployment", "LtiConfigurationCreate1p3Dynamic", "LtiConfigurationCreate1p3Manual"] + +class LtiConfigurationCreate(BaseModel): + """ + Request to create a new LTI configuration (unified 1.1 and 1.3) + """ + # data type: LtiConfigurationCreate1p1 + oneof_schema_1_validator: Optional[LtiConfigurationCreate1p1] = None + # data type: LtiConfigurationCreate1p3Dynamic + oneof_schema_2_validator: Optional[LtiConfigurationCreate1p3Dynamic] = None + # data type: LtiConfigurationCreate1p3Deployment + oneof_schema_3_validator: Optional[LtiConfigurationCreate1p3Deployment] = None + # data type: LtiConfigurationCreate1p3Manual + oneof_schema_4_validator: Optional[LtiConfigurationCreate1p3Manual] = None + actual_instance: Optional[Union[LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual]] = None + one_of_schemas: Set[str] = { "LtiConfigurationCreate1p1", "LtiConfigurationCreate1p3Deployment", "LtiConfigurationCreate1p3Dynamic", "LtiConfigurationCreate1p3Manual" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfigurationCreate.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfigurationCreate1p1 + if not isinstance(v, LtiConfigurationCreate1p1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p1`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Dynamic + if not isinstance(v, LtiConfigurationCreate1p3Dynamic): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Dynamic`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Deployment + if not isinstance(v, LtiConfigurationCreate1p3Deployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Deployment`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Manual + if not isinstance(v, LtiConfigurationCreate1p3Manual): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Manual`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfigurationCreate1p1 + try: + instance.actual_instance = LtiConfigurationCreate1p1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Dynamic + try: + instance.actual_instance = LtiConfigurationCreate1p3Dynamic.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Deployment + try: + instance.actual_instance = LtiConfigurationCreate1p3Deployment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Manual + try: + instance.actual_instance = LtiConfigurationCreate1p3Manual.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/lti_configuration_create1p1.py b/flat_api/aio/models/lti_configuration_create1p1.py new file mode 100644 index 0000000..32e8ea9 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create1p1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p1(BaseModel): + """ + LTI 1.1 manual configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.1 manual creation mode") + name: Optional[StrictStr] = Field(default=None, description="Display name for LTI 1.1 credentials") + lms: Optional[StrictStr] = Field(default=None, description="LMS identifier for LTI 1.1 credentials") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "name", "lms"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1-manual']): + raise ValueError("must be one of enum values ('1p1-manual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "name": obj.get("name"), + "lms": obj.get("lms") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_create1p3_deployment.py b/flat_api/aio/models/lti_configuration_create1p3_deployment.py new file mode 100644 index 0000000..8a261d9 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create1p3_deployment.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Deployment(BaseModel): + """ + LTI 1.3 deployment-based configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 deployment-based creation mode") + deployment_type: StrictStr = Field(description="Parent platform key (e.g., canvas, blackboard, schoology, classlink)", alias="deploymentType") + deployment_id: StrictStr = Field(description="Deployment identifier provided by the platform", alias="deploymentId") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id for the tenant; required for ClassLink deployments", alias="clientId") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology)", alias="deploymentBreakdownId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "deploymentType", "deploymentId", "clientId", "deploymentBreakdownId"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-deployment']): + raise ValueError("must be one of enum values ('1p3-deployment')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Deployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Deployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "deploymentType": obj.get("deploymentType"), + "deploymentId": obj.get("deploymentId"), + "clientId": obj.get("clientId"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_create1p3_dynamic.py b/flat_api/aio/models/lti_configuration_create1p3_dynamic.py new file mode 100644 index 0000000..42ace80 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create1p3_dynamic.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Dynamic(BaseModel): + """ + LTI 1.3 dynamic registration configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 dynamic registration mode") + platform_info: Optional[LtiConfigurationCreate1p3DynamicPlatformInfo] = Field(default=None, alias="platformInfo") + locale: Optional[StrictStr] = Field(default=None, description="Optional locale code for registration URL. Input values will be automatically normalized to a supported locale code.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformInfo", "locale"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-dynamic')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Dynamic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of platform_info + if self.platform_info: + _dict['platformInfo'] = self.platform_info.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Dynamic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformInfo": LtiConfigurationCreate1p3DynamicPlatformInfo.from_dict(obj["platformInfo"]) if obj.get("platformInfo") is not None else None, + "locale": obj.get("locale") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py b/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py new file mode 100644 index 0000000..546fa43 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3DynamicPlatformInfo(BaseModel): + """ + Optional platform information for dynamic registration + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Platform display name") + url: Optional[StrictStr] = Field(default=None, description="Optional platform homepage or admin URL for reference") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "url"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_create1p3_manual.py b/flat_api/aio/models/lti_configuration_create1p3_manual.py new file mode 100644 index 0000000..c52d1a1 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_create1p3_manual.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Manual(BaseModel): + """ + LTI 1.3 manual configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 manual creation mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="Platform access token endpoint URL", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="Platform OIDC authorization endpoint URL", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint URL for public keys", alias="jwksUrl") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "enableEmailMatching"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-manual']): + raise ValueError("must be one of enum values ('1p3-manual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Manual from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Manual from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_update.py b/flat_api/aio/models/lti_configuration_update.py new file mode 100644 index 0000000..52ac125 --- /dev/null +++ b/flat_api/aio/models/lti_configuration_update.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from flat_api.aio.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment +from flat_api.aio.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +LTICONFIGURATIONUPDATE_ANY_OF_SCHEMAS = ["LtiConfigurationUpdateDeployment", "LtiConfigurationUpdateStandalone"] + +class LtiConfigurationUpdate(BaseModel): + """ + Update an existing LTI 1.3 configuration (deployment clone or standalone) + """ + + # data type: LtiConfigurationUpdateDeployment + anyof_schema_1_validator: Optional[LtiConfigurationUpdateDeployment] = None + # data type: LtiConfigurationUpdateStandalone + anyof_schema_2_validator: Optional[LtiConfigurationUpdateStandalone] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "LtiConfigurationUpdateDeployment", "LtiConfigurationUpdateStandalone" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = LtiConfigurationUpdate.model_construct() + error_messages = [] + # validate data type: LtiConfigurationUpdateDeployment + if not isinstance(v, LtiConfigurationUpdateDeployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationUpdateDeployment`") + else: + return v + + # validate data type: LtiConfigurationUpdateStandalone + if not isinstance(v, LtiConfigurationUpdateStandalone): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationUpdateStandalone`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in LtiConfigurationUpdate with anyOf schemas: LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[LtiConfigurationUpdateDeployment] = None + try: + instance.actual_instance = LtiConfigurationUpdateDeployment.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[LtiConfigurationUpdateStandalone] = None + try: + instance.actual_instance = LtiConfigurationUpdateStandalone.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfigurationUpdate with anyOf schemas: LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/lti_configuration_update_deployment.py b/flat_api/aio/models/lti_configuration_update_deployment.py new file mode 100644 index 0000000..910c8eb --- /dev/null +++ b/flat_api/aio/models/lti_configuration_update_deployment.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationUpdateDeployment(BaseModel): + """ + Update fields allowed for deployment-based configurations + """ # noqa: E501 + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Specific tenant identifier for multi-tenant platforms", alias="deploymentBreakdownId") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deploymentId", "deploymentBreakdownId", "enableEmailMatching"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateDeployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateDeployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deploymentId": obj.get("deploymentId"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_configuration_update_standalone.py b/flat_api/aio/models/lti_configuration_update_standalone.py new file mode 100644 index 0000000..b21686a --- /dev/null +++ b/flat_api/aio/models/lti_configuration_update_standalone.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationUpdateStandalone(BaseModel): + """ + Update fields allowed for standalone (manual/dynamic) configurations + """ # noqa: E501 + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + access_token_url: Optional[StrictStr] = Field(default=None, description="Platform access token endpoint URL", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="Platform OIDC authorization endpoint URL", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint URL for public keys", alias="jwksUrl") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deploymentId", "platformIss", "platformName", "clientId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "enableEmailMatching"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateStandalone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateStandalone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deploymentId": obj.get("deploymentId"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_credentials.py b/flat_api/aio/models/lti_credentials.py new file mode 100644 index 0000000..a52582a --- /dev/null +++ b/flat_api/aio/models/lti_credentials.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.lms_name import LmsName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiCredentials(BaseModel): + """ + A couple of LTI 1.x OAuth credentials + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this couple of credentials") + name: Optional[StrictStr] = Field(default=None, description="Name of the couple of credentials") + lms: Optional[LmsName] = None + organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization associated to these credentials") + creator: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user who created these credentials") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of thse credentials", alias="creationDate") + last_usage: Optional[datetime] = Field(default=None, description="The last time these credentials were used", alias="lastUsage") + consumer_key: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Key", alias="consumerKey") + consumer_secret: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Secret", alias="consumerSecret") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", "enableEmailMatching"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "lms": obj.get("lms"), + "organization": obj.get("organization"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "lastUsage": obj.get("lastUsage"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/lti_credentials_creation.py b/flat_api/aio/models/lti_credentials_creation.py new file mode 100644 index 0000000..a2d40b5 --- /dev/null +++ b/flat_api/aio/models/lti_credentials_creation.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from flat_api.aio.models.lms_name import LmsName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiCredentialsCreation(BaseModel): + """ + Creation of a couple of LTI 1.x OAuth credentials + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the couple of credentials") + lms: LmsName + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "lms"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiCredentialsCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiCredentialsCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "lms": obj.get("lms") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/media_attachment.py b/flat_api/aio/models/media_attachment.py new file mode 100644 index 0000000..bd46eee --- /dev/null +++ b/flat_api/aio/models/media_attachment.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.media_score_sharing_mode import MediaScoreSharingMode +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class MediaAttachment(BaseModel): + """ + Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object + """ # noqa: E501 + type: StrictStr = Field(description="The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") + score: Optional[StrictStr] = Field(default=None, description="An unique Flat score identifier") + revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + dedicated: Optional[StrictBool] = Field(default=None, description="True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment") + track: Optional[StrictStr] = Field(default=None, description="A unique track identifier") + part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") + lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") + title: Optional[StrictStr] = Field(default=None, description="The resolved title of the attachment") + description: Optional[StrictStr] = Field(default=None, description="The resolved description of the attachment") + html: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich` or `video`, the HTML code of the media to display ") + html_width: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If the `html` is available, the width of the widget", alias="htmlWidth") + html_height: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If the `html` is available, the height of the widget", alias="htmlHeight") + url: Optional[StrictStr] = Field(default=None, description="The url of the attachment") + thumbnail_url: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment ", alias="thumbnailUrl") + thumbnail_width: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailWidth") + thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailHeight") + author_name: Optional[StrictStr] = Field(default=None, description="The resolved author name of the attachment", alias="authorName") + author_url: Optional[StrictStr] = Field(default=None, description="The resolved author url of the attachment", alias="authorUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the icon", alias="iconUrl") + mime_type: Optional[StrictStr] = Field(default=None, description="The mine type of the file", alias="mimeType") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") + teacher_only: Optional[StrictBool] = Field(default=False, description="If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. ", alias="teacherOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "score", "revision", "worksheet", "dedicated", "track", "partUuid", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", "teacherOnly"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaAttachment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaAttachment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "score": obj.get("score"), + "revision": obj.get("revision"), + "worksheet": obj.get("worksheet"), + "dedicated": obj.get("dedicated"), + "track": obj.get("track"), + "partUuid": obj.get("partUuid"), + "sharingMode": obj.get("sharingMode") if obj.get("sharingMode") is not None else MediaScoreSharingMode.READ, + "lockScoreTemplate": obj.get("lockScoreTemplate"), + "title": obj.get("title"), + "description": obj.get("description"), + "html": obj.get("html"), + "htmlWidth": obj.get("htmlWidth"), + "htmlHeight": obj.get("htmlHeight"), + "url": obj.get("url"), + "thumbnailUrl": obj.get("thumbnailUrl"), + "thumbnailWidth": obj.get("thumbnailWidth"), + "thumbnailHeight": obj.get("thumbnailHeight"), + "authorName": obj.get("authorName"), + "authorUrl": obj.get("authorUrl"), + "iconUrl": obj.get("iconUrl"), + "mimeType": obj.get("mimeType"), + "googleDriveFileId": obj.get("googleDriveFileId"), + "teacherOnly": obj.get("teacherOnly") if obj.get("teacherOnly") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/media_score_sharing_mode.py b/flat_api/aio/models/media_score_sharing_mode.py new file mode 100644 index 0000000..90e7e14 --- /dev/null +++ b/flat_api/aio/models/media_score_sharing_mode.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class MediaScoreSharingMode(str, Enum): + """ + The sharing mode of the score for classes post and assignments + """ + + """ + allowed enum values + """ + READ = 'read' + WRITE = 'write' + COPY = 'copy' + PERFORMANCE = 'performance' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MediaScoreSharingMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/microsoft_graph_assignment.py b/flat_api/aio/models/microsoft_graph_assignment.py new file mode 100644 index 0000000..299edef --- /dev/null +++ b/flat_api/aio/models/microsoft_graph_assignment.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class MicrosoftGraphAssignment(BaseModel): + """ + A Microsoft Teams assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the assignment assigned by Microsoft Teams") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment on Microsoft Teams. * `draft`: Assignment is in draft mode * `scheduled`: Assignment is scheduled to be published at a future date * `published`: Assignment has been published to students * `assigned`: Assignment has been assigned (legacy status) * `inactive`: Assignment is inactive ") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this assignment in the Microsoft Teams web UI", alias="alternateLink") + assign_date_time: Optional[datetime] = Field(default=None, description="The date when the assignment will become active on Microsoft Teams. If set to a future date, the assignment will have status `scheduled` and won't be visible to students until this date. ", alias="assignDateTime") + categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories where this assignment is published under") + assign_to_type: Optional[StrictStr] = Field(default=None, description="Recipient configuration for this assignment on Microsoft Teams. * `class`: Assignment is visible to all students in the class * `individual`: Assignment is visible only to specific assigned students ", alias="assignToType") + assigned_students_ms_ids: Optional[List[StrictStr]] = Field(default=None, description="When assignToType is 'individual', array of Microsoft Azure user IDs of students assigned to this assignment. These are the students who can see and submit to this assignment on Teams. ", alias="assignedStudentsMsIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "assignDateTime", "categories", "assignToType", "assignedStudentsMsIds"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'scheduled', 'published', 'assigned', 'inactive']): + raise ValueError("must be one of enum values ('draft', 'scheduled', 'published', 'assigned', 'inactive')") + return value + + @field_validator('assign_to_type') + def assign_to_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['class', 'individual']): + raise ValueError("must be one of enum values ('class', 'individual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MicrosoftGraphAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MicrosoftGraphAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state"), + "alternateLink": obj.get("alternateLink"), + "assignDateTime": obj.get("assignDateTime"), + "categories": obj.get("categories"), + "assignToType": obj.get("assignToType"), + "assignedStudentsMsIds": obj.get("assignedStudentsMsIds") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/microsoft_graph_submission.py b/flat_api/aio/models/microsoft_graph_submission.py new file mode 100644 index 0000000..8014efe --- /dev/null +++ b/flat_api/aio/models/microsoft_graph_submission.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class MicrosoftGraphSubmission(BaseModel): + """ + A Microsoft Teams submission + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the submission assigned by Microsoft Teams") + state: StrictStr = Field(description="State of the submission") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MicrosoftGraphSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MicrosoftGraphSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_capabilities.py b/flat_api/aio/models/omr_capabilities.py new file mode 100644 index 0000000..2868202 --- /dev/null +++ b/flat_api/aio/models/omr_capabilities.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.omr_job_output import OmrJobOutput +from flat_api.aio.models.omr_locale_details import OmrLocaleDetails +from flat_api.aio.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrCapabilities(BaseModel): + """ + What the account or app can do, for client feature-detection. + """ # noqa: E501 + steps: List[OmrStepName] = Field(description="Interactive steps this server supports.") + formats: List[StrictStr] = Field(description="Export formats available via `getOmrJobExport`.") + outputs: List[OmrJobOutput] = Field(description="Output destinations the account can use when creating a job.") + max_files: StrictInt = Field(description="Maximum number of input files that can be added to a single job.", alias="maxFiles") + max_pages: StrictInt = Field(description="Maximum number of pages allowed across all input files of a single job.", alias="maxPages") + max_parallel_jobs: StrictInt = Field(description="Maximum number of OMR jobs that can run in parallel for this account.", alias="maxParallelJobs") + max_file_size: StrictInt = Field(description="Maximum size of a single file, in bytes.", alias="maxFileSize") + accepted_mime_types: List[StrictStr] = Field(description="MIME types accepted for input files: PDF, plus the raster image formats. Drive the file picker from this list rather than hardcoding it, so newly supported formats need no client release. A file is identified by its content, so its declared type and its extension do not have to match. A multi-page input counts as several pages against `maxPages` and is charged accordingly. That covers PDFs and, among the image formats, multi-page TIFF and animated GIF/WebP. ", alias="acceptedMimeTypes") + accepted_extensions: List[StrictStr] = Field(description="Filename extensions the accepted types appear under, for building a file picker. Use these alongside `acceptedMimeTypes` in an `accept` attribute: browsers and native file dialogs filter unreliably on some of the image types, so a valid file can be greyed out when only its MIME type is offered. Longer than `acceptedMimeTypes`, because one type arrives under several extensions (`.jpg` and `.jpeg`, `.tif` and `.tiff`, `.heic` and `.heif`). Picker metadata only. A file is identified by its content, so its extension never decides whether an upload is accepted. ", alias="acceptedExtensions") + cost_per_page: Optional[StrictInt] = Field(default=None, description="Credits charged per page.", alias="costPerPage") + remaining_credits: Optional[StrictInt] = Field(default=None, description="OMR credits remaining for the account.", alias="remainingCredits") + retention_days: Optional[StrictInt] = Field(default=None, description="How many days a `musicxml` job's uploaded files and results are kept before erasure. Reflects the account's own period when one has been set, otherwise the platform default. Read-only: contact support to change it. Jobs with `output: library` are not covered by the retention policy and are unaffected by this value. ", alias="retentionDays") + locales: List[StrictStr] = Field(description="Locales selectable for OCR, as BCP 47 codes sorted alphabetically. These are the locales the recognition pipeline can actually read, which is neither the list of Flat interface locales nor a fixed set: new languages are added over time. Clients should default to the user's own locale when it appears here. ") + locales_details: List[OmrLocaleDetails] = Field(description="The same locales as `locales`, each with its English display name, sorted alphabetically by `name` and ready to bind to a language picker. Prefer this over `locales` when rendering a selector: it saves clients from shipping their own code-to-label table. ", alias="localesDetails") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["steps", "formats", "outputs", "maxFiles", "maxPages", "maxParallelJobs", "maxFileSize", "acceptedMimeTypes", "acceptedExtensions", "costPerPage", "remainingCredits", "retentionDays", "locales", "localesDetails"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in locales_details (list) + _items = [] + if self.locales_details: + for _item_locales_details in self.locales_details: + if _item_locales_details: + _items.append(_item_locales_details.to_dict()) + _dict['localesDetails'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "steps": obj.get("steps"), + "formats": obj.get("formats"), + "outputs": obj.get("outputs"), + "maxFiles": obj.get("maxFiles"), + "maxPages": obj.get("maxPages"), + "maxParallelJobs": obj.get("maxParallelJobs"), + "maxFileSize": obj.get("maxFileSize"), + "acceptedMimeTypes": obj.get("acceptedMimeTypes"), + "acceptedExtensions": obj.get("acceptedExtensions"), + "costPerPage": obj.get("costPerPage"), + "remainingCredits": obj.get("remainingCredits"), + "retentionDays": obj.get("retentionDays"), + "locales": obj.get("locales"), + "localesDetails": [OmrLocaleDetails.from_dict(_item) for _item in obj["localesDetails"]] if obj.get("localesDetails") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_details_step_data.py b/flat_api/aio/models/omr_details_step_data.py new file mode 100644 index 0000000..f268321 --- /dev/null +++ b/flat_api/aio/models/omr_details_step_data.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.omr_detected_instrument import OmrDetectedInstrument +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetailsStepData(BaseModel): + """ + Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). + """ # noqa: E501 + step: StrictStr = Field(description="Discriminator for `OmrPendingStep.data`; always `details` for this payload.") + title: Optional[StrictStr] = Field(default=None, description="OCR-detected work title.") + instruments: List[OmrDetectedInstrument] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["step", "title", "instruments"] + + @field_validator('step') + def step_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['details']): + raise ValueError("must be one of enum values ('details')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetailsStepData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetailsStepData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "title": obj.get("title"), + "instruments": [OmrDetectedInstrument.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_details_submission.py b/flat_api/aio/models/omr_details_submission.py new file mode 100644 index 0000000..6077574 --- /dev/null +++ b/flat_api/aio/models/omr_details_submission.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.omr_instrument_override import OmrInstrumentOverride +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetailsSubmission(BaseModel): + """ + Overrides for the `details` step. Omitted fields keep the server's detected values. + """ # noqa: E501 + step: StrictStr = Field(description="Discriminator for `OmrStepSubmission`; always `details` for this submission.") + title: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Override the detected work title.") + main_language: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=35)]] = Field(default=None, description="Override the main language (BCP 47) used for lyric and text reading on resume. Defaults to the job locale (`locales`); set this to correct it on the review screen. ", alias="mainLanguage") + instruments: Optional[Annotated[List[OmrInstrumentOverride], Field(max_length=200)]] = Field(default=None, description="Per-part overrides, each matched to a detected part by `index`.") + __properties: ClassVar[List[str]] = ["step", "title", "mainLanguage", "instruments"] + + @field_validator('step') + def step_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['details']): + raise ValueError("must be one of enum values ('details')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetailsSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetailsSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "title": obj.get("title"), + "mainLanguage": obj.get("mainLanguage"), + "instruments": [OmrInstrumentOverride.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + return _obj + + diff --git a/flat_api/aio/models/omr_detected_instrument.py b/flat_api/aio/models/omr_detected_instrument.py new file mode 100644 index 0000000..e6e19e5 --- /dev/null +++ b/flat_api/aio/models/omr_detected_instrument.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetectedInstrument(BaseModel): + """ + One detected part. + """ # noqa: E501 + index: StrictInt = Field(description="0-based position of the part in the score.") + part_name: Optional[StrictStr] = Field(default=None, description="Verbatim part name read from the score.", alias="partName") + instrument_id: Optional[StrictStr] = Field(default=None, description="Flat instrument ID in dotted `.` form, for example `brass.horn` or `vocals.voice-oohs`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments). Always the canonical (non-premium) ID.", alias="instrumentId") + instrument_name: Optional[StrictStr] = Field(default=None, description="Localized display name, resolved server-side so the client needs no instruments dictionary.", alias="instrumentName") + midi_program: Optional[StrictInt] = Field(default=None, description="General MIDI program number.", alias="midiProgram") + transpose_key: Optional[StrictStr] = Field(default=None, description="Transposition or written key shown in the UI, for example `F` for Horn in F.", alias="transposeKey") + resolved_confidence: Optional[StrictStr] = Field(default=None, description="Server confidence in the resolved instrument match.", alias="resolvedConfidence") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["index", "partName", "instrumentId", "instrumentName", "midiProgram", "transposeKey", "resolvedConfidence"] + + @field_validator('resolved_confidence') + def resolved_confidence_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['high', 'medium', 'low']): + raise ValueError("must be one of enum values ('high', 'medium', 'low')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetectedInstrument from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetectedInstrument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "partName": obj.get("partName"), + "instrumentId": obj.get("instrumentId"), + "instrumentName": obj.get("instrumentName"), + "midiProgram": obj.get("midiProgram"), + "transposeKey": obj.get("transposeKey"), + "resolvedConfidence": obj.get("resolvedConfidence") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_imported_metadata.py b/flat_api/aio/models/omr_imported_metadata.py new file mode 100644 index 0000000..38a8ae4 --- /dev/null +++ b/flat_api/aio/models/omr_imported_metadata.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrImportedMetadata(BaseModel): + """ + Metadata extracted from the recognized score. + """ # noqa: E501 + instruments: Optional[List[StrictStr]] = Field(default=None, description="Instrument IDs of the assembled parts.") + number_measures: Optional[StrictInt] = Field(default=None, description="Number of measures in the recognized score.", alias="numberMeasures") + main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Main tempo, in quarter notes per minute.", alias="mainTempoQpm") + main_key_signature: Optional[StrictInt] = Field(default=None, description="Main key signature as a fifths count (negative for flats, positive for sharps, 0 for C major / A minor).", alias="mainKeySignature") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instruments", "numberMeasures", "mainTempoQpm", "mainKeySignature"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrImportedMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrImportedMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instruments": obj.get("instruments"), + "numberMeasures": obj.get("numberMeasures"), + "mainTempoQpm": obj.get("mainTempoQpm"), + "mainKeySignature": obj.get("mainKeySignature") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_instrument_override.py b/flat_api/aio/models/omr_instrument_override.py new file mode 100644 index 0000000..984298c --- /dev/null +++ b/flat_api/aio/models/omr_instrument_override.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrInstrumentOverride(BaseModel): + """ + Override for a single detected part, matched by `index`. Omitted fields keep the detected value. To set the instrument you may use **either** `instrumentId` (Flat's instrument id) **or** `midiProgram` (a standard General MIDI program) — whichever your integration prefers; you do not need both. If both are sent, `instrumentId` wins; otherwise `midiProgram` is resolved to the matching instrument; otherwise the detected instrument is kept. `transposeKey` and `partName` apply independently on top. + """ # noqa: E501 + index: Annotated[int, Field(strict=True, ge=0)] = Field(description="0-based position of the part to override, matching the `index` of the detected part.") + instrument_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(default=None, description="Override the resolved instrument with this Flat instrument id, for example `brass.horn`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for valid values. Both the dotted `.` form (`brass.horn`) and the bare instrument key (`horn`) are accepted. Use this or `midiProgram`. Takes precedence over `midiProgram` when both are set. ", alias="instrumentId") + part_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Override the part name.", alias="partName") + transpose_key: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Override the transposition / written key: a pitch class as a letter `A`-`G` with an optional accidental. For example `F` for Horn in F or `Bb` for a B flat clarinet. The accidental may be ASCII `b` (flat) or `#` (sharp), or the Unicode music glyphs `♭` (U+266D) and `♯` (U+266F). Unicode accidentals are normalized to their ASCII equivalent, so `B♭` is stored and returned as `Bb`. ", alias="transposeKey") + midi_program: Optional[Annotated[int, Field(le=127, strict=True, ge=0)]] = Field(default=None, description="Override the instrument with a standard General MIDI program number (0-127), resolved server-side to the matching Flat instrument. Use this when you do not want to map Flat instrument ids. Ignored if `instrumentId` is also set. ", alias="midiProgram") + __properties: ClassVar[List[str]] = ["index", "instrumentId", "partName", "transposeKey", "midiProgram"] + + @field_validator('transpose_key', mode="before") + def transpose_key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^[A-G][b♭#♯]?$", value): + raise ValueError(r"must validate the regular expression /^[A-G][b♭#♯]?$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrInstrumentOverride from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrInstrumentOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "instrumentId": obj.get("instrumentId"), + "partName": obj.get("partName"), + "transposeKey": obj.get("transposeKey"), + "midiProgram": obj.get("midiProgram") + }) + return _obj + + diff --git a/flat_api/aio/models/omr_job.py b/flat_api/aio/models/omr_job.py new file mode 100644 index 0000000..433f716 --- /dev/null +++ b/flat_api/aio/models/omr_job.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.omr_imported_metadata import OmrImportedMetadata +from flat_api.aio.models.omr_job_file_metadata import OmrJobFileMetadata +from flat_api.aio.models.omr_job_output import OmrJobOutput +from flat_api.aio.models.omr_job_progress import OmrJobProgress +from flat_api.aio.models.omr_job_result import OmrJobResult +from flat_api.aio.models.omr_job_retention import OmrJobRetention +from flat_api.aio.models.omr_job_status import OmrJobStatus +from flat_api.aio.models.omr_pending_step import OmrPendingStep +from flat_api.aio.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJob(BaseModel): + """ + OmrJob + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the OMR job.") + status: OmrJobStatus + output: OmrJobOutput + interactive_steps: List[OmrStepName] = Field(description="Steps this job pauses at for client input, echoing the value set at creation.", alias="interactiveSteps") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. ") + current_step: Optional[OmrStepName] = Field(default=None, description="The pending step when `status` is `awaitingInput`. Omitted otherwise.", alias="currentStep") + pending_step: Optional[OmrPendingStep] = Field(default=None, alias="pendingStep") + estimated_credits: Optional[StrictInt] = Field(default=None, description="Credits that will be or were charged at start (page-based), so a client can show a confirmation before charging.", alias="estimatedCredits") + progress: Optional[OmrJobProgress] = None + original_file_metadata: Optional[OmrJobFileMetadata] = Field(default=None, alias="originalFileMetadata") + imported_metadata: Optional[OmrImportedMetadata] = Field(default=None, alias="importedMetadata") + result: Optional[OmrJobResult] = None + retention: Optional[OmrJobRetention] = None + error_code: Optional[StrictStr] = Field(default=None, description="Stable, engine-agnostic failure code, present when `status` is `error`. Branch on this for custom handling, and render `errorMessage` for the user-facing text. This is an open string: new codes may be added over time, so keep a generic fallback and never hardcode an exhaustive switch. Current values: * `NO_MUSIC_DETECTED`: no musical content found (poor scan, rotated page, or tablature). * `CORRUPTED_FILE`: the input file is corrupted and could not be read. * `UNSUPPORTED_FORMAT`: the file format or notation is not supported yet. * `UNSUPPORTED_TABLATURE`: the file is guitar tablature, not supported yet. * `ENCRYPTED_PDF`: the PDF is password-protected. * `TOO_LARGE`: the document is too large or has an unusual shape to process. * `ENGINE_TIMEOUT`: recognition took longer than expected and was stopped. * `GENERIC`: unspecified failure. ", alias="errorCode") + error_message: Optional[StrictStr] = Field(default=None, description="Localized, user-facing error message, present when `status` is `error`. Rendered in the caller's locale and safe to display as-is. Pair with `errorCode` for branching. ", alias="errorMessage") + creation_date: Optional[datetime] = Field(default=None, description="When the job was created.", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="When the job was last updated.", alias="modificationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJob from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pending_step + if self.pending_step: + _dict['pendingStep'] = self.pending_step.to_dict() + # override the default output from pydantic by calling `to_dict()` of progress + if self.progress: + _dict['progress'] = self.progress.to_dict() + # override the default output from pydantic by calling `to_dict()` of original_file_metadata + if self.original_file_metadata: + _dict['originalFileMetadata'] = self.original_file_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of imported_metadata + if self.imported_metadata: + _dict['importedMetadata'] = self.imported_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # override the default output from pydantic by calling `to_dict()` of retention + if self.retention: + _dict['retention'] = self.retention.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJob from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, + "interactiveSteps": obj.get("interactiveSteps"), + "locales": obj.get("locales"), + "currentStep": obj.get("currentStep"), + "pendingStep": OmrPendingStep.from_dict(obj["pendingStep"]) if obj.get("pendingStep") is not None else None, + "estimatedCredits": obj.get("estimatedCredits"), + "progress": OmrJobProgress.from_dict(obj["progress"]) if obj.get("progress") is not None else None, + "originalFileMetadata": OmrJobFileMetadata.from_dict(obj["originalFileMetadata"]) if obj.get("originalFileMetadata") is not None else None, + "importedMetadata": OmrImportedMetadata.from_dict(obj["importedMetadata"]) if obj.get("importedMetadata") is not None else None, + "result": OmrJobResult.from_dict(obj["result"]) if obj.get("result") is not None else None, + "retention": OmrJobRetention.from_dict(obj["retention"]) if obj.get("retention") is not None else None, + "errorCode": obj.get("errorCode"), + "errorMessage": obj.get("errorMessage"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_creation.py b/flat_api/aio/models/omr_job_creation.py new file mode 100644 index 0000000..5c4b6dd --- /dev/null +++ b/flat_api/aio/models/omr_job_creation.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.omr_job_input_file import OmrJobInputFile +from flat_api.aio.models.omr_job_output import OmrJobOutput +from flat_api.aio.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobCreation(BaseModel): + """ + Parameters to create an OMR job. Send without `files` to create a draft (then add files with `addOmrJobFile` and run `startOmrJob`), or include `files` and `autoStart: true` to import in a single request. + """ # noqa: E501 + output: Optional[OmrJobOutput] = OmrJobOutput.LIBRARY + interactive_steps: Optional[List[OmrStepName]] = Field(default=None, description="Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. ", alias="interactiveSteps") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. ") + collection: Optional[StrictStr] = Field(default=None, description="Target collection ID. Only used when `output` is `library`.") + idempotency_key: Optional[StrictStr] = Field(default=None, description="Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. ", alias="idempotencyKey") + files: Optional[List[OmrJobInputFile]] = Field(default=None, description="Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`.") + auto_start: Optional[StrictBool] = Field(default=None, description="Start processing immediately. Only valid when `files` is provided.", alias="autoStart") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "locales", "collection", "idempotencyKey", "files", "autoStart"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in files (list) + _items = [] + if self.files: + for _item_files in self.files: + if _item_files: + _items.append(_item_files.to_dict()) + _dict['files'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, + "interactiveSteps": obj.get("interactiveSteps"), + "locales": obj.get("locales"), + "collection": obj.get("collection"), + "idempotencyKey": obj.get("idempotencyKey"), + "files": [OmrJobInputFile.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None, + "autoStart": obj.get("autoStart") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_file_metadata.py b/flat_api/aio/models/omr_job_file_metadata.py new file mode 100644 index 0000000..5401ef8 --- /dev/null +++ b/flat_api/aio/models/omr_job_file_metadata.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileMetadata(BaseModel): + """ + Metadata about the uploaded input. + """ # noqa: E501 + number_of_pages: Optional[StrictInt] = Field(default=None, description="Total number of pages across all input files.", alias="numberOfPages") + file_count: Optional[StrictInt] = Field(default=None, description="Number of input files attached.", alias="fileCount") + filename: Optional[StrictStr] = Field(default=None, description="Original filename of the input as uploaded (of the first file when several were combined).") + file_size: Optional[StrictInt] = Field(default=None, description="Combined size of the input files, in bytes.", alias="fileSize") + mime_type: Optional[StrictStr] = Field(default=None, description="MIME type of the input (of the first file when several were combined).", alias="mimeType") + file_extension: Optional[StrictStr] = Field(default=None, description="File extension of the input, without the leading dot (for example `pdf`).", alias="fileExtension") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["numberOfPages", "fileCount", "filename", "fileSize", "mimeType", "fileExtension"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "numberOfPages": obj.get("numberOfPages"), + "fileCount": obj.get("fileCount"), + "filename": obj.get("filename"), + "fileSize": obj.get("fileSize"), + "mimeType": obj.get("mimeType"), + "fileExtension": obj.get("fileExtension") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_file_upload.py b/flat_api/aio/models/omr_job_file_upload.py new file mode 100644 index 0000000..cc126d1 --- /dev/null +++ b/flat_api/aio/models/omr_job_file_upload.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileUpload(BaseModel): + """ + One image or PDF added to a draft job. + """ # noqa: E501 + file: Union[StrictBytes, StrictStr] = Field(description="File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. ") + filename: Optional[StrictStr] = Field(default=None, description="Optional original filename, kept for display.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file", "filename"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileUpload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileUpload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": obj.get("file"), + "filename": obj.get("filename") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_file_upload_result.py b/flat_api/aio/models/omr_job_file_upload_result.py new file mode 100644 index 0000000..a134b66 --- /dev/null +++ b/flat_api/aio/models/omr_job_file_upload_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileUploadResult(BaseModel): + """ + Result of adding a file to a draft job. + """ # noqa: E501 + file_index: Optional[StrictInt] = Field(default=None, description="0-based index assigned to the uploaded file.", alias="fileIndex") + file_count: Optional[StrictInt] = Field(default=None, description="Total number of files now attached to the job.", alias="fileCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fileIndex", "fileCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileUploadResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileUploadResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fileIndex": obj.get("fileIndex"), + "fileCount": obj.get("fileCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_input_file.py b/flat_api/aio/models/omr_job_input_file.py new file mode 100644 index 0000000..9436102 --- /dev/null +++ b/flat_api/aio/models/omr_job_input_file.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobInputFile(BaseModel): + """ + A single image or PDF input, base64-encoded. + """ # noqa: E501 + file: Union[StrictBytes, StrictStr] = Field(description="File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. ") + filename: Optional[StrictStr] = Field(default=None, description="Optional original filename, kept for display.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file", "filename"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobInputFile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobInputFile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": obj.get("file"), + "filename": obj.get("filename") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_output.py b/flat_api/aio/models/omr_job_output.py new file mode 100644 index 0000000..0c56c06 --- /dev/null +++ b/flat_api/aio/models/omr_job_output.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrJobOutput(str, Enum): + """ + Where the result of the job goes. * `library`: import the result into the Flat Library and create a score (default). * `musicxml`: finalize the result only, downloadable via `getOmrJobExport`. No score is created, for third-party integrations that do not use the Library. + """ + + """ + allowed enum values + """ + LIBRARY = 'library' + MUSICXML = 'musicxml' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrJobOutput from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/omr_job_progress.py b/flat_api/aio/models/omr_job_progress.py new file mode 100644 index 0000000..7fb0288 --- /dev/null +++ b/flat_api/aio/models/omr_job_progress.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobProgress(BaseModel): + """ + Live progress while the job is processing. + """ # noqa: E501 + percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Completion percentage (0-100).") + text: Optional[StrictStr] = Field(default=None, description="Localized progress message, ready to display.") + key: Optional[StrictStr] = Field(default=None, description="Stable progress key (for example `OMR_QUEUED`, `OMR_PROCESSING_PAGE`, `OMR_CREATING_SCORE`), for matching the current phase in a stepper UI independent of locale. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["percent", "text", "key"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobProgress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobProgress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "percent": obj.get("percent"), + "text": obj.get("text"), + "key": obj.get("key") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_result.py b/flat_api/aio/models/omr_job_result.py new file mode 100644 index 0000000..d93b0e5 --- /dev/null +++ b/flat_api/aio/models/omr_job_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobResult(BaseModel): + """ + The outcome of a finished job. Present when `status` is `done`. + """ # noqa: E501 + score: Optional[StrictStr] = Field(default=None, description="Created score ID, when `output` is `library`.") + exports: Optional[List[StrictStr]] = Field(default=None, description="Formats available via `getOmrJobExport`, for example `[\"musicxml\", \"mxl\", \"midi\"]`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["score", "exports"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "exports": obj.get("exports") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_retention.py b/flat_api/aio/models/omr_job_retention.py new file mode 100644 index 0000000..edb00b5 --- /dev/null +++ b/flat_api/aio/models/omr_job_retention.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobRetention(BaseModel): + """ + Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. + """ # noqa: E501 + expiry_date: datetime = Field(description="When this job's uploaded files and recognition results become eligible for erasure. Fixed when the job is created: changing the account's retention period does not move the deadline of jobs that already exist. ", alias="expiryDate") + expired_date: Optional[datetime] = Field(default=None, description="When the job's stored files were actually erased. Present only once that happened. An expired job keeps the `status` it finished with and stays listable, but its `result` is no longer served and downloads fail with `OMR_JOB_EXPIRED`. ", alias="expiredDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["expiryDate", "expiredDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobRetention from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobRetention from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "expiryDate": obj.get("expiryDate"), + "expiredDate": obj.get("expiredDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_job_status.py b/flat_api/aio/models/omr_job_status.py new file mode 100644 index 0000000..9552bf2 --- /dev/null +++ b/flat_api/aio/models/omr_job_status.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrJobStatus(str, Enum): + """ + Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. + """ + + """ + allowed enum values + """ + DRAFT = 'draft' + PROCESSING = 'processing' + AWAITINGINPUT = 'awaitingInput' + DONE = 'done' + ERROR = 'error' + CANCELED = 'canceled' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrJobStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/omr_locale_details.py b/flat_api/aio/models/omr_locale_details.py new file mode 100644 index 0000000..6541760 --- /dev/null +++ b/flat_api/aio/models/omr_locale_details.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrLocaleDetails(BaseModel): + """ + An OCR-selectable locale with its English name. + """ # noqa: E501 + code: StrictStr = Field(description="BCP 47 locale code. Always one of the codes listed in `locales`.", json_schema_extra={"examples": ["vi"]}) + name: StrictStr = Field(description="English name of the language, for display in a picker.", json_schema_extra={"examples": ["Vietnamese"]}) + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrLocaleDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrLocaleDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_pending_step.py b/flat_api/aio/models/omr_pending_step.py new file mode 100644 index 0000000..6e3f531 --- /dev/null +++ b/flat_api/aio/models/omr_pending_step.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flat_api.aio.models.omr_details_step_data import OmrDetailsStepData +from flat_api.aio.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrPendingStep(BaseModel): + """ + The step currently awaiting client input. The `data` shape is keyed by `step`. + """ # noqa: E501 + step: OmrStepName + data: OmrDetailsStepData + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["step", "data"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrPendingStep from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrPendingStep from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "data": OmrDetailsStepData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/omr_step_name.py b/flat_api/aio/models/omr_step_name.py new file mode 100644 index 0000000..cdc12c5 --- /dev/null +++ b/flat_api/aio/models/omr_step_name.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrStepName(str, Enum): + """ + Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. + """ + + """ + allowed enum values + """ + DETAILS = 'details' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrStepName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/organization_invitation.py b/flat_api/aio/models/organization_invitation.py new file mode 100644 index 0000000..a24affd --- /dev/null +++ b/flat_api/aio/models/organization_invitation.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.organization_roles import OrganizationRoles +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OrganizationInvitation(BaseModel): + """ + Details of an invitation to join an organization + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The invitation unique identifier") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the invitation", alias="creationDate") + organization: StrictStr = Field(description="The unique identifier of the Organization owning this class") + organization_role: OrganizationRoles = Field(alias="organizationRole") + custom_code: Optional[StrictStr] = Field(description="Enrollment code to use when joining this organization", alias="customCode") + email: Optional[StrictStr] = Field(default=None, description="The email address this invitation was sent to") + invited_by: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User who created this invitation", alias="invitedBy") + html_url: Optional[StrictStr] = Field(default=None, description="URL to join the organization using this invitation", alias="htmlUrl") + allow_multiple_use: StrictBool = Field(description="If true, the invitation can be used multiple times. If false, the invitation can only be used once. ", alias="allowMultipleUse") + used_by: Optional[List[StrictStr]] = Field(default=None, description="List of users who used this invitation", alias="usedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "organization", "organizationRole", "customCode", "email", "invitedBy", "htmlUrl", "allowMultipleUse", "usedBy"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationInvitation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if custom_code (nullable) is None + # and model_fields_set contains the field + if self.custom_code is None and "custom_code" in self.model_fields_set: + _dict['customCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationInvitation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "customCode": obj.get("customCode"), + "email": obj.get("email"), + "invitedBy": obj.get("invitedBy"), + "htmlUrl": obj.get("htmlUrl"), + "allowMultipleUse": obj.get("allowMultipleUse"), + "usedBy": obj.get("usedBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/organization_invitation_creation.py b/flat_api/aio/models/organization_invitation_creation.py new file mode 100644 index 0000000..a86e925 --- /dev/null +++ b/flat_api/aio/models/organization_invitation_creation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OrganizationInvitationCreation(BaseModel): + """ + The parameters to create an organization invitation + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="The email address you want to send the invitation to") + organization_role: Optional[StrictStr] = Field(default='teacher', description="User's Organization Role", alias="organizationRole") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "organizationRole"] + + @field_validator('organization_role') + def organization_role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['admin', 'teacher', 'accountAdmin']): + raise ValueError("must be one of enum values ('admin', 'teacher', 'accountAdmin')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationInvitationCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationInvitationCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "organizationRole": obj.get("organizationRole") if obj.get("organizationRole") is not None else 'teacher' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/organization_roles.py b/flat_api/aio/models/organization_roles.py new file mode 100644 index 0000000..3b45067 --- /dev/null +++ b/flat_api/aio/models/organization_roles.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OrganizationRoles(str, Enum): + """ + User's Organization Role (for Edu users only) + """ + + """ + allowed enum values + """ + ADMIN = 'admin' + ACCOUNTADMIN = 'accountAdmin' + TEACHER = 'teacher' + USER = 'user' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OrganizationRoles from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/organization_user_access_token_creation.py b/flat_api/aio/models/organization_user_access_token_creation.py new file mode 100644 index 0000000..f31ba11 --- /dev/null +++ b/flat_api/aio/models/organization_user_access_token_creation.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from flat_api.aio.models.app_scopes import AppScopes +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OrganizationUserAccessTokenCreation(BaseModel): + """ + Creation of a delegated API access token for an organization user + """ # noqa: E501 + scopes: List[AppScopes] = Field(description="List of requested scopes for this credential") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scopes"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationUserAccessTokenCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationUserAccessTokenCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scopes": obj.get("scopes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/rename_group_request.py b/flat_api/aio/models/rename_group_request.py new file mode 100644 index 0000000..5b397fc --- /dev/null +++ b/flat_api/aio/models/rename_group_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class RenameGroupRequest(BaseModel): + """ + RenameGroupRequest + """ # noqa: E501 + name: StrictStr = Field(description="New name for the group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RenameGroupRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RenameGroupRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/resource_collaborator.py b/flat_api/aio/models/resource_collaborator.py new file mode 100644 index 0000000..8a1325f --- /dev/null +++ b/flat_api/aio/models/resource_collaborator.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.group import Group +from flat_api.aio.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ResourceCollaborator(BaseModel): + """ + A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). + """ # noqa: E501 + acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") + acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") + acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") + is_collaborator: Optional[StrictBool] = Field(default=False, description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the permission") + var_date: Optional[datetime] = Field(default=None, description="The date when the permission was added", alias="date") + score: Optional[StrictStr] = Field(default=None, description="If this object is a permission of a score, this property will contain the unique identifier of the score") + collection: Optional[StrictStr] = Field(default=None, description="If this object is a permission of a collection, this property will contain the unique identifier of the collection") + user: Optional[UserPublic] = None + group: Optional[Group] = None + user_email: Optional[StrictStr] = Field(default=None, description="If the collaborator is not a user of Flat yet, this field will contain their email. ", alias="userEmail") + invited: Optional[StrictBool] = Field(default=None, description="If this property is `true`, this is still a pending invitation ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType", "id", "date", "score", "collection", "user", "group", "userEmail", "invited"] + + @field_validator('collaborator_type') + def collaborator_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['owner', 'user', 'group']): + raise ValueError("must be one of enum values ('owner', 'user', 'group')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCollaborator from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of group + if self.group: + _dict['group'] = self.group.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCollaborator from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else False, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False, + "isCollaborator": obj.get("isCollaborator") if obj.get("isCollaborator") is not None else False, + "collaboratorType": obj.get("collaboratorType"), + "id": obj.get("id"), + "date": obj.get("date"), + "score": obj.get("score"), + "collection": obj.get("collection"), + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "group": Group.from_dict(obj["group"]) if obj.get("group") is not None else None, + "userEmail": obj.get("userEmail"), + "invited": obj.get("invited") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/resource_collaborator_creation.py b/flat_api/aio/models/resource_collaborator_creation.py new file mode 100644 index 0000000..ab56cf7 --- /dev/null +++ b/flat_api/aio/models/resource_collaborator_creation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ResourceCollaboratorCreation(BaseModel): + """ + Add a collaborator to a resource. + """ # noqa: E501 + user: Optional[StrictStr] = Field(default=None, description="The unique identifier of a Flat user") + group: Optional[StrictStr] = Field(default=None, description="The unique identifier of a Flat group") + user_email: Optional[StrictStr] = Field(default=None, description="Fill this field to invite an individual user by email. ", alias="userEmail") + user_token: Optional[StrictStr] = Field(default=None, description="Token received in an invitation to join the score. ", alias="userToken") + acl_read: Optional[StrictBool] = Field(default=True, description="`True` if the related user can read the score. (probably true if the user has a permission on the document). ", alias="aclRead") + acl_write: Optional[StrictBool] = Field(default=False, description="`True` if the related user can modify the score. ", alias="aclWrite") + acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCollaboratorCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCollaboratorCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user"), + "group": obj.get("group"), + "userEmail": obj.get("userEmail"), + "userToken": obj.get("userToken"), + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else True, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/resource_rights.py b/flat_api/aio/models/resource_rights.py new file mode 100644 index 0000000..edcaeff --- /dev/null +++ b/flat_api/aio/models/resource_rights.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ResourceRights(BaseModel): + """ + The rights of the current user on a score or collection + """ # noqa: E501 + acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") + acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") + acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") + is_collaborator: Optional[StrictBool] = Field(default=False, description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType"] + + @field_validator('collaborator_type') + def collaborator_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['owner', 'user', 'group']): + raise ValueError("must be one of enum values ('owner', 'user', 'group')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRights from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRights from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aclRead": obj.get("aclRead") if obj.get("aclRead") is not None else False, + "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, + "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False, + "isCollaborator": obj.get("isCollaborator") if obj.get("isCollaborator") is not None else False, + "collaboratorType": obj.get("collaboratorType") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comment.py b/flat_api/aio/models/score_comment.py new file mode 100644 index 0000000..5dde80f --- /dev/null +++ b/flat_api/aio/models/score_comment.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_comment_context import ScoreCommentContext +from flat_api.aio.models.score_comment_moderation import ScoreCommentModeration +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreComment(BaseModel): + """ + Comment added on a sheet music + """ # noqa: E501 + id: StrictStr = Field(description="The comment unique identifier") + type: StrictStr = Field(description="The type of the comment") + user: StrictStr = Field(description="The author unique identifier") + score: StrictStr = Field(description="The unique identifier of the score where the comment was posted") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of revision the comment was posted") + reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") + var_date: datetime = Field(description="The date when the comment was posted", alias="date") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") + comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: StrictStr = Field(description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") + context: Optional[ScoreCommentContext] = None + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifier mentioned on the score") + resolved: Optional[StrictBool] = Field(default=None, description="For inline comments, the comment can be marked as resolved and will be hidden in the future responses ") + resolved_by: Optional[StrictStr] = Field(default=None, description="If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") + moderation: Optional[ScoreCommentModeration] = None + spam: Optional[StrictBool] = Field(default=None, description="`true if the message has been detected as spam and hidden from other users ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['document', 'inline']): + raise ValueError("must be one of enum values ('document', 'inline')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreComment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + # override the default output from pydantic by calling `to_dict()` of moderation + if self.moderation: + _dict['moderation'] = self.moderation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreComment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "user": obj.get("user"), + "score": obj.get("score"), + "revision": obj.get("revision"), + "replyTo": obj.get("replyTo"), + "date": obj.get("date"), + "modificationDate": obj.get("modificationDate"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None, + "mentions": obj.get("mentions"), + "resolved": obj.get("resolved"), + "resolvedBy": obj.get("resolvedBy"), + "moderation": ScoreCommentModeration.from_dict(obj["moderation"]) if obj.get("moderation") is not None else None, + "spam": obj.get("spam") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comment_context.py b/flat_api/aio/models/score_comment_context.py new file mode 100644 index 0000000..c5a2e64 --- /dev/null +++ b/flat_api/aio/models/score_comment_context.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCommentContext(BaseModel): + """ + The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). + """ # noqa: E501 + part_uuid: StrictStr = Field(description="The unique identifier (UUID) of the score part", alias="partUuid") + staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identififer of the staff", alias="staffIdx") + staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identififer (UUID) of the staff", alias="staffUuid") + measure_uuids: List[StrictStr] = Field(description="The list of measure UUIds", alias="measureUuids") + start_time_pos: Union[StrictFloat, StrictInt] = Field(alias="startTimePos") + stop_time_pos: Union[StrictFloat, StrictInt] = Field(alias="stopTimePos") + start_dpq: Union[StrictFloat, StrictInt] = Field(alias="startDpq") + stop_dpq: Union[StrictFloat, StrictInt] = Field(alias="stopDpq") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["partUuid", "staffIdx", "staffUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentContext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "partUuid": obj.get("partUuid"), + "staffIdx": obj.get("staffIdx"), + "staffUuid": obj.get("staffUuid"), + "measureUuids": obj.get("measureUuids"), + "startTimePos": obj.get("startTimePos"), + "stopTimePos": obj.get("stopTimePos"), + "startDpq": obj.get("startDpq"), + "stopDpq": obj.get("stopDpq") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comment_creation.py b/flat_api/aio/models/score_comment_creation.py new file mode 100644 index 0000000..4a36990 --- /dev/null +++ b/flat_api/aio/models/score_comment_creation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_comment_context import ScoreCommentContext +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCommentCreation(BaseModel): + """ + Creation of a comment + """ # noqa: E501 + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") + reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") + context: Optional[ScoreCommentContext] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "mentions", "replyTo", "context"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "revision": obj.get("revision"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "mentions": obj.get("mentions"), + "replyTo": obj.get("replyTo"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comment_moderation.py b/flat_api/aio/models/score_comment_moderation.py new file mode 100644 index 0000000..71918c5 --- /dev/null +++ b/flat_api/aio/models/score_comment_moderation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCommentModeration(BaseModel): + """ + Information about the comment being moderated + """ # noqa: E501 + hidden: Optional[StrictBool] = Field(default=None, description="If true, this comment will be hidden from other users") + reason: Optional[StrictStr] = Field(default=None, description="If the comment is hidden, the reason why this one has been moderated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hidden", "reason"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['spam', 'inappropriate']): + raise ValueError("must be one of enum values ('spam', 'inappropriate')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentModeration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentModeration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hidden": obj.get("hidden"), + "reason": obj.get("reason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comment_update.py b/flat_api/aio/models/score_comment_update.py new file mode 100644 index 0000000..aca521a --- /dev/null +++ b/flat_api/aio/models/score_comment_update.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.score_comment_context import ScoreCommentContext +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCommentUpdate(BaseModel): + """ + Update of a comment + """ # noqa: E501 + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") + context: Optional[ScoreCommentContext] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "context"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of context + if self.context: + _dict['context'] = self.context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "revision": obj.get("revision"), + "comment": obj.get("comment"), + "rawComment": obj.get("rawComment"), + "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_comments_counts.py b/flat_api/aio/models/score_comments_counts.py new file mode 100644 index 0000000..eff64ff --- /dev/null +++ b/flat_api/aio/models/score_comments_counts.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCommentsCounts(BaseModel): + """ + A computed version of the total, unique, weekly, monthly and yearly number of comments added on the documents (this doesn't include inline comments). + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the score") + unique: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The unique (1/user) number of comments added to the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly unique number of comments added to the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly unique number of comments added to the score") + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly unique number of comments added to the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "unique", "weekly", "monthly", "yearly"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCommentsCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCommentsCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "unique": obj.get("unique"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_creation.py b/flat_api/aio/models/score_creation.py new file mode 100644 index 0000000..0a63be2 --- /dev/null +++ b/flat_api/aio/models/score_creation.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.aio.models.score_creation_builder_data import ScoreCreationBuilderData +from flat_api.aio.models.score_creation_file_import import ScoreCreationFileImport +from flat_api.aio.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SCORECREATION_ONE_OF_SCHEMAS = ["ScoreCreationBuilderData", "ScoreCreationFileImport", "ScoreCreationGoogleDriveImport"] + +class ScoreCreation(BaseModel): + """ + ScoreCreation + """ + # data type: ScoreCreationBuilderData + oneof_schema_1_validator: Optional[ScoreCreationBuilderData] = None + # data type: ScoreCreationFileImport + oneof_schema_2_validator: Optional[ScoreCreationFileImport] = None + # data type: ScoreCreationGoogleDriveImport + oneof_schema_3_validator: Optional[ScoreCreationGoogleDriveImport] = None + actual_instance: Optional[Union[ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport]] = None + one_of_schemas: Set[str] = { "ScoreCreationBuilderData", "ScoreCreationFileImport", "ScoreCreationGoogleDriveImport" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ScoreCreation.model_construct() + error_messages = [] + match = 0 + # validate data type: ScoreCreationBuilderData + if not isinstance(v, ScoreCreationBuilderData): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationBuilderData`") + else: + match += 1 + # validate data type: ScoreCreationFileImport + if not isinstance(v, ScoreCreationFileImport): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationFileImport`") + else: + match += 1 + # validate data type: ScoreCreationGoogleDriveImport + if not isinstance(v, ScoreCreationGoogleDriveImport): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationGoogleDriveImport`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ScoreCreationBuilderData + try: + instance.actual_instance = ScoreCreationBuilderData.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ScoreCreationFileImport + try: + instance.actual_instance = ScoreCreationFileImport.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ScoreCreationGoogleDriveImport + try: + instance.actual_instance = ScoreCreationGoogleDriveImport.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/aio/models/score_creation_builder_data.py b/flat_api/aio/models/score_creation_builder_data.py new file mode 100644 index 0000000..eba36b1 --- /dev/null +++ b/flat_api/aio/models/score_creation_builder_data.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData +from flat_api.aio.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderData(BaseModel): + """ + ScoreCreationBuilderData + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + builder_data: ScoreCreationBuilderDataAllOfBuilderData = Field(alias="builderData") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of builder_data + if self.builder_data: + _dict['builderData'] = self.builder_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "builderData": ScoreCreationBuilderDataAllOfBuilderData.from_dict(obj["builderData"]) if obj.get("builderData") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py new file mode 100644 index 0000000..36ae53d --- /dev/null +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderData(BaseModel): + """ + ScoreCreationBuilderDataAllOfBuilderData + """ # noqa: E501 + score_data: ScoreCreationBuilderDataAllOfBuilderDataScoreData = Field(alias="scoreData") + layout_data: Optional[ScoreCreationBuilderDataAllOfBuilderDataLayoutData] = Field(default=None, alias="layoutData") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scoreData", "layoutData"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of score_data + if self.score_data: + _dict['scoreData'] = self.score_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of layout_data + if self.layout_data: + _dict['layoutData'] = self.layout_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scoreData": ScoreCreationBuilderDataAllOfBuilderDataScoreData.from_dict(obj["scoreData"]) if obj.get("scoreData") is not None else None, + "layoutData": ScoreCreationBuilderDataAllOfBuilderDataLayoutData.from_dict(obj["layoutData"]) if obj.get("layoutData") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_layout_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py similarity index 61% rename from flat_api/models/score_creation_builder_data_layout_data.py rename to flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py index a69f749..8c1a30e 100644 --- a/flat_api/models/score_creation_builder_data_layout_data.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python -class ScoreCreationBuilderDataLayoutData(BaseModel): +class ScoreCreationBuilderDataAllOfBuilderDataLayoutData(BaseModel): """ Control the appearance of the score. If missing, default values are used. """ # noqa: E501 @@ -35,6 +36,7 @@ class ScoreCreationBuilderDataLayoutData(BaseModel): page_margin_bottom: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The bottom margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginBottom") page_margin_left: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The left margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginLeft") page_margin_right: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The right margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginRight") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight"] @field_validator('length_unit') @@ -47,11 +49,12 @@ def length_unit_validate_enum(cls, value): raise ValueError("must be one of enum values ('cm', 'inch')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,12 +63,11 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataLayoutData from a JSON string""" + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,11 +90,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataLayoutData from a dict""" + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a dict""" if obj is None: return None @@ -107,6 +116,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pageMarginLeft": obj.get("pageMarginLeft"), "pageMarginRight": obj.get("pageMarginRight") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py new file mode 100644 index 0000000..0a7ff65 --- /dev/null +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.aio.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderDataScoreData(BaseModel): + """ + ScoreCreationBuilderDataAllOfBuilderDataScoreData + """ # noqa: E501 + use_tab_staff: Optional[StrictBool] = Field(default=None, description="true if the TAB staff is displayed with fretted instruments", alias="useTabStaff") + use_chord_grid: Optional[StrictBool] = Field(default=None, description="true if the chord grid must be displayed with fretted instruments", alias="useChordGrid") + fifths: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.") + nb_beats: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of beats in the measure", alias="nbBeats") + beat_type: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The duration of a beat in the measure", alias="beatType") + instruments: List[ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments] = Field(description="The list of instruments to add to the score. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for the possible values for `group` and `instrument` (also available as the [`@flat/instruments`](https://www.npmjs.com/package/@flat/instruments) package). ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "useTabStaff": obj.get("useTabStaff"), + "useChordGrid": obj.get("useChordGrid"), + "fifths": obj.get("fifths"), + "nbBeats": obj.get("nbBeats"), + "beatType": obj.get("beatType"), + "instruments": [ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_score_data_instruments_inner.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py similarity index 50% rename from flat_api/models/score_creation_builder_data_score_data_instruments_inner.py rename to flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py index 7ea8959..f60153a 100644 --- a/flat_api/models/score_creation_builder_data_score_data_instruments_inner.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,27 +18,30 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python -class ScoreCreationBuilderDataScoreDataInstrumentsInner(BaseModel): +class ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments(BaseModel): """ - ScoreCreationBuilderDataScoreDataInstrumentsInner + ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments """ # noqa: E501 group: StrictStr = Field(description="The of the instrument group (e.g. `keyboards`, `brass`)") instrument: StrictStr = Field(description="The identifier of the instrument (e.g. `piano`, `trumpet`)") long_name: Optional[StrictStr] = Field(default=None, description="The full name of the instrument", alias="longName") short_name: Optional[StrictStr] = Field(default=None, description="The abbreviation of the name of the instrument", alias="shortName") has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tone (prevent the part to have a TAB/chord grid)", alias="hasQuarterTone") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group", "instrument", "longName", "shortName", "hasQuarterTone"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,12 +50,11 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a JSON string""" + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,11 +77,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataScoreDataInstrumentsInner from a dict""" + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a dict""" if obj is None: return None @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "shortName": obj.get("shortName"), "hasQuarterTone": obj.get("hasQuarterTone") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/aio/models/score_creation_common.py b/flat_api/aio/models/score_creation_common.py new file mode 100644 index 0000000..5073550 --- /dev/null +++ b/flat_api/aio/models/score_creation_common.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationCommon(BaseModel): + """ + ScoreCreationCommon + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationCommon from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationCommon from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_creation_file_import.py b/flat_api/aio/models/score_creation_file_import.py new file mode 100644 index 0000000..2a7d925 --- /dev/null +++ b/flat_api/aio/models/score_creation_file_import.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationFileImport(BaseModel): + """ + ScoreCreationFileImport + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") + data: StrictStr = Field(description="The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") + data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") + supports_tasks: Optional[StrictBool] = Field(default=None, description="Set this to `true` if the client supports asynchronous task flows. When importing a score that requires OMR processing (a PDF or a page image), the API will return a 202 Accepted response along with a task reference. The client can then check the task status using the endpoint `GET /v2/tasks/{task}`. ", alias="supportsTasks") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "filename", "data", "dataEncoding", "supportsTasks"] + + @field_validator('data_encoding') + def data_encoding_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['base64']): + raise ValueError("must be one of enum values ('base64')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationFileImport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationFileImport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "filename": obj.get("filename"), + "data": obj.get("data"), + "dataEncoding": obj.get("dataEncoding"), + "supportsTasks": obj.get("supportsTasks") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_creation_google_drive_import.py b/flat_api/aio/models/score_creation_google_drive_import.py new file mode 100644 index 0000000..296a1d0 --- /dev/null +++ b/flat_api/aio/models/score_creation_google_drive_import.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_privacy import ScorePrivacy +from flat_api.aio.models.score_source import ScoreSource +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationGoogleDriveImport(BaseModel): + """ + ScoreCreationGoogleDriveImport + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + source: ScoreSource + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "source"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationGoogleDriveImport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationGoogleDriveImport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "source": ScoreSource.from_dict(obj["source"]) if obj.get("source") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_creation_type.py b/flat_api/aio/models/score_creation_type.py new file mode 100644 index 0000000..27d1340 --- /dev/null +++ b/flat_api/aio/models/score_creation_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreCreationType(str, Enum): + """ + The type of creation (an orginal, an arrangement) + """ + + """ + allowed enum values + """ + ORIGINAL = 'original' + ARRANGEMENT = 'arrangement' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreCreationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_details.py b/flat_api/aio/models/score_details.py new file mode 100644 index 0000000..3a9ea62 --- /dev/null +++ b/flat_api/aio/models/score_details.py @@ -0,0 +1,229 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from flat_api.aio.models.resource_collaborator import ResourceCollaborator +from flat_api.aio.models.resource_rights import ResourceRights +from flat_api.aio.models.score_comments_counts import ScoreCommentsCounts +from flat_api.aio.models.score_creation_type import ScoreCreationType +from flat_api.aio.models.score_details_all_of_me import ScoreDetailsAllOfMe +from flat_api.aio.models.score_license import ScoreLicense +from flat_api.aio.models.score_likes_counts import ScoreLikesCounts +from flat_api.aio.models.score_plays_counts import ScorePlaysCounts +from flat_api.aio.models.score_privacy import ScorePrivacy +from flat_api.aio.models.score_views_counts import ScoreViewsCounts +from flat_api.aio.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreDetails(BaseModel): + """ + The score and all its details + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score") + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the score (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + title: StrictStr = Field(description="The title of the score") + privacy: ScorePrivacy + user: UserPublic + html_url: StrictStr = Field(description="The url where the score can be viewed in a web browser", alias="htmlUrl") + edit_html_url: StrictStr = Field(description="The url where the score can be edited in a web browser", alias="editHtmlUrl") + subtitle: Optional[StrictStr] = Field(default=None, description="Subtitle of the score") + lyricist: Optional[StrictStr] = Field(default=None, description="Lyricist of the score") + arranger: Optional[StrictStr] = Field(default=None, description="Arranger of the score") + composer: Optional[StrictStr] = Field(default=None, description="Composer of the score") + description: Optional[StrictStr] = Field(default=None, description="Description of the creation") + tags: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Tags describing the score") + creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") + license: Optional[ScoreLicense] = None + license_text: Optional[StrictStr] = Field(default=None, description="Additional license text written on the exported/printed score", alias="licenseText") + duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximative duration of the score", alias="durationTime") + number_measures: Optional[StrictInt] = Field(default=None, description="The number of measures in the score", alias="numberMeasures") + main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main tempo of the score (in QPM)", alias="mainTempoQpm") + main_key_signature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main key signature of the score (expressed between -7 and 7).", alias="mainKeySignature") + rights: Optional[ResourceRights] = None + collaborators: List[ResourceCollaborator] = Field(description="The list of the collaborators of the score") + creation_date: datetime = Field(description="The date when the score was created", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date of the last revision of the score", alias="modificationDate") + publication_date: Optional[datetime] = Field(default=None, description="The date when the score was published on Flat", alias="publicationDate") + scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") + highlighted_date: Optional[datetime] = Field(default=None, description="The date when the score was highlighted (featured) on our community", alias="highlightedDate") + organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. ") + parent_score: Optional[StrictStr] = Field(default=None, description="If the score has been forked, the unique identifier of the parent score. ", alias="parentScore") + instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") + instruments_names: List[StrictStr] = Field(description="An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. ", alias="instrumentsNames") + samples: List[StrictStr] = Field(description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") + google_drive_file_id: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` ", alias="googleDriveFileId") + likes: Optional[ScoreLikesCounts] = None + comments: Optional[ScoreCommentsCounts] = None + views: Optional[ScoreViewsCounts] = None + plays: Optional[ScorePlaysCounts] = None + collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + me: Optional[ScoreDetailsAllOfMe] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "editHtmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "scheduledDeletionDate", "highlightedDate", "organization", "parentScore", "instruments", "instrumentsNames", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", "me"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of rights + if self.rights: + _dict['rights'] = self.rights.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) + _items = [] + if self.collaborators: + for _item_collaborators in self.collaborators: + if _item_collaborators: + _items.append(_item_collaborators.to_dict()) + _dict['collaborators'] = _items + # override the default output from pydantic by calling `to_dict()` of likes + if self.likes: + _dict['likes'] = self.likes.to_dict() + # override the default output from pydantic by calling `to_dict()` of comments + if self.comments: + _dict['comments'] = self.comments.to_dict() + # override the default output from pydantic by calling `to_dict()` of views + if self.views: + _dict['views'] = self.views.to_dict() + # override the default output from pydantic by calling `to_dict()` of plays + if self.plays: + _dict['plays'] = self.plays.to_dict() + # override the default output from pydantic by calling `to_dict()` of me + if self.me: + _dict['me'] = self.me.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if creation_type (nullable) is None + # and model_fields_set contains the field + if self.creation_type is None and "creation_type" in self.model_fields_set: + _dict['creationType'] = None + + # set to None if license (nullable) is None + # and model_fields_set contains the field + if self.license is None and "license" in self.model_fields_set: + _dict['license'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sharingKey": obj.get("sharingKey"), + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "htmlUrl": obj.get("htmlUrl"), + "editHtmlUrl": obj.get("editHtmlUrl"), + "subtitle": obj.get("subtitle"), + "lyricist": obj.get("lyricist"), + "arranger": obj.get("arranger"), + "composer": obj.get("composer"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "creationType": obj.get("creationType"), + "license": obj.get("license"), + "licenseText": obj.get("licenseText"), + "durationTime": obj.get("durationTime"), + "numberMeasures": obj.get("numberMeasures"), + "mainTempoQpm": obj.get("mainTempoQpm"), + "mainKeySignature": obj.get("mainKeySignature"), + "rights": ResourceRights.from_dict(obj["rights"]) if obj.get("rights") is not None else None, + "collaborators": [ResourceCollaborator.from_dict(_item) for _item in obj["collaborators"]] if obj.get("collaborators") is not None else None, + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "publicationDate": obj.get("publicationDate"), + "scheduledDeletionDate": obj.get("scheduledDeletionDate"), + "highlightedDate": obj.get("highlightedDate"), + "organization": obj.get("organization"), + "parentScore": obj.get("parentScore"), + "instruments": obj.get("instruments"), + "instrumentsNames": obj.get("instrumentsNames"), + "samples": obj.get("samples"), + "googleDriveFileId": obj.get("googleDriveFileId"), + "likes": ScoreLikesCounts.from_dict(obj["likes"]) if obj.get("likes") is not None else None, + "comments": ScoreCommentsCounts.from_dict(obj["comments"]) if obj.get("comments") is not None else None, + "views": ScoreViewsCounts.from_dict(obj["views"]) if obj.get("views") is not None else None, + "plays": ScorePlaysCounts.from_dict(obj["plays"]) if obj.get("plays") is not None else None, + "collections": obj.get("collections"), + "me": ScoreDetailsAllOfMe.from_dict(obj["me"]) if obj.get("me") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_details_all_of_me.py b/flat_api/aio/models/score_details_all_of_me.py new file mode 100644 index 0000000..8899e4c --- /dev/null +++ b/flat_api/aio/models/score_details_all_of_me.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreDetailsAllOfMe(BaseModel): + """ + Information about the authenticated user and this score + """ # noqa: E501 + is_liked: StrictBool = Field(description="True if the current user likes this score", alias="isLiked") + is_in_library: StrictBool = Field(description="True if the score is stored in one of the user's collections", alias="isInLibrary") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["isLiked", "isInLibrary"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreDetailsAllOfMe from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreDetailsAllOfMe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isLiked": obj.get("isLiked"), + "isInLibrary": obj.get("isInLibrary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_fork.py b/flat_api/aio/models/score_fork.py new file mode 100644 index 0000000..1ef11e3 --- /dev/null +++ b/flat_api/aio/models/score_fork.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreFork(BaseModel): + """ + Options to fork the score + """ # noqa: E501 + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be copied. If no collection identifier is provided, a virtual collection is used, or `null` is provided, the score won't be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_disabled: Optional[StrictBool] = Field(default=False, description="If set to `true`, the API won't create the score on Google Drive ", alias="googleDriveDisabled") + keep_original_title: Optional[StrictBool] = Field(default=None, description="Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). ", alias="keepOriginalTitle") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["collection", "googleDriveDisabled", "keepOriginalTitle"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreFork from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if collection (nullable) is None + # and model_fields_set contains the field + if self.collection is None and "collection" in self.model_fields_set: + _dict['collection'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreFork from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collection": obj.get("collection"), + "googleDriveDisabled": obj.get("googleDriveDisabled") if obj.get("googleDriveDisabled") is not None else False, + "keepOriginalTitle": obj.get("keepOriginalTitle") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_license.py b/flat_api/aio/models/score_license.py new file mode 100644 index 0000000..3295c4b --- /dev/null +++ b/flat_api/aio/models/score_license.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreLicense(str, Enum): + """ + License of the creation. Read more about the Creative Commons licenses on https://creativecommons.org/licenses/ + """ + + """ + allowed enum values + """ + COPYRIGHT = 'copyright' + CC0 = 'cc0' + CC_MINUS_BY = 'cc-by' + CC_MINUS_BY_MINUS_SA = 'cc-by-sa' + CC_MINUS_BY_MINUS_ND = 'cc-by-nd' + CC_MINUS_BY_MINUS_NC = 'cc-by-nc' + CC_MINUS_BY_MINUS_NC_MINUS_SA = 'cc-by-nc-sa' + CC_MINUS_BY_MINUS_NC_MINUS_ND = 'cc-by-nc-nd' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreLicense from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_likes_counts.py b/flat_api/aio/models/score_likes_counts.py new file mode 100644 index 0000000..37d2d3a --- /dev/null +++ b/flat_api/aio/models/score_likes_counts.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreLikesCounts(BaseModel): + """ + A computed version of the weekly, monthly, yearly and total number of likes for a score + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of likes of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last week") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last month") + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreLikesCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreLikesCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_modification.py b/flat_api/aio/models/score_modification.py new file mode 100644 index 0000000..2ab9d9b --- /dev/null +++ b/flat_api/aio/models/score_modification.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.score_creation_type import ScoreCreationType +from flat_api.aio.models.score_license import ScoreLicense +from flat_api.aio.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreModification(BaseModel): + """ + Edit the score metadata + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the score") + subtitle: Optional[StrictStr] = Field(default=None, description="The subtitle of the score") + composer: Optional[StrictStr] = Field(default=None, description="The composer of the score") + lyricist: Optional[StrictStr] = Field(default=None, description="The lyricist of the score") + arranger: Optional[StrictStr] = Field(default=None, description="The arranger of the score") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + sharing_key: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.", alias="sharingKey") + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="Description of the creation") + tags: Optional[List[StrictStr]] = Field(default=None, description="Tags describing the score") + creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") + license: Optional[ScoreLicense] = None + license_text: Optional[StrictStr] = Field(default=None, description="The rights info written on the score", alias="licenseText") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText"] + + @field_validator('sharing_key', mode="before") + def sharing_key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^[a-f0-9]{128}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{128}$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreModification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if subtitle (nullable) is None + # and model_fields_set contains the field + if self.subtitle is None and "subtitle" in self.model_fields_set: + _dict['subtitle'] = None + + # set to None if composer (nullable) is None + # and model_fields_set contains the field + if self.composer is None and "composer" in self.model_fields_set: + _dict['composer'] = None + + # set to None if lyricist (nullable) is None + # and model_fields_set contains the field + if self.lyricist is None and "lyricist" in self.model_fields_set: + _dict['lyricist'] = None + + # set to None if arranger (nullable) is None + # and model_fields_set contains the field + if self.arranger is None and "arranger" in self.model_fields_set: + _dict['arranger'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if creation_type (nullable) is None + # and model_fields_set contains the field + if self.creation_type is None and "creation_type" in self.model_fields_set: + _dict['creationType'] = None + + # set to None if license (nullable) is None + # and model_fields_set contains the field + if self.license is None and "license" in self.model_fields_set: + _dict['license'] = None + + # set to None if license_text (nullable) is None + # and model_fields_set contains the field + if self.license_text is None and "license_text" in self.model_fields_set: + _dict['licenseText'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreModification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "subtitle": obj.get("subtitle"), + "composer": obj.get("composer"), + "lyricist": obj.get("lyricist"), + "arranger": obj.get("arranger"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "sharingKey": obj.get("sharingKey"), + "description": obj.get("description"), + "tags": obj.get("tags"), + "creationType": obj.get("creationType"), + "license": obj.get("license"), + "licenseText": obj.get("licenseText") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_plays_counts.py b/flat_api/aio/models/score_plays_counts.py new file mode 100644 index 0000000..9ddca5e --- /dev/null +++ b/flat_api/aio/models/score_plays_counts.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScorePlaysCounts(BaseModel): + """ + A computed version of the total, weekly, monthly, and yearly number of plays of the score + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of plays of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of plays of the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of plays of the score") + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly number of plays of the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScorePlaysCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScorePlaysCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_privacy.py b/flat_api/aio/models/score_privacy.py new file mode 100644 index 0000000..83b6f76 --- /dev/null +++ b/flat_api/aio/models/score_privacy.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScorePrivacy(str, Enum): + """ + The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + """ + + """ + allowed enum values + """ + PUBLIC = 'public' + PRIVATE = 'private' + ORGANIZATIONPUBLIC = 'organizationPublic' + PRIVATELINK = 'privateLink' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScorePrivacy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_revision.py b/flat_api/aio/models/score_revision.py new file mode 100644 index 0000000..12c63c4 --- /dev/null +++ b/flat_api/aio/models/score_revision.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_revision_statistics import ScoreRevisionStatistics +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreRevision(BaseModel): + """ + A score revision metadata + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the revision.") + user: Optional[StrictStr] = Field(default=None, description="The user identifier who created the revision") + score: StrictStr = Field(description="The score identifier") + collaborators: Optional[List[StrictStr]] = None + var_date: datetime = Field(description="The date when this revision was created", alias="date") + event: Optional[StrictStr] = Field(default=None, description="The last event (action id) of the revision") + description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") + autosave: Optional[StrictBool] = Field(default=None, description="True if this revision was automatically generated by Flat and not on purpose by the user. ") + statistics: Optional[ScoreRevisionStatistics] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "user", "score", "collaborators", "date", "event", "description", "autosave", "statistics"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevision from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of statistics + if self.statistics: + _dict['statistics'] = self.statistics.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevision from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user": obj.get("user"), + "score": obj.get("score"), + "collaborators": obj.get("collaborators"), + "date": obj.get("date"), + "event": obj.get("event"), + "description": obj.get("description"), + "autosave": obj.get("autosave"), + "statistics": ScoreRevisionStatistics.from_dict(obj["statistics"]) if obj.get("statistics") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_revision_creation.py b/flat_api/aio/models/score_revision_creation.py new file mode 100644 index 0000000..7fecfd3 --- /dev/null +++ b/flat_api/aio/models/score_revision_creation.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreRevisionCreation(BaseModel): + """ + A new created revision + """ # noqa: E501 + data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) + data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") + autosave: Optional[StrictBool] = Field(default=None, description="Must be set to `true` if the revision was created automatically. ") + description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data", "dataEncoding", "autosave", "description"] + + @field_validator('data_encoding') + def data_encoding_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['base64']): + raise ValueError("must be one of enum values ('base64')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevisionCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevisionCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data"), + "dataEncoding": obj.get("dataEncoding"), + "autosave": obj.get("autosave"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_revision_statistics.py b/flat_api/aio/models/score_revision_statistics.py new file mode 100644 index 0000000..88a907e --- /dev/null +++ b/flat_api/aio/models/score_revision_statistics.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreRevisionStatistics(BaseModel): + """ + The statistics related to the score revision (additions and deletions) + """ # noqa: E501 + additions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of additions operations in the last revision") + deletions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of deletions operations in the last revision") + start_date: Optional[datetime] = Field(default=None, description="The date of the first action included in this revision", alias="startDate") + end_date: Optional[datetime] = Field(default=None, description="The date of the latest action included in this revision", alias="endDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["additions", "deletions", "startDate", "endDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreRevisionStatistics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreRevisionStatistics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "additions": obj.get("additions"), + "deletions": obj.get("deletions"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_source.py b/flat_api/aio/models/score_source.py new file mode 100644 index 0000000..d119658 --- /dev/null +++ b/flat_api/aio/models/score_source.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreSource(BaseModel): + """ + ScoreSource + """ # noqa: E501 + google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["googleDrive"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "googleDrive": obj.get("googleDrive") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_summary.py b/flat_api/aio/models/score_summary.py new file mode 100644 index 0000000..e0fe765 --- /dev/null +++ b/flat_api/aio/models/score_summary.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_privacy import ScorePrivacy +from flat_api.aio.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreSummary(BaseModel): + """ + A summary of the score details + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score") + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the score (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + title: StrictStr = Field(description="The title of the score") + privacy: ScorePrivacy + user: UserPublic + html_url: StrictStr = Field(description="The url where the score can be viewed in a web browser", alias="htmlUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sharingKey": obj.get("sharingKey"), + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "htmlUrl": obj.get("htmlUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_track.py b/flat_api/aio/models/score_track.py new file mode 100644 index 0000000..0c14288 --- /dev/null +++ b/flat_api/aio/models/score_track.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_track_point import ScoreTrackPoint +from flat_api.aio.models.score_track_purpose import ScoreTrackPurpose +from flat_api.aio.models.score_track_state import ScoreTrackState +from flat_api.aio.models.score_track_type import ScoreTrackType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrack(BaseModel): + """ + An audio track for a score + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score track") + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + score: Optional[StrictStr] = Field(default=None, description="The unique identifier of the score. Absent for Free Record performance submissions, which are recorded without an attached score. ") + creator: StrictStr = Field(description="The unique identifier of the track creator") + creation_date: datetime = Field(description="The creation date of the track", alias="creationDate") + modification_date: datetime = Field(description="The modification date of the track", alias="modificationDate") + default: StrictBool = Field(description="True if the track should be used as default audio source") + state: ScoreTrackState + type: ScoreTrackType + purpose: ScoreTrackPurpose + url: Optional[StrictStr] = Field(default=None, description="The URL of the track") + media_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` ", alias="mediaId") + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "purpose", "url", "mediaId", "synchronizationPoints"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrack from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) + _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrack from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "title": obj.get("title"), + "score": obj.get("score"), + "creator": obj.get("creator"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "default": obj.get("default"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, + "type": obj.get("type"), + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, + "url": obj.get("url"), + "mediaId": obj.get("mediaId"), + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_track_creation.py b/flat_api/aio/models/score_track_creation.py new file mode 100644 index 0000000..7f20282 --- /dev/null +++ b/flat_api/aio/models/score_track_creation.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_track_point import ScoreTrackPoint +from flat_api.aio.models.score_track_purpose import ScoreTrackPurpose +from flat_api.aio.models.score_track_state import ScoreTrackState +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrackCreation(BaseModel): + """ + Creation of a new track. This one must contain the URL of the track or the corresponding file + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") + state: Optional[ScoreTrackState] = ScoreTrackState.DRAFT + purpose: Optional[ScoreTrackPurpose] = ScoreTrackPurpose.COMMON + url: Optional[StrictStr] = Field(default=None, description="The URL of the track") + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "default", "state", "purpose", "url", "synchronizationPoints"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) + _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "default": obj.get("default"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, + "url": obj.get("url"), + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_track_creation_response.py b/flat_api/aio/models/score_track_creation_response.py new file mode 100644 index 0000000..35acbd4 --- /dev/null +++ b/flat_api/aio/models/score_track_creation_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flat_api.aio.models.score_track import ScoreTrack +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrackCreationResponse(BaseModel): + """ + Response for track creation including optional upload information + """ # noqa: E501 + track: ScoreTrack + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["track"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackCreationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of track + if self.track: + _dict['track'] = self.track.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackCreationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "track": ScoreTrack.from_dict(obj["track"]) if obj.get("track") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_track_point.py b/flat_api/aio/models/score_track_point.py new file mode 100644 index 0000000..d3f9ed9 --- /dev/null +++ b/flat_api/aio/models/score_track_point.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrackPoint(BaseModel): + """ + A track synchronization point + """ # noqa: E501 + type: StrictStr = Field(description="The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid`") + measure_uuid: Optional[UUID] = Field(default=None, description="The measure unique identifier", alias="measureUuid") + time: Union[StrictFloat, StrictInt] = Field(description="The corresponding time in seconds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "measureUuid", "time"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['measure', 'end']): + raise ValueError("must be one of enum values ('measure', 'end')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackPoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackPoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "measureUuid": obj.get("measureUuid"), + "time": obj.get("time") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_track_purpose.py b/flat_api/aio/models/score_track_purpose.py new file mode 100644 index 0000000..cd5341e --- /dev/null +++ b/flat_api/aio/models/score_track_purpose.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackPurpose(str, Enum): + """ + The purpose of the audio track + """ + + """ + allowed enum values + """ + COMMON = 'common' + PERFORMANCESUBMISSION = 'performanceSubmission' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackPurpose from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_track_state.py b/flat_api/aio/models/score_track_state.py new file mode 100644 index 0000000..e5d3200 --- /dev/null +++ b/flat_api/aio/models/score_track_state.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackState(str, Enum): + """ + State of the track + """ + + """ + allowed enum values + """ + DRAFT = 'draft' + COMPLETED = 'completed' + DELETED = 'deleted' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_track_type.py b/flat_api/aio/models/score_track_type.py new file mode 100644 index 0000000..33e083d --- /dev/null +++ b/flat_api/aio/models/score_track_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ScoreTrackType(str, Enum): + """ + The type of an audio track + """ + + """ + allowed enum values + """ + AUDIO = 'audio' + SOUNDCLOUD = 'soundcloud' + YOUTUBE = 'youtube' + VIMEO = 'vimeo' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ScoreTrackType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/score_track_update.py b/flat_api/aio/models/score_track_update.py new file mode 100644 index 0000000..2867486 --- /dev/null +++ b/flat_api/aio/models/score_track_update.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.score_track_point import ScoreTrackPoint +from flat_api.aio.models.score_track_purpose import ScoreTrackPurpose +from flat_api.aio.models.score_track_state import ScoreTrackState +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrackUpdate(BaseModel): + """ + Update an existing track. + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the track") + default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") + state: Optional[ScoreTrackState] = ScoreTrackState.DRAFT + purpose: Optional[ScoreTrackPurpose] = ScoreTrackPurpose.COMMON + synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "default", "state", "purpose", "synchronizationPoints"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) + _items = [] + if self.synchronization_points: + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) + _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "default": obj.get("default"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, + "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/score_views_counts.py b/flat_api/aio/models/score_views_counts.py new file mode 100644 index 0000000..b20f9e1 --- /dev/null +++ b/flat_api/aio/models/score_views_counts.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreViewsCounts(BaseModel): + """ + A computed version of the total, weekly, monthly, and yearly number of views of the score + """ # noqa: E501 + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of views of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of views of the score") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of views of the score") + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly number of views of the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreViewsCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreViewsCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/task.py b/flat_api/aio/models/task.py new file mode 100644 index 0000000..9d22101 --- /dev/null +++ b/flat_api/aio/models/task.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.task_progress import TaskProgress +from flat_api.aio.models.task_result import TaskResult +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Task(BaseModel): + """ + An asynchronous task + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the task") + type: Optional[StrictStr] = Field(default=None, description="Type of the task: * `audio-export`: Exports a score to audio format (MP3, WAV) * `score-save`: Saves or updates a score document * `import-omr`: Processes a PDF through OMR (Optical Music Recognition) and imports it as a score ") + state: StrictStr = Field(description="State of the Task") + format: Optional[StrictStr] = Field(default=None, description="For files processing, the file format (e.g. `mp3`, `wav`)") + score: Optional[StrictStr] = Field(default=None, description="The score unique identifier for tasks related to scores") + revision: Optional[StrictStr] = Field(default=None, description="The score revision identifier for tasks related to scores") + progress: Optional[TaskProgress] = None + creation_date: Optional[datetime] = Field(default=None, description="The creation date of the task", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The last modification date of the task", alias="modificationDate") + done_date: Optional[datetime] = Field(default=None, description="The date when the task has been completed", alias="doneDate") + result: Optional[TaskResult] = None + error_history: Optional[List[StrictStr]] = Field(default=None, description="If any errors happened when processing this task, the list of errors identifiers", alias="errorHistory") + is_cancellable: Optional[StrictBool] = Field(default=None, description="Whether the task can be canceled by the user. Only `true` when the task is in `created` state (waiting to be processed). ", alias="isCancellable") + children: Optional[List[Task]] = Field(default=None, description="Child tasks for hierarchical task structures (e.g., conversion subtasks)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "state", "format", "score", "revision", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", "isCancellable", "children"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['created', 'blocked', 'doing', 'done', 'canceled', 'error']): + raise ValueError("must be one of enum values ('created', 'blocked', 'doing', 'done', 'canceled', 'error')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Task from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "is_cancellable", + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of progress + if self.progress: + _dict['progress'] = self.progress.to_dict() + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in children (list) + _items = [] + if self.children: + for _item_children in self.children: + if _item_children: + _items.append(_item_children.to_dict()) + _dict['children'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Task from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "state": obj.get("state"), + "format": obj.get("format"), + "score": obj.get("score"), + "revision": obj.get("revision"), + "progress": TaskProgress.from_dict(obj["progress"]) if obj.get("progress") is not None else None, + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), + "doneDate": obj.get("doneDate"), + "result": TaskResult.from_dict(obj["result"]) if obj.get("result") is not None else None, + "errorHistory": obj.get("errorHistory"), + "isCancellable": obj.get("isCancellable"), + "children": [Task.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + +# TODO: Rewrite to not use raise_errors +Task.model_rebuild(raise_errors=False) + diff --git a/flat_api/aio/models/task_export_options.py b/flat_api/aio/models/task_export_options.py new file mode 100644 index 0000000..6123a4c --- /dev/null +++ b/flat_api/aio/models/task_export_options.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class TaskExportOptions(BaseModel): + """ + Options for the requested export + """ # noqa: E501 + parts: Optional[List[StrictStr]] = Field(default=None, description="A list of parts to specifically export") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["parts"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskExportOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskExportOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "parts": obj.get("parts") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/task_progress.py b/flat_api/aio/models/task_progress.py new file mode 100644 index 0000000..31f88f5 --- /dev/null +++ b/flat_api/aio/models/task_progress.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class TaskProgress(BaseModel): + """ + Details about the task progression + """ # noqa: E501 + percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percent of the task progression") + text: Optional[StrictStr] = Field(default=None, description="Text details of the task progress") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["percent", "text"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskProgress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskProgress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "percent": obj.get("percent"), + "text": obj.get("text") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/task_result.py b/flat_api/aio/models/task_result.py new file mode 100644 index 0000000..99fca4b --- /dev/null +++ b/flat_api/aio/models/task_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class TaskResult(BaseModel): + """ + Optional result information about this task + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="URL returned by the task worker") + error: Optional[StrictStr] = Field(default=None, description="Error returned by task worker") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "error"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaskResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaskResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/teaching_theme.py b/flat_api/aio/models/teaching_theme.py new file mode 100644 index 0000000..5f15cc9 --- /dev/null +++ b/flat_api/aio/models/teaching_theme.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TeachingTheme(str, Enum): + """ + Teaching theme + """ + + """ + allowed enum values + """ + COMPOSITION = 'composition' + MUSIC_MINUS_THEORY = 'music-theory' + GENERAL_MINUS_MUSIC = 'general-music' + BAND = 'band' + CHOIR = 'choir' + ORCHESTRA = 'orchestra' + JAZZ_MINUS_ENSEMBLE = 'jazz-ensemble' + MUSIC_MINUS_TECHNOLOGY = 'music-technology' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TeachingTheme from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/tutteo_product.py b/flat_api/aio/models/tutteo_product.py new file mode 100644 index 0000000..b40d500 --- /dev/null +++ b/flat_api/aio/models/tutteo_product.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TutteoProduct(str, Enum): + """ + A Tutteo product. * `flat`: [Flat](https://flat.io) - Music notation software for individual users * `flatEdu`: [Flat for Education](https://flat.io/edu) - Music notation software for schools and educators * `msnippet`: [Music Snippet](https://musicsnippet.com) - Embeddable music snippets for websites * `embed`: [Flat Embed](https://flat.io/developers/embed) - Embeddable music notation editor + """ + + """ + allowed enum values + """ + FLAT = 'flat' + FLATEDU = 'flatEdu' + MSNIPPET = 'msnippet' + EMBED = 'embed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TutteoProduct from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/aio/models/user_admin_update.py b/flat_api/aio/models/user_admin_update.py new file mode 100644 index 0000000..01ee625 --- /dev/null +++ b/flat_api/aio/models/user_admin_update.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.aio.models.organization_roles import OrganizationRoles +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserAdminUpdate(BaseModel): + """ + User update as an organization admin + """ # noqa: E501 + password: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=1000)]] = Field(default=None, description="Password of the account") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=30)]] = Field(default=None, description="Username of the account") + firstname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="First name of the user") + lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") + email: Optional[StrictStr] = Field(default=None, description="Email of the account") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "organizationRole", "username", "firstname", "lastname", "email"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAdminUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAdminUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "organizationRole": obj.get("organizationRole"), + "username": obj.get("username"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_azure_details.py b/flat_api/aio/models/user_azure_details.py new file mode 100644 index 0000000..abb6bfc --- /dev/null +++ b/flat_api/aio/models/user_azure_details.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserAzureDetails(BaseModel): + """ + UserAzureDetails + """ # noqa: E501 + oid: Optional[StrictStr] = Field(default=None, description="User object identifier on Azure AD") + hd: Optional[StrictStr] = Field(default=None, description="User tenant (domain name)") + preferred_username: Optional[StrictStr] = Field(default=None, description="User Preferred Username (UPN), i.e. the main email of the user", alias="preferredUsername") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["oid", "hd", "preferredUsername"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAzureDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAzureDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "oid": obj.get("oid"), + "hd": obj.get("hd"), + "preferredUsername": obj.get("preferredUsername") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_basics.py b/flat_api/aio/models/user_basics.py new file mode 100644 index 0000000..41735c6 --- /dev/null +++ b/flat_api/aio/models/user_basics.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.tutteo_product import TutteoProduct +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserBasics(BaseModel): + """ + UserBasics + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserBasics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserBasics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_community_profile_links.py b/flat_api/aio/models/user_community_profile_links.py new file mode 100644 index 0000000..c281a56 --- /dev/null +++ b/flat_api/aio/models/user_community_profile_links.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserCommunityProfileLinks(BaseModel): + """ + Social networks links + """ # noqa: E501 + spotify_url: Optional[StrictStr] = Field(default=None, description="Spotify Profile URL", alias="spotifyUrl") + youtube_url: Optional[StrictStr] = Field(default=None, description="YouTube channel URL", alias="youtubeUrl") + soundcloud_url: Optional[StrictStr] = Field(default=None, description="SoundCloud Profile URL", alias="soundcloudUrl") + tiktok_url: Optional[StrictStr] = Field(default=None, description="TikTok profile URL. For updates, also accepts TikTok usernames", alias="tiktokUrl") + instagram_url: Optional[StrictStr] = Field(default=None, description="Instagram profile URL. For updates, also accepts Instagram usernames", alias="instagramUrl") + website_url: Optional[StrictStr] = Field(default=None, description="Personnal website URL", alias="websiteUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCommunityProfileLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if spotify_url (nullable) is None + # and model_fields_set contains the field + if self.spotify_url is None and "spotify_url" in self.model_fields_set: + _dict['spotifyUrl'] = None + + # set to None if youtube_url (nullable) is None + # and model_fields_set contains the field + if self.youtube_url is None and "youtube_url" in self.model_fields_set: + _dict['youtubeUrl'] = None + + # set to None if soundcloud_url (nullable) is None + # and model_fields_set contains the field + if self.soundcloud_url is None and "soundcloud_url" in self.model_fields_set: + _dict['soundcloudUrl'] = None + + # set to None if tiktok_url (nullable) is None + # and model_fields_set contains the field + if self.tiktok_url is None and "tiktok_url" in self.model_fields_set: + _dict['tiktokUrl'] = None + + # set to None if instagram_url (nullable) is None + # and model_fields_set contains the field + if self.instagram_url is None and "instagram_url" in self.model_fields_set: + _dict['instagramUrl'] = None + + # set to None if website_url (nullable) is None + # and model_fields_set contains the field + if self.website_url is None and "website_url" in self.model_fields_set: + _dict['websiteUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCommunityProfileLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spotifyUrl": obj.get("spotifyUrl"), + "youtubeUrl": obj.get("youtubeUrl"), + "soundcloudUrl": obj.get("soundcloudUrl"), + "tiktokUrl": obj.get("tiktokUrl"), + "instagramUrl": obj.get("instagramUrl"), + "websiteUrl": obj.get("websiteUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_creation.py b/flat_api/aio/models/user_creation.py new file mode 100644 index 0000000..fa407a7 --- /dev/null +++ b/flat_api/aio/models/user_creation.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserCreation(BaseModel): + """ + User creation + """ # noqa: E501 + username: Annotated[str, Field(min_length=1, strict=True, max_length=30)] = Field(description="Username of the new account") + firstname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="First name of the user") + lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") + email: Optional[StrictStr] = Field(default=None, description="Email of the new account") + password: Annotated[str, Field(min_length=6, strict=True, max_length=1000)] = Field(description="Password of the new account") + locale: Optional[StrictStr] = Field(default='en', description="User language. Input values will be automatically normalized to a supported locale code.") + role: Optional[StrictStr] = Field(default='user', description="Role of the new account") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "firstname", "lastname", "email", "password", "locale", "role"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['user', 'teacher', 'admin', 'accountAdmin']): + raise ValueError("must be one of enum values ('user', 'teacher', 'admin', 'accountAdmin')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "email": obj.get("email"), + "password": obj.get("password"), + "locale": obj.get("locale") if obj.get("locale") is not None else 'en', + "role": obj.get("role") if obj.get("role") is not None else 'user' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_details.py b/flat_api/aio/models/user_details.py new file mode 100644 index 0000000..5659c0e --- /dev/null +++ b/flat_api/aio/models/user_details.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.class_roles import ClassRoles +from flat_api.aio.models.organization_roles import OrganizationRoles +from flat_api.aio.models.tutteo_product import TutteoProduct +from flat_api.aio.models.user_azure_details import UserAzureDetails +from flat_api.aio.models.user_community_profile_links import UserCommunityProfileLinks +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserDetails(BaseModel): + """ + User details + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: StrictStr = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + bio: Optional[StrictStr] = Field(default=None, description="User's biography") + registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") + liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") + likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") + plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") + links: Optional[UserCommunityProfileLinks] = None + is_email_verified: Optional[StrictBool] = Field(default=None, description="Whether the user's email address has been verified", alias="isEmailVerified") + azure_details: Optional[UserAzureDetails] = Field(default=None, alias="azureDetails") + private_profile: Optional[StrictBool] = Field(default=None, description="Tell either this user profile is private or not (individual accounts only)", alias="privateProfile") + locale: Optional[StrictStr] = Field(default='en', description="The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` ") + groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") + picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile picture", alias="pictureFile") + cover_picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile cover picture", alias="coverPictureFile") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "allPublicScoresCount", "likesCount", "playsCount", "coverPicture", "profileTheme", "links", "isEmailVerified", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of azure_details + if self.azure_details: + _dict['azureDetails'] = self.azure_details.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if picture_file (nullable) is None + # and model_fields_set contains the field + if self.picture_file is None and "picture_file" in self.model_fields_set: + _dict['pictureFile'] = None + + # set to None if cover_picture_file (nullable) is None + # and model_fields_set contains the field + if self.cover_picture_file is None and "cover_picture_file" in self.model_fields_set: + _dict['coverPictureFile'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "bio": obj.get("bio"), + "registrationDate": obj.get("registrationDate"), + "likedScoresCount": obj.get("likedScoresCount"), + "followersCount": obj.get("followersCount"), + "followingCount": obj.get("followingCount"), + "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "allPublicScoresCount": obj.get("allPublicScoresCount"), + "likesCount": obj.get("likesCount"), + "playsCount": obj.get("playsCount"), + "coverPicture": obj.get("coverPicture"), + "profileTheme": obj.get("profileTheme"), + "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "isEmailVerified": obj.get("isEmailVerified"), + "azureDetails": UserAzureDetails.from_dict(obj["azureDetails"]) if obj.get("azureDetails") is not None else None, + "privateProfile": obj.get("privateProfile"), + "locale": obj.get("locale") if obj.get("locale") is not None else 'en', + "groups": obj.get("groups"), + "pictureFile": obj.get("pictureFile"), + "coverPictureFile": obj.get("coverPictureFile") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_details_admin.py b/flat_api/aio/models/user_details_admin.py new file mode 100644 index 0000000..92e5b8e --- /dev/null +++ b/flat_api/aio/models/user_details_admin.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.class_roles import ClassRoles +from flat_api.aio.models.organization_roles import OrganizationRoles +from flat_api.aio.models.tutteo_product import TutteoProduct +from flat_api.aio.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserDetailsAdmin(BaseModel): + """ + User details (view for organization teacher / admin) + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: StrictStr = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + email: Optional[StrictStr] = Field(default=None, description="Email of the user") + last_activity_date: Optional[datetime] = Field(default=None, description="Date of the last user activity", alias="lastActivityDate") + license: Optional[UserDetailsAdminAllOfLicense] = None + groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") + is_edu_testing_student: Optional[StrictBool] = Field(default=None, description="Indicates if the user account is marked as a testing student account. Testing students are typically excluded from certain educational integrations and workflows. This field helps API clients distinguish between regular students and testing accounts. ", alias="isEduTestingStudent") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", "isEduTestingStudent"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetailsAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of license + if self.license: + _dict['license'] = self.license.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetailsAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "email": obj.get("email"), + "lastActivityDate": obj.get("lastActivityDate"), + "license": UserDetailsAdminAllOfLicense.from_dict(obj["license"]) if obj.get("license") is not None else None, + "groups": obj.get("groups"), + "isEduTestingStudent": obj.get("isEduTestingStudent") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_details_admin_all_of_license.py b/flat_api/aio/models/user_details_admin_all_of_license.py new file mode 100644 index 0000000..ccc7e77 --- /dev/null +++ b/flat_api/aio/models/user_details_admin_all_of_license.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.license_mode import LicenseMode +from flat_api.aio.models.license_sources import LicenseSources +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserDetailsAdminAllOfLicense(BaseModel): + """ + Current active license of the user + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID of the current license") + expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") + source: Optional[LicenseSources] = LicenseSources.ORDER + mode: Optional[LicenseMode] = None + active: Optional[StrictBool] = Field(default=None, description="ID of the current license") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetailsAdminAllOfLicense from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetailsAdminAllOfLicense from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "expirationDate": obj.get("expirationDate"), + "source": obj.get("source") if obj.get("source") is not None else LicenseSources.ORDER, + "mode": obj.get("mode"), + "active": obj.get("active") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_public.py b/flat_api/aio/models/user_public.py new file mode 100644 index 0000000..a9c96a0 --- /dev/null +++ b/flat_api/aio/models/user_public.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.class_roles import ClassRoles +from flat_api.aio.models.organization_roles import OrganizationRoles +from flat_api.aio.models.tutteo_product import TutteoProduct +from flat_api.aio.models.user_community_profile_links import UserCommunityProfileLinks +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserPublic(BaseModel): + """ + Public User details + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: StrictStr = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + bio: Optional[StrictStr] = Field(default=None, description="User's biography") + registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") + liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") + likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") + plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") + links: Optional[UserCommunityProfileLinks] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "allPublicScoresCount", "likesCount", "playsCount", "coverPicture", "profileTheme", "links"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPublic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['links'] = self.links.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cover_picture (nullable) is None + # and model_fields_set contains the field + if self.cover_picture is None and "cover_picture" in self.model_fields_set: + _dict['coverPicture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPublic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl"), + "bio": obj.get("bio"), + "registrationDate": obj.get("registrationDate"), + "likedScoresCount": obj.get("likedScoresCount"), + "followersCount": obj.get("followersCount"), + "followingCount": obj.get("followingCount"), + "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "allPublicScoresCount": obj.get("allPublicScoresCount"), + "likesCount": obj.get("likesCount"), + "playsCount": obj.get("playsCount"), + "coverPicture": obj.get("coverPicture"), + "profileTheme": obj.get("profileTheme"), + "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_public_summary.py b/flat_api/aio/models/user_public_summary.py new file mode 100644 index 0000000..684fd74 --- /dev/null +++ b/flat_api/aio/models/user_public_summary.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.aio.models.class_roles import ClassRoles +from flat_api.aio.models.organization_roles import OrganizationRoles +from flat_api.aio.models.tutteo_product import TutteoProduct +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserPublicSummary(BaseModel): + """ + Public User details summary + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: StrictStr = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") + organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") + class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") + html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserPublicSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserPublicSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges"), + "organization": obj.get("organization"), + "organizationRole": obj.get("organizationRole"), + "classRole": obj.get("classRole"), + "htmlUrl": obj.get("htmlUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_signin_link.py b/flat_api/aio/models/user_signin_link.py new file mode 100644 index 0000000..72e0254 --- /dev/null +++ b/flat_api/aio/models/user_signin_link.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserSigninLink(BaseModel): + """ + UserSigninLink + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="URL to use to sign in to this account") + token: Optional[StrictStr] = Field(default=None, description="Raw sign-in token, can be used to build custom URLs (e.g. deep links)") + expiration_date: Optional[datetime] = Field(default=None, description="Date when the link expires", alias="expirationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "token", "expirationDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSigninLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSigninLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "token": obj.get("token"), + "expirationDate": obj.get("expirationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/models/user_signin_link_creation.py b/flat_api/aio/models/user_signin_link_creation.py new file mode 100644 index 0000000..2fbeb9d --- /dev/null +++ b/flat_api/aio/models/user_signin_link_creation.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserSigninLinkCreation(BaseModel): + """ + UserSigninLinkCreation + """ # noqa: E501 + destination_path: Optional[StrictStr] = Field(default='/', description="Path to redirect to after signin", alias="destinationPath") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["destinationPath"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSigninLinkCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSigninLinkCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "destinationPath": obj.get("destinationPath") if obj.get("destinationPath") is not None else '/' + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/aio/rest.py b/flat_api/aio/rest.py new file mode 100644 index 0000000..34e99a1 --- /dev/null +++ b/flat_api/aio/rest.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl +from typing import Any, Dict, Optional, Union + +import aiohttp +import aiohttp_retry + +from flat_api.aio.exceptions import ApiException, ApiValueError + +RESTResponseType = aiohttp.ClientResponse + +ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'}) + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + async def read(self): + if self.data is None: + self.data = await self.response.read() + return self.data + + @property + def headers(self): + """Returns a CIMultiDictProxy of response headers.""" + return self.response.headers + + def getheaders(self): + """Returns a CIMultiDictProxy of the response headers; use ``headers`` instead.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header; use ``headers.get()`` instead.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + + # Keep a reference so factory methods (_create_pool_manager / _create_connector) + # and subclasses can read extension fields like trace_configs. + self.configuration = configuration + + # maxsize is number of requests to host that are allowed in parallel + self.maxsize = configuration.connection_pool_maxsize + + self.ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert, + cadata=configuration.ca_cert_data, + ) + if configuration.cert_file: + self.ssl_context.load_cert_chain( + configuration.cert_file, keyfile=configuration.key_file + ) + + if not configuration.verify_ssl: + self.ssl_context.check_hostname = False + self.ssl_context.verify_mode = ssl.CERT_NONE + + self.proxy = configuration.proxy + self.proxy_headers = configuration.proxy_headers + + retries = configuration.retries + if retries is None: + self._effective_retry_options = None + elif isinstance(retries, aiohttp_retry.RetryOptionsBase): + self._effective_retry_options = retries + elif isinstance(retries, int): + self._effective_retry_options = aiohttp_retry.ExponentialRetry( + attempts=retries, + factor=2.0, + start_timeout=0.1, + max_timeout=120.0 + ) + else: + self._effective_retry_options = None + + self.pool_manager: Optional[aiohttp.ClientSession] = None + self.retry_client: Optional[aiohttp_retry.RetryClient] = None + + async def close(self) -> None: + if self.pool_manager: + await self.pool_manager.close() + if self.retry_client is not None: + await self.retry_client.close() + + def _create_connector(self) -> aiohttp.TCPConnector: + """Build the TCPConnector used by the ClientSession. + + Override in a subclass to customize DNS resolver, keepalive, etc. + """ + kwargs: Dict[str, Any] = { + "limit": self.maxsize, + "ssl": self.ssl_context, + } + limit_per_host = getattr(self.configuration, "tcp_connector_limit_per_host", None) + if limit_per_host is not None: + kwargs["limit_per_host"] = limit_per_host + return aiohttp.TCPConnector(**kwargs) + + def _create_pool_manager(self) -> aiohttp.ClientSession: + """Build the aiohttp.ClientSession used as the connection pool. + + Override in a subclass to fully customize the session (e.g. attach + aiohttp.TraceConfig, swap json_serialize, etc.). Typed Configuration + fields (trace_configs / client_session_kwargs) are read via getattr + so older Configuration objects remain compatible. + """ + extra = getattr(self.configuration, "client_session_kwargs", None) + kwargs: Dict[str, Any] = { + "connector": self._create_connector(), + "trust_env": True, + } + trace_configs = getattr(self.configuration, "trace_configs", None) + if trace_configs is not None: + kwargs["trace_configs"] = trace_configs + if extra: + kwargs.update(extra) + return aiohttp.ClientSession(**kwargs) + + async def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Execute request + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + timeout = _request_timeout or 5 * 60 + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } + + if self.proxy: + args["proxy"] = self.proxy + if self.proxy_headers: + args["proxy_headers"] = self.proxy_headers + + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): + if body is not None: + body = json.dumps(body) + if body is None and post_params: + body = json.dumps(dict(post_params)) + args["data"] = body + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': + args["data"] = aiohttp.FormData(post_params) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by aiohttp + del headers['Content-Type'] + data = aiohttp.FormData() + for param in post_params: + k, v = param + if isinstance(v, tuple) and len(v) == 3: + data.add_field( + k, + value=v[1], + filename=v[0], + content_type=v[2] + ) + else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) + data.add_field(k, v) + args["data"] = data + + # Pass a `bytes` or `str` parameter directly in the body to support + # other content types than Json when `body` argument is provided + # in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + args["data"] = body + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + + pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] + + # https pool manager + if self.pool_manager is None: + self.pool_manager = self._create_pool_manager() + pool_manager = self.pool_manager + + if self._effective_retry_options is not None and method in ALLOW_RETRY_METHODS: + if self.retry_client is None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=self._effective_retry_options + ) + pool_manager = self.retry_client + + r = await pool_manager.request(**args) + + return RESTResponse(r) diff --git a/flat_api/api/__init__.py b/flat_api/api/__init__.py index 7255250..c244aae 100644 --- a/flat_api/api/__init__.py +++ b/flat_api/api/__init__.py @@ -6,6 +6,7 @@ from flat_api.api.collection_api import CollectionApi from flat_api.api.edu_resources_api import EduResourcesApi from flat_api.api.group_api import GroupApi +from flat_api.api.omr_api import OMRApi from flat_api.api.organization_api import OrganizationApi from flat_api.api.score_api import ScoreApi from flat_api.api.task_api import TaskApi diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index e7219d7..a604311 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -1,17 +1,16 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union @@ -95,6 +94,7 @@ def get_authenticated_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -162,6 +162,7 @@ def get_authenticated_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -229,6 +230,7 @@ def get_authenticated_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -255,7 +257,9 @@ def _get_authenticated_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,11 +274,12 @@ def _get_authenticated_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index b8cc018..5221273 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -1,24 +1,23 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union from typing_extensions import Annotated from flat_api.models.assignment import Assignment from flat_api.models.assignment_copy import AssignmentCopy @@ -108,6 +107,7 @@ def activate_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -175,6 +175,7 @@ def activate_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -242,6 +243,7 @@ def activate_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -268,7 +270,9 @@ def _activate_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -281,11 +285,12 @@ def _activate_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -370,6 +375,7 @@ def add_class_user( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -441,6 +447,7 @@ def add_class_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -512,6 +519,7 @@ def add_class_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -539,7 +547,9 @@ def _add_class_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -554,11 +564,12 @@ def _add_class_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -643,6 +654,7 @@ def archive_assignment( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -714,6 +726,7 @@ def archive_assignment_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -785,6 +798,7 @@ def archive_assignment_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -812,7 +826,9 @@ def _archive_assignment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -827,11 +843,12 @@ def _archive_assignment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -912,6 +929,7 @@ def archive_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -979,6 +997,7 @@ def archive_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1046,6 +1065,7 @@ def archive_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1072,7 +1092,9 @@ def _archive_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1085,11 +1107,12 @@ def _archive_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1178,6 +1201,7 @@ def copy_assignment( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1253,6 +1277,7 @@ def copy_assignment_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1328,6 +1353,7 @@ def copy_assignment_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentCopyResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1356,7 +1382,9 @@ def _copy_assignment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1373,11 +1401,12 @@ def _copy_assignment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1472,6 +1501,7 @@ def create_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1540,6 +1570,7 @@ def create_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1608,6 +1639,7 @@ def create_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1634,7 +1666,9 @@ def _create_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1647,11 +1681,12 @@ def _create_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1749,6 +1784,7 @@ def create_class_assignment( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1820,6 +1856,7 @@ def create_class_assignment_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1891,6 +1928,7 @@ def create_class_assignment_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1918,7 +1956,9 @@ def _create_class_assignment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1933,11 +1973,12 @@ def _create_class_assignment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2039,6 +2080,7 @@ def create_submission( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2114,6 +2156,7 @@ def create_submission_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2189,6 +2232,7 @@ def create_submission_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2217,7 +2261,9 @@ def _create_submission_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2234,11 +2280,12 @@ def _create_submission_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2336,6 +2383,7 @@ def create_test_student_account( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2407,6 +2455,7 @@ def create_test_student_account_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2478,6 +2527,7 @@ def create_test_student_account_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2505,7 +2555,9 @@ def _create_test_student_account_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2522,11 +2574,12 @@ def _create_test_student_account_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2553,10 +2606,10 @@ def _create_test_student_account_serialize( @validate_call - def delete_class_user( + def delete_assignment( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2570,14 +2623,14 @@ def delete_class_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Remove a user from the class + """Delete an assignment - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. :param var_class: Unique identifier of the class (required) :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2600,9 +2653,9 @@ def delete_class_user( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_class_user_serialize( + _param = self._delete_assignment_serialize( var_class=var_class, - user=user, + assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2611,6 +2664,7 @@ def delete_class_user( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2624,10 +2678,10 @@ def delete_class_user( @validate_call - def delete_class_user_with_http_info( + def delete_assignment_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2641,14 +2695,14 @@ def delete_class_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Remove a user from the class + """Delete an assignment - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. :param var_class: Unique identifier of the class (required) :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2671,9 +2725,9 @@ def delete_class_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_class_user_serialize( + _param = self._delete_assignment_serialize( var_class=var_class, - user=user, + assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2682,6 +2736,7 @@ def delete_class_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2695,10 +2750,10 @@ def delete_class_user_with_http_info( @validate_call - def delete_class_user_without_preload_content( + def delete_assignment_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2712,14 +2767,14 @@ def delete_class_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove a user from the class + """Delete an assignment - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + Delete an assignment. This cannot be undone, and it removes a good deal more than the assignment itself: every submission made against it, the students' dedicated copies of the attached scores, the related class stream posts and notifications, and the editor toolset. When the class is synchronized with Google Classroom or Microsoft Teams, the assignment is deleted there too. Requires the teacher role on the class, and the class must not be archived. `archiveAssignment` is almost always what you want instead: it takes the assignment out of the class stream and keeps the submissions and their grades. :param var_class: Unique identifier of the class (required) :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2742,9 +2797,9 @@ def delete_class_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_class_user_serialize( + _param = self._delete_assignment_serialize( var_class=var_class, - user=user, + assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2753,6 +2808,7 @@ def delete_class_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2761,10 +2817,10 @@ def delete_class_user_without_preload_content( return response_data.response - def _delete_class_user_serialize( + def _delete_assignment_serialize( self, var_class, - user, + assignment, _request_auth, _content_type, _headers, @@ -2780,14 +2836,16 @@ def _delete_class_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class - if user is not None: - _path_params['user'] = user + if assignment is not None: + _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -2795,11 +2853,12 @@ def _delete_class_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2809,7 +2868,7 @@ def _delete_class_user_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/classes/{class}/users/{user}', + resource_path='/classes/{class}/assignments/{assignment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2826,11 +2885,10 @@ def _delete_class_user_serialize( @validate_call - def delete_submission( + def delete_class_user( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2843,17 +2901,15 @@ def delete_submission( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AssignmentSubmission: - """Reset a submission + ) -> None: + """Remove a user from the class - Use this method as a teacher to reset a submission and allow student to start over the assignment + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2876,10 +2932,9 @@ def delete_submission( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_serialize( + _param = self._delete_class_user_serialize( var_class=var_class, - assignment=assignment, - submission=submission, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2887,7 +2942,8 @@ def delete_submission( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2901,11 +2957,10 @@ def delete_submission( @validate_call - def delete_submission_with_http_info( + def delete_class_user_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2918,17 +2973,15 @@ def delete_submission_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AssignmentSubmission]: - """Reset a submission + ) -> ApiResponse[None]: + """Remove a user from the class - Use this method as a teacher to reset a submission and allow student to start over the assignment + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2951,10 +3004,9 @@ def delete_submission_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_serialize( + _param = self._delete_class_user_serialize( var_class=var_class, - assignment=assignment, - submission=submission, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2962,7 +3014,8 @@ def delete_submission_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2976,11 +3029,10 @@ def delete_submission_with_http_info( @validate_call - def delete_submission_without_preload_content( + def delete_class_user_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2994,16 +3046,14 @@ def delete_submission_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reset a submission + """Remove a user from the class - Use this method as a teacher to reset a submission and allow student to start over the assignment + This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3026,10 +3076,9 @@ def delete_submission_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_serialize( + _param = self._delete_class_user_serialize( var_class=var_class, - assignment=assignment, - submission=submission, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3037,7 +3086,8 @@ def delete_submission_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3046,11 +3096,10 @@ def delete_submission_without_preload_content( return response_data.response - def _delete_submission_serialize( + def _delete_class_user_serialize( self, var_class, - assignment, - submission, + user, _request_auth, _content_type, _headers, @@ -3066,16 +3115,16 @@ def _delete_submission_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class - if assignment is not None: - _path_params['assignment'] = assignment - if submission is not None: - _path_params['submission'] = submission + if user is not None: + _path_params['user'] = user # process the query parameters # process the header parameters # process the form parameters @@ -3083,11 +3132,12 @@ def _delete_submission_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3097,7 +3147,7 @@ def _delete_submission_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + resource_path='/classes/{class}/users/{user}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3114,12 +3164,11 @@ def _delete_submission_serialize( @validate_call - def delete_submission_comment( + def delete_submission( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3132,9 +3181,10 @@ def delete_submission_comment( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a feedback comment to a submission + ) -> AssignmentSubmission: + """Reset a submission + Use this method as a teacher to reset a submission and allow student to start over the assignment :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3142,8 +3192,6 @@ def delete_submission_comment( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param comment: Unique identifier of the comment (required) - :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3166,11 +3214,10 @@ def delete_submission_comment( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_comment_serialize( + _param = self._delete_submission_serialize( var_class=var_class, assignment=assignment, submission=submission, - comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3178,7 +3225,8 @@ def delete_submission_comment( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3192,12 +3240,11 @@ def delete_submission_comment( @validate_call - def delete_submission_comment_with_http_info( + def delete_submission_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3210,9 +3257,10 @@ def delete_submission_comment_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a feedback comment to a submission + ) -> ApiResponse[AssignmentSubmission]: + """Reset a submission + Use this method as a teacher to reset a submission and allow student to start over the assignment :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3220,8 +3268,6 @@ def delete_submission_comment_with_http_info( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param comment: Unique identifier of the comment (required) - :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3244,11 +3290,10 @@ def delete_submission_comment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_comment_serialize( + _param = self._delete_submission_serialize( var_class=var_class, assignment=assignment, submission=submission, - comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3256,7 +3301,8 @@ def delete_submission_comment_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3270,12 +3316,11 @@ def delete_submission_comment_with_http_info( @validate_call - def delete_submission_comment_without_preload_content( + def delete_submission_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3289,8 +3334,9 @@ def delete_submission_comment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a feedback comment to a submission + """Reset a submission + Use this method as a teacher to reset a submission and allow student to start over the assignment :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3298,8 +3344,6 @@ def delete_submission_comment_without_preload_content( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param comment: Unique identifier of the comment (required) - :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3322,11 +3366,10 @@ def delete_submission_comment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_submission_comment_serialize( + _param = self._delete_submission_serialize( var_class=var_class, assignment=assignment, submission=submission, - comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3334,7 +3377,8 @@ def delete_submission_comment_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3343,12 +3387,11 @@ def delete_submission_comment_without_preload_content( return response_data.response - def _delete_submission_comment_serialize( + def _delete_submission_serialize( self, var_class, assignment, submission, - comment, _request_auth, _content_type, _headers, @@ -3364,7 +3407,9 @@ def _delete_submission_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3374,8 +3419,6 @@ def _delete_submission_comment_serialize( _path_params['assignment'] = assignment if submission is not None: _path_params['submission'] = submission - if comment is not None: - _path_params['comment'] = comment # process the query parameters # process the header parameters # process the form parameters @@ -3383,11 +3426,12 @@ def _delete_submission_comment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3397,7 +3441,7 @@ def _delete_submission_comment_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3414,12 +3458,12 @@ def _delete_submission_comment_serialize( @validate_call - def edit_submission( + def delete_submission_comment( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - body: AssignmentSubmissionUpdate, + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3432,10 +3476,9 @@ def edit_submission( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AssignmentSubmission: - """Edit a submission + ) -> None: + """Delete a feedback comment to a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3443,8 +3486,8 @@ def edit_submission( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param body: (required) - :type body: AssignmentSubmissionUpdate + :param comment: Unique identifier of the comment (required) + :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3467,11 +3510,11 @@ def edit_submission( :return: Returns the result object. """ # noqa: E501 - _param = self._edit_submission_serialize( + _param = self._delete_submission_comment_serialize( var_class=var_class, assignment=assignment, submission=submission, - body=body, + comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3479,7 +3522,8 @@ def edit_submission( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3493,12 +3537,12 @@ def edit_submission( @validate_call - def edit_submission_with_http_info( + def delete_submission_comment_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - body: AssignmentSubmissionUpdate, + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3511,10 +3555,9 @@ def edit_submission_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AssignmentSubmission]: - """Edit a submission + ) -> ApiResponse[None]: + """Delete a feedback comment to a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3522,8 +3565,8 @@ def edit_submission_with_http_info( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param body: (required) - :type body: AssignmentSubmissionUpdate + :param comment: Unique identifier of the comment (required) + :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3546,11 +3589,11 @@ def edit_submission_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._edit_submission_serialize( + _param = self._delete_submission_comment_serialize( var_class=var_class, assignment=assignment, submission=submission, - body=body, + comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3558,7 +3601,8 @@ def edit_submission_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3572,12 +3616,12 @@ def edit_submission_with_http_info( @validate_call - def edit_submission_without_preload_content( + def delete_submission_comment_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - body: AssignmentSubmissionUpdate, + comment: Annotated[StrictStr, Field(description="Unique identifier of the comment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3591,9 +3635,8 @@ def edit_submission_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Edit a submission + """Delete a feedback comment to a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3601,8 +3644,8 @@ def edit_submission_without_preload_content( :type assignment: str :param submission: Unique identifier of the submission (required) :type submission: str - :param body: (required) - :type body: AssignmentSubmissionUpdate + :param comment: Unique identifier of the comment (required) + :type comment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3625,11 +3668,11 @@ def edit_submission_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._edit_submission_serialize( + _param = self._delete_submission_comment_serialize( var_class=var_class, assignment=assignment, submission=submission, - body=body, + comment=comment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3637,7 +3680,8 @@ def edit_submission_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3646,12 +3690,12 @@ def edit_submission_without_preload_content( return response_data.response - def _edit_submission_serialize( + def _delete_submission_comment_serialize( self, var_class, assignment, submission, - body, + comment, _request_auth, _content_type, _headers, @@ -3667,7 +3711,9 @@ def _edit_submission_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3677,34 +3723,22 @@ def _edit_submission_serialize( _path_params['assignment'] = assignment if submission is not None: _path_params['submission'] = submission + if comment is not None: + _path_params['comment'] = comment # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if body is not None: - _body_params = body # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + # authentication setting _auth_settings: List[str] = [ @@ -3712,8 +3746,8 @@ def _edit_submission_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments/{comment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3730,9 +3764,12 @@ def _edit_submission_serialize( @validate_call - def enroll_class( + def edit_submission( self, - enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3745,13 +3782,19 @@ def enroll_class( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClassDetails: - """Join a class + ) -> AssignmentSubmission: + """Edit a submission - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` - :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :type enrollment_code: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3774,8 +3817,11 @@ def enroll_class( :return: Returns the result object. """ # noqa: E501 - _param = self._enroll_class_serialize( - enrollment_code=enrollment_code, + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3783,7 +3829,8 @@ def enroll_class( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3797,9 +3844,867 @@ def enroll_class( @validate_call - def enroll_class_with_http_info( + def edit_submission_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignmentSubmission]: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def edit_submission_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + body: AssignmentSubmissionUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit a submission + + Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param body: (required) + :type body: AssignmentSubmissionUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._edit_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _edit_submission_serialize( + self, + var_class, + assignment, + submission, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def enroll_class( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClassDetails: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def enroll_class_with_http_info( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClassDetails]: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def enroll_class_without_preload_content( + self, + enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Join a class + + Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + + :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) + :type enrollment_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enroll_class_serialize( + enrollment_code=enrollment_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClassDetails", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enroll_class_serialize( + self, + enrollment_code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if enrollment_code is not None: + _path_params['enrollmentCode'] = enrollment_code + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/classes/enroll/{enrollmentCode}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def export_submissions_reviews_as_csv( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_submissions_reviews_as_csv_with_http_info( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def export_submissions_reviews_as_csv_without_preload_content( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """CSV Grades exports + + Export list of submissions grades to a CSV file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_csv_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_submissions_reviews_as_csv_serialize( + self, + var_class, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/csv' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/csv', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def export_submissions_reviews_as_excel( + self, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Excel Grades exports + + Export list of submissions grades to an Excel file + + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_submissions_reviews_as_excel_with_http_info( self, - enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3812,13 +4717,15 @@ def enroll_class_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ClassDetails]: - """Join a class + ) -> ApiResponse[bytes]: + """Excel Grades exports - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Export list of submissions grades to an Excel file - :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :type enrollment_code: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3841,8 +4748,9 @@ def enroll_class_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._enroll_class_serialize( - enrollment_code=enrollment_code, + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3850,7 +4758,8 @@ def enroll_class_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "bytes", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3864,9 +4773,10 @@ def enroll_class_with_http_info( @validate_call - def enroll_class_without_preload_content( + def export_submissions_reviews_as_excel_without_preload_content( self, - enrollment_code: Annotated[StrictStr, Field(description="The enrollment code, available to the teacher in `ClassDetails` ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3880,12 +4790,14 @@ def enroll_class_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Join a class + """Excel Grades exports - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Export list of submissions grades to an Excel file - :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) - :type enrollment_code: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3908,8 +4820,9 @@ def enroll_class_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._enroll_class_serialize( - enrollment_code=enrollment_code, + _param = self._export_submissions_reviews_as_excel_serialize( + var_class=var_class, + assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3917,7 +4830,8 @@ def enroll_class_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "bytes", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3926,9 +4840,10 @@ def enroll_class_without_preload_content( return response_data.response - def _enroll_class_serialize( + def _export_submissions_reviews_as_excel_serialize( self, - enrollment_code, + var_class, + assignment, _request_auth, _content_type, _headers, @@ -3944,12 +4859,16 @@ def _enroll_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters - if enrollment_code is not None: - _path_params['enrollmentCode'] = enrollment_code + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -3957,11 +4876,12 @@ def _enroll_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + ] + ) # authentication setting @@ -3970,8 +4890,8 @@ def _enroll_class_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/classes/enroll/{enrollmentCode}', + method='GET', + resource_path='/classes/{class}/assignments/{assignment}/submissions/excel', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3988,7 +4908,7 @@ def _enroll_class_serialize( @validate_call - def export_submissions_reviews_as_csv( + def get_assignment( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -4004,10 +4924,10 @@ def export_submissions_reviews_as_csv( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """CSV Grades exports + ) -> Assignment: + """Get an assignment - Export list of submissions grades to a CSV file + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -4035,7 +4955,7 @@ def export_submissions_reviews_as_csv( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_csv_serialize( + _param = self._get_assignment_serialize( var_class=var_class, assignment=assignment, _request_auth=_request_auth, @@ -4045,7 +4965,8 @@ def export_submissions_reviews_as_csv( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4059,7 +4980,7 @@ def export_submissions_reviews_as_csv( @validate_call - def export_submissions_reviews_as_csv_with_http_info( + def get_assignment_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -4075,10 +4996,10 @@ def export_submissions_reviews_as_csv_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """CSV Grades exports + ) -> ApiResponse[Assignment]: + """Get an assignment - Export list of submissions grades to a CSV file + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -4106,7 +5027,7 @@ def export_submissions_reviews_as_csv_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_csv_serialize( + _param = self._get_assignment_serialize( var_class=var_class, assignment=assignment, _request_auth=_request_auth, @@ -4116,7 +5037,8 @@ def export_submissions_reviews_as_csv_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4130,7 +5052,7 @@ def export_submissions_reviews_as_csv_with_http_info( @validate_call - def export_submissions_reviews_as_csv_without_preload_content( + def get_assignment_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -4147,9 +5069,9 @@ def export_submissions_reviews_as_csv_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """CSV Grades exports + """Get an assignment - Export list of submissions grades to a CSV file + Retrieve a single assignment, including its attachments, its toolset and its grading settings. Use `listAssignments` to enumerate the assignments of a class. A teacher of the class sees the assignment as authored. A student sees the same document with the teacher-only fields omitted, `teacherInstructions` among them. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -4177,7 +5099,7 @@ def export_submissions_reviews_as_csv_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_csv_serialize( + _param = self._get_assignment_serialize( var_class=var_class, assignment=assignment, _request_auth=_request_auth, @@ -4187,7 +5109,8 @@ def export_submissions_reviews_as_csv_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4196,7 +5119,7 @@ def export_submissions_reviews_as_csv_without_preload_content( return response_data.response - def _export_submissions_reviews_as_csv_serialize( + def _get_assignment_serialize( self, var_class, assignment, @@ -4215,7 +5138,9 @@ def _export_submissions_reviews_as_csv_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4230,11 +5155,12 @@ def _export_submissions_reviews_as_csv_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/csv' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4244,7 +5170,7 @@ def _export_submissions_reviews_as_csv_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions/csv', + resource_path='/classes/{class}/assignments/{assignment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4261,10 +5187,9 @@ def _export_submissions_reviews_as_csv_serialize( @validate_call - def export_submissions_reviews_as_excel( + def get_class( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4277,15 +5202,12 @@ def export_submissions_reviews_as_excel( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Excel Grades exports + ) -> ClassDetails: + """Get the details of a single class - Export list of submissions grades to an Excel file :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4308,9 +5230,8 @@ def export_submissions_reviews_as_excel( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_excel_serialize( + _param = self._get_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4318,7 +5239,8 @@ def export_submissions_reviews_as_excel( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4332,10 +5254,9 @@ def export_submissions_reviews_as_excel( @validate_call - def export_submissions_reviews_as_excel_with_http_info( + def get_class_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4348,15 +5269,12 @@ def export_submissions_reviews_as_excel_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Excel Grades exports + ) -> ApiResponse[ClassDetails]: + """Get the details of a single class - Export list of submissions grades to an Excel file :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4379,9 +5297,8 @@ def export_submissions_reviews_as_excel_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_excel_serialize( + _param = self._get_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4389,7 +5306,8 @@ def export_submissions_reviews_as_excel_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4403,10 +5321,9 @@ def export_submissions_reviews_as_excel_with_http_info( @validate_call - def export_submissions_reviews_as_excel_without_preload_content( + def get_class_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4420,14 +5337,11 @@ def export_submissions_reviews_as_excel_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Excel Grades exports + """Get the details of a single class - Export list of submissions grades to an Excel file :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4450,9 +5364,8 @@ def export_submissions_reviews_as_excel_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._export_submissions_reviews_as_excel_serialize( + _param = self._get_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4460,7 +5373,8 @@ def export_submissions_reviews_as_excel_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4469,10 +5383,9 @@ def export_submissions_reviews_as_excel_without_preload_content( return response_data.response - def _export_submissions_reviews_as_excel_serialize( + def _get_class_serialize( self, var_class, - assignment, _request_auth, _content_type, _headers, @@ -4488,14 +5401,14 @@ def _export_submissions_reviews_as_excel_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class - if assignment is not None: - _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -4503,11 +5416,12 @@ def _export_submissions_reviews_as_excel_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4517,7 +5431,7 @@ def _export_submissions_reviews_as_excel_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions/excel', + resource_path='/classes/{class}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4534,9 +5448,9 @@ def _export_submissions_reviews_as_excel_serialize( @validate_call - def get_class( + def get_score_submissions( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + score: Annotated[StrictStr, Field(description="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`). ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4549,12 +5463,13 @@ def get_class( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClassDetails: - """Get the details of a single class + ) -> List[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. - :param var_class: Unique identifier of the class (required) - :type var_class: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4577,8 +5492,8 @@ def get_class( :return: Returns the result object. """ # noqa: E501 - _param = self._get_class_serialize( - var_class=var_class, + _param = self._get_score_submissions_serialize( + score=score, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4586,7 +5501,8 @@ def get_class( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4600,9 +5516,9 @@ def get_class( @validate_call - def get_class_with_http_info( + def get_score_submissions_with_http_info( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + score: Annotated[StrictStr, Field(description="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`). ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4615,12 +5531,13 @@ def get_class_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ClassDetails]: - """Get the details of a single class + ) -> ApiResponse[List[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. - :param var_class: Unique identifier of the class (required) - :type var_class: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4643,8 +5560,8 @@ def get_class_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_class_serialize( - var_class=var_class, + _param = self._get_score_submissions_serialize( + score=score, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4652,7 +5569,8 @@ def get_class_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4666,9 +5584,9 @@ def get_class_with_http_info( @validate_call - def get_class_without_preload_content( + def get_score_submissions_without_preload_content( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + score: Annotated[StrictStr, Field(description="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`). ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4682,11 +5600,12 @@ def get_class_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the details of a single class + """List submissions related to the score + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. - :param var_class: Unique identifier of the class (required) - :type var_class: str + :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) + :type score: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4709,8 +5628,8 @@ def get_class_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_class_serialize( - var_class=var_class, + _param = self._get_score_submissions_serialize( + score=score, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4718,7 +5637,8 @@ def get_class_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4727,9 +5647,9 @@ def get_class_without_preload_content( return response_data.response - def _get_class_serialize( + def _get_score_submissions_serialize( self, - var_class, + score, _request_auth, _content_type, _headers, @@ -4745,12 +5665,14 @@ def _get_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters - if var_class is not None: - _path_params['class'] = var_class + if score is not None: + _path_params['score'] = score # process the query parameters # process the header parameters # process the form parameters @@ -4758,11 +5680,12 @@ def _get_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4772,7 +5695,7 @@ def _get_class_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}', + resource_path='/scores/{score}/submissions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4789,9 +5712,11 @@ def _get_class_serialize( @validate_call - def get_score_submissions( + def get_submission( self, - score: Annotated[StrictStr, Field(description="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`). ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4804,13 +5729,16 @@ def get_score_submissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignmentSubmission]: - """List submissions related to the score + ) -> AssignmentSubmission: + """Get a student submission - This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. - :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :type score: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4833,8 +5761,10 @@ def get_score_submissions( :return: Returns the result object. """ # noqa: E501 - _param = self._get_score_submissions_serialize( - score=score, + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4842,7 +5772,8 @@ def get_score_submissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4856,9 +5787,11 @@ def get_score_submissions( @validate_call - def get_score_submissions_with_http_info( + def get_submission_with_http_info( self, - score: Annotated[StrictStr, Field(description="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`). ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4871,13 +5804,16 @@ def get_score_submissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignmentSubmission]]: - """List submissions related to the score + ) -> ApiResponse[AssignmentSubmission]: + """Get a student submission - This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. - :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :type score: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4900,8 +5836,10 @@ def get_score_submissions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_score_submissions_serialize( - score=score, + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4909,7 +5847,8 @@ def get_score_submissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4923,9 +5862,11 @@ def get_score_submissions_with_http_info( @validate_call - def get_score_submissions_without_preload_content( + def get_submission_without_preload_content( self, - score: Annotated[StrictStr, Field(description="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`). ")], + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4939,12 +5880,15 @@ def get_score_submissions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List submissions related to the score + """Get a student submission - This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. - :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) - :type score: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4967,8 +5911,10 @@ def get_score_submissions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_score_submissions_serialize( - score=score, + _param = self._get_submission_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4976,7 +5922,8 @@ def get_score_submissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "AssignmentSubmission", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4985,9 +5932,11 @@ def get_score_submissions_without_preload_content( return response_data.response - def _get_score_submissions_serialize( + def _get_submission_serialize( self, - score, + var_class, + assignment, + submission, _request_auth, _content_type, _headers, @@ -5003,12 +5952,18 @@ def _get_score_submissions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters - if score is not None: - _path_params['score'] = score + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission # process the query parameters # process the header parameters # process the form parameters @@ -5016,11 +5971,12 @@ def _get_score_submissions_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5030,7 +5986,7 @@ def _get_score_submissions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/scores/{score}/submissions', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5047,7 +6003,7 @@ def _get_score_submissions_serialize( @validate_call - def get_submission( + def get_submission_comments( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5064,8 +6020,8 @@ def get_submission( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AssignmentSubmission: - """Get a student submission + ) -> List[AssignmentSubmissionComment]: + """List the feedback comments of a submission :param var_class: Unique identifier of the class (required) @@ -5096,7 +6052,7 @@ def get_submission( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_serialize( + _param = self._get_submission_comments_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5107,7 +6063,10 @@ def get_submission( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5121,7 +6080,7 @@ def get_submission( @validate_call - def get_submission_with_http_info( + def get_submission_comments_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5138,8 +6097,8 @@ def get_submission_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AssignmentSubmission]: - """Get a student submission + ) -> ApiResponse[List[AssignmentSubmissionComment]]: + """List the feedback comments of a submission :param var_class: Unique identifier of the class (required) @@ -5170,7 +6129,7 @@ def get_submission_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_serialize( + _param = self._get_submission_comments_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5181,7 +6140,10 @@ def get_submission_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5195,7 +6157,7 @@ def get_submission_with_http_info( @validate_call - def get_submission_without_preload_content( + def get_submission_comments_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5213,7 +6175,7 @@ def get_submission_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a student submission + """List the feedback comments of a submission :param var_class: Unique identifier of the class (required) @@ -5244,7 +6206,7 @@ def get_submission_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_serialize( + _param = self._get_submission_comments_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5255,7 +6217,10 @@ def get_submission_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmission", + '200': "List[AssignmentSubmissionComment]", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5264,7 +6229,7 @@ def get_submission_without_preload_content( return response_data.response - def _get_submission_serialize( + def _get_submission_comments_serialize( self, var_class, assignment, @@ -5284,7 +6249,9 @@ def _get_submission_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5301,11 +6268,12 @@ def _get_submission_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5315,7 +6283,7 @@ def _get_submission_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5332,7 +6300,7 @@ def _get_submission_serialize( @validate_call - def get_submission_comments( + def get_submission_history( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5349,9 +6317,10 @@ def get_submission_comments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignmentSubmissionComment]: - """List the feedback comments of a submission + ) -> List[AssignmentSubmissionHistory]: + """Get the history of the submission + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -5381,7 +6350,7 @@ def get_submission_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_comments_serialize( + _param = self._get_submission_history_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5392,9 +6361,10 @@ def get_submission_comments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionComment]", + '200': "List[AssignmentSubmissionHistory]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5408,7 +6378,7 @@ def get_submission_comments( @validate_call - def get_submission_comments_with_http_info( + def get_submission_history_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5425,9 +6395,10 @@ def get_submission_comments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignmentSubmissionComment]]: - """List the feedback comments of a submission + ) -> ApiResponse[List[AssignmentSubmissionHistory]]: + """Get the history of the submission + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -5457,7 +6428,7 @@ def get_submission_comments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_comments_serialize( + _param = self._get_submission_history_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5468,9 +6439,10 @@ def get_submission_comments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionComment]", + '200': "List[AssignmentSubmissionHistory]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5484,7 +6456,7 @@ def get_submission_comments_with_http_info( @validate_call - def get_submission_comments_without_preload_content( + def get_submission_history_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], @@ -5502,8 +6474,9 @@ def get_submission_comments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the feedback comments of a submission + """Get the history of the submission + For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -5533,7 +6506,7 @@ def get_submission_comments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_comments_serialize( + _param = self._get_submission_history_serialize( var_class=var_class, assignment=assignment, submission=submission, @@ -5544,9 +6517,10 @@ def get_submission_comments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionComment]", + '200': "List[AssignmentSubmissionHistory]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5555,7 +6529,7 @@ def get_submission_comments_without_preload_content( return response_data.response - def _get_submission_comments_serialize( + def _get_submission_history_serialize( self, var_class, assignment, @@ -5575,7 +6549,9 @@ def _get_submission_comments_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5592,11 +6568,12 @@ def _get_submission_comments_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5606,7 +6583,7 @@ def _get_submission_comments_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/history', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5623,11 +6600,10 @@ def _get_submission_comments_serialize( @validate_call - def get_submission_history( + def get_submissions( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5640,17 +6616,14 @@ def get_submission_history( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignmentSubmissionHistory]: - """Get the history of the submission + ) -> List[AssignmentSubmission]: + """List the students' submissions - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5673,10 +6646,9 @@ def get_submission_history( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_history_serialize( + _param = self._get_submissions_serialize( var_class=var_class, assignment=assignment, - submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5684,9 +6656,8 @@ def get_submission_history( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionHistory]", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5700,11 +6671,10 @@ def get_submission_history( @validate_call - def get_submission_history_with_http_info( + def get_submissions_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5717,17 +6687,14 @@ def get_submission_history_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignmentSubmissionHistory]]: - """Get the history of the submission + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the students' submissions - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5750,10 +6717,9 @@ def get_submission_history_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_history_serialize( + _param = self._get_submissions_serialize( var_class=var_class, assignment=assignment, - submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5761,9 +6727,8 @@ def get_submission_history_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionHistory]", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5777,11 +6742,10 @@ def get_submission_history_with_http_info( @validate_call - def get_submission_history_without_preload_content( + def get_submissions_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5795,16 +6759,13 @@ def get_submission_history_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the history of the submission + """List the students' submissions - For teachers only. Returns a detailed history of the submission. This currently includes state and grade histories. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5827,10 +6788,9 @@ def get_submission_history_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submission_history_serialize( + _param = self._get_submissions_serialize( var_class=var_class, assignment=assignment, - submission=submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5838,9 +6798,8 @@ def get_submission_history_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmissionHistory]", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5849,11 +6808,10 @@ def get_submission_history_without_preload_content( return response_data.response - def _get_submission_history_serialize( + def _get_submissions_serialize( self, var_class, assignment, - submission, _request_auth, _content_type, _headers, @@ -5869,7 +6827,9 @@ def _get_submission_history_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5877,8 +6837,6 @@ def _get_submission_history_serialize( _path_params['class'] = var_class if assignment is not None: _path_params['assignment'] = assignment - if submission is not None: - _path_params['submission'] = submission # process the query parameters # process the header parameters # process the form parameters @@ -5886,11 +6844,12 @@ def _get_submission_history_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5900,7 +6859,7 @@ def _get_submission_history_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/history', + resource_path='/classes/{class}/assignments/{assignment}/submissions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5917,10 +6876,9 @@ def _get_submission_history_serialize( @validate_call - def get_submissions( + def list_assignments( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5933,14 +6891,12 @@ def get_submissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignmentSubmission]: - """List the students' submissions + ) -> List[ClassAssignment]: + """Assignments listing :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5963,9 +6919,8 @@ def get_submissions( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submissions_serialize( + _param = self._list_assignments_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5973,7 +6928,8 @@ def get_submissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5987,10 +6943,9 @@ def get_submissions( @validate_call - def get_submissions_with_http_info( + def list_assignments_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6003,14 +6958,12 @@ def get_submissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignmentSubmission]]: - """List the students' submissions + ) -> ApiResponse[List[ClassAssignment]]: + """Assignments listing :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6033,9 +6986,8 @@ def get_submissions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submissions_serialize( + _param = self._list_assignments_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6043,7 +6995,8 @@ def get_submissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6057,10 +7010,9 @@ def get_submissions_with_http_info( @validate_call - def get_submissions_without_preload_content( + def list_assignments_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6074,13 +7026,11 @@ def get_submissions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the students' submissions + """Assignments listing :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6103,9 +7053,8 @@ def get_submissions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_submissions_serialize( + _param = self._list_assignments_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6113,7 +7062,8 @@ def get_submissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassAssignment]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6122,10 +7072,9 @@ def get_submissions_without_preload_content( return response_data.response - def _get_submissions_serialize( + def _list_assignments_serialize( self, var_class, - assignment, _request_auth, _content_type, _headers, @@ -6141,14 +7090,14 @@ def _get_submissions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class - if assignment is not None: - _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -6156,11 +7105,12 @@ def _get_submissions_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6170,7 +7120,7 @@ def _get_submissions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments/{assignment}/submissions', + resource_path='/classes/{class}/assignments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6187,9 +7137,10 @@ def _get_submissions_serialize( @validate_call - def list_assignments( + def list_class_student_submissions( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6202,12 +7153,15 @@ def list_assignments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ClassAssignment]: - """Assignments listing + ) -> List[AssignmentSubmission]: + """List the submissions for a student + Use this method as a teacher to list all the assignment submissions sent by a student of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6230,8 +7184,9 @@ def list_assignments( :return: Returns the result object. """ # noqa: E501 - _param = self._list_assignments_serialize( + _param = self._list_class_student_submissions_serialize( var_class=var_class, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6239,7 +7194,8 @@ def list_assignments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassAssignment]", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6253,9 +7209,10 @@ def list_assignments( @validate_call - def list_assignments_with_http_info( + def list_class_student_submissions_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6268,12 +7225,15 @@ def list_assignments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ClassAssignment]]: - """Assignments listing + ) -> ApiResponse[List[AssignmentSubmission]]: + """List the submissions for a student + Use this method as a teacher to list all the assignment submissions sent by a student of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6296,8 +7256,9 @@ def list_assignments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_assignments_serialize( + _param = self._list_class_student_submissions_serialize( var_class=var_class, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6305,7 +7266,8 @@ def list_assignments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassAssignment]", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6319,9 +7281,10 @@ def list_assignments_with_http_info( @validate_call - def list_assignments_without_preload_content( + def list_class_student_submissions_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + user: Annotated[StrictStr, Field(description="Unique identifier of the user")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6335,11 +7298,14 @@ def list_assignments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Assignments listing + """List the submissions for a student + Use this method as a teacher to list all the assignment submissions sent by a student of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param user: Unique identifier of the user (required) + :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6362,8 +7328,9 @@ def list_assignments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_assignments_serialize( + _param = self._list_class_student_submissions_serialize( var_class=var_class, + user=user, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6371,7 +7338,8 @@ def list_assignments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassAssignment]", + '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6380,9 +7348,10 @@ def list_assignments_without_preload_content( return response_data.response - def _list_assignments_serialize( + def _list_class_student_submissions_serialize( self, var_class, + user, _request_auth, _content_type, _headers, @@ -6398,12 +7367,16 @@ def _list_assignments_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class + if user is not None: + _path_params['user'] = user # process the query parameters # process the header parameters # process the form parameters @@ -6411,11 +7384,12 @@ def _list_assignments_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6425,7 +7399,7 @@ def _list_assignments_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/assignments', + resource_path='/classes/{class}/students/{user}/submissions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6442,10 +7416,9 @@ def _list_assignments_serialize( @validate_call - def list_class_student_submissions( + def list_classes( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6458,15 +7431,12 @@ def list_class_student_submissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignmentSubmission]: - """List the submissions for a student + ) -> List[ClassDetails]: + """List the classes available for the current user - Use this method as a teacher to list all the assignment submissions sent by a student of the class - :param var_class: Unique identifier of the class (required) - :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param state: Filter the classes by state + :type state: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6489,9 +7459,8 @@ def list_class_student_submissions( :return: Returns the result object. """ # noqa: E501 - _param = self._list_class_student_submissions_serialize( - var_class=var_class, - user=user, + _param = self._list_classes_serialize( + state=state, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6499,7 +7468,8 @@ def list_class_student_submissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6513,10 +7483,9 @@ def list_class_student_submissions( @validate_call - def list_class_student_submissions_with_http_info( + def list_classes_with_http_info( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6529,15 +7498,12 @@ def list_class_student_submissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignmentSubmission]]: - """List the submissions for a student + ) -> ApiResponse[List[ClassDetails]]: + """List the classes available for the current user - Use this method as a teacher to list all the assignment submissions sent by a student of the class - :param var_class: Unique identifier of the class (required) - :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param state: Filter the classes by state + :type state: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6560,9 +7526,8 @@ def list_class_student_submissions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_class_student_submissions_serialize( - var_class=var_class, - user=user, + _param = self._list_classes_serialize( + state=state, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6570,7 +7535,8 @@ def list_class_student_submissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6584,10 +7550,9 @@ def list_class_student_submissions_with_http_info( @validate_call - def list_class_student_submissions_without_preload_content( + def list_classes_without_preload_content( self, - var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - user: Annotated[StrictStr, Field(description="Unique identifier of the user")], + state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6601,14 +7566,11 @@ def list_class_student_submissions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the submissions for a student + """List the classes available for the current user - Use this method as a teacher to list all the assignment submissions sent by a student of the class - :param var_class: Unique identifier of the class (required) - :type var_class: str - :param user: Unique identifier of the user (required) - :type user: str + :param state: Filter the classes by state + :type state: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6631,9 +7593,8 @@ def list_class_student_submissions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_class_student_submissions_serialize( - var_class=var_class, - user=user, + _param = self._list_classes_serialize( + state=state, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6641,7 +7602,8 @@ def list_class_student_submissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignmentSubmission]", + '200': "List[ClassDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6650,10 +7612,9 @@ def list_class_student_submissions_without_preload_content( return response_data.response - def _list_class_student_submissions_serialize( + def _list_classes_serialize( self, - var_class, - user, + state, _request_auth, _content_type, _headers, @@ -6669,26 +7630,29 @@ def _list_class_student_submissions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters - if var_class is not None: - _path_params['class'] = var_class - if user is not None: - _path_params['user'] = user # process the query parameters + if state is not None: + + _query_params.append(('state', state)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6698,7 +7662,7 @@ def _list_class_student_submissions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/classes/{class}/students/{user}/submissions', + resource_path='/classes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6715,9 +7679,12 @@ def _list_class_student_submissions_serialize( @validate_call - def list_classes( + def post_submission_comment( self, - state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6730,12 +7697,18 @@ def list_classes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ClassDetails]: - """List the classes available for the current user + ) -> AssignmentSubmissionComment: + """Add a feedback comment to a submission - :param state: Filter the classes by state - :type state: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6758,8 +7731,11 @@ def list_classes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_classes_serialize( - state=state, + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6767,7 +7743,10 @@ def list_classes( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassDetails]", + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6781,9 +7760,12 @@ def list_classes( @validate_call - def list_classes_with_http_info( + def post_submission_comment_with_http_info( self, - state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6796,12 +7778,18 @@ def list_classes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ClassDetails]]: - """List the classes available for the current user + ) -> ApiResponse[AssignmentSubmissionComment]: + """Add a feedback comment to a submission - :param state: Filter the classes by state - :type state: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6824,8 +7812,11 @@ def list_classes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_classes_serialize( - state=state, + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6833,7 +7824,10 @@ def list_classes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassDetails]", + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6847,9 +7841,12 @@ def list_classes_with_http_info( @validate_call - def list_classes_without_preload_content( + def post_submission_comment_without_preload_content( self, - state: Annotated[Optional[StrictStr], Field(description="Filter the classes by state")] = None, + var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], + assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6863,11 +7860,17 @@ def list_classes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the classes available for the current user + """Add a feedback comment to a submission - :param state: Filter the classes by state - :type state: str + :param var_class: Unique identifier of the class (required) + :type var_class: str + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param submission: Unique identifier of the submission (required) + :type submission: str + :param assignment_submission_comment_creation: (required) + :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6890,8 +7893,11 @@ def list_classes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_classes_serialize( - state=state, + _param = self._post_submission_comment_serialize( + var_class=var_class, + assignment=assignment, + submission=submission, + assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6899,7 +7905,10 @@ def list_classes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ClassDetails]", + '200': "AssignmentSubmissionComment", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6908,9 +7917,12 @@ def list_classes_without_preload_content( return response_data.response - def _list_classes_serialize( + def _post_submission_comment_serialize( self, - state, + var_class, + assignment, + submission, + assignment_submission_comment_creation, _request_auth, _content_type, _headers, @@ -6926,27 +7938,47 @@ def _list_classes_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters + if var_class is not None: + _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment + if submission is not None: + _path_params['submission'] = submission # process the query parameters - if state is not None: - - _query_params.append(('state', state)) - # process the header parameters # process the form parameters # process the body parameter + if assignment_submission_comment_creation is not None: + _body_params = assignment_submission_comment_creation # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -6954,8 +7986,8 @@ def _list_classes_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/classes', + method='POST', + resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6972,12 +8004,10 @@ def _list_classes_serialize( @validate_call - def post_submission_comment( + def unarchive_assignment( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6990,18 +8020,15 @@ def post_submission_comment( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AssignmentSubmissionComment: - """Add a feedback comment to a submission + ) -> Assignment: + """Unarchive the assignment. + Mark the assignment as `active`. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str - :param assignment_submission_comment_creation: (required) - :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7024,11 +8051,9 @@ def post_submission_comment( :return: Returns the result object. """ # noqa: E501 - _param = self._post_submission_comment_serialize( + _param = self._unarchive_assignment_serialize( var_class=var_class, assignment=assignment, - submission=submission, - assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7036,9 +8061,8 @@ def post_submission_comment( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmissionComment", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7052,12 +8076,10 @@ def post_submission_comment( @validate_call - def post_submission_comment_with_http_info( + def unarchive_assignment_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7070,18 +8092,15 @@ def post_submission_comment_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AssignmentSubmissionComment]: - """Add a feedback comment to a submission + ) -> ApiResponse[Assignment]: + """Unarchive the assignment. + Mark the assignment as `active`. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str - :param assignment_submission_comment_creation: (required) - :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7104,11 +8123,9 @@ def post_submission_comment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._post_submission_comment_serialize( + _param = self._unarchive_assignment_serialize( var_class=var_class, assignment=assignment, - submission=submission, - assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7116,9 +8133,8 @@ def post_submission_comment_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmissionComment", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7132,12 +8148,10 @@ def post_submission_comment_with_http_info( @validate_call - def post_submission_comment_without_preload_content( + def unarchive_assignment_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], - submission: Annotated[StrictStr, Field(description="Unique identifier of the submission")], - assignment_submission_comment_creation: AssignmentSubmissionCommentCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7151,17 +8165,14 @@ def post_submission_comment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Add a feedback comment to a submission + """Unarchive the assignment. + Mark the assignment as `active`. :param var_class: Unique identifier of the class (required) :type var_class: str :param assignment: Unique identifier of the assignment (required) :type assignment: str - :param submission: Unique identifier of the submission (required) - :type submission: str - :param assignment_submission_comment_creation: (required) - :type assignment_submission_comment_creation: AssignmentSubmissionCommentCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7184,11 +8195,9 @@ def post_submission_comment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._post_submission_comment_serialize( + _param = self._unarchive_assignment_serialize( var_class=var_class, assignment=assignment, - submission=submission, - assignment_submission_comment_creation=assignment_submission_comment_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7196,9 +8205,8 @@ def post_submission_comment_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AssignmentSubmissionComment", - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7207,12 +8215,10 @@ def post_submission_comment_without_preload_content( return response_data.response - def _post_submission_comment_serialize( + def _unarchive_assignment_serialize( self, var_class, assignment, - submission, - assignment_submission_comment_creation, _request_auth, _content_type, _headers, @@ -7228,7 +8234,9 @@ def _post_submission_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -7236,36 +8244,20 @@ def _post_submission_comment_serialize( _path_params['class'] = var_class if assignment is not None: _path_params['assignment'] = assignment - if submission is not None: - _path_params['submission'] = submission # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if assignment_submission_comment_creation is not None: - _body_params = assignment_submission_comment_creation # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + # authentication setting _auth_settings: List[str] = [ @@ -7273,8 +8265,8 @@ def _post_submission_comment_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/classes/{class}/assignments/{assignment}/submissions/{submission}/comments', + method='DELETE', + resource_path='/classes/{class}/assignments/{assignment}/archive', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7291,10 +8283,9 @@ def _post_submission_comment_serialize( @validate_call - def unarchive_assignment( + def unarchive_class( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7307,15 +8298,13 @@ def unarchive_assignment( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Assignment: - """Unarchive the assignment. + ) -> ClassDetails: + """Unarchive the class - Mark the assignment as `active`. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7338,9 +8327,8 @@ def unarchive_assignment( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_assignment_serialize( + _param = self._unarchive_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7348,7 +8336,8 @@ def unarchive_assignment( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Assignment", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7362,10 +8351,9 @@ def unarchive_assignment( @validate_call - def unarchive_assignment_with_http_info( + def unarchive_class_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7378,15 +8366,13 @@ def unarchive_assignment_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Assignment]: - """Unarchive the assignment. + ) -> ApiResponse[ClassDetails]: + """Unarchive the class - Mark the assignment as `active`. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7409,9 +8395,8 @@ def unarchive_assignment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_assignment_serialize( + _param = self._unarchive_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7419,7 +8404,8 @@ def unarchive_assignment_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Assignment", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7433,10 +8419,9 @@ def unarchive_assignment_with_http_info( @validate_call - def unarchive_assignment_without_preload_content( + def unarchive_class_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7450,14 +8435,12 @@ def unarchive_assignment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Unarchive the assignment. + """Unarchive the class - Mark the assignment as `active`. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str - :param assignment: Unique identifier of the assignment (required) - :type assignment: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7480,9 +8463,8 @@ def unarchive_assignment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_assignment_serialize( + _param = self._unarchive_class_serialize( var_class=var_class, - assignment=assignment, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7490,7 +8472,8 @@ def unarchive_assignment_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Assignment", + '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7499,10 +8482,9 @@ def unarchive_assignment_without_preload_content( return response_data.response - def _unarchive_assignment_serialize( + def _unarchive_class_serialize( self, var_class, - assignment, _request_auth, _content_type, _headers, @@ -7518,14 +8500,14 @@ def _unarchive_assignment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class - if assignment is not None: - _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -7533,11 +8515,12 @@ def _unarchive_assignment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -7547,7 +8530,7 @@ def _unarchive_assignment_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/classes/{class}/assignments/{assignment}/archive', + resource_path='/classes/{class}/archive', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7564,9 +8547,10 @@ def _unarchive_assignment_serialize( @validate_call - def unarchive_class( + def update_class( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7580,12 +8564,14 @@ def unarchive_class( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ClassDetails: - """Unarchive the class + """Update the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Update the meta information of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7608,8 +8594,9 @@ def unarchive_class( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_class_serialize( + _param = self._update_class_serialize( var_class=var_class, + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7618,6 +8605,7 @@ def unarchive_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7631,9 +8619,10 @@ def unarchive_class( @validate_call - def unarchive_class_with_http_info( + def update_class_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7647,12 +8636,14 @@ def unarchive_class_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ClassDetails]: - """Unarchive the class + """Update the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Update the meta information of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7675,8 +8666,9 @@ def unarchive_class_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_class_serialize( + _param = self._update_class_serialize( var_class=var_class, + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7685,6 +8677,7 @@ def unarchive_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7698,9 +8691,10 @@ def unarchive_class_with_http_info( @validate_call - def unarchive_class_without_preload_content( + def update_class_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], + body: Annotated[ClassUpdate, Field(description="Details of the Class")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7714,12 +8708,14 @@ def unarchive_class_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Unarchive the class + """Update the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Update the meta information of the class :param var_class: Unique identifier of the class (required) :type var_class: str + :param body: Details of the Class (required) + :type body: ClassUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7742,8 +8738,9 @@ def unarchive_class_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._unarchive_class_serialize( + _param = self._update_class_serialize( var_class=var_class, + body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7752,6 +8749,7 @@ def unarchive_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassDetails", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7760,9 +8758,10 @@ def unarchive_class_without_preload_content( return response_data.response - def _unarchive_class_serialize( + def _update_class_serialize( self, var_class, + body, _request_auth, _content_type, _headers, @@ -7778,7 +8777,9 @@ def _unarchive_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -7788,15 +8789,31 @@ def _unarchive_class_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -7804,8 +8821,8 @@ def _unarchive_class_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/classes/{class}/archive', + method='PUT', + resource_path='/classes/{class}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7822,10 +8839,11 @@ def _unarchive_class_serialize( @validate_call - def update_class( + def update_class_assignment( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - body: Annotated[ClassUpdate, Field(description="Details of the Class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7838,15 +8856,17 @@ def update_class( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClassDetails: - """Update the class + ) -> Assignment: + """Update an assignment - Update the meta information of the class + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. :param var_class: Unique identifier of the class (required) :type var_class: str - :param body: Details of the Class (required) - :type body: ClassUpdate + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7869,8 +8889,9 @@ def update_class( :return: Returns the result object. """ # noqa: E501 - _param = self._update_class_serialize( + _param = self._update_class_assignment_serialize( var_class=var_class, + assignment=assignment, body=body, _request_auth=_request_auth, _content_type=_content_type, @@ -7879,7 +8900,8 @@ def update_class( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7893,10 +8915,11 @@ def update_class( @validate_call - def update_class_with_http_info( + def update_class_assignment_with_http_info( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - body: Annotated[ClassUpdate, Field(description="Details of the Class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7909,15 +8932,17 @@ def update_class_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ClassDetails]: - """Update the class + ) -> ApiResponse[Assignment]: + """Update an assignment - Update the meta information of the class + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. :param var_class: Unique identifier of the class (required) :type var_class: str - :param body: Details of the Class (required) - :type body: ClassUpdate + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7940,8 +8965,9 @@ def update_class_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_class_serialize( + _param = self._update_class_assignment_serialize( var_class=var_class, + assignment=assignment, body=body, _request_auth=_request_auth, _content_type=_content_type, @@ -7950,7 +8976,8 @@ def update_class_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7964,10 +8991,11 @@ def update_class_with_http_info( @validate_call - def update_class_without_preload_content( + def update_class_assignment_without_preload_content( self, var_class: Annotated[StrictStr, Field(description="Unique identifier of the class")], - body: Annotated[ClassUpdate, Field(description="Details of the Class")], + assignment: Annotated[StrictStr, Field(description="Unique identifier of the assignment")], + body: ClassAssignmentUpdate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7981,14 +9009,16 @@ def update_class_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update the class + """Update an assignment - Update the meta information of the class + Update an assignment. Only the properties present in the request body are modified, so a partial body leaves everything else as it was. `attachments` is the exception: when present it replaces the whole list. Requires the teacher role on the class. The class must not be archived, and an assignment that is already `active` cannot be moved back to `draft`. Editing an assignment that students have already started does not reset their submissions. To take an assignment out of circulation while keeping the work, use `archiveAssignment`. :param var_class: Unique identifier of the class (required) :type var_class: str - :param body: Details of the Class (required) - :type body: ClassUpdate + :param assignment: Unique identifier of the assignment (required) + :type assignment: str + :param body: (required) + :type body: ClassAssignmentUpdate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8011,8 +9041,9 @@ def update_class_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_class_serialize( + _param = self._update_class_assignment_serialize( var_class=var_class, + assignment=assignment, body=body, _request_auth=_request_auth, _content_type=_content_type, @@ -8021,7 +9052,8 @@ def update_class_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ClassDetails", + '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8030,9 +9062,10 @@ def update_class_without_preload_content( return response_data.response - def _update_class_serialize( + def _update_class_assignment_serialize( self, var_class, + assignment, body, _request_auth, _content_type, @@ -8049,12 +9082,16 @@ def _update_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if var_class is not None: _path_params['class'] = var_class + if assignment is not None: + _path_params['assignment'] = assignment # process the query parameters # process the header parameters # process the form parameters @@ -8064,11 +9101,12 @@ def _update_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -8091,7 +9129,7 @@ def _update_class_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/classes/{class}', + resource_path='/classes/{class}/assignments/{assignment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8179,6 +9217,7 @@ def update_submission_comment( '200': "AssignmentSubmissionComment", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8263,6 +9302,7 @@ def update_submission_comment_with_http_info( '200': "AssignmentSubmissionComment", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8347,6 +9387,7 @@ def update_submission_comment_without_preload_content( '200': "AssignmentSubmissionComment", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8377,7 +9418,9 @@ def _update_submission_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -8398,11 +9441,12 @@ def _update_submission_comment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index 40be3c7..1889bb3 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -1,28 +1,28 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from pydantic import Field, StrictStr, field_validator -from typing import Optional +from typing import List, Optional from typing_extensions import Annotated from flat_api.models.collection import Collection from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification +from flat_api.models.flat_error_response import FlatErrorResponse from flat_api.models.score_details import ScoreDetails from flat_api.api_client import ApiClient, RequestSerialized @@ -46,7 +46,7 @@ def __init__(self, api_client=None) -> None: @validate_call def add_score_to_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ @@ -66,7 +66,7 @@ def add_score_to_collection( This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -108,6 +108,7 @@ def add_score_to_collection( '200': "ScoreDetails", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -123,7 +124,7 @@ def add_score_to_collection( @validate_call def add_score_to_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ @@ -143,7 +144,7 @@ def add_score_to_collection_with_http_info( This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -185,6 +186,7 @@ def add_score_to_collection_with_http_info( '200': "ScoreDetails", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -200,7 +202,7 @@ def add_score_to_collection_with_http_info( @validate_call def add_score_to_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ @@ -220,7 +222,7 @@ def add_score_to_collection_without_preload_content( This operation will add a score to a collection. The default behavior will make the score available across multiple collections. You must have the capability `canAddScores` on the provided `collection` to perform the action. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -262,6 +264,7 @@ def add_score_to_collection_without_preload_content( '200': "ScoreDetails", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -290,7 +293,9 @@ def _add_score_to_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -309,12 +314,26 @@ def _add_score_to_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -358,7 +377,7 @@ def create_collection( ) -> Collection: """Create a new collection - This method will create a new collection and add it to your `root` collection. + This method will create a new collection in your account. :param body: (required) :type body: CollectionCreation @@ -395,6 +414,7 @@ def create_collection( _response_types_map: Dict[str, Optional[str]] = { '200': "Collection", '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -426,7 +446,7 @@ def create_collection_with_http_info( ) -> ApiResponse[Collection]: """Create a new collection - This method will create a new collection and add it to your `root` collection. + This method will create a new collection in your account. :param body: (required) :type body: CollectionCreation @@ -463,6 +483,7 @@ def create_collection_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Collection", '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -494,7 +515,7 @@ def create_collection_without_preload_content( ) -> RESTResponseType: """Create a new collection - This method will create a new collection and add it to your `root` collection. + This method will create a new collection in your account. :param body: (required) :type body: CollectionCreation @@ -531,6 +552,7 @@ def create_collection_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Collection", '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -557,7 +579,9 @@ def _create_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -570,11 +594,12 @@ def _create_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -616,7 +641,7 @@ def _create_collection_serialize( @validate_call def delete_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -634,7 +659,7 @@ def delete_collection( This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -670,6 +695,7 @@ def delete_collection( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -685,7 +711,7 @@ def delete_collection( @validate_call def delete_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -703,7 +729,7 @@ def delete_collection_with_http_info( This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -739,6 +765,7 @@ def delete_collection_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -754,7 +781,7 @@ def delete_collection_with_http_info( @validate_call def delete_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -772,7 +799,7 @@ def delete_collection_without_preload_content( This method will schedule the deletion of the collection. Until deleted, the collection will be available in the `trash`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -808,6 +835,7 @@ def delete_collection_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -834,7 +862,9 @@ def _delete_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -847,11 +877,12 @@ def _delete_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -880,8 +911,9 @@ def _delete_collection_serialize( @validate_call def delete_score_from_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -900,10 +932,12 @@ def delete_score_from_collection( This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -931,6 +965,7 @@ def delete_score_from_collection( _param = self._delete_score_from_collection_serialize( collection=collection, score=score, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -942,6 +977,7 @@ def delete_score_from_collection( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -957,8 +993,9 @@ def delete_score_from_collection( @validate_call def delete_score_from_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -977,10 +1014,12 @@ def delete_score_from_collection_with_http_info( This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -1008,6 +1047,7 @@ def delete_score_from_collection_with_http_info( _param = self._delete_score_from_collection_serialize( collection=collection, score=score, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -1019,6 +1059,7 @@ def delete_score_from_collection_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1034,8 +1075,9 @@ def delete_score_from_collection_with_http_info( @validate_call def delete_score_from_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1054,10 +1096,12 @@ def delete_score_from_collection_without_preload_content( This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -1085,6 +1129,7 @@ def delete_score_from_collection_without_preload_content( _param = self._delete_score_from_collection_serialize( collection=collection, score=score, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -1096,6 +1141,7 @@ def delete_score_from_collection_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1108,6 +1154,7 @@ def _delete_score_from_collection_serialize( self, collection, score, + event_properties, sharing_key, _request_auth, _content_type, @@ -1124,7 +1171,9 @@ def _delete_score_from_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1133,6 +1182,10 @@ def _delete_score_from_collection_serialize( if score is not None: _path_params['score'] = score # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + if sharing_key is not None: _query_params.append(('sharingKey', sharing_key)) @@ -1143,12 +1196,26 @@ def _delete_score_from_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1176,7 +1243,7 @@ def _delete_score_from_collection_serialize( @validate_call def edit_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], body: CollectionModification, _request_timeout: Union[ None, @@ -1194,7 +1261,7 @@ def edit_collection( """Update a collection's metadata - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param body: (required) :type body: CollectionModification @@ -1233,6 +1300,7 @@ def edit_collection( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1248,7 +1316,7 @@ def edit_collection( @validate_call def edit_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], body: CollectionModification, _request_timeout: Union[ None, @@ -1266,7 +1334,7 @@ def edit_collection_with_http_info( """Update a collection's metadata - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param body: (required) :type body: CollectionModification @@ -1305,6 +1373,7 @@ def edit_collection_with_http_info( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1320,7 +1389,7 @@ def edit_collection_with_http_info( @validate_call def edit_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], body: CollectionModification, _request_timeout: Union[ None, @@ -1338,7 +1407,7 @@ def edit_collection_without_preload_content( """Update a collection's metadata - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param body: (required) :type body: CollectionModification @@ -1377,6 +1446,7 @@ def edit_collection_without_preload_content( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1404,7 +1474,9 @@ def _edit_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1419,11 +1491,12 @@ def _edit_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1465,7 +1538,7 @@ def _edit_collection_serialize( @validate_call def get_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1483,7 +1556,7 @@ def get_collection( """Get collection details - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param sharing_key: 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 sharing_key: str @@ -1522,6 +1595,7 @@ def get_collection( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1537,7 +1611,7 @@ def get_collection( @validate_call def get_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1555,7 +1629,7 @@ def get_collection_with_http_info( """Get collection details - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param sharing_key: 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 sharing_key: str @@ -1594,6 +1668,7 @@ def get_collection_with_http_info( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1609,7 +1684,7 @@ def get_collection_with_http_info( @validate_call def get_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1627,7 +1702,7 @@ def get_collection_without_preload_content( """Get collection details - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str :param sharing_key: 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 sharing_key: str @@ -1666,6 +1741,7 @@ def get_collection_without_preload_content( '200': "Collection", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1693,7 +1769,9 @@ def _get_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1710,11 +1788,12 @@ def _get_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1743,13 +1822,13 @@ def _get_collection_serialize( @validate_call def list_collection_scores( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1767,10 +1846,8 @@ def list_collection_scores( Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str - :param sharing_key: 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 sharing_key: str :param sort: Sort :type sort: str :param direction: Sort direction @@ -1781,6 +1858,8 @@ def list_collection_scores( :type next: str :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :type previous: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1805,12 +1884,12 @@ def list_collection_scores( _param = self._list_collection_scores_serialize( collection=collection, - sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1819,6 +1898,7 @@ def list_collection_scores( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1834,13 +1914,13 @@ def list_collection_scores( @validate_call def list_collection_scores_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1858,10 +1938,8 @@ def list_collection_scores_with_http_info( Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str - :param sharing_key: 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 sharing_key: str :param sort: Sort :type sort: str :param direction: Sort direction @@ -1872,6 +1950,8 @@ def list_collection_scores_with_http_info( :type next: str :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :type previous: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1896,12 +1976,12 @@ def list_collection_scores_with_http_info( _param = self._list_collection_scores_serialize( collection=collection, - sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1910,6 +1990,7 @@ def list_collection_scores_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1925,13 +2006,13 @@ def list_collection_scores_with_http_info( @validate_call def list_collection_scores_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ")], sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1949,10 +2030,8 @@ def list_collection_scores_without_preload_content( Use this method to list the scores contained in a collection. If no sort option is provided, the scores are sorted by `modificationDate` `desc`. For example, to list the scores contained in your app collection, you can use `GET /v2/collections/app/scores`. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted The following virtual collections are supported: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores (required) :type collection: str - :param sharing_key: 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 sharing_key: str :param sort: Sort :type sort: str :param direction: Sort direction @@ -1963,6 +2042,8 @@ def list_collection_scores_without_preload_content( :type next: str :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. :type previous: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1987,12 +2068,12 @@ def list_collection_scores_without_preload_content( _param = self._list_collection_scores_serialize( collection=collection, - sharing_key=sharing_key, sort=sort, direction=direction, limit=limit, next=next, previous=previous, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2001,6 +2082,7 @@ def list_collection_scores_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2012,12 +2094,12 @@ def list_collection_scores_without_preload_content( def _list_collection_scores_serialize( self, collection, - sharing_key, sort, direction, limit, next, previous, + sharing_key, _request_auth, _content_type, _headers, @@ -2033,17 +2115,15 @@ def _list_collection_scores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if collection is not None: _path_params['collection'] = collection # process the query parameters - if sharing_key is not None: - - _query_params.append(('sharingKey', sharing_key)) - if sort is not None: _query_params.append(('sort', sort)) @@ -2064,17 +2144,22 @@ def _list_collection_scores_serialize( _query_params.append(('previous', previous)) + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2103,7 +2188,7 @@ def _list_collection_scores_serialize( @validate_call def list_collections( self, - parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2124,9 +2209,9 @@ def list_collections( ) -> List[Collection]: """List the collections - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. - :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. :type parent: str :param sort: Sort :type sort: str @@ -2175,6 +2260,7 @@ def list_collections( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Collection]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2190,7 +2276,7 @@ def list_collections( @validate_call def list_collections_with_http_info( self, - parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2211,9 +2297,9 @@ def list_collections_with_http_info( ) -> ApiResponse[List[Collection]]: """List the collections - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. - :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. :type parent: str :param sort: Sort :type sort: str @@ -2262,6 +2348,7 @@ def list_collections_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Collection]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2277,7 +2364,7 @@ def list_collections_with_http_info( @validate_call def list_collections_without_preload_content( self, - parent: Annotated[Optional[StrictStr], Field(description="List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2298,9 +2385,9 @@ def list_collections_without_preload_content( ) -> RESTResponseType: """List the collections - Use this method to list the user's collections contained in `parent` (by default in the `root` collection). If no sort option is provided, the collections are sorted by `creationDate` `desc`. Note that this method will not include the `parent` collection in the listing. For example, if you need the details of the `root` collection, you can use `GET /v2/collections/root`. To fetch your app collection details, you can use `GET /v2/collections/app`. + Use this method to list the user's collections. If no sort option is provided, the collections are sorted by `creationDate` `desc`. By default (`parent=user`), this returns all user account collections with virtual collections on the first page. To fetch your app collection details, you can use `GET /v2/collections/app`. - :param parent: List the collection contained in this `parent` collection. This option doesn't provide a complete multi-level collection support. When sharing a collection with someone, this one will have as `parent` `sharedWithMe`. + :param parent: List the collections contained in this `parent` collection. When set to `user` (default), returns the user's own collections as well as collections shared with the user. Using `root` or `sharedWithMe` is **deprecated** and will be treated as `user`. :type parent: str :param sort: Sort :type sort: str @@ -2349,6 +2436,7 @@ def list_collections_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Collection]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2380,7 +2468,9 @@ def _list_collections_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2415,11 +2505,12 @@ def _list_collections_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2448,7 +2539,7 @@ def _list_collections_serialize( @validate_call def untrash_collection( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2461,12 +2552,12 @@ def untrash_collection( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Untrash a collection + ) -> FlatErrorResponse: + """(Deprecated) Untrash a collection - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2489,6 +2580,7 @@ def untrash_collection( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) _param = self._untrash_collection_serialize( collection=collection, @@ -2499,9 +2591,8 @@ def untrash_collection( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2517,7 +2608,7 @@ def untrash_collection( @validate_call def untrash_collection_with_http_info( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2530,12 +2621,12 @@ def untrash_collection_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Untrash a collection + ) -> ApiResponse[FlatErrorResponse]: + """(Deprecated) Untrash a collection - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2558,6 +2649,7 @@ def untrash_collection_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) _param = self._untrash_collection_serialize( collection=collection, @@ -2568,9 +2660,8 @@ def untrash_collection_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2586,7 +2677,7 @@ def untrash_collection_with_http_info( @validate_call def untrash_collection_without_preload_content( self, - collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted ")], + collection: Annotated[StrictStr, Field(description="Unique identifier of the collection.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2600,11 +2691,11 @@ def untrash_collection_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Untrash a collection + """(Deprecated) Untrash a collection - This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. + **DEPRECATED** This method will restore the collection by removing it from the `trash` and add it back to the `root` collection. - :param collection: Unique identifier of the collection. The following aliases are supported: - `root`: The root collection of the account - `app`: Alias for the current app collection - `sharedWithMe`: Automatically contains new resources that have been shared individually - `trash`: Automatically contains resources that have been deleted (required) + :param collection: Unique identifier of the collection. (required) :type collection: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2627,6 +2718,7 @@ def untrash_collection_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /collections/{collection}/untrash is deprecated.", DeprecationWarning) _param = self._untrash_collection_serialize( collection=collection, @@ -2637,9 +2729,8 @@ def untrash_collection_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': "FlatErrorResponse", - '404': "FlatErrorResponse", + '400': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2666,7 +2757,9 @@ def _untrash_collection_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2679,11 +2772,12 @@ def _untrash_collection_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/flat_api/api/edu_resources_api.py b/flat_api/api/edu_resources_api.py index edf488f..c8232ce 100644 --- a/flat_api/api/edu_resources_api.py +++ b/flat_api/api/edu_resources_api.py @@ -1,26 +1,26 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr, field_validator -from typing import Optional +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional from typing_extensions import Annotated from flat_api.models.assignment import Assignment +from flat_api.models.assignment_type import AssignmentType from flat_api.models.assignment_update import AssignmentUpdate from flat_api.models.class_assignment import ClassAssignment from flat_api.models.edu_library import EduLibrary @@ -31,6 +31,8 @@ from flat_api.models.edu_resource_move import EduResourceMove from flat_api.models.edu_resource_update import EduResourceUpdate from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass +from flat_api.models.grade import Grade +from flat_api.models.teaching_theme import TeachingTheme from flat_api.api_client import ApiClient, RequestSerialized from flat_api.api_response import ApiResponse @@ -108,6 +110,7 @@ def copy_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -178,6 +181,7 @@ def copy_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -248,6 +252,7 @@ def copy_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -275,7 +280,9 @@ def _copy_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -290,11 +297,12 @@ def _copy_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -388,6 +396,7 @@ def copy_edu_resource_to_demo_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -455,6 +464,7 @@ def copy_edu_resource_to_demo_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -522,6 +532,7 @@ def copy_edu_resource_to_demo_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -548,7 +559,9 @@ def _copy_edu_resource_to_demo_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -561,11 +574,12 @@ def _copy_edu_resource_to_demo_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -645,6 +659,7 @@ def create_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -711,6 +726,7 @@ def create_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -777,6 +793,7 @@ def create_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -803,7 +820,9 @@ def _create_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -816,11 +835,12 @@ def _create_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -914,6 +934,7 @@ def create_edu_resource_lti_link( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -981,6 +1002,7 @@ def create_edu_resource_lti_link_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1048,6 +1070,7 @@ def create_edu_resource_lti_link_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResourceLtiLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1074,7 +1097,9 @@ def _create_edu_resource_lti_link_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1087,11 +1112,12 @@ def _create_edu_resource_lti_link_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1171,6 +1197,7 @@ def delete_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1237,6 +1264,7 @@ def delete_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1303,6 +1331,7 @@ def delete_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1329,7 +1358,9 @@ def _delete_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1342,11 +1373,12 @@ def _delete_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1426,6 +1458,7 @@ def get_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1492,6 +1525,7 @@ def get_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1558,6 +1592,7 @@ def get_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1584,7 +1619,9 @@ def _get_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1597,11 +1634,12 @@ def _get_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1677,6 +1715,7 @@ def list_edu_libraries( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1739,6 +1778,7 @@ def list_edu_libraries_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1801,6 +1841,7 @@ def list_edu_libraries_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduLibrary]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1826,7 +1867,9 @@ def _list_edu_libraries_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1837,11 +1880,12 @@ def _list_edu_libraries_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1870,8 +1914,12 @@ def _list_edu_libraries_serialize( @validate_call def list_edu_resources( self, - parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, @@ -1893,10 +1941,18 @@ def list_edu_resources( """List education resources in a library or folder - :param parent: List the resources contained in this `parent` library or folder + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] :param sort: Sort :type sort: str :param direction: Sort direction @@ -1931,7 +1987,11 @@ def list_edu_resources( _param = self._list_edu_resources_serialize( parent=parent, + without_subfolders_resources=without_subfolders_resources, type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, sort=sort, direction=direction, limit=limit, @@ -1945,6 +2005,7 @@ def list_edu_resources( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduResource]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1960,8 +2021,12 @@ def list_edu_resources( @validate_call def list_edu_resources_with_http_info( self, - parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, @@ -1983,10 +2048,18 @@ def list_edu_resources_with_http_info( """List education resources in a library or folder - :param parent: List the resources contained in this `parent` library or folder + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] :param sort: Sort :type sort: str :param direction: Sort direction @@ -2021,7 +2094,11 @@ def list_edu_resources_with_http_info( _param = self._list_edu_resources_serialize( parent=parent, + without_subfolders_resources=without_subfolders_resources, type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, sort=sort, direction=direction, limit=limit, @@ -2035,6 +2112,7 @@ def list_edu_resources_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduResource]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2050,8 +2128,12 @@ def list_edu_resources_with_http_info( @validate_call def list_edu_resources_without_preload_content( self, - parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder ")] = None, + parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, + subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, + assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, + grades: Annotated[Optional[List[Grade]], Field(description="Filter the returned resources by grades ")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of resources that may be returned")] = None, @@ -2073,10 +2155,18 @@ def list_edu_resources_without_preload_content( """List education resources in a library or folder - :param parent: List the resources contained in this `parent` library or folder + :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str + :param subjects: Filter the returned resources by subjects + :type subjects: List[TeachingTheme] + :param assignment_types: Filter the returned resources by assignment types + :type assignment_types: List[AssignmentType] + :param grades: Filter the returned resources by grades + :type grades: List[Grade] :param sort: Sort :type sort: str :param direction: Sort direction @@ -2111,7 +2201,11 @@ def list_edu_resources_without_preload_content( _param = self._list_edu_resources_serialize( parent=parent, + without_subfolders_resources=without_subfolders_resources, type=type, + subjects=subjects, + assignment_types=assignment_types, + grades=grades, sort=sort, direction=direction, limit=limit, @@ -2125,6 +2219,7 @@ def list_edu_resources_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[EduResource]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2136,7 +2231,11 @@ def list_edu_resources_without_preload_content( def _list_edu_resources_serialize( self, parent, + without_subfolders_resources, type, + subjects, + assignment_types, + grades, sort, direction, limit, @@ -2151,13 +2250,18 @@ def _list_edu_resources_serialize( _host = None _collection_formats: Dict[str, str] = { + 'subjects': 'multi', + 'assignmentTypes': 'multi', + 'grades': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2166,10 +2270,26 @@ def _list_edu_resources_serialize( _query_params.append(('parent', parent)) + if without_subfolders_resources is not None: + + _query_params.append(('withoutSubfoldersResources', without_subfolders_resources)) + if type is not None: _query_params.append(('type', type)) + if subjects is not None: + + _query_params.append(('subjects', subjects)) + + if assignment_types is not None: + + _query_params.append(('assignmentTypes', assignment_types)) + + if grades is not None: + + _query_params.append(('grades', grades)) + if sort is not None: _query_params.append(('sort', sort)) @@ -2196,11 +2316,12 @@ def _list_edu_resources_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2284,6 +2405,7 @@ def move_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2354,6 +2476,7 @@ def move_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2424,6 +2547,7 @@ def move_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2451,7 +2575,9 @@ def _move_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2466,11 +2592,12 @@ def _move_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2568,6 +2695,7 @@ def update_edu_resource( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2639,6 +2767,7 @@ def update_edu_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2710,6 +2839,7 @@ def update_edu_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EduResource", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2737,7 +2867,9 @@ def _update_edu_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2752,11 +2884,12 @@ def _update_edu_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2853,6 +2986,7 @@ def update_edu_resource_assignment( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2923,6 +3057,7 @@ def update_edu_resource_assignment_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2993,6 +3128,7 @@ def update_edu_resource_assignment_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Assignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3020,7 +3156,9 @@ def _update_edu_resource_assignment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3035,11 +3173,12 @@ def _update_edu_resource_assignment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -3137,6 +3276,7 @@ def use_edu_resource_in_class( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3208,6 +3348,7 @@ def use_edu_resource_in_class_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3279,6 +3420,7 @@ def use_edu_resource_in_class_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ClassAssignment", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3306,7 +3448,9 @@ def _use_edu_resource_in_class_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3321,11 +3465,12 @@ def _use_edu_resource_in_class_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 75cc0c4..11eb1ea 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -1,26 +1,29 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from pydantic import Field, StrictStr, field_validator -from typing import Optional +from typing import List, Optional from typing_extensions import Annotated +from flat_api.models.add_group_user200_response import AddGroupUser200Response +from flat_api.models.add_group_user_request import AddGroupUserRequest +from flat_api.models.group_creation import GroupCreation from flat_api.models.group_details import GroupDetails +from flat_api.models.rename_group_request import RenameGroupRequest from flat_api.models.score_details import ScoreDetails from flat_api.models.user_public import UserPublic @@ -43,9 +46,10 @@ def __init__(self, api_client=None) -> None: @validate_call - def get_group_details( + def add_group_user( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -58,12 +62,15 @@ def get_group_details( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GroupDetails: - """Get group information + ) -> AddGroupUser200Response: + """Add a student to a group + Add a student to the specified group (must be in the same class) :param group: Unique identifier of a Flat group (required) :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -86,8 +93,9 @@ def get_group_details( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_details_serialize( + _param = self._add_group_user_serialize( group=group, + add_group_user_request=add_group_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -95,7 +103,11 @@ def get_group_details( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupDetails", + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -109,9 +121,10 @@ def get_group_details( @validate_call - def get_group_details_with_http_info( + def add_group_user_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -124,12 +137,15 @@ def get_group_details_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GroupDetails]: - """Get group information + ) -> ApiResponse[AddGroupUser200Response]: + """Add a student to a group + Add a student to the specified group (must be in the same class) :param group: Unique identifier of a Flat group (required) :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -152,8 +168,9 @@ def get_group_details_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_details_serialize( + _param = self._add_group_user_serialize( group=group, + add_group_user_request=add_group_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -161,7 +178,11 @@ def get_group_details_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupDetails", + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -175,9 +196,10 @@ def get_group_details_with_http_info( @validate_call - def get_group_details_without_preload_content( + def add_group_user_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + add_group_user_request: AddGroupUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -191,11 +213,14 @@ def get_group_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get group information + """Add a student to a group + Add a student to the specified group (must be in the same class) :param group: Unique identifier of a Flat group (required) :type group: str + :param add_group_user_request: (required) + :type add_group_user_request: AddGroupUserRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -218,8 +243,9 @@ def get_group_details_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_details_serialize( + _param = self._add_group_user_serialize( group=group, + add_group_user_request=add_group_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +253,11 @@ def get_group_details_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupDetails", + '200': "AddGroupUser200Response", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -236,9 +266,10 @@ def get_group_details_without_preload_content( return response_data.response - def _get_group_details_serialize( + def _add_group_user_serialize( self, group, + add_group_user_request, _request_auth, _content_type, _headers, @@ -254,7 +285,9 @@ def _get_group_details_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -264,15 +297,31 @@ def _get_group_details_serialize( # process the header parameters # process the form parameters # process the body parameter + if add_group_user_request is not None: + _body_params = add_group_user_request # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -280,8 +329,8 @@ def _get_group_details_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/groups/{group}', + method='POST', + resource_path='/groups/{group}/users', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -298,10 +347,9 @@ def _get_group_details_serialize( @validate_call - def get_group_scores( + def create_group( self, - group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + group_creation: GroupCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -314,15 +362,13 @@ def get_group_scores( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ScoreDetails]: - """List group's scores + ) -> GroupDetails: + """Create a new group - Get the list of scores shared with a group. + Create a group of the given type, tied to a classroom, optionally with initial members. - :param group: Unique identifier of a Flat group (required) - :type group: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param group_creation: (required) + :type group_creation: GroupCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -345,9 +391,8 @@ def get_group_scores( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_scores_serialize( - group=group, - parent=parent, + _param = self._create_group_serialize( + group_creation=group_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -355,7 +400,11 @@ def get_group_scores( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ScoreDetails]", + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -369,10 +418,9 @@ def get_group_scores( @validate_call - def get_group_scores_with_http_info( + def create_group_with_http_info( self, - group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + group_creation: GroupCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -385,15 +433,13 @@ def get_group_scores_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ScoreDetails]]: - """List group's scores + ) -> ApiResponse[GroupDetails]: + """Create a new group - Get the list of scores shared with a group. + Create a group of the given type, tied to a classroom, optionally with initial members. - :param group: Unique identifier of a Flat group (required) - :type group: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param group_creation: (required) + :type group_creation: GroupCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -416,9 +462,8 @@ def get_group_scores_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_scores_serialize( - group=group, - parent=parent, + _param = self._create_group_serialize( + group_creation=group_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -426,7 +471,11 @@ def get_group_scores_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ScoreDetails]", + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -440,10 +489,9 @@ def get_group_scores_with_http_info( @validate_call - def get_group_scores_without_preload_content( + def create_group_without_preload_content( self, - group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + group_creation: GroupCreation, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -457,14 +505,12 @@ def get_group_scores_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List group's scores + """Create a new group - Get the list of scores shared with a group. + Create a group of the given type, tied to a classroom, optionally with initial members. - :param group: Unique identifier of a Flat group (required) - :type group: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param group_creation: (required) + :type group_creation: GroupCreation :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -487,9 +533,8 @@ def get_group_scores_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_group_scores_serialize( - group=group, - parent=parent, + _param = self._create_group_serialize( + group_creation=group_creation, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -497,7 +542,11 @@ def get_group_scores_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ScoreDetails]", + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -506,10 +555,9 @@ def get_group_scores_without_preload_content( return response_data.response - def _get_group_scores_serialize( + def _create_group_serialize( self, - group, - parent, + group_creation, _request_auth, _content_type, _headers, @@ -525,29 +573,41 @@ def _get_group_scores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters - if group is not None: - _path_params['group'] = group # process the query parameters - if parent is not None: - - _query_params.append(('parent', parent)) - # process the header parameters # process the form parameters # process the body parameter + if group_creation is not None: + _body_params = group_creation # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -555,8 +615,8 @@ def _get_group_scores_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/groups/{group}/scores', + method='POST', + resource_path='/groups', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -573,10 +633,9 @@ def _get_group_scores_serialize( @validate_call - def list_group_users( + def delete_group( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -589,14 +648,13 @@ def list_group_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[UserPublic]: - """List group's users + ) -> None: + """Delete a group + Delete a group. Only available to teachers of the classroom. :param group: Unique identifier of a Flat group (required) :type group: str - :param source: Filter the users by their source - :type source: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -619,9 +677,8 @@ def list_group_users( :return: Returns the result object. """ # noqa: E501 - _param = self._list_group_users_serialize( + _param = self._delete_group_serialize( group=group, - source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -629,7 +686,10 @@ def list_group_users( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserPublic]", + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -643,10 +703,9 @@ def list_group_users( @validate_call - def list_group_users_with_http_info( + def delete_group_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -659,14 +718,13 @@ def list_group_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[UserPublic]]: - """List group's users + ) -> ApiResponse[None]: + """Delete a group + Delete a group. Only available to teachers of the classroom. :param group: Unique identifier of a Flat group (required) :type group: str - :param source: Filter the users by their source - :type source: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -689,9 +747,8 @@ def list_group_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_group_users_serialize( + _param = self._delete_group_serialize( group=group, - source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -699,7 +756,10 @@ def list_group_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserPublic]", + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -713,10 +773,9 @@ def list_group_users_with_http_info( @validate_call - def list_group_users_without_preload_content( + def delete_group_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -730,13 +789,12 @@ def list_group_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List group's users + """Delete a group + Delete a group. Only available to teachers of the classroom. :param group: Unique identifier of a Flat group (required) :type group: str - :param source: Filter the users by their source - :type source: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -759,9 +817,8 @@ def list_group_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_group_users_serialize( + _param = self._delete_group_serialize( group=group, - source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -769,7 +826,10 @@ def list_group_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserPublic]", + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -778,10 +838,9 @@ def list_group_users_without_preload_content( return response_data.response - def _list_group_users_serialize( + def _delete_group_serialize( self, group, - source, _request_auth, _content_type, _headers, @@ -797,28 +856,27 @@ def _list_group_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if group is not None: _path_params['group'] = group # process the query parameters - if source is not None: - - _query_params.append(('source', source)) - # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -827,8 +885,1735 @@ def _list_group_users_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/groups/{group}/users', + method='DELETE', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_group_details( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_details_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_details_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get group information + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_details_serialize( + group=group, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_details_serialize( + self, + group, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_group_scores( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ScoreDetails]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_scores_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ScoreDetails]]: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_scores_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's scores + + Get the list of scores shared with a group. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param parent: Filter the score forked from the score id `parent` + :type parent: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_scores_serialize( + group=group, + parent=parent, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_scores_serialize( + self, + group, + parent, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if parent is not None: + + _query_params.append(('parent', parent)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/scores', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_group_users( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[UserPublic]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_group_users_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[UserPublic]]: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_group_users_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + source: Annotated[Optional[StrictStr], Field(description="Filter the users by their source ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List group's users + + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param source: Filter the users by their source + :type source: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_group_users_serialize( + group=group, + source=source, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[UserPublic]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_group_users_serialize( + self, + group, + source, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + if source is not None: + + _query_params.append(('source', source)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_groups( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[GroupDetails]: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_groups_with_http_info( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[GroupDetails]]: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_groups_without_preload_content( + self, + type: StrictStr, + classroom: Annotated[Optional[StrictStr], Field(description="Classroom ID to filter by")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Assignment ID to filter by")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List groups + + List all groups of a given type, filtered by either a classroom or an assignment. + + :param type: (required) + :type type: str + :param classroom: Classroom ID to filter by + :type classroom: str + :param assignment: Assignment ID to filter by + :type assignment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_groups_serialize( + type=type, + classroom=classroom, + assignment=assignment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[GroupDetails]", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_groups_serialize( + self, + type, + classroom, + assignment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if classroom is not None: + + _query_params.append(('classroom', classroom)) + + if assignment is not None: + + _query_params.append(('assignment', assignment)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_group_user( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_group_user_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_group_user_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + user: Annotated[StrictStr, Field(description="User ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a student from a class group + + Remove a student from a class group + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param user: User ID (required) + :type user: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_group_user_serialize( + group=group, + user=user, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_group_user_serialize( + self, + group, + user, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + if user is not None: + _path_params['user'] = user + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/groups/{group}/users/{user}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def rename_group( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupDetails: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def rename_group_with_http_info( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupDetails]: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def rename_group_without_preload_content( + self, + group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], + rename_group_request: RenameGroupRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rename a group + + Rename a sub-group. Only available for class student groups. + + :param group: Unique identifier of a Flat group (required) + :type group: str + :param rename_group_request: (required) + :type rename_group_request: RenameGroupRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rename_group_serialize( + group=group, + rename_group_request=rename_group_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupDetails", + '400': "FlatErrorResponse", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _rename_group_serialize( + self, + group, + rename_group_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group is not None: + _path_params['group'] = group + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if rename_group_request is not None: + _body_params = rename_group_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/groups/{group}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/flat_api/api/omr_api.py b/flat_api/api/omr_api.py new file mode 100644 index 0000000..acac54d --- /dev/null +++ b/flat_api/api/omr_api.py @@ -0,0 +1,3646 @@ +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from flat_api.models.credit_transaction import CreditTransaction +from flat_api.models.omr_capabilities import OmrCapabilities +from flat_api.models.omr_details_submission import OmrDetailsSubmission +from flat_api.models.omr_job import OmrJob +from flat_api.models.omr_job_creation import OmrJobCreation +from flat_api.models.omr_job_file_upload import OmrJobFileUpload +from flat_api.models.omr_job_file_upload_result import OmrJobFileUploadResult +from flat_api.models.omr_job_status import OmrJobStatus +from flat_api.models.omr_step_name import OmrStepName + +from flat_api.api_client import ApiClient, RequestSerialized +from flat_api.api_response import ApiResponse +from flat_api.rest import RESTResponseType + + +class OMRApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_omr_job_file( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJobFileUploadResult: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_omr_job_file_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJobFileUploadResult]: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_omr_job_file_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + omr_job_file_upload: OmrJobFileUpload, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a file to an OMR job + + Add one image or PDF to a draft job. Call once per file; files keep their upload order. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param omr_job_file_upload: (required) + :type omr_job_file_upload: OmrJobFileUpload + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_omr_job_file_serialize( + job=job, + omr_job_file_upload=omr_job_file_upload, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJobFileUploadResult", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_omr_job_file_serialize( + self, + job, + omr_job_file_upload, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if omr_job_file_upload is not None: + _body_params = omr_job_file_upload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/files', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def cancel_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel an OMR job + + Cancel a draft or in-flight job. Any charged credits are reversed. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_omr_job( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_omr_job_with_http_info( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_omr_job_without_preload_content( + self, + omr_job_creation: OmrJobCreation, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an OMR job + + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + + :param omr_job_creation: (required) + :type omr_job_creation: OmrJobCreation + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_omr_job_serialize( + omr_job_creation=omr_job_creation, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "OmrJob", + '202': "OmrJob", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_omr_job_serialize( + self, + omr_job_creation, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if omr_job_creation is not None: + _body_params = omr_job_creation + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an OMR job's data + + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '403': "FlatErrorResponse", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/omr/jobs/{job}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_omr_capabilities( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrCapabilities: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_omr_capabilities_with_http_info( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrCapabilities]: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_omr_capabilities_without_preload_content( + self, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """OMR capabilities and limits + + Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted. + + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_capabilities_serialize( + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrCapabilities", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_capabilities_serialize( + self, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/capabilities', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + wait: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=0)]], Field(description="Long-poll up to this many seconds for a state change before returning.")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an OMR job + + Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param wait: Long-poll up to this many seconds for a state change before returning. + :type wait: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_serialize( + job=job, + wait=wait, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OmrJob", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_serialize( + self, + job, + wait, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + if wait is not None: + + _query_params.append(('wait', wait)) + + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_omr_job_export( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_omr_job_export_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_omr_job_export_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + format: Annotated[StrictStr, Field(description="Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). ")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download the finalized result + + Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param format: Export format. New formats may be added over time; request what your client supports. * `musicxml`: Uncompressed MusicXML (plain text `.xml`, `application/vnd.recordare.musicxml+xml`). * `mxl`: Compressed MusicXML (zip archive `.mxl`, `application/vnd.recordare.musicxml`), the same notation as `musicxml` but smaller to download. * `midi`: Standard MIDI file (`.mid`, `audio/midi`). * `thumbnail.png`: PNG preview of the first page (`image/png`). (required) + :type format: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_export_serialize( + job=job, + format=format, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_export_serialize( + self, + job, + format, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if format is not None: + _path_params['format'] = format + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}/exports/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_omr_job_file( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_omr_job_file_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_omr_job_file_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + index: Annotated[StrictInt, Field(description="0-based index of the input file (page) to fetch.")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an input page image + + Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param index: 0-based index of the input file (page) to fetch. (required) + :type index: int + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_omr_job_file_serialize( + job=job, + index=index, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '404': "FlatErrorResponse", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_omr_job_file_serialize( + self, + job, + index, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if index is not None: + _path_params['index'] = index + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'image/jpeg', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs/{job}/files/{index}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_billing_credits_history( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[CreditTransaction]: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_billing_credits_history_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[CreditTransaction]]: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_billing_credits_history_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List credit history + + The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`. + + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_billing_credits_history_serialize( + limit=limit, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[CreditTransaction]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_billing_credits_history_serialize( + self, + limit, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/billing/credits/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_omr_jobs( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OmrJob]: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_omr_jobs_with_http_info( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OmrJob]]: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_omr_jobs_without_preload_content( + self, + status: Annotated[Optional[OmrJobStatus], Field(description="Filter jobs by status")] = None, + expired: Annotated[Optional[StrictBool], Field(description="Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. ")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List OMR jobs + + List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts. + + :param status: Filter jobs by status + :type status: OmrJobStatus + :param expired: Filter by data-retention state, independently of `status`. * `true`: only jobs whose files have been erased. * `false`: only jobs that still hold their files. Omit to get both. A job keeps the `status` it finished with after erasure, so this is the only way to tell the two apart. + :type expired: bool + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_omr_jobs_serialize( + status=status, + expired=expired, + limit=limit, + next=next, + previous=previous, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OmrJob]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_omr_jobs_serialize( + self, + status, + expired, + limit, + next, + previous, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if status is not None: + + _query_params.append(('status', status.value)) + + if expired is not None: + + _query_params.append(('expired', expired)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/omr/jobs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_omr_job( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_omr_job_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_omr_job_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start an OMR job + + Validate the attached files, run the permission, quota and credit checks, then queue the job for processing. + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_omr_job_serialize( + job=job, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '400': "FlatErrorResponse", + '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_omr_job_serialize( + self, + job, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def submit_omr_job_step( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OmrJob: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def submit_omr_job_step_with_http_info( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OmrJob]: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def submit_omr_job_step_without_preload_content( + self, + job: Annotated[StrictStr, Field(description="Unique identifier of the OMR job")], + step: Annotated[OmrStepName, Field(description="The pending step being submitted")], + body: OmrDetailsSubmission, + x_flat_locale: Annotated[Optional[StrictStr], Field(description="Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Submit an interactive step + + Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name). + + :param job: Unique identifier of the OMR job (required) + :type job: str + :param step: The pending step being submitted (required) + :type step: OmrStepName + :param body: (required) + :type body: OmrDetailsSubmission + :param x_flat_locale: Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`. + :type x_flat_locale: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._submit_omr_job_step_serialize( + job=job, + step=step, + body=body, + x_flat_locale=x_flat_locale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "OmrJob", + '409': "FlatErrorResponse", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _submit_omr_job_step_serialize( + self, + job, + step, + body, + x_flat_locale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if job is not None: + _path_params['job'] = job + if step is not None: + _path_params['step'] = step.value + # process the query parameters + # process the header parameters + if x_flat_locale is not None: + _header_params['X-Flat-Locale'] = x_flat_locale + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/omr/jobs/{job}/steps/{step}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index e5675f7..415de40 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -1,26 +1,29 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated from flat_api.models.api_access_token import ApiAccessToken +from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.models.lti_configuration import LtiConfiguration +from flat_api.models.lti_configuration_create import LtiConfigurationCreate +from flat_api.models.lti_configuration_update import LtiConfigurationUpdate from flat_api.models.lti_credentials import LtiCredentials from flat_api.models.lti_credentials_creation import LtiCredentialsCreation from flat_api.models.organization_invitation import OrganizationInvitation @@ -57,6 +60,7 @@ def count_orga_users( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -69,7 +73,7 @@ def count_orga_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[UserDetailsAdmin]: + ) -> int: """Count the organization users using the provided filters @@ -81,6 +85,8 @@ def count_orga_users( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -108,6 +114,7 @@ def count_orga_users( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -115,7 +122,8 @@ def count_orga_users( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserDetailsAdmin]", + '200': "int", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -135,6 +143,7 @@ def count_orga_users_with_http_info( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -147,7 +156,7 @@ def count_orga_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[UserDetailsAdmin]]: + ) -> ApiResponse[int]: """Count the organization users using the provided filters @@ -159,6 +168,8 @@ def count_orga_users_with_http_info( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -186,6 +197,7 @@ def count_orga_users_with_http_info( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -193,7 +205,8 @@ def count_orga_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserDetailsAdmin]", + '200': "int", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -213,6 +226,7 @@ def count_orga_users_without_preload_content( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -237,6 +251,8 @@ def count_orga_users_without_preload_content( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -264,6 +280,7 @@ def count_orga_users_without_preload_content( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -271,7 +288,8 @@ def count_orga_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UserDetailsAdmin]", + '200': "int", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -286,6 +304,7 @@ def _count_orga_users_serialize( q, group, no_active_license, + test_accounts, _request_auth, _content_type, _headers, @@ -303,7 +322,9 @@ def _count_orga_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -324,17 +345,22 @@ def _count_orga_users_serialize( _query_params.append(('noActiveLicense', no_active_license)) + if test_accounts is not None: + + _query_params.append(('testAccounts', test_accounts)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -360,6 +386,280 @@ def _count_orga_users_serialize( + @validate_call + def create_lti_configuration( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateLtiConfiguration200Response: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_lti_configuration_with_http_info( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateLtiConfiguration200Response]: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_lti_configuration_without_preload_content( + self, + lti_configuration_create: LtiConfigurationCreate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new LTI configuration (1.1 or 1.3) + + + :param lti_configuration_create: (required) + :type lti_configuration_create: LtiConfigurationCreate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_lti_configuration_serialize( + lti_configuration_create=lti_configuration_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateLtiConfiguration200Response", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_lti_configuration_serialize( + self, + lti_configuration_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if lti_configuration_create is not None: + _body_params = lti_configuration_create + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organizations/lti/configurations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def create_lti_credentials( self, @@ -377,9 +677,9 @@ def create_lti_credentials( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LtiCredentials: - """Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new couple of LTI 1.x credentials - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). :param body: (required) :type body: LtiCredentialsCreation @@ -404,6 +704,7 @@ def create_lti_credentials( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._create_lti_credentials_serialize( body=body, @@ -416,6 +717,7 @@ def create_lti_credentials( _response_types_map: Dict[str, Optional[str]] = { '200': "LtiCredentials", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -445,9 +747,9 @@ def create_lti_credentials_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LtiCredentials]: - """Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new couple of LTI 1.x credentials - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). :param body: (required) :type body: LtiCredentialsCreation @@ -472,6 +774,7 @@ def create_lti_credentials_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._create_lti_credentials_serialize( body=body, @@ -484,6 +787,7 @@ def create_lti_credentials_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "LtiCredentials", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -513,9 +817,9 @@ def create_lti_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new couple of LTI 1.x credentials - Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). :param body: (required) :type body: LtiCredentialsCreation @@ -540,6 +844,7 @@ def create_lti_credentials_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._create_lti_credentials_serialize( body=body, @@ -552,6 +857,7 @@ def create_lti_credentials_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "LtiCredentials", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -578,7 +884,9 @@ def _create_lti_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -591,11 +899,12 @@ def _create_lti_credentials_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -689,6 +998,7 @@ def create_organization_invitation( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -756,6 +1066,7 @@ def create_organization_invitation_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -823,6 +1134,7 @@ def create_organization_invitation_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationInvitation", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -849,7 +1161,9 @@ def _create_organization_invitation_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -862,11 +1176,12 @@ def _create_organization_invitation_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -959,6 +1274,7 @@ def create_organization_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1025,6 +1341,7 @@ def create_organization_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1091,6 +1408,7 @@ def create_organization_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1117,7 +1435,9 @@ def _create_organization_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1130,11 +1450,12 @@ def _create_organization_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1232,6 +1553,7 @@ def create_organization_user_access_token( _response_types_map: Dict[str, Optional[str]] = { '200': "ApiAccessToken", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1303,6 +1625,7 @@ def create_organization_user_access_token_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ApiAccessToken", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1374,6 +1697,7 @@ def create_organization_user_access_token_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ApiAccessToken", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1401,7 +1725,9 @@ def _create_organization_user_access_token_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1416,11 +1742,12 @@ def _create_organization_user_access_token_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1517,6 +1844,7 @@ def create_organization_user_signin_link( _response_types_map: Dict[str, Optional[str]] = { '200': "UserSigninLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1587,6 +1915,7 @@ def create_organization_user_signin_link_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserSigninLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1657,6 +1986,7 @@ def create_organization_user_signin_link_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserSigninLink", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1684,7 +2014,9 @@ def _create_organization_user_signin_link_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1699,11 +2031,12 @@ def _create_organization_user_signin_link_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1742,6 +2075,513 @@ def _create_organization_user_signin_link_serialize( + @validate_call + def delete_lti_configuration( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_lti_configuration_with_http_info( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_lti_configuration_without_preload_content( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an LTI configuration + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_lti_configuration_serialize( + configuration=configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_lti_configuration_serialize( + self, + configuration, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if configuration is not None: + _path_params['configuration'] = configuration + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organizations/lti/configurations/{configuration}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_lti_configurations( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[LtiConfiguration]: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_lti_configurations_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[LtiConfiguration]]: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_lti_configurations_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List LTI configurations (1.1 and 1.3) + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_lti_configurations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[LtiConfiguration]", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_lti_configurations_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations/lti/configurations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_lti_credentials( self, @@ -1758,8 +2598,9 @@ def list_lti_credentials( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> List[LtiCredentials]: - """List LTI 1.x credentials + """(Deprecated) List LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1782,6 +2623,7 @@ def list_lti_credentials( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._list_lti_credentials_serialize( _request_auth=_request_auth, @@ -1793,6 +2635,7 @@ def list_lti_credentials( _response_types_map: Dict[str, Optional[str]] = { '200': "List[LtiCredentials]", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1821,8 +2664,9 @@ def list_lti_credentials_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[List[LtiCredentials]]: - """List LTI 1.x credentials + """(Deprecated) List LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1845,6 +2689,7 @@ def list_lti_credentials_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._list_lti_credentials_serialize( _request_auth=_request_auth, @@ -1856,6 +2701,7 @@ def list_lti_credentials_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[LtiCredentials]", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1884,8 +2730,9 @@ def list_lti_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List LTI 1.x credentials + """(Deprecated) List LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1908,6 +2755,7 @@ def list_lti_credentials_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /organizations/lti/credentials is deprecated.", DeprecationWarning) _param = self._list_lti_credentials_serialize( _request_auth=_request_auth, @@ -1919,6 +2767,7 @@ def list_lti_credentials_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[LtiCredentials]", '403': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1944,7 +2793,9 @@ def _list_lti_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1955,11 +2806,12 @@ def _list_lti_credentials_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2051,6 +2903,7 @@ def list_organization_invitations( _response_types_map: Dict[str, Optional[str]] = { '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2129,6 +2982,7 @@ def list_organization_invitations_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2207,6 +3061,7 @@ def list_organization_invitations_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[OrganizationInvitation]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2236,7 +3091,9 @@ def _list_organization_invitations_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2263,11 +3120,12 @@ def _list_organization_invitations_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2296,7 +3154,7 @@ def _list_organization_invitations_serialize( @validate_call def list_organization_users( self, - sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, @@ -2304,6 +3162,7 @@ def list_organization_users( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2323,8 +3182,8 @@ def list_organization_users( """List the organization users - :param sort: The order to sort the user list - :type sort: List[str] + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str :param direction: Sort direction :type direction: str :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -2339,6 +3198,8 @@ def list_organization_users( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` :type license_expiration_date: List[str] :param only_ids: Return only user ids @@ -2376,6 +3237,7 @@ def list_organization_users( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit, @@ -2387,6 +3249,7 @@ def list_organization_users( _response_types_map: Dict[str, Optional[str]] = { '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2402,7 +3265,7 @@ def list_organization_users( @validate_call def list_organization_users_with_http_info( self, - sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, @@ -2410,6 +3273,7 @@ def list_organization_users_with_http_info( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2429,8 +3293,8 @@ def list_organization_users_with_http_info( """List the organization users - :param sort: The order to sort the user list - :type sort: List[str] + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str :param direction: Sort direction :type direction: str :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -2445,6 +3309,8 @@ def list_organization_users_with_http_info( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` :type license_expiration_date: List[str] :param only_ids: Return only user ids @@ -2482,6 +3348,7 @@ def list_organization_users_with_http_info( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit, @@ -2493,6 +3360,7 @@ def list_organization_users_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2508,7 +3376,7 @@ def list_organization_users_with_http_info( @validate_call def list_organization_users_without_preload_content( self, - sort: Annotated[Optional[List[StrictStr]], Field(description="The order to sort the user list")] = None, + sort: Annotated[Optional[StrictStr], Field(description="The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. ")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, @@ -2516,6 +3384,7 @@ def list_organization_users_without_preload_content( q: Annotated[Optional[StrictStr], Field(description="The query to search")] = None, group: Annotated[Optional[List[StrictStr]], Field(description="Filter users by group")] = None, no_active_license: Annotated[Optional[StrictBool], Field(description="Filter users who don't have an active license")] = None, + test_accounts: Annotated[Optional[StrictStr], Field(description="Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. ")] = None, license_expiration_date: Annotated[Optional[List[StrictStr]], Field(description="Filter users by license expiration date or `active` / `notActive`")] = None, only_ids: Annotated[Optional[StrictBool], Field(description="Return only user ids")] = None, limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, @@ -2535,8 +3404,8 @@ def list_organization_users_without_preload_content( """List the organization users - :param sort: The order to sort the user list - :type sort: List[str] + :param sort: The order to sort the user list. * `creationDate`: Order by account creation. * `firstname`, `lastname`, `username`: Order by the user identity. * `lastActivityDate`: Order by the last recorded activity. * `licenseExpirationDate`: Order by the expiration of the active license. + :type sort: str :param direction: Sort direction :type direction: str :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. @@ -2551,6 +3420,8 @@ def list_organization_users_without_preload_content( :type group: List[str] :param no_active_license: Filter users who don't have an active license :type no_active_license: bool + :param test_accounts: Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * `exclude`: Hide test accounts from results. * `only`: Show only test accounts. When omitted, all users are returned. + :type test_accounts: str :param license_expiration_date: Filter users by license expiration date or `active` / `notActive` :type license_expiration_date: List[str] :param only_ids: Return only user ids @@ -2588,6 +3459,7 @@ def list_organization_users_without_preload_content( q=q, group=group, no_active_license=no_active_license, + test_accounts=test_accounts, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit, @@ -2599,6 +3471,7 @@ def list_organization_users_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[UserDetailsAdmin]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2617,6 +3490,7 @@ def _list_organization_users_serialize( q, group, no_active_license, + test_accounts, license_expiration_date, only_ids, limit, @@ -2629,7 +3503,6 @@ def _list_organization_users_serialize( _host = None _collection_formats: Dict[str, str] = { - 'sort': 'multi', 'role': 'multi', 'group': 'multi', 'licenseExpirationDate': 'multi', @@ -2639,7 +3512,9 @@ def _list_organization_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2676,6 +3551,10 @@ def _list_organization_users_serialize( _query_params.append(('noActiveLicense', no_active_license)) + if test_accounts is not None: + + _query_params.append(('testAccounts', test_accounts)) + if license_expiration_date is not None: _query_params.append(('licenseExpirationDate', license_expiration_date)) @@ -2694,11 +3573,12 @@ def _list_organization_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2778,6 +3658,7 @@ def remove_organization_invitation( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2844,6 +3725,7 @@ def remove_organization_invitation_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2910,6 +3792,7 @@ def remove_organization_invitation_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2936,7 +3819,9 @@ def _remove_organization_invitation_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2949,11 +3834,12 @@ def _remove_organization_invitation_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3038,6 +3924,7 @@ def remove_organization_user( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3109,6 +3996,7 @@ def remove_organization_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3180,6 +4068,7 @@ def remove_organization_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3207,7 +4096,9 @@ def _remove_organization_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3224,11 +4115,12 @@ def _remove_organization_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3271,8 +4163,9 @@ def revoke_lti_credentials( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Revoke LTI 1.x credentials + """(Deprecated) Revoke LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param credentials: Credentials unique identifier (required) :type credentials: str @@ -3297,6 +4190,7 @@ def revoke_lti_credentials( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) _param = self._revoke_lti_credentials_serialize( credentials=credentials, @@ -3310,6 +4204,7 @@ def revoke_lti_credentials( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3339,8 +4234,9 @@ def revoke_lti_credentials_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Revoke LTI 1.x credentials + """(Deprecated) Revoke LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param credentials: Credentials unique identifier (required) :type credentials: str @@ -3365,6 +4261,7 @@ def revoke_lti_credentials_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) _param = self._revoke_lti_credentials_serialize( credentials=credentials, @@ -3378,6 +4275,7 @@ def revoke_lti_credentials_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3407,8 +4305,9 @@ def revoke_lti_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Revoke LTI 1.x credentials + """(Deprecated) Revoke LTI 1.x credentials + DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. :param credentials: Credentials unique identifier (required) :type credentials: str @@ -3433,6 +4332,7 @@ def revoke_lti_credentials_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /organizations/lti/credentials/{credentials} is deprecated.", DeprecationWarning) _param = self._revoke_lti_credentials_serialize( credentials=credentials, @@ -3446,6 +4346,7 @@ def revoke_lti_credentials_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3472,7 +4373,9 @@ def _revoke_lti_credentials_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3485,11 +4388,12 @@ def _revoke_lti_credentials_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3515,6 +4419,295 @@ def _revoke_lti_credentials_serialize( + @validate_call + def update_lti_configuration( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LtiConfiguration: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_lti_configuration_with_http_info( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LtiConfiguration]: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_lti_configuration_without_preload_content( + self, + configuration: Annotated[StrictStr, Field(description="Configuration unique identifier")], + lti_configuration_update: LtiConfigurationUpdate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an existing LTI configuration (edit 1.3; 1.1 not editable) + + + :param configuration: Configuration unique identifier (required) + :type configuration: str + :param lti_configuration_update: (required) + :type lti_configuration_update: LtiConfigurationUpdate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_lti_configuration_serialize( + configuration=configuration, + lti_configuration_update=lti_configuration_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LtiConfiguration", + 'default': "FlatErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_lti_configuration_serialize( + self, + configuration, + lti_configuration_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if configuration is not None: + _path_params['configuration'] = configuration + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if lti_configuration_update is not None: + _body_params = lti_configuration_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/organizations/lti/configurations/{configuration}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_organization_user( self, @@ -3573,6 +4766,7 @@ def update_organization_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3643,6 +4837,7 @@ def update_organization_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3713,6 +4908,7 @@ def update_organization_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserDetailsAdmin", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3740,7 +4936,9 @@ def _update_organization_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3755,11 +4953,12 @@ def _update_organization_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index 762cfe7..b4ab2e1 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -1,24 +1,23 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Optional +from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union from typing_extensions import Annotated from flat_api.models.assignment_submission import AssignmentSubmission from flat_api.models.resource_collaborator import ResourceCollaborator @@ -34,6 +33,7 @@ from flat_api.models.score_revision_creation import ScoreRevisionCreation from flat_api.models.score_track import ScoreTrack from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_creation_response import ScoreTrackCreationResponse from flat_api.models.score_track_update import ScoreTrackUpdate from flat_api.models.task import Task from flat_api.models.task_export_options import TaskExportOptions @@ -118,6 +118,7 @@ def add_score_collaborator( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -192,6 +193,7 @@ def add_score_collaborator_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -266,6 +268,7 @@ def add_score_collaborator_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -293,7 +296,9 @@ def _add_score_collaborator_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -308,11 +313,12 @@ def _add_score_collaborator_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -368,7 +374,7 @@ def add_score_track( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ScoreTrack: + ) -> 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. @@ -409,9 +415,10 @@ def add_score_track( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScoreTrack", + '200': "ScoreTrackCreationResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -441,7 +448,7 @@ def add_score_track_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ScoreTrack]: + ) -> ApiResponse[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. @@ -482,9 +489,10 @@ def add_score_track_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScoreTrack", + '200': "ScoreTrackCreationResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -555,9 +563,10 @@ def add_score_track_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScoreTrack", + '200': "ScoreTrackCreationResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -585,7 +594,9 @@ def _add_score_track_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -600,11 +611,12 @@ def _add_score_track_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -717,6 +729,7 @@ def create_export_task( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -803,6 +816,7 @@ def create_export_task_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -889,6 +903,7 @@ def create_export_task_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -919,7 +934,9 @@ def _create_export_task_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -942,11 +959,12 @@ def _create_export_task_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1004,7 +1022,7 @@ def create_score( ) -> 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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + 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}`. :param body: (required) :type body: ScoreCreation @@ -1040,8 +1058,10 @@ def create_score( _response_types_map: Dict[str, Optional[str]] = { '200': "ScoreDetails", + '202': "Task", '400': "FlatErrorResponse", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1073,7 +1093,7 @@ def create_score_with_http_info( ) -> ApiResponse[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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + 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}`. :param body: (required) :type body: ScoreCreation @@ -1109,8 +1129,10 @@ def create_score_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ScoreDetails", + '202': "Task", '400': "FlatErrorResponse", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1142,7 +1164,7 @@ def create_score_without_preload_content( ) -> RESTResponseType: """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 an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `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}`. + 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}`. :param body: (required) :type body: ScoreCreation @@ -1178,8 +1200,10 @@ def create_score_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ScoreDetails", + '202': "Task", '400': "FlatErrorResponse", '402': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1206,7 +1230,9 @@ def _create_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1219,11 +1245,12 @@ def _create_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1324,6 +1351,7 @@ def create_score_revision( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1398,6 +1426,7 @@ def create_score_revision_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1472,6 +1501,7 @@ def create_score_revision_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1499,7 +1529,9 @@ def _create_score_revision_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1514,11 +1546,12 @@ def _create_score_revision_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1577,7 +1610,7 @@ def delete_score( ) -> None: """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). + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -1618,6 +1651,7 @@ def delete_score( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1650,7 +1684,7 @@ def delete_score_with_http_info( ) -> ApiResponse[None]: """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). + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -1691,6 +1725,7 @@ def delete_score_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1723,7 +1758,7 @@ def delete_score_without_preload_content( ) -> RESTResponseType: """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). + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -1764,6 +1799,7 @@ def delete_score_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1791,7 +1827,9 @@ def _delete_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1808,11 +1846,12 @@ def _delete_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1843,6 +1882,7 @@ def delete_score_comment( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1864,6 +1904,8 @@ def delete_score_comment( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -1891,6 +1933,7 @@ def delete_score_comment( _param = self._delete_score_comment_serialize( score=score, comment=comment, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -1902,6 +1945,7 @@ def delete_score_comment( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1919,6 +1963,7 @@ def delete_score_comment_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1940,6 +1985,8 @@ def delete_score_comment_with_http_info( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -1967,6 +2014,7 @@ def delete_score_comment_with_http_info( _param = self._delete_score_comment_serialize( score=score, comment=comment, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -1978,6 +2026,7 @@ def delete_score_comment_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -1995,6 +2044,7 @@ def delete_score_comment_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -2016,6 +2066,8 @@ def delete_score_comment_without_preload_content( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one @@ -2043,6 +2095,7 @@ def delete_score_comment_without_preload_content( _param = self._delete_score_comment_serialize( score=score, comment=comment, + event_properties=event_properties, sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, @@ -2054,6 +2107,7 @@ def delete_score_comment_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2066,6 +2120,7 @@ def _delete_score_comment_serialize( self, score, comment, + event_properties, sharing_key, _request_auth, _content_type, @@ -2082,7 +2137,9 @@ def _delete_score_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2091,6 +2148,10 @@ def _delete_score_comment_serialize( if comment is not None: _path_params['comment'] = comment # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + if sharing_key is not None: _query_params.append(('sharingKey', sharing_key)) @@ -2101,12 +2162,26 @@ def _delete_score_comment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2191,6 +2266,7 @@ def delete_score_track( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2263,6 +2339,7 @@ def delete_score_track_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2335,6 +2412,7 @@ def delete_score_track_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2362,7 +2440,9 @@ def _delete_score_track_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2377,11 +2457,12 @@ def _delete_score_track_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2469,6 +2550,7 @@ def edit_score( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2543,6 +2625,7 @@ def edit_score_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2617,6 +2700,7 @@ def edit_score_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2644,7 +2728,9 @@ def _edit_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2659,11 +2745,12 @@ def _edit_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2768,6 +2855,7 @@ def fork_score( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2846,6 +2934,7 @@ def fork_score_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2924,6 +3013,7 @@ def fork_score_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -2952,7 +3042,9 @@ def _fork_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2971,11 +3063,12 @@ def _fork_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -3073,6 +3166,8 @@ def get_group_scores( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3144,6 +3239,8 @@ def get_group_scores_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3215,6 +3312,8 @@ def get_group_scores_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3242,7 +3341,9 @@ def _get_group_scores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3259,11 +3360,12 @@ def _get_group_scores_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3351,6 +3453,7 @@ def get_score( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3425,6 +3528,7 @@ def get_score_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3499,6 +3603,7 @@ def get_score_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3526,7 +3631,9 @@ def _get_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3543,11 +3650,12 @@ def _get_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3639,6 +3747,7 @@ def get_score_collaborator( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3717,6 +3826,7 @@ def get_score_collaborator_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3795,6 +3905,7 @@ def get_score_collaborator_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3823,7 +3934,9 @@ def _get_score_collaborator_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3842,11 +3955,12 @@ def _get_score_collaborator_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3934,6 +4048,7 @@ def get_score_collaborators( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4008,6 +4123,7 @@ def get_score_collaborators_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4082,6 +4198,7 @@ def get_score_collaborators_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4109,7 +4226,9 @@ def _get_score_collaborators_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4126,11 +4245,12 @@ def _get_score_collaborators_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4160,10 +4280,10 @@ def _get_score_collaborators_serialize( def get_score_comments( self, score: Annotated[StrictStr, Field(description="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`). ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4183,14 +4303,14 @@ def get_score_comments( :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param sharing_key: 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 sharing_key: str :param type: Filter the comments by type :type type: str :param sort: Sort :type sort: str :param direction: Sort direction :type direction: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4215,10 +4335,10 @@ def get_score_comments( _param = self._get_score_comments_serialize( score=score, - sharing_key=sharing_key, type=type, sort=sort, direction=direction, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4230,6 +4350,7 @@ def get_score_comments( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4246,10 +4367,10 @@ def get_score_comments( def get_score_comments_with_http_info( self, score: Annotated[StrictStr, Field(description="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`). ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4269,14 +4390,14 @@ def get_score_comments_with_http_info( :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param sharing_key: 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 sharing_key: str :param type: Filter the comments by type :type type: str :param sort: Sort :type sort: str :param direction: Sort direction :type direction: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4301,10 +4422,10 @@ def get_score_comments_with_http_info( _param = self._get_score_comments_serialize( score=score, - sharing_key=sharing_key, type=type, sort=sort, direction=direction, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4316,6 +4437,7 @@ def get_score_comments_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4332,10 +4454,10 @@ def get_score_comments_with_http_info( def get_score_comments_without_preload_content( self, score: Annotated[StrictStr, Field(description="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`). ")], - sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the comments by type")] = None, sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4355,14 +4477,14 @@ def get_score_comments_without_preload_content( :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param sharing_key: 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 sharing_key: str :param type: Filter the comments by type :type type: str :param sort: Sort :type sort: str :param direction: Sort direction :type direction: str + :param sharing_key: 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 sharing_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4387,10 +4509,10 @@ def get_score_comments_without_preload_content( _param = self._get_score_comments_serialize( score=score, - sharing_key=sharing_key, type=type, sort=sort, direction=direction, + sharing_key=sharing_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4402,6 +4524,7 @@ def get_score_comments_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4413,10 +4536,10 @@ def get_score_comments_without_preload_content( def _get_score_comments_serialize( self, score, - sharing_key, type, sort, direction, + sharing_key, _request_auth, _content_type, _headers, @@ -4432,17 +4555,15 @@ def _get_score_comments_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if score is not None: _path_params['score'] = score # process the query parameters - if sharing_key is not None: - - _query_params.append(('sharingKey', sharing_key)) - if type is not None: _query_params.append(('type', type)) @@ -4455,17 +4576,22 @@ def _get_score_comments_serialize( _query_params.append(('direction', direction)) + if sharing_key is not None: + + _query_params.append(('sharingKey', sharing_key)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4557,6 +4683,7 @@ def get_score_revision( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4635,6 +4762,7 @@ def get_score_revision_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4713,6 +4841,7 @@ def get_score_revision_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4741,7 +4870,9 @@ def _get_score_revision_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4760,11 +4891,12 @@ def _get_score_revision_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4812,10 +4944,10 @@ def get_score_revision_data( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: + ) -> bytes: """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -4868,10 +5000,11 @@ def get_score_revision_data( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "bytes", '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4906,10 +5039,10 @@ def get_score_revision_data_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: + ) -> ApiResponse[bytes]: """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -4962,10 +5095,11 @@ def get_score_revision_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "bytes", '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5003,7 +5137,7 @@ def get_score_revision_data_without_preload_content( ) -> RESTResponseType: """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`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. + 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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5056,10 +5190,11 @@ def get_score_revision_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", + '200': "bytes", '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5092,7 +5227,9 @@ def _get_score_revision_data_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5125,17 +5262,19 @@ def _get_score_revision_data_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/vnd.recordare.musicxml+xml', - 'application/vnd.recordare.musicxml', - 'audio/mp3', - 'audio/wav', - 'audio/midi', - 'image/png' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.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' + ] + ) # authentication setting @@ -5223,6 +5362,7 @@ def get_score_revisions( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5297,6 +5437,7 @@ def get_score_revisions_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5371,6 +5512,7 @@ def get_score_revisions_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5398,7 +5540,9 @@ def _get_score_revisions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5415,11 +5559,12 @@ def _get_score_revisions_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5500,6 +5645,7 @@ def get_score_submissions( _response_types_map: Dict[str, Optional[str]] = { '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5567,6 +5713,7 @@ def get_score_submissions_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5634,6 +5781,7 @@ def get_score_submissions_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[AssignmentSubmission]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5660,7 +5808,9 @@ def _get_score_submissions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5673,11 +5823,12 @@ def _get_score_submissions_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -5767,6 +5918,7 @@ def get_score_track( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5843,6 +5995,7 @@ def get_score_track_with_http_info( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5919,6 +6072,7 @@ def get_score_track_without_preload_content( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5947,7 +6101,9 @@ def _get_score_track_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5966,11 +6122,12 @@ def _get_score_track_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6066,6 +6223,7 @@ def get_user_likes( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6148,6 +6306,7 @@ def get_user_likes_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6230,6 +6389,7 @@ def get_user_likes_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6260,7 +6420,9 @@ def _get_user_likes_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6289,11 +6451,12 @@ def _get_user_likes_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6323,7 +6486,12 @@ def _get_user_likes_serialize( def get_user_scores( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6339,12 +6507,22 @@ def get_user_scores( ) -> List[ScoreDetails]: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6369,7 +6547,12 @@ def get_user_scores( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6378,6 +6561,7 @@ def get_user_scores( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6394,7 +6578,12 @@ def get_user_scores( def get_user_scores_with_http_info( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6410,12 +6599,22 @@ def get_user_scores_with_http_info( ) -> ApiResponse[List[ScoreDetails]]: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6440,7 +6639,12 @@ def get_user_scores_with_http_info( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6449,6 +6653,7 @@ def get_user_scores_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6465,7 +6670,12 @@ def get_user_scores_with_http_info( def get_user_scores_without_preload_content( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6481,12 +6691,22 @@ def get_user_scores_without_preload_content( ) -> RESTResponseType: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6511,7 +6731,12 @@ def get_user_scores_without_preload_content( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6520,6 +6745,7 @@ def get_user_scores_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6531,7 +6757,12 @@ def get_user_scores_without_preload_content( def _get_user_scores_serialize( self, user, - parent, + paginate, + sort, + direction, + limit, + next, + previous, _request_auth, _content_type, _headers, @@ -6547,16 +6778,38 @@ def _get_user_scores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user is not None: _path_params['user'] = user # process the query parameters - if parent is not None: + if paginate is not None: - _query_params.append(('parent', parent)) + _query_params.append(('paginate', paginate)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) # process the header parameters # process the form parameters @@ -6564,11 +6817,12 @@ def _get_user_scores_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6616,6 +6870,7 @@ def list_score_tracks( ) -> List[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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -6662,6 +6917,7 @@ def list_score_tracks( '200': "List[ScoreTrack]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6696,6 +6952,7 @@ def list_score_tracks_with_http_info( ) -> ApiResponse[List[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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -6742,6 +6999,7 @@ def list_score_tracks_with_http_info( '200': "List[ScoreTrack]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6776,6 +7034,7 @@ def list_score_tracks_without_preload_content( ) -> RESTResponseType: """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. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -6822,6 +7081,7 @@ def list_score_tracks_without_preload_content( '200': "List[ScoreTrack]", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6851,7 +7111,9 @@ def _list_score_tracks_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6876,11 +7138,12 @@ def _list_score_tracks_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -6970,6 +7233,7 @@ def mark_score_comment_resolved( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7046,6 +7310,7 @@ def mark_score_comment_resolved_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7122,6 +7387,7 @@ def mark_score_comment_resolved_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7150,7 +7416,9 @@ def _mark_score_comment_resolved_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -7169,11 +7437,12 @@ def _mark_score_comment_resolved_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -7263,6 +7532,7 @@ def mark_score_comment_unresolved( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7339,6 +7609,7 @@ def mark_score_comment_unresolved_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7415,6 +7686,7 @@ def mark_score_comment_unresolved_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7443,7 +7715,9 @@ def _mark_score_comment_unresolved_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -7462,11 +7736,12 @@ def _mark_score_comment_unresolved_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -7558,6 +7833,7 @@ def post_score_comment( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7636,6 +7912,7 @@ def post_score_comment_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7714,6 +7991,7 @@ def post_score_comment_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7742,7 +8020,9 @@ def _post_score_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -7761,11 +8041,12 @@ def _post_score_comment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -7809,6 +8090,7 @@ def remove_score_collaborator( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7830,6 +8112,8 @@ def remove_score_collaborator( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7855,6 +8139,7 @@ def remove_score_collaborator( _param = self._remove_score_collaborator_serialize( score=score, collaborator=collaborator, + event_properties=event_properties, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7865,6 +8150,7 @@ def remove_score_collaborator( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7882,6 +8168,7 @@ def remove_score_collaborator_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7903,6 +8190,8 @@ def remove_score_collaborator_with_http_info( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7928,6 +8217,7 @@ def remove_score_collaborator_with_http_info( _param = self._remove_score_collaborator_serialize( score=score, collaborator=collaborator, + event_properties=event_properties, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7938,6 +8228,7 @@ def remove_score_collaborator_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7955,6 +8246,7 @@ def remove_score_collaborator_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7976,6 +8268,8 @@ def remove_score_collaborator_without_preload_content( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str + :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8001,6 +8295,7 @@ def remove_score_collaborator_without_preload_content( _param = self._remove_score_collaborator_serialize( score=score, collaborator=collaborator, + event_properties=event_properties, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8011,6 +8306,7 @@ def remove_score_collaborator_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8023,6 +8319,7 @@ def _remove_score_collaborator_serialize( self, score, collaborator, + event_properties, _request_auth, _content_type, _headers, @@ -8038,7 +8335,9 @@ def _remove_score_collaborator_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -8047,18 +8346,36 @@ def _remove_score_collaborator_serialize( if collaborator is not None: _path_params['collaborator'] = collaborator # process the query parameters + if event_properties is not None: + + _query_params.append(('eventProperties', event_properties)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -8140,6 +8457,7 @@ def untrash_score( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8209,6 +8527,7 @@ def untrash_score_with_http_info( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8278,6 +8597,7 @@ def untrash_score_without_preload_content( '204': None, '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8304,7 +8624,9 @@ def _untrash_score_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -8317,11 +8639,12 @@ def _untrash_score_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -8416,6 +8739,7 @@ def update_score_comment( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8497,6 +8821,7 @@ def update_score_comment_with_http_info( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8578,6 +8903,7 @@ def update_score_comment_without_preload_content( '402': "FlatErrorResponse", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8607,7 +8933,9 @@ def _update_score_comment_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -8628,11 +8956,12 @@ def _update_score_comment_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -8735,6 +9064,7 @@ def update_score_track( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8811,6 +9141,7 @@ def update_score_track_with_http_info( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8887,6 +9218,7 @@ def update_score_track_without_preload_content( '200': "ScoreTrack", '403': "FlatErrorResponse", '404': "FlatErrorResponse", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -8915,7 +9247,9 @@ def _update_score_track_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -8932,11 +9266,12 @@ def _update_score_track_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py index 53e1130..64b9468 100644 --- a/flat_api/api/task_api.py +++ b/flat_api/api/task_api.py @@ -1,17 +1,16 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union @@ -94,6 +93,7 @@ def get_task( _response_types_map: Dict[str, Optional[str]] = { '200': "Task", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -161,6 +161,7 @@ def get_task_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Task", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -228,6 +229,7 @@ def get_task_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Task", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -254,7 +256,9 @@ def _get_task_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -267,11 +271,12 @@ def _get_task_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index f572582..17b9aef 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -1,24 +1,23 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + import warnings from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional from typing_extensions import Annotated from flat_api.models.score_details import ScoreDetails from flat_api.models.user_public import UserPublic @@ -96,6 +95,7 @@ def get_user( _response_types_map: Dict[str, Optional[str]] = { '200': "UserPublic", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -163,6 +163,7 @@ def get_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "UserPublic", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -230,6 +231,7 @@ def get_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "UserPublic", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -256,7 +258,9 @@ def _get_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,11 +273,12 @@ def _get_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -369,6 +374,7 @@ def get_user_likes( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -451,6 +457,7 @@ def get_user_likes_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -533,6 +540,7 @@ def get_user_likes_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -563,7 +571,9 @@ def _get_user_likes_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -592,11 +602,12 @@ def _get_user_likes_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -626,7 +637,12 @@ def _get_user_likes_serialize( def get_user_scores( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -642,12 +658,22 @@ def get_user_scores( ) -> List[ScoreDetails]: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -672,7 +698,12 @@ def get_user_scores( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -681,6 +712,7 @@ def get_user_scores( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -697,7 +729,12 @@ def get_user_scores( def get_user_scores_with_http_info( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -713,12 +750,22 @@ def get_user_scores_with_http_info( ) -> ApiResponse[List[ScoreDetails]]: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -743,7 +790,12 @@ def get_user_scores_with_http_info( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -752,6 +804,7 @@ def get_user_scores_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -768,7 +821,12 @@ def get_user_scores_with_http_info( def get_user_scores_without_preload_content( self, user: Annotated[StrictStr, Field(description="Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + paginate: Annotated[Optional[StrictBool], Field(description="When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. ")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort")] = None, + direction: Annotated[Optional[StrictStr], Field(description="Sort direction")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="This is the maximum number of objects that may be returned")] = None, + next: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, + previous: Annotated[Optional[StrictStr], Field(description="An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -784,12 +842,22 @@ def get_user_scores_without_preload_content( ) -> RESTResponseType: """List user's scores - Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead. + Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str - :param parent: Filter the score forked from the score id `parent` - :type parent: str + :param paginate: When set to `true`, the API will return a paginated result. When set to `false` or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. + :type paginate: bool + :param sort: Sort + :type sort: str + :param direction: Sort direction + :type direction: str + :param limit: This is the maximum number of objects that may be returned + :type limit: int + :param next: An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type next: str + :param previous: An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. + :type previous: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -814,7 +882,12 @@ def get_user_scores_without_preload_content( _param = self._get_user_scores_serialize( user=user, - parent=parent, + paginate=paginate, + sort=sort, + direction=direction, + limit=limit, + next=next, + previous=previous, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -823,6 +896,7 @@ def get_user_scores_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[ScoreDetails]", + 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -834,7 +908,12 @@ def get_user_scores_without_preload_content( def _get_user_scores_serialize( self, user, - parent, + paginate, + sort, + direction, + limit, + next, + previous, _request_auth, _content_type, _headers, @@ -850,16 +929,38 @@ def _get_user_scores_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if user is not None: _path_params['user'] = user # process the query parameters - if parent is not None: + if paginate is not None: + + _query_params.append(('paginate', paginate)) + + if sort is not None: + + _query_params.append(('sort', sort)) - _query_params.append(('parent', parent)) + if direction is not None: + + _query_params.append(('direction', direction)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) # process the header parameters # process the form parameters @@ -867,11 +968,12 @@ def _get_user_scores_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 418c43f..82b8c4a 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -1,11 +1,9 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,17 +11,21 @@ """ # noqa: E501 + import datetime from dateutil.parser import parse from enum import Enum +import decimal import json import mimetypes import os import re import tempfile +import uuid from urllib.parse import quote -from typing import Tuple, Optional, List, Dict +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from flat_api.configuration import Configuration from flat_api.api_response import ApiResponse, T as ApiResponseT @@ -66,6 +68,8 @@ class ApiClient: 'bool': bool, 'date': datetime.date, 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, 'object': object, } _pool = None @@ -88,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'flat_api/1.1.0' + self.user_agent = _flat_user_agent() self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -208,7 +212,8 @@ def param_serialize( post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -226,7 +231,7 @@ def param_serialize( body = self.sanitize_for_serialization(body) # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead @@ -298,22 +303,28 @@ def response_deserialize( # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] + # deserialize response data response_text = None return_data = None try: - if response_type == "bytearray": + if response_type in ("bytearray", "bytes"): return_data = response_data.data elif response_type == "file": return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.getheader('content-type') + content_type = response_data.headers.get('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -325,7 +336,7 @@ def response_deserialize( return ApiResponse( status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = response_data.headers, raw_data = response_data.data ) @@ -333,9 +344,11 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. @@ -345,8 +358,14 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj + elif isinstance(obj, uuid.UUID): + return str(obj) elif isinstance(obj, list): return [ self.sanitize_for_serialization(sub_obj) for sub_obj in obj @@ -357,37 +376,56 @@ def sanitize_for_serialization(self, obj): ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - + elif isinstance(obj, decimal.Decimal): + return str(obj) elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. + return { + key: self.sanitize_for_serialization(val) + for key, val in obj.items() + } + + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return self.sanitize_for_serialization(obj_dict) - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - def deserialize(self, response_text, response_type): + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) return self.__deserialize(data, response_type) @@ -425,12 +463,16 @@ def __deserialize(self, data, klass): if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) - elif klass == object: + elif klass is object: return self.__deserialize_object(data) - elif klass == datetime.date: + elif klass is datetime.date: return self.__deserialize_date(data) - elif klass == datetime.datetime: + elif klass is datetime.datetime: return self.__deserialize_datetime(data) + elif klass is decimal.Decimal: + return decimal.Decimal(data) + elif klass is uuid.UUID: + return uuid.UUID(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) else: @@ -487,7 +529,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -505,31 +547,39 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -629,7 +679,16 @@ def _apply_auth_params( :param auth_setting: auth settings for the endpoint """ if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] + if not 'Cookie' in headers: + headers['Cookie'] = "" + else: + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] @@ -656,14 +715,16 @@ def __deserialize_file(self, response): os.close(fd) os.remove(path) - content_disposition = response.getheader("Content-Disposition") + content_disposition = response.headers.get("Content-Disposition") if content_disposition: m = re.search( r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition ) assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) + filename = os.path.basename(m.group(1)) # Strip any directory traversal + if filename in ("", ".", ".."): # fall back to tmp filename + filename = os.path.basename(path) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -757,3 +818,17 @@ def __deserialize_model(self, data, klass): """ return klass.from_dict(data) + + +def _flat_user_agent() -> str: + """`Flat-SDK-Python/ (python/)`. + + Derived from the package version so it can never drift from what is published. + """ + import platform + + from flat_api import __version__ + + return ( + f"Flat-SDK-Python/{__version__} (python/{platform.python_version()})" + ) diff --git a/flat_api/client.py b/flat_api/client.py new file mode 100644 index 0000000..bd793ae --- /dev/null +++ b/flat_api/client.py @@ -0,0 +1,78 @@ +"""The entry points a developer actually uses. + +``FlatClient`` is synchronous, ``AsyncFlatClient`` is its asynchronous twin. Both take the same +arguments and raise the same typed errors; only the call convention differs. +""" + +from __future__ import annotations + +from typing import Any + +from flat_api.api_client import ApiClient +from flat_api.configuration import Configuration +from flat_api.oauth import OAuth2Helper, TokenManager, Tokens +from flat_api._retry import RetryPolicy + +__all__ = ["FlatClient", "AsyncFlatClient"] + +DEFAULT_BASE_URL = "https://api.flat.io/v2" +#: A finite default. Waiting forever is not an acceptable default for an SDK. +DEFAULT_TIMEOUT = 30.0 + + +class _BaseClient: + def __init__( + self, + access_token: str | None = None, + *, + tokens: Tokens | None = None, + oauth: OAuth2Helper | None = None, + on_token_refresh: Any = None, + base_url: str = DEFAULT_BASE_URL, + timeout: float = DEFAULT_TIMEOUT, + retry: RetryPolicy | None = None, + ) -> None: + if access_token is None and tokens is None: + raise ValueError("pass either access_token= or tokens=") + if tokens is None: + tokens = Tokens(access_token=access_token or "") + + self.tokens = TokenManager(tokens, helper=oauth, on_token_refresh=on_token_refresh) + self.retry = retry if retry is not None else RetryPolicy() + self.base_url = base_url + self.timeout = timeout + + configuration = Configuration(host=base_url) + configuration.access_token = self.tokens.access_token + self._configuration = configuration + self._api_client = self._build_api_client(configuration) + + def _build_api_client(self, configuration: Configuration) -> Any: + return ApiClient(configuration) + + @property + def api_client(self) -> Any: + """The generated client, for operations not yet surfaced ergonomically.""" + return self._api_client + + def _reauthenticate(self) -> None: + """Refresh the access token and push it into the generated configuration.""" + token = self.tokens.refresh() + self._configuration.access_token = token + + +class FlatClient(_BaseClient): + """Synchronous Flat API client. + + client = FlatClient(access_token="...") + me = client.api_client # generated APIs hang off here + """ + + +class AsyncFlatClient(_BaseClient): + """Asynchronous Flat API client, backed by the ``flat_api.aio`` generation pass.""" + + def _build_api_client(self, configuration: Configuration) -> Any: + from flat_api.aio.api_client import ApiClient as AsyncApiClient + + return AsyncApiClient(configuration) diff --git a/flat_api/configuration.py b/flat_api/configuration.py index c94ccfd..ab1c071 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -1,11 +1,9 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,14 +12,18 @@ import copy +import http.client as httplib import logging from logging import FileHandler import multiprocessing import sys -from typing import Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from urllib.parse import urlparse +from urllib.request import getproxies +from typing_extensions import NotRequired, Self + import urllib3 -import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -29,10 +31,114 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "OAuth2": OAuth2AuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + class Configuration: """This class contains various settings of the API client. :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. @@ -53,22 +159,65 @@ class Configuration: string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. + :param retries: int | urllib3.util.retry.Retry - Retry configuration. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param no_proxy: Comma-separated hosts that bypass the proxy. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. :Example: """ - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[Union[int, urllib3.util.retry.Retry]] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + no_proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", + *, + debug: Optional[bool] = None, + ) -> None: """Constructor """ self._base_path = "https://api.flat.io/v2" if host is None else host @@ -82,6 +231,9 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -125,11 +277,14 @@ def __init__(self, host=None, self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ - self.verify_ssl = True + self.verify_ssl = verify_ssl """SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server. @@ -137,56 +292,69 @@ def __init__(self, host=None, self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ - self.cert_file = None + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file """client certificate file """ - self.key_file = None + self.key_file = key_file """client key file """ - self.assert_hostname = None + self.assert_hostname = assert_hostname """Set this to True/False to enable/disable SSL hostname verification. """ - self.tls_server_name = None + self.tls_server_name = tls_server_name """SSL/TLS Server Name Indication (SNI) Set this to the SNI value expected by the server. """ - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None + per pool. None in the constructor is coerced to cpu_count * 5. + """ + + # urllib3 does not read proxy environment variables itself: + # https://github.com/urllib3/urllib3/issues/1785 + if proxy is None or no_proxy is None: + proxies = getproxies() + if proxy is None: + scheme = urlparse(self.host).scheme + proxy = proxies.get(scheme) or proxies.get("all") + if no_proxy is None: + no_proxy = proxies.get("no") + self.proxy = proxy """Proxy URL """ - self.proxy_headers = None + self.no_proxy = no_proxy + """Hosts that bypass the proxy + """ + self.proxy_headers = proxy_headers """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = safe_chars_for_path_param """Safe chars for path_param """ - self.retries = None - """Adding retries to override urllib3 default value 3 + self.retries = retries + """Retry configuration """ # Enable client side validation - self.client_side_validation = True + self.client_side_validation = client_side_validation - self.socket_options = None + self.socket_options = socket_options """Options to pass down to the underlying urllib3 socket """ - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + self.datetime_format = datetime_format """datetime format """ - self.date_format = "%Y-%m-%d" + self.date_format = date_format """date format """ - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -195,16 +363,16 @@ def __deepcopy__(self, memo): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) - # use setters to configure loggers + # use setter to re-create the file handler (excluded from __dict__ copy) result.logger_file = self.logger_file - result.debug = self.debug + return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -215,7 +383,7 @@ def set_default(cls, default): cls._default = default @classmethod - def get_default_copy(cls): + def get_default_copy(cls) -> Self: """Deprecated. Please use `get_default` instead. Deprecated. Please use `get_default` instead. @@ -225,7 +393,7 @@ def get_default_copy(cls): return cls.get_default() @classmethod - def get_default(cls): + def get_default(cls) -> Self: """Return the default configuration. This method returns newly created, based on default constructor, @@ -235,11 +403,11 @@ def get_default(cls): :return: The configuration object. """ if cls._default is None: - cls._default = Configuration() + cls._default = cls() return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -251,7 +419,7 @@ def logger_file(self): return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -270,7 +438,7 @@ def logger_file(self, value): logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -279,7 +447,7 @@ def debug(self): return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -301,7 +469,7 @@ def debug(self, value): httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -312,7 +480,7 @@ def logger_format(self): return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -323,7 +491,7 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -334,13 +502,16 @@ def get_api_key_with_prefix(self, identifier, alias=None): self.refresh_api_key_hook(self) key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: - prefix = self.api_key_prefix.get(identifier) + prefix = self.api_key_prefix.get( + identifier, self.api_key_prefix.get(alias) if alias is not None else None) if prefix: return "%s %s" % (prefix, key) else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -351,16 +522,17 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password + return urllib3.util.make_headers( basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self): + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} if self.access_token is not None: auth['OAuth2'] = { 'type': 'oauth2', @@ -370,7 +542,7 @@ def auth_settings(self): } return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -378,11 +550,11 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.20.0\n"\ - "SDK Package Version: 1.1.0".\ + "Version of the API: 2.26.0\n"\ + "SDK Package Version: 2.0.0".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -394,7 +566,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -422,6 +599,7 @@ def get_host_from_settings(self, index, variables=None, servers=None): variable_name, variable['default_value']) if 'enum_values' in variable \ + and variable['enum_values'] \ and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " @@ -434,12 +612,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/flat_api/errors.py b/flat_api/errors.py new file mode 100644 index 0000000..11fc5ca --- /dev/null +++ b/flat_api/errors.py @@ -0,0 +1,137 @@ +"""Typed errors for the Flat API. + +Branch on the error class, not on the status code: rate limiting and authorization failures both +return HTTP 403 and are separated only by the response body's ``code``. +""" + +from __future__ import annotations + +from typing import Any, Mapping + +__all__ = [ + "FlatError", + "FlatAuthenticationError", + "FlatAuthorizationError", + "FlatRateLimitError", + "FlatValidationError", + "FlatNotFoundError", + "FlatQuotaError", + "FlatServerError", + "from_response", +] + +RATE_LIMIT_CODE = "API_RATE_LIMIT_EXCEEDED" +QUOTA_CODES = frozenset({"QUOTA_EXCEEDED", "CREDITS_EXHAUSTED", "OMR_CREDITS_EXHAUSTED"}) + + +class FlatError(Exception): + """Base class for every error raised by this SDK.""" + + def __init__( + self, + message: str, + *, + status: int | None = None, + code: str | None = None, + request_id: str | None = None, + headers: Mapping[str, str] | None = None, + body: Any = None, + ) -> None: + super().__init__(message) + self.message = message + self.status = status + self.code = code + #: The server-provided error identifier. Present only for internal and backend errors, + #: so treat it as optional and quote it to support when you have it. + self.request_id = request_id + self.headers = dict(headers or {}) + self.body = body + + def __str__(self) -> str: + parts = [self.message] + if self.code: + parts.append(f"code={self.code}") + if self.status is not None: + parts.append(f"status={self.status}") + if self.request_id: + parts.append(f"id={self.request_id}") + return " ".join(parts) + + +class FlatAuthenticationError(FlatError): + """The token is missing, invalid or expired, or a refresh failed. Re-authorize.""" + + +class FlatAuthorizationError(FlatError): + """Authenticated but not permitted: a missing scope or insufficient permission.""" + + +class FlatRateLimitError(FlatError): + """The account or IP exceeded its request quota. Returned as HTTP 403, not 429.""" + + def __init__(self, message: str, **kwargs: Any) -> None: + super().__init__(message, **kwargs) + self.limit = _int_header(self.headers, "X-RateLimit-Limit") + self.remaining = _int_header(self.headers, "X-RateLimit-Remaining") + #: UTC epoch seconds at which the window resets. Flat sends no Retry-After header. + self.reset = _int_header(self.headers, "X-RateLimit-Reset") + + +class FlatValidationError(FlatError): + """The request body or parameters failed validation.""" + + +class FlatNotFoundError(FlatError): + """The resource does not exist, or is not visible to this token.""" + + +class FlatQuotaError(FlatError): + """A metered resource, such as OMR credits, is exhausted.""" + + +class FlatServerError(FlatError): + """An internal or backend error. ``request_id`` is normally set here.""" + + +def _int_header(headers: Mapping[str, str], name: str) -> int | None: + for key, value in headers.items(): + if key.lower() == name.lower(): + try: + return int(value) + except (TypeError, ValueError): + return None + return None + + +def from_response( + status: int, + body: Any, + headers: Mapping[str, str] | None = None, +) -> FlatError: + """Build the right error for a non-2xx response.""" + payload = body if isinstance(body, dict) else {} + code = payload.get("code") + message = payload.get("message") or f"HTTP {status}" + common = { + "status": status, + "code": code, + "request_id": payload.get("id"), + "headers": headers, + "body": body, + } + + if status == 403 and code == RATE_LIMIT_CODE: + return FlatRateLimitError(message, **common) + if code in QUOTA_CODES: + return FlatQuotaError(message, **common) + if status == 401: + return FlatAuthenticationError(message, **common) + if status == 403: + return FlatAuthorizationError(message, **common) + if status == 404: + return FlatNotFoundError(message, **common) + if status in (400, 422): + return FlatValidationError(message, **common) + if status >= 500: + return FlatServerError(message, **common) + return FlatError(message, **common) diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py index 67046cb..005a786 100644 --- a/flat_api/exceptions.py +++ b/flat_api/exceptions.py @@ -1,17 +1,16 @@ -# coding: utf-8 - """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + from typing import Any, Optional from typing_extensions import Self @@ -129,7 +128,7 @@ def __init__( self.body = http_resp.data.decode('utf-8') except Exception: pass - self.headers = http_resp.getheaders() + self.headers = http_resp.headers @classmethod def from_response( @@ -151,6 +150,13 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -163,8 +169,11 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + if self.data: + error_message += "HTTP response data: {0}\n".format(self.data) return error_message @@ -189,6 +198,16 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index 0158488..cd4f4f7 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -4,24 +4,28 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - # import models into model package +from flat_api.models.add_group_user200_response import AddGroupUser200Response +from flat_api.models.add_group_user_request import AddGroupUserRequest from flat_api.models.api_access_token import ApiAccessToken from flat_api.models.app_scopes import AppScopes from flat_api.models.assignment import Assignment +from flat_api.models.assignment_capabilities import AssignmentCapabilities +from flat_api.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError from flat_api.models.assignment_copy import AssignmentCopy from flat_api.models.assignment_copy_response import AssignmentCopyResponse -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +from flat_api.models.assignment_copy_to_class import AssignmentCopyToClass +from flat_api.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary +from flat_api.models.assignment_group import AssignmentGroup from flat_api.models.assignment_submission import AssignmentSubmission from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation @@ -30,18 +34,19 @@ from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti -from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner +from flat_api.models.assignment_submission_playback import AssignmentSubmissionPlayback from flat_api.models.assignment_submission_state import AssignmentSubmissionState +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate from flat_api.models.assignment_type import AssignmentType from flat_api.models.assignment_update import AssignmentUpdate from flat_api.models.class_assignment import ClassAssignment -from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas -from flat_api.models.class_assignment_lti import ClassAssignmentLti -from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas +from flat_api.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti +from flat_api.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc from flat_api.models.class_assignment_update import ClassAssignmentUpdate -from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom -from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph from flat_api.models.class_attachment_creation import ClassAttachmentCreation from flat_api.models.class_creation import ClassCreation from flat_api.models.class_details import ClassDetails @@ -61,15 +66,20 @@ from flat_api.models.collection import Collection from flat_api.models.collection_app import CollectionApp from flat_api.models.collection_capabilities import CollectionCapabilities +from flat_api.models.collection_contents import CollectionContents from flat_api.models.collection_creation import CollectionCreation from flat_api.models.collection_modification import CollectionModification from flat_api.models.collection_privacy import CollectionPrivacy from flat_api.models.collection_type import CollectionType +from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.models.credit_transaction import CreditTransaction from flat_api.models.edu_library import EduLibrary from flat_api.models.edu_resource import EduResource +from flat_api.models.edu_resource_assignment_creation import EduResourceAssignmentCreation from flat_api.models.edu_resource_capabilities import EduResourceCapabilities from flat_api.models.edu_resource_copy import EduResourceCopy from flat_api.models.edu_resource_creation import EduResourceCreation +from flat_api.models.edu_resource_folder import EduResourceFolder from flat_api.models.edu_resource_lti_link import EduResourceLtiLink from flat_api.models.edu_resource_move import EduResourceMove from flat_api.models.edu_resource_privacy import EduResourcePrivacy @@ -78,25 +88,70 @@ from flat_api.models.edu_resource_update import EduResourceUpdate from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass from flat_api.models.flat_error_response import FlatErrorResponse -from flat_api.models.flat_locales import FlatLocales from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework from flat_api.models.google_classroom_submission import GoogleClassroomSubmission +from flat_api.models.grade import Grade from flat_api.models.group import Group +from flat_api.models.group_creation import GroupCreation from flat_api.models.group_details import GroupDetails from flat_api.models.group_type import GroupType from flat_api.models.license_mode import LicenseMode from flat_api.models.license_sources import LicenseSources from flat_api.models.lms_name import LmsName +from flat_api.models.lti_configuration import LtiConfiguration +from flat_api.models.lti_configuration1p1 import LtiConfiguration1p1 +from flat_api.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool +from flat_api.models.lti_configuration1p3 import LtiConfiguration1p3 +from flat_api.models.lti_configuration1p3_base import LtiConfiguration1p3Base +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from flat_api.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment +from flat_api.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic +from flat_api.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual +from flat_api.models.lti_configuration_base import LtiConfigurationBase +from flat_api.models.lti_configuration_create import LtiConfigurationCreate +from flat_api.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 +from flat_api.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment +from flat_api.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic +from flat_api.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo +from flat_api.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual +from flat_api.models.lti_configuration_update import LtiConfigurationUpdate +from flat_api.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment +from flat_api.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone from flat_api.models.lti_credentials import LtiCredentials from flat_api.models.lti_credentials_creation import LtiCredentialsCreation from flat_api.models.media_attachment import MediaAttachment from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission +from flat_api.models.omr_capabilities import OmrCapabilities +from flat_api.models.omr_details_step_data import OmrDetailsStepData +from flat_api.models.omr_details_submission import OmrDetailsSubmission +from flat_api.models.omr_detected_instrument import OmrDetectedInstrument +from flat_api.models.omr_imported_metadata import OmrImportedMetadata +from flat_api.models.omr_instrument_override import OmrInstrumentOverride +from flat_api.models.omr_job import OmrJob +from flat_api.models.omr_job_creation import OmrJobCreation +from flat_api.models.omr_job_file_metadata import OmrJobFileMetadata +from flat_api.models.omr_job_file_upload import OmrJobFileUpload +from flat_api.models.omr_job_file_upload_result import OmrJobFileUploadResult +from flat_api.models.omr_job_input_file import OmrJobInputFile +from flat_api.models.omr_job_output import OmrJobOutput +from flat_api.models.omr_job_progress import OmrJobProgress +from flat_api.models.omr_job_result import OmrJobResult +from flat_api.models.omr_job_retention import OmrJobRetention +from flat_api.models.omr_job_status import OmrJobStatus +from flat_api.models.omr_locale_details import OmrLocaleDetails +from flat_api.models.omr_pending_step import OmrPendingStep +from flat_api.models.omr_step_name import OmrStepName from flat_api.models.organization_invitation import OrganizationInvitation from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation from flat_api.models.organization_roles import OrganizationRoles from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation +from flat_api.models.rename_group_request import RenameGroupRequest from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation from flat_api.models.resource_rights import ResourceRights @@ -108,11 +163,16 @@ from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation import ScoreCreation from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData -from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner +from flat_api.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData +from flat_api.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from flat_api.models.score_creation_common import ScoreCreationCommon +from flat_api.models.score_creation_file_import import ScoreCreationFileImport +from flat_api.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport from flat_api.models.score_creation_type import ScoreCreationType from flat_api.models.score_details import ScoreDetails +from flat_api.models.score_details_all_of_me import ScoreDetailsAllOfMe from flat_api.models.score_fork import ScoreFork from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts @@ -123,8 +183,10 @@ from flat_api.models.score_revision_creation import ScoreRevisionCreation from flat_api.models.score_revision_statistics import ScoreRevisionStatistics from flat_api.models.score_source import ScoreSource +from flat_api.models.score_summary import ScoreSummary from flat_api.models.score_track import ScoreTrack from flat_api.models.score_track_creation import ScoreTrackCreation +from flat_api.models.score_track_creation_response import ScoreTrackCreationResponse from flat_api.models.score_track_point import ScoreTrackPoint from flat_api.models.score_track_purpose import ScoreTrackPurpose from flat_api.models.score_track_state import ScoreTrackState @@ -135,15 +197,18 @@ from flat_api.models.task_export_options import TaskExportOptions from flat_api.models.task_progress import TaskProgress from flat_api.models.task_result import TaskResult +from flat_api.models.teaching_theme import TeachingTheme from flat_api.models.tutteo_product import TutteoProduct from flat_api.models.user_admin_update import UserAdminUpdate from flat_api.models.user_azure_details import UserAzureDetails +from flat_api.models.user_basics import UserBasics from flat_api.models.user_community_profile_links import UserCommunityProfileLinks from flat_api.models.user_creation import UserCreation from flat_api.models.user_details import UserDetails from flat_api.models.user_details_admin import UserDetailsAdmin -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from flat_api.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense from flat_api.models.user_public import UserPublic from flat_api.models.user_public_summary import UserPublicSummary from flat_api.models.user_signin_link import UserSigninLink from flat_api.models.user_signin_link_creation import UserSigninLinkCreation + diff --git a/flat_api/models/add_group_user200_response.py b/flat_api/models/add_group_user200_response.py new file mode 100644 index 0000000..a1ec49e --- /dev/null +++ b/flat_api/models/add_group_user200_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AddGroupUser200Response(BaseModel): + """ + AddGroupUser200Response + """ # noqa: E501 + user: Optional[StrictStr] = Field(default=None, description="User ID that was added") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGroupUser200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGroupUser200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/add_group_user_request.py b/flat_api/models/add_group_user_request.py new file mode 100644 index 0000000..b9ddd17 --- /dev/null +++ b/flat_api/models/add_group_user_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AddGroupUserRequest(BaseModel): + """ + AddGroupUserRequest + """ # noqa: E501 + user: StrictStr = Field(description="ID of the student to add") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddGroupUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddGroupUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py index eec0c96..9dfb1be 100644 --- a/flat_api/models/api_access_token.py +++ b/flat_api/models/api_access_token.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,11 +19,12 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.app_scopes import AppScopes from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ApiAccessToken(BaseModel): """ @@ -35,13 +36,15 @@ class ApiAccessToken(BaseModel): issued_date: Optional[datetime] = Field(default=None, description="The date then this token was issued ", alias="issuedDate") expiration_date: Optional[datetime] = Field(default=None, description="The date then this token will expire ", alias="expirationDate") scopes: Optional[List[AppScopes]] = Field(default=None, description="The list of scopes associated to the token ") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "token", "issuedDate", "expirationDate", "scopes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,8 +53,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "expirationDate": obj.get("expirationDate"), "scopes": obj.get("scopes") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py index 69ccd15..412161a 100644 --- a/flat_api/models/app_scopes.py +++ b/flat_api/models/app_scopes.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -36,6 +36,7 @@ class AppScopes(str, Enum): COLLECTIONS_DOT_READONLY = 'collections.readonly' COLLECTIONS_DOT_ADD_SCORES = 'collections.add_scores' COLLECTIONS = 'collections' + NOTIFICATIONS_DOT_READONLY = 'notifications.readonly' EDU_DOT_RESOURCES = 'edu.resources' EDU_DOT_RESOURCES_DOT_READONLY = 'edu.resources.readonly' EDU_DOT_CLASSES = 'edu.classes' @@ -48,6 +49,7 @@ class AppScopes(str, Enum): EDU_DOT_ADMIN_DOT_USERS = 'edu.admin.users' EDU_DOT_ADMIN_DOT_USERS_DOT_READONLY = 'edu.admin.users.readonly' TASKS_DOT_READONLY = 'tasks.readonly' + OMR = 'omr' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index cbab03c..234a859 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_capabilities import AssignmentCapabilities +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_type import AssignmentType from flat_api.models.media_attachment import MediaAttachment from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class Assignment(BaseModel): """ @@ -32,19 +34,31 @@ class Assignment(BaseModel): """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the assignment") type: AssignmentType - capabilities: AssignmentCopyResponseCapabilities + capabilities: AssignmentCapabilities title: StrictStr = Field(description="Title of the assignment") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") - attachments: List[MediaAttachment] + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") - __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized"] + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord"] @field_validator('release_grades') def release_grades_validate_enum(cls, value): @@ -56,11 +70,22 @@ def release_grades_validate_enum(cls, value): raise ValueError("must be one of enum values ('auto', 'manual')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -69,8 +94,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -86,8 +110,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -101,10 +127,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -119,9 +150,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, "title": obj.get("title"), "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), "cover": obj.get("cover"), "coverFile": obj.get("coverFile"), "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, @@ -130,8 +164,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "releaseGrades": obj.get("releaseGrades"), "shuffleExercises": obj.get("shuffleExercises"), "toolset": obj.get("toolset"), - "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized") + "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_copy_response_capabilities.py b/flat_api/models/assignment_capabilities.py similarity index 50% rename from flat_api/models/assignment_copy_response_capabilities.py rename to flat_api/models/assignment_capabilities.py index ef39515..2f01f0d 100644 --- a/flat_api/models/assignment_copy_response_capabilities.py +++ b/flat_api/models/assignment_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,28 +18,31 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError +from flat_api.models.assignment_capabilities_can_publish_in_class_error import AssignmentCapabilitiesCanPublishInClassError from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python -class AssignmentCopyResponseCapabilities(BaseModel): +class AssignmentCapabilities(BaseModel): """ Capabilities the current user has on this assignment. Each capability corresponds to a fine-grained action that a user may take. """ # noqa: E501 can_edit: StrictBool = Field(description="Whether the current user can edit the assignment ", alias="canEdit") can_publish_in_class: StrictBool = Field(description="Whether this assignment can be published in a class ", alias="canPublishInClass") - can_publish_in_class_error: Optional[AssignmentCopyResponseCapabilitiesCanPublishInClassError] = Field(default=None, alias="canPublishInClassError") + can_publish_in_class_error: Optional[AssignmentCapabilitiesCanPublishInClassError] = Field(default=None, alias="canPublishInClassError") can_archive: StrictBool = Field(description="Whether the current user can archive the assignment ", alias="canArchive") can_unarchive: StrictBool = Field(description="Whether the current user can unarchive the assignment ", alias="canUnarchive") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["canEdit", "canPublishInClass", "canPublishInClassError", "canArchive", "canUnarchive"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,12 +51,11 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignmentCopyResponseCapabilities from a JSON string""" + """Create an instance of AssignmentCapabilities from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,11 +81,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of can_publish_in_class_error if self.can_publish_in_class_error: _dict['canPublishInClassError'] = self.can_publish_in_class_error.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignmentCopyResponseCapabilities from a dict""" + """Create an instance of AssignmentCapabilities from a dict""" if obj is None: return None @@ -91,10 +100,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "canEdit": obj.get("canEdit"), "canPublishInClass": obj.get("canPublishInClass"), - "canPublishInClassError": AssignmentCopyResponseCapabilitiesCanPublishInClassError.from_dict(obj["canPublishInClassError"]) if obj.get("canPublishInClassError") is not None else None, + "canPublishInClassError": AssignmentCapabilitiesCanPublishInClassError.from_dict(obj["canPublishInClassError"]) if obj.get("canPublishInClassError") is not None else None, "canArchive": obj.get("canArchive"), "canUnarchive": obj.get("canUnarchive") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_capabilities_can_publish_in_class_error.py b/flat_api/models/assignment_capabilities_can_publish_in_class_error.py new file mode 100644 index 0000000..90571c7 --- /dev/null +++ b/flat_api/models/assignment_capabilities_can_publish_in_class_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCapabilitiesCanPublishInClassError(BaseModel): + """ + If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class + """ # noqa: E501 + code: StrictStr = Field(description="A corresponding code for this error") + message: StrictStr = Field(description="A printable and localized message for this error") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCapabilitiesCanPublishInClassError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCapabilitiesCanPublishInClassError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index 596a712..bc5f89e 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,84 +14,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.models.assignment_copy_to_class import AssignmentCopyToClass +from flat_api.models.assignment_copy_to_resource_library import AssignmentCopyToResourceLibrary +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +ASSIGNMENTCOPY_ONE_OF_SCHEMAS = ["AssignmentCopyToClass", "AssignmentCopyToResourceLibrary"] class AssignmentCopy(BaseModel): """ AssignmentCopy - """ # noqa: E501 - classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") - assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") - scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") - library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") - verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") - __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate", "libraryParent", "verifyIfNotAlreadyInResourceLibrary"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + """ + # data type: AssignmentCopyToClass + oneof_schema_1_validator: Optional[AssignmentCopyToClass] = None + # data type: AssignmentCopyToResourceLibrary + oneof_schema_2_validator: Optional[AssignmentCopyToResourceLibrary] = None + actual_instance: Optional[Union[AssignmentCopyToClass, AssignmentCopyToResourceLibrary]] = None + one_of_schemas: Set[str] = { "AssignmentCopyToClass", "AssignmentCopyToResourceLibrary" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AssignmentCopy.model_construct() + error_messages = [] + match = 0 + # validate data type: AssignmentCopyToClass + if not isinstance(v, AssignmentCopyToClass): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssignmentCopyToClass`") + else: + match += 1 + # validate data type: AssignmentCopyToResourceLibrary + if not isinstance(v, AssignmentCopyToResourceLibrary): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssignmentCopyToResourceLibrary`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignmentCopy from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignmentCopy from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AssignmentCopyToClass + try: + instance.actual_instance = AssignmentCopyToClass.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssignmentCopyToResourceLibrary + try: + instance.actual_instance = AssignmentCopyToResourceLibrary.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AssignmentCopy with oneOf schemas: AssignmentCopyToClass, AssignmentCopyToResourceLibrary. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AssignmentCopyToClass, AssignmentCopyToResourceLibrary]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "classroom": obj.get("classroom"), - "assignment": obj.get("assignment"), - "scheduledDate": obj.get("scheduledDate"), - "libraryParent": obj.get("libraryParent"), - "verifyIfNotAlreadyInResourceLibrary": obj.get("verifyIfNotAlreadyInResourceLibrary") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/flat_api/models/assignment_copy_response.py b/flat_api/models/assignment_copy_response.py index acae4f5..fe52ee4 100644 --- a/flat_api/models/assignment_copy_response.py +++ b/flat_api/models/assignment_copy_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_capabilities import AssignmentCapabilities +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_type import AssignmentType from flat_api.models.media_attachment import MediaAttachment from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentCopyResponse(BaseModel): """ @@ -32,20 +34,32 @@ class AssignmentCopyResponse(BaseModel): """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the assignment") type: AssignmentType - capabilities: AssignmentCopyResponseCapabilities + capabilities: AssignmentCapabilities title: StrictStr = Field(description="Title of the assignment") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") - attachments: List[MediaAttachment] + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") resource: Optional[StrictStr] = Field(default=None, description="If this assignment is stored as a resource in the Flat for Education Resource Library, the unique identifier of the resource.") - __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "resource"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "resource"] @field_validator('release_grades') def release_grades_validate_enum(cls, value): @@ -57,11 +71,22 @@ def release_grades_validate_enum(cls, value): raise ValueError("must be one of enum values ('auto', 'manual')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,8 +95,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -87,8 +111,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -102,10 +128,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -120,9 +151,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, "title": obj.get("title"), "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), "cover": obj.get("cover"), "coverFile": obj.get("coverFile"), "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, @@ -132,8 +166,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "shuffleExercises": obj.get("shuffleExercises"), "toolset": obj.get("toolset"), "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), "resource": obj.get("resource") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py b/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py deleted file mode 100644 index 60b7c1f..0000000 --- a/flat_api/models/assignment_copy_response_capabilities_can_publish_in_class_error.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class AssignmentCopyResponseCapabilitiesCanPublishInClassError(BaseModel): - """ - If `canPublishInClass` and `canEdit` are false, the issue why this assignment cannot be published in a class - """ # noqa: E501 - code: StrictStr = Field(description="A corresponding code for this error") - message: StrictStr = Field(description="A printable and localized message for this error") - __properties: ClassVar[List[str]] = ["code", "message"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignmentCopyResponseCapabilitiesCanPublishInClassError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message") - }) - return _obj - - diff --git a/flat_api/models/assignment_copy_to_class.py b/flat_api/models/assignment_copy_to_class.py new file mode 100644 index 0000000..f931c0a --- /dev/null +++ b/flat_api/models/assignment_copy_to_class.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCopyToClass(BaseModel): + """ + Copy the assignment to a class + """ # noqa: E501 + classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyToClass from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyToClass from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "scheduledDate": obj.get("scheduledDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/assignment_copy_to_resource_library.py b/flat_api/models/assignment_copy_to_resource_library.py new file mode 100644 index 0000000..e3a0e30 --- /dev/null +++ b/flat_api/models/assignment_copy_to_resource_library.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentCopyToResourceLibrary(BaseModel): + """ + Copy the assignment to the EDU Resource Library + """ # noqa: E501 + library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") + verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["libraryParent", "verifyIfNotAlreadyInResourceLibrary"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentCopyToResourceLibrary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentCopyToResourceLibrary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "libraryParent": obj.get("libraryParent"), + "verifyIfNotAlreadyInResourceLibrary": obj.get("verifyIfNotAlreadyInResourceLibrary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/assignment_group.py b/flat_api/models/assignment_group.py new file mode 100644 index 0000000..d4b3685 --- /dev/null +++ b/flat_api/models/assignment_group.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentGroup(BaseModel): + """ + A group assigned to an assignment for shared writing assignments + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the group") + name: StrictStr = Field(description="The display name of the group") + parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") + members: List[StrictStr] = Field(description="Array of user IDs that are members of this group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "parent", "members"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "parent": obj.get("parent"), + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index 85aae91..eb8d785 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,17 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti -from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner +from flat_api.models.assignment_submission_playback import AssignmentSubmissionPlayback from flat_api.models.assignment_submission_state import AssignmentSubmissionState from flat_api.models.google_classroom_submission import GoogleClassroomSubmission from flat_api.models.media_attachment import MediaAttachment from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmission(BaseModel): """ @@ -48,18 +49,20 @@ class AssignmentSubmission(BaseModel): draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.", alias="maxPoints") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") - playback: List[AssignmentSubmissionPlaybackInner] + playback: List[AssignmentSubmissionPlayback] comments: AssignmentSubmissionComments google_classroom: Optional[GoogleClassroomSubmission] = Field(default=None, alias="googleClassroom") microsoft_graph: Optional[MicrosoftGraphSubmission] = Field(default=None, alias="microsoftGraph") lti: Optional[AssignmentSubmissionLti] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "state", "classroom", "assignment", "creator", "creationDate", "attachments", "submissionDate", "returnDate", "returnCreator", "grade", "draftGrade", "maxPoints", "exercisesIds", "playback", "comments", "googleClassroom", "microsoftGraph", "lti"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,8 +71,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -85,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -97,16 +101,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items # override the default output from pydantic by calling `to_dict()` of each item in playback (list) _items = [] if self.playback: - for _item in self.playback: - if _item: - _items.append(_item.to_dict()) + for _item_playback in self.playback: + if _item_playback: + _items.append(_item_playback.to_dict()) _dict['playback'] = _items # override the default output from pydantic by calling `to_dict()` of comments if self.comments: @@ -120,6 +124,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of lti if self.lti: _dict['lti'] = self.lti.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if grade (nullable) is None # and model_fields_set contains the field if self.grade is None and "grade" in self.model_fields_set: @@ -156,12 +165,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "draftGrade": obj.get("draftGrade"), "maxPoints": obj.get("maxPoints"), "exercisesIds": obj.get("exercisesIds"), - "playback": [AssignmentSubmissionPlaybackInner.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, + "playback": [AssignmentSubmissionPlayback.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, "comments": AssignmentSubmissionComments.from_dict(obj["comments"]) if obj.get("comments") is not None else None, "googleClassroom": GoogleClassroomSubmission.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, "microsoftGraph": MicrosoftGraphSubmission.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, "lti": AssignmentSubmissionLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py index b4174aa..56983e4 100644 --- a/flat_api/models/assignment_submission_comment.py +++ b/flat_api/models/assignment_submission_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,11 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionComment(BaseModel): """ @@ -35,13 +36,15 @@ class AssignmentSubmissionComment(BaseModel): modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") comment: Optional[StrictStr] = Field(default=None, description="The comment text") unread: Optional[StrictBool] = Field(default=None, description="True if the comment is unread by the current user") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "user", "submission", "date", "modificationDate", "comment", "unread"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,8 +53,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -96,6 +105,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "comment": obj.get("comment"), "unread": obj.get("unread") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py index d10da33..f3e3f6f 100644 --- a/flat_api/models/assignment_submission_comment_creation.py +++ b/flat_api/models/assignment_submission_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionCommentCreation(BaseModel): """ Creation of a assignment submission comment """ # noqa: E501 comment: StrictStr = Field(description="The comment text") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["comment"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "comment": obj.get("comment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_comments.py b/flat_api/models/assignment_submission_comments.py index a12a87a..b499aa9 100644 --- a/flat_api/models/assignment_submission_comments.py +++ b/flat_api/models/assignment_submission_comments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionComments(BaseModel): """ @@ -29,13 +30,15 @@ class AssignmentSubmissionComments(BaseModel): """ # noqa: E501 total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the submission") unread: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of unread comments for the current user") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["total", "unread"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "total": obj.get("total"), "unread": obj.get("unread") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py index 672153f..f4bf103 100644 --- a/flat_api/models/assignment_submission_history.py +++ b/flat_api/models/assignment_submission_history.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,12 +19,13 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionHistory(BaseModel): """ @@ -43,6 +44,7 @@ class AssignmentSubmissionHistory(BaseModel): comment: Optional[StrictStr] = Field(default=None, description="The comment that is made to this submission") due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment", alias="dueDate") attachment: Optional[AssignmentSubmissionHistoryAttachment] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["date", "classroom", "assignment", "submission", "users", "source", "state", "draftGrade", "grade", "maxPoints", "comment", "dueDate", "attachment"] @field_validator('source') @@ -55,11 +57,12 @@ def source_validate_enum(cls, value): raise ValueError("must be one of enum values ('lti', 'googleClassroom', 'microsoftGraph')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,8 +71,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -85,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -97,6 +101,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of attachment if self.attachment: _dict['attachment'] = self.attachment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -123,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dueDate": obj.get("dueDate"), "attachment": AssignmentSubmissionHistoryAttachment.from_dict(obj["attachment"]) if obj.get("attachment") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py index 90dde2e..12c1edf 100644 --- a/flat_api/models/assignment_submission_history_attachment.py +++ b/flat_api/models/assignment_submission_history_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionHistoryAttachment(BaseModel): """ @@ -30,13 +31,15 @@ class AssignmentSubmissionHistoryAttachment(BaseModel): score: Optional[StrictStr] = Field(default=None, description="The score identifier that changed") revision: Optional[StrictStr] = Field(default=None, description="The revision identifier that changed") title: Optional[StrictStr] = Field(default=None, description="The title of the score that changed") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["score", "revision", "title"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +48,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "revision": obj.get("revision"), "title": obj.get("title") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_history_state.py b/flat_api/models/assignment_submission_history_state.py index fed57ae..64ee184 100644 --- a/flat_api/models/assignment_submission_history_state.py +++ b/flat_api/models/assignment_submission_history_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_lti.py b/flat_api/models/assignment_submission_lti.py index 3cc5b15..8f1add3 100644 --- a/flat_api/models/assignment_submission_lti.py +++ b/flat_api/models/assignment_submission_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,34 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionLti(BaseModel): """ - AssignmentSubmissionLti + If set, this submission has a linked LTI 1.3 AGS or LTI 1.1 Outcomes """ # noqa: E501 - sourcedid: StrictStr = Field(description="The sourcedid of the LTI submission when using LTI Outcomes") - __properties: ClassVar[List[str]] = ["sourcedid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + grade_service: StrictStr = Field(description="The kind of grading service available for this submission: - `ags2p0`: LTI 1.3 Assignment and Grade Services 2.0 - `outcomes1p1`: LTI 1.1 Outcomes 1.1 ", alias="gradeService") + sourcedid: Optional[StrictStr] = Field(default=None, description="The sourcedid of the LTI submission when using LTI Outcomes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["gradeService", "sourcedid"] + + @field_validator('grade_service') + def grade_service_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ags2p0', 'outcomes1p1']): + raise ValueError("must be one of enum values ('ags2p0', 'outcomes1p1')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +54,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -81,8 +98,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "gradeService": obj.get("gradeService"), "sourcedid": obj.get("sourcedid") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_submission_playback.py b/flat_api/models/assignment_submission_playback.py new file mode 100644 index 0000000..e950918 --- /dev/null +++ b/flat_api/models/assignment_submission_playback.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssignmentSubmissionPlayback(BaseModel): + """ + Playback used by a student for an assignment submission. + """ # noqa: E501 + score: StrictStr = Field(description="The score unique identifier") + nb_play_attempt: Union[StrictFloat, StrictInt] = Field(description="Number of times the score was played", alias="nbPlayAttempt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["score", "nbPlayAttempt"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlayback from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignmentSubmissionPlayback from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "nbPlayAttempt": obj.get("nbPlayAttempt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/assignment_submission_playback_inner.py b/flat_api/models/assignment_submission_playback_inner.py deleted file mode 100644 index 1f428da..0000000 --- a/flat_api/models/assignment_submission_playback_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class AssignmentSubmissionPlaybackInner(BaseModel): - """ - Playback used by student in this submission (used to limit the playback for the assignment) - """ # noqa: E501 - score: StrictStr = Field(description="The score unique identifier") - nb_play_attempt: Union[StrictFloat, StrictInt] = Field(description="The number of playback used by the student", alias="nbPlayAttempt") - __properties: ClassVar[List[str]] = ["score", "nbPlayAttempt"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignmentSubmissionPlaybackInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignmentSubmissionPlaybackInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "score": obj.get("score"), - "nbPlayAttempt": obj.get("nbPlayAttempt") - }) - return _obj - - diff --git a/flat_api/models/assignment_submission_state.py b/flat_api/models/assignment_submission_state.py index 2e86d0e..a1a2230 100644 --- a/flat_api/models/assignment_submission_state.py +++ b/flat_api/models/assignment_submission_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_students_mode.py b/flat_api/models/assignment_submission_students_mode.py new file mode 100644 index 0000000..ba298d3 --- /dev/null +++ b/flat_api/models/assignment_submission_students_mode.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssignmentSubmissionStudentsMode(str, Enum): + """ + Submission mode for assignments: - \"single\": Individual submissions (default) - \"group\": Group submissions (for shared writing assignments) + """ + + """ + allowed enum values + """ + SINGLE = 'single' + GROUP = 'group' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentSubmissionStudentsMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index 11b65f4..8bc308b 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,30 +18,35 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated +from flat_api.models.assignment_submission_playback import AssignmentSubmissionPlayback from flat_api.models.class_attachment_creation import ClassAttachmentCreation from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentSubmissionUpdate(BaseModel): """ Assignment Submission creation """ # noqa: E501 attachments: Optional[List[ClassAttachmentCreation]] = None + playback: Optional[List[AssignmentSubmissionPlayback]] = None submit: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done") draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set.") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done", alias="return") - __properties: ClassVar[List[str]] = ["attachments", "submit", "draftGrade", "grade", "exercisesIds", "return"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["attachments", "playback", "submit", "draftGrade", "grade", "exercisesIds", "return"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,8 +55,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -67,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,10 +85,22 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in playback (list) + _items = [] + if self.playback: + for _item_playback in self.playback: + if _item_playback: + _items.append(_item_playback.to_dict()) + _dict['playback'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if draft_grade (nullable) is None # and model_fields_set contains the field if self.draft_grade is None and "draft_grade" in self.model_fields_set: @@ -111,12 +129,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, + "playback": [AssignmentSubmissionPlayback.from_dict(_item) for _item in obj["playback"]] if obj.get("playback") is not None else None, "submit": obj.get("submit"), "draftGrade": obj.get("draftGrade"), "grade": obj.get("grade"), "exercisesIds": obj.get("exercisesIds"), "return": obj.get("return") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/assignment_type.py b/flat_api/models/assignment_type.py index dfed2f3..77eef64 100644 --- a/flat_api/models/assignment_type.py +++ b/flat_api/models/assignment_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,6 +32,7 @@ class AssignmentType(str, Enum): SCORETEMPLATE = 'scoreTemplate' SHAREDWRITING = 'sharedWriting' WORKSHEET = 'worksheet' + WORKSHEETTEXT = 'worksheetText' PERFORMANCE = 'performance' @classmethod diff --git a/flat_api/models/assignment_update.py b/flat_api/models/assignment_update.py index 2b5536b..cfbe7e9 100644 --- a/flat_api/models/assignment_update.py +++ b/flat_api/models/assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_type import AssignmentType from flat_api.models.class_attachment_creation import ClassAttachmentCreation from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class AssignmentUpdate(BaseModel): """ @@ -32,16 +34,28 @@ class AssignmentUpdate(BaseModel): """ # noqa: E501 type: Optional[AssignmentType] = None title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") - attachments: Optional[List[ClassAttachmentCreation]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="descriptionHtml") + teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") + teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") + attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") - __properties: ClassVar[List[str]] = ["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises"] + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "attachments", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord"] @field_validator('release_grades') def release_grades_validate_enum(cls, value): @@ -53,11 +67,22 @@ def release_grades_validate_enum(cls, value): raise ValueError("must be one of enum values ('auto', 'manual')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -66,8 +91,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -83,8 +107,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -95,10 +121,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if nb_playback_authorized (nullable) is None # and model_fields_set contains the field if self.nb_playback_authorized is None and "nb_playback_authorized" in self.model_fields_set: @@ -139,15 +170,31 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "title": obj.get("title"), "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), "toolset": obj.get("toolset"), "coverFile": obj.get("coverFile"), "cover": obj.get("cover"), "maxPoints": obj.get("maxPoints"), "releaseGrades": obj.get("releaseGrades"), - "shuffleExercises": obj.get("shuffleExercises") + "shuffleExercises": obj.get("shuffleExercises"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_assignment.py b/flat_api/models/class_assignment.py index d9b907c..dba9b60 100644 --- a/flat_api/models/class_assignment.py +++ b/flat_api/models/class_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,19 +19,22 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities +from flat_api.models.assignment_capabilities import AssignmentCapabilities +from flat_api.models.assignment_group import AssignmentGroup from flat_api.models.assignment_submission import AssignmentSubmission +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_type import AssignmentType -from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas -from flat_api.models.class_assignment_lti import ClassAssignmentLti -from flat_api.models.class_assignment_mfc import ClassAssignmentMfc +from flat_api.models.class_assignment_all_of_canvas import ClassAssignmentAllOfCanvas +from flat_api.models.class_assignment_all_of_lti import ClassAssignmentAllOfLti +from flat_api.models.class_assignment_all_of_mfc import ClassAssignmentAllOfMfc from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework from flat_api.models.media_attachment import MediaAttachment from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassAssignment(BaseModel): """ @@ -39,34 +42,47 @@ class ClassAssignment(BaseModel): """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the assignment") type: AssignmentType - capabilities: AssignmentCopyResponseCapabilities + capabilities: AssignmentCapabilities title: StrictStr = Field(description="Title of the assignment") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") + description: Optional[StrictStr] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[StrictStr] = Field(default=None, description="HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="descriptionHtml") + teacher_instructions: Optional[StrictStr] = Field(default=None, description="Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If `teacherInstructionsHtml` is provided, this field will contain the plain text version for compatibility. ", alias="teacherInstructions") + teacher_instructions_html: Optional[StrictStr] = Field(default=None, description="HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs. ", alias="teacherInstructionsHtml") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") - attachments: List[MediaAttachment] + attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the creator of this assignment ") - state: Optional[StrictStr] = Field(default=None, description="State of the assignment") + state: StrictStr = Field(description="State of the assignment") classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the class where this assignment was posted") - creation_date: Optional[datetime] = Field(default=None, description="The creation date of this assignment", alias="creationDate") + creation_date: datetime = Field(description="The creation date of this assignment", alias="creationDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. ", alias="dueDate") assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") - submissions: Optional[List[AssignmentSubmission]] = None + assigned_groups: Optional[List[AssignmentGroup]] = Field(default=None, description="Groups that have access to the assignment (for shared writing assignments)", alias="assignedGroups") + submissions: List[AssignmentSubmission] google_classroom: Optional[GoogleClassroomCoursework] = Field(default=None, alias="googleClassroom") microsoft_graph: Optional[MicrosoftGraphAssignment] = Field(default=None, alias="microsoftGraph") - mfc: Optional[ClassAssignmentMfc] = None - canvas: Optional[ClassAssignmentCanvas] = None - lti: Optional[ClassAssignmentLti] = None + mfc: Optional[ClassAssignmentAllOfMfc] = None + canvas: Optional[ClassAssignmentAllOfCanvas] = None + lti: Optional[ClassAssignmentAllOfLti] = None issue: Optional[StrictStr] = Field(default=None, description="Detected issue for this assignment") - __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "creator", "state", "classroom", "creationDate", "scheduledDate", "dueDate", "assigneeMode", "assignedStudents", "assignedGroups", "submissions", "googleClassroom", "microsoftGraph", "mfc", "canvas", "lti", "issue"] @field_validator('release_grades') def release_grades_validate_enum(cls, value): @@ -78,12 +94,19 @@ def release_grades_validate_enum(cls, value): raise ValueError("must be one of enum values ('auto', 'manual')") return value - @field_validator('state') - def state_validate_enum(cls, value): + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" if value not in set(['draft', 'active', 'archived']): raise ValueError("must be one of enum values ('draft', 'active', 'archived')") return value @@ -98,11 +121,12 @@ def assignee_mode_validate_enum(cls, value): raise ValueError("must be one of enum values ('everyone', 'selected')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -111,8 +135,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -128,8 +151,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -143,16 +168,23 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in assigned_groups (list) + _items = [] + if self.assigned_groups: + for _item_assigned_groups in self.assigned_groups: + if _item_assigned_groups: + _items.append(_item_assigned_groups.to_dict()) + _dict['assignedGroups'] = _items # override the default output from pydantic by calling `to_dict()` of each item in submissions (list) _items = [] if self.submissions: - for _item in self.submissions: - if _item: - _items.append(_item.to_dict()) + for _item_submissions in self.submissions: + if _item_submissions: + _items.append(_item_submissions.to_dict()) _dict['submissions'] = _items # override the default output from pydantic by calling `to_dict()` of google_classroom if self.google_classroom: @@ -169,6 +201,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of lti if self.lti: _dict['lti'] = self.lti.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -183,9 +220,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "capabilities": AssignmentCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, "title": obj.get("title"), "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), "cover": obj.get("cover"), "coverFile": obj.get("coverFile"), "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, @@ -195,6 +235,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "shuffleExercises": obj.get("shuffleExercises"), "toolset": obj.get("toolset"), "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), "creator": obj.get("creator"), "state": obj.get("state"), "classroom": obj.get("classroom"), @@ -203,14 +251,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dueDate": obj.get("dueDate"), "assigneeMode": obj.get("assigneeMode"), "assignedStudents": obj.get("assignedStudents"), + "assignedGroups": [AssignmentGroup.from_dict(_item) for _item in obj["assignedGroups"]] if obj.get("assignedGroups") is not None else None, "submissions": [AssignmentSubmission.from_dict(_item) for _item in obj["submissions"]] if obj.get("submissions") is not None else None, "googleClassroom": GoogleClassroomCoursework.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, "microsoftGraph": MicrosoftGraphAssignment.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, - "mfc": ClassAssignmentMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, - "canvas": ClassAssignmentCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, - "lti": ClassAssignmentLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, + "mfc": ClassAssignmentAllOfMfc.from_dict(obj["mfc"]) if obj.get("mfc") is not None else None, + "canvas": ClassAssignmentAllOfCanvas.from_dict(obj["canvas"]) if obj.get("canvas") is not None else None, + "lti": ClassAssignmentAllOfLti.from_dict(obj["lti"]) if obj.get("lti") is not None else None, "issue": obj.get("issue") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_assignment_all_of_canvas.py b/flat_api/models/class_assignment_all_of_canvas.py new file mode 100644 index 0000000..b2a3149 --- /dev/null +++ b/flat_api/models/class_assignment_all_of_canvas.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfCanvas(BaseModel): + """ + A Canvas LMS assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfCanvas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfCanvas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/class_assignment_all_of_lti.py b/flat_api/models/class_assignment_all_of_lti.py new file mode 100644 index 0000000..3b0a866 --- /dev/null +++ b/flat_api/models/class_assignment_all_of_lti.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfLti(BaseModel): + """ + An LTI assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Resource ID in the LMS") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfLti from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfLti from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/class_assignment_all_of_mfc.py b/flat_api/models/class_assignment_all_of_mfc.py new file mode 100644 index 0000000..0a55224 --- /dev/null +++ b/flat_api/models/class_assignment_all_of_mfc.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentAllOfMfc(BaseModel): + """ + A MusicFirst Classroom assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") + alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "alternateLink"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfMfc from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentAllOfMfc from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "alternateLink": obj.get("alternateLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/class_assignment_canvas.py b/flat_api/models/class_assignment_canvas.py deleted file mode 100644 index da11b9d..0000000 --- a/flat_api/models/class_assignment_canvas.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClassAssignmentCanvas(BaseModel): - """ - A Canvas LMS assignment - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") - alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") - __properties: ClassVar[List[str]] = ["id", "alternateLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClassAssignmentCanvas from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClassAssignmentCanvas from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "alternateLink": obj.get("alternateLink") - }) - return _obj - - diff --git a/flat_api/models/class_assignment_lti.py b/flat_api/models/class_assignment_lti.py deleted file mode 100644 index 663ea57..0000000 --- a/flat_api/models/class_assignment_lti.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClassAssignmentLti(BaseModel): - """ - An LTI assignment - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Resource ID in the LMS") - __properties: ClassVar[List[str]] = ["id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClassAssignmentLti from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClassAssignmentLti from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id") - }) - return _obj - - diff --git a/flat_api/models/class_assignment_mfc.py b/flat_api/models/class_assignment_mfc.py deleted file mode 100644 index 01c831c..0000000 --- a/flat_api/models/class_assignment_mfc.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClassAssignmentMfc(BaseModel): - """ - A MusicFirst Classroom assignment - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") - alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") - __properties: ClassVar[List[str]] = ["id", "alternateLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClassAssignmentMfc from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClassAssignmentMfc from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "alternateLink": obj.get("alternateLink") - }) - return _obj - - diff --git a/flat_api/models/class_assignment_update.py b/flat_api/models/class_assignment_update.py index 73d9412..132962b 100644 --- a/flat_api/models/class_assignment_update.py +++ b/flat_api/models/class_assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,15 +19,17 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated +from flat_api.models.assignment_submission_students_mode import AssignmentSubmissionStudentsMode from flat_api.models.assignment_type import AssignmentType -from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom -from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph +from flat_api.models.class_assignment_update_all_of_google_classroom import ClassAssignmentUpdateAllOfGoogleClassroom +from flat_api.models.class_assignment_update_all_of_microsoft_graph import ClassAssignmentUpdateAllOfMicrosoftGraph from flat_api.models.class_attachment_creation import ClassAttachmentCreation from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassAssignmentUpdate(BaseModel): """ @@ -35,23 +37,36 @@ class ClassAssignmentUpdate(BaseModel): """ # noqa: E501 type: Optional[AssignmentType] = None title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the assignment") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") - attachments: Optional[List[ClassAttachmentCreation]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Student instructions and content of the assignment (plain text)") + description_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of student instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="descriptionHtml") + teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") + teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") + attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") + restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") + recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") + allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") + allow_backing_track: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. ", alias="allowBackingTrack") + allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") + free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") state: Optional[StrictStr] = Field(default=None, description="State of the assignment") due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. ", alias="dueDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") - google_classroom: Optional[ClassAssignmentUpdateGoogleClassroom] = Field(default=None, alias="googleClassroom") - microsoft_graph: Optional[ClassAssignmentUpdateMicrosoftGraph] = Field(default=None, alias="microsoftGraph") + google_classroom: Optional[ClassAssignmentUpdateAllOfGoogleClassroom] = Field(default=None, alias="googleClassroom") + microsoft_graph: Optional[ClassAssignmentUpdateAllOfMicrosoftGraph] = Field(default=None, alias="microsoftGraph") assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") - __properties: ClassVar[List[str]] = ["type", "title", "description", "attachments", "nbPlaybackAuthorized", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents"] + class_group_ids: Optional[List[StrictStr]] = Field(default=None, description="Optional list of specific class group IDs to apply to the assignment. When transitioning to active state with group submission mode: - If provided: Only these specific groups will be applied - If not provided: All class groups will be applied, or randomized groups created if none exist ", alias="classGroupIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "description", "descriptionHtml", "teacherInstructions", "teacherInstructionsHtml", "attachments", "nbPlaybackAuthorized", "restrictPlayNote", "restrictToAudioTracks", "toolset", "coverFile", "cover", "maxPoints", "releaseGrades", "shuffleExercises", "submissionStudentsMode", "recordingType", "allowMetronome", "allowBackingTrack", "allowSpeedChange", "freeRecord", "state", "dueDate", "scheduledDate", "googleClassroom", "microsoftGraph", "assigneeMode", "assignedStudents", "classGroupIds"] @field_validator('release_grades') def release_grades_validate_enum(cls, value): @@ -63,6 +78,16 @@ def release_grades_validate_enum(cls, value): raise ValueError("must be one of enum values ('auto', 'manual')") return value + @field_validator('recording_type') + def recording_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['audio', 'video']): + raise ValueError("must be one of enum values ('audio', 'video')") + return value + @field_validator('state') def state_validate_enum(cls, value): """Validates the enum""" @@ -83,11 +108,12 @@ def assignee_mode_validate_enum(cls, value): raise ValueError("must be one of enum values ('everyone', 'selected')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -96,8 +122,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -113,8 +138,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -125,9 +152,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) _dict['attachments'] = _items # override the default output from pydantic by calling `to_dict()` of google_classroom if self.google_classroom: @@ -135,30 +162,10 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of microsoft_graph if self.microsoft_graph: _dict['microsoftGraph'] = self.microsoft_graph.to_dict() - # set to None if nb_playback_authorized (nullable) is None - # and model_fields_set contains the field - if self.nb_playback_authorized is None and "nb_playback_authorized" in self.model_fields_set: - _dict['nbPlaybackAuthorized'] = None - - # set to None if toolset (nullable) is None - # and model_fields_set contains the field - if self.toolset is None and "toolset" in self.model_fields_set: - _dict['toolset'] = None - - # set to None if cover_file (nullable) is None - # and model_fields_set contains the field - if self.cover_file is None and "cover_file" in self.model_fields_set: - _dict['coverFile'] = None - - # set to None if cover (nullable) is None - # and model_fields_set contains the field - if self.cover is None and "cover" in self.model_fields_set: - _dict['cover'] = None - - # set to None if max_points (nullable) is None - # and model_fields_set contains the field - if self.max_points is None and "max_points" in self.model_fields_set: - _dict['maxPoints'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value # set to None if due_date (nullable) is None # and model_fields_set contains the field @@ -170,6 +177,11 @@ def to_dict(self) -> Dict[str, Any]: if self.scheduled_date is None and "scheduled_date" in self.model_fields_set: _dict['scheduledDate'] = None + # set to None if class_group_ids (nullable) is None + # and model_fields_set contains the field + if self.class_group_ids is None and "class_group_ids" in self.model_fields_set: + _dict['classGroupIds'] = None + return _dict @classmethod @@ -185,22 +197,39 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "title": obj.get("title"), "description": obj.get("description"), + "descriptionHtml": obj.get("descriptionHtml"), + "teacherInstructions": obj.get("teacherInstructions"), + "teacherInstructionsHtml": obj.get("teacherInstructionsHtml"), "attachments": [ClassAttachmentCreation.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized"), + "restrictPlayNote": obj.get("restrictPlayNote"), + "restrictToAudioTracks": obj.get("restrictToAudioTracks"), "toolset": obj.get("toolset"), "coverFile": obj.get("coverFile"), "cover": obj.get("cover"), "maxPoints": obj.get("maxPoints"), "releaseGrades": obj.get("releaseGrades"), "shuffleExercises": obj.get("shuffleExercises"), + "submissionStudentsMode": obj.get("submissionStudentsMode"), + "recordingType": obj.get("recordingType"), + "allowMetronome": obj.get("allowMetronome"), + "allowBackingTrack": obj.get("allowBackingTrack"), + "allowSpeedChange": obj.get("allowSpeedChange"), + "freeRecord": obj.get("freeRecord"), "state": obj.get("state"), "dueDate": obj.get("dueDate"), "scheduledDate": obj.get("scheduledDate"), - "googleClassroom": ClassAssignmentUpdateGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, - "microsoftGraph": ClassAssignmentUpdateMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, + "googleClassroom": ClassAssignmentUpdateAllOfGoogleClassroom.from_dict(obj["googleClassroom"]) if obj.get("googleClassroom") is not None else None, + "microsoftGraph": ClassAssignmentUpdateAllOfMicrosoftGraph.from_dict(obj["microsoftGraph"]) if obj.get("microsoftGraph") is not None else None, "assigneeMode": obj.get("assigneeMode"), - "assignedStudents": obj.get("assignedStudents") + "assignedStudents": obj.get("assignedStudents"), + "classGroupIds": obj.get("classGroupIds") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_assignment_update_all_of_google_classroom.py b/flat_api/models/class_assignment_update_all_of_google_classroom.py new file mode 100644 index 0000000..b203ce2 --- /dev/null +++ b/flat_api/models/class_assignment_update_all_of_google_classroom.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentUpdateAllOfGoogleClassroom(BaseModel): + """ + Google Classroom options for this assignment + """ # noqa: E501 + topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["topicId"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if topic_id (nullable) is None + # and model_fields_set contains the field + if self.topic_id is None and "topic_id" in self.model_fields_set: + _dict['topicId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfGoogleClassroom from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "topicId": obj.get("topicId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/class_assignment_update_all_of_microsoft_graph.py b/flat_api/models/class_assignment_update_all_of_microsoft_graph.py new file mode 100644 index 0000000..de42c4b --- /dev/null +++ b/flat_api/models/class_assignment_update_all_of_microsoft_graph.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ClassAssignmentUpdateAllOfMicrosoftGraph(BaseModel): + """ + Microsoft Graph options for this assignment + """ # noqa: E501 + categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories this assignment belongs to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["categories"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if categories (nullable) is None + # and model_fields_set contains the field + if self.categories is None and "categories" in self.model_fields_set: + _dict['categories'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClassAssignmentUpdateAllOfMicrosoftGraph from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "categories": obj.get("categories") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/class_assignment_update_google_classroom.py b/flat_api/models/class_assignment_update_google_classroom.py deleted file mode 100644 index e100a4e..0000000 --- a/flat_api/models/class_assignment_update_google_classroom.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClassAssignmentUpdateGoogleClassroom(BaseModel): - """ - Google Classroom options for this assignment - """ # noqa: E501 - topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") - __properties: ClassVar[List[str]] = ["topicId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClassAssignmentUpdateGoogleClassroom from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if topic_id (nullable) is None - # and model_fields_set contains the field - if self.topic_id is None and "topic_id" in self.model_fields_set: - _dict['topicId'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClassAssignmentUpdateGoogleClassroom from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "topicId": obj.get("topicId") - }) - return _obj - - diff --git a/flat_api/models/class_assignment_update_microsoft_graph.py b/flat_api/models/class_assignment_update_microsoft_graph.py deleted file mode 100644 index 3c1efc4..0000000 --- a/flat_api/models/class_assignment_update_microsoft_graph.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClassAssignmentUpdateMicrosoftGraph(BaseModel): - """ - Microsoft Graph options for this assignment - """ # noqa: E501 - categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories this assignment belongs to") - __properties: ClassVar[List[str]] = ["categories"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClassAssignmentUpdateMicrosoftGraph from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if categories (nullable) is None - # and model_fields_set contains the field - if self.categories is None and "categories" in self.model_fields_set: - _dict['categories'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClassAssignmentUpdateMicrosoftGraph from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "categories": obj.get("categories") - }) - return _obj - - diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index 48de75e..200cfc2 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassAttachmentCreation(BaseModel): """ @@ -31,11 +32,15 @@ class ClassAttachmentCreation(BaseModel): type: Optional[StrictStr] = Field(default=None, description="The type of the attachment posted: * `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. ") score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. ") worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") - sharing_mode: Optional[MediaScoreSharingMode] = Field(default=None, alias="sharingMode") + revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") url: Optional[StrictStr] = Field(default=None, description="The URL of the attachment.") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") - __properties: ClassVar[List[str]] = ["type", "score", "worksheet", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId"] + teacher_only: Optional[StrictBool] = Field(default=False, description="Flag indicating if this attachment should only be visible to teachers", alias="teacherOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "score", "worksheet", "revision", "partUuid", "sharingMode", "lockScoreTemplate", "url", "googleDriveFileId", "teacherOnly"] @field_validator('type') def type_validate_enum(cls, value): @@ -43,15 +48,16 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance']): - raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance')") + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +66,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +82,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +93,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -101,11 +113,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "score": obj.get("score"), "worksheet": obj.get("worksheet"), - "sharingMode": obj.get("sharingMode"), + "revision": obj.get("revision"), + "partUuid": obj.get("partUuid"), + "sharingMode": obj.get("sharingMode") if obj.get("sharingMode") is not None else MediaScoreSharingMode.READ, "lockScoreTemplate": obj.get("lockScoreTemplate"), "url": obj.get("url"), - "googleDriveFileId": obj.get("googleDriveFileId") + "googleDriveFileId": obj.get("googleDriveFileId"), + "teacherOnly": obj.get("teacherOnly") if obj.get("teacherOnly") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index 289e7d0..97fa899 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from flat_api.models.class_grade_level import ClassGradeLevel from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassCreation(BaseModel): """ @@ -34,6 +35,7 @@ class ClassCreation(BaseModel): level: Optional[ClassGradeLevel] = None skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] @field_validator('skills_focused') @@ -47,11 +49,12 @@ def skills_focused_validate_enum(cls, value): raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: @@ -109,6 +118,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skillsFocused": obj.get("skillsFocused"), "size": obj.get("size") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 1535638..1f738be 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from flat_api.models.class_details_canvas import ClassDetailsCanvas from flat_api.models.class_details_clever import ClassDetailsClever @@ -34,19 +34,21 @@ from flat_api.models.group_details import GroupDetails from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetails(BaseModel): """ A classroom """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the class") - state: Optional[ClassState] = None - name: Optional[StrictStr] = Field(default=None, description="The name of the class") + state: ClassState + name: StrictStr = Field(description="The name of the class") section: Optional[StrictStr] = Field(default=None, description="The section of the class") description: Optional[StrictStr] = Field(default=None, description="An optionnal description for this class") organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning this class") owner: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User owning this class") - creation_date: Optional[datetime] = Field(default=None, description="The date when the class was create", alias="creationDate") + creation_date: datetime = Field(description="The date when the class was create", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date when the class was last modified", alias="modificationDate") enrollment_code: Optional[StrictStr] = Field(default=None, description="[Teachers only] The enrollment code that can be used by the students to join the class ", alias="enrollmentCode") theme: Optional[StrictStr] = Field(default=None, description="The theme identifier using in Flat User Interface") assignments_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of assignments created in the class", alias="assignmentsCount") @@ -63,7 +65,8 @@ class ClassDetails(BaseModel): level: Optional[ClassGradeLevel] = None skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of students in the classroom") - __properties: ClassVar[List[str]] = ["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "name", "section", "description", "organization", "owner", "creationDate", "modificationDate", "enrollmentCode", "theme", "assignmentsCount", "studentsGroup", "teachersGroup", "issues", "googleClassroom", "googleDrive", "microsoftGraph", "lti", "canvas", "mfc", "clever", "level", "skillsFocused", "size"] @field_validator('skills_focused') def skills_focused_validate_enum(cls, value): @@ -76,11 +79,12 @@ def skills_focused_validate_enum(cls, value): raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -89,8 +93,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -106,8 +109,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -145,6 +150,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of clever if self.clever: _dict['clever'] = self.clever.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: @@ -170,6 +180,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "organization": obj.get("organization"), "owner": obj.get("owner"), "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), "enrollmentCode": obj.get("enrollmentCode"), "theme": obj.get("theme"), "assignmentsCount": obj.get("assignmentsCount"), @@ -187,6 +198,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skillsFocused": obj.get("skillsFocused"), "size": obj.get("size") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index cd467e7..cbf2502 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsCanvas(BaseModel): """ @@ -29,13 +30,15 @@ class ClassDetailsCanvas(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas") domain: Optional[StrictStr] = Field(default=None, description="Canvas instance domain (e.g. \"canvas.instructure.com\")") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "domain"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "domain": obj.get("domain") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index c6a3e5e..8b3e893 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,11 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsClever(BaseModel): """ @@ -35,6 +36,7 @@ class ClassDetailsClever(BaseModel): term_name: Optional[StrictStr] = Field(default=None, description="Name of the term when this course happens", alias="termName") term_start_date: Optional[datetime] = Field(default=None, description="Beginning date of the term", alias="termStartDate") term_end_date: Optional[datetime] = Field(default=None, description="End date of the term", alias="termEndDate") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "creationDate", "modificationDate", "subject", "termName", "termStartDate", "termEndDate"] @field_validator('subject') @@ -47,11 +49,12 @@ def subject_validate_enum(cls, value): raise ValueError("must be one of enum values ('english/language arts', 'math', 'science', 'social studies', 'language', 'homeroom/advisory', 'interventions/online learning', 'technology and engineering', 'PE and health', 'arts and music', 'other')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -106,6 +115,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "termStartDate": obj.get("termStartDate"), "termEndDate": obj.get("termEndDate") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index 2a94e79..82a3bd1 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsGoogleClassroom(BaseModel): """ @@ -29,13 +30,15 @@ class ClassDetailsGoogleClassroom(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The course identifier on Google Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this course in the Classroom web UI", alias="alternateLink") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "alternateLink": obj.get("alternateLink") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index 1386bbd..d6b9c49 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsGoogleDrive(BaseModel): """ @@ -29,13 +30,15 @@ class ClassDetailsGoogleDrive(BaseModel): """ # noqa: E501 teacher_folder_id: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive directory identifier of the teachers' folder ", alias="teacherFolderId") teacher_folder_alternate_link: Optional[StrictStr] = Field(default=None, description="[Teachers only] The Drive URL of the teachers' folder ", alias="teacherFolderAlternateLink") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["teacherFolderId", "teacherFolderAlternateLink"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "teacherFolderId": obj.get("teacherFolderId"), "teacherFolderAlternateLink": obj.get("teacherFolderAlternateLink") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py index 62695e1..898f985 100644 --- a/flat_api/models/class_details_issues.py +++ b/flat_api/models/class_details_issues.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,24 +18,27 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsIssues(BaseModel): """ Detected issues for this class """ # noqa: E501 sync: Optional[List[ClassDetailsIssuesSyncInner]] = Field(default=None, description="Synchronization issues for the class") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["sync"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,10 +77,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in sync (list) _items = [] if self.sync: - for _item in self.sync: - if _item: - _items.append(_item.to_dict()) + for _item_sync in self.sync: + if _item_sync: + _items.append(_item_sync.to_dict()) _dict['sync'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "sync": [ClassDetailsIssuesSyncInner.from_dict(_item) for _item in obj["sync"]] if obj.get("sync") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_issues_sync_inner.py b/flat_api/models/class_details_issues_sync_inner.py index 0c4d926..42c8098 100644 --- a/flat_api/models/class_details_issues_sync_inner.py +++ b/flat_api/models/class_details_issues_sync_inner.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsIssuesSyncInner(BaseModel): """ @@ -30,6 +31,7 @@ class ClassDetailsIssuesSyncInner(BaseModel): id: Optional[StrictStr] = Field(default=None, description="The account user identifier") email: Optional[StrictStr] = Field(default=None, description="The email address of the user concerned by this sync issue") reason: Optional[StrictStr] = Field(default=None, description="The reason why the account cannot be synced") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "email", "reason"] @field_validator('reason') @@ -38,15 +40,16 @@ def reason_validate_enum(cls, value): if value is None: return value - if value not in set(['otherOrgnanization', 'personalSubscription']): - raise ValueError("must be one of enum values ('otherOrgnanization', 'personalSubscription')") + if value not in set(['otherOrgnanization', 'productMigration', 'disabledAccount']): + raise ValueError("must be one of enum values ('otherOrgnanization', 'productMigration', 'disabledAccount')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,8 +58,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -72,8 +74,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -97,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "email": obj.get("email"), "reason": obj.get("reason") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index 1c8c5d8..e53098e 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsLti(BaseModel): """ - Meta information provided by the LTI consumer + Info about LTI context (1.1 and 1.3) """ # noqa: E501 context_id: Optional[StrictStr] = Field(default=None, description="Unique context identifier provided", alias="contextId") context_title: Optional[StrictStr] = Field(default=None, description="Context title", alias="contextTitle") context_label: Optional[StrictStr] = Field(default=None, description="Context label", alias="contextLabel") - __properties: ClassVar[List[str]] = ["contextId", "contextTitle", "contextLabel"] + has_nrps_service: Optional[StrictBool] = Field(default=None, description="If true, the class has been synchronized with the LTI 1.3 NRPS 2.0 service", alias="hasNrpsService") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["contextId", "contextTitle", "contextLabel", "hasNrpsService"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "contextId": obj.get("contextId"), "contextTitle": obj.get("contextTitle"), - "contextLabel": obj.get("contextLabel") + "contextLabel": obj.get("contextLabel"), + "hasNrpsService": obj.get("hasNrpsService") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py index fd3b72b..f21f807 100644 --- a/flat_api/models/class_details_mfc.py +++ b/flat_api/models/class_details_mfc.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsMfc(BaseModel): """ @@ -29,13 +30,15 @@ class ClassDetailsMfc(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom class", alias="alternateLink") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "alternateLink": obj.get("alternateLink") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py index be2ffb0..edd2e3c 100644 --- a/flat_api/models/class_details_microsoft_graph.py +++ b/flat_api/models/class_details_microsoft_graph.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassDetailsMicrosoftGraph(BaseModel): """ ClassDetailsMicrosoftGraph """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The course identifier on Microsoft Graph") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/class_grade_level.py b/flat_api/models/class_grade_level.py index a16aeb3..112409e 100644 --- a/flat_api/models/class_grade_level.py +++ b/flat_api/models/class_grade_level.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index e4ce1c5..b1c6f03 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 3deb1c3..51d66f3 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,6 +30,7 @@ class ClassState(str, Enum): ACTIVE = 'active' INACTIVE = 'inactive' ARCHIVED = 'archived' + DELETED = 'deleted' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index cd9074e..96984d2 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from flat_api.models.class_grade_level import ClassGradeLevel from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ClassUpdate(BaseModel): """ @@ -34,6 +35,7 @@ class ClassUpdate(BaseModel): level: Optional[ClassGradeLevel] = None skills_focused: Optional[List[StrictStr]] = Field(default=None, description="Specific skills that will be focused in classroom", alias="skillsFocused") size: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Number of students in the classroom") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "section", "level", "skillsFocused", "size"] @field_validator('skills_focused') @@ -47,11 +49,12 @@ def skills_focused_validate_enum(cls, value): raise ValueError("each list item must be one of ('notation', 'sight-reading', 'performance-instrumental', 'ear-training', 'music-theory', 'composition', 'jazz-ensemble', 'music-technology', 'other')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if size (nullable) is None # and model_fields_set contains the field if self.size is None and "size" in self.model_fields_set: @@ -109,6 +118,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skillsFocused": obj.get("skillsFocused"), "size": obj.get("size") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index 4b0b8bf..7d8e6c1 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,11 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.collection_app import CollectionApp from flat_api.models.collection_capabilities import CollectionCapabilities +from flat_api.models.collection_contents import CollectionContents from flat_api.models.collection_privacy import CollectionPrivacy from flat_api.models.collection_type import CollectionType from flat_api.models.resource_collaborator import ResourceCollaborator @@ -30,32 +31,39 @@ from flat_api.models.user_public_summary import UserPublicSummary from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class Collection(BaseModel): """ Collection of scores """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the collection") - title: Optional[StrictStr] = Field(default=None, description="The title of the collection") - html_url: Optional[StrictStr] = Field(default=None, description="The url where the collection can be viewed in a web browser", alias="htmlUrl") - type: Optional[CollectionType] = None - privacy: Optional[CollectionPrivacy] = None + id: StrictStr = Field(description="Unique identifier of the collection") + title: StrictStr = Field(description="The title of the collection") + html_url: StrictStr = Field(description="The url where the collection can be viewed in a web browser", alias="htmlUrl") + type: CollectionType + label_key: Optional[StrictStr] = Field(default=None, description="Product-specific translation key for the collection type. Only set for specific collection types: * For `regular` type: `playlist` (Flat) or `collection` (Flat for Education) * For `collaborations` type: `collaboration` (Flat) or `shared-scores` (Flat for Education) Not set for other collection types. ", alias="labelKey") + privacy: CollectionPrivacy sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") app: Optional[CollectionApp] = None - creation_date: Optional[datetime] = Field(default=None, description="The date when the collection was created", alias="creationDate") + creation_date: datetime = Field(description="The date when the collection was created", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="The date when the collection was last modified", alias="modificationDate") user: Optional[UserPublicSummary] = None organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. ") rights: Optional[ResourceRights] = None collaborators: Optional[List[ResourceCollaborator]] = Field(default=None, description="The list of the collaborators of the collection") + is_pinned: Optional[StrictBool] = Field(default=None, description="Whether the collection is pinned by the owner", alias="isPinned") + contents: CollectionContents capabilities: CollectionCapabilities collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") - __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "privacy", "sharingKey", "app", "creationDate", "user", "organization", "rights", "collaborators", "capabilities", "collections"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "labelKey", "privacy", "sharingKey", "app", "creationDate", "modificationDate", "user", "organization", "rights", "collaborators", "isPinned", "contents", "capabilities", "collections"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -64,8 +72,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -81,8 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -102,13 +111,21 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) _items = [] if self.collaborators: - for _item in self.collaborators: - if _item: - _items.append(_item.to_dict()) + for _item_collaborators in self.collaborators: + if _item_collaborators: + _items.append(_item_collaborators.to_dict()) _dict['collaborators'] = _items + # override the default output from pydantic by calling `to_dict()` of contents + if self.contents: + _dict['contents'] = self.contents.to_dict() # override the default output from pydantic by calling `to_dict()` of capabilities if self.capabilities: _dict['capabilities'] = self.capabilities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -125,17 +142,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "title": obj.get("title"), "htmlUrl": obj.get("htmlUrl"), "type": obj.get("type"), - "privacy": obj.get("privacy"), + "labelKey": obj.get("labelKey"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE, "sharingKey": obj.get("sharingKey"), "app": CollectionApp.from_dict(obj["app"]) if obj.get("app") is not None else None, "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate"), "user": UserPublicSummary.from_dict(obj["user"]) if obj.get("user") is not None else None, "organization": obj.get("organization"), "rights": ResourceRights.from_dict(obj["rights"]) if obj.get("rights") is not None else None, "collaborators": [ResourceCollaborator.from_dict(_item) for _item in obj["collaborators"]] if obj.get("collaborators") is not None else None, + "isPinned": obj.get("isPinned"), + "contents": CollectionContents.from_dict(obj["contents"]) if obj.get("contents") is not None else None, "capabilities": CollectionCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, "collections": obj.get("collections") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py index 0a63a77..c057ae5 100644 --- a/flat_api/models/collection_app.py +++ b/flat_api/models/collection_app.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class CollectionApp(BaseModel): """ @@ -30,13 +31,15 @@ class CollectionApp(BaseModel): id: Optional[StrictStr] = Field(default=None, description="The app unique identifier") name: Optional[StrictStr] = Field(default=None, description="The name of the app") logo: Optional[StrictStr] = Field(default=None, description="The app logo url") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "logo"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +48,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "logo": obj.get("logo") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 0b4ab07..1d9a09e 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class CollectionCapabilities(BaseModel): """ @@ -32,13 +33,15 @@ class CollectionCapabilities(BaseModel): can_delete: StrictBool = Field(description="Whether the current user can delete the collection ", alias="canDelete") can_add_scores: StrictBool = Field(description="Whether the current user can add scores to the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score. ", alias="canAddScores") can_delete_scores: StrictBool = Field(description="Whether the current user can delete scores from the collection If this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score. ", alias="canDeleteScores") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["canEdit", "canShare", "canDelete", "canAddScores", "canDeleteScores"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,8 +50,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "canAddScores": obj.get("canAddScores"), "canDeleteScores": obj.get("canDeleteScores") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection_contents.py b/flat_api/models/collection_contents.py new file mode 100644 index 0000000..9d8933b --- /dev/null +++ b/flat_api/models/collection_contents.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CollectionContents(BaseModel): + """ + The contents of the collection + """ # noqa: E501 + scores_count: StrictInt = Field(description="The number of scores in the collection", alias="scoresCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scoresCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CollectionContents from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CollectionContents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scoresCount": obj.get("scoresCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index 8e26784..52b8c9e 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.collection_privacy import CollectionPrivacy from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class CollectionCreation(BaseModel): """ CollectionCreation """ # noqa: E501 - title: Annotated[str, Field(min_length=1, strict=True, max_length=300)] = Field(description="The title of the collection") - privacy: CollectionPrivacy + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field(default=None, description="The title of the collection") + privacy: Optional[CollectionPrivacy] = CollectionPrivacy.PRIVATE + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), - "privacy": obj.get("privacy") + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index 7efb8b2..c1ef082 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.collection_privacy import CollectionPrivacy from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class CollectionModification(BaseModel): """ Edit the collection metadata """ # noqa: E501 title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = Field(default=None, description="The title of the collection") - privacy: Optional[CollectionPrivacy] = None + privacy: Optional[CollectionPrivacy] = CollectionPrivacy.PRIVATE + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), - "privacy": obj.get("privacy") + "privacy": obj.get("privacy") if obj.get("privacy") is not None else CollectionPrivacy.PRIVATE }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index aaab6c0..46d5eca 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class CollectionPrivacy(str, Enum): """ - The collection main privacy mode. - `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users. + The collection main privacy mode. - `private`: The collection is private and can only be accessed, modified, and administered by specified collaborators. """ """ diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index 9ac98b5..7a49bda 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class CollectionType(str, Enum): """ - Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. + Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores """ """ @@ -29,10 +29,11 @@ class CollectionType(str, Enum): """ ROOT = 'root' REGULAR = 'regular' - SHAREDWITHME = 'sharedWithMe' - SHAREDWITHGROUP = 'sharedWithGroup' APP = 'app' TRASH = 'trash' + ALLSCORES = 'allScores' + COLLABORATIONS = 'collaborations' + LIKES = 'likes' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/create_lti_configuration200_response.py b/flat_api/models/create_lti_configuration200_response.py new file mode 100644 index 0000000..5511256 --- /dev/null +++ b/flat_api/models/create_lti_configuration200_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration import LtiConfiguration +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateLtiConfiguration200Response(LtiConfiguration): + """ + CreateLtiConfiguration200Response + """ # noqa: E501 + registration_url: Optional[StrictStr] = Field(default=None, description="One-time registration URL (only for dynamic registration)", alias="registrationUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateLtiConfiguration200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if last_used_date (nullable) is None + # and model_fields_set contains the field + if self.last_used_date is None and "last_used_date" in self.model_fields_set: + _dict['lastUsedDate'] = None + + # set to None if registration_completion_date (nullable) is None + # and model_fields_set contains the field + if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: + _dict['registrationCompletionDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateLtiConfiguration200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret"), + "lms": obj.get("lms"), + "name": obj.get("name"), + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "parentId": obj.get("parentId"), + "deploymentKey": obj.get("deploymentKey"), + "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId"), + "registrationToken": obj.get("registrationToken"), + "registrationUrl": obj.get("registrationUrl"), + "registrationTokenUsed": obj.get("registrationTokenUsed"), + "registrationCompletionDate": obj.get("registrationCompletionDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/credit_transaction.py b/flat_api/models/credit_transaction.py new file mode 100644 index 0000000..e4ebbaf --- /dev/null +++ b/flat_api/models/credit_transaction.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreditTransaction(BaseModel): + """ + A single credit ledger entry + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the credit transaction") + type: StrictStr = Field(description="Credit category. `ai` covers every AI-powered feature.") + feature: Optional[StrictStr] = Field(default=None, description="Which product the credits relate to. Set on deductions and on the credits a refund returns, absent on credit-pack top-ups, which are not tied to a single feature. ") + amount: StrictInt = Field(description="How many credits this entry moved, signed: positive for top-ups (`+30` from a credit pack), negative for deductions (`-2` for a two-page import). Sum only entries whose `state` is `active`. ") + source: StrictStr = Field(description="Which pool the credits came from: * `subscription`: the plan's periodic allowance * `purchase`: credits bought as a pack, which do not expire with the billing period * `free_tier`: promotional grants * `support`: a manual adjustment made by Flat's support team A single import can produce two entries when it spans two pools: the plan allowance is drawn down first, and the remainder comes from `purchase`. ") + state: StrictStr = Field(description="Whether the entry still counts: * `active`: in effect * `canceled`: reversed, and no longer affecting the balance. Deductions are canceled when the import they paid for fails or is refunded. ") + job: Optional[StrictStr] = Field(default=None, description="Identifier of the import this entry belongs to, when it relates to one. Present on an import's deduction, on its reversal, and on credits returned when an import is refunded. Absent on credit-pack top-ups and manual adjustments. ") + creation_date: datetime = Field(description="When the transaction was created", alias="creationDate") + modification_date: datetime = Field(description="When the transaction was last modified", alias="modificationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "feature", "amount", "source", "state", "job", "creationDate", "modificationDate"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ai']): + raise ValueError("must be one of enum values ('ai')") + return value + + @field_validator('feature') + def feature_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['omr']): + raise ValueError("must be one of enum values ('omr')") + return value + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['subscription', 'purchase', 'free_tier', 'support']): + raise ValueError("must be one of enum values ('subscription', 'purchase', 'free_tier', 'support')") + return value + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'canceled']): + raise ValueError("must be one of enum values ('active', 'canceled')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreditTransaction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreditTransaction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "feature": obj.get("feature"), + "amount": obj.get("amount"), + "source": obj.get("source"), + "state": obj.get("state"), + "job": obj.get("job"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/edu_library.py b/flat_api/models/edu_library.py index ef788b8..610e62b 100644 --- a/flat_api/models/edu_library.py +++ b/flat_api/models/edu_library.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,46 +18,43 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduLibrary(BaseModel): """ A Flat for Education Library """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") - name: Optional[StrictStr] = Field(default=None, description="Name of the lirbary") - type: Optional[StrictStr] = Field(default=None, description="Type of the library") - visibility: Optional[StrictStr] = Field(default=None, description="Visibility of the library") + id: StrictStr = Field(description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") + name: StrictStr = Field(description="Name of the lirbary") + type: StrictStr = Field(description="Type of the library") + visibility: StrictStr = Field(description="Visibility of the library") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "type", "visibility"] @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - - if value not in set(['myResources', 'organizationResources', 'flatEduSamples']): - raise ValueError("must be one of enum values ('myResources', 'organizationResources', 'flatEduSamples')") + if value not in set(['myResources', 'organizationResources', 'flatEduContent']): + raise ValueError("must be one of enum values ('myResources', 'organizationResources', 'flatEduContent')") return value @field_validator('visibility') def visibility_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - if value not in set(['private', 'organization', 'public']): raise ValueError("must be one of enum values ('private', 'organization', 'public')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -66,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -83,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -92,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -109,6 +112,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "visibility": obj.get("visibility") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource.py b/flat_api/models/edu_resource.py index 12f284c..0107548 100644 --- a/flat_api/models/edu_resource.py +++ b/flat_api/models/edu_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,14 +19,17 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.edu_resource_capabilities import EduResourceCapabilities from flat_api.models.edu_resource_privacy import EduResourcePrivacy from flat_api.models.edu_resource_resource import EduResourceResource from flat_api.models.edu_resource_type import EduResourceType +from flat_api.models.grade import Grade +from flat_api.models.teaching_theme import TeachingTheme from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResource(BaseModel): """ @@ -35,21 +38,27 @@ class EduResource(BaseModel): id: StrictStr = Field(description="Resource unique identifier") creator: Optional[StrictStr] = Field(default=None, description="The User identifier of the resource creator") type: EduResourceType - privacy: Optional[EduResourcePrivacy] = None + privacy: Optional[EduResourcePrivacy] = EduResourcePrivacy.PRIVATE tags: Optional[List[StrictStr]] = Field(default=None, description="Specific attributes for the resource (e.g. sample resources with custom design)") parent: Optional[StrictStr] = Field(default=None, description="Identifier of the parent resource, e.g. a folder or root") title: StrictStr = Field(description="Title of the resource") + sharing_description: Optional[StrictStr] = Field(default=None, description="Sharing description of this resource", alias="sharingDescription") + sharing_description_html: Optional[StrictStr] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") creation_date: Optional[datetime] = Field(default=None, description="The date when the resource was created", alias="creationDate") update_date: Optional[datetime] = Field(default=None, description="The date when the resource was updated", alias="updateDate") resource: Optional[EduResourceResource] = None capabilities: EduResourceCapabilities - __properties: ClassVar[List[str]] = ["id", "creator", "type", "privacy", "tags", "parent", "title", "creationDate", "updateDate", "resource", "capabilities"] + subjects: Optional[List[TeachingTheme]] = Field(default=None, description="The subjects of this resource, or the subjects of the resources included in the folder") + grades: Optional[List[Grade]] = Field(default=None, description="The grades of this resource, or the grades of the resources included in the folder.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creator", "type", "privacy", "tags", "parent", "title", "sharingDescription", "sharingDescriptionHtml", "creationDate", "updateDate", "resource", "capabilities", "subjects", "grades"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,8 +67,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -75,8 +83,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -90,6 +100,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of capabilities if self.capabilities: _dict['capabilities'] = self.capabilities.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -105,15 +120,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "creator": obj.get("creator"), "type": obj.get("type"), - "privacy": obj.get("privacy"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else EduResourcePrivacy.PRIVATE, "tags": obj.get("tags"), "parent": obj.get("parent"), "title": obj.get("title"), + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), "creationDate": obj.get("creationDate"), "updateDate": obj.get("updateDate"), "resource": EduResourceResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None, - "capabilities": EduResourceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None + "capabilities": EduResourceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "subjects": obj.get("subjects"), + "grades": obj.get("grades") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_assignment_creation.py b/flat_api/models/edu_resource_assignment_creation.py new file mode 100644 index 0000000..8e88b34 --- /dev/null +++ b/flat_api/models/edu_resource_assignment_creation.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.assignment_type import AssignmentType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceAssignmentCreation(BaseModel): + """ + Assignment-specific creation options. Only applicable when creating a resource with `type: assignment`. If `type` is not provided, defaults to `none`. + """ # noqa: E501 + type: Optional[AssignmentType] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceAssignmentCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceAssignmentCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/edu_resource_capabilities.py b/flat_api/models/edu_resource_capabilities.py index ef71ae3..183bea9 100644 --- a/flat_api/models/edu_resource_capabilities.py +++ b/flat_api/models/edu_resource_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceCapabilities(BaseModel): """ @@ -30,13 +31,16 @@ class EduResourceCapabilities(BaseModel): can_edit: Optional[StrictBool] = Field(default=None, description="Whether the current user can modify this resource ", alias="canEdit") can_add_resources: Optional[StrictBool] = Field(default=None, description="Whether the current user can add resources within this resource (e.g. `assignment` inside a `folder`) ", alias="canAddResources") can_add_folders: Optional[StrictBool] = Field(default=None, description="Whether the current user can add folders within this resource (e.g. `folder` inside `root`) ", alias="canAddFolders") - __properties: ClassVar[List[str]] = ["canEdit", "canAddResources", "canAddFolders"] + can_change_privacy: Optional[StrictBool] = Field(default=None, description="Whether the current user can change the privacy of this resource (e.g. to share as `organizationPublic` or unshare it with `private`) ", alias="canChangePrivacy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["canEdit", "canAddResources", "canAddFolders", "canChangePrivacy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "canEdit": obj.get("canEdit"), "canAddResources": obj.get("canAddResources"), - "canAddFolders": obj.get("canAddFolders") + "canAddFolders": obj.get("canAddFolders"), + "canChangePrivacy": obj.get("canChangePrivacy") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_copy.py b/flat_api/models/edu_resource_copy.py index a131af4..5ef7a15 100644 --- a/flat_api/models/edu_resource_copy.py +++ b/flat_api/models/edu_resource_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceCopy(BaseModel): """ Copy an education resource """ # noqa: E501 destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. ") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "destination": obj.get("destination") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_creation.py b/flat_api/models/edu_resource_creation.py index cc84fb4..28ef934 100644 --- a/flat_api/models/edu_resource_creation.py +++ b/flat_api/models/edu_resource_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from flat_api.models.edu_resource_assignment_creation import EduResourceAssignmentCreation from flat_api.models.edu_resource_type import EduResourceType from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceCreation(BaseModel): """ @@ -32,13 +34,18 @@ class EduResourceCreation(BaseModel): type: EduResourceType title: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="Title of the resource") parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`") - __properties: ClassVar[List[str]] = ["type", "title", "parent"] + sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") + sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") + resource: Optional[EduResourceAssignmentCreation] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "title", "parent", "sharingDescription", "sharingDescriptionHtml", "resource"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,8 +54,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -64,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +81,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,8 +103,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), "title": obj.get("title"), - "parent": obj.get("parent") if obj.get("parent") is not None else 'root' + "parent": obj.get("parent") if obj.get("parent") is not None else 'root', + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), + "resource": EduResourceAssignmentCreation.from_dict(obj["resource"]) if obj.get("resource") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_folder.py b/flat_api/models/edu_resource_folder.py new file mode 100644 index 0000000..cc923ab --- /dev/null +++ b/flat_api/models/edu_resource_folder.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.assignment_type import AssignmentType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EduResourceFolder(BaseModel): + """ + Education resources folder + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the folder") + assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment type of the resources that are included in the folder,", alias="assignmentsTypes") + resources_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of resources inside the folder", alias="resourcesCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "assignmentsTypes", "resourcesCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EduResourceFolder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EduResourceFolder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "assignmentsTypes": obj.get("assignmentsTypes"), + "resourcesCount": obj.get("resourcesCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/edu_resource_lti_link.py b/flat_api/models/edu_resource_lti_link.py index ca0df97..21c2e76 100644 --- a/flat_api/models/edu_resource_lti_link.py +++ b/flat_api/models/edu_resource_lti_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceLtiLink(BaseModel): """ LTI Link details for the class """ # noqa: E501 lti_url: StrictStr = Field(description="An URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ltiUrl"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ltiUrl": obj.get("ltiUrl") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_move.py b/flat_api/models/edu_resource_move.py index 3634928..8212436 100644 --- a/flat_api/models/edu_resource_move.py +++ b/flat_api/models/edu_resource_move.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceMove(BaseModel): """ Move an education resource """ # noqa: E501 destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. ") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "destination": obj.get("destination") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_privacy.py b/flat_api/models/edu_resource_privacy.py index e6a3b96..21354b8 100644 --- a/flat_api/models/edu_resource_privacy.py +++ b/flat_api/models/edu_resource_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_resource.py b/flat_api/models/edu_resource_resource.py index fd02fee..bda27cf 100644 --- a/flat_api/models/edu_resource_resource.py +++ b/flat_api/models/edu_resource_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,124 +14,125 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.models.assignment import Assignment +from flat_api.models.edu_resource_folder import EduResourceFolder +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities -from flat_api.models.assignment_type import AssignmentType -from flat_api.models.media_attachment import MediaAttachment -from typing import Optional, Set -from typing_extensions import Self +EDURESOURCERESOURCE_ONE_OF_SCHEMAS = ["Assignment", "EduResourceFolder"] class EduResourceResource(BaseModel): """ EduResourceResource - """ # noqa: E501 - id: StrictStr = Field(description="Unique identifier of the assignment") - type: AssignmentType - capabilities: AssignmentCopyResponseCapabilities - title: StrictStr = Field(description="Title of the folder") - description: Optional[StrictStr] = Field(default=None, description="Description and content of the assignment") - cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") - cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") - attachments: List[MediaAttachment] - use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") - release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") - toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") - __properties: ClassVar[List[str]] = ["id", "type", "capabilities", "title", "description", "cover", "coverFile", "attachments", "useDedicatedAttachments", "maxPoints", "releaseGrades", "shuffleExercises", "toolset", "nbPlaybackAuthorized"] - - @field_validator('release_grades') - def release_grades_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['auto', 'manual']): - raise ValueError("must be one of enum values ('auto', 'manual')") - return value - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + """ + # data type: Assignment + oneof_schema_1_validator: Optional[Assignment] = None + # data type: EduResourceFolder + oneof_schema_2_validator: Optional[EduResourceFolder] = None + actual_instance: Optional[Union[Assignment, EduResourceFolder]] = None + one_of_schemas: Set[str] = { "Assignment", "EduResourceFolder" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EduResourceResource.model_construct() + error_messages = [] + match = 0 + # validate data type: Assignment + if not isinstance(v, Assignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `Assignment`") + else: + match += 1 + # validate data type: EduResourceFolder + if not isinstance(v, EduResourceFolder): + error_messages.append(f"Error! Input type `{type(v)}` is not `EduResourceFolder`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EduResourceResource from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of capabilities - if self.capabilities: - _dict['capabilities'] = self.capabilities.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) - _items = [] - if self.attachments: - for _item in self.attachments: - if _item: - _items.append(_item.to_dict()) - _dict['attachments'] = _items - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EduResourceResource from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Assignment + try: + instance.actual_instance = Assignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EduResourceFolder + try: + instance.actual_instance = EduResourceFolder.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EduResourceResource with oneOf schemas: Assignment, EduResourceFolder. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Assignment, EduResourceFolder]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "type": obj.get("type"), - "capabilities": AssignmentCopyResponseCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, - "title": obj.get("title"), - "description": obj.get("description"), - "cover": obj.get("cover"), - "coverFile": obj.get("coverFile"), - "attachments": [MediaAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "useDedicatedAttachments": obj.get("useDedicatedAttachments"), - "maxPoints": obj.get("maxPoints"), - "releaseGrades": obj.get("releaseGrades"), - "shuffleExercises": obj.get("shuffleExercises"), - "toolset": obj.get("toolset"), - "nbPlaybackAuthorized": obj.get("nbPlaybackAuthorized") - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/flat_api/models/edu_resource_type.py b/flat_api/models/edu_resource_type.py index ad64940..ca62b58 100644 --- a/flat_api/models/edu_resource_type.py +++ b/flat_api/models/edu_resource_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_update.py b/flat_api/models/edu_resource_update.py index fee1b4d..b509e85 100644 --- a/flat_api/models/edu_resource_update.py +++ b/flat_api/models/edu_resource_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,35 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.edu_resource_privacy import EduResourcePrivacy +from flat_api.models.grade import Grade +from flat_api.models.teaching_theme import TeachingTheme from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceUpdate(BaseModel): """ Update of an education resource """ # noqa: E501 title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Title of the resource") - privacy: Optional[EduResourcePrivacy] = None - __properties: ClassVar[List[str]] = ["title", "privacy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") + sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") + privacy: Optional[EduResourcePrivacy] = EduResourcePrivacy.PRIVATE + subjects: Optional[List[TeachingTheme]] = Field(default=None, description="The subjects of this resource, or the subjects of the resources included in the folder") + grades: Optional[List[Grade]] = Field(default=None, description="The grades of this resource, or the grades of the resources included in the folder.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "sharingDescription", "sharingDescriptionHtml", "privacy", "subjects", "grades"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +55,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), - "privacy": obj.get("privacy") + "sharingDescription": obj.get("sharingDescription"), + "sharingDescriptionHtml": obj.get("sharingDescriptionHtml"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else EduResourcePrivacy.PRIVATE, + "subjects": obj.get("subjects"), + "grades": obj.get("grades") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/edu_resource_use_in_class.py b/flat_api/models/edu_resource_use_in_class.py index dfb5cd1..2a2c70e 100644 --- a/flat_api/models/edu_resource_use_in_class.py +++ b/flat_api/models/edu_resource_use_in_class.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class EduResourceUseInClass(BaseModel): """ @@ -29,13 +30,15 @@ class EduResourceUseInClass(BaseModel): """ # noqa: E501 classroom: StrictStr = Field(description="The destination classroom where the resource will be copied.") assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["classroom", "assignment"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "classroom": obj.get("classroom"), "assignment": obj.get("assignment") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index 9f1ef9c..cd87fc5 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class FlatErrorResponse(BaseModel): """ @@ -31,13 +32,16 @@ class FlatErrorResponse(BaseModel): message: StrictStr = Field(description="A printable message for this error") id: Optional[StrictStr] = Field(default=None, description="An unique error identifier generated for the request") param: Optional[StrictStr] = Field(default=None, description="The related parameter that caused the error") - __properties: ClassVar[List[str]] = ["code", "message", "id", "param"] + provider_message: Optional[StrictStr] = Field(default=None, description="The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. ", alias="providerMessage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "id", "param", "providerMessage"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +50,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,8 +97,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "code": obj.get("code"), "message": obj.get("message"), "id": obj.get("id"), - "param": obj.get("param") + "param": obj.get("param"), + "providerMessage": obj.get("providerMessage") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/flat_locales.py b/flat_api/models/flat_locales.py deleted file mode 100644 index 8e4ce7e..0000000 --- a/flat_api/models/flat_locales.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class FlatLocales(str, Enum): - """ - The user language - """ - - """ - allowed enum values - """ - EN = 'en' - EN_MINUS_GB = 'en-GB' - ES = 'es' - FR = 'fr' - DE = 'de' - IT = 'it' - JA = 'ja' - JA_MINUS_HIRA = 'ja-HIRA' - KO = 'ko' - NL = 'nl' - PL = 'pl' - PT = 'pt' - PT_MINUS_BR = 'pt-BR' - RO = 'ro' - RU = 'ru' - SV = 'sv' - TR = 'tr' - ZH_MINUS_HANS = 'zh-Hans' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FlatLocales from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index 208777a..cb8191c 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class GoogleClassroomCoursework(BaseModel): """ @@ -31,13 +32,15 @@ class GoogleClassroomCoursework(BaseModel): state: Optional[StrictStr] = Field(default=None, description="State of the coursework") alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") topic_id: Optional[StrictStr] = Field(default=None, description="Identifier of the topic where the assignment is created", alias="topicId") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "topicId"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if topic_id (nullable) is None # and model_fields_set contains the field if self.topic_id is None and "topic_id" in self.model_fields_set: @@ -94,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "alternateLink": obj.get("alternateLink"), "topicId": obj.get("topicId") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index 66b6c49..6975dde 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class GoogleClassroomSubmission(BaseModel): """ @@ -30,13 +31,15 @@ class GoogleClassroomSubmission(BaseModel): id: StrictStr = Field(description="Identifier of the coursework submission assigned by Classroom") state: StrictStr = Field(description="State of the submission on Google Classroom") alternate_link: StrictStr = Field(description="Absolute link to this coursework in the Classroom web UI", alias="alternateLink") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "state", "alternateLink"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +48,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state"), "alternateLink": obj.get("alternateLink") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/grade.py b/flat_api/models/grade.py new file mode 100644 index 0000000..16a122a --- /dev/null +++ b/flat_api/models/grade.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Grade(str, Enum): + """ + Class grade of the resource + """ + + """ + allowed enum values + """ + ENUM_1 = '1' + ENUM_2 = '2' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + ENUM_7 = '7' + ENUM_8 = '8' + ENUM_9 = '9' + ENUM_10 = '10' + ENUM_11 = '11' + ENUM_12 = '12' + UNIVERSITY = 'university' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Grade from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/group.py b/flat_api/models/group.py index 9ec1aab..8d55928 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,12 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.group_type import GroupType from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class Group(BaseModel): """ @@ -30,28 +32,20 @@ class Group(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group") name: Optional[StrictStr] = Field(default=None, description="The display name of the group") - type: Optional[StrictStr] = Field(default=None, description="The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class ") + type: Optional[GroupType] = None users_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of users in this group", alias="usersCount") read_only: Optional[StrictBool] = Field(default=None, description="`True` if the group is set in read-only ", alias="readOnly") organization: Optional[StrictStr] = Field(default=None, description="If the group is related to an organization, this field will contain the unique identifier of the organization ") creation_date: Optional[datetime] = Field(default=None, description="The creation date of the group", alias="creationDate") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "type", "usersCount", "readOnly", "organization", "creationDate"] - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['generic', 'classTeachers', 'classStudents']): - raise ValueError("must be one of enum values ('generic', 'classTeachers', 'classStudents')") - return value - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +54,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -106,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "organization": obj.get("organization"), "creationDate": obj.get("creationDate") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/group_creation.py b/flat_api/models/group_creation.py new file mode 100644 index 0000000..cbcbe9d --- /dev/null +++ b/flat_api/models/group_creation.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GroupCreation(BaseModel): + """ + GroupCreation + """ # noqa: E501 + type: StrictStr = Field(description="Type of group (currently only classStudentsSubGroup is supported)") + classroom: StrictStr = Field(description="Classroom ID") + name: Optional[StrictStr] = Field(default=None, description="Name of the group (optional - auto-generated if not provided). **Special names:** * `edu:testing-students`: Creates a group tagged for test student accounts. The display name will be localized (e.g., \"Test Students\") and the group will be tagged with `edu:testing-students`. ") + members: Optional[List[StrictStr]] = Field(default=None, description="Array of student IDs to add to the group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "classroom", "name", "members"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['classStudentsSubGroup']): + raise ValueError("must be one of enum values ('classStudentsSubGroup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "classroom": obj.get("classroom"), + "name": obj.get("name"), + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index b4ab092..8c39caf 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,30 +19,37 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from flat_api.models.group_type import GroupType from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class GroupDetails(BaseModel): """ The details of a group """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group") - name: Optional[StrictStr] = Field(default=None, description="The displayable name of the group") - type: Optional[GroupType] = None + id: StrictStr = Field(description="The unique identifier of the group") + name: StrictStr = Field(description="The displayable name of the group") + type: GroupType organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning the group") - creation_date: Optional[datetime] = Field(default=None, description="The date when the group was create", alias="creationDate") - users_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of students in this group", alias="usersCount") - read_only: Optional[StrictBool] = Field(default=None, description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") - __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "creationDate", "usersCount", "readOnly"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup'") + assignment: Optional[StrictStr] = Field(default=None, description="The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'.") + parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") + creation_date: datetime = Field(description="The date when the group was create", alias="creationDate") + users_count: Union[StrictFloat, StrictInt] = Field(description="The number of students in this group", alias="usersCount") + read_only: StrictBool = Field(description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") + tags: List[StrictStr] = Field(description="Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "classroom", "assignment", "parent", "creationDate", "usersCount", "readOnly", "tags"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,8 +58,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -68,8 +74,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -93,10 +106,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "type": obj.get("type"), "organization": obj.get("organization"), + "classroom": obj.get("classroom"), + "assignment": obj.get("assignment"), + "parent": obj.get("parent"), "creationDate": obj.get("creationDate"), "usersCount": obj.get("usersCount"), - "readOnly": obj.get("readOnly") + "readOnly": obj.get("readOnly"), + "tags": obj.get("tags") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index 14673fc..c9e76a9 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class GroupType(str, Enum): """ - The type of the group + The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. """ """ @@ -30,6 +30,8 @@ class GroupType(str, Enum): GENERIC = 'generic' CLASSTEACHERS = 'classTeachers' CLASSSTUDENTS = 'classStudents' + CLASSSTUDENTSSUBGROUP = 'classStudentsSubGroup' + ASSIGNMENTSTUDENTSSUBGROUP = 'assignmentStudentsSubGroup' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index b40035a..7758678 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index a7622a3..0ab0988 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index 05c5964..5648b1b 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration.py b/flat_api/models/lti_configuration.py new file mode 100644 index 0000000..203d4c7 --- /dev/null +++ b/flat_api/models/lti_configuration.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.models.lti_configuration1p1 import LtiConfiguration1p1 +from flat_api.models.lti_configuration1p3 import LtiConfiguration1p3 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATION_ONE_OF_SCHEMAS = ["LtiConfiguration1p1", "LtiConfiguration1p3"] + +class LtiConfiguration(BaseModel): + """ + LTI configuration details (unified 1.1 and 1.3) + """ + # data type: LtiConfiguration1p1 + oneof_schema_1_validator: Optional[LtiConfiguration1p1] = None + # data type: LtiConfiguration1p3 + oneof_schema_2_validator: Optional[LtiConfiguration1p3] = None + actual_instance: Optional[Union[LtiConfiguration1p1, LtiConfiguration1p3]] = None + one_of_schemas: Set[str] = { "LtiConfiguration1p1", "LtiConfiguration1p3" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + 'createLtiConfiguration_200_response': 'CreateLtiConfiguration200Response' + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfiguration.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfiguration1p1 + if not isinstance(v, LtiConfiguration1p1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p1`") + else: + match += 1 + # validate data type: LtiConfiguration1p3 + if not isinstance(v, LtiConfiguration1p3): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfiguration1p1 + try: + instance.actual_instance = LtiConfiguration1p1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3 + try: + instance.actual_instance = LtiConfiguration1p3.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfiguration with oneOf schemas: LtiConfiguration1p1, LtiConfiguration1p3. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfiguration1p1, LtiConfiguration1p3]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/models/lti_configuration1p1.py b/flat_api/models/lti_configuration1p1.py new file mode 100644 index 0000000..d581bf3 --- /dev/null +++ b/flat_api/models/lti_configuration1p1.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p1_all_of_tool import LtiConfiguration1p1AllOfTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p1(BaseModel): + """ + LtiConfiguration1p1 + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.1)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + consumer_key: Optional[StrictStr] = Field(default=None, description="LTI 1.1 consumer key", alias="consumerKey") + consumer_secret: Optional[StrictStr] = Field(default=None, description="LTI 1.1 consumer secret (only included for admins)", alias="consumerSecret") + lms: Optional[StrictStr] = Field(default=None, description="LMS type") + name: Optional[StrictStr] = Field(default=None, description="Configuration name") + tool: Optional[LtiConfiguration1p1AllOfTool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1']): + raise ValueError("must be one of enum values ('1p1')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "consumerKey": obj.get("consumerKey"), + "consumerSecret": obj.get("consumerSecret"), + "lms": obj.get("lms"), + "name": obj.get("name"), + "tool": LtiConfiguration1p1AllOfTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p1_all_of_tool.py b/flat_api/models/lti_configuration1p1_all_of_tool.py new file mode 100644 index 0000000..39bbbbc --- /dev/null +++ b/flat_api/models/lti_configuration1p1_all_of_tool.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p1AllOfTool(BaseModel): + """ + Platform/tool product information + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Product family code (e.g., canvas, moodle, schoology)") + version: Optional[StrictStr] = Field(default=None, description="Platform version string") + instance_name: Optional[StrictStr] = Field(default=None, description="Instance display name", alias="instanceName") + instance_guid: Optional[StrictStr] = Field(default=None, description="Unique instance identifier", alias="instanceGuid") + instance_contact: Optional[StrictStr] = Field(default=None, description="Contact email or handle for the instance", alias="instanceContact") + instance_domain: Optional[StrictStr] = Field(default=None, description="Instance root domain", alias="instanceDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product", "version", "instanceName", "instanceGuid", "instanceContact", "instanceDomain"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1AllOfTool from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p1AllOfTool from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product"), + "version": obj.get("version"), + "instanceName": obj.get("instanceName"), + "instanceGuid": obj.get("instanceGuid"), + "instanceContact": obj.get("instanceContact"), + "instanceDomain": obj.get("instanceDomain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3.py b/flat_api/models/lti_configuration1p3.py new file mode 100644 index 0000000..55442b3 --- /dev/null +++ b/flat_api/models/lti_configuration1p3.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.models.lti_configuration1p3_deployment import LtiConfiguration1p3Deployment +from flat_api.models.lti_configuration1p3_dynamic import LtiConfiguration1p3Dynamic +from flat_api.models.lti_configuration1p3_manual import LtiConfiguration1p3Manual +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATION1P3_ONE_OF_SCHEMAS = ["LtiConfiguration1p3Deployment", "LtiConfiguration1p3Dynamic", "LtiConfiguration1p3Manual"] + +class LtiConfiguration1p3(BaseModel): + """ + LTI 1.3 configuration details + """ + # data type: LtiConfiguration1p3Manual + oneof_schema_1_validator: Optional[LtiConfiguration1p3Manual] = None + # data type: LtiConfiguration1p3Deployment + oneof_schema_2_validator: Optional[LtiConfiguration1p3Deployment] = None + # data type: LtiConfiguration1p3Dynamic + oneof_schema_3_validator: Optional[LtiConfiguration1p3Dynamic] = None + actual_instance: Optional[Union[LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual]] = None + one_of_schemas: Set[str] = { "LtiConfiguration1p3Deployment", "LtiConfiguration1p3Dynamic", "LtiConfiguration1p3Manual" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfiguration1p3.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfiguration1p3Manual + if not isinstance(v, LtiConfiguration1p3Manual): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Manual`") + else: + match += 1 + # validate data type: LtiConfiguration1p3Deployment + if not isinstance(v, LtiConfiguration1p3Deployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Deployment`") + else: + match += 1 + # validate data type: LtiConfiguration1p3Dynamic + if not isinstance(v, LtiConfiguration1p3Dynamic): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfiguration1p3Dynamic`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfiguration1p3Manual + try: + instance.actual_instance = LtiConfiguration1p3Manual.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3Deployment + try: + instance.actual_instance = LtiConfiguration1p3Deployment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfiguration1p3Dynamic + try: + instance.actual_instance = LtiConfiguration1p3Dynamic.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfiguration1p3 with oneOf schemas: LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfiguration1p3Deployment, LtiConfiguration1p3Dynamic, LtiConfiguration1p3Manual]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/models/lti_configuration1p3_base.py b/flat_api/models/lti_configuration1p3_base.py new file mode 100644 index 0000000..3fc4f00 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Base(BaseModel): + """ + LtiConfiguration1p3Base + """ # noqa: E501 + mode: Optional[StrictStr] = Field(default=None, description="LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-manual', '1p3-deployment', '1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-manual', '1p3-deployment', '1p3-dynamic')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Base from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Base from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_base_supported_services.py b/flat_api/models/lti_configuration1p3_base_supported_services.py new file mode 100644 index 0000000..e76b494 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base_supported_services.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p3_base_supported_services_ags import LtiConfiguration1p3BaseSupportedServicesAgs +from flat_api.models.lti_configuration1p3_base_supported_services_deep_linking import LtiConfiguration1p3BaseSupportedServicesDeepLinking +from flat_api.models.lti_configuration1p3_base_supported_services_nrps import LtiConfiguration1p3BaseSupportedServicesNrps +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServices(BaseModel): + """ + LTI services support information + """ # noqa: E501 + ags: Optional[LtiConfiguration1p3BaseSupportedServicesAgs] = None + nrps: Optional[LtiConfiguration1p3BaseSupportedServicesNrps] = None + deep_linking: Optional[LtiConfiguration1p3BaseSupportedServicesDeepLinking] = Field(default=None, alias="deepLinking") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ags", "nrps", "deepLinking"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServices from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ags + if self.ags: + _dict['ags'] = self.ags.to_dict() + # override the default output from pydantic by calling `to_dict()` of nrps + if self.nrps: + _dict['nrps'] = self.nrps.to_dict() + # override the default output from pydantic by calling `to_dict()` of deep_linking + if self.deep_linking: + _dict['deepLinking'] = self.deep_linking.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServices from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ags": LtiConfiguration1p3BaseSupportedServicesAgs.from_dict(obj["ags"]) if obj.get("ags") is not None else None, + "nrps": LtiConfiguration1p3BaseSupportedServicesNrps.from_dict(obj["nrps"]) if obj.get("nrps") is not None else None, + "deepLinking": LtiConfiguration1p3BaseSupportedServicesDeepLinking.from_dict(obj["deepLinking"]) if obj.get("deepLinking") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_ags.py b/flat_api/models/lti_configuration1p3_base_supported_services_ags.py new file mode 100644 index 0000000..30cc3b5 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base_supported_services_ags.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesAgs(BaseModel): + """ + Assignment and Grade Services support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether AGS claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="AGS version supported (e.g., \"2.0\")") + enabled: Optional[StrictBool] = Field(default=None, description="Whether we have AGS enabled for this platform") + lineitems_url: Optional[StrictStr] = Field(default=None, description="Base URL for line items operations as provided by the platform", alias="lineitemsUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version", "enabled", "lineitemsUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesAgs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version"), + "enabled": obj.get("enabled"), + "lineitemsUrl": obj.get("lineitemsUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py b/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py new file mode 100644 index 0000000..a92f835 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesDeepLinking(BaseModel): + """ + Deep Linking support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether Deep Linking claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="Deep Linking version supported (e.g., \"2.0\")") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesDeepLinking from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py b/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py new file mode 100644 index 0000000..580fff9 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseSupportedServicesNrps(BaseModel): + """ + Names and Role Provisioning Services support + """ # noqa: E501 + available: Optional[StrictBool] = Field(default=None, description="Whether NRPS claims were detected in launches from this platform") + version: Optional[StrictStr] = Field(default=None, description="NRPS version supported (e.g., \"2.0\")") + enabled: Optional[StrictBool] = Field(default=None, description="Whether we have NRPS enabled for this platform") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available", "version", "enabled"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseSupportedServicesNrps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available"), + "version": obj.get("version"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_base_tool.py b/flat_api/models/lti_configuration1p3_base_tool.py new file mode 100644 index 0000000..9fd38e6 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_base_tool.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3BaseTool(BaseModel): + """ + Platform/tool product information + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Product family code (e.g., canvas, moodle, schoology)") + version: Optional[StrictStr] = Field(default=None, description="Platform version string") + instance_name: Optional[StrictStr] = Field(default=None, description="Instance name (e.g., 'My University Canvas')", alias="instanceName") + instance_guid: Optional[StrictStr] = Field(default=None, description="Unique instance identifier", alias="instanceGuid") + instance_contact: Optional[StrictStr] = Field(default=None, description="Contact email or handle for the instance", alias="instanceContact") + instance_domain: Optional[StrictStr] = Field(default=None, description="Instance root domain", alias="instanceDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product", "version", "instanceName", "instanceGuid", "instanceContact", "instanceDomain"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseTool from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3BaseTool from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product"), + "version": obj.get("version"), + "instanceName": obj.get("instanceName"), + "instanceGuid": obj.get("instanceGuid"), + "instanceContact": obj.get("instanceContact"), + "instanceDomain": obj.get("instanceDomain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_deployment.py b/flat_api/models/lti_configuration1p3_deployment.py new file mode 100644 index 0000000..2cfdbd2 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_deployment.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Deployment(BaseModel): + """ + LtiConfiguration1p3Deployment + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Deployment-based LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + parent_id: Optional[StrictStr] = Field(default=None, description="Parent configuration ID (for deployment-based configs)", alias="parentId") + deployment_key: Optional[StrictStr] = Field(default=None, description="Deployment key (e.g., schoology, classlink)", alias="deploymentKey") + deployment_breakdown_by: Optional[StrictStr] = Field(default=None, description="Custom claim used for tenant identification (parent platforms only, read-only)", alias="deploymentBreakdownBy") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (child platforms only)", alias="deploymentBreakdownId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-deployment']): + raise ValueError("must be one of enum values ('1p3-deployment')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Deployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Deployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "parentId": obj.get("parentId"), + "deploymentKey": obj.get("deploymentKey"), + "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_dynamic.py b/flat_api/models/lti_configuration1p3_dynamic.py new file mode 100644 index 0000000..d83afe1 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_dynamic.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Dynamic(BaseModel): + """ + LtiConfiguration1p3Dynamic + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Dynamic registration LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + registration_token: Optional[StrictStr] = Field(default=None, description="Only included for admins", alias="registrationToken") + registration_url: Optional[StrictStr] = Field(default=None, description="Dynamic registration URL (only included for admins when available)", alias="registrationUrl") + registration_token_used: Optional[StrictBool] = Field(default=None, description="Whether dynamic registration token has been used", alias="registrationTokenUsed") + registration_completion_date: Optional[datetime] = Field(default=None, description="Date when dynamic registration completed (null when not completed)", alias="registrationCompletionDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-dynamic')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Dynamic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if registration_completion_date (nullable) is None + # and model_fields_set contains the field + if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: + _dict['registrationCompletionDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Dynamic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, + "registrationToken": obj.get("registrationToken"), + "registrationUrl": obj.get("registrationUrl"), + "registrationTokenUsed": obj.get("registrationTokenUsed"), + "registrationCompletionDate": obj.get("registrationCompletionDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration1p3_manual.py b/flat_api/models/lti_configuration1p3_manual.py new file mode 100644 index 0000000..cfb5044 --- /dev/null +++ b/flat_api/models/lti_configuration1p3_manual.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices +from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfiguration1p3Manual(BaseModel): + """ + LtiConfiguration1p3Manual + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version (1.3)", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + mode: Optional[StrictStr] = Field(default=None, description="Manual LTI 1.3 configuration mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment ID linking the tool to a tenant/class (varies by platform)", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="OAuth2 token endpoint (for AGS/NRPS)", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="OIDC authorization/login endpoint", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint (public keys)", alias="jwksUrl") + deployment_mode: Optional[StrictStr] = Field(default=None, description="Deployment mode (single for organization-specific, multi for shared parent platforms)", alias="deploymentMode") + supported_services: Optional[LtiConfiguration1p3BaseSupportedServices] = Field(default=None, alias="supportedServices") + tool: Optional[LtiConfiguration1p3BaseTool] = None + public_keyset_url: Optional[StrictStr] = Field(default=None, description="Public keyset URL for the platform to retrieve Flat's public keys", alias="publicKeysetUrl") + initiate_login_url: Optional[StrictStr] = Field(default=None, description="URL for the platform to initiate LTI login", alias="initiateLoginUrl") + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Allowed redirect URIs for LTI launches", alias="redirectUris") + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "tool", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3']): + raise ValueError("must be one of enum values ('1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1p3-manual']): + raise ValueError("must be one of enum values ('1p3-manual')") + return value + + @field_validator('deployment_mode') + def deployment_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['single', 'multi']): + raise ValueError("must be one of enum values ('single', 'multi')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Manual from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of supported_services + if self.supported_services: + _dict['supportedServices'] = self.supported_services.to_dict() + # override the default output from pydantic by calling `to_dict()` of tool + if self.tool: + _dict['tool'] = self.tool.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfiguration1p3Manual from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status"), + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "deploymentMode": obj.get("deploymentMode"), + "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, + "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, + "publicKeysetUrl": obj.get("publicKeysetUrl"), + "initiateLoginUrl": obj.get("initiateLoginUrl"), + "redirectUris": obj.get("redirectUris"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_base.py b/flat_api/models/lti_configuration_base.py new file mode 100644 index 0000000..876e041 --- /dev/null +++ b/flat_api/models/lti_configuration_base.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationBase(BaseModel): + """ + LtiConfigurationBase + """ # noqa: E501 + id: StrictStr = Field(description="Configuration ID") + lti_version: StrictStr = Field(description="LTI version", alias="ltiVersion") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization ID", alias="organizationId") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name", alias="organizationName") + creator_id: Optional[StrictStr] = Field(default=None, description="ID of the user who created this configuration", alias="creatorId") + creation_date: datetime = Field(description="Configuration creation date", alias="creationDate") + last_used_date: Optional[datetime] = Field(default=None, description="Last time this configuration was used", alias="lastUsedDate") + status: Optional[StrictStr] = Field(default=None, description="Configuration status indicator") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status"] + + @field_validator('lti_version') + def lti_version_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1', '1p3']): + raise ValueError("must be one of enum values ('1p1', '1p3')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ready-to-use', 'in-use', 'incomplete-setup']): + raise ValueError("must be one of enum values ('ready-to-use', 'in-use', 'incomplete-setup')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if last_used_date (nullable) is None + # and model_fields_set contains the field + if self.last_used_date is None and "last_used_date" in self.model_fields_set: + _dict['lastUsedDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "ltiVersion": obj.get("ltiVersion"), + "organizationId": obj.get("organizationId"), + "organizationName": obj.get("organizationName"), + "creatorId": obj.get("creatorId"), + "creationDate": obj.get("creationDate"), + "lastUsedDate": obj.get("lastUsedDate"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_create.py b/flat_api/models/lti_configuration_create.py new file mode 100644 index 0000000..896994e --- /dev/null +++ b/flat_api/models/lti_configuration_create.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flat_api.models.lti_configuration_create1p1 import LtiConfigurationCreate1p1 +from flat_api.models.lti_configuration_create1p3_deployment import LtiConfigurationCreate1p3Deployment +from flat_api.models.lti_configuration_create1p3_dynamic import LtiConfigurationCreate1p3Dynamic +from flat_api.models.lti_configuration_create1p3_manual import LtiConfigurationCreate1p3Manual +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +LTICONFIGURATIONCREATE_ONE_OF_SCHEMAS = ["LtiConfigurationCreate1p1", "LtiConfigurationCreate1p3Deployment", "LtiConfigurationCreate1p3Dynamic", "LtiConfigurationCreate1p3Manual"] + +class LtiConfigurationCreate(BaseModel): + """ + Request to create a new LTI configuration (unified 1.1 and 1.3) + """ + # data type: LtiConfigurationCreate1p1 + oneof_schema_1_validator: Optional[LtiConfigurationCreate1p1] = None + # data type: LtiConfigurationCreate1p3Dynamic + oneof_schema_2_validator: Optional[LtiConfigurationCreate1p3Dynamic] = None + # data type: LtiConfigurationCreate1p3Deployment + oneof_schema_3_validator: Optional[LtiConfigurationCreate1p3Deployment] = None + # data type: LtiConfigurationCreate1p3Manual + oneof_schema_4_validator: Optional[LtiConfigurationCreate1p3Manual] = None + actual_instance: Optional[Union[LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual]] = None + one_of_schemas: Set[str] = { "LtiConfigurationCreate1p1", "LtiConfigurationCreate1p3Deployment", "LtiConfigurationCreate1p3Dynamic", "LtiConfigurationCreate1p3Manual" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = LtiConfigurationCreate.model_construct() + error_messages = [] + match = 0 + # validate data type: LtiConfigurationCreate1p1 + if not isinstance(v, LtiConfigurationCreate1p1): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p1`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Dynamic + if not isinstance(v, LtiConfigurationCreate1p3Dynamic): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Dynamic`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Deployment + if not isinstance(v, LtiConfigurationCreate1p3Deployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Deployment`") + else: + match += 1 + # validate data type: LtiConfigurationCreate1p3Manual + if not isinstance(v, LtiConfigurationCreate1p3Manual): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationCreate1p3Manual`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into LtiConfigurationCreate1p1 + try: + instance.actual_instance = LtiConfigurationCreate1p1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Dynamic + try: + instance.actual_instance = LtiConfigurationCreate1p3Dynamic.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Deployment + try: + instance.actual_instance = LtiConfigurationCreate1p3Deployment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into LtiConfigurationCreate1p3Manual + try: + instance.actual_instance = LtiConfigurationCreate1p3Manual.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfigurationCreate with oneOf schemas: LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfigurationCreate1p1, LtiConfigurationCreate1p3Deployment, LtiConfigurationCreate1p3Dynamic, LtiConfigurationCreate1p3Manual]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/models/lti_configuration_create1p1.py b/flat_api/models/lti_configuration_create1p1.py new file mode 100644 index 0000000..32e8ea9 --- /dev/null +++ b/flat_api/models/lti_configuration_create1p1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p1(BaseModel): + """ + LTI 1.1 manual configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.1 manual creation mode") + name: Optional[StrictStr] = Field(default=None, description="Display name for LTI 1.1 credentials") + lms: Optional[StrictStr] = Field(default=None, description="LMS identifier for LTI 1.1 credentials") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "name", "lms"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p1-manual']): + raise ValueError("must be one of enum values ('1p1-manual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "name": obj.get("name"), + "lms": obj.get("lms") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_create1p3_deployment.py b/flat_api/models/lti_configuration_create1p3_deployment.py new file mode 100644 index 0000000..8a261d9 --- /dev/null +++ b/flat_api/models/lti_configuration_create1p3_deployment.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Deployment(BaseModel): + """ + LTI 1.3 deployment-based configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 deployment-based creation mode") + deployment_type: StrictStr = Field(description="Parent platform key (e.g., canvas, blackboard, schoology, classlink)", alias="deploymentType") + deployment_id: StrictStr = Field(description="Deployment identifier provided by the platform", alias="deploymentId") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id for the tenant; required for ClassLink deployments", alias="clientId") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology)", alias="deploymentBreakdownId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "deploymentType", "deploymentId", "clientId", "deploymentBreakdownId"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-deployment']): + raise ValueError("must be one of enum values ('1p3-deployment')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Deployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Deployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "deploymentType": obj.get("deploymentType"), + "deploymentId": obj.get("deploymentId"), + "clientId": obj.get("clientId"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_create1p3_dynamic.py b/flat_api/models/lti_configuration_create1p3_dynamic.py new file mode 100644 index 0000000..d5240bf --- /dev/null +++ b/flat_api/models/lti_configuration_create1p3_dynamic.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.lti_configuration_create1p3_dynamic_platform_info import LtiConfigurationCreate1p3DynamicPlatformInfo +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Dynamic(BaseModel): + """ + LTI 1.3 dynamic registration configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 dynamic registration mode") + platform_info: Optional[LtiConfigurationCreate1p3DynamicPlatformInfo] = Field(default=None, alias="platformInfo") + locale: Optional[StrictStr] = Field(default=None, description="Optional locale code for registration URL. Input values will be automatically normalized to a supported locale code.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformInfo", "locale"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-dynamic']): + raise ValueError("must be one of enum values ('1p3-dynamic')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Dynamic from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of platform_info + if self.platform_info: + _dict['platformInfo'] = self.platform_info.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Dynamic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformInfo": LtiConfigurationCreate1p3DynamicPlatformInfo.from_dict(obj["platformInfo"]) if obj.get("platformInfo") is not None else None, + "locale": obj.get("locale") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py b/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py new file mode 100644 index 0000000..546fa43 --- /dev/null +++ b/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3DynamicPlatformInfo(BaseModel): + """ + Optional platform information for dynamic registration + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Platform display name") + url: Optional[StrictStr] = Field(default=None, description="Optional platform homepage or admin URL for reference") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "url"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3DynamicPlatformInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_create1p3_manual.py b/flat_api/models/lti_configuration_create1p3_manual.py new file mode 100644 index 0000000..c52d1a1 --- /dev/null +++ b/flat_api/models/lti_configuration_create1p3_manual.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationCreate1p3Manual(BaseModel): + """ + LTI 1.3 manual configuration creation + """ # noqa: E501 + mode: StrictStr = Field(description="LTI 1.3 manual creation mode") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + access_token_url: Optional[StrictStr] = Field(default=None, description="Platform access token endpoint URL", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="Platform OIDC authorization endpoint URL", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint URL for public keys", alias="jwksUrl") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "enableEmailMatching"] + + @field_validator('mode') + def mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['1p3-manual']): + raise ValueError("must be one of enum values ('1p3-manual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Manual from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationCreate1p3Manual from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "deploymentId": obj.get("deploymentId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_update.py b/flat_api/models/lti_configuration_update.py new file mode 100644 index 0000000..04e7ac8 --- /dev/null +++ b/flat_api/models/lti_configuration_update.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from flat_api.models.lti_configuration_update_deployment import LtiConfigurationUpdateDeployment +from flat_api.models.lti_configuration_update_standalone import LtiConfigurationUpdateStandalone +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +LTICONFIGURATIONUPDATE_ANY_OF_SCHEMAS = ["LtiConfigurationUpdateDeployment", "LtiConfigurationUpdateStandalone"] + +class LtiConfigurationUpdate(BaseModel): + """ + Update an existing LTI 1.3 configuration (deployment clone or standalone) + """ + + # data type: LtiConfigurationUpdateDeployment + anyof_schema_1_validator: Optional[LtiConfigurationUpdateDeployment] = None + # data type: LtiConfigurationUpdateStandalone + anyof_schema_2_validator: Optional[LtiConfigurationUpdateStandalone] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "LtiConfigurationUpdateDeployment", "LtiConfigurationUpdateStandalone" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = LtiConfigurationUpdate.model_construct() + error_messages = [] + # validate data type: LtiConfigurationUpdateDeployment + if not isinstance(v, LtiConfigurationUpdateDeployment): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationUpdateDeployment`") + else: + return v + + # validate data type: LtiConfigurationUpdateStandalone + if not isinstance(v, LtiConfigurationUpdateStandalone): + error_messages.append(f"Error! Input type `{type(v)}` is not `LtiConfigurationUpdateStandalone`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in LtiConfigurationUpdate with anyOf schemas: LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[LtiConfigurationUpdateDeployment] = None + try: + instance.actual_instance = LtiConfigurationUpdateDeployment.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[LtiConfigurationUpdateStandalone] = None + try: + instance.actual_instance = LtiConfigurationUpdateStandalone.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into LtiConfigurationUpdate with anyOf schemas: LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LtiConfigurationUpdateDeployment, LtiConfigurationUpdateStandalone]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flat_api/models/lti_configuration_update_deployment.py b/flat_api/models/lti_configuration_update_deployment.py new file mode 100644 index 0000000..910c8eb --- /dev/null +++ b/flat_api/models/lti_configuration_update_deployment.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationUpdateDeployment(BaseModel): + """ + Update fields allowed for deployment-based configurations + """ # noqa: E501 + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Specific tenant identifier for multi-tenant platforms", alias="deploymentBreakdownId") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deploymentId", "deploymentBreakdownId", "enableEmailMatching"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateDeployment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateDeployment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deploymentId": obj.get("deploymentId"), + "deploymentBreakdownId": obj.get("deploymentBreakdownId"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_configuration_update_standalone.py b/flat_api/models/lti_configuration_update_standalone.py new file mode 100644 index 0000000..b21686a --- /dev/null +++ b/flat_api/models/lti_configuration_update_standalone.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LtiConfigurationUpdateStandalone(BaseModel): + """ + Update fields allowed for standalone (manual/dynamic) configurations + """ # noqa: E501 + deployment_id: Optional[StrictStr] = Field(default=None, description="Deployment identifier provided by the platform", alias="deploymentId") + platform_iss: Optional[StrictStr] = Field(default=None, description="Platform issuer URL", alias="platformIss") + platform_name: Optional[StrictStr] = Field(default=None, description="Platform display name", alias="platformName") + client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id allocated by the platform", alias="clientId") + access_token_url: Optional[StrictStr] = Field(default=None, description="Platform access token endpoint URL", alias="accessTokenUrl") + authorization_url: Optional[StrictStr] = Field(default=None, description="Platform OIDC authorization endpoint URL", alias="authorizationUrl") + jwks_url: Optional[StrictStr] = Field(default=None, description="Platform JWKS endpoint URL for public keys", alias="jwksUrl") + enable_email_matching: Optional[StrictBool] = Field(default=None, description="Enable email-based user matching during LTI authentication", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deploymentId", "platformIss", "platformName", "clientId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "enableEmailMatching"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateStandalone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LtiConfigurationUpdateStandalone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deploymentId": obj.get("deploymentId"), + "platformIss": obj.get("platformIss"), + "platformName": obj.get("platformName"), + "clientId": obj.get("clientId"), + "accessTokenUrl": obj.get("accessTokenUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "jwksUrl": obj.get("jwksUrl"), + "enableEmailMatching": obj.get("enableEmailMatching") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index ccc7666..f46f973 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,11 +19,12 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.lms_name import LmsName from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class LtiCredentials(BaseModel): """ @@ -38,13 +39,16 @@ class LtiCredentials(BaseModel): last_usage: Optional[datetime] = Field(default=None, description="The last time these credentials were used", alias="lastUsage") consumer_key: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Key", alias="consumerKey") consumer_secret: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Secret", alias="consumerSecret") - __properties: ClassVar[List[str]] = ["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret"] + enable_email_matching: Optional[StrictBool] = Field(default=True, description="Enable email-based user matching during LTI authentication. When true (default): If a user with the same email exists in the organization, they will be matched and logged in instead of creating a new account. When false: Email matching is disabled. Only LTI ID matching is used, which means multiple LTI users can share the same email address and have separate Flat accounts. This is useful for cases like siblings sharing a parent email in the LMS. ", alias="enableEmailMatching") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "lms", "organization", "creator", "creationDate", "lastUsage", "consumerKey", "consumerSecret", "enableEmailMatching"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,8 +57,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -70,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -99,8 +109,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creationDate": obj.get("creationDate"), "lastUsage": obj.get("lastUsage"), "consumerKey": obj.get("consumerKey"), - "consumerSecret": obj.get("consumerSecret") + "consumerSecret": obj.get("consumerSecret"), + "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index ccf8c9f..e854a3b 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from typing_extensions import Annotated from flat_api.models.lms_name import LmsName from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class LtiCredentialsCreation(BaseModel): """ @@ -31,13 +32,15 @@ class LtiCredentialsCreation(BaseModel): """ # noqa: E501 name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the couple of credentials") lms: LmsName + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "lms"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "lms": obj.get("lms") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index 147504d..a47101f 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class MediaAttachment(BaseModel): """ @@ -34,13 +35,14 @@ class MediaAttachment(BaseModel): worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") dedicated: Optional[StrictBool] = Field(default=None, description="True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment") track: Optional[StrictStr] = Field(default=None, description="A unique track identifier") - sharing_mode: Optional[MediaScoreSharingMode] = Field(default=None, alias="sharingMode") + part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") + sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") title: Optional[StrictStr] = Field(default=None, description="The resolved title of the attachment") description: Optional[StrictStr] = Field(default=None, description="The resolved description of the attachment") html: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich` or `video`, the HTML code of the media to display ") - html_width: Optional[StrictStr] = Field(default=None, description="If the `html` is available, the width of the widget", alias="htmlWidth") - html_height: Optional[StrictStr] = Field(default=None, description="If the `html` is available, the height of the widget", alias="htmlHeight") + html_width: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If the `html` is available, the width of the widget", alias="htmlWidth") + html_height: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If the `html` is available, the height of the widget", alias="htmlHeight") url: Optional[StrictStr] = Field(default=None, description="The url of the attachment") thumbnail_url: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment ", alias="thumbnailUrl") thumbnail_width: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailWidth") @@ -50,20 +52,23 @@ class MediaAttachment(BaseModel): icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the icon", alias="iconUrl") mime_type: Optional[StrictStr] = Field(default=None, description="The mine type of the file", alias="mimeType") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") - __properties: ClassVar[List[str]] = ["type", "score", "revision", "worksheet", "dedicated", "track", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId"] + teacher_only: Optional[StrictBool] = Field(default=False, description="If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. ", alias="teacherOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "score", "revision", "worksheet", "dedicated", "track", "partUuid", "sharingMode", "lockScoreTemplate", "title", "description", "html", "htmlWidth", "htmlHeight", "url", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "authorName", "authorUrl", "iconUrl", "mimeType", "googleDriveFileId", "teacherOnly"] @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance']): - raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet', 'performance')") + if value not in set(['rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet']): + raise ValueError("must be one of enum values ('rich', 'photo', 'video', 'link', 'flat', 'googleDrive', 'worksheet')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,8 +77,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -89,8 +93,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -98,6 +104,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -116,7 +127,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "worksheet": obj.get("worksheet"), "dedicated": obj.get("dedicated"), "track": obj.get("track"), - "sharingMode": obj.get("sharingMode"), + "partUuid": obj.get("partUuid"), + "sharingMode": obj.get("sharingMode") if obj.get("sharingMode") is not None else MediaScoreSharingMode.READ, "lockScoreTemplate": obj.get("lockScoreTemplate"), "title": obj.get("title"), "description": obj.get("description"), @@ -131,8 +143,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "authorUrl": obj.get("authorUrl"), "iconUrl": obj.get("iconUrl"), "mimeType": obj.get("mimeType"), - "googleDriveFileId": obj.get("googleDriveFileId") + "googleDriveFileId": obj.get("googleDriveFileId"), + "teacherOnly": obj.get("teacherOnly") if obj.get("teacherOnly") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index 543a9c3..90e7e14 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py index 06fb106..299edef 100644 --- a/flat_api/models/microsoft_graph_assignment.py +++ b/flat_api/models/microsoft_graph_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,53 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class MicrosoftGraphAssignment(BaseModel): """ - A Microsoft Teams asignment + A Microsoft Teams assignment """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the assignement assigned by Microsoft Teams") - state: Optional[StrictStr] = Field(default=None, description="State of the assignment") - alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this assignement in the Microsoft Teams web UI", alias="alternateLink") + id: Optional[StrictStr] = Field(default=None, description="Identifier of the assignment assigned by Microsoft Teams") + state: Optional[StrictStr] = Field(default=None, description="State of the assignment on Microsoft Teams. * `draft`: Assignment is in draft mode * `scheduled`: Assignment is scheduled to be published at a future date * `published`: Assignment has been published to students * `assigned`: Assignment has been assigned (legacy status) * `inactive`: Assignment is inactive ") + alternate_link: Optional[StrictStr] = Field(default=None, description="Absolute link to this assignment in the Microsoft Teams web UI", alias="alternateLink") + assign_date_time: Optional[datetime] = Field(default=None, description="The date when the assignment will become active on Microsoft Teams. If set to a future date, the assignment will have status `scheduled` and won't be visible to students until this date. ", alias="assignDateTime") categories: Optional[List[StrictStr]] = Field(default=None, description="List of categories where this assignment is published under") - __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "categories"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + assign_to_type: Optional[StrictStr] = Field(default=None, description="Recipient configuration for this assignment on Microsoft Teams. * `class`: Assignment is visible to all students in the class * `individual`: Assignment is visible only to specific assigned students ", alias="assignToType") + assigned_students_ms_ids: Optional[List[StrictStr]] = Field(default=None, description="When assignToType is 'individual', array of Microsoft Azure user IDs of students assigned to this assignment. These are the students who can see and submit to this assignment on Teams. ", alias="assignedStudentsMsIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "alternateLink", "assignDateTime", "categories", "assignToType", "assignedStudentsMsIds"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['draft', 'scheduled', 'published', 'assigned', 'inactive']): + raise ValueError("must be one of enum values ('draft', 'scheduled', 'published', 'assigned', 'inactive')") + return value + + @field_validator('assign_to_type') + def assign_to_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['class', 'individual']): + raise ValueError("must be one of enum values ('class', 'individual')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +73,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +89,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +100,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,8 +120,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "state": obj.get("state"), "alternateLink": obj.get("alternateLink"), - "categories": obj.get("categories") + "assignDateTime": obj.get("assignDateTime"), + "categories": obj.get("categories"), + "assignToType": obj.get("assignToType"), + "assignedStudentsMsIds": obj.get("assignedStudentsMsIds") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py index 789dd09..8014efe 100644 --- a/flat_api/models/microsoft_graph_submission.py +++ b/flat_api/models/microsoft_graph_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class MicrosoftGraphSubmission(BaseModel): """ @@ -29,13 +30,15 @@ class MicrosoftGraphSubmission(BaseModel): """ # noqa: E501 id: StrictStr = Field(description="Identifier of the submission assigned by Microsoft Teams") state: StrictStr = Field(description="State of the submission") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "state"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "state": obj.get("state") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/omr_capabilities.py b/flat_api/models/omr_capabilities.py new file mode 100644 index 0000000..997cb27 --- /dev/null +++ b/flat_api/models/omr_capabilities.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.omr_job_output import OmrJobOutput +from flat_api.models.omr_locale_details import OmrLocaleDetails +from flat_api.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrCapabilities(BaseModel): + """ + What the account or app can do, for client feature-detection. + """ # noqa: E501 + steps: List[OmrStepName] = Field(description="Interactive steps this server supports.") + formats: List[StrictStr] = Field(description="Export formats available via `getOmrJobExport`.") + outputs: List[OmrJobOutput] = Field(description="Output destinations the account can use when creating a job.") + max_files: StrictInt = Field(description="Maximum number of input files that can be added to a single job.", alias="maxFiles") + max_pages: StrictInt = Field(description="Maximum number of pages allowed across all input files of a single job.", alias="maxPages") + max_parallel_jobs: StrictInt = Field(description="Maximum number of OMR jobs that can run in parallel for this account.", alias="maxParallelJobs") + max_file_size: StrictInt = Field(description="Maximum size of a single file, in bytes.", alias="maxFileSize") + accepted_mime_types: List[StrictStr] = Field(description="MIME types accepted for input files: PDF, plus the raster image formats. Drive the file picker from this list rather than hardcoding it, so newly supported formats need no client release. A file is identified by its content, so its declared type and its extension do not have to match. A multi-page input counts as several pages against `maxPages` and is charged accordingly. That covers PDFs and, among the image formats, multi-page TIFF and animated GIF/WebP. ", alias="acceptedMimeTypes") + accepted_extensions: List[StrictStr] = Field(description="Filename extensions the accepted types appear under, for building a file picker. Use these alongside `acceptedMimeTypes` in an `accept` attribute: browsers and native file dialogs filter unreliably on some of the image types, so a valid file can be greyed out when only its MIME type is offered. Longer than `acceptedMimeTypes`, because one type arrives under several extensions (`.jpg` and `.jpeg`, `.tif` and `.tiff`, `.heic` and `.heif`). Picker metadata only. A file is identified by its content, so its extension never decides whether an upload is accepted. ", alias="acceptedExtensions") + cost_per_page: Optional[StrictInt] = Field(default=None, description="Credits charged per page.", alias="costPerPage") + remaining_credits: Optional[StrictInt] = Field(default=None, description="OMR credits remaining for the account.", alias="remainingCredits") + retention_days: Optional[StrictInt] = Field(default=None, description="How many days a `musicxml` job's uploaded files and results are kept before erasure. Reflects the account's own period when one has been set, otherwise the platform default. Read-only: contact support to change it. Jobs with `output: library` are not covered by the retention policy and are unaffected by this value. ", alias="retentionDays") + locales: List[StrictStr] = Field(description="Locales selectable for OCR, as BCP 47 codes sorted alphabetically. These are the locales the recognition pipeline can actually read, which is neither the list of Flat interface locales nor a fixed set: new languages are added over time. Clients should default to the user's own locale when it appears here. ") + locales_details: List[OmrLocaleDetails] = Field(description="The same locales as `locales`, each with its English display name, sorted alphabetically by `name` and ready to bind to a language picker. Prefer this over `locales` when rendering a selector: it saves clients from shipping their own code-to-label table. ", alias="localesDetails") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["steps", "formats", "outputs", "maxFiles", "maxPages", "maxParallelJobs", "maxFileSize", "acceptedMimeTypes", "acceptedExtensions", "costPerPage", "remainingCredits", "retentionDays", "locales", "localesDetails"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrCapabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in locales_details (list) + _items = [] + if self.locales_details: + for _item_locales_details in self.locales_details: + if _item_locales_details: + _items.append(_item_locales_details.to_dict()) + _dict['localesDetails'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrCapabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "steps": obj.get("steps"), + "formats": obj.get("formats"), + "outputs": obj.get("outputs"), + "maxFiles": obj.get("maxFiles"), + "maxPages": obj.get("maxPages"), + "maxParallelJobs": obj.get("maxParallelJobs"), + "maxFileSize": obj.get("maxFileSize"), + "acceptedMimeTypes": obj.get("acceptedMimeTypes"), + "acceptedExtensions": obj.get("acceptedExtensions"), + "costPerPage": obj.get("costPerPage"), + "remainingCredits": obj.get("remainingCredits"), + "retentionDays": obj.get("retentionDays"), + "locales": obj.get("locales"), + "localesDetails": [OmrLocaleDetails.from_dict(_item) for _item in obj["localesDetails"]] if obj.get("localesDetails") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_details_step_data.py b/flat_api/models/omr_details_step_data.py new file mode 100644 index 0000000..41eddc2 --- /dev/null +++ b/flat_api/models/omr_details_step_data.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.omr_detected_instrument import OmrDetectedInstrument +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetailsStepData(BaseModel): + """ + Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). + """ # noqa: E501 + step: StrictStr = Field(description="Discriminator for `OmrPendingStep.data`; always `details` for this payload.") + title: Optional[StrictStr] = Field(default=None, description="OCR-detected work title.") + instruments: List[OmrDetectedInstrument] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["step", "title", "instruments"] + + @field_validator('step') + def step_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['details']): + raise ValueError("must be one of enum values ('details')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetailsStepData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetailsStepData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "title": obj.get("title"), + "instruments": [OmrDetectedInstrument.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_details_submission.py b/flat_api/models/omr_details_submission.py new file mode 100644 index 0000000..329d972 --- /dev/null +++ b/flat_api/models/omr_details_submission.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flat_api.models.omr_instrument_override import OmrInstrumentOverride +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetailsSubmission(BaseModel): + """ + Overrides for the `details` step. Omitted fields keep the server's detected values. + """ # noqa: E501 + step: StrictStr = Field(description="Discriminator for `OmrStepSubmission`; always `details` for this submission.") + title: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Override the detected work title.") + main_language: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=35)]] = Field(default=None, description="Override the main language (BCP 47) used for lyric and text reading on resume. Defaults to the job locale (`locales`); set this to correct it on the review screen. ", alias="mainLanguage") + instruments: Optional[Annotated[List[OmrInstrumentOverride], Field(max_length=200)]] = Field(default=None, description="Per-part overrides, each matched to a detected part by `index`.") + __properties: ClassVar[List[str]] = ["step", "title", "mainLanguage", "instruments"] + + @field_validator('step') + def step_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['details']): + raise ValueError("must be one of enum values ('details')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetailsSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetailsSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "title": obj.get("title"), + "mainLanguage": obj.get("mainLanguage"), + "instruments": [OmrInstrumentOverride.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + return _obj + + diff --git a/flat_api/models/omr_detected_instrument.py b/flat_api/models/omr_detected_instrument.py new file mode 100644 index 0000000..e6e19e5 --- /dev/null +++ b/flat_api/models/omr_detected_instrument.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrDetectedInstrument(BaseModel): + """ + One detected part. + """ # noqa: E501 + index: StrictInt = Field(description="0-based position of the part in the score.") + part_name: Optional[StrictStr] = Field(default=None, description="Verbatim part name read from the score.", alias="partName") + instrument_id: Optional[StrictStr] = Field(default=None, description="Flat instrument ID in dotted `.` form, for example `brass.horn` or `vocals.voice-oohs`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments). Always the canonical (non-premium) ID.", alias="instrumentId") + instrument_name: Optional[StrictStr] = Field(default=None, description="Localized display name, resolved server-side so the client needs no instruments dictionary.", alias="instrumentName") + midi_program: Optional[StrictInt] = Field(default=None, description="General MIDI program number.", alias="midiProgram") + transpose_key: Optional[StrictStr] = Field(default=None, description="Transposition or written key shown in the UI, for example `F` for Horn in F.", alias="transposeKey") + resolved_confidence: Optional[StrictStr] = Field(default=None, description="Server confidence in the resolved instrument match.", alias="resolvedConfidence") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["index", "partName", "instrumentId", "instrumentName", "midiProgram", "transposeKey", "resolvedConfidence"] + + @field_validator('resolved_confidence') + def resolved_confidence_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['high', 'medium', 'low']): + raise ValueError("must be one of enum values ('high', 'medium', 'low')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrDetectedInstrument from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrDetectedInstrument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "partName": obj.get("partName"), + "instrumentId": obj.get("instrumentId"), + "instrumentName": obj.get("instrumentName"), + "midiProgram": obj.get("midiProgram"), + "transposeKey": obj.get("transposeKey"), + "resolvedConfidence": obj.get("resolvedConfidence") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_imported_metadata.py b/flat_api/models/omr_imported_metadata.py new file mode 100644 index 0000000..38a8ae4 --- /dev/null +++ b/flat_api/models/omr_imported_metadata.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrImportedMetadata(BaseModel): + """ + Metadata extracted from the recognized score. + """ # noqa: E501 + instruments: Optional[List[StrictStr]] = Field(default=None, description="Instrument IDs of the assembled parts.") + number_measures: Optional[StrictInt] = Field(default=None, description="Number of measures in the recognized score.", alias="numberMeasures") + main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Main tempo, in quarter notes per minute.", alias="mainTempoQpm") + main_key_signature: Optional[StrictInt] = Field(default=None, description="Main key signature as a fifths count (negative for flats, positive for sharps, 0 for C major / A minor).", alias="mainKeySignature") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instruments", "numberMeasures", "mainTempoQpm", "mainKeySignature"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrImportedMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrImportedMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instruments": obj.get("instruments"), + "numberMeasures": obj.get("numberMeasures"), + "mainTempoQpm": obj.get("mainTempoQpm"), + "mainKeySignature": obj.get("mainKeySignature") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_instrument_override.py b/flat_api/models/omr_instrument_override.py new file mode 100644 index 0000000..984298c --- /dev/null +++ b/flat_api/models/omr_instrument_override.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrInstrumentOverride(BaseModel): + """ + Override for a single detected part, matched by `index`. Omitted fields keep the detected value. To set the instrument you may use **either** `instrumentId` (Flat's instrument id) **or** `midiProgram` (a standard General MIDI program) — whichever your integration prefers; you do not need both. If both are sent, `instrumentId` wins; otherwise `midiProgram` is resolved to the matching instrument; otherwise the detected instrument is kept. `transposeKey` and `partName` apply independently on top. + """ # noqa: E501 + index: Annotated[int, Field(strict=True, ge=0)] = Field(description="0-based position of the part to override, matching the `index` of the detected part.") + instrument_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(default=None, description="Override the resolved instrument with this Flat instrument id, for example `brass.horn`. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for valid values. Both the dotted `.` form (`brass.horn`) and the bare instrument key (`horn`) are accepted. Use this or `midiProgram`. Takes precedence over `midiProgram` when both are set. ", alias="instrumentId") + part_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Override the part name.", alias="partName") + transpose_key: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Override the transposition / written key: a pitch class as a letter `A`-`G` with an optional accidental. For example `F` for Horn in F or `Bb` for a B flat clarinet. The accidental may be ASCII `b` (flat) or `#` (sharp), or the Unicode music glyphs `♭` (U+266D) and `♯` (U+266F). Unicode accidentals are normalized to their ASCII equivalent, so `B♭` is stored and returned as `Bb`. ", alias="transposeKey") + midi_program: Optional[Annotated[int, Field(le=127, strict=True, ge=0)]] = Field(default=None, description="Override the instrument with a standard General MIDI program number (0-127), resolved server-side to the matching Flat instrument. Use this when you do not want to map Flat instrument ids. Ignored if `instrumentId` is also set. ", alias="midiProgram") + __properties: ClassVar[List[str]] = ["index", "instrumentId", "partName", "transposeKey", "midiProgram"] + + @field_validator('transpose_key', mode="before") + def transpose_key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^[A-G][b♭#♯]?$", value): + raise ValueError(r"must validate the regular expression /^[A-G][b♭#♯]?$/") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrInstrumentOverride from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrInstrumentOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "instrumentId": obj.get("instrumentId"), + "partName": obj.get("partName"), + "transposeKey": obj.get("transposeKey"), + "midiProgram": obj.get("midiProgram") + }) + return _obj + + diff --git a/flat_api/models/omr_job.py b/flat_api/models/omr_job.py new file mode 100644 index 0000000..7b76ff7 --- /dev/null +++ b/flat_api/models/omr_job.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.omr_imported_metadata import OmrImportedMetadata +from flat_api.models.omr_job_file_metadata import OmrJobFileMetadata +from flat_api.models.omr_job_output import OmrJobOutput +from flat_api.models.omr_job_progress import OmrJobProgress +from flat_api.models.omr_job_result import OmrJobResult +from flat_api.models.omr_job_retention import OmrJobRetention +from flat_api.models.omr_job_status import OmrJobStatus +from flat_api.models.omr_pending_step import OmrPendingStep +from flat_api.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJob(BaseModel): + """ + OmrJob + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier of the OMR job.") + status: OmrJobStatus + output: OmrJobOutput + interactive_steps: List[OmrStepName] = Field(description="Steps this job pauses at for client input, echoing the value set at creation.", alias="interactiveSteps") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. ") + current_step: Optional[OmrStepName] = Field(default=None, description="The pending step when `status` is `awaitingInput`. Omitted otherwise.", alias="currentStep") + pending_step: Optional[OmrPendingStep] = Field(default=None, alias="pendingStep") + estimated_credits: Optional[StrictInt] = Field(default=None, description="Credits that will be or were charged at start (page-based), so a client can show a confirmation before charging.", alias="estimatedCredits") + progress: Optional[OmrJobProgress] = None + original_file_metadata: Optional[OmrJobFileMetadata] = Field(default=None, alias="originalFileMetadata") + imported_metadata: Optional[OmrImportedMetadata] = Field(default=None, alias="importedMetadata") + result: Optional[OmrJobResult] = None + retention: Optional[OmrJobRetention] = None + error_code: Optional[StrictStr] = Field(default=None, description="Stable, engine-agnostic failure code, present when `status` is `error`. Branch on this for custom handling, and render `errorMessage` for the user-facing text. This is an open string: new codes may be added over time, so keep a generic fallback and never hardcode an exhaustive switch. Current values: * `NO_MUSIC_DETECTED`: no musical content found (poor scan, rotated page, or tablature). * `CORRUPTED_FILE`: the input file is corrupted and could not be read. * `UNSUPPORTED_FORMAT`: the file format or notation is not supported yet. * `UNSUPPORTED_TABLATURE`: the file is guitar tablature, not supported yet. * `ENCRYPTED_PDF`: the PDF is password-protected. * `TOO_LARGE`: the document is too large or has an unusual shape to process. * `ENGINE_TIMEOUT`: recognition took longer than expected and was stopped. * `GENERIC`: unspecified failure. ", alias="errorCode") + error_message: Optional[StrictStr] = Field(default=None, description="Localized, user-facing error message, present when `status` is `error`. Rendered in the caller's locale and safe to display as-is. Pair with `errorCode` for branching. ", alias="errorMessage") + creation_date: Optional[datetime] = Field(default=None, description="When the job was created.", alias="creationDate") + modification_date: Optional[datetime] = Field(default=None, description="When the job was last updated.", alias="modificationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJob from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pending_step + if self.pending_step: + _dict['pendingStep'] = self.pending_step.to_dict() + # override the default output from pydantic by calling `to_dict()` of progress + if self.progress: + _dict['progress'] = self.progress.to_dict() + # override the default output from pydantic by calling `to_dict()` of original_file_metadata + if self.original_file_metadata: + _dict['originalFileMetadata'] = self.original_file_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of imported_metadata + if self.imported_metadata: + _dict['importedMetadata'] = self.imported_metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of result + if self.result: + _dict['result'] = self.result.to_dict() + # override the default output from pydantic by calling `to_dict()` of retention + if self.retention: + _dict['retention'] = self.retention.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJob from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, + "interactiveSteps": obj.get("interactiveSteps"), + "locales": obj.get("locales"), + "currentStep": obj.get("currentStep"), + "pendingStep": OmrPendingStep.from_dict(obj["pendingStep"]) if obj.get("pendingStep") is not None else None, + "estimatedCredits": obj.get("estimatedCredits"), + "progress": OmrJobProgress.from_dict(obj["progress"]) if obj.get("progress") is not None else None, + "originalFileMetadata": OmrJobFileMetadata.from_dict(obj["originalFileMetadata"]) if obj.get("originalFileMetadata") is not None else None, + "importedMetadata": OmrImportedMetadata.from_dict(obj["importedMetadata"]) if obj.get("importedMetadata") is not None else None, + "result": OmrJobResult.from_dict(obj["result"]) if obj.get("result") is not None else None, + "retention": OmrJobRetention.from_dict(obj["retention"]) if obj.get("retention") is not None else None, + "errorCode": obj.get("errorCode"), + "errorMessage": obj.get("errorMessage"), + "creationDate": obj.get("creationDate"), + "modificationDate": obj.get("modificationDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_creation.py b/flat_api/models/omr_job_creation.py new file mode 100644 index 0000000..3bfdf71 --- /dev/null +++ b/flat_api/models/omr_job_creation.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.omr_job_input_file import OmrJobInputFile +from flat_api.models.omr_job_output import OmrJobOutput +from flat_api.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobCreation(BaseModel): + """ + Parameters to create an OMR job. Send without `files` to create a draft (then add files with `addOmrJobFile` and run `startOmrJob`), or include `files` and `autoStart: true` to import in a single request. + """ # noqa: E501 + output: Optional[OmrJobOutput] = OmrJobOutput.LIBRARY + interactive_steps: Optional[List[OmrStepName]] = Field(default=None, description="Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. ", alias="interactiveSteps") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. ") + collection: Optional[StrictStr] = Field(default=None, description="Target collection ID. Only used when `output` is `library`.") + idempotency_key: Optional[StrictStr] = Field(default=None, description="Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. ", alias="idempotencyKey") + files: Optional[List[OmrJobInputFile]] = Field(default=None, description="Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`.") + auto_start: Optional[StrictBool] = Field(default=None, description="Start processing immediately. Only valid when `files` is provided.", alias="autoStart") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "locales", "collection", "idempotencyKey", "files", "autoStart"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobCreation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in files (list) + _items = [] + if self.files: + for _item_files in self.files: + if _item_files: + _items.append(_item_files.to_dict()) + _dict['files'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobCreation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, + "interactiveSteps": obj.get("interactiveSteps"), + "locales": obj.get("locales"), + "collection": obj.get("collection"), + "idempotencyKey": obj.get("idempotencyKey"), + "files": [OmrJobInputFile.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None, + "autoStart": obj.get("autoStart") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_file_metadata.py b/flat_api/models/omr_job_file_metadata.py new file mode 100644 index 0000000..5401ef8 --- /dev/null +++ b/flat_api/models/omr_job_file_metadata.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileMetadata(BaseModel): + """ + Metadata about the uploaded input. + """ # noqa: E501 + number_of_pages: Optional[StrictInt] = Field(default=None, description="Total number of pages across all input files.", alias="numberOfPages") + file_count: Optional[StrictInt] = Field(default=None, description="Number of input files attached.", alias="fileCount") + filename: Optional[StrictStr] = Field(default=None, description="Original filename of the input as uploaded (of the first file when several were combined).") + file_size: Optional[StrictInt] = Field(default=None, description="Combined size of the input files, in bytes.", alias="fileSize") + mime_type: Optional[StrictStr] = Field(default=None, description="MIME type of the input (of the first file when several were combined).", alias="mimeType") + file_extension: Optional[StrictStr] = Field(default=None, description="File extension of the input, without the leading dot (for example `pdf`).", alias="fileExtension") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["numberOfPages", "fileCount", "filename", "fileSize", "mimeType", "fileExtension"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "numberOfPages": obj.get("numberOfPages"), + "fileCount": obj.get("fileCount"), + "filename": obj.get("filename"), + "fileSize": obj.get("fileSize"), + "mimeType": obj.get("mimeType"), + "fileExtension": obj.get("fileExtension") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_file_upload.py b/flat_api/models/omr_job_file_upload.py new file mode 100644 index 0000000..cc126d1 --- /dev/null +++ b/flat_api/models/omr_job_file_upload.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileUpload(BaseModel): + """ + One image or PDF added to a draft job. + """ # noqa: E501 + file: Union[StrictBytes, StrictStr] = Field(description="File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. ") + filename: Optional[StrictStr] = Field(default=None, description="Optional original filename, kept for display.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file", "filename"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileUpload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileUpload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": obj.get("file"), + "filename": obj.get("filename") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_file_upload_result.py b/flat_api/models/omr_job_file_upload_result.py new file mode 100644 index 0000000..a134b66 --- /dev/null +++ b/flat_api/models/omr_job_file_upload_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobFileUploadResult(BaseModel): + """ + Result of adding a file to a draft job. + """ # noqa: E501 + file_index: Optional[StrictInt] = Field(default=None, description="0-based index assigned to the uploaded file.", alias="fileIndex") + file_count: Optional[StrictInt] = Field(default=None, description="Total number of files now attached to the job.", alias="fileCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fileIndex", "fileCount"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobFileUploadResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobFileUploadResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fileIndex": obj.get("fileIndex"), + "fileCount": obj.get("fileCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_input_file.py b/flat_api/models/omr_job_input_file.py new file mode 100644 index 0000000..9436102 --- /dev/null +++ b/flat_api/models/omr_job_input_file.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobInputFile(BaseModel): + """ + A single image or PDF input, base64-encoded. + """ # noqa: E501 + file: Union[StrictBytes, StrictStr] = Field(description="File data, base64-encoded. The type is read from the content itself, so no declared MIME type or filename extension is needed. Accepted types are listed by `getOmrCapabilities` in `acceptedMimeTypes`. ") + filename: Optional[StrictStr] = Field(default=None, description="Optional original filename, kept for display.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file", "filename"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobInputFile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobInputFile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": obj.get("file"), + "filename": obj.get("filename") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_output.py b/flat_api/models/omr_job_output.py new file mode 100644 index 0000000..0c56c06 --- /dev/null +++ b/flat_api/models/omr_job_output.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrJobOutput(str, Enum): + """ + Where the result of the job goes. * `library`: import the result into the Flat Library and create a score (default). * `musicxml`: finalize the result only, downloadable via `getOmrJobExport`. No score is created, for third-party integrations that do not use the Library. + """ + + """ + allowed enum values + """ + LIBRARY = 'library' + MUSICXML = 'musicxml' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrJobOutput from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/omr_job_progress.py b/flat_api/models/omr_job_progress.py new file mode 100644 index 0000000..7fb0288 --- /dev/null +++ b/flat_api/models/omr_job_progress.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobProgress(BaseModel): + """ + Live progress while the job is processing. + """ # noqa: E501 + percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Completion percentage (0-100).") + text: Optional[StrictStr] = Field(default=None, description="Localized progress message, ready to display.") + key: Optional[StrictStr] = Field(default=None, description="Stable progress key (for example `OMR_QUEUED`, `OMR_PROCESSING_PAGE`, `OMR_CREATING_SCORE`), for matching the current phase in a stepper UI independent of locale. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["percent", "text", "key"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobProgress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobProgress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "percent": obj.get("percent"), + "text": obj.get("text"), + "key": obj.get("key") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_result.py b/flat_api/models/omr_job_result.py new file mode 100644 index 0000000..d93b0e5 --- /dev/null +++ b/flat_api/models/omr_job_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobResult(BaseModel): + """ + The outcome of a finished job. Present when `status` is `done`. + """ # noqa: E501 + score: Optional[StrictStr] = Field(default=None, description="Created score ID, when `output` is `library`.") + exports: Optional[List[StrictStr]] = Field(default=None, description="Formats available via `getOmrJobExport`, for example `[\"musicxml\", \"mxl\", \"midi\"]`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["score", "exports"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "exports": obj.get("exports") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_retention.py b/flat_api/models/omr_job_retention.py new file mode 100644 index 0000000..edb00b5 --- /dev/null +++ b/flat_api/models/omr_job_retention.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrJobRetention(BaseModel): + """ + Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. + """ # noqa: E501 + expiry_date: datetime = Field(description="When this job's uploaded files and recognition results become eligible for erasure. Fixed when the job is created: changing the account's retention period does not move the deadline of jobs that already exist. ", alias="expiryDate") + expired_date: Optional[datetime] = Field(default=None, description="When the job's stored files were actually erased. Present only once that happened. An expired job keeps the `status` it finished with and stays listable, but its `result` is no longer served and downloads fail with `OMR_JOB_EXPIRED`. ", alias="expiredDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["expiryDate", "expiredDate"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrJobRetention from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrJobRetention from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "expiryDate": obj.get("expiryDate"), + "expiredDate": obj.get("expiredDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_job_status.py b/flat_api/models/omr_job_status.py new file mode 100644 index 0000000..9552bf2 --- /dev/null +++ b/flat_api/models/omr_job_status.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrJobStatus(str, Enum): + """ + Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. + """ + + """ + allowed enum values + """ + DRAFT = 'draft' + PROCESSING = 'processing' + AWAITINGINPUT = 'awaitingInput' + DONE = 'done' + ERROR = 'error' + CANCELED = 'canceled' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrJobStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/omr_locale_details.py b/flat_api/models/omr_locale_details.py new file mode 100644 index 0000000..6541760 --- /dev/null +++ b/flat_api/models/omr_locale_details.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrLocaleDetails(BaseModel): + """ + An OCR-selectable locale with its English name. + """ # noqa: E501 + code: StrictStr = Field(description="BCP 47 locale code. Always one of the codes listed in `locales`.", json_schema_extra={"examples": ["vi"]}) + name: StrictStr = Field(description="English name of the language, for display in a picker.", json_schema_extra={"examples": ["Vietnamese"]}) + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrLocaleDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrLocaleDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_pending_step.py b/flat_api/models/omr_pending_step.py new file mode 100644 index 0000000..66a3fe4 --- /dev/null +++ b/flat_api/models/omr_pending_step.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flat_api.models.omr_details_step_data import OmrDetailsStepData +from flat_api.models.omr_step_name import OmrStepName +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OmrPendingStep(BaseModel): + """ + The step currently awaiting client input. The `data` shape is keyed by `step`. + """ # noqa: E501 + step: OmrStepName + data: OmrDetailsStepData + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["step", "data"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OmrPendingStep from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OmrPendingStep from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "step": obj.get("step"), + "data": OmrDetailsStepData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/omr_step_name.py b/flat_api/models/omr_step_name.py new file mode 100644 index 0000000..cdc12c5 --- /dev/null +++ b/flat_api/models/omr_step_name.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OmrStepName(str, Enum): + """ + Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. + """ + + """ + allowed enum values + """ + DETAILS = 'details' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OmrStepName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index f2a3812..bf6d1e7 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,11 +19,12 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.organization_roles import OrganizationRoles from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class OrganizationInvitation(BaseModel): """ @@ -36,15 +37,18 @@ class OrganizationInvitation(BaseModel): custom_code: Optional[StrictStr] = Field(description="Enrollment code to use when joining this organization", alias="customCode") email: Optional[StrictStr] = Field(default=None, description="The email address this invitation was sent to") invited_by: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User who created this invitation", alias="invitedBy") + html_url: Optional[StrictStr] = Field(default=None, description="URL to join the organization using this invitation", alias="htmlUrl") allow_multiple_use: StrictBool = Field(description="If true, the invitation can be used multiple times. If false, the invitation can only be used once. ", alias="allowMultipleUse") used_by: Optional[List[StrictStr]] = Field(default=None, description="List of users who used this invitation", alias="usedBy") - __properties: ClassVar[List[str]] = ["id", "creationDate", "organization", "organizationRole", "customCode", "email", "invitedBy", "allowMultipleUse", "usedBy"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "organization", "organizationRole", "customCode", "email", "invitedBy", "htmlUrl", "allowMultipleUse", "usedBy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,8 +57,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -70,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -79,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if custom_code (nullable) is None # and model_fields_set contains the field if self.custom_code is None and "custom_code" in self.model_fields_set: @@ -103,9 +113,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "customCode": obj.get("customCode"), "email": obj.get("email"), "invitedBy": obj.get("invitedBy"), + "htmlUrl": obj.get("htmlUrl"), "allowMultipleUse": obj.get("allowMultipleUse"), "usedBy": obj.get("usedBy") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index db09d76..a86e925 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class OrganizationInvitationCreation(BaseModel): """ @@ -29,6 +30,7 @@ class OrganizationInvitationCreation(BaseModel): """ # noqa: E501 email: Optional[StrictStr] = Field(default=None, description="The email address you want to send the invitation to") organization_role: Optional[StrictStr] = Field(default='teacher', description="User's Organization Role", alias="organizationRole") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["email", "organizationRole"] @field_validator('organization_role') @@ -37,15 +39,16 @@ def organization_role_validate_enum(cls, value): if value is None: return value - if value not in set(['admin', 'teacher']): - raise ValueError("must be one of enum values ('admin', 'teacher')") + if value not in set(['admin', 'teacher', 'accountAdmin']): + raise ValueError("must be one of enum values ('admin', 'teacher', 'accountAdmin')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,8 +57,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -71,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "email": obj.get("email"), "organizationRole": obj.get("organizationRole") if obj.get("organizationRole") is not None else 'teacher' }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index 6b6ed95..3b45067 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class OrganizationRoles(str, Enum): allowed enum values """ ADMIN = 'admin' - BILLING = 'billing' + ACCOUNTADMIN = 'accountAdmin' TEACHER = 'teacher' USER = 'user' diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py index 91c6cdb..d61a820 100644 --- a/flat_api/models/organization_user_access_token_creation.py +++ b/flat_api/models/organization_user_access_token_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,24 +18,27 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from flat_api.models.app_scopes import AppScopes from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class OrganizationUserAccessTokenCreation(BaseModel): """ Creation of a delegated API access token for an organization user """ # noqa: E501 scopes: List[AppScopes] = Field(description="List of requested scopes for this credential") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["scopes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "scopes": obj.get("scopes") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/rename_group_request.py b/flat_api/models/rename_group_request.py new file mode 100644 index 0000000..5b397fc --- /dev/null +++ b/flat_api/models/rename_group_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class RenameGroupRequest(BaseModel): + """ + RenameGroupRequest + """ # noqa: E501 + name: StrictStr = Field(description="New name for the group") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RenameGroupRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RenameGroupRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index 2ac6008..c12da4e 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,21 +19,22 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.group import Group from flat_api.models.user_public import UserPublic from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ResourceCollaborator(BaseModel): """ - ResourceCollaborator + A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). """ # noqa: E501 acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") - is_collaborator: StrictBool = Field(description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + is_collaborator: Optional[StrictBool] = Field(default=False, description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the permission") var_date: Optional[datetime] = Field(default=None, description="The date when the permission was added", alias="date") @@ -43,6 +44,7 @@ class ResourceCollaborator(BaseModel): group: Optional[Group] = None user_email: Optional[StrictStr] = Field(default=None, description="If the collaborator is not a user of Flat yet, this field will contain their email. ", alias="userEmail") invited: Optional[StrictBool] = Field(default=None, description="If this property is `true`, this is still a pending invitation ") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType", "id", "date", "score", "collection", "user", "group", "userEmail", "invited"] @field_validator('collaborator_type') @@ -55,11 +57,12 @@ def collaborator_type_validate_enum(cls, value): raise ValueError("must be one of enum values ('owner', 'user', 'group')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,8 +71,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -85,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -100,6 +104,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of group if self.group: _dict['group'] = self.group.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -126,6 +135,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userEmail": obj.get("userEmail"), "invited": obj.get("invited") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index f8a5af1..ab56cf7 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ResourceCollaboratorCreation(BaseModel): """ @@ -34,13 +35,15 @@ class ResourceCollaboratorCreation(BaseModel): acl_read: Optional[StrictBool] = Field(default=True, description="`True` if the related user can read the score. (probably true if the user has a permission on the document). ", alias="aclRead") acl_write: Optional[StrictBool] = Field(default=False, description="`True` if the related user can modify the score. ", alias="aclWrite") acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,8 +52,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "aclWrite": obj.get("aclWrite") if obj.get("aclWrite") is not None else False, "aclAdmin": obj.get("aclAdmin") if obj.get("aclAdmin") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index e25a256..edcaeff 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ResourceRights(BaseModel): """ @@ -30,8 +31,9 @@ class ResourceRights(BaseModel): acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") acl_admin: StrictBool = Field(description="`True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclAdmin") - is_collaborator: StrictBool = Field(description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") + is_collaborator: Optional[StrictBool] = Field(default=False, description="`True` if the current user is a collaborator of the current document (direct or via group). ", alias="isCollaborator") collaborator_type: Optional[StrictStr] = Field(default=None, description="The type of the collaborator for the resource ", alias="collaboratorType") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["aclRead", "aclWrite", "aclAdmin", "isCollaborator", "collaboratorType"] @field_validator('collaborator_type') @@ -44,11 +46,12 @@ def collaborator_type_validate_enum(cls, value): raise ValueError("must be one of enum values ('owner', 'user', 'group')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,8 +60,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -74,8 +76,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -83,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -101,6 +110,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isCollaborator": obj.get("isCollaborator") if obj.get("isCollaborator") is not None else False, "collaboratorType": obj.get("collaboratorType") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index a298c99..8c9eef7 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,50 +19,50 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_comment_context import ScoreCommentContext from flat_api.models.score_comment_moderation import ScoreCommentModeration from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreComment(BaseModel): """ Comment added on a sheet music """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The comment unique identifier") - type: Optional[StrictStr] = Field(default=None, description="The type of the comment") - user: Optional[StrictStr] = Field(default=None, description="The author unique identifier") - score: Optional[StrictStr] = Field(default=None, description="The unique identifier of the score where the comment was posted") + id: StrictStr = Field(description="The comment unique identifier") + type: StrictStr = Field(description="The type of the comment") + user: StrictStr = Field(description="The author unique identifier") + score: StrictStr = Field(description="The unique identifier of the score where the comment was posted") revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of revision the comment was posted") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") - var_date: Optional[datetime] = Field(default=None, description="The date when the comment was posted", alias="date") + var_date: datetime = Field(description="The date when the comment was posted", alias="date") modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") - comment: Optional[StrictStr] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") - raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") + comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + raw_comment: StrictStr = Field(description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") context: Optional[ScoreCommentContext] = None mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifier mentioned on the score") resolved: Optional[StrictBool] = Field(default=None, description="For inline comments, the comment can be marked as resolved and will be hidden in the future responses ") resolved_by: Optional[StrictStr] = Field(default=None, description="If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") moderation: Optional[ScoreCommentModeration] = None spam: Optional[StrictBool] = Field(default=None, description="`true if the message has been detected as spam and hidden from other users ") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam"] @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value is None: - return value - if value not in set(['document', 'inline']): raise ValueError("must be one of enum values ('document', 'inline')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -71,8 +71,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -88,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -103,6 +104,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of moderation if self.moderation: _dict['moderation'] = self.moderation.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -132,6 +138,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "moderation": ScoreCommentModeration.from_dict(obj["moderation"]) if obj.get("moderation") is not None else None, "spam": obj.get("spam") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index a8185d9..c5a2e64 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCommentContext(BaseModel): """ @@ -35,13 +36,15 @@ class ScoreCommentContext(BaseModel): stop_time_pos: Union[StrictFloat, StrictInt] = Field(alias="stopTimePos") start_dpq: Union[StrictFloat, StrictInt] = Field(alias="startDpq") stop_dpq: Union[StrictFloat, StrictInt] = Field(alias="stopDpq") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["partUuid", "staffIdx", "staffUuid", "measureUuids", "startTimePos", "stopTimePos", "startDpq", "stopDpq"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,8 +53,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -97,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "startDpq": obj.get("startDpq"), "stopDpq": obj.get("stopDpq") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index 5b2c980..b49de54 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,29 +18,32 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_comment_context import ScoreCommentContext from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCommentCreation(BaseModel): """ Creation of a comment """ # noqa: E501 - revision: Optional[StrictStr] = Field(default=None, description="The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") context: Optional[ScoreCommentContext] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "mentions", "replyTo", "context"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,8 +52,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -78,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of context if self.context: _dict['context'] = self.context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -97,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "replyTo": obj.get("replyTo"), "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py index ced5e95..71918c5 100644 --- a/flat_api/models/score_comment_moderation.py +++ b/flat_api/models/score_comment_moderation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCommentModeration(BaseModel): """ @@ -29,6 +30,7 @@ class ScoreCommentModeration(BaseModel): """ # noqa: E501 hidden: Optional[StrictBool] = Field(default=None, description="If true, this comment will be hidden from other users") reason: Optional[StrictStr] = Field(default=None, description="If the comment is hidden, the reason why this one has been moderated") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["hidden", "reason"] @field_validator('reason') @@ -41,11 +43,12 @@ def reason_validate_enum(cls, value): raise ValueError("must be one of enum values ('spam', 'inappropriate')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,8 +57,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -71,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hidden": obj.get("hidden"), "reason": obj.get("reason") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index ef245d0..7591f27 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,28 +18,31 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.score_comment_context import ScoreCommentContext from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCommentUpdate(BaseModel): """ Update of a comment """ # noqa: E501 - revision: Optional[StrictStr] = Field(default=None, description="The unique indentifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") raw_comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") context: Optional[ScoreCommentContext] = None + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["revision", "comment", "rawComment", "context"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,8 +51,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of context if self.context: _dict['context'] = self.context.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "rawComment": obj.get("rawComment"), "context": ScoreCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index e468184..eff64ff 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,30 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCommentsCounts(BaseModel): """ - A computed version of the total, unique, weekly and monthly number of comments added on the documents (this doesn't include inline comments). + A computed version of the total, unique, weekly, monthly and yearly number of comments added on the documents (this doesn't include inline comments). """ # noqa: E501 total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of comments added to the score") unique: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The unique (1/user) number of comments added to the score") weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly unique number of comments added to the score") monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly unique number of comments added to the score") - __properties: ClassVar[List[str]] = ["total", "unique", "weekly", "monthly"] + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly unique number of comments added to the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "unique", "weekly", "monthly", "yearly"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +50,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,8 +97,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "total": obj.get("total"), "unique": obj.get("unique"), "weekly": obj.get("weekly"), - "monthly": obj.get("monthly") + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index 9d3716b..687951b 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,110 +14,139 @@ from __future__ import annotations -import pprint -import re # noqa: F401 import json - -from pydantic import BaseModel, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData -from flat_api.models.score_privacy import ScorePrivacy -from flat_api.models.score_source import ScoreSource -from typing import Optional, Set -from typing_extensions import Self +from flat_api.models.score_creation_file_import import ScoreCreationFileImport +from flat_api.models.score_creation_google_drive_import import ScoreCreationGoogleDriveImport +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SCORECREATION_ONE_OF_SCHEMAS = ["ScoreCreationBuilderData", "ScoreCreationFileImport", "ScoreCreationGoogleDriveImport"] class ScoreCreation(BaseModel): """ ScoreCreation - """ # noqa: E501 - title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") - privacy: Optional[ScorePrivacy] = None - collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will be stored in the `root` directory. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") - builder_data: Optional[ScoreCreationBuilderData] = Field(default=None, alias="builderData") - filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") - data: Optional[StrictStr] = Field(default=None, description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") - data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") - source: Optional[ScoreSource] = None - __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData", "filename", "data", "dataEncoding", "source"] - - @field_validator('data_encoding') - def data_encoding_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['base64']): - raise ValueError("must be one of enum values ('base64')") - return value - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + """ + # data type: ScoreCreationBuilderData + oneof_schema_1_validator: Optional[ScoreCreationBuilderData] = None + # data type: ScoreCreationFileImport + oneof_schema_2_validator: Optional[ScoreCreationFileImport] = None + # data type: ScoreCreationGoogleDriveImport + oneof_schema_3_validator: Optional[ScoreCreationGoogleDriveImport] = None + actual_instance: Optional[Union[ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport]] = None + one_of_schemas: Set[str] = { "ScoreCreationBuilderData", "ScoreCreationFileImport", "ScoreCreationGoogleDriveImport" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ScoreCreation.model_construct() + error_messages = [] + match = 0 + # validate data type: ScoreCreationBuilderData + if not isinstance(v, ScoreCreationBuilderData): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationBuilderData`") + else: + match += 1 + # validate data type: ScoreCreationFileImport + if not isinstance(v, ScoreCreationFileImport): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationFileImport`") + else: + match += 1 + # validate data type: ScoreCreationGoogleDriveImport + if not isinstance(v, ScoreCreationGoogleDriveImport): + error_messages.append(f"Error! Input type `{type(v)}` is not `ScoreCreationGoogleDriveImport`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + else: + return v @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ScoreCreation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of builder_data - if self.builder_data: - _dict['builderData'] = self.builder_data.to_dict() - # override the default output from pydantic by calling `to_dict()` of source - if self.source: - _dict['source'] = self.source.to_dict() - return _dict + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ScoreCreation from a dict""" - if obj is None: + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ScoreCreationBuilderData + try: + instance.actual_instance = ScoreCreationBuilderData.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ScoreCreationFileImport + try: + instance.actual_instance = ScoreCreationFileImport.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ScoreCreationGoogleDriveImport + try: + instance.actual_instance = ScoreCreationGoogleDriveImport.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ScoreCreation with oneOf schemas: ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ScoreCreationBuilderData, ScoreCreationFileImport, ScoreCreationGoogleDriveImport]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: return None - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "title": obj.get("title"), - "privacy": obj.get("privacy"), - "collection": obj.get("collection"), - "googleDriveFolder": obj.get("googleDriveFolder"), - "builderData": ScoreCreationBuilderData.from_dict(obj["builderData"]) if obj.get("builderData") is not None else None, - "filename": obj.get("filename"), - "data": obj.get("data"), - "dataEncoding": obj.get("dataEncoding"), - "source": ScoreSource.from_dict(obj["source"]) if obj.get("source") is not None else None - }) - return _obj + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py index 51f3dcc..da6c6a5 100644 --- a/flat_api/models/score_creation_builder_data.py +++ b/flat_api/models/score_creation_builder_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,26 +18,32 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData +from flat_api.models.score_creation_builder_data_all_of_builder_data import ScoreCreationBuilderDataAllOfBuilderData +from flat_api.models.score_privacy import ScorePrivacy from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreCreationBuilderData(BaseModel): """ ScoreCreationBuilderData """ # noqa: E501 - score_data: ScoreCreationBuilderDataScoreData = Field(alias="scoreData") - layout_data: Optional[ScoreCreationBuilderDataLayoutData] = Field(default=None, alias="layoutData") - __properties: ClassVar[List[str]] = ["scoreData", "layoutData"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + builder_data: ScoreCreationBuilderDataAllOfBuilderData = Field(alias="builderData") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -46,8 +52,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -63,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,12 +79,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of score_data - if self.score_data: - _dict['scoreData'] = self.score_data.to_dict() - # override the default output from pydantic by calling `to_dict()` of layout_data - if self.layout_data: - _dict['layoutData'] = self.layout_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of builder_data + if self.builder_data: + _dict['builderData'] = self.builder_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -90,9 +99,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "scoreData": ScoreCreationBuilderDataScoreData.from_dict(obj["scoreData"]) if obj.get("scoreData") is not None else None, - "layoutData": ScoreCreationBuilderDataLayoutData.from_dict(obj["layoutData"]) if obj.get("layoutData") is not None else None + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "builderData": ScoreCreationBuilderDataAllOfBuilderData.from_dict(obj["builderData"]) if obj.get("builderData") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data.py new file mode 100644 index 0000000..972e1d9 --- /dev/null +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_creation_builder_data_all_of_builder_data_layout_data import ScoreCreationBuilderDataAllOfBuilderDataLayoutData +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data import ScoreCreationBuilderDataAllOfBuilderDataScoreData +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderData(BaseModel): + """ + ScoreCreationBuilderDataAllOfBuilderData + """ # noqa: E501 + score_data: ScoreCreationBuilderDataAllOfBuilderDataScoreData = Field(alias="scoreData") + layout_data: Optional[ScoreCreationBuilderDataAllOfBuilderDataLayoutData] = Field(default=None, alias="layoutData") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["scoreData", "layoutData"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of score_data + if self.score_data: + _dict['scoreData'] = self.score_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of layout_data + if self.layout_data: + _dict['layoutData'] = self.layout_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scoreData": ScoreCreationBuilderDataAllOfBuilderDataScoreData.from_dict(obj["scoreData"]) if obj.get("scoreData") is not None else None, + "layoutData": ScoreCreationBuilderDataAllOfBuilderDataLayoutData.from_dict(obj["layoutData"]) if obj.get("layoutData") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py new file mode 100644 index 0000000..8c1a30e --- /dev/null +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderDataLayoutData(BaseModel): + """ + Control the appearance of the score. If missing, default values are used. + """ # noqa: E501 + notes_spacing_coeff: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="A float value >= 1 that controls the spacing between notes.", alias="notesSpacingCoeff") + length_unit: Optional[StrictStr] = Field(default='cm', description="The unit to use for layout customizations", alias="lengthUnit") + page_height: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The height of the page in chosen unit (`lengthUnit`).", alias="pageHeight") + page_width: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The width of the page in chosen unit (`lengthUnit`).", alias="pageWidth") + page_margin_top: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The top margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginTop") + page_margin_bottom: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The bottom margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginBottom") + page_margin_left: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The left margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginLeft") + page_margin_right: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The right margin of the page in chosen unit (`lengthUnit`).", alias="pageMarginRight") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["notesSpacingCoeff", "lengthUnit", "pageHeight", "pageWidth", "pageMarginTop", "pageMarginBottom", "pageMarginLeft", "pageMarginRight"] + + @field_validator('length_unit') + def length_unit_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['cm', 'inch']): + raise ValueError("must be one of enum values ('cm', 'inch')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataLayoutData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notesSpacingCoeff": obj.get("notesSpacingCoeff"), + "lengthUnit": obj.get("lengthUnit") if obj.get("lengthUnit") is not None else 'cm', + "pageHeight": obj.get("pageHeight"), + "pageWidth": obj.get("pageWidth"), + "pageMarginTop": obj.get("pageMarginTop"), + "pageMarginBottom": obj.get("pageMarginBottom"), + "pageMarginLeft": obj.get("pageMarginLeft"), + "pageMarginRight": obj.get("pageMarginRight") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py new file mode 100644 index 0000000..5213b3f --- /dev/null +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from flat_api.models.score_creation_builder_data_all_of_builder_data_score_data_instruments import ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderDataScoreData(BaseModel): + """ + ScoreCreationBuilderDataAllOfBuilderDataScoreData + """ # noqa: E501 + use_tab_staff: Optional[StrictBool] = Field(default=None, description="true if the TAB staff is displayed with fretted instruments", alias="useTabStaff") + use_chord_grid: Optional[StrictBool] = Field(default=None, description="true if the chord grid must be displayed with fretted instruments", alias="useChordGrid") + fifths: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.") + nb_beats: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of beats in the measure", alias="nbBeats") + beat_type: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The duration of a beat in the measure", alias="beatType") + instruments: List[ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments] = Field(description="The list of instruments to add to the score. See the [Instrument IDs reference](https://flat.io/developers/docs/api/instruments) for the possible values for `group` and `instrument` (also available as the [`@flat/instruments`](https://www.npmjs.com/package/@flat/instruments) package). ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) + _items = [] + if self.instruments: + for _item_instruments in self.instruments: + if _item_instruments: + _items.append(_item_instruments.to_dict()) + _dict['instruments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "useTabStaff": obj.get("useTabStaff"), + "useChordGrid": obj.get("useChordGrid"), + "fifths": obj.get("fifths"), + "nbBeats": obj.get("nbBeats"), + "beatType": obj.get("beatType"), + "instruments": [ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py new file mode 100644 index 0000000..f60153a --- /dev/null +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments(BaseModel): + """ + ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments + """ # noqa: E501 + group: StrictStr = Field(description="The of the instrument group (e.g. `keyboards`, `brass`)") + instrument: StrictStr = Field(description="The identifier of the instrument (e.g. `piano`, `trumpet`)") + long_name: Optional[StrictStr] = Field(default=None, description="The full name of the instrument", alias="longName") + short_name: Optional[StrictStr] = Field(default=None, description="The abbreviation of the name of the instrument", alias="shortName") + has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tone (prevent the part to have a TAB/chord grid)", alias="hasQuarterTone") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group", "instrument", "longName", "shortName", "hasQuarterTone"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group": obj.get("group"), + "instrument": obj.get("instrument"), + "longName": obj.get("longName"), + "shortName": obj.get("shortName"), + "hasQuarterTone": obj.get("hasQuarterTone") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_score_data.py deleted file mode 100644 index 94423f3..0000000 --- a/flat_api/models/score_creation_builder_data_score_data.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner -from typing import Optional, Set -from typing_extensions import Self - -class ScoreCreationBuilderDataScoreData(BaseModel): - """ - ScoreCreationBuilderDataScoreData - """ # noqa: E501 - use_tab_staff: Optional[StrictBool] = Field(default=None, description="true if the TAB staff is displayed with fretted instruments", alias="useTabStaff") - use_chord_grid: Optional[StrictBool] = Field(default=None, description="true if the chord grid must be displayed with fretted instruments", alias="useChordGrid") - fifths: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The key signature of the score (expressed between -7 and 7). Major C is used when the value is not provided.") - nb_beats: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of beats in the measure", alias="nbBeats") - beat_type: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The duration of a beat in the measure", alias="beatType") - instruments: List[ScoreCreationBuilderDataScoreDataInstrumentsInner] = Field(description="The list of instruments to add to the score. See https://prod.flat-cdn.com/fixtures/instruments_en.json for the possible values for `group` and `instrument`. ") - __properties: ClassVar[List[str]] = ["useTabStaff", "useChordGrid", "fifths", "nbBeats", "beatType", "instruments"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataScoreData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in instruments (list) - _items = [] - if self.instruments: - for _item in self.instruments: - if _item: - _items.append(_item.to_dict()) - _dict['instruments'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ScoreCreationBuilderDataScoreData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "useTabStaff": obj.get("useTabStaff"), - "useChordGrid": obj.get("useChordGrid"), - "fifths": obj.get("fifths"), - "nbBeats": obj.get("nbBeats"), - "beatType": obj.get("beatType"), - "instruments": [ScoreCreationBuilderDataScoreDataInstrumentsInner.from_dict(_item) for _item in obj["instruments"]] if obj.get("instruments") is not None else None - }) - return _obj - - diff --git a/flat_api/models/score_creation_common.py b/flat_api/models/score_creation_common.py new file mode 100644 index 0000000..9b79f84 --- /dev/null +++ b/flat_api/models/score_creation_common.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationCommon(BaseModel): + """ + ScoreCreationCommon + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationCommon from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationCommon from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_file_import.py b/flat_api/models/score_creation_file_import.py new file mode 100644 index 0000000..7051ff9 --- /dev/null +++ b/flat_api/models/score_creation_file_import.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_privacy import ScorePrivacy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationFileImport(BaseModel): + """ + ScoreCreationFileImport + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") + data: StrictStr = Field(description="The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") + data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") + supports_tasks: Optional[StrictBool] = Field(default=None, description="Set this to `true` if the client supports asynchronous task flows. When importing a score that requires OMR processing (a PDF or a page image), the API will return a 202 Accepted response along with a task reference. The client can then check the task status using the endpoint `GET /v2/tasks/{task}`. ", alias="supportsTasks") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "filename", "data", "dataEncoding", "supportsTasks"] + + @field_validator('data_encoding') + def data_encoding_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['base64']): + raise ValueError("must be one of enum values ('base64')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationFileImport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationFileImport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "filename": obj.get("filename"), + "data": obj.get("data"), + "dataEncoding": obj.get("dataEncoding"), + "supportsTasks": obj.get("supportsTasks") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_google_drive_import.py b/flat_api/models/score_creation_google_drive_import.py new file mode 100644 index 0000000..0a340de --- /dev/null +++ b/flat_api/models/score_creation_google_drive_import.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.score_source import ScoreSource +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreCreationGoogleDriveImport(BaseModel): + """ + ScoreCreationGoogleDriveImport + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + source: ScoreSource + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "source"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreCreationGoogleDriveImport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreCreationGoogleDriveImport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "collection": obj.get("collection"), + "googleDriveFolder": obj.get("googleDriveFolder"), + "source": ScoreSource.from_dict(obj["source"]) if obj.get("source") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index f512b5a..27d1340 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,6 @@ class ScoreCreationType(str, Enum): ORIGINAL = 'original' ARRANGEMENT = 'arrangement' OTHER = 'other' - NULL = 'null' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index 97e7882..ecf80a9 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,14 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from flat_api.models.resource_collaborator import ResourceCollaborator from flat_api.models.resource_rights import ResourceRights from flat_api.models.score_comments_counts import ScoreCommentsCounts from flat_api.models.score_creation_type import ScoreCreationType +from flat_api.models.score_details_all_of_me import ScoreDetailsAllOfMe from flat_api.models.score_license import ScoreLicense from flat_api.models.score_likes_counts import ScoreLikesCounts from flat_api.models.score_plays_counts import ScorePlaysCounts @@ -34,10 +35,11 @@ from flat_api.models.user_public import UserPublic from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreDetails(BaseModel): """ - ScoreDetails + The score and all its details """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the score") sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the score (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") @@ -45,6 +47,7 @@ class ScoreDetails(BaseModel): privacy: ScorePrivacy user: UserPublic html_url: StrictStr = Field(description="The url where the score can be viewed in a web browser", alias="htmlUrl") + edit_html_url: StrictStr = Field(description="The url where the score can be edited in a web browser", alias="editHtmlUrl") subtitle: Optional[StrictStr] = Field(default=None, description="Subtitle of the score") lyricist: Optional[StrictStr] = Field(default=None, description="Lyricist of the score") arranger: Optional[StrictStr] = Field(default=None, description="Arranger of the score") @@ -59,28 +62,33 @@ class ScoreDetails(BaseModel): main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main tempo of the score (in QPM)", alias="mainTempoQpm") main_key_signature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main key signature of the score (expressed between -7 and 7).", alias="mainKeySignature") rights: Optional[ResourceRights] = None - collaborators: Optional[List[ResourceCollaborator]] = Field(default=None, description="The list of the collaborators of the score") - creation_date: Optional[datetime] = Field(default=None, description="The date when the score was created", alias="creationDate") + collaborators: List[ResourceCollaborator] = Field(description="The list of the collaborators of the score") + creation_date: datetime = Field(description="The date when the score was created", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The date of the last revision of the score", alias="modificationDate") publication_date: Optional[datetime] = Field(default=None, description="The date when the score was published on Flat", alias="publicationDate") + scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") highlighted_date: Optional[datetime] = Field(default=None, description="The date when the score was highlighted (featured) on our community", alias="highlightedDate") organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. ") parent_score: Optional[StrictStr] = Field(default=None, description="If the score has been forked, the unique identifier of the parent score. ", alias="parentScore") - instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") - samples: Optional[List[StrictStr]] = Field(default=None, description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") + instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") + instruments_names: List[StrictStr] = Field(description="An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. ", alias="instrumentsNames") + samples: List[StrictStr] = Field(description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` ", alias="googleDriveFileId") likes: Optional[ScoreLikesCounts] = None comments: Optional[ScoreCommentsCounts] = None views: Optional[ScoreViewsCounts] = None plays: Optional[ScorePlaysCounts] = None collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") - __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "highlightedDate", "organization", "parentScore", "instruments", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections"] + me: Optional[ScoreDetailsAllOfMe] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "editHtmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "scheduledDeletionDate", "highlightedDate", "organization", "parentScore", "instruments", "instrumentsNames", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", "me"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -89,8 +97,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -106,8 +113,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -124,9 +133,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in collaborators (list) _items = [] if self.collaborators: - for _item in self.collaborators: - if _item: - _items.append(_item.to_dict()) + for _item_collaborators in self.collaborators: + if _item_collaborators: + _items.append(_item_collaborators.to_dict()) _dict['collaborators'] = _items # override the default output from pydantic by calling `to_dict()` of likes if self.likes: @@ -140,6 +149,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of plays if self.plays: _dict['plays'] = self.plays.to_dict() + # override the default output from pydantic by calling `to_dict()` of me + if self.me: + _dict['me'] = self.me.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if creation_type (nullable) is None # and model_fields_set contains the field if self.creation_type is None and "creation_type" in self.model_fields_set: @@ -165,9 +182,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "sharingKey": obj.get("sharingKey"), "title": obj.get("title"), - "privacy": obj.get("privacy"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, "htmlUrl": obj.get("htmlUrl"), + "editHtmlUrl": obj.get("editHtmlUrl"), "subtitle": obj.get("subtitle"), "lyricist": obj.get("lyricist"), "arranger": obj.get("arranger"), @@ -186,18 +204,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creationDate": obj.get("creationDate"), "modificationDate": obj.get("modificationDate"), "publicationDate": obj.get("publicationDate"), + "scheduledDeletionDate": obj.get("scheduledDeletionDate"), "highlightedDate": obj.get("highlightedDate"), "organization": obj.get("organization"), "parentScore": obj.get("parentScore"), "instruments": obj.get("instruments"), + "instrumentsNames": obj.get("instrumentsNames"), "samples": obj.get("samples"), "googleDriveFileId": obj.get("googleDriveFileId"), "likes": ScoreLikesCounts.from_dict(obj["likes"]) if obj.get("likes") is not None else None, "comments": ScoreCommentsCounts.from_dict(obj["comments"]) if obj.get("comments") is not None else None, "views": ScoreViewsCounts.from_dict(obj["views"]) if obj.get("views") is not None else None, "plays": ScorePlaysCounts.from_dict(obj["plays"]) if obj.get("plays") is not None else None, - "collections": obj.get("collections") + "collections": obj.get("collections"), + "me": ScoreDetailsAllOfMe.from_dict(obj["me"]) if obj.get("me") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_details_all_of_me.py b/flat_api/models/score_details_all_of_me.py new file mode 100644 index 0000000..8899e4c --- /dev/null +++ b/flat_api/models/score_details_all_of_me.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreDetailsAllOfMe(BaseModel): + """ + Information about the authenticated user and this score + """ # noqa: E501 + is_liked: StrictBool = Field(description="True if the current user likes this score", alias="isLiked") + is_in_library: StrictBool = Field(description="True if the score is stored in one of the user's collections", alias="isInLibrary") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["isLiked", "isInLibrary"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreDetailsAllOfMe from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreDetailsAllOfMe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isLiked": obj.get("isLiked"), + "isInLibrary": obj.get("isInLibrary") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index ebb3ecb..1ef11e3 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,28 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreFork(BaseModel): """ Options to fork the score """ # noqa: E501 - collection: Optional[StrictStr] = Field(default='root', description="Unique identifier of a collection where the score will be copied. If no collection identifier is provided, the score will be stored in the `root` directory. If null is provided, the score won't be added to any collections ") + collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be copied. If no collection identifier is provided, a virtual collection is used, or `null` is provided, the score won't be added to any collection and will only be visible in the `allScores` virtual collection. ") google_drive_disabled: Optional[StrictBool] = Field(default=False, description="If set to `true`, the API won't create the score on Google Drive ", alias="googleDriveDisabled") keep_original_title: Optional[StrictBool] = Field(default=None, description="Option to keep the original title of the score (i.e. don't prepend it with \"Copy of \", or add the student name in assignment usage). ", alias="keepOriginalTitle") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["collection", "googleDriveDisabled", "keepOriginalTitle"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +48,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if collection (nullable) is None # and model_fields_set contains the field if self.collection is None and "collection" in self.model_fields_set: @@ -88,10 +97,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "collection": obj.get("collection") if obj.get("collection") is not None else 'root', + "collection": obj.get("collection"), "googleDriveDisabled": obj.get("googleDriveDisabled") if obj.get("googleDriveDisabled") is not None else False, "keepOriginalTitle": obj.get("keepOriginalTitle") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index 03cb73c..3295c4b 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -35,7 +35,6 @@ class ScoreLicense(str, Enum): CC_MINUS_BY_MINUS_NC = 'cc-by-nc' CC_MINUS_BY_MINUS_NC_MINUS_SA = 'cc-by-nc-sa' CC_MINUS_BY_MINUS_NC_MINUS_ND = 'cc-by-nc-nd' - NULL = 'null' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index b002e3a..37d2d3a 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreLikesCounts(BaseModel): """ - A computed version of the weekly, monthly and total of number of likes for a score + A computed version of the weekly, monthly, yearly and total number of likes for a score """ # noqa: E501 - total: Union[StrictFloat, StrictInt] = Field(description="The total number of likes of the score") - weekly: Union[StrictFloat, StrictInt] = Field(description="The number of new likes during the last week") - monthly: Union[StrictFloat, StrictInt] = Field(description="The number of new likes during the last month") - __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of likes of the score") + weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last week") + monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last month") + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of new likes during the last year") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,10 +93,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "total": obj.get("total") if obj.get("total") is not None else 0, - "weekly": obj.get("weekly") if obj.get("weekly") is not None else 0, - "monthly": obj.get("monthly") if obj.get("monthly") is not None else 0 + "total": obj.get("total"), + "weekly": obj.get("weekly"), + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 7e871ef..4316324 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.score_creation_type import ScoreCreationType @@ -26,6 +26,7 @@ from flat_api.models.score_privacy import ScorePrivacy from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreModification(BaseModel): """ @@ -36,30 +37,32 @@ class ScoreModification(BaseModel): composer: Optional[StrictStr] = Field(default=None, description="The composer of the score") lyricist: Optional[StrictStr] = Field(default=None, description="The lyricist of the score") arranger: Optional[StrictStr] = Field(default=None, description="The arranger of the score") - privacy: Optional[ScorePrivacy] = None + privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE sharing_key: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="When using the `privacy` mode `privateLink`, this property can be used to set a custom sharing key, otherwise a new key will be generated.", alias="sharingKey") description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = Field(default=None, description="Description of the creation") tags: Optional[List[StrictStr]] = Field(default=None, description="Tags describing the score") creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") license: Optional[ScoreLicense] = None license_text: Optional[StrictStr] = Field(default=None, description="The rights info written on the score", alias="licenseText") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "subtitle", "composer", "lyricist", "arranger", "privacy", "sharingKey", "description", "tags", "creationType", "license", "licenseText"] - @field_validator('sharing_key') + @field_validator('sharing_key', mode="before") def sharing_key_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value - if not re.match(r"^[a-f0-9]{128}$", value): + if isinstance(value, str) and not re.match(r"^[a-f0-9]{128}$", value): raise ValueError(r"must validate the regular expression /^[a-f0-9]{128}$/") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,8 +71,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -85,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -94,6 +98,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if subtitle (nullable) is None # and model_fields_set contains the field if self.subtitle is None and "subtitle" in self.model_fields_set: @@ -151,7 +160,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "composer": obj.get("composer"), "lyricist": obj.get("lyricist"), "arranger": obj.get("arranger"), - "privacy": obj.get("privacy"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, "sharingKey": obj.get("sharingKey"), "description": obj.get("description"), "tags": obj.get("tags"), @@ -159,6 +168,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "license": obj.get("license"), "licenseText": obj.get("licenseText") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py index d9280b9..9ddca5e 100644 --- a/flat_api/models/score_plays_counts.py +++ b/flat_api/models/score_plays_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScorePlaysCounts(BaseModel): """ - A computed version of the total, weekly, and monthly number of plays of the score + A computed version of the total, weekly, monthly, and yearly number of plays of the score """ # noqa: E501 total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of plays of the score") weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of plays of the score") monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of plays of the score") - __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly number of plays of the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "total": obj.get("total"), "weekly": obj.get("weekly"), - "monthly": obj.get("monthly") + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index d93f865..83b6f76 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index cfbec2b..7502b34 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,31 +19,35 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_revision_statistics import ScoreRevisionStatistics from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreRevision(BaseModel): """ A score revision metadata """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision.") + id: StrictStr = Field(description="The unique identifier of the revision.") user: Optional[StrictStr] = Field(default=None, description="The user identifier who created the revision") + score: StrictStr = Field(description="The score identifier") collaborators: Optional[List[StrictStr]] = None - creation_date: Optional[datetime] = Field(default=None, description="The date when this revision was created", alias="creationDate") + var_date: datetime = Field(description="The date when this revision was created", alias="date") event: Optional[StrictStr] = Field(default=None, description="The last event (action id) of the revision") description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") autosave: Optional[StrictBool] = Field(default=None, description="True if this revision was automatically generated by Flat and not on purpose by the user. ") statistics: Optional[ScoreRevisionStatistics] = None - __properties: ClassVar[List[str]] = ["id", "user", "collaborators", "creationDate", "event", "description", "autosave", "statistics"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "user", "score", "collaborators", "date", "event", "description", "autosave", "statistics"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,8 +56,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -69,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -81,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of statistics if self.statistics: _dict['statistics'] = self.statistics.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,13 +105,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "user": obj.get("user"), + "score": obj.get("score"), "collaborators": obj.get("collaborators"), - "creationDate": obj.get("creationDate"), + "date": obj.get("date"), "event": obj.get("event"), "description": obj.get("description"), "autosave": obj.get("autosave"), "statistics": ScoreRevisionStatistics.from_dict(obj["statistics"]) if obj.get("statistics") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index 3e70df1..7fecfd3 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,19 +18,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreRevisionCreation(BaseModel): """ A new created revision """ # noqa: E501 - data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") + data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") autosave: Optional[StrictBool] = Field(default=None, description="Must be set to `true` if the revision was created automatically. ") description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["data", "dataEncoding", "autosave", "description"] @field_validator('data_encoding') @@ -43,11 +45,12 @@ def data_encoding_validate_enum(cls, value): raise ValueError("must be one of enum values ('base64')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,8 +59,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -73,8 +75,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -99,6 +108,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "autosave": obj.get("autosave"), "description": obj.get("description") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index fff610e..88a907e 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,11 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreRevisionStatistics(BaseModel): """ @@ -32,13 +33,15 @@ class ScoreRevisionStatistics(BaseModel): deletions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of deletions operations in the last revision") start_date: Optional[datetime] = Field(default=None, description="The date of the first action included in this revision", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="The date of the latest action included in this revision", alias="endDate") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["additions", "deletions", "startDate", "endDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,8 +50,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -90,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "startDate": obj.get("startDate"), "endDate": obj.get("endDate") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index 453ea64..d119658 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreSource(BaseModel): """ ScoreSource """ # noqa: E501 google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["googleDrive"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "googleDrive": obj.get("googleDrive") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_summary.py b/flat_api/models/score_summary.py new file mode 100644 index 0000000..fd72d47 --- /dev/null +++ b/flat_api/models/score_summary.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.score_privacy import ScorePrivacy +from flat_api.models.user_public import UserPublic +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreSummary(BaseModel): + """ + A summary of the score details + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the score") + sharing_key: Optional[StrictStr] = Field(default=None, description="The private sharing key of the score (available when the `privacy` mode is set to `privateLink`)", alias="sharingKey") + title: StrictStr = Field(description="The title of the score") + privacy: ScorePrivacy + user: UserPublic + html_url: StrictStr = Field(description="The url where the score can be viewed in a web browser", alias="htmlUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "sharingKey": obj.get("sharingKey"), + "title": obj.get("title"), + "privacy": obj.get("privacy") if obj.get("privacy") is not None else ScorePrivacy.PRIVATE, + "user": UserPublic.from_dict(obj["user"]) if obj.get("user") is not None else None, + "htmlUrl": obj.get("htmlUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index cac6d06..408e4a1 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_track_point import ScoreTrackPoint from flat_api.models.score_track_purpose import ScoreTrackPurpose @@ -27,6 +27,7 @@ from flat_api.models.score_track_type import ScoreTrackType from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreTrack(BaseModel): """ @@ -34,7 +35,7 @@ class ScoreTrack(BaseModel): """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the score track") title: Optional[StrictStr] = Field(default=None, description="Title of the track") - score: StrictStr = Field(description="The unique identifier of the score") + score: Optional[StrictStr] = Field(default=None, description="The unique identifier of the score. Absent for Free Record performance submissions, which are recorded without an attached score. ") creator: StrictStr = Field(description="The unique identifier of the track creator") creation_date: datetime = Field(description="The creation date of the track", alias="creationDate") modification_date: datetime = Field(description="The modification date of the track", alias="modificationDate") @@ -45,13 +46,15 @@ class ScoreTrack(BaseModel): url: Optional[StrictStr] = Field(default=None, description="The URL of the track") media_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the track when hosted on an external service. For example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ` ", alias="mediaId") synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "title", "score", "creator", "creationDate", "modificationDate", "default", "state", "type", "purpose", "url", "mediaId", "synchronizationPoints"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -89,10 +93,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) _items = [] if self.synchronization_points: - for _item in self.synchronization_points: - if _item: - _items.append(_item.to_dict()) + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -112,13 +121,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creationDate": obj.get("creationDate"), "modificationDate": obj.get("modificationDate"), "default": obj.get("default"), - "state": obj.get("state"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, "type": obj.get("type"), - "purpose": obj.get("purpose"), + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, "url": obj.get("url"), "mediaId": obj.get("mediaId"), "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index 59d6602..e19ac55 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_track_point import ScoreTrackPoint from flat_api.models.score_track_purpose import ScoreTrackPurpose from flat_api.models.score_track_state import ScoreTrackState from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreTrackCreation(BaseModel): """ @@ -32,17 +33,19 @@ class ScoreTrackCreation(BaseModel): """ # noqa: E501 title: Optional[StrictStr] = Field(default=None, description="Title of the track") default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") - state: Optional[ScoreTrackState] = None - purpose: Optional[ScoreTrackPurpose] = None + state: Optional[ScoreTrackState] = ScoreTrackState.DRAFT + purpose: Optional[ScoreTrackPurpose] = ScoreTrackPurpose.COMMON url: Optional[StrictStr] = Field(default=None, description="The URL of the track") synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "default", "state", "purpose", "url", "synchronizationPoints"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,8 +54,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -68,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -80,10 +84,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) _items = [] if self.synchronization_points: - for _item in self.synchronization_points: - if _item: - _items.append(_item.to_dict()) + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -98,11 +107,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), "default": obj.get("default"), - "state": obj.get("state"), - "purpose": obj.get("purpose"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, "url": obj.get("url"), "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_track_creation_response.py b/flat_api/models/score_track_creation_response.py new file mode 100644 index 0000000..0d8be58 --- /dev/null +++ b/flat_api/models/score_track_creation_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flat_api.models.score_track import ScoreTrack +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ScoreTrackCreationResponse(BaseModel): + """ + Response for track creation including optional upload information + """ # noqa: E501 + track: ScoreTrack + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["track"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ScoreTrackCreationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of track + if self.track: + _dict['track'] = self.track.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScoreTrackCreationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "track": ScoreTrack.from_dict(obj["track"]) if obj.get("track") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index 0d876d4..d3f9ed9 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,18 +18,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from uuid import UUID from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreTrackPoint(BaseModel): """ A track synchronization point """ # noqa: E501 type: StrictStr = Field(description="The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid`") - measure_uuid: Optional[StrictStr] = Field(default=None, description="The measure unique identifier", alias="measureUuid") + measure_uuid: Optional[UUID] = Field(default=None, description="The measure unique identifier", alias="measureUuid") time: Union[StrictFloat, StrictInt] = Field(description="The corresponding time in seconds") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "measureUuid", "time"] @field_validator('type') @@ -39,11 +42,12 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('measure', 'end')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,8 +56,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -69,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -78,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -94,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "measureUuid": obj.get("measureUuid"), "time": obj.get("time") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_track_purpose.py b/flat_api/models/score_track_purpose.py index 41e7153..cd5341e 100644 --- a/flat_api/models/score_track_purpose.py +++ b/flat_api/models/score_track_purpose.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index ce06a5b..e5d3200 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index fbf4840..33e083d 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index 0e757ee..df35e21 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.score_track_point import ScoreTrackPoint +from flat_api.models.score_track_purpose import ScoreTrackPurpose from flat_api.models.score_track_state import ScoreTrackState from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreTrackUpdate(BaseModel): """ @@ -31,15 +33,18 @@ class ScoreTrackUpdate(BaseModel): """ # noqa: E501 title: Optional[StrictStr] = Field(default=None, description="Title of the track") default: Optional[StrictBool] = Field(default=None, description="True if the track should be used as default audio source") - state: Optional[ScoreTrackState] = None + state: Optional[ScoreTrackState] = ScoreTrackState.DRAFT + purpose: Optional[ScoreTrackPurpose] = ScoreTrackPurpose.COMMON synchronization_points: Optional[List[ScoreTrackPoint]] = Field(default=None, alias="synchronizationPoints") - __properties: ClassVar[List[str]] = ["title", "default", "state", "synchronizationPoints"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "default", "state", "purpose", "synchronizationPoints"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,8 +53,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -65,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -77,10 +83,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in synchronization_points (list) _items = [] if self.synchronization_points: - for _item in self.synchronization_points: - if _item: - _items.append(_item.to_dict()) + for _item_synchronization_points in self.synchronization_points: + if _item_synchronization_points: + _items.append(_item_synchronization_points.to_dict()) _dict['synchronizationPoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -95,9 +106,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), "default": obj.get("default"), - "state": obj.get("state"), + "state": obj.get("state") if obj.get("state") is not None else ScoreTrackState.DRAFT, + "purpose": obj.get("purpose") if obj.get("purpose") is not None else ScoreTrackPurpose.COMMON, "synchronizationPoints": [ScoreTrackPoint.from_dict(_item) for _item in obj["synchronizationPoints"]] if obj.get("synchronizationPoints") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index 586a930..b20f9e1 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class ScoreViewsCounts(BaseModel): """ - A computed version of the total, weekly, and monthly number of views of the score + A computed version of the total, weekly, monthly, and yearly number of views of the score """ # noqa: E501 total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of views of the score") weekly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The weekly number of views of the score") monthly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The monthly number of views of the score") - __properties: ClassVar[List[str]] = ["total", "weekly", "monthly"] + yearly: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The yearly number of views of the score") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "weekly", "monthly", "yearly"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,8 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "total": obj.get("total"), "weekly": obj.get("weekly"), - "monthly": obj.get("monthly") + "monthly": obj.get("monthly"), + "yearly": obj.get("yearly") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/task.py b/flat_api/models/task.py index 72382d4..41097ec 100644 --- a/flat_api/models/task.py +++ b/flat_api/models/task.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,42 +19,48 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.task_progress import TaskProgress from flat_api.models.task_result import TaskResult from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class Task(BaseModel): """ An asynchronous task """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the task") - type: Optional[StrictStr] = Field(default=None, description="Type of the task (e.g. audio-export)") + type: Optional[StrictStr] = Field(default=None, description="Type of the task: * `audio-export`: Exports a score to audio format (MP3, WAV) * `score-save`: Saves or updates a score document * `import-omr`: Processes a PDF through OMR (Optical Music Recognition) and imports it as a score ") state: StrictStr = Field(description="State of the Task") format: Optional[StrictStr] = Field(default=None, description="For files processing, the file format (e.g. `mp3`, `wav`)") score: Optional[StrictStr] = Field(default=None, description="The score unique identifier for tasks related to scores") + revision: Optional[StrictStr] = Field(default=None, description="The score revision identifier for tasks related to scores") progress: Optional[TaskProgress] = None creation_date: Optional[datetime] = Field(default=None, description="The creation date of the task", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The last modification date of the task", alias="modificationDate") done_date: Optional[datetime] = Field(default=None, description="The date when the task has been completed", alias="doneDate") result: Optional[TaskResult] = None error_history: Optional[List[StrictStr]] = Field(default=None, description="If any errors happened when processing this task, the list of errors identifiers", alias="errorHistory") - __properties: ClassVar[List[str]] = ["id", "type", "state", "format", "score", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory"] + is_cancellable: Optional[StrictBool] = Field(default=None, description="Whether the task can be canceled by the user. Only `true` when the task is in `created` state (waiting to be processed). ", alias="isCancellable") + children: Optional[List[Task]] = Field(default=None, description="Child tasks for hierarchical task structures (e.g., conversion subtasks)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "state", "format", "score", "revision", "progress", "creationDate", "modificationDate", "doneDate", "result", "errorHistory", "isCancellable", "children"] @field_validator('state') def state_validate_enum(cls, value): """Validates the enum""" - if value not in set(['created', 'doing', 'done', 'canceled', 'error']): - raise ValueError("must be one of enum values ('created', 'doing', 'done', 'canceled', 'error')") + if value not in set(['created', 'blocked', 'doing', 'done', 'canceled', 'error']): + raise ValueError("must be one of enum values ('created', 'blocked', 'doing', 'done', 'canceled', 'error')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -63,8 +69,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -80,8 +85,12 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "is_cancellable", + "additional_properties", ]) _dict = self.model_dump( @@ -95,6 +104,18 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of result if self.result: _dict['result'] = self.result.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in children (list) + _items = [] + if self.children: + for _item_children in self.children: + if _item_children: + _items.append(_item_children.to_dict()) + _dict['children'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -112,13 +133,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state"), "format": obj.get("format"), "score": obj.get("score"), + "revision": obj.get("revision"), "progress": TaskProgress.from_dict(obj["progress"]) if obj.get("progress") is not None else None, "creationDate": obj.get("creationDate"), "modificationDate": obj.get("modificationDate"), "doneDate": obj.get("doneDate"), "result": TaskResult.from_dict(obj["result"]) if obj.get("result") is not None else None, - "errorHistory": obj.get("errorHistory") + "errorHistory": obj.get("errorHistory"), + "isCancellable": obj.get("isCancellable"), + "children": [Task.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj +# TODO: Rewrite to not use raise_errors +Task.model_rebuild(raise_errors=False) diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py index 71103da..6123a4c 100644 --- a/flat_api/models/task_export_options.py +++ b/flat_api/models/task_export_options.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class TaskExportOptions(BaseModel): """ Options for the requested export """ # noqa: E501 parts: Optional[List[StrictStr]] = Field(default=None, description="A list of parts to specifically export") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["parts"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "parts": obj.get("parts") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py index 538f7f1..31f88f5 100644 --- a/flat_api/models/task_progress.py +++ b/flat_api/models/task_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class TaskProgress(BaseModel): """ @@ -29,13 +30,15 @@ class TaskProgress(BaseModel): """ # noqa: E501 percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percent of the task progression") text: Optional[StrictStr] = Field(default=None, description="Text details of the task progress") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["percent", "text"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "percent": obj.get("percent"), "text": obj.get("text") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/task_result.py b/flat_api/models/task_result.py index 2976078..99fca4b 100644 --- a/flat_api/models/task_result.py +++ b/flat_api/models/task_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class TaskResult(BaseModel): """ @@ -29,13 +30,15 @@ class TaskResult(BaseModel): """ # noqa: E501 url: Optional[StrictStr] = Field(default=None, description="URL returned by the task worker") error: Optional[StrictStr] = Field(default=None, description="Error returned by task worker") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["url", "error"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -44,8 +47,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "url": obj.get("url"), "error": obj.get("error") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/teaching_theme.py b/flat_api/models/teaching_theme.py new file mode 100644 index 0000000..5f15cc9 --- /dev/null +++ b/flat_api/models/teaching_theme.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TeachingTheme(str, Enum): + """ + Teaching theme + """ + + """ + allowed enum values + """ + COMPOSITION = 'composition' + MUSIC_MINUS_THEORY = 'music-theory' + GENERAL_MINUS_MUSIC = 'general-music' + BAND = 'band' + CHOIR = 'choir' + ORCHESTRA = 'orchestra' + JAZZ_MINUS_ENSEMBLE = 'jazz-ensemble' + MUSIC_MINUS_TECHNOLOGY = 'music-technology' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TeachingTheme from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flat_api/models/tutteo_product.py b/flat_api/models/tutteo_product.py index 82ffae9..b40d500 100644 --- a/flat_api/models/tutteo_product.py +++ b/flat_api/models/tutteo_product.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class TutteoProduct(str, Enum): """ - The Tutteo product used by the user account + A Tutteo product. * `flat`: [Flat](https://flat.io) - Music notation software for individual users * `flatEdu`: [Flat for Education](https://flat.io/edu) - Music notation software for schools and educators * `msnippet`: [Music Snippet](https://musicsnippet.com) - Embeddable music snippets for websites * `embed`: [Flat Embed](https://flat.io/developers/embed) - Embeddable music notation editor """ """ diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index 0b8a0cd..74481dc 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flat_api.models.organization_roles import OrganizationRoles from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserAdminUpdate(BaseModel): """ @@ -35,23 +36,15 @@ class UserAdminUpdate(BaseModel): firstname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="First name of the user") lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") email: Optional[StrictStr] = Field(default=None, description="Email of the account") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["password", "organizationRole", "username", "firstname", "lastname", "email"] - @field_validator('username') - def username_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match(r"^[A-Za-z0-9\-_.]+$", value): - raise ValueError(r"must validate the regular expression /^[A-Za-z0-9\-_.]+$/") - return value - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,8 +53,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -86,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -105,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "lastname": obj.get("lastname"), "email": obj.get("email") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_azure_details.py b/flat_api/models/user_azure_details.py index 48e3f1b..abb6bfc 100644 --- a/flat_api/models/user_azure_details.py +++ b/flat_api/models/user_azure_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserAzureDetails(BaseModel): """ @@ -30,13 +31,15 @@ class UserAzureDetails(BaseModel): oid: Optional[StrictStr] = Field(default=None, description="User object identifier on Azure AD") hd: Optional[StrictStr] = Field(default=None, description="User tenant (domain name)") preferred_username: Optional[StrictStr] = Field(default=None, description="User Preferred Username (UPN), i.e. the main email of the user", alias="preferredUsername") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["oid", "hd", "preferredUsername"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +48,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hd": obj.get("hd"), "preferredUsername": obj.get("preferredUsername") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_basics.py b/flat_api/models/user_basics.py new file mode 100644 index 0000000..3454de8 --- /dev/null +++ b/flat_api/models/user_basics.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.tutteo_product import TutteoProduct +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserBasics(BaseModel): + """ + UserBasics + """ # noqa: E501 + id: StrictStr = Field(description="The user unique identifier") + type: StrictStr = Field(description="The type of user account") + product: TutteoProduct + username: StrictStr = Field(description="The user name (unique for the organization)") + printable_name: Optional[StrictStr] = Field(default=None, description="The name that can be directly printed (name, firstname & lastname, or username)", alias="printableName") + firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") + lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") + name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") + picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['user', 'guest']): + raise ValueError("must be one of enum values ('user', 'guest')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserBasics from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if picture (nullable) is None + # and model_fields_set contains the field + if self.picture is None and "picture" in self.model_fields_set: + _dict['picture'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserBasics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, + "username": obj.get("username"), + "printableName": obj.get("printableName"), + "firstname": obj.get("firstname"), + "lastname": obj.get("lastname"), + "name": obj.get("name"), + "picture": obj.get("picture"), + "badges": obj.get("badges") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/user_community_profile_links.py b/flat_api/models/user_community_profile_links.py index 78f68a0..c281a56 100644 --- a/flat_api/models/user_community_profile_links.py +++ b/flat_api/models/user_community_profile_links.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserCommunityProfileLinks(BaseModel): """ @@ -33,13 +34,15 @@ class UserCommunityProfileLinks(BaseModel): tiktok_url: Optional[StrictStr] = Field(default=None, description="TikTok profile URL. For updates, also accepts TikTok usernames", alias="tiktokUrl") instagram_url: Optional[StrictStr] = Field(default=None, description="Instagram profile URL. For updates, also accepts Instagram usernames", alias="instagramUrl") website_url: Optional[StrictStr] = Field(default=None, description="Personnal website URL", alias="websiteUrl") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,8 +51,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + # set to None if spotify_url (nullable) is None # and model_fields_set contains the field if self.spotify_url is None and "spotify_url" in self.model_fields_set: @@ -123,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "instagramUrl": obj.get("instagramUrl"), "websiteUrl": obj.get("websiteUrl") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index fe339c7..fa407a7 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from flat_api.models.flat_locales import FlatLocales from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserCreation(BaseModel): """ @@ -34,32 +34,27 @@ class UserCreation(BaseModel): lastname: Optional[Annotated[str, Field(strict=True, max_length=60)]] = Field(default=None, description="Last name of the user") email: Optional[StrictStr] = Field(default=None, description="Email of the new account") password: Annotated[str, Field(min_length=6, strict=True, max_length=1000)] = Field(description="Password of the new account") - locale: Optional[FlatLocales] = None + locale: Optional[StrictStr] = Field(default='en', description="User language. Input values will be automatically normalized to a supported locale code.") role: Optional[StrictStr] = Field(default='user', description="Role of the new account") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["username", "firstname", "lastname", "email", "password", "locale", "role"] - @field_validator('username') - def username_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[A-Za-z0-9\-_.]+$", value): - raise ValueError(r"must validate the regular expression /^[A-Za-z0-9\-_.]+$/") - return value - @field_validator('role') def role_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['user', 'teacher', 'admin']): - raise ValueError("must be one of enum values ('user', 'teacher', 'admin')") + if value not in set(['user', 'teacher', 'admin', 'accountAdmin']): + raise ValueError("must be one of enum values ('user', 'teacher', 'admin', 'accountAdmin')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,8 +63,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -85,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -94,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -111,9 +112,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "lastname": obj.get("lastname"), "email": obj.get("email"), "password": obj.get("password"), - "locale": obj.get("locale"), + "locale": obj.get("locale") if obj.get("locale") is not None else 'en', "role": obj.get("role") if obj.get("role") is not None else 'user' }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index 51520e5..c3d2f70 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,20 +19,20 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.class_roles import ClassRoles -from flat_api.models.flat_locales import FlatLocales from flat_api.models.organization_roles import OrganizationRoles from flat_api.models.tutteo_product import TutteoProduct from flat_api.models.user_azure_details import UserAzureDetails from flat_api.models.user_community_profile_links import UserCommunityProfileLinks from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserDetails(BaseModel): """ - UserDetails + User details """ # noqa: E501 id: StrictStr = Field(description="The user unique identifier") type: StrictStr = Field(description="The type of user account") @@ -42,7 +42,7 @@ class UserDetails(BaseModel): firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") - picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + picture: StrictStr = Field(description="The URL of the picture to display") badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") @@ -54,17 +54,21 @@ class UserDetails(BaseModel): followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") + likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") + plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") - instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. ") links: Optional[UserCommunityProfileLinks] = None + is_email_verified: Optional[StrictBool] = Field(default=None, description="Whether the user's email address has been verified", alias="isEmailVerified") azure_details: Optional[UserAzureDetails] = Field(default=None, alias="azureDetails") private_profile: Optional[StrictBool] = Field(default=None, description="Tell either this user profile is private or not (individual accounts only)", alias="privateProfile") - locale: Optional[FlatLocales] = None + locale: Optional[StrictStr] = Field(default='en', description="The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` ") groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile picture", alias="pictureFile") cover_picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile cover picture", alias="coverPictureFile") - __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "allPublicScoresCount", "likesCount", "playsCount", "coverPicture", "profileTheme", "links", "isEmailVerified", "azureDetails", "privateProfile", "locale", "groups", "pictureFile", "coverPictureFile"] @field_validator('type') def type_validate_enum(cls, value): @@ -73,11 +77,12 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('user', 'guest')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -86,8 +91,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -103,8 +107,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -118,15 +124,10 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of azure_details if self.azure_details: _dict['azureDetails'] = self.azure_details.to_dict() - # set to None if picture (nullable) is None - # and model_fields_set contains the field - if self.picture is None and "picture" in self.model_fields_set: - _dict['picture'] = None - - # set to None if cover_picture (nullable) is None - # and model_fields_set contains the field - if self.cover_picture is None and "cover_picture" in self.model_fields_set: - _dict['coverPicture'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value # set to None if picture_file (nullable) is None # and model_fields_set contains the field @@ -152,7 +153,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "product": obj.get("product"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, "username": obj.get("username"), "printableName": obj.get("printableName"), "firstname": obj.get("firstname"), @@ -170,17 +171,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "followersCount": obj.get("followersCount"), "followingCount": obj.get("followingCount"), "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "allPublicScoresCount": obj.get("allPublicScoresCount"), + "likesCount": obj.get("likesCount"), + "playsCount": obj.get("playsCount"), "coverPicture": obj.get("coverPicture"), "profileTheme": obj.get("profileTheme"), - "instruments": obj.get("instruments"), "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None, + "isEmailVerified": obj.get("isEmailVerified"), "azureDetails": UserAzureDetails.from_dict(obj["azureDetails"]) if obj.get("azureDetails") is not None else None, "privateProfile": obj.get("privateProfile"), - "locale": obj.get("locale"), + "locale": obj.get("locale") if obj.get("locale") is not None else 'en', "groups": obj.get("groups"), "pictureFile": obj.get("pictureFile"), "coverPictureFile": obj.get("coverPictureFile") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index 16ba418..fb9f1c5 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,18 +19,19 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.class_roles import ClassRoles from flat_api.models.organization_roles import OrganizationRoles from flat_api.models.tutteo_product import TutteoProduct -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense +from flat_api.models.user_details_admin_all_of_license import UserDetailsAdminAllOfLicense from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserDetailsAdmin(BaseModel): """ - UserDetailsAdmin + User details (view for organization teacher / admin) """ # noqa: E501 id: StrictStr = Field(description="The user unique identifier") type: StrictStr = Field(description="The type of user account") @@ -40,7 +41,7 @@ class UserDetailsAdmin(BaseModel): firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") - picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + picture: StrictStr = Field(description="The URL of the picture to display") badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") @@ -48,9 +49,11 @@ class UserDetailsAdmin(BaseModel): html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") email: Optional[StrictStr] = Field(default=None, description="Email of the user") last_activity_date: Optional[datetime] = Field(default=None, description="Date of the last user activity", alias="lastActivityDate") - license: Optional[UserDetailsAdminLicense] = None + license: Optional[UserDetailsAdminAllOfLicense] = None groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") - __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups"] + is_edu_testing_student: Optional[StrictBool] = Field(default=None, description="Indicates if the user account is marked as a testing student account. Testing students are typically excluded from certain educational integrations and workflows. This field helps API clients distinguish between regular students and testing accounts. ", alias="isEduTestingStudent") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "email", "lastActivityDate", "license", "groups", "isEduTestingStudent"] @field_validator('type') def type_validate_enum(cls, value): @@ -59,11 +62,12 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('user', 'guest')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,8 +76,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -89,8 +92,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -101,10 +106,10 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of license if self.license: _dict['license'] = self.license.to_dict() - # set to None if picture (nullable) is None - # and model_fields_set contains the field - if self.picture is None and "picture" in self.model_fields_set: - _dict['picture'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -120,7 +125,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "product": obj.get("product"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, "username": obj.get("username"), "printableName": obj.get("printableName"), "firstname": obj.get("firstname"), @@ -134,9 +139,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "htmlUrl": obj.get("htmlUrl"), "email": obj.get("email"), "lastActivityDate": obj.get("lastActivityDate"), - "license": UserDetailsAdminLicense.from_dict(obj["license"]) if obj.get("license") is not None else None, - "groups": obj.get("groups") + "license": UserDetailsAdminAllOfLicense.from_dict(obj["license"]) if obj.get("license") is not None else None, + "groups": obj.get("groups"), + "isEduTestingStudent": obj.get("isEduTestingStudent") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_details_admin_all_of_license.py b/flat_api/models/user_details_admin_all_of_license.py new file mode 100644 index 0000000..7b3af4f --- /dev/null +++ b/flat_api/models/user_details_admin_all_of_license.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Flat API + + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + + The version of the OpenAPI document: 2.26.0 + Contact: developers@flat.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flat_api.models.license_mode import LicenseMode +from flat_api.models.license_sources import LicenseSources +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UserDetailsAdminAllOfLicense(BaseModel): + """ + Current active license of the user + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID of the current license") + expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") + source: Optional[LicenseSources] = LicenseSources.ORDER + mode: Optional[LicenseMode] = None + active: Optional[StrictBool] = Field(default=None, description="ID of the current license") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDetailsAdminAllOfLicense from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetailsAdminAllOfLicense from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "expirationDate": obj.get("expirationDate"), + "source": obj.get("source") if obj.get("source") is not None else LicenseSources.ORDER, + "mode": obj.get("mode"), + "active": obj.get("active") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/flat_api/models/user_details_admin_license.py b/flat_api/models/user_details_admin_license.py deleted file mode 100644 index 0696541..0000000 --- a/flat_api/models/user_details_admin_license.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from flat_api.models.license_mode import LicenseMode -from flat_api.models.license_sources import LicenseSources -from typing import Optional, Set -from typing_extensions import Self - -class UserDetailsAdminLicense(BaseModel): - """ - Current active license of the user - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="ID of the current license") - expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") - source: Optional[LicenseSources] = None - mode: Optional[LicenseMode] = None - active: Optional[StrictBool] = Field(default=None, description="ID of the current license") - __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserDetailsAdminLicense from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserDetailsAdminLicense from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "expirationDate": obj.get("expirationDate"), - "source": obj.get("source"), - "mode": obj.get("mode"), - "active": obj.get("active") - }) - return _obj - - diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index 48f9936..0c08ba9 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.class_roles import ClassRoles from flat_api.models.organization_roles import OrganizationRoles @@ -27,10 +27,11 @@ from flat_api.models.user_community_profile_links import UserCommunityProfileLinks from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserPublic(BaseModel): """ - UserPublic + Public User details """ # noqa: E501 id: StrictStr = Field(description="The user unique identifier") type: StrictStr = Field(description="The type of user account") @@ -40,7 +41,7 @@ class UserPublic(BaseModel): firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") - picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + picture: StrictStr = Field(description="The URL of the picture to display") badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") @@ -52,11 +53,14 @@ class UserPublic(BaseModel): followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") + likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") + plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") - instruments: Optional[List[StrictStr]] = Field(default=None, description="An array of the instrument identifiers. The format of the strings is `{instrument-group}.{instrument-id}`. ") links: Optional[UserCommunityProfileLinks] = None - __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "coverPicture", "profileTheme", "instruments", "links"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl", "bio", "registrationDate", "likedScoresCount", "followersCount", "followingCount", "ownedPublicScoresCount", "allPublicScoresCount", "likesCount", "playsCount", "coverPicture", "profileTheme", "links"] @field_validator('type') def type_validate_enum(cls, value): @@ -65,11 +69,12 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('user', 'guest')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -78,8 +83,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -95,8 +99,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -107,10 +113,10 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['links'] = self.links.to_dict() - # set to None if picture (nullable) is None - # and model_fields_set contains the field - if self.picture is None and "picture" in self.model_fields_set: - _dict['picture'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value # set to None if cover_picture (nullable) is None # and model_fields_set contains the field @@ -131,7 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "product": obj.get("product"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, "username": obj.get("username"), "printableName": obj.get("printableName"), "firstname": obj.get("firstname"), @@ -149,11 +155,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "followersCount": obj.get("followersCount"), "followingCount": obj.get("followingCount"), "ownedPublicScoresCount": obj.get("ownedPublicScoresCount"), + "allPublicScoresCount": obj.get("allPublicScoresCount"), + "likesCount": obj.get("likesCount"), + "playsCount": obj.get("playsCount"), "coverPicture": obj.get("coverPicture"), "profileTheme": obj.get("profileTheme"), - "instruments": obj.get("instruments"), "links": UserCommunityProfileLinks.from_dict(obj["links"]) if obj.get("links") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index 0225f82..e5c147b 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,17 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.class_roles import ClassRoles from flat_api.models.organization_roles import OrganizationRoles from flat_api.models.tutteo_product import TutteoProduct from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserPublicSummary(BaseModel): """ - UserPublicSummary + Public User details summary """ # noqa: E501 id: StrictStr = Field(description="The user unique identifier") type: StrictStr = Field(description="The type of user account") @@ -38,12 +39,13 @@ class UserPublicSummary(BaseModel): firstname: Optional[StrictStr] = Field(default=None, description="Firstname of the user (for education users)") lastname: Optional[StrictStr] = Field(default=None, description="Lastname of the user (for education users)") name: Optional[StrictStr] = Field(default=None, description="A displayable name for the user (for consumer users)") - picture: Optional[StrictStr] = Field(description="The URL of the picture to display") + picture: StrictStr = Field(description="The URL of the picture to display") badges: Optional[List[StrictStr]] = Field(default=None, description="List of badges for the user profile: - `power` - `staff` - `composerOfTheMonth` - `ambassador` - `challenge` ") organization: Optional[StrictStr] = Field(default=None, description="Organization ID (for Edu users only)") organization_role: Optional[OrganizationRoles] = Field(default=None, alias="organizationRole") class_role: Optional[ClassRoles] = Field(default=None, alias="classRole") html_url: Optional[StrictStr] = Field(default=None, description="Link to user profile (for Indiv. users only)", alias="htmlUrl") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "type", "product", "username", "printableName", "firstname", "lastname", "name", "picture", "badges", "organization", "organizationRole", "classRole", "htmlUrl"] @field_validator('type') @@ -53,11 +55,12 @@ def type_validate_enum(cls, value): raise ValueError("must be one of enum values ('user', 'guest')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -66,8 +69,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -83,8 +85,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -92,10 +96,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if picture (nullable) is None - # and model_fields_set contains the field - if self.picture is None and "picture" in self.model_fields_set: - _dict['picture'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -111,7 +115,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "product": obj.get("product"), + "product": obj.get("product") if obj.get("product") is not None else TutteoProduct.FLAT, "username": obj.get("username"), "printableName": obj.get("printableName"), "firstname": obj.get("firstname"), @@ -124,6 +128,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "classRole": obj.get("classRole"), "htmlUrl": obj.get("htmlUrl") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_signin_link.py b/flat_api/models/user_signin_link.py index 39892c7..72e0254 100644 --- a/flat_api/models/user_signin_link.py +++ b/flat_api/models/user_signin_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,24 +19,28 @@ import json from datetime import datetime -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserSigninLink(BaseModel): """ UserSigninLink """ # noqa: E501 url: Optional[StrictStr] = Field(default=None, description="URL to use to sign in to this account") + token: Optional[StrictStr] = Field(default=None, description="Raw sign-in token, can be used to build custom URLs (e.g. deep links)") expiration_date: Optional[datetime] = Field(default=None, description="Date when the link expires", alias="expirationDate") - __properties: ClassVar[List[str]] = ["url", "expirationDate"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "token", "expirationDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -45,8 +49,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -62,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -84,8 +94,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "url": obj.get("url"), + "token": obj.get("token"), "expirationDate": obj.get("expirationDate") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/models/user_signin_link_creation.py b/flat_api/models/user_signin_link_creation.py index bc7b132..2fbeb9d 100644 --- a/flat_api/models/user_signin_link_creation.py +++ b/flat_api/models/user_signin_link_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,23 +18,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self +from pydantic_core import to_jsonable_python class UserSigninLinkCreation(BaseModel): """ UserSigninLinkCreation """ # noqa: E501 destination_path: Optional[StrictStr] = Field(default='/', description="Path to redirect to after signin", alias="destinationPath") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destinationPath"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -43,8 +46,7 @@ def to_str(self) -> str: def to_json(self) -> str: """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) + return json.dumps(to_jsonable_python(self.to_dict())) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "destinationPath": obj.get("destinationPath") if obj.get("destinationPath") is not None else '/' }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/flat_api/oauth.py b/flat_api/oauth.py new file mode 100644 index 0000000..66d1935 --- /dev/null +++ b/flat_api/oauth.py @@ -0,0 +1,145 @@ +"""OAuth2 support for the Flat API. + +The public specification declares one security scheme: OAuth2 with the authorization-code flow and +23 scopes. A Personal Access Token is an OAuth access token for your own account, so passing a token +straight to the client covers both cases. + +A refresh token is only issued when the authorization request sets ``access_type=offline``. + +This module never stores a token. Persistence is deployment-specific, so the client hands refreshed +tokens to a callback you supply and it is your job to save them. +""" + +from __future__ import annotations + +import threading +import time +from dataclasses import dataclass, field +from urllib.parse import urlencode + +import httpx + +from flat_api.errors import FlatAuthenticationError + +__all__ = ["Tokens", "OAuth2Helper", "TokenManager"] + +AUTHORIZE_URL = "https://flat.io/auth/oauth" +TOKEN_URL = "https://api.flat.io/oauth/access_token" + +#: Refresh this many seconds before nominal expiry, to avoid racing the server clock. +EXPIRY_SKEW = 30.0 + + +@dataclass +class Tokens: + access_token: str + refresh_token: str | None = None + expires_at: float | None = None + + @classmethod + def from_response(cls, payload: dict) -> "Tokens": + expires_in = payload.get("expires_in") + return cls( + access_token=payload["access_token"], + refresh_token=payload.get("refresh_token"), + expires_at=time.time() + float(expires_in) if expires_in else None, + ) + + @property + def expired(self) -> bool: + return self.expires_at is not None and time.time() >= self.expires_at - EXPIRY_SKEW + + +class OAuth2Helper: + """Builds the authorization URL and exchanges codes for tokens.""" + + def __init__(self, client_id: str, client_secret: str, redirect_uri: str) -> None: + self.client_id = client_id + self.client_secret = client_secret + self.redirect_uri = redirect_uri + + def authorize_url( + self, + scopes: list[str], + state: str, + *, + offline: bool = True, + ) -> str: + """URL to send a user to. ``offline=True`` is what yields a refresh token.""" + params = { + "client_id": self.client_id, + "redirect_uri": self.redirect_uri, + "response_type": "code", + "scope": " ".join(scopes), + "state": state, + } + if offline: + params["access_type"] = "offline" + return f"{AUTHORIZE_URL}?{urlencode(params)}" + + def exchange_code(self, code: str) -> Tokens: + return self._token_request( + {"grant_type": "authorization_code", "code": code, "redirect_uri": self.redirect_uri} + ) + + def refresh(self, refresh_token: str) -> Tokens: + return self._token_request( + {"grant_type": "refresh_token", "refresh_token": refresh_token} + ) + + def _token_request(self, payload: dict) -> Tokens: + body = {**payload, "client_id": self.client_id, "client_secret": self.client_secret} + response = httpx.post(TOKEN_URL, data=body, timeout=30) + if response.status_code >= 400: + raise FlatAuthenticationError( + "OAuth2 token request failed; the user must re-authorize", + status=response.status_code, + body=_safe_json(response), + ) + return Tokens.from_response(response.json()) + + +class TokenManager: + """Holds the current tokens and refreshes them at most once at a time. + + Single-flight matters: two concurrent requests hitting an expired token must not both refresh, + because the second refresh would invalidate the token the first just obtained. + """ + + def __init__( + self, + tokens: Tokens, + helper: OAuth2Helper | None = None, + on_token_refresh=None, + ) -> None: + self._tokens = tokens + self._helper = helper + self._on_refresh = on_token_refresh + self._lock = threading.Lock() + + @property + def access_token(self) -> str: + return self._tokens.access_token + + def refresh(self) -> str: + """Refresh once, even under concurrency, and return the new access token.""" + with self._lock: + current = self._tokens.access_token + if self._tokens.access_token != current: + return self._tokens.access_token + if self._helper is None or not self._tokens.refresh_token: + raise FlatAuthenticationError( + "the access token expired and no refresh token is available; " + "the user must re-authorize" + ) + self._tokens = self._helper.refresh(self._tokens.refresh_token) + if self._on_refresh is not None: + self._on_refresh(self._tokens) + return self._tokens.access_token + + +def _safe_json(response: httpx.Response): + try: + return response.json() + except ValueError: + return None diff --git a/flat_api/pagination.py b/flat_api/pagination.py new file mode 100644 index 0000000..3d4990c --- /dev/null +++ b/flat_api/pagination.py @@ -0,0 +1,73 @@ +"""Cursor pagination for the Flat API. + +Eight operations at v2.25.0 are cursor-paginated, identified by a ``next`` query parameter. Note the +parameter is a shared component (``#/components/parameters/next``): any tool that reads an +operation\'s parameters without resolving ``$ref`` under-counts them and ships collections that +silently truncate. + +The cursor itself is **not in the response body**. It arrives in the ``Link`` header, which the +specification does not declare, so it is parsed at runtime from the generated ``ApiResponse``. +""" + +from __future__ import annotations + +import re +from collections.abc import Callable, Iterator +from typing import Any, TypeVar + +__all__ = ["parse_link_header", "paginate"] + +T = TypeVar("T") + +_LINK = re.compile(r'<(?P[^>]+)>\s*;\s*rel="(?P[^"]+)"') +_NEXT_PARAM = re.compile(r"[?&]next=(?P[^&]+)") + + +def parse_link_header(value: str | None) -> dict[str, str]: + """Parse an RFC 5988 Link header into {rel: url}.""" + if not value: + return {} + return {m.group("rel"): m.group("url") for m in _LINK.finditer(value)} + + +def next_cursor(headers: dict[str, str] | None) -> str | None: + """Extract the opaque ``next`` cursor from a response\'s Link header, if any.""" + if not headers: + return None + link = next((v for k, v in headers.items() if k.lower() == "link"), None) + url = parse_link_header(link).get("next") + if not url: + return None + match = _NEXT_PARAM.search(url) + return match.group("cursor") if match else None + + +def paginate( + fetch_page: Callable[..., Any], + *args: Any, + **kwargs: Any, +) -> Iterator[T]: + """Yield every item across all pages of a cursor-paginated operation. + + ``fetch_page`` must be the generated ``*_with_http_info`` variant, which returns an + ``ApiResponse`` carrying the headers the cursor lives in. + + A token expiring mid-traversal is refreshed by the client and the traversal resumes from the + same cursor, so no page is skipped or repeated. + """ + cursor: str | None = kwargs.pop("next", None) + seen: set[str] = set() + + while True: + response = fetch_page(*args, **({**kwargs, "next": cursor} if cursor else kwargs)) + page = getattr(response, "data", response) + if page: + yield from page + + cursor = next_cursor(getattr(response, "headers", None)) + if not cursor: + return + # A server that returns a cursor it already gave us would loop forever. + if cursor in seen: + return + seen.add(cursor) diff --git a/flat_api/rest.py b/flat_api/rest.py index e0806d1..8f651d6 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.20.0 + The version of the OpenAPI document: 2.26.0 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,10 +13,12 @@ """ # noqa: E501 +import ipaddress import io import json import re import ssl +from urllib.parse import urlparse import urllib3 @@ -36,6 +38,44 @@ def is_socks_proxy_url(url): return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES +def should_bypass_proxies(url: str, no_proxy: str) -> bool: + """Return whether ``url`` matches the comma-separated ``no_proxy`` rules.""" + parsed_url = urlparse(url) + if not parsed_url.hostname: + return True + + host = parsed_url.hostname.lower() + host_and_port = parsed_url.netloc.lower() + try: + host_ip = ipaddress.ip_address(host) + except ValueError: + host_ip = None + + for entry in (entry.strip().lower() for entry in no_proxy.split(',')): + if not entry: + continue + if entry == '*': + return True + + if host_ip is not None: + try: + if host_ip in ipaddress.ip_network(entry, strict=False): + return True + except ValueError: + pass + + entry = entry.lstrip('.') + if ( + host == entry + or host.endswith('.' + entry) + or host_and_port == entry + or host_and_port.endswith('.' + entry) + ): + return True + + return False + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -49,12 +89,17 @@ def read(self): self.data = self.response.data return self.data + @property + def headers(self): + """Returns a dictionary of response headers.""" + return self.response.headers + def getheaders(self): - """Returns a dictionary of the response headers.""" + """Returns a dictionary of the response headers; use ``headers`` instead.""" return self.response.headers def getheader(self, name, default=None): - """Returns a given response header.""" + """Returns a given response header; use ``headers.get()`` instead.""" return self.response.headers.get(name, default) @@ -77,6 +122,7 @@ def __init__(self, configuration) -> None: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args['assert_hostname'] = ( @@ -99,7 +145,9 @@ def __init__(self, configuration) -> None: # https pool manager self.pool_manager: urllib3.PoolManager - if configuration.proxy: + if configuration.proxy and not should_bypass_proxies( + configuration.host, configuration.no_proxy or '' + ): if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager pool_args["proxy_url"] = configuration.proxy @@ -171,12 +219,20 @@ def request( # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # no content type provided or payload is json content_type = headers.get('Content-Type') - if ( + is_json = ( not content_type or re.search('json', content_type, re.IGNORECASE) - ): + ) + # JSON is valid YAML 1.2, so structured YAML bodies can use + # the existing JSON serializer: + # https://yaml.org/spec/1.2.2/#13-relation-to-json + is_structured_yaml = ( + content_type + and re.search('yaml', content_type, re.IGNORECASE) + and not isinstance(body, (str, bytes)) + ) + if is_json or is_structured_yaml: request_body = None if body is not None: request_body = json.dumps(body) @@ -203,6 +259,8 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -224,7 +282,7 @@ def request( headers=headers, preload_content=False ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, diff --git a/pyproject.toml b/pyproject.toml index 1315ced..eeb1647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,34 +1,50 @@ -[tool.poetry] -name = "flat_api" -version = "1.1.3" -description = "Flat API" -authors = ["Flat "] -license = "NoLicense" +[project] +name = "flat-api" +description = "The official Python client for the Flat API" +authors = [{ name = "Flat", email = "developers@flat.io" }] +license = "Apache-2.0" +license-files = ["LICENSE"] readme = "README.md" -repository = "https://github.com/FlatIO/api-client-python" -keywords = ["OpenAPI", "OpenAPI-Generator", "Flat API"] -include = ["flat_api/py.typed"] +keywords = ["flat", "flat.io", "music", "notation", "openapi", "sheet-music"] +requires-python = ">=3.11" -[tool.poetry.dependencies] -python = "^3.7" +# VERSION is the durable source of truth (rule 5): it sits outside the generated zone and +# tools/generate.sh writes it. Deriving the packaged version from it here is what keeps the tag, +# the file and the published artifact from ever disagreeing. +dynamic = ["version"] -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +dependencies = [ + # Synchronous transport. + "urllib3 >=1.25.3, <3", + # Asynchronous transport, for AsyncFlatClient. flat_api.client imports it unconditionally, + # so it is a hard requirement rather than an extra. + "aiohttp >=3.9", + "aiohttp-retry >=2.8", + # flat_api.oauth, re-exported from the package root. + "httpx >=0.27", + "pydantic >=2", + "python-dateutil >=2.8.2", + "typing-extensions >=4.7.1", +] +[project.urls] +Homepage = "https://flat.io/developers/docs/api/" +Repository = "https://github.com/FlatIO/api-client-python" +Changelog = "https://github.com/FlatIO/api-client-python/blob/master/CHANGELOG.md" [build-system] -requires = ["setuptools"] +requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" +[tool.setuptools.dynamic] +version = { file = "VERSION" } + +[tool.setuptools.packages.find] +include = ["flat_api*"] + +[tool.setuptools.package-data] +flat_api = ["py.typed"] + [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" diff --git a/requirements.txt b/requirements.txt index cc85509..d14a6fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,9 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 +# Runtime dependencies, kept in step with the [project] dependencies in pyproject.toml. +# pyproject.toml is what PyPI installs from; this file is for a local checkout. +urllib3 >= 1.25.3, < 3 +aiohttp >= 3.9 +aiohttp-retry >= 2.8 +httpx >= 0.27 pydantic >= 2 +python-dateutil >= 2.8.2 typing-extensions >= 4.7.1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/setup.py b/setup.py deleted file mode 100644 index a1ed77d..0000000 --- a/setup.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Flat API -""" - - -import sys -from setuptools import setup, find_packages - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] - -try: - import pypandoc - LONG_DESCRIPTION = open('README.md').read() - LONG_DESCRIPTION = LONG_DESCRIPTION[:LONG_DESCRIPTION.index('## Documentation for API Endpoints')] - LONG_DESCRIPTION = pypandoc.convert_text(LONG_DESCRIPTION, 'rst', format='md') -except(IOError, ImportError): - LONG_DESCRIPTION = open('README.md').read() - -setup( - name="flat_api", - version="1.1.3", - description="Flat API Client", - author="The Flat Team (https://flat.io)", - author_email="developers@flat.io", - url="https://github.com/FlatIO/api-client-python", - keywords=["Flat API", "MusicXML", "Music Notation", "MIDI"], - long_description=LONG_DESCRIPTION, - long_description_content_type="text/markdown", - install_requires=REQUIRES, - packages=find_packages(exclude=["*test.*", "*test"]), - include_package_data=True, - license="Apache", - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: Education", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: Apache Software License", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Artistic Software", - "Topic :: Education", - "Topic :: Multimedia :: Sound/Audio" - ] -) diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 8e6d8cb..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 -mypy>=1.4.1 -types-python-dateutil>=2.8.19 diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_account_api.py b/test/test_account_api.py deleted file mode 100644 index 5a80aa5..0000000 --- a/test/test_account_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.account_api import AccountApi - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self) -> None: - self.api = AccountApi() - - def tearDown(self) -> None: - pass - - def test_get_authenticated_user(self) -> None: - """Test case for get_authenticated_user - - Get current user account - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_api_access_token.py b/test/test_api_access_token.py deleted file mode 100644 index b7b6ba4..0000000 --- a/test/test_api_access_token.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.api_access_token import ApiAccessToken - -class TestApiAccessToken(unittest.TestCase): - """ApiAccessToken unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiAccessToken: - """Test ApiAccessToken - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiAccessToken` - """ - model = ApiAccessToken() - if include_optional: - return ApiAccessToken( - id = '', - name = '', - token = '', - issued_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scopes = [ - 'account.public_profile' - ] - ) - else: - return ApiAccessToken( - ) - """ - - def testApiAccessToken(self): - """Test ApiAccessToken""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_app_scopes.py b/test/test_app_scopes.py deleted file mode 100644 index 7b6e1e3..0000000 --- a/test/test_app_scopes.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.app_scopes import AppScopes - -class TestAppScopes(unittest.TestCase): - """AppScopes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAppScopes(self): - """Test AppScopes""" - # inst = AppScopes() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment.py b/test/test_assignment.py deleted file mode 100644 index 748a2a8..0000000 --- a/test/test_assignment.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment import Assignment - -class TestAssignment(unittest.TestCase): - """Assignment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Assignment: - """Test Assignment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Assignment` - """ - model = Assignment() - if include_optional: - return Assignment( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - description = '', - cover = '', - cover_file = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - use_dedicated_attachments = True, - max_points = 1.337, - release_grades = 'auto', - shuffle_exercises = True, - toolset = '', - nb_playback_authorized = 1.337 - ) - else: - return Assignment( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - ) - """ - - def testAssignment(self): - """Test Assignment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_copy.py b/test/test_assignment_copy.py deleted file mode 100644 index bc39b4f..0000000 --- a/test/test_assignment_copy.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_copy import AssignmentCopy - -class TestAssignmentCopy(unittest.TestCase): - """AssignmentCopy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentCopy: - """Test AssignmentCopy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentCopy` - """ - model = AssignmentCopy() - if include_optional: - return AssignmentCopy( - classroom = '', - assignment = '', - scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - library_parent = '', - verify_if_not_already_in_resource_library = True - ) - else: - return AssignmentCopy( - classroom = '', - library_parent = '', - ) - """ - - def testAssignmentCopy(self): - """Test AssignmentCopy""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_copy_response.py b/test/test_assignment_copy_response.py deleted file mode 100644 index 37bdd41..0000000 --- a/test/test_assignment_copy_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_copy_response import AssignmentCopyResponse - -class TestAssignmentCopyResponse(unittest.TestCase): - """AssignmentCopyResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentCopyResponse: - """Test AssignmentCopyResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentCopyResponse` - """ - model = AssignmentCopyResponse() - if include_optional: - return AssignmentCopyResponse( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - description = '', - cover = '', - cover_file = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - use_dedicated_attachments = True, - max_points = 1.337, - release_grades = 'auto', - shuffle_exercises = True, - toolset = '', - nb_playback_authorized = 1.337, - resource = '' - ) - else: - return AssignmentCopyResponse( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - ) - """ - - def testAssignmentCopyResponse(self): - """Test AssignmentCopyResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_copy_response_capabilities.py b/test/test_assignment_copy_response_capabilities.py deleted file mode 100644 index 818bcf4..0000000 --- a/test/test_assignment_copy_response_capabilities.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_copy_response_capabilities import AssignmentCopyResponseCapabilities - -class TestAssignmentCopyResponseCapabilities(unittest.TestCase): - """AssignmentCopyResponseCapabilities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentCopyResponseCapabilities: - """Test AssignmentCopyResponseCapabilities - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentCopyResponseCapabilities` - """ - model = AssignmentCopyResponseCapabilities() - if include_optional: - return AssignmentCopyResponseCapabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True - ) - else: - return AssignmentCopyResponseCapabilities( - can_edit = True, - can_publish_in_class = True, - can_archive = True, - can_unarchive = True, - ) - """ - - def testAssignmentCopyResponseCapabilities(self): - """Test AssignmentCopyResponseCapabilities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py b/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py deleted file mode 100644 index 08f2935..0000000 --- a/test/test_assignment_copy_response_capabilities_can_publish_in_class_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error import AssignmentCopyResponseCapabilitiesCanPublishInClassError - -class TestAssignmentCopyResponseCapabilitiesCanPublishInClassError(unittest.TestCase): - """AssignmentCopyResponseCapabilitiesCanPublishInClassError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentCopyResponseCapabilitiesCanPublishInClassError: - """Test AssignmentCopyResponseCapabilitiesCanPublishInClassError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentCopyResponseCapabilitiesCanPublishInClassError` - """ - model = AssignmentCopyResponseCapabilitiesCanPublishInClassError() - if include_optional: - return AssignmentCopyResponseCapabilitiesCanPublishInClassError( - code = '', - message = '' - ) - else: - return AssignmentCopyResponseCapabilitiesCanPublishInClassError( - code = '', - message = '', - ) - """ - - def testAssignmentCopyResponseCapabilitiesCanPublishInClassError(self): - """Test AssignmentCopyResponseCapabilitiesCanPublishInClassError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission.py b/test/test_assignment_submission.py deleted file mode 100644 index 5f0a974..0000000 --- a/test/test_assignment_submission.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission import AssignmentSubmission - -class TestAssignmentSubmission(unittest.TestCase): - """AssignmentSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmission: - """Test AssignmentSubmission - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmission` - """ - model = AssignmentSubmission() - if include_optional: - return AssignmentSubmission( - id = '', - state = 'created', - classroom = '', - assignment = '', - creator = '', - creation_date = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - submission_date = '', - return_date = '', - return_creator = '', - grade = 1.337, - draft_grade = 1.337, - max_points = 1.337, - exercises_ids = [ - '' - ], - playback = [ - flat_api.models.assignment_submission_playback_inner.AssignmentSubmission_playback_inner( - score = '', - nb_play_attempt = 1.337, ) - ], - comments = flat_api.models.assignment_submission_comments.AssignmentSubmission_comments( - total = 1.337, - unread = 1.337, ), - google_classroom = {"id":"CgsI-00000000000","state":"turned_in","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/submissions/student/my-submission"}, - microsoft_graph = {"id":"8e460d32-d2d4-46b3-8e1a-9b7677a48fda","state":"returned"}, - lti = flat_api.models.assignment_submission_lti.AssignmentSubmission_lti( - sourcedid = '', ) - ) - else: - return AssignmentSubmission( - id = '', - state = 'created', - classroom = '', - assignment = '', - creator = '', - creation_date = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - playback = [ - flat_api.models.assignment_submission_playback_inner.AssignmentSubmission_playback_inner( - score = '', - nb_play_attempt = 1.337, ) - ], - comments = flat_api.models.assignment_submission_comments.AssignmentSubmission_comments( - total = 1.337, - unread = 1.337, ), - ) - """ - - def testAssignmentSubmission(self): - """Test AssignmentSubmission""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_comment.py b/test/test_assignment_submission_comment.py deleted file mode 100644 index babd960..0000000 --- a/test/test_assignment_submission_comment.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_comment import AssignmentSubmissionComment - -class TestAssignmentSubmissionComment(unittest.TestCase): - """AssignmentSubmissionComment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionComment: - """Test AssignmentSubmissionComment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionComment` - """ - model = AssignmentSubmissionComment() - if include_optional: - return AssignmentSubmissionComment( - id = '', - user = '', - submission = '', - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - comment = '', - unread = True - ) - else: - return AssignmentSubmissionComment( - ) - """ - - def testAssignmentSubmissionComment(self): - """Test AssignmentSubmissionComment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_comment_creation.py b/test/test_assignment_submission_comment_creation.py deleted file mode 100644 index 8693626..0000000 --- a/test/test_assignment_submission_comment_creation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_comment_creation import AssignmentSubmissionCommentCreation - -class TestAssignmentSubmissionCommentCreation(unittest.TestCase): - """AssignmentSubmissionCommentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionCommentCreation: - """Test AssignmentSubmissionCommentCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionCommentCreation` - """ - model = AssignmentSubmissionCommentCreation() - if include_optional: - return AssignmentSubmissionCommentCreation( - comment = '' - ) - else: - return AssignmentSubmissionCommentCreation( - comment = '', - ) - """ - - def testAssignmentSubmissionCommentCreation(self): - """Test AssignmentSubmissionCommentCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_comments.py b/test/test_assignment_submission_comments.py deleted file mode 100644 index 1d322a6..0000000 --- a/test/test_assignment_submission_comments.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_comments import AssignmentSubmissionComments - -class TestAssignmentSubmissionComments(unittest.TestCase): - """AssignmentSubmissionComments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionComments: - """Test AssignmentSubmissionComments - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionComments` - """ - model = AssignmentSubmissionComments() - if include_optional: - return AssignmentSubmissionComments( - total = 1.337, - unread = 1.337 - ) - else: - return AssignmentSubmissionComments( - ) - """ - - def testAssignmentSubmissionComments(self): - """Test AssignmentSubmissionComments""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_history.py b/test/test_assignment_submission_history.py deleted file mode 100644 index 492dd23..0000000 --- a/test/test_assignment_submission_history.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_history import AssignmentSubmissionHistory - -class TestAssignmentSubmissionHistory(unittest.TestCase): - """AssignmentSubmissionHistory unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionHistory: - """Test AssignmentSubmissionHistory - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionHistory` - """ - model = AssignmentSubmissionHistory() - if include_optional: - return AssignmentSubmissionHistory( - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - classroom = '', - assignment = '', - submission = '', - users = [ - '' - ], - source = 'lti', - state = 'created', - draft_grade = 1.337, - grade = 1.337, - max_points = 1.337, - comment = '', - due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - attachment = flat_api.models.assignment_submission_history_attachment.AssignmentSubmissionHistory_attachment( - score = '', - revision = '', - title = '', ) - ) - else: - return AssignmentSubmissionHistory( - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - users = [ - '' - ], - ) - """ - - def testAssignmentSubmissionHistory(self): - """Test AssignmentSubmissionHistory""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_history_attachment.py b/test/test_assignment_submission_history_attachment.py deleted file mode 100644 index c1bc26b..0000000 --- a/test/test_assignment_submission_history_attachment.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_history_attachment import AssignmentSubmissionHistoryAttachment - -class TestAssignmentSubmissionHistoryAttachment(unittest.TestCase): - """AssignmentSubmissionHistoryAttachment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionHistoryAttachment: - """Test AssignmentSubmissionHistoryAttachment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionHistoryAttachment` - """ - model = AssignmentSubmissionHistoryAttachment() - if include_optional: - return AssignmentSubmissionHistoryAttachment( - score = '', - revision = '', - title = '' - ) - else: - return AssignmentSubmissionHistoryAttachment( - ) - """ - - def testAssignmentSubmissionHistoryAttachment(self): - """Test AssignmentSubmissionHistoryAttachment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_history_state.py b/test/test_assignment_submission_history_state.py deleted file mode 100644 index 6e0357e..0000000 --- a/test/test_assignment_submission_history_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_history_state import AssignmentSubmissionHistoryState - -class TestAssignmentSubmissionHistoryState(unittest.TestCase): - """AssignmentSubmissionHistoryState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionHistoryState(self): - """Test AssignmentSubmissionHistoryState""" - # inst = AssignmentSubmissionHistoryState() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_lti.py b/test/test_assignment_submission_lti.py deleted file mode 100644 index 06c386a..0000000 --- a/test/test_assignment_submission_lti.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_lti import AssignmentSubmissionLti - -class TestAssignmentSubmissionLti(unittest.TestCase): - """AssignmentSubmissionLti unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionLti: - """Test AssignmentSubmissionLti - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionLti` - """ - model = AssignmentSubmissionLti() - if include_optional: - return AssignmentSubmissionLti( - sourcedid = '' - ) - else: - return AssignmentSubmissionLti( - sourcedid = '', - ) - """ - - def testAssignmentSubmissionLti(self): - """Test AssignmentSubmissionLti""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_playback_inner.py b/test/test_assignment_submission_playback_inner.py deleted file mode 100644 index 53d9c8b..0000000 --- a/test/test_assignment_submission_playback_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_playback_inner import AssignmentSubmissionPlaybackInner - -class TestAssignmentSubmissionPlaybackInner(unittest.TestCase): - """AssignmentSubmissionPlaybackInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionPlaybackInner: - """Test AssignmentSubmissionPlaybackInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionPlaybackInner` - """ - model = AssignmentSubmissionPlaybackInner() - if include_optional: - return AssignmentSubmissionPlaybackInner( - score = '', - nb_play_attempt = 1.337 - ) - else: - return AssignmentSubmissionPlaybackInner( - score = '', - nb_play_attempt = 1.337, - ) - """ - - def testAssignmentSubmissionPlaybackInner(self): - """Test AssignmentSubmissionPlaybackInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_state.py b/test/test_assignment_submission_state.py deleted file mode 100644 index 826d569..0000000 --- a/test/test_assignment_submission_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_state import AssignmentSubmissionState - -class TestAssignmentSubmissionState(unittest.TestCase): - """AssignmentSubmissionState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentSubmissionState(self): - """Test AssignmentSubmissionState""" - # inst = AssignmentSubmissionState() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_submission_update.py b/test/test_assignment_submission_update.py deleted file mode 100644 index ea3e9d9..0000000 --- a/test/test_assignment_submission_update.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_submission_update import AssignmentSubmissionUpdate - -class TestAssignmentSubmissionUpdate(unittest.TestCase): - """AssignmentSubmissionUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentSubmissionUpdate: - """Test AssignmentSubmissionUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentSubmissionUpdate` - """ - model = AssignmentSubmissionUpdate() - if include_optional: - return AssignmentSubmissionUpdate( - attachments = [ - {"type":"flat","score":"000000000000000001","sharingMode":"copy"} - ], - submit = True, - draft_grade = 0, - grade = 0, - exercises_ids = [ - '' - ], - var_return = True - ) - else: - return AssignmentSubmissionUpdate( - ) - """ - - def testAssignmentSubmissionUpdate(self): - """Test AssignmentSubmissionUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_type.py b/test/test_assignment_type.py deleted file mode 100644 index d96e979..0000000 --- a/test/test_assignment_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_type import AssignmentType - -class TestAssignmentType(unittest.TestCase): - """AssignmentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAssignmentType(self): - """Test AssignmentType""" - # inst = AssignmentType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_assignment_update.py b/test/test_assignment_update.py deleted file mode 100644 index d61f75c..0000000 --- a/test/test_assignment_update.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.assignment_update import AssignmentUpdate - -class TestAssignmentUpdate(unittest.TestCase): - """AssignmentUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AssignmentUpdate: - """Test AssignmentUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AssignmentUpdate` - """ - model = AssignmentUpdate() - if include_optional: - return AssignmentUpdate( - type = 'none', - title = '0', - description = '', - attachments = [ - {"type":"flat","score":"000000000000000001","sharingMode":"copy"} - ], - nb_playback_authorized = 1.337, - toolset = '', - cover_file = '', - cover = '', - max_points = 0, - release_grades = 'auto', - shuffle_exercises = True - ) - else: - return AssignmentUpdate( - ) - """ - - def testAssignmentUpdate(self): - """Test AssignmentUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_api.py b/test/test_class_api.py deleted file mode 100644 index 40dbfb3..0000000 --- a/test/test_class_api.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.class_api import ClassApi - - -class TestClassApi(unittest.TestCase): - """ClassApi unit test stubs""" - - def setUp(self) -> None: - self.api = ClassApi() - - def tearDown(self) -> None: - pass - - def test_activate_class(self) -> None: - """Test case for activate_class - - Activate the class - """ - pass - - def test_add_class_user(self) -> None: - """Test case for add_class_user - - Add a user to the class - """ - pass - - def test_archive_assignment(self) -> None: - """Test case for archive_assignment - - Archive the assignment - """ - pass - - def test_archive_class(self) -> None: - """Test case for archive_class - - Archive the class - """ - pass - - def test_copy_assignment(self) -> None: - """Test case for copy_assignment - - Copy an assignment - """ - pass - - def test_create_class(self) -> None: - """Test case for create_class - - Create a new class - """ - pass - - def test_create_class_assignment(self) -> None: - """Test case for create_class_assignment - - Assignment creation - """ - pass - - def test_create_submission(self) -> None: - """Test case for create_submission - - Create or edit a submission - """ - pass - - def test_create_test_student_account(self) -> None: - """Test case for create_test_student_account - - Create a test student account - """ - pass - - def test_delete_class_user(self) -> None: - """Test case for delete_class_user - - Remove a user from the class - """ - pass - - def test_delete_submission(self) -> None: - """Test case for delete_submission - - Reset a submission - """ - pass - - def test_delete_submission_comment(self) -> None: - """Test case for delete_submission_comment - - Delete a feedback comment to a submission - """ - pass - - def test_edit_submission(self) -> None: - """Test case for edit_submission - - Edit a submission - """ - pass - - def test_enroll_class(self) -> None: - """Test case for enroll_class - - Join a class - """ - pass - - def test_export_submissions_reviews_as_csv(self) -> None: - """Test case for export_submissions_reviews_as_csv - - CSV Grades exports - """ - pass - - def test_export_submissions_reviews_as_excel(self) -> None: - """Test case for export_submissions_reviews_as_excel - - Excel Grades exports - """ - pass - - def test_get_class(self) -> None: - """Test case for get_class - - Get the details of a single class - """ - pass - - def test_get_score_submissions(self) -> None: - """Test case for get_score_submissions - - List submissions related to the score - """ - pass - - def test_get_submission(self) -> None: - """Test case for get_submission - - Get a student submission - """ - pass - - def test_get_submission_comments(self) -> None: - """Test case for get_submission_comments - - List the feedback comments of a submission - """ - pass - - def test_get_submission_history(self) -> None: - """Test case for get_submission_history - - Get the history of the submission - """ - pass - - def test_get_submissions(self) -> None: - """Test case for get_submissions - - List the students' submissions - """ - pass - - def test_list_assignments(self) -> None: - """Test case for list_assignments - - Assignments listing - """ - pass - - def test_list_class_student_submissions(self) -> None: - """Test case for list_class_student_submissions - - List the submissions for a student - """ - pass - - def test_list_classes(self) -> None: - """Test case for list_classes - - List the classes available for the current user - """ - pass - - def test_post_submission_comment(self) -> None: - """Test case for post_submission_comment - - Add a feedback comment to a submission - """ - pass - - def test_unarchive_assignment(self) -> None: - """Test case for unarchive_assignment - - Unarchive the assignment. - """ - pass - - def test_unarchive_class(self) -> None: - """Test case for unarchive_class - - Unarchive the class - """ - pass - - def test_update_class(self) -> None: - """Test case for update_class - - Update the class - """ - pass - - def test_update_submission_comment(self) -> None: - """Test case for update_submission_comment - - Update a feedback comment to a submission - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment.py b/test/test_class_assignment.py deleted file mode 100644 index 2d5b6f1..0000000 --- a/test/test_class_assignment.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment import ClassAssignment - -class TestClassAssignment(unittest.TestCase): - """ClassAssignment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignment: - """Test ClassAssignment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignment` - """ - model = ClassAssignment() - if include_optional: - return ClassAssignment( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - description = '', - cover = '', - cover_file = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - use_dedicated_attachments = True, - max_points = 1.337, - release_grades = 'auto', - shuffle_exercises = True, - toolset = '', - nb_playback_authorized = 1.337, - creator = '', - state = 'draft', - classroom = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - assignee_mode = 'everyone', - assigned_students = [ - '' - ], - submissions = [ - {"id":"58c4955c226ffff257211a90","classroom":"58c4725345cd836264f0b29e","assignment":"58c49068524c03ec576ca43c","creator":"559eb5c7f0d4d5e46d03781d","creationDate":"2020-08-12T00:25:00.748000Z","submissionDate":"2020-08-12T00:45:22.748000Z","attachments":[{"type":"flat","score":"58c4955a226ffff257211a8d","title":"Hello - Student"}],"returnDate":"2020-08-15T00:25:00.748000Z","returnCreator":"559eb5c7f0d4d5e46d000000","grade":80,"draftGrade":82,"googleClassroom":{"id":"CgsI-00000000000","state":"turned_in","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/submissions/student/my-submission"}} - ], - google_classroom = {"id":"1235665432","state":"draft","alternateLink":"http://classroom.google.com/c/music-theory/a/first-assignment/detail"}, - microsoft_graph = {"id":"8e460d32-d2d4-46b3-8e1a-9b7677a48fda","state":"draft","alternateLink":"https://teams.microsoft.com/l/entity","categories":["0a012acd-6e78-4cd0-89a9-80d296e48f82"]}, - mfc = flat_api.models.class_assignment_mfc.ClassAssignment_mfc( - id = '', - alternate_link = '', ), - canvas = flat_api.models.class_assignment_canvas.ClassAssignment_canvas( - id = '', - alternate_link = '', ), - lti = flat_api.models.class_assignment_lti.ClassAssignment_lti( - id = '', ), - issue = '' - ) - else: - return ClassAssignment( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - ) - """ - - def testClassAssignment(self): - """Test ClassAssignment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_canvas.py b/test/test_class_assignment_canvas.py deleted file mode 100644 index 665bef5..0000000 --- a/test/test_class_assignment_canvas.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_canvas import ClassAssignmentCanvas - -class TestClassAssignmentCanvas(unittest.TestCase): - """ClassAssignmentCanvas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentCanvas: - """Test ClassAssignmentCanvas - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentCanvas` - """ - model = ClassAssignmentCanvas() - if include_optional: - return ClassAssignmentCanvas( - id = '', - alternate_link = '' - ) - else: - return ClassAssignmentCanvas( - ) - """ - - def testClassAssignmentCanvas(self): - """Test ClassAssignmentCanvas""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_lti.py b/test/test_class_assignment_lti.py deleted file mode 100644 index d4d5045..0000000 --- a/test/test_class_assignment_lti.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_lti import ClassAssignmentLti - -class TestClassAssignmentLti(unittest.TestCase): - """ClassAssignmentLti unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentLti: - """Test ClassAssignmentLti - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentLti` - """ - model = ClassAssignmentLti() - if include_optional: - return ClassAssignmentLti( - id = '' - ) - else: - return ClassAssignmentLti( - ) - """ - - def testClassAssignmentLti(self): - """Test ClassAssignmentLti""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_mfc.py b/test/test_class_assignment_mfc.py deleted file mode 100644 index e6eed45..0000000 --- a/test/test_class_assignment_mfc.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_mfc import ClassAssignmentMfc - -class TestClassAssignmentMfc(unittest.TestCase): - """ClassAssignmentMfc unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentMfc: - """Test ClassAssignmentMfc - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentMfc` - """ - model = ClassAssignmentMfc() - if include_optional: - return ClassAssignmentMfc( - id = '', - alternate_link = '' - ) - else: - return ClassAssignmentMfc( - ) - """ - - def testClassAssignmentMfc(self): - """Test ClassAssignmentMfc""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_update.py b/test/test_class_assignment_update.py deleted file mode 100644 index c29ef7d..0000000 --- a/test/test_class_assignment_update.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_update import ClassAssignmentUpdate - -class TestClassAssignmentUpdate(unittest.TestCase): - """ClassAssignmentUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentUpdate: - """Test ClassAssignmentUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentUpdate` - """ - model = ClassAssignmentUpdate() - if include_optional: - return ClassAssignmentUpdate( - type = 'none', - title = '0', - description = '', - attachments = [ - {"type":"flat","score":"000000000000000001","sharingMode":"copy"} - ], - nb_playback_authorized = 1.337, - toolset = '', - cover_file = '', - cover = '', - max_points = 0, - release_grades = 'auto', - shuffle_exercises = True, - state = 'draft', - due_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scheduled_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - google_classroom = flat_api.models.class_assignment_update_google_classroom.ClassAssignmentUpdate_googleClassroom( - topic_id = '', ), - microsoft_graph = flat_api.models.class_assignment_update_microsoft_graph.ClassAssignmentUpdate_microsoftGraph( - categories = [ - '' - ], ), - assignee_mode = 'everyone', - assigned_students = [ - '' - ] - ) - else: - return ClassAssignmentUpdate( - ) - """ - - def testClassAssignmentUpdate(self): - """Test ClassAssignmentUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_update_google_classroom.py b/test/test_class_assignment_update_google_classroom.py deleted file mode 100644 index a60d32f..0000000 --- a/test/test_class_assignment_update_google_classroom.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_update_google_classroom import ClassAssignmentUpdateGoogleClassroom - -class TestClassAssignmentUpdateGoogleClassroom(unittest.TestCase): - """ClassAssignmentUpdateGoogleClassroom unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentUpdateGoogleClassroom: - """Test ClassAssignmentUpdateGoogleClassroom - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentUpdateGoogleClassroom` - """ - model = ClassAssignmentUpdateGoogleClassroom() - if include_optional: - return ClassAssignmentUpdateGoogleClassroom( - topic_id = '' - ) - else: - return ClassAssignmentUpdateGoogleClassroom( - ) - """ - - def testClassAssignmentUpdateGoogleClassroom(self): - """Test ClassAssignmentUpdateGoogleClassroom""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_assignment_update_microsoft_graph.py b/test/test_class_assignment_update_microsoft_graph.py deleted file mode 100644 index f074524..0000000 --- a/test/test_class_assignment_update_microsoft_graph.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_assignment_update_microsoft_graph import ClassAssignmentUpdateMicrosoftGraph - -class TestClassAssignmentUpdateMicrosoftGraph(unittest.TestCase): - """ClassAssignmentUpdateMicrosoftGraph unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAssignmentUpdateMicrosoftGraph: - """Test ClassAssignmentUpdateMicrosoftGraph - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAssignmentUpdateMicrosoftGraph` - """ - model = ClassAssignmentUpdateMicrosoftGraph() - if include_optional: - return ClassAssignmentUpdateMicrosoftGraph( - categories = [ - '' - ] - ) - else: - return ClassAssignmentUpdateMicrosoftGraph( - ) - """ - - def testClassAssignmentUpdateMicrosoftGraph(self): - """Test ClassAssignmentUpdateMicrosoftGraph""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_attachment_creation.py b/test/test_class_attachment_creation.py deleted file mode 100644 index a4a53a2..0000000 --- a/test/test_class_attachment_creation.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_attachment_creation import ClassAttachmentCreation - -class TestClassAttachmentCreation(unittest.TestCase): - """ClassAttachmentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassAttachmentCreation: - """Test ClassAttachmentCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassAttachmentCreation` - """ - model = ClassAttachmentCreation() - if include_optional: - return ClassAttachmentCreation( - type = 'rich', - score = '', - worksheet = '', - sharing_mode = 'read', - lock_score_template = True, - url = '', - google_drive_file_id = '' - ) - else: - return ClassAttachmentCreation( - ) - """ - - def testClassAttachmentCreation(self): - """Test ClassAttachmentCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_creation.py b/test/test_class_creation.py deleted file mode 100644 index 1153a06..0000000 --- a/test/test_class_creation.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_creation import ClassCreation - -class TestClassCreation(unittest.TestCase): - """ClassCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassCreation: - """Test ClassCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassCreation` - """ - model = ClassCreation() - if include_optional: - return ClassCreation( - name = '', - section = '', - level = 'elementary', - skills_focused = [ - 'notation' - ], - size = 0 - ) - else: - return ClassCreation( - name = '', - ) - """ - - def testClassCreation(self): - """Test ClassCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details.py b/test/test_class_details.py deleted file mode 100644 index 9d59605..0000000 --- a/test/test_class_details.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details import ClassDetails - -class TestClassDetails(unittest.TestCase): - """ClassDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetails: - """Test ClassDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetails` - """ - model = ClassDetails() - if include_optional: - return ClassDetails( - id = '', - state = 'active', - name = '', - section = '', - description = '', - organization = '', - owner = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - enrollment_code = '', - theme = '', - assignments_count = 1.337, - students_group = {"id":"58c4955c226ffff257211a00","name":"5th Grade - Teachers","type":"classTeachers","organization":"0000000000000000000000042","creationDate":"2017-07-02T15:02:40.207000Z","usersCount":2,"readOnly":false}, - teachers_group = {"id":"58c4955c226ffff257211a00","name":"5th Grade - Teachers","type":"classTeachers","organization":"0000000000000000000000042","creationDate":"2017-07-02T15:02:40.207000Z","usersCount":2,"readOnly":false}, - issues = flat_api.models.class_details_issues.ClassDetails_issues( - sync = [ - flat_api.models.class_details_issues_sync_inner.ClassDetails_issues_sync_inner( - id = '', - email = '', - reason = 'otherOrgnanization', ) - ], ), - google_classroom = flat_api.models.class_details_google_classroom.ClassDetails_googleClassroom( - id = '', - alternate_link = '', ), - google_drive = flat_api.models.class_details_google_drive.ClassDetails_googleDrive( - teacher_folder_id = '', - teacher_folder_alternate_link = '', ), - microsoft_graph = flat_api.models.class_details_microsoft_graph.ClassDetails_microsoftGraph( - id = '', ), - lti = flat_api.models.class_details_lti.ClassDetails_lti( - context_id = '', - context_title = '', - context_label = '', ), - canvas = flat_api.models.class_details_canvas.ClassDetails_canvas( - id = '', - domain = '', ), - mfc = flat_api.models.class_details_mfc.ClassDetails_mfc( - id = '', - alternate_link = '', ), - clever = flat_api.models.class_details_clever.ClassDetails_clever( - id = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - subject = 'english/language arts', - term_name = '', - term_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - term_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), - level = 'elementary', - skills_focused = [ - 'notation' - ], - size = 1.337 - ) - else: - return ClassDetails( - id = '', - ) - """ - - def testClassDetails(self): - """Test ClassDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_canvas.py b/test/test_class_details_canvas.py deleted file mode 100644 index 4b94bc2..0000000 --- a/test/test_class_details_canvas.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_canvas import ClassDetailsCanvas - -class TestClassDetailsCanvas(unittest.TestCase): - """ClassDetailsCanvas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsCanvas: - """Test ClassDetailsCanvas - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsCanvas` - """ - model = ClassDetailsCanvas() - if include_optional: - return ClassDetailsCanvas( - id = '', - domain = '' - ) - else: - return ClassDetailsCanvas( - ) - """ - - def testClassDetailsCanvas(self): - """Test ClassDetailsCanvas""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_clever.py b/test/test_class_details_clever.py deleted file mode 100644 index 0d5bb64..0000000 --- a/test/test_class_details_clever.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_clever import ClassDetailsClever - -class TestClassDetailsClever(unittest.TestCase): - """ClassDetailsClever unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsClever: - """Test ClassDetailsClever - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsClever` - """ - model = ClassDetailsClever() - if include_optional: - return ClassDetailsClever( - id = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - subject = 'english/language arts', - term_name = '', - term_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - term_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return ClassDetailsClever( - ) - """ - - def testClassDetailsClever(self): - """Test ClassDetailsClever""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_google_classroom.py b/test/test_class_details_google_classroom.py deleted file mode 100644 index 0743a3e..0000000 --- a/test/test_class_details_google_classroom.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_google_classroom import ClassDetailsGoogleClassroom - -class TestClassDetailsGoogleClassroom(unittest.TestCase): - """ClassDetailsGoogleClassroom unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsGoogleClassroom: - """Test ClassDetailsGoogleClassroom - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsGoogleClassroom` - """ - model = ClassDetailsGoogleClassroom() - if include_optional: - return ClassDetailsGoogleClassroom( - id = '', - alternate_link = '' - ) - else: - return ClassDetailsGoogleClassroom( - ) - """ - - def testClassDetailsGoogleClassroom(self): - """Test ClassDetailsGoogleClassroom""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_google_drive.py b/test/test_class_details_google_drive.py deleted file mode 100644 index 297b0b9..0000000 --- a/test/test_class_details_google_drive.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_google_drive import ClassDetailsGoogleDrive - -class TestClassDetailsGoogleDrive(unittest.TestCase): - """ClassDetailsGoogleDrive unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsGoogleDrive: - """Test ClassDetailsGoogleDrive - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsGoogleDrive` - """ - model = ClassDetailsGoogleDrive() - if include_optional: - return ClassDetailsGoogleDrive( - teacher_folder_id = '', - teacher_folder_alternate_link = '' - ) - else: - return ClassDetailsGoogleDrive( - ) - """ - - def testClassDetailsGoogleDrive(self): - """Test ClassDetailsGoogleDrive""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_issues.py b/test/test_class_details_issues.py deleted file mode 100644 index 5b9a259..0000000 --- a/test/test_class_details_issues.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_issues import ClassDetailsIssues - -class TestClassDetailsIssues(unittest.TestCase): - """ClassDetailsIssues unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsIssues: - """Test ClassDetailsIssues - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsIssues` - """ - model = ClassDetailsIssues() - if include_optional: - return ClassDetailsIssues( - sync = [ - flat_api.models.class_details_issues_sync_inner.ClassDetails_issues_sync_inner( - id = '', - email = '', - reason = 'otherOrgnanization', ) - ] - ) - else: - return ClassDetailsIssues( - ) - """ - - def testClassDetailsIssues(self): - """Test ClassDetailsIssues""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_issues_sync_inner.py b/test/test_class_details_issues_sync_inner.py deleted file mode 100644 index 799dbd6..0000000 --- a/test/test_class_details_issues_sync_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_issues_sync_inner import ClassDetailsIssuesSyncInner - -class TestClassDetailsIssuesSyncInner(unittest.TestCase): - """ClassDetailsIssuesSyncInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsIssuesSyncInner: - """Test ClassDetailsIssuesSyncInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsIssuesSyncInner` - """ - model = ClassDetailsIssuesSyncInner() - if include_optional: - return ClassDetailsIssuesSyncInner( - id = '', - email = '', - reason = 'otherOrgnanization' - ) - else: - return ClassDetailsIssuesSyncInner( - ) - """ - - def testClassDetailsIssuesSyncInner(self): - """Test ClassDetailsIssuesSyncInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_lti.py b/test/test_class_details_lti.py deleted file mode 100644 index 1ea9367..0000000 --- a/test/test_class_details_lti.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_lti import ClassDetailsLti - -class TestClassDetailsLti(unittest.TestCase): - """ClassDetailsLti unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsLti: - """Test ClassDetailsLti - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsLti` - """ - model = ClassDetailsLti() - if include_optional: - return ClassDetailsLti( - context_id = '', - context_title = '', - context_label = '' - ) - else: - return ClassDetailsLti( - ) - """ - - def testClassDetailsLti(self): - """Test ClassDetailsLti""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_mfc.py b/test/test_class_details_mfc.py deleted file mode 100644 index 72d26b3..0000000 --- a/test/test_class_details_mfc.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_mfc import ClassDetailsMfc - -class TestClassDetailsMfc(unittest.TestCase): - """ClassDetailsMfc unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsMfc: - """Test ClassDetailsMfc - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsMfc` - """ - model = ClassDetailsMfc() - if include_optional: - return ClassDetailsMfc( - id = '', - alternate_link = '' - ) - else: - return ClassDetailsMfc( - ) - """ - - def testClassDetailsMfc(self): - """Test ClassDetailsMfc""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_details_microsoft_graph.py b/test/test_class_details_microsoft_graph.py deleted file mode 100644 index 12ccac2..0000000 --- a/test/test_class_details_microsoft_graph.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_details_microsoft_graph import ClassDetailsMicrosoftGraph - -class TestClassDetailsMicrosoftGraph(unittest.TestCase): - """ClassDetailsMicrosoftGraph unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassDetailsMicrosoftGraph: - """Test ClassDetailsMicrosoftGraph - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassDetailsMicrosoftGraph` - """ - model = ClassDetailsMicrosoftGraph() - if include_optional: - return ClassDetailsMicrosoftGraph( - id = '' - ) - else: - return ClassDetailsMicrosoftGraph( - ) - """ - - def testClassDetailsMicrosoftGraph(self): - """Test ClassDetailsMicrosoftGraph""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_grade_level.py b/test/test_class_grade_level.py deleted file mode 100644 index 5080ae9..0000000 --- a/test/test_class_grade_level.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_grade_level import ClassGradeLevel - -class TestClassGradeLevel(unittest.TestCase): - """ClassGradeLevel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassGradeLevel(self): - """Test ClassGradeLevel""" - # inst = ClassGradeLevel() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_roles.py b/test/test_class_roles.py deleted file mode 100644 index 6df26cb..0000000 --- a/test/test_class_roles.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_roles import ClassRoles - -class TestClassRoles(unittest.TestCase): - """ClassRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassRoles(self): - """Test ClassRoles""" - # inst = ClassRoles() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_state.py b/test/test_class_state.py deleted file mode 100644 index bcb66b0..0000000 --- a/test/test_class_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_state import ClassState - -class TestClassState(unittest.TestCase): - """ClassState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClassState(self): - """Test ClassState""" - # inst = ClassState() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_class_update.py b/test/test_class_update.py deleted file mode 100644 index 124ee35..0000000 --- a/test/test_class_update.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.class_update import ClassUpdate - -class TestClassUpdate(unittest.TestCase): - """ClassUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClassUpdate: - """Test ClassUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClassUpdate` - """ - model = ClassUpdate() - if include_optional: - return ClassUpdate( - name = '', - section = '', - level = 'elementary', - skills_focused = [ - 'notation' - ], - size = 0 - ) - else: - return ClassUpdate( - ) - """ - - def testClassUpdate(self): - """Test ClassUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection.py b/test/test_collection.py deleted file mode 100644 index 726f669..0000000 --- a/test/test_collection.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection import Collection - -class TestCollection(unittest.TestCase): - """Collection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Collection: - """Test Collection - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Collection` - """ - model = Collection() - if include_optional: - return Collection( - id = '', - title = '', - html_url = '', - type = 'root', - privacy = 'private', - sharing_key = '', - app = flat_api.models.collection_app.CollectionApp( - id = '', - name = '', - logo = '', ), - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - user = flat_api.models.user_public_summary.UserPublicSummary( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', ), - organization = '', - rights = {"aclRead":true,"aclWrite":true,"aclAdmin":true,"isCollaborator":true}, - collaborators = [ - flat_api.models.resource_collaborator.ResourceCollaborator( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - collaborator_type = 'owner', - id = '', - date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - score = '', - collection = '', - user = flat_api.models.user_public.UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), ), - group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, - user_email = '', - invited = True, ) - ], - capabilities = flat_api.models.collection_capabilities.Collection_capabilities( - can_edit = True, - can_share = True, - can_delete = True, - can_add_scores = True, - can_delete_scores = True, ), - collections = [ - '' - ] - ) - else: - return Collection( - capabilities = flat_api.models.collection_capabilities.Collection_capabilities( - can_edit = True, - can_share = True, - can_delete = True, - can_add_scores = True, - can_delete_scores = True, ), - ) - """ - - def testCollection(self): - """Test Collection""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_api.py b/test/test_collection_api.py deleted file mode 100644 index fe1bd62..0000000 --- a/test/test_collection_api.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.collection_api import CollectionApi - - -class TestCollectionApi(unittest.TestCase): - """CollectionApi unit test stubs""" - - def setUp(self) -> None: - self.api = CollectionApi() - - def tearDown(self) -> None: - pass - - def test_add_score_to_collection(self) -> None: - """Test case for add_score_to_collection - - Add a score to the collection - """ - pass - - def test_create_collection(self) -> None: - """Test case for create_collection - - Create a new collection - """ - pass - - def test_delete_collection(self) -> None: - """Test case for delete_collection - - Delete the collection - """ - pass - - def test_delete_score_from_collection(self) -> None: - """Test case for delete_score_from_collection - - Delete a score from the collection - """ - pass - - def test_edit_collection(self) -> None: - """Test case for edit_collection - - Update a collection's metadata - """ - pass - - def test_get_collection(self) -> None: - """Test case for get_collection - - Get collection details - """ - pass - - def test_list_collection_scores(self) -> None: - """Test case for list_collection_scores - - List the scores contained in a collection - """ - pass - - def test_list_collections(self) -> None: - """Test case for list_collections - - List the collections - """ - pass - - def test_untrash_collection(self) -> None: - """Test case for untrash_collection - - Untrash a collection - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_app.py b/test/test_collection_app.py deleted file mode 100644 index 32ab923..0000000 --- a/test/test_collection_app.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_app import CollectionApp - -class TestCollectionApp(unittest.TestCase): - """CollectionApp unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CollectionApp: - """Test CollectionApp - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CollectionApp` - """ - model = CollectionApp() - if include_optional: - return CollectionApp( - id = '', - name = '', - logo = '' - ) - else: - return CollectionApp( - ) - """ - - def testCollectionApp(self): - """Test CollectionApp""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_capabilities.py b/test/test_collection_capabilities.py deleted file mode 100644 index bcf7374..0000000 --- a/test/test_collection_capabilities.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_capabilities import CollectionCapabilities - -class TestCollectionCapabilities(unittest.TestCase): - """CollectionCapabilities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CollectionCapabilities: - """Test CollectionCapabilities - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CollectionCapabilities` - """ - model = CollectionCapabilities() - if include_optional: - return CollectionCapabilities( - can_edit = True, - can_share = True, - can_delete = True, - can_add_scores = True, - can_delete_scores = True - ) - else: - return CollectionCapabilities( - can_edit = True, - can_share = True, - can_delete = True, - can_add_scores = True, - can_delete_scores = True, - ) - """ - - def testCollectionCapabilities(self): - """Test CollectionCapabilities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_creation.py b/test/test_collection_creation.py deleted file mode 100644 index 1ecbc8c..0000000 --- a/test/test_collection_creation.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_creation import CollectionCreation - -class TestCollectionCreation(unittest.TestCase): - """CollectionCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CollectionCreation: - """Test CollectionCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CollectionCreation` - """ - model = CollectionCreation() - if include_optional: - return CollectionCreation( - title = '0', - privacy = 'private' - ) - else: - return CollectionCreation( - title = '0', - privacy = 'private', - ) - """ - - def testCollectionCreation(self): - """Test CollectionCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_modification.py b/test/test_collection_modification.py deleted file mode 100644 index 358826d..0000000 --- a/test/test_collection_modification.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_modification import CollectionModification - -class TestCollectionModification(unittest.TestCase): - """CollectionModification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CollectionModification: - """Test CollectionModification - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CollectionModification` - """ - model = CollectionModification() - if include_optional: - return CollectionModification( - title = '0', - privacy = 'private' - ) - else: - return CollectionModification( - ) - """ - - def testCollectionModification(self): - """Test CollectionModification""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_privacy.py b/test/test_collection_privacy.py deleted file mode 100644 index feff8d1..0000000 --- a/test/test_collection_privacy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_privacy import CollectionPrivacy - -class TestCollectionPrivacy(unittest.TestCase): - """CollectionPrivacy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionPrivacy(self): - """Test CollectionPrivacy""" - # inst = CollectionPrivacy() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_collection_type.py b/test/test_collection_type.py deleted file mode 100644 index 45f62b9..0000000 --- a/test/test_collection_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.collection_type import CollectionType - -class TestCollectionType(unittest.TestCase): - """CollectionType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCollectionType(self): - """Test CollectionType""" - # inst = CollectionType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_library.py b/test/test_edu_library.py deleted file mode 100644 index d4a35f5..0000000 --- a/test/test_edu_library.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_library import EduLibrary - -class TestEduLibrary(unittest.TestCase): - """EduLibrary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduLibrary: - """Test EduLibrary - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduLibrary` - """ - model = EduLibrary() - if include_optional: - return EduLibrary( - id = '', - name = '', - type = 'myResources', - visibility = 'private' - ) - else: - return EduLibrary( - ) - """ - - def testEduLibrary(self): - """Test EduLibrary""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource.py b/test/test_edu_resource.py deleted file mode 100644 index d147303..0000000 --- a/test/test_edu_resource.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource import EduResource - -class TestEduResource(unittest.TestCase): - """EduResource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResource: - """Test EduResource - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResource` - """ - model = EduResource() - if include_optional: - return EduResource( - id = '', - creator = '', - type = 'assignment', - privacy = 'private', - tags = [ - '' - ], - parent = '', - title = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - update_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - resource = flat_api.models.edu_resource_resource.EduResource_resource( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - description = '', - cover = '', - cover_file = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - use_dedicated_attachments = True, - max_points = 1.337, - release_grades = 'auto', - shuffle_exercises = True, - toolset = '', - nb_playback_authorized = 1.337, ), - capabilities = flat_api.models.edu_resource_capabilities.EduResource_capabilities( - can_edit = True, - can_add_resources = True, - can_add_folders = True, ) - ) - else: - return EduResource( - id = '', - type = 'assignment', - title = '', - capabilities = flat_api.models.edu_resource_capabilities.EduResource_capabilities( - can_edit = True, - can_add_resources = True, - can_add_folders = True, ), - ) - """ - - def testEduResource(self): - """Test EduResource""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_capabilities.py b/test/test_edu_resource_capabilities.py deleted file mode 100644 index 58078e5..0000000 --- a/test/test_edu_resource_capabilities.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_capabilities import EduResourceCapabilities - -class TestEduResourceCapabilities(unittest.TestCase): - """EduResourceCapabilities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceCapabilities: - """Test EduResourceCapabilities - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceCapabilities` - """ - model = EduResourceCapabilities() - if include_optional: - return EduResourceCapabilities( - can_edit = True, - can_add_resources = True, - can_add_folders = True - ) - else: - return EduResourceCapabilities( - ) - """ - - def testEduResourceCapabilities(self): - """Test EduResourceCapabilities""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_copy.py b/test/test_edu_resource_copy.py deleted file mode 100644 index c2d2dc4..0000000 --- a/test/test_edu_resource_copy.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_copy import EduResourceCopy - -class TestEduResourceCopy(unittest.TestCase): - """EduResourceCopy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceCopy: - """Test EduResourceCopy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceCopy` - """ - model = EduResourceCopy() - if include_optional: - return EduResourceCopy( - destination = '' - ) - else: - return EduResourceCopy( - destination = '', - ) - """ - - def testEduResourceCopy(self): - """Test EduResourceCopy""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_creation.py b/test/test_edu_resource_creation.py deleted file mode 100644 index 6b00c3e..0000000 --- a/test/test_edu_resource_creation.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_creation import EduResourceCreation - -class TestEduResourceCreation(unittest.TestCase): - """EduResourceCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceCreation: - """Test EduResourceCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceCreation` - """ - model = EduResourceCreation() - if include_optional: - return EduResourceCreation( - type = 'assignment', - title = '0', - parent = 'root' - ) - else: - return EduResourceCreation( - type = 'assignment', - title = '0', - ) - """ - - def testEduResourceCreation(self): - """Test EduResourceCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_lti_link.py b/test/test_edu_resource_lti_link.py deleted file mode 100644 index b350cf4..0000000 --- a/test/test_edu_resource_lti_link.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_lti_link import EduResourceLtiLink - -class TestEduResourceLtiLink(unittest.TestCase): - """EduResourceLtiLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceLtiLink: - """Test EduResourceLtiLink - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceLtiLink` - """ - model = EduResourceLtiLink() - if include_optional: - return EduResourceLtiLink( - lti_url = '' - ) - else: - return EduResourceLtiLink( - lti_url = '', - ) - """ - - def testEduResourceLtiLink(self): - """Test EduResourceLtiLink""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_move.py b/test/test_edu_resource_move.py deleted file mode 100644 index 833e4a9..0000000 --- a/test/test_edu_resource_move.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_move import EduResourceMove - -class TestEduResourceMove(unittest.TestCase): - """EduResourceMove unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceMove: - """Test EduResourceMove - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceMove` - """ - model = EduResourceMove() - if include_optional: - return EduResourceMove( - destination = '' - ) - else: - return EduResourceMove( - destination = '', - ) - """ - - def testEduResourceMove(self): - """Test EduResourceMove""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_privacy.py b/test/test_edu_resource_privacy.py deleted file mode 100644 index 52022e9..0000000 --- a/test/test_edu_resource_privacy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_privacy import EduResourcePrivacy - -class TestEduResourcePrivacy(unittest.TestCase): - """EduResourcePrivacy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEduResourcePrivacy(self): - """Test EduResourcePrivacy""" - # inst = EduResourcePrivacy() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_resource.py b/test/test_edu_resource_resource.py deleted file mode 100644 index 11980b2..0000000 --- a/test/test_edu_resource_resource.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_resource import EduResourceResource - -class TestEduResourceResource(unittest.TestCase): - """EduResourceResource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceResource: - """Test EduResourceResource - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceResource` - """ - model = EduResourceResource() - if include_optional: - return EduResourceResource( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - description = '', - cover = '', - cover_file = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - use_dedicated_attachments = True, - max_points = 1.337, - release_grades = 'auto', - shuffle_exercises = True, - toolset = '', - nb_playback_authorized = 1.337 - ) - else: - return EduResourceResource( - id = '', - type = 'none', - capabilities = flat_api.models.assignment_copy_response_capabilities.AssignmentCopyResponse_capabilities( - can_edit = True, - can_publish_in_class = True, - can_publish_in_class_error = flat_api.models.assignment_copy_response_capabilities_can_publish_in_class_error.AssignmentCopyResponse_capabilities_canPublishInClassError( - code = '', - message = '', ), - can_archive = True, - can_unarchive = True, ), - title = '', - attachments = [ - {"type":"video","url":"https://www.youtube.com/watch?v=SNbRUiBZ4Uw","title":"Flat - The online collaborative music notation software","description":"Discover Flat on https://flat.io","html":"","thumbnailUrl":"https://i.ytimg.com/vi/SNbRUiBZ4Uw/maxresdefault.jpg","thumbnailHeight":1052,"thumbnailWidth":1868,"authorName":"Flat","authorUrl":"https://www.youtube.com/channel/UCEUIbEP9Rba_g0r4eeGhmXw"} - ], - ) - """ - - def testEduResourceResource(self): - """Test EduResourceResource""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_type.py b/test/test_edu_resource_type.py deleted file mode 100644 index 81cc59e..0000000 --- a/test/test_edu_resource_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_type import EduResourceType - -class TestEduResourceType(unittest.TestCase): - """EduResourceType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEduResourceType(self): - """Test EduResourceType""" - # inst = EduResourceType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_update.py b/test/test_edu_resource_update.py deleted file mode 100644 index b6ca8dd..0000000 --- a/test/test_edu_resource_update.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_update import EduResourceUpdate - -class TestEduResourceUpdate(unittest.TestCase): - """EduResourceUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceUpdate: - """Test EduResourceUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceUpdate` - """ - model = EduResourceUpdate() - if include_optional: - return EduResourceUpdate( - title = '0', - privacy = 'private' - ) - else: - return EduResourceUpdate( - ) - """ - - def testEduResourceUpdate(self): - """Test EduResourceUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resource_use_in_class.py b/test/test_edu_resource_use_in_class.py deleted file mode 100644 index 27c2283..0000000 --- a/test/test_edu_resource_use_in_class.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.edu_resource_use_in_class import EduResourceUseInClass - -class TestEduResourceUseInClass(unittest.TestCase): - """EduResourceUseInClass unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EduResourceUseInClass: - """Test EduResourceUseInClass - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EduResourceUseInClass` - """ - model = EduResourceUseInClass() - if include_optional: - return EduResourceUseInClass( - classroom = '', - assignment = '' - ) - else: - return EduResourceUseInClass( - classroom = '', - ) - """ - - def testEduResourceUseInClass(self): - """Test EduResourceUseInClass""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_edu_resources_api.py b/test/test_edu_resources_api.py deleted file mode 100644 index 908200d..0000000 --- a/test/test_edu_resources_api.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.edu_resources_api import EduResourcesApi - - -class TestEduResourcesApi(unittest.TestCase): - """EduResourcesApi unit test stubs""" - - def setUp(self) -> None: - self.api = EduResourcesApi() - - def tearDown(self) -> None: - pass - - def test_copy_edu_resource(self) -> None: - """Test case for copy_edu_resource - - Copy an education resource to a Resource Library - """ - pass - - def test_copy_edu_resource_to_demo_class(self) -> None: - """Test case for copy_edu_resource_to_demo_class - - Copy an education assignment to a teacher demo class - """ - pass - - def test_create_edu_resource(self) -> None: - """Test case for create_edu_resource - - Create a new education resource - """ - pass - - def test_create_edu_resource_lti_link(self) -> None: - """Test case for create_edu_resource_lti_link - - Create an LTI link for an education resource - """ - pass - - def test_delete_edu_resource(self) -> None: - """Test case for delete_edu_resource - - Delete an education resource - """ - pass - - def test_get_edu_resource(self) -> None: - """Test case for get_edu_resource - - Get an education resource - """ - pass - - def test_list_edu_libraries(self) -> None: - """Test case for list_edu_libraries - - List the education libraries - """ - pass - - def test_list_edu_resources(self) -> None: - """Test case for list_edu_resources - - List education resources in a library or folder - """ - pass - - def test_move_edu_resource(self) -> None: - """Test case for move_edu_resource - - Move an education resource - """ - pass - - def test_update_edu_resource(self) -> None: - """Test case for update_edu_resource - - Update an education resource metadata - """ - pass - - def test_update_edu_resource_assignment(self) -> None: - """Test case for update_edu_resource_assignment - - Update an education resource assignment - """ - pass - - def test_use_edu_resource_in_class(self) -> None: - """Test case for use_edu_resource_in_class - - Use an education resource in a class - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_flat_error_response.py b/test/test_flat_error_response.py deleted file mode 100644 index bf5ba23..0000000 --- a/test/test_flat_error_response.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.flat_error_response import FlatErrorResponse - -class TestFlatErrorResponse(unittest.TestCase): - """FlatErrorResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FlatErrorResponse: - """Test FlatErrorResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FlatErrorResponse` - """ - model = FlatErrorResponse() - if include_optional: - return FlatErrorResponse( - code = '', - message = '', - id = '', - param = '' - ) - else: - return FlatErrorResponse( - code = '', - message = '', - ) - """ - - def testFlatErrorResponse(self): - """Test FlatErrorResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_flat_locales.py b/test/test_flat_locales.py deleted file mode 100644 index c164475..0000000 --- a/test/test_flat_locales.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.flat_locales import FlatLocales - -class TestFlatLocales(unittest.TestCase): - """FlatLocales unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFlatLocales(self): - """Test FlatLocales""" - # inst = FlatLocales() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_google_classroom_coursework.py b/test/test_google_classroom_coursework.py deleted file mode 100644 index 05ecca0..0000000 --- a/test/test_google_classroom_coursework.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.google_classroom_coursework import GoogleClassroomCoursework - -class TestGoogleClassroomCoursework(unittest.TestCase): - """GoogleClassroomCoursework unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GoogleClassroomCoursework: - """Test GoogleClassroomCoursework - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GoogleClassroomCoursework` - """ - model = GoogleClassroomCoursework() - if include_optional: - return GoogleClassroomCoursework( - id = '', - state = '', - alternate_link = '', - topic_id = '' - ) - else: - return GoogleClassroomCoursework( - ) - """ - - def testGoogleClassroomCoursework(self): - """Test GoogleClassroomCoursework""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_google_classroom_submission.py b/test/test_google_classroom_submission.py deleted file mode 100644 index 3207551..0000000 --- a/test/test_google_classroom_submission.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.google_classroom_submission import GoogleClassroomSubmission - -class TestGoogleClassroomSubmission(unittest.TestCase): - """GoogleClassroomSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GoogleClassroomSubmission: - """Test GoogleClassroomSubmission - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GoogleClassroomSubmission` - """ - model = GoogleClassroomSubmission() - if include_optional: - return GoogleClassroomSubmission( - id = '', - state = '', - alternate_link = '' - ) - else: - return GoogleClassroomSubmission( - id = '', - state = '', - alternate_link = '', - ) - """ - - def testGoogleClassroomSubmission(self): - """Test GoogleClassroomSubmission""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_group.py b/test/test_group.py deleted file mode 100644 index 3f5fb3c..0000000 --- a/test/test_group.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.group import Group - -class TestGroup(unittest.TestCase): - """Group unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Group: - """Test Group - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Group` - """ - model = Group() - if include_optional: - return Group( - id = '', - name = '', - type = 'generic', - users_count = 1.337, - read_only = True, - organization = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return Group( - ) - """ - - def testGroup(self): - """Test Group""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_group_api.py b/test/test_group_api.py deleted file mode 100644 index 34add5b..0000000 --- a/test/test_group_api.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.group_api import GroupApi - - -class TestGroupApi(unittest.TestCase): - """GroupApi unit test stubs""" - - def setUp(self) -> None: - self.api = GroupApi() - - def tearDown(self) -> None: - pass - - def test_get_group_details(self) -> None: - """Test case for get_group_details - - Get group information - """ - pass - - def test_get_group_scores(self) -> None: - """Test case for get_group_scores - - List group's scores - """ - pass - - def test_list_group_users(self) -> None: - """Test case for list_group_users - - List group's users - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_group_details.py b/test/test_group_details.py deleted file mode 100644 index 576df21..0000000 --- a/test/test_group_details.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.group_details import GroupDetails - -class TestGroupDetails(unittest.TestCase): - """GroupDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GroupDetails: - """Test GroupDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GroupDetails` - """ - model = GroupDetails() - if include_optional: - return GroupDetails( - id = '', - name = '', - type = 'generic', - organization = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - users_count = 1.337, - read_only = True - ) - else: - return GroupDetails( - ) - """ - - def testGroupDetails(self): - """Test GroupDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_group_type.py b/test/test_group_type.py deleted file mode 100644 index fab9358..0000000 --- a/test/test_group_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.group_type import GroupType - -class TestGroupType(unittest.TestCase): - """GroupType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroupType(self): - """Test GroupType""" - # inst = GroupType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_license_mode.py b/test/test_license_mode.py deleted file mode 100644 index 85d084b..0000000 --- a/test/test_license_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.license_mode import LicenseMode - -class TestLicenseMode(unittest.TestCase): - """LicenseMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLicenseMode(self): - """Test LicenseMode""" - # inst = LicenseMode() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_license_sources.py b/test/test_license_sources.py deleted file mode 100644 index dc91bfa..0000000 --- a/test/test_license_sources.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.license_sources import LicenseSources - -class TestLicenseSources(unittest.TestCase): - """LicenseSources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLicenseSources(self): - """Test LicenseSources""" - # inst = LicenseSources() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_lms_name.py b/test/test_lms_name.py deleted file mode 100644 index 3f78e8b..0000000 --- a/test/test_lms_name.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.lms_name import LmsName - -class TestLmsName(unittest.TestCase): - """LmsName unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLmsName(self): - """Test LmsName""" - # inst = LmsName() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_lti_credentials.py b/test/test_lti_credentials.py deleted file mode 100644 index 4afc657..0000000 --- a/test/test_lti_credentials.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.lti_credentials import LtiCredentials - -class TestLtiCredentials(unittest.TestCase): - """LtiCredentials unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LtiCredentials: - """Test LtiCredentials - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LtiCredentials` - """ - model = LtiCredentials() - if include_optional: - return LtiCredentials( - id = '', - name = '', - lms = 'canvas', - organization = '', - creator = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - last_usage = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - consumer_key = '', - consumer_secret = '' - ) - else: - return LtiCredentials( - ) - """ - - def testLtiCredentials(self): - """Test LtiCredentials""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_lti_credentials_creation.py b/test/test_lti_credentials_creation.py deleted file mode 100644 index 73dee63..0000000 --- a/test/test_lti_credentials_creation.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.lti_credentials_creation import LtiCredentialsCreation - -class TestLtiCredentialsCreation(unittest.TestCase): - """LtiCredentialsCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LtiCredentialsCreation: - """Test LtiCredentialsCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LtiCredentialsCreation` - """ - model = LtiCredentialsCreation() - if include_optional: - return LtiCredentialsCreation( - name = '', - lms = 'canvas' - ) - else: - return LtiCredentialsCreation( - name = '', - lms = 'canvas', - ) - """ - - def testLtiCredentialsCreation(self): - """Test LtiCredentialsCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_media_attachment.py b/test/test_media_attachment.py deleted file mode 100644 index a29ebf2..0000000 --- a/test/test_media_attachment.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.media_attachment import MediaAttachment - -class TestMediaAttachment(unittest.TestCase): - """MediaAttachment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MediaAttachment: - """Test MediaAttachment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MediaAttachment` - """ - model = MediaAttachment() - if include_optional: - return MediaAttachment( - type = 'rich', - score = '', - revision = '', - worksheet = '', - dedicated = True, - track = '', - sharing_mode = 'read', - lock_score_template = True, - title = '', - description = '', - html = '', - html_width = '', - html_height = '', - url = '', - thumbnail_url = '', - thumbnail_width = 56, - thumbnail_height = 56, - author_name = '', - author_url = '', - icon_url = '', - mime_type = '', - google_drive_file_id = '' - ) - else: - return MediaAttachment( - type = 'rich', - ) - """ - - def testMediaAttachment(self): - """Test MediaAttachment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_media_score_sharing_mode.py b/test/test_media_score_sharing_mode.py deleted file mode 100644 index 6b57c6e..0000000 --- a/test/test_media_score_sharing_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.media_score_sharing_mode import MediaScoreSharingMode - -class TestMediaScoreSharingMode(unittest.TestCase): - """MediaScoreSharingMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMediaScoreSharingMode(self): - """Test MediaScoreSharingMode""" - # inst = MediaScoreSharingMode() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_microsoft_graph_assignment.py b/test/test_microsoft_graph_assignment.py deleted file mode 100644 index 89f7a16..0000000 --- a/test/test_microsoft_graph_assignment.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.microsoft_graph_assignment import MicrosoftGraphAssignment - -class TestMicrosoftGraphAssignment(unittest.TestCase): - """MicrosoftGraphAssignment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MicrosoftGraphAssignment: - """Test MicrosoftGraphAssignment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MicrosoftGraphAssignment` - """ - model = MicrosoftGraphAssignment() - if include_optional: - return MicrosoftGraphAssignment( - id = '', - state = '', - alternate_link = '', - categories = [ - '' - ] - ) - else: - return MicrosoftGraphAssignment( - ) - """ - - def testMicrosoftGraphAssignment(self): - """Test MicrosoftGraphAssignment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_microsoft_graph_submission.py b/test/test_microsoft_graph_submission.py deleted file mode 100644 index 5fb9324..0000000 --- a/test/test_microsoft_graph_submission.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.microsoft_graph_submission import MicrosoftGraphSubmission - -class TestMicrosoftGraphSubmission(unittest.TestCase): - """MicrosoftGraphSubmission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MicrosoftGraphSubmission: - """Test MicrosoftGraphSubmission - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MicrosoftGraphSubmission` - """ - model = MicrosoftGraphSubmission() - if include_optional: - return MicrosoftGraphSubmission( - id = '', - state = '' - ) - else: - return MicrosoftGraphSubmission( - id = '', - state = '', - ) - """ - - def testMicrosoftGraphSubmission(self): - """Test MicrosoftGraphSubmission""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py deleted file mode 100644 index 27fa6e6..0000000 --- a/test/test_organization_api.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.organization_api import OrganizationApi - - -class TestOrganizationApi(unittest.TestCase): - """OrganizationApi unit test stubs""" - - def setUp(self) -> None: - self.api = OrganizationApi() - - def tearDown(self) -> None: - pass - - def test_count_orga_users(self) -> None: - """Test case for count_orga_users - - Count the organization users using the provided filters - """ - pass - - def test_create_lti_credentials(self) -> None: - """Test case for create_lti_credentials - - Create a new couple of LTI 1.x credentials - """ - pass - - def test_create_organization_invitation(self) -> None: - """Test case for create_organization_invitation - - Create a new invitation to join the organization - """ - pass - - def test_create_organization_user(self) -> None: - """Test case for create_organization_user - - Create a new user account - """ - pass - - def test_create_organization_user_access_token(self) -> None: - """Test case for create_organization_user_access_token - - Create a delegated API access token for an organization user - """ - pass - - def test_create_organization_user_signin_link(self) -> None: - """Test case for create_organization_user_signin_link - - Create a sign in link for an organization user - """ - pass - - def test_list_lti_credentials(self) -> None: - """Test case for list_lti_credentials - - List LTI 1.x credentials - """ - pass - - def test_list_organization_invitations(self) -> None: - """Test case for list_organization_invitations - - List the organization invitations - """ - pass - - def test_list_organization_users(self) -> None: - """Test case for list_organization_users - - List the organization users - """ - pass - - def test_remove_organization_invitation(self) -> None: - """Test case for remove_organization_invitation - - Remove an organization invitation - """ - pass - - def test_remove_organization_user(self) -> None: - """Test case for remove_organization_user - - Remove an account from Flat - """ - pass - - def test_revoke_lti_credentials(self) -> None: - """Test case for revoke_lti_credentials - - Revoke LTI 1.x credentials - """ - pass - - def test_update_organization_user(self) -> None: - """Test case for update_organization_user - - Update account information - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_invitation.py b/test/test_organization_invitation.py deleted file mode 100644 index 1ff217f..0000000 --- a/test/test_organization_invitation.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.organization_invitation import OrganizationInvitation - -class TestOrganizationInvitation(unittest.TestCase): - """OrganizationInvitation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationInvitation: - """Test OrganizationInvitation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationInvitation` - """ - model = OrganizationInvitation() - if include_optional: - return OrganizationInvitation( - id = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - organization = '', - organization_role = 'admin', - custom_code = '', - email = '', - invited_by = '', - allow_multiple_use = True, - used_by = [ - '' - ] - ) - else: - return OrganizationInvitation( - organization = '', - organization_role = 'admin', - custom_code = '', - allow_multiple_use = True, - ) - """ - - def testOrganizationInvitation(self): - """Test OrganizationInvitation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_invitation_creation.py b/test/test_organization_invitation_creation.py deleted file mode 100644 index 17fe881..0000000 --- a/test/test_organization_invitation_creation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation - -class TestOrganizationInvitationCreation(unittest.TestCase): - """OrganizationInvitationCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationInvitationCreation: - """Test OrganizationInvitationCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationInvitationCreation` - """ - model = OrganizationInvitationCreation() - if include_optional: - return OrganizationInvitationCreation( - email = '', - organization_role = 'teacher' - ) - else: - return OrganizationInvitationCreation( - ) - """ - - def testOrganizationInvitationCreation(self): - """Test OrganizationInvitationCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_roles.py b/test/test_organization_roles.py deleted file mode 100644 index b8a15d3..0000000 --- a/test/test_organization_roles.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.organization_roles import OrganizationRoles - -class TestOrganizationRoles(unittest.TestCase): - """OrganizationRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationRoles(self): - """Test OrganizationRoles""" - # inst = OrganizationRoles() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_organization_user_access_token_creation.py b/test/test_organization_user_access_token_creation.py deleted file mode 100644 index 1a8ed45..0000000 --- a/test/test_organization_user_access_token_creation.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation - -class TestOrganizationUserAccessTokenCreation(unittest.TestCase): - """OrganizationUserAccessTokenCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationUserAccessTokenCreation: - """Test OrganizationUserAccessTokenCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationUserAccessTokenCreation` - """ - model = OrganizationUserAccessTokenCreation() - if include_optional: - return OrganizationUserAccessTokenCreation( - scopes = [ - 'account.public_profile' - ] - ) - else: - return OrganizationUserAccessTokenCreation( - scopes = [ - 'account.public_profile' - ], - ) - """ - - def testOrganizationUserAccessTokenCreation(self): - """Test OrganizationUserAccessTokenCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_resource_collaborator.py b/test/test_resource_collaborator.py deleted file mode 100644 index 0d61bcf..0000000 --- a/test/test_resource_collaborator.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.resource_collaborator import ResourceCollaborator - -class TestResourceCollaborator(unittest.TestCase): - """ResourceCollaborator unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResourceCollaborator: - """Test ResourceCollaborator - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResourceCollaborator` - """ - model = ResourceCollaborator() - if include_optional: - return ResourceCollaborator( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - collaborator_type = 'owner', - id = '', - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - score = '', - collection = '', - user = flat_api.models.user_public.UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), ), - group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, - user_email = '', - invited = True - ) - else: - return ResourceCollaborator( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - ) - """ - - def testResourceCollaborator(self): - """Test ResourceCollaborator""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_resource_collaborator_creation.py b/test/test_resource_collaborator_creation.py deleted file mode 100644 index 26e1dfe..0000000 --- a/test/test_resource_collaborator_creation.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.resource_collaborator_creation import ResourceCollaboratorCreation - -class TestResourceCollaboratorCreation(unittest.TestCase): - """ResourceCollaboratorCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResourceCollaboratorCreation: - """Test ResourceCollaboratorCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResourceCollaboratorCreation` - """ - model = ResourceCollaboratorCreation() - if include_optional: - return ResourceCollaboratorCreation( - user = '', - group = '', - user_email = '', - user_token = '', - acl_read = True, - acl_write = True, - acl_admin = True - ) - else: - return ResourceCollaboratorCreation( - ) - """ - - def testResourceCollaboratorCreation(self): - """Test ResourceCollaboratorCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_resource_rights.py b/test/test_resource_rights.py deleted file mode 100644 index 790e9a6..0000000 --- a/test/test_resource_rights.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.resource_rights import ResourceRights - -class TestResourceRights(unittest.TestCase): - """ResourceRights unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResourceRights: - """Test ResourceRights - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResourceRights` - """ - model = ResourceRights() - if include_optional: - return ResourceRights( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - collaborator_type = 'owner' - ) - else: - return ResourceRights( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - ) - """ - - def testResourceRights(self): - """Test ResourceRights""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_api.py b/test/test_score_api.py deleted file mode 100644 index 1162a1e..0000000 --- a/test/test_score_api.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.score_api import ScoreApi - - -class TestScoreApi(unittest.TestCase): - """ScoreApi unit test stubs""" - - def setUp(self) -> None: - self.api = ScoreApi() - - def tearDown(self) -> None: - pass - - def test_add_score_collaborator(self) -> None: - """Test case for add_score_collaborator - - Add a new collaborator - """ - pass - - def test_add_score_track(self) -> None: - """Test case for add_score_track - - Add a new video or audio track to the score - """ - pass - - def test_create_export_task(self) -> None: - """Test case for create_export_task - - Create a new score export task - """ - pass - - def test_create_score(self) -> None: - """Test case for create_score - - Create a new score - """ - pass - - def test_create_score_revision(self) -> None: - """Test case for create_score_revision - - Create a new revision - """ - pass - - def test_delete_score(self) -> None: - """Test case for delete_score - - Delete a score - """ - pass - - def test_delete_score_comment(self) -> None: - """Test case for delete_score_comment - - Delete a comment - """ - pass - - def test_delete_score_track(self) -> None: - """Test case for delete_score_track - - Remove an audio or video track linked to the score - """ - pass - - def test_edit_score(self) -> None: - """Test case for edit_score - - Edit a score's metadata - """ - pass - - def test_fork_score(self) -> None: - """Test case for fork_score - - Fork a score - """ - pass - - def test_get_group_scores(self) -> None: - """Test case for get_group_scores - - List group's scores - """ - pass - - def test_get_score(self) -> None: - """Test case for get_score - - Get a score's metadata - """ - pass - - def test_get_score_collaborator(self) -> None: - """Test case for get_score_collaborator - - Get a collaborator - """ - pass - - def test_get_score_collaborators(self) -> None: - """Test case for get_score_collaborators - - List the collaborators - """ - pass - - def test_get_score_comments(self) -> None: - """Test case for get_score_comments - - List comments - """ - pass - - def test_get_score_revision(self) -> None: - """Test case for get_score_revision - - Get a score revision - """ - pass - - def test_get_score_revision_data(self) -> None: - """Test case for get_score_revision_data - - Get a score revision data - """ - pass - - def test_get_score_revisions(self) -> None: - """Test case for get_score_revisions - - List the revisions - """ - pass - - def test_get_score_submissions(self) -> None: - """Test case for get_score_submissions - - List submissions related to the score - """ - pass - - def test_get_score_track(self) -> None: - """Test case for get_score_track - - Retrieve the details of an audio or video track linked to a score - """ - pass - - def test_get_user_likes(self) -> None: - """Test case for get_user_likes - - List liked scores - """ - pass - - def test_get_user_scores(self) -> None: - """Test case for get_user_scores - - List user's scores - """ - pass - - def test_list_score_tracks(self) -> None: - """Test case for list_score_tracks - - List the audio or video tracks linked to a score - """ - pass - - def test_mark_score_comment_resolved(self) -> None: - """Test case for mark_score_comment_resolved - - Mark the comment as resolved - """ - pass - - def test_mark_score_comment_unresolved(self) -> None: - """Test case for mark_score_comment_unresolved - - Mark the comment as unresolved - """ - pass - - def test_post_score_comment(self) -> None: - """Test case for post_score_comment - - Post a new comment - """ - pass - - def test_remove_score_collaborator(self) -> None: - """Test case for remove_score_collaborator - - Delete a collaborator - """ - pass - - def test_untrash_score(self) -> None: - """Test case for untrash_score - - Untrash a score - """ - pass - - def test_update_score_comment(self) -> None: - """Test case for update_score_comment - - Update an existing comment - """ - pass - - def test_update_score_track(self) -> None: - """Test case for update_score_track - - Update an audio or video track linked to a score - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment.py b/test/test_score_comment.py deleted file mode 100644 index 89eae3c..0000000 --- a/test/test_score_comment.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comment import ScoreComment - -class TestScoreComment(unittest.TestCase): - """ScoreComment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreComment: - """Test ScoreComment - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreComment` - """ - model = ScoreComment() - if include_optional: - return ScoreComment( - id = '', - type = 'document', - user = '', - score = '', - revision = '', - reply_to = '', - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - comment = '', - raw_comment = '', - context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3}, - mentions = [ - '' - ], - resolved = True, - resolved_by = '', - moderation = flat_api.models.score_comment_moderation.ScoreComment_moderation( - hidden = True, - reason = 'spam', ), - spam = True - ) - else: - return ScoreComment( - ) - """ - - def testScoreComment(self): - """Test ScoreComment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment_context.py b/test/test_score_comment_context.py deleted file mode 100644 index bc6839c..0000000 --- a/test/test_score_comment_context.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comment_context import ScoreCommentContext - -class TestScoreCommentContext(unittest.TestCase): - """ScoreCommentContext unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCommentContext: - """Test ScoreCommentContext - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCommentContext` - """ - model = ScoreCommentContext() - if include_optional: - return ScoreCommentContext( - part_uuid = '', - staff_idx = 1.337, - staff_uuid = '', - measure_uuids = [ - '' - ], - start_time_pos = 1.337, - stop_time_pos = 1.337, - start_dpq = 1.337, - stop_dpq = 1.337 - ) - else: - return ScoreCommentContext( - part_uuid = '', - measure_uuids = [ - '' - ], - start_time_pos = 1.337, - stop_time_pos = 1.337, - start_dpq = 1.337, - stop_dpq = 1.337, - ) - """ - - def testScoreCommentContext(self): - """Test ScoreCommentContext""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment_creation.py b/test/test_score_comment_creation.py deleted file mode 100644 index 4e38efc..0000000 --- a/test/test_score_comment_creation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comment_creation import ScoreCommentCreation - -class TestScoreCommentCreation(unittest.TestCase): - """ScoreCommentCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCommentCreation: - """Test ScoreCommentCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCommentCreation` - """ - model = ScoreCommentCreation() - if include_optional: - return ScoreCommentCreation( - revision = '', - comment = '', - raw_comment = '', - mentions = [ - '' - ], - reply_to = '', - context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3} - ) - else: - return ScoreCommentCreation( - comment = '', - ) - """ - - def testScoreCommentCreation(self): - """Test ScoreCommentCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment_moderation.py b/test/test_score_comment_moderation.py deleted file mode 100644 index f08ca10..0000000 --- a/test/test_score_comment_moderation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comment_moderation import ScoreCommentModeration - -class TestScoreCommentModeration(unittest.TestCase): - """ScoreCommentModeration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCommentModeration: - """Test ScoreCommentModeration - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCommentModeration` - """ - model = ScoreCommentModeration() - if include_optional: - return ScoreCommentModeration( - hidden = True, - reason = 'spam' - ) - else: - return ScoreCommentModeration( - ) - """ - - def testScoreCommentModeration(self): - """Test ScoreCommentModeration""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comment_update.py b/test/test_score_comment_update.py deleted file mode 100644 index a763ede..0000000 --- a/test/test_score_comment_update.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comment_update import ScoreCommentUpdate - -class TestScoreCommentUpdate(unittest.TestCase): - """ScoreCommentUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCommentUpdate: - """Test ScoreCommentUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCommentUpdate` - """ - model = ScoreCommentUpdate() - if include_optional: - return ScoreCommentUpdate( - revision = '', - comment = '0', - raw_comment = '0', - context = {"partUuid":"91982db7-2e6d-285e-7a19-76b4bd005b8b","staffUuid":"9395d8f3-f42b-47b6-8c5d-6ba704961ec0","measureUuids":["e6a6a60b-8710-f819-9a49-e907b19c6f1f","da83d93c-e3a6-3c73-1bbe-15e5131d6437","056ec5eb-9213-df56-6ae8-d9b99673dc48"],"startDpq":1,"stopDpq":1,"startTimePos":2,"stopTimePos":3} - ) - else: - return ScoreCommentUpdate( - ) - """ - - def testScoreCommentUpdate(self): - """Test ScoreCommentUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_comments_counts.py b/test/test_score_comments_counts.py deleted file mode 100644 index e2b7f42..0000000 --- a/test/test_score_comments_counts.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_comments_counts import ScoreCommentsCounts - -class TestScoreCommentsCounts(unittest.TestCase): - """ScoreCommentsCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCommentsCounts: - """Test ScoreCommentsCounts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCommentsCounts` - """ - model = ScoreCommentsCounts() - if include_optional: - return ScoreCommentsCounts( - total = 1.337, - unique = 1.337, - weekly = 1.337, - monthly = 1.337 - ) - else: - return ScoreCommentsCounts( - ) - """ - - def testScoreCommentsCounts(self): - """Test ScoreCommentsCounts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation.py b/test/test_score_creation.py deleted file mode 100644 index 46ad268..0000000 --- a/test/test_score_creation.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation import ScoreCreation - -class TestScoreCreation(unittest.TestCase): - """ScoreCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCreation: - """Test ScoreCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCreation` - """ - model = ScoreCreation() - if include_optional: - return ScoreCreation( - title = '', - privacy = 'private', - collection = '', - google_drive_folder = '', - builder_data = flat_api.models.score_creation_builder_data.ScoreCreation_builderData( - score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( - use_tab_staff = True, - use_chord_grid = True, - fifths = 1.337, - nb_beats = 1.337, - beat_type = 1.337, - instruments = [ - flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True, ) - ], ), - layout_data = flat_api.models.score_creation_builder_data_layout_data.ScoreCreation_builderData_layoutData( - notes_spacing_coeff = 1.337, - length_unit = 'cm', - page_height = 1.337, - page_width = 1.337, - page_margin_top = 1.337, - page_margin_bottom = 1.337, - page_margin_left = 1.337, - page_margin_right = 1.337, ), ), - filename = '', - data = '', - data_encoding = 'base64', - source = {"googleDrive":"0B-0000000000000001"} - ) - else: - return ScoreCreation( - ) - """ - - def testScoreCreation(self): - """Test ScoreCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data.py b/test/test_score_creation_builder_data.py deleted file mode 100644 index 37fab37..0000000 --- a/test/test_score_creation_builder_data.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation_builder_data import ScoreCreationBuilderData - -class TestScoreCreationBuilderData(unittest.TestCase): - """ScoreCreationBuilderData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCreationBuilderData: - """Test ScoreCreationBuilderData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCreationBuilderData` - """ - model = ScoreCreationBuilderData() - if include_optional: - return ScoreCreationBuilderData( - score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( - use_tab_staff = True, - use_chord_grid = True, - fifths = 1.337, - nb_beats = 1.337, - beat_type = 1.337, - instruments = [ - flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True, ) - ], ), - layout_data = flat_api.models.score_creation_builder_data_layout_data.ScoreCreation_builderData_layoutData( - notes_spacing_coeff = 1.337, - length_unit = 'cm', - page_height = 1.337, - page_width = 1.337, - page_margin_top = 1.337, - page_margin_bottom = 1.337, - page_margin_left = 1.337, - page_margin_right = 1.337, ) - ) - else: - return ScoreCreationBuilderData( - score_data = flat_api.models.score_creation_builder_data_score_data.ScoreCreation_builderData_scoreData( - use_tab_staff = True, - use_chord_grid = True, - fifths = 1.337, - nb_beats = 1.337, - beat_type = 1.337, - instruments = [ - flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True, ) - ], ), - ) - """ - - def testScoreCreationBuilderData(self): - """Test ScoreCreationBuilderData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_layout_data.py b/test/test_score_creation_builder_data_layout_data.py deleted file mode 100644 index 84ab514..0000000 --- a/test/test_score_creation_builder_data_layout_data.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation_builder_data_layout_data import ScoreCreationBuilderDataLayoutData - -class TestScoreCreationBuilderDataLayoutData(unittest.TestCase): - """ScoreCreationBuilderDataLayoutData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCreationBuilderDataLayoutData: - """Test ScoreCreationBuilderDataLayoutData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCreationBuilderDataLayoutData` - """ - model = ScoreCreationBuilderDataLayoutData() - if include_optional: - return ScoreCreationBuilderDataLayoutData( - notes_spacing_coeff = 1.337, - length_unit = 'cm', - page_height = 1.337, - page_width = 1.337, - page_margin_top = 1.337, - page_margin_bottom = 1.337, - page_margin_left = 1.337, - page_margin_right = 1.337 - ) - else: - return ScoreCreationBuilderDataLayoutData( - ) - """ - - def testScoreCreationBuilderDataLayoutData(self): - """Test ScoreCreationBuilderDataLayoutData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_score_data.py b/test/test_score_creation_builder_data_score_data.py deleted file mode 100644 index 98cc15b..0000000 --- a/test/test_score_creation_builder_data_score_data.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation_builder_data_score_data import ScoreCreationBuilderDataScoreData - -class TestScoreCreationBuilderDataScoreData(unittest.TestCase): - """ScoreCreationBuilderDataScoreData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCreationBuilderDataScoreData: - """Test ScoreCreationBuilderDataScoreData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCreationBuilderDataScoreData` - """ - model = ScoreCreationBuilderDataScoreData() - if include_optional: - return ScoreCreationBuilderDataScoreData( - use_tab_staff = True, - use_chord_grid = True, - fifths = 1.337, - nb_beats = 1.337, - beat_type = 1.337, - instruments = [ - flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True, ) - ] - ) - else: - return ScoreCreationBuilderDataScoreData( - instruments = [ - flat_api.models.score_creation_builder_data_score_data_instruments_inner.ScoreCreation_builderData_scoreData_instruments_inner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True, ) - ], - ) - """ - - def testScoreCreationBuilderDataScoreData(self): - """Test ScoreCreationBuilderDataScoreData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_builder_data_score_data_instruments_inner.py b/test/test_score_creation_builder_data_score_data_instruments_inner.py deleted file mode 100644 index a750190..0000000 --- a/test/test_score_creation_builder_data_score_data_instruments_inner.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation_builder_data_score_data_instruments_inner import ScoreCreationBuilderDataScoreDataInstrumentsInner - -class TestScoreCreationBuilderDataScoreDataInstrumentsInner(unittest.TestCase): - """ScoreCreationBuilderDataScoreDataInstrumentsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreCreationBuilderDataScoreDataInstrumentsInner: - """Test ScoreCreationBuilderDataScoreDataInstrumentsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreCreationBuilderDataScoreDataInstrumentsInner` - """ - model = ScoreCreationBuilderDataScoreDataInstrumentsInner() - if include_optional: - return ScoreCreationBuilderDataScoreDataInstrumentsInner( - group = '', - instrument = '', - long_name = '', - short_name = '', - has_quarter_tone = True - ) - else: - return ScoreCreationBuilderDataScoreDataInstrumentsInner( - group = '', - instrument = '', - ) - """ - - def testScoreCreationBuilderDataScoreDataInstrumentsInner(self): - """Test ScoreCreationBuilderDataScoreDataInstrumentsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_creation_type.py b/test/test_score_creation_type.py deleted file mode 100644 index 350a786..0000000 --- a/test/test_score_creation_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_creation_type import ScoreCreationType - -class TestScoreCreationType(unittest.TestCase): - """ScoreCreationType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreCreationType(self): - """Test ScoreCreationType""" - # inst = ScoreCreationType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_details.py b/test/test_score_details.py deleted file mode 100644 index 6e0db09..0000000 --- a/test/test_score_details.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_details import ScoreDetails - -class TestScoreDetails(unittest.TestCase): - """ScoreDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreDetails: - """Test ScoreDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreDetails` - """ - model = ScoreDetails() - if include_optional: - return ScoreDetails( - id = '', - sharing_key = '', - title = '', - privacy = 'private', - user = flat_api.models.user_public.UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), ), - html_url = '', - subtitle = '', - lyricist = '', - arranger = '', - composer = '', - description = '', - tags = [ - 'Cu2LC4aWwWL9Y864DZtaG' - ], - creation_type = 'original', - license = 'copyright', - license_text = '', - duration_time = 1.337, - number_measures = 56, - main_tempo_qpm = 1.337, - main_key_signature = 1.337, - rights = {"aclRead":true,"aclWrite":true,"aclAdmin":true,"isCollaborator":true}, - collaborators = [ - flat_api.models.resource_collaborator.ResourceCollaborator( - acl_read = True, - acl_write = True, - acl_admin = True, - is_collaborator = True, - collaborator_type = 'owner', - id = '', - date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - score = '', - collection = '', - user = flat_api.models.user_public.UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), ), - group = {"id":"0000000000000000000000043","name":"5th grade","type":"classTeachers","userCount":24,"readOnly":true,"organization":"0000000000000000000000042","creationDate":"2015-01-19T00:22:02.387000Z"}, - user_email = '', - invited = True, ) - ], - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - publication_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - highlighted_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - organization = '', - parent_score = '', - instruments = [ - '' - ], - samples = [ - '' - ], - google_drive_file_id = '', - likes = {"total":42,"weekly":10,"monthly":30}, - comments = {"total":42,"unique":35,"weekly":10,"monthly":30}, - views = {"total":42,"weekly":10,"monthly":30}, - plays = {"total":42,"weekly":10,"monthly":30}, - collections = [ - '' - ] - ) - else: - return ScoreDetails( - id = '', - title = '', - privacy = 'private', - user = flat_api.models.user_public.UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), ), - html_url = '', - ) - """ - - def testScoreDetails(self): - """Test ScoreDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_fork.py b/test/test_score_fork.py deleted file mode 100644 index 8104244..0000000 --- a/test/test_score_fork.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_fork import ScoreFork - -class TestScoreFork(unittest.TestCase): - """ScoreFork unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreFork: - """Test ScoreFork - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreFork` - """ - model = ScoreFork() - if include_optional: - return ScoreFork( - collection = 'root', - google_drive_disabled = True, - keep_original_title = True - ) - else: - return ScoreFork( - ) - """ - - def testScoreFork(self): - """Test ScoreFork""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_license.py b/test/test_score_license.py deleted file mode 100644 index a30d3e8..0000000 --- a/test/test_score_license.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_license import ScoreLicense - -class TestScoreLicense(unittest.TestCase): - """ScoreLicense unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreLicense(self): - """Test ScoreLicense""" - # inst = ScoreLicense() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_likes_counts.py b/test/test_score_likes_counts.py deleted file mode 100644 index 51b7811..0000000 --- a/test/test_score_likes_counts.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_likes_counts import ScoreLikesCounts - -class TestScoreLikesCounts(unittest.TestCase): - """ScoreLikesCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreLikesCounts: - """Test ScoreLikesCounts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreLikesCounts` - """ - model = ScoreLikesCounts() - if include_optional: - return ScoreLikesCounts( - total = 1.337, - weekly = 1.337, - monthly = 1.337 - ) - else: - return ScoreLikesCounts( - total = 1.337, - weekly = 1.337, - monthly = 1.337, - ) - """ - - def testScoreLikesCounts(self): - """Test ScoreLikesCounts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_modification.py b/test/test_score_modification.py deleted file mode 100644 index 249cbf5..0000000 --- a/test/test_score_modification.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_modification import ScoreModification - -class TestScoreModification(unittest.TestCase): - """ScoreModification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreModification: - """Test ScoreModification - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreModification` - """ - model = ScoreModification() - if include_optional: - return ScoreModification( - title = '', - subtitle = '', - composer = '', - lyricist = '', - arranger = '', - privacy = 'private', - sharing_key = 'bf325375e030fccba00917317c574773100bf03b5fc61486286e564b23e9566b6ed19656dc3c5466a04c9eb07d770063ebd5468bf54d65309a8da56a8235f8f3', - description = '', - tags = [ - '' - ], - creation_type = 'original', - license = 'copyright', - license_text = '' - ) - else: - return ScoreModification( - ) - """ - - def testScoreModification(self): - """Test ScoreModification""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_plays_counts.py b/test/test_score_plays_counts.py deleted file mode 100644 index 083a7ee..0000000 --- a/test/test_score_plays_counts.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_plays_counts import ScorePlaysCounts - -class TestScorePlaysCounts(unittest.TestCase): - """ScorePlaysCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScorePlaysCounts: - """Test ScorePlaysCounts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScorePlaysCounts` - """ - model = ScorePlaysCounts() - if include_optional: - return ScorePlaysCounts( - total = 1.337, - weekly = 1.337, - monthly = 1.337 - ) - else: - return ScorePlaysCounts( - ) - """ - - def testScorePlaysCounts(self): - """Test ScorePlaysCounts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_privacy.py b/test/test_score_privacy.py deleted file mode 100644 index 7702104..0000000 --- a/test/test_score_privacy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_privacy import ScorePrivacy - -class TestScorePrivacy(unittest.TestCase): - """ScorePrivacy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScorePrivacy(self): - """Test ScorePrivacy""" - # inst = ScorePrivacy() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_revision.py b/test/test_score_revision.py deleted file mode 100644 index 38b19e4..0000000 --- a/test/test_score_revision.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_revision import ScoreRevision - -class TestScoreRevision(unittest.TestCase): - """ScoreRevision unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreRevision: - """Test ScoreRevision - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreRevision` - """ - model = ScoreRevision() - if include_optional: - return ScoreRevision( - id = '', - user = '', - collaborators = [ - '' - ], - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - event = '', - description = '', - autosave = True, - statistics = {"additions":24,"deletions":5} - ) - else: - return ScoreRevision( - ) - """ - - def testScoreRevision(self): - """Test ScoreRevision""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_revision_creation.py b/test/test_score_revision_creation.py deleted file mode 100644 index 61dd956..0000000 --- a/test/test_score_revision_creation.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_revision_creation import ScoreRevisionCreation - -class TestScoreRevisionCreation(unittest.TestCase): - """ScoreRevisionCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreRevisionCreation: - """Test ScoreRevisionCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreRevisionCreation` - """ - model = ScoreRevisionCreation() - if include_optional: - return ScoreRevisionCreation( - data = '', - data_encoding = 'base64', - autosave = True, - description = '' - ) - else: - return ScoreRevisionCreation( - data = '', - ) - """ - - def testScoreRevisionCreation(self): - """Test ScoreRevisionCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_revision_statistics.py b/test/test_score_revision_statistics.py deleted file mode 100644 index cbc0794..0000000 --- a/test/test_score_revision_statistics.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_revision_statistics import ScoreRevisionStatistics - -class TestScoreRevisionStatistics(unittest.TestCase): - """ScoreRevisionStatistics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreRevisionStatistics: - """Test ScoreRevisionStatistics - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreRevisionStatistics` - """ - model = ScoreRevisionStatistics() - if include_optional: - return ScoreRevisionStatistics( - additions = 1.337, - deletions = 1.337, - start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return ScoreRevisionStatistics( - ) - """ - - def testScoreRevisionStatistics(self): - """Test ScoreRevisionStatistics""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_source.py b/test/test_score_source.py deleted file mode 100644 index 2a31e2f..0000000 --- a/test/test_score_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_source import ScoreSource - -class TestScoreSource(unittest.TestCase): - """ScoreSource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreSource: - """Test ScoreSource - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreSource` - """ - model = ScoreSource() - if include_optional: - return ScoreSource( - google_drive = '' - ) - else: - return ScoreSource( - ) - """ - - def testScoreSource(self): - """Test ScoreSource""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track.py b/test/test_score_track.py deleted file mode 100644 index 19b65c0..0000000 --- a/test/test_score_track.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track import ScoreTrack - -class TestScoreTrack(unittest.TestCase): - """ScoreTrack unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreTrack: - """Test ScoreTrack - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreTrack` - """ - model = ScoreTrack() - if include_optional: - return ScoreTrack( - id = '', - title = '', - score = '', - creator = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - default = True, - state = 'draft', - type = 'audio', - purpose = 'common', - url = '', - media_id = '', - synchronization_points = [ - {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} - ] - ) - else: - return ScoreTrack( - id = '', - score = '', - creator = '', - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - default = True, - state = 'draft', - type = 'audio', - purpose = 'common', - ) - """ - - def testScoreTrack(self): - """Test ScoreTrack""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_creation.py b/test/test_score_track_creation.py deleted file mode 100644 index 2bd94c1..0000000 --- a/test/test_score_track_creation.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_creation import ScoreTrackCreation - -class TestScoreTrackCreation(unittest.TestCase): - """ScoreTrackCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreTrackCreation: - """Test ScoreTrackCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreTrackCreation` - """ - model = ScoreTrackCreation() - if include_optional: - return ScoreTrackCreation( - title = '', - default = True, - state = 'draft', - purpose = 'common', - url = '', - synchronization_points = [ - {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} - ] - ) - else: - return ScoreTrackCreation( - ) - """ - - def testScoreTrackCreation(self): - """Test ScoreTrackCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_point.py b/test/test_score_track_point.py deleted file mode 100644 index fb21e24..0000000 --- a/test/test_score_track_point.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_point import ScoreTrackPoint - -class TestScoreTrackPoint(unittest.TestCase): - """ScoreTrackPoint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreTrackPoint: - """Test ScoreTrackPoint - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreTrackPoint` - """ - model = ScoreTrackPoint() - if include_optional: - return ScoreTrackPoint( - type = 'measure', - measure_uuid = '', - time = 1.337 - ) - else: - return ScoreTrackPoint( - type = 'measure', - time = 1.337, - ) - """ - - def testScoreTrackPoint(self): - """Test ScoreTrackPoint""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_purpose.py b/test/test_score_track_purpose.py deleted file mode 100644 index 5cdf693..0000000 --- a/test/test_score_track_purpose.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_purpose import ScoreTrackPurpose - -class TestScoreTrackPurpose(unittest.TestCase): - """ScoreTrackPurpose unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackPurpose(self): - """Test ScoreTrackPurpose""" - # inst = ScoreTrackPurpose() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_state.py b/test/test_score_track_state.py deleted file mode 100644 index 521dc24..0000000 --- a/test/test_score_track_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_state import ScoreTrackState - -class TestScoreTrackState(unittest.TestCase): - """ScoreTrackState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackState(self): - """Test ScoreTrackState""" - # inst = ScoreTrackState() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_type.py b/test/test_score_track_type.py deleted file mode 100644 index 7ce7c2c..0000000 --- a/test/test_score_track_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_type import ScoreTrackType - -class TestScoreTrackType(unittest.TestCase): - """ScoreTrackType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testScoreTrackType(self): - """Test ScoreTrackType""" - # inst = ScoreTrackType() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_track_update.py b/test/test_score_track_update.py deleted file mode 100644 index 5134c9d..0000000 --- a/test/test_score_track_update.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_track_update import ScoreTrackUpdate - -class TestScoreTrackUpdate(unittest.TestCase): - """ScoreTrackUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreTrackUpdate: - """Test ScoreTrackUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreTrackUpdate` - """ - model = ScoreTrackUpdate() - if include_optional: - return ScoreTrackUpdate( - title = '', - default = True, - state = 'draft', - synchronization_points = [ - {"type":"measure","time":0,"measureUuid":"5132a788-69e6-d0c6-84ec-4bd858658d7c"} - ] - ) - else: - return ScoreTrackUpdate( - ) - """ - - def testScoreTrackUpdate(self): - """Test ScoreTrackUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_score_views_counts.py b/test/test_score_views_counts.py deleted file mode 100644 index f612774..0000000 --- a/test/test_score_views_counts.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.score_views_counts import ScoreViewsCounts - -class TestScoreViewsCounts(unittest.TestCase): - """ScoreViewsCounts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ScoreViewsCounts: - """Test ScoreViewsCounts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ScoreViewsCounts` - """ - model = ScoreViewsCounts() - if include_optional: - return ScoreViewsCounts( - total = 1.337, - weekly = 1.337, - monthly = 1.337 - ) - else: - return ScoreViewsCounts( - ) - """ - - def testScoreViewsCounts(self): - """Test ScoreViewsCounts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task.py b/test/test_task.py deleted file mode 100644 index 1dcf762..0000000 --- a/test/test_task.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.task import Task - -class TestTask(unittest.TestCase): - """Task unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Task: - """Test Task - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Task` - """ - model = Task() - if include_optional: - return Task( - id = '', - type = '', - state = 'created', - format = '', - score = '', - progress = flat_api.models.task_progress.Task_progress( - percent = 1.337, - text = '', ), - creation_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - modification_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - done_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - result = flat_api.models.task_result.Task_result( - url = '', - error = '', ), - error_history = [ - '' - ] - ) - else: - return Task( - id = '', - state = 'created', - ) - """ - - def testTask(self): - """Test Task""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task_api.py b/test/test_task_api.py deleted file mode 100644 index f2bcda7..0000000 --- a/test/test_task_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.task_api import TaskApi - - -class TestTaskApi(unittest.TestCase): - """TaskApi unit test stubs""" - - def setUp(self) -> None: - self.api = TaskApi() - - def tearDown(self) -> None: - pass - - def test_get_task(self) -> None: - """Test case for get_task - - Get a task details - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task_export_options.py b/test/test_task_export_options.py deleted file mode 100644 index c4e6e5c..0000000 --- a/test/test_task_export_options.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.task_export_options import TaskExportOptions - -class TestTaskExportOptions(unittest.TestCase): - """TaskExportOptions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TaskExportOptions: - """Test TaskExportOptions - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TaskExportOptions` - """ - model = TaskExportOptions() - if include_optional: - return TaskExportOptions( - parts = [ - '' - ] - ) - else: - return TaskExportOptions( - ) - """ - - def testTaskExportOptions(self): - """Test TaskExportOptions""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task_progress.py b/test/test_task_progress.py deleted file mode 100644 index 4da2d62..0000000 --- a/test/test_task_progress.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.task_progress import TaskProgress - -class TestTaskProgress(unittest.TestCase): - """TaskProgress unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TaskProgress: - """Test TaskProgress - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TaskProgress` - """ - model = TaskProgress() - if include_optional: - return TaskProgress( - percent = 1.337, - text = '' - ) - else: - return TaskProgress( - ) - """ - - def testTaskProgress(self): - """Test TaskProgress""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task_result.py b/test/test_task_result.py deleted file mode 100644 index 48e7e95..0000000 --- a/test/test_task_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.task_result import TaskResult - -class TestTaskResult(unittest.TestCase): - """TaskResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TaskResult: - """Test TaskResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TaskResult` - """ - model = TaskResult() - if include_optional: - return TaskResult( - url = '', - error = '' - ) - else: - return TaskResult( - ) - """ - - def testTaskResult(self): - """Test TaskResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tutteo_product.py b/test/test_tutteo_product.py deleted file mode 100644 index e7b383a..0000000 --- a/test/test_tutteo_product.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.tutteo_product import TutteoProduct - -class TestTutteoProduct(unittest.TestCase): - """TutteoProduct unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTutteoProduct(self): - """Test TutteoProduct""" - # inst = TutteoProduct() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_admin_update.py b/test/test_user_admin_update.py deleted file mode 100644 index fac05bf..0000000 --- a/test/test_user_admin_update.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_admin_update import UserAdminUpdate - -class TestUserAdminUpdate(unittest.TestCase): - """UserAdminUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserAdminUpdate: - """Test UserAdminUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserAdminUpdate` - """ - model = UserAdminUpdate() - if include_optional: - return UserAdminUpdate( - password = '012345', - organization_role = 'admin', - username = '20', - firstname = '', - lastname = '', - email = '' - ) - else: - return UserAdminUpdate( - ) - """ - - def testUserAdminUpdate(self): - """Test UserAdminUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py deleted file mode 100644 index ee680a6..0000000 --- a/test/test_user_api.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.api.user_api import UserApi - - -class TestUserApi(unittest.TestCase): - """UserApi unit test stubs""" - - def setUp(self) -> None: - self.api = UserApi() - - def tearDown(self) -> None: - pass - - def test_get_user(self) -> None: - """Test case for get_user - - Get a public user profile - """ - pass - - def test_get_user_likes(self) -> None: - """Test case for get_user_likes - - List liked scores - """ - pass - - def test_get_user_scores(self) -> None: - """Test case for get_user_scores - - List user's scores - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_azure_details.py b/test/test_user_azure_details.py deleted file mode 100644 index 3eaaa30..0000000 --- a/test/test_user_azure_details.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_azure_details import UserAzureDetails - -class TestUserAzureDetails(unittest.TestCase): - """UserAzureDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserAzureDetails: - """Test UserAzureDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserAzureDetails` - """ - model = UserAzureDetails() - if include_optional: - return UserAzureDetails( - oid = '', - hd = '', - preferred_username = '' - ) - else: - return UserAzureDetails( - ) - """ - - def testUserAzureDetails(self): - """Test UserAzureDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_community_profile_links.py b/test/test_user_community_profile_links.py deleted file mode 100644 index de2f5a1..0000000 --- a/test/test_user_community_profile_links.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_community_profile_links import UserCommunityProfileLinks - -class TestUserCommunityProfileLinks(unittest.TestCase): - """UserCommunityProfileLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserCommunityProfileLinks: - """Test UserCommunityProfileLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserCommunityProfileLinks` - """ - model = UserCommunityProfileLinks() - if include_optional: - return UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '' - ) - else: - return UserCommunityProfileLinks( - ) - """ - - def testUserCommunityProfileLinks(self): - """Test UserCommunityProfileLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_creation.py b/test/test_user_creation.py deleted file mode 100644 index b95abac..0000000 --- a/test/test_user_creation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_creation import UserCreation - -class TestUserCreation(unittest.TestCase): - """UserCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserCreation: - """Test UserCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserCreation` - """ - model = UserCreation() - if include_optional: - return UserCreation( - username = '20', - firstname = '', - lastname = '', - email = '', - password = '012345', - locale = 'en', - role = 'user' - ) - else: - return UserCreation( - username = '20', - password = '012345', - ) - """ - - def testUserCreation(self): - """Test UserCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_details.py b/test/test_user_details.py deleted file mode 100644 index fe1ba97..0000000 --- a/test/test_user_details.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_details import UserDetails - -class TestUserDetails(unittest.TestCase): - """UserDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserDetails: - """Test UserDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserDetails` - """ - model = UserDetails() - if include_optional: - return UserDetails( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ), - azure_details = flat_api.models.user_azure_details.UserAzureDetails( - oid = '', - hd = '', - preferred_username = '', ), - private_profile = True, - locale = 'en', - groups = [ - '' - ], - picture_file = '', - cover_picture_file = '' - ) - else: - return UserDetails( - id = '', - type = 'user', - product = 'flat', - username = '', - picture = '', - ) - """ - - def testUserDetails(self): - """Test UserDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_details_admin.py b/test/test_user_details_admin.py deleted file mode 100644 index 37cd1ab..0000000 --- a/test/test_user_details_admin.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_details_admin import UserDetailsAdmin - -class TestUserDetailsAdmin(unittest.TestCase): - """UserDetailsAdmin unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserDetailsAdmin: - """Test UserDetailsAdmin - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserDetailsAdmin` - """ - model = UserDetailsAdmin() - if include_optional: - return UserDetailsAdmin( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - email = '', - last_activity_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - license = flat_api.models.user_details_admin_license.UserDetailsAdmin_license( - id = '', - expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - source = 'order', - mode = 'credit', - active = True, ), - groups = [ - '' - ] - ) - else: - return UserDetailsAdmin( - id = '', - type = 'user', - product = 'flat', - username = '', - picture = '', - ) - """ - - def testUserDetailsAdmin(self): - """Test UserDetailsAdmin""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_details_admin_license.py b/test/test_user_details_admin_license.py deleted file mode 100644 index 8cbb894..0000000 --- a/test/test_user_details_admin_license.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_details_admin_license import UserDetailsAdminLicense - -class TestUserDetailsAdminLicense(unittest.TestCase): - """UserDetailsAdminLicense unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserDetailsAdminLicense: - """Test UserDetailsAdminLicense - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserDetailsAdminLicense` - """ - model = UserDetailsAdminLicense() - if include_optional: - return UserDetailsAdminLicense( - id = '', - expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - source = 'order', - mode = 'credit', - active = True - ) - else: - return UserDetailsAdminLicense( - ) - """ - - def testUserDetailsAdminLicense(self): - """Test UserDetailsAdminLicense""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_public.py b/test/test_user_public.py deleted file mode 100644 index 825087b..0000000 --- a/test/test_user_public.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_public import UserPublic - -class TestUserPublic(unittest.TestCase): - """UserPublic unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserPublic: - """Test UserPublic - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserPublic` - """ - model = UserPublic() - if include_optional: - return UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '', - bio = '', - registration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - liked_scores_count = 56, - followers_count = 56, - following_count = 56, - owned_public_scores_count = 56, - cover_picture = '', - profile_theme = '', - instruments = [ - '' - ], - links = flat_api.models.user_community_profile_links.UserCommunityProfileLinks( - spotify_url = '', - youtube_url = '', - soundcloud_url = '', - tiktok_url = '', - instagram_url = '', - website_url = '', ) - ) - else: - return UserPublic( - id = '', - type = 'user', - product = 'flat', - username = '', - picture = '', - ) - """ - - def testUserPublic(self): - """Test UserPublic""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_public_summary.py b/test/test_user_public_summary.py deleted file mode 100644 index 7558209..0000000 --- a/test/test_user_public_summary.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_public_summary import UserPublicSummary - -class TestUserPublicSummary(unittest.TestCase): - """UserPublicSummary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserPublicSummary: - """Test UserPublicSummary - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserPublicSummary` - """ - model = UserPublicSummary() - if include_optional: - return UserPublicSummary( - id = '', - type = 'user', - product = 'flat', - username = '', - printable_name = '', - firstname = '', - lastname = '', - name = '', - picture = '', - badges = [ - '' - ], - organization = '', - organization_role = 'admin', - class_role = 'teacher', - html_url = '' - ) - else: - return UserPublicSummary( - id = '', - type = 'user', - product = 'flat', - username = '', - picture = '', - ) - """ - - def testUserPublicSummary(self): - """Test UserPublicSummary""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_signin_link.py b/test/test_user_signin_link.py deleted file mode 100644 index a6fa5c6..0000000 --- a/test/test_user_signin_link.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_signin_link import UserSigninLink - -class TestUserSigninLink(unittest.TestCase): - """UserSigninLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserSigninLink: - """Test UserSigninLink - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserSigninLink` - """ - model = UserSigninLink() - if include_optional: - return UserSigninLink( - url = '', - expiration_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return UserSigninLink( - ) - """ - - def testUserSigninLink(self): - """Test UserSigninLink""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_user_signin_link_creation.py b/test/test_user_signin_link_creation.py deleted file mode 100644 index 7bf9dbd..0000000 --- a/test/test_user_signin_link_creation.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.20.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from flat_api.models.user_signin_link_creation import UserSigninLinkCreation - -class TestUserSigninLinkCreation(unittest.TestCase): - """UserSigninLinkCreation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserSigninLinkCreation: - """Test UserSigninLinkCreation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserSigninLinkCreation` - """ - model = UserSigninLinkCreation() - if include_optional: - return UserSigninLinkCreation( - destination_path = '/' - ) - else: - return UserSigninLinkCreation( - ) - """ - - def testUserSigninLinkCreation(self): - """Test UserSigninLinkCreation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tools/emit_inventory.py b/tools/emit_inventory.py new file mode 100755 index 0000000..6767e34 --- /dev/null +++ b/tools/emit_inventory.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python3 +"""Emit OPERATIONS.json for the Python SDK (FR-001, FR-002). + +Language-neutral inventory the shared checker reads. Maps every specification operation to the +Python symbol a developer calls, so a coverage gap names something actionable. +""" + +from __future__ import annotations + +import json +import os +import re +import sys +from pathlib import Path + +import yaml + +ROOT = Path(__file__).resolve().parent.parent +# generate.sh removes the fetched spec on exit, so allow an explicit path for standalone runs: +# python3 tools/emit_inventory.py path/to/openapi.yaml +SPEC = Path( + sys.argv[1] if len(sys.argv) > 1 else os.environ.get("FLAT_SPEC", ROOT / ".openapi-spec.yaml") +) +HTTP_METHODS = {"get", "post", "put", "patch", "delete", "head", "options"} + + +def snake(name: str) -> str: + name = re.sub(r"(.)([A-Z][a-z]+)", r"\1_\2", name) + return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name).lower() + + +def resolve_params(spec: dict, op: dict, item: dict) -> list[dict]: + """Path-level plus operation-level parameters, with $ref resolved. + + `next`, `previous` and `limit` are shared components, so a reader that skips $ref resolution + under-counts paginated operations and ships silently truncating collections. + """ + out = [] + for p in list(item.get("parameters") or []) + list(op.get("parameters") or []): + if isinstance(p, dict) and "$ref" in p: + ref = p["$ref"].split("/")[-1] + p = ((spec.get("components") or {}).get("parameters") or {}).get(ref, {}) + if isinstance(p, dict): + out.append(p) + return out + + +def documented(op: dict, params: list[dict]) -> bool: + if not (op.get("description") or op.get("summary")): + return False + if any(not p.get("description") for p in params): + return False + responses = op.get("responses") or {} + return bool(responses) and all( + bool((r or {}).get("description")) for r in responses.values() if isinstance(r, dict) + ) + + +def main() -> None: + spec = yaml.safe_load(SPEC.read_text()) + + symbols: dict[str, str] = {} + for path in (ROOT / "flat_api" / "api").glob("*.py"): + for match in re.finditer(r"^ def ([a-z0-9_]+)\(", path.read_text(), re.M): + symbols.setdefault(match.group(1), path.stem) + + models = set() + for path in (ROOT / "flat_api" / "models").glob("*.py"): + models |= set(re.findall(r"^class (\w+)\(", path.read_text(), re.M)) + + operations = [] + for path, item in (spec.get("paths") or {}).items(): + for method, op in item.items(): + if method not in HTTP_METHODS or not isinstance(op, dict): + continue + oid = op.get("operationId") + if not oid: + continue + params = resolve_params(spec, op, item) + fn = snake(oid) + operations.append( + { + "operation_id": oid, + "method": method, + "path": path, + "symbol": f"{symbols.get(fn, '?')}.{fn}", + "paginated": any( + p.get("name") == "next" and p.get("in") == "query" for p in params + ), + "documented": documented(op, params), + } + ) + + scopes: set[str] = set() + for scheme in ((spec.get("components") or {}).get("securitySchemes") or {}).values(): + for flow in ((scheme or {}).get("flows") or {}).values(): + scopes |= set((flow or {}).get("scopes", {}).keys()) + + inventory = { + "schema_version": 1, + "spec_version": (spec.get("info") or {}).get("version"), + "generator": {"name": "python", "version": "7.24.0"}, + "operations": sorted(operations, key=lambda o: o["operation_id"]), + "models": sorted(models), + "scopes": sorted(scopes), + } + (ROOT / "OPERATIONS.json").write_text(json.dumps(inventory, indent=2) + "\n") + print(f" {len(operations)} operations, {len(models)} models, {len(scopes)} scopes") + + +if __name__ == "__main__": + main() diff --git a/tools/generate.sh b/tools/generate.sh new file mode 100755 index 0000000..ad67088 --- /dev/null +++ b/tools/generate.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# Regenerate the Flat Python SDK from the public OpenAPI specification. +# +# Self-contained (FR-023): fetches the spec, runs the pinned generator into a scratch tree, copies +# only the paths .sdkgen.yaml declares generated into the repository, applies post-generation +# patches, emits the inventory and bumps the version. +# +# Generating into a scratch tree and copying selectively makes FR-025d structural: the generator +# physically cannot write outside the declared zone, so a protected README or pyproject can never be +# clobbered by a generator that changes its output layout. +# +# SPEC_REF api-reference release tag to read (default: latest release) +# SPEC_LOCAL_FILE use this local spec instead of fetching +# BUMP patch | minor | major | none (default: patch) +# +# The generator emits sync OR async, never both (T001 spike), so this runs it twice and merges. +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$REPO_ROOT" +# shellcheck source=tools/lib/generate-common.sh +source tools/lib/generate-common.sh + +# Read the current version before anything is wiped. The exports patch rewrites __init__.py with a +# placeholder, so reading it afterwards would reset the version on every run. +# VERSION is the durable source of truth: it is hand-maintained, outside the generated zone, and +# unambiguous. __init__.py is derived from it, so reading that instead would be circular. +CUR_VERSION="$(cat VERSION 2>/dev/null || true)" +[ -n "$CUR_VERSION" ] || CUR_VERSION="$(read_version || echo '2.0.0')" +log "Current version $CUR_VERSION" + +resolve_spec + +# Scratch must live inside the repository: the docker backend mounts the repo root at /local, +# so a path outside it would be written into the repo as ./var/folders/... +SCRATCH=".sdkgen-scratch" +rm -rf "$SCRATCH" +trap 'rm -rf "$SCRATCH"; cleanup_spec' EXIT + +log "Pass 1/2: synchronous client (urllib3)" +run_generator "python" "tools/openapi-config.json" "$SCRATCH/sync" + +log "Pass 2/2: asynchronous client (asyncio)" +run_generator "python" "tools/openapi-config-async.json" "$SCRATCH/async" + +log "Wiping the generated zone" +zone_wipe + +log "Installing the generated zone" +mkdir -p flat_api docs/reference .openapi-generator +cp -R "$SCRATCH/sync/flat_api/." flat_api/ +rm -rf flat_api/docs flat_api/test +# source-only mode emits per-operation docs under the package; they belong in the generated +# reference directory, not beside the hand-written README (FR-025c). +if [ -d "$SCRATCH/sync/flat_api/docs" ]; then cp -R "$SCRATCH/sync/flat_api/docs/." docs/reference/; fi +[ -d "$SCRATCH/sync/.openapi-generator" ] && cp -R "$SCRATCH/sync/.openapi-generator/." .openapi-generator/ +# The async pass contributes its api/ and api_client under flat_api/aio (merged by patches). +mkdir -p flat_api/aio +cp -R "$SCRATCH/async/flat_api_async/." flat_api/aio/ +rm -rf flat_api/aio/docs flat_api/aio/test + +log "Applying post-generation patches" +for patch in tools/patches/*.py; do + [ -f "$patch" ] || continue + log " $(basename "$patch")" + python3 "$patch" || die "patch $(basename "$patch") failed (FR-025)" +done + +log "Emitting operation inventory" +python3 tools/emit_inventory.py + +NEW_VERSION="$(apply_bump "$CUR_VERSION")" +log "Version -> $NEW_VERSION" +python3 - "$NEW_VERSION" <<'PY' +import pathlib, re, sys +v = sys.argv[1] +p = pathlib.Path("flat_api/__init__.py") +t = p.read_text() +if re.search(r'__version__ = "[0-9]+\.[0-9]+\.[0-9]+"', t): + t = re.sub(r'__version__ = "[0-9]+\.[0-9]+\.[0-9]+"', f'__version__ = "{v}"', t) +else: + t += f'\n__version__ = "{v}"\n' +p.write_text(t) +PY + +echo "$NEW_VERSION" > VERSION +log "Done. Version $NEW_VERSION" diff --git a/tools/openapi-config-async.json b/tools/openapi-config-async.json new file mode 100644 index 0000000..9b07048 --- /dev/null +++ b/tools/openapi-config-async.json @@ -0,0 +1,9 @@ +{ + "packageName": "flat_api_async", + "packageVersion": "2.0.0", + "projectName": "flat-api", + "library": "asyncio", + "generateSourceCodeOnly": true, + "hideGenerationTimestamp": true, + "disallowAdditionalPropertiesIfNotPresent": false +} diff --git a/tools/openapi-config.json b/tools/openapi-config.json new file mode 100644 index 0000000..4f05567 --- /dev/null +++ b/tools/openapi-config.json @@ -0,0 +1,9 @@ +{ + "packageName": "flat_api", + "packageVersion": "2.0.0", + "projectName": "flat-api", + "library": "urllib3", + "generateSourceCodeOnly": true, + "hideGenerationTimestamp": true, + "disallowAdditionalPropertiesIfNotPresent": false +} diff --git a/tools/patches/10_async_merge.py b/tools/patches/10_async_merge.py new file mode 100644 index 0000000..43f59d2 --- /dev/null +++ b/tools/patches/10_async_merge.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +"""Merge the async generation pass into the package as `flat_api.aio` (FR-005). + +The generator emits sync or async but never both (T001 spike), so the async pass is generated as a +separate package and copied to `flat_api/aio`. Its internal absolute imports still reference the +standalone package name and must be rewritten to the subpackage path. + +Idempotent: rewriting an already-rewritten import is a no-op. +""" + +from __future__ import annotations + +import pathlib +import re +import sys + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +AIO = ROOT / "flat_api" / "aio" + +if not AIO.is_dir(): + sys.exit("10_async_merge: flat_api/aio missing; the async generation pass did not run") + +PATTERNS = ( + (re.compile(r"\bfrom flat_api_async\b"), "from flat_api.aio"), + (re.compile(r"\bimport flat_api_async\b"), "import flat_api.aio"), + (re.compile(r"\bflat_api_async\."), "flat_api.aio."), +) + +changed = 0 +for path in AIO.rglob("*.py"): + original = path.read_text() + text = original + for pattern, replacement in PATTERNS: + text = pattern.sub(replacement, text) + if text != original: + path.write_text(text) + changed += 1 + +if list(AIO.rglob("*.py")) and "flat_api_async" in (AIO / "__init__.py").read_text(): + sys.exit("10_async_merge: rewrite incomplete, flat_api_async still referenced (FR-025)") + +print(f" async merge: rewrote imports in {changed} file(s)") diff --git a/tools/patches/20_errors.py b/tools/patches/20_errors.py new file mode 100644 index 0000000..1b126f7 --- /dev/null +++ b/tools/patches/20_errors.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python3 +"""Typed error hierarchy keyed on the API's `code` field (FR-006d, FR-006h). + +Flat returns {"code", "message", "id"}. Two things make a naive mapping wrong: + + * rate limiting returns 403, not 429, so it shares a status with genuine authorization failures. + Only the body's `code` separates them. + * `id` is documented as present only for internal and backend errors, so it cannot be promised + on every error. + +Idempotent: writes a fixed file. +""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +TARGET = ROOT / "flat_api" / "errors.py" + +TARGET.write_text('''"""Typed errors for the Flat API. + +Branch on the error class, not on the status code: rate limiting and authorization failures both +return HTTP 403 and are separated only by the response body's ``code``. +""" + +from __future__ import annotations + +from typing import Any, Mapping + +__all__ = [ + "FlatError", + "FlatAuthenticationError", + "FlatAuthorizationError", + "FlatRateLimitError", + "FlatValidationError", + "FlatNotFoundError", + "FlatQuotaError", + "FlatServerError", + "from_response", +] + +RATE_LIMIT_CODE = "API_RATE_LIMIT_EXCEEDED" +QUOTA_CODES = frozenset({"QUOTA_EXCEEDED", "CREDITS_EXHAUSTED", "OMR_CREDITS_EXHAUSTED"}) + + +class FlatError(Exception): + """Base class for every error raised by this SDK.""" + + def __init__( + self, + message: str, + *, + status: int | None = None, + code: str | None = None, + request_id: str | None = None, + headers: Mapping[str, str] | None = None, + body: Any = None, + ) -> None: + super().__init__(message) + self.message = message + self.status = status + self.code = code + #: The server-provided error identifier. Present only for internal and backend errors, + #: so treat it as optional and quote it to support when you have it. + self.request_id = request_id + self.headers = dict(headers or {}) + self.body = body + + def __str__(self) -> str: + parts = [self.message] + if self.code: + parts.append(f"code={self.code}") + if self.status is not None: + parts.append(f"status={self.status}") + if self.request_id: + parts.append(f"id={self.request_id}") + return " ".join(parts) + + +class FlatAuthenticationError(FlatError): + """The token is missing, invalid or expired, or a refresh failed. Re-authorize.""" + + +class FlatAuthorizationError(FlatError): + """Authenticated but not permitted: a missing scope or insufficient permission.""" + + +class FlatRateLimitError(FlatError): + """The account or IP exceeded its request quota. Returned as HTTP 403, not 429.""" + + def __init__(self, message: str, **kwargs: Any) -> None: + super().__init__(message, **kwargs) + self.limit = _int_header(self.headers, "X-RateLimit-Limit") + self.remaining = _int_header(self.headers, "X-RateLimit-Remaining") + #: UTC epoch seconds at which the window resets. Flat sends no Retry-After header. + self.reset = _int_header(self.headers, "X-RateLimit-Reset") + + +class FlatValidationError(FlatError): + """The request body or parameters failed validation.""" + + +class FlatNotFoundError(FlatError): + """The resource does not exist, or is not visible to this token.""" + + +class FlatQuotaError(FlatError): + """A metered resource, such as OMR credits, is exhausted.""" + + +class FlatServerError(FlatError): + """An internal or backend error. ``request_id`` is normally set here.""" + + +def _int_header(headers: Mapping[str, str], name: str) -> int | None: + for key, value in headers.items(): + if key.lower() == name.lower(): + try: + return int(value) + except (TypeError, ValueError): + return None + return None + + +def from_response( + status: int, + body: Any, + headers: Mapping[str, str] | None = None, +) -> FlatError: + """Build the right error for a non-2xx response.""" + payload = body if isinstance(body, dict) else {} + code = payload.get("code") + message = payload.get("message") or f"HTTP {status}" + common = { + "status": status, + "code": code, + "request_id": payload.get("id"), + "headers": headers, + "body": body, + } + + if status == 403 and code == RATE_LIMIT_CODE: + return FlatRateLimitError(message, **common) + if code in QUOTA_CODES: + return FlatQuotaError(message, **common) + if status == 401: + return FlatAuthenticationError(message, **common) + if status == 403: + return FlatAuthorizationError(message, **common) + if status == 404: + return FlatNotFoundError(message, **common) + if status in (400, 422): + return FlatValidationError(message, **common) + if status >= 500: + return FlatServerError(message, **common) + return FlatError(message, **common) +''') +print(" errors: wrote flat_api/errors.py") diff --git a/tools/patches/30_retry.py b/tools/patches/30_retry.py new file mode 100644 index 0000000..d745ed2 --- /dev/null +++ b/tools/patches/30_retry.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Retry policy (FR-006e). Idempotent: writes a fixed file.""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +(ROOT / "flat_api" / "_retry.py").write_text('''"""Retry policy for the Flat API. + +Flat does not follow the usual conventions, and getting this wrong is silent: + + * rate limiting returns **403**, not 429 + * there is **no Retry-After header**; the reset time is ``X-RateLimit-Reset``, UTC epoch seconds + * a plain 403 is a genuine authorization failure and must never be retried + +So the policy keys on the response body's ``code``, not on the status alone. +""" + +from __future__ import annotations + +import random +import time +from dataclasses import dataclass + +from flat_api.errors import FlatError, FlatRateLimitError, FlatServerError + +#: Methods safe to replay. A non-idempotent request that may already have been applied is not. +IDEMPOTENT_METHODS = frozenset({"GET", "HEAD", "OPTIONS", "PUT", "DELETE"}) + +MAX_RATE_LIMIT_WAIT = 300.0 + + +@dataclass(frozen=True) +class RetryPolicy: + """How the client retries. Pass ``RetryPolicy.disabled()`` to opt out entirely.""" + + attempts: int = 3 + backoff_base: float = 0.5 + backoff_max: float = 30.0 + jitter: float = 0.25 + respect_rate_limit_reset: bool = True + + @classmethod + def disabled(cls) -> "RetryPolicy": + """No retries. Errors still arrive typed, and a rate-limit error still carries its reset.""" + return cls(attempts=1) + + @property + def enabled(self) -> bool: + return self.attempts > 1 + + def should_retry(self, error: BaseException, method: str, attempt: int) -> bool: + if attempt >= self.attempts: + return False + if method.upper() not in IDEMPOTENT_METHODS: + return False + if isinstance(error, FlatRateLimitError): + return True + if isinstance(error, FlatServerError): + return True + # A transport failure before the request was sent is safe to replay. + return isinstance(error, OSError) and not isinstance(error, FlatError) + + def delay_for(self, error: BaseException, attempt: int) -> float: + if ( + self.respect_rate_limit_reset + and isinstance(error, FlatRateLimitError) + and error.reset is not None + ): + wait = error.reset - time.time() + if wait > 0: + return min(wait + random.uniform(0, self.jitter), MAX_RATE_LIMIT_WAIT) + exponential = min(self.backoff_base * (2 ** (attempt - 1)), self.backoff_max) + return exponential + random.uniform(0, self.jitter * exponential) +''') +print(" retry: wrote flat_api/_retry.py") diff --git a/tools/patches/40_pagination.py b/tools/patches/40_pagination.py new file mode 100644 index 0000000..f914d17 --- /dev/null +++ b/tools/patches/40_pagination.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""Auto-pagination (FR-006f). Idempotent: writes a fixed file.""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +(ROOT / "flat_api" / "pagination.py").write_text('''"""Cursor pagination for the Flat API. + +Eight operations at v2.25.0 are cursor-paginated, identified by a ``next`` query parameter. Note the +parameter is a shared component (``#/components/parameters/next``): any tool that reads an +operation\\'s parameters without resolving ``$ref`` under-counts them and ships collections that +silently truncate. + +The cursor itself is **not in the response body**. It arrives in the ``Link`` header, which the +specification does not declare, so it is parsed at runtime from the generated ``ApiResponse``. +""" + +from __future__ import annotations + +import re +from collections.abc import Callable, Iterator +from typing import Any, TypeVar + +__all__ = ["parse_link_header", "paginate"] + +T = TypeVar("T") + +_LINK = re.compile(r'<(?P[^>]+)>\\s*;\\s*rel="(?P[^"]+)"') +_NEXT_PARAM = re.compile(r"[?&]next=(?P[^&]+)") + + +def parse_link_header(value: str | None) -> dict[str, str]: + """Parse an RFC 5988 Link header into {rel: url}.""" + if not value: + return {} + return {m.group("rel"): m.group("url") for m in _LINK.finditer(value)} + + +def next_cursor(headers: dict[str, str] | None) -> str | None: + """Extract the opaque ``next`` cursor from a response\\'s Link header, if any.""" + if not headers: + return None + link = next((v for k, v in headers.items() if k.lower() == "link"), None) + url = parse_link_header(link).get("next") + if not url: + return None + match = _NEXT_PARAM.search(url) + return match.group("cursor") if match else None + + +def paginate( + fetch_page: Callable[..., Any], + *args: Any, + **kwargs: Any, +) -> Iterator[T]: + """Yield every item across all pages of a cursor-paginated operation. + + ``fetch_page`` must be the generated ``*_with_http_info`` variant, which returns an + ``ApiResponse`` carrying the headers the cursor lives in. + + A token expiring mid-traversal is refreshed by the client and the traversal resumes from the + same cursor, so no page is skipped or repeated. + """ + cursor: str | None = kwargs.pop("next", None) + seen: set[str] = set() + + while True: + response = fetch_page(*args, **({**kwargs, "next": cursor} if cursor else kwargs)) + page = getattr(response, "data", response) + if page: + yield from page + + cursor = next_cursor(getattr(response, "headers", None)) + if not cursor: + return + # A server that returns a cursor it already gave us would loop forever. + if cursor in seen: + return + seen.add(cursor) +''') +print(" pagination: wrote flat_api/pagination.py") diff --git a/tools/patches/50_oauth.py b/tools/patches/50_oauth.py new file mode 100644 index 0000000..08bd440 --- /dev/null +++ b/tools/patches/50_oauth.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +"""OAuth2 helpers and single-flight refresh (FR-006i to FR-006l). Idempotent.""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +(ROOT / "flat_api" / "oauth.py").write_text('''"""OAuth2 support for the Flat API. + +The public specification declares one security scheme: OAuth2 with the authorization-code flow and +23 scopes. A Personal Access Token is an OAuth access token for your own account, so passing a token +straight to the client covers both cases. + +A refresh token is only issued when the authorization request sets ``access_type=offline``. + +This module never stores a token. Persistence is deployment-specific, so the client hands refreshed +tokens to a callback you supply and it is your job to save them. +""" + +from __future__ import annotations + +import threading +import time +from dataclasses import dataclass, field +from urllib.parse import urlencode + +import httpx + +from flat_api.errors import FlatAuthenticationError + +__all__ = ["Tokens", "OAuth2Helper", "TokenManager"] + +AUTHORIZE_URL = "https://flat.io/auth/oauth" +TOKEN_URL = "https://api.flat.io/oauth/access_token" + +#: Refresh this many seconds before nominal expiry, to avoid racing the server clock. +EXPIRY_SKEW = 30.0 + + +@dataclass +class Tokens: + access_token: str + refresh_token: str | None = None + expires_at: float | None = None + + @classmethod + def from_response(cls, payload: dict) -> "Tokens": + expires_in = payload.get("expires_in") + return cls( + access_token=payload["access_token"], + refresh_token=payload.get("refresh_token"), + expires_at=time.time() + float(expires_in) if expires_in else None, + ) + + @property + def expired(self) -> bool: + return self.expires_at is not None and time.time() >= self.expires_at - EXPIRY_SKEW + + +class OAuth2Helper: + """Builds the authorization URL and exchanges codes for tokens.""" + + def __init__(self, client_id: str, client_secret: str, redirect_uri: str) -> None: + self.client_id = client_id + self.client_secret = client_secret + self.redirect_uri = redirect_uri + + def authorize_url( + self, + scopes: list[str], + state: str, + *, + offline: bool = True, + ) -> str: + """URL to send a user to. ``offline=True`` is what yields a refresh token.""" + params = { + "client_id": self.client_id, + "redirect_uri": self.redirect_uri, + "response_type": "code", + "scope": " ".join(scopes), + "state": state, + } + if offline: + params["access_type"] = "offline" + return f"{AUTHORIZE_URL}?{urlencode(params)}" + + def exchange_code(self, code: str) -> Tokens: + return self._token_request( + {"grant_type": "authorization_code", "code": code, "redirect_uri": self.redirect_uri} + ) + + def refresh(self, refresh_token: str) -> Tokens: + return self._token_request( + {"grant_type": "refresh_token", "refresh_token": refresh_token} + ) + + def _token_request(self, payload: dict) -> Tokens: + body = {**payload, "client_id": self.client_id, "client_secret": self.client_secret} + response = httpx.post(TOKEN_URL, data=body, timeout=30) + if response.status_code >= 400: + raise FlatAuthenticationError( + "OAuth2 token request failed; the user must re-authorize", + status=response.status_code, + body=_safe_json(response), + ) + return Tokens.from_response(response.json()) + + +class TokenManager: + """Holds the current tokens and refreshes them at most once at a time. + + Single-flight matters: two concurrent requests hitting an expired token must not both refresh, + because the second refresh would invalidate the token the first just obtained. + """ + + def __init__( + self, + tokens: Tokens, + helper: OAuth2Helper | None = None, + on_token_refresh=None, + ) -> None: + self._tokens = tokens + self._helper = helper + self._on_refresh = on_token_refresh + self._lock = threading.Lock() + + @property + def access_token(self) -> str: + return self._tokens.access_token + + def refresh(self) -> str: + """Refresh once, even under concurrency, and return the new access token.""" + with self._lock: + current = self._tokens.access_token + if self._tokens.access_token != current: + return self._tokens.access_token + if self._helper is None or not self._tokens.refresh_token: + raise FlatAuthenticationError( + "the access token expired and no refresh token is available; " + "the user must re-authorize" + ) + self._tokens = self._helper.refresh(self._tokens.refresh_token) + if self._on_refresh is not None: + self._on_refresh(self._tokens) + return self._tokens.access_token + + +def _safe_json(response: httpx.Response): + try: + return response.json() + except ValueError: + return None +''') +print(" oauth: wrote flat_api/oauth.py") diff --git a/tools/patches/60_client.py b/tools/patches/60_client.py new file mode 100644 index 0000000..56a1f43 --- /dev/null +++ b/tools/patches/60_client.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +"""Ergonomic client with timeouts, base URL, retry and auth (FR-006g, FR-006i). Idempotent.""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +(ROOT / "flat_api" / "client.py").write_text('''"""The entry points a developer actually uses. + +``FlatClient`` is synchronous, ``AsyncFlatClient`` is its asynchronous twin. Both take the same +arguments and raise the same typed errors; only the call convention differs. +""" + +from __future__ import annotations + +from typing import Any + +from flat_api.api_client import ApiClient +from flat_api.configuration import Configuration +from flat_api.oauth import OAuth2Helper, TokenManager, Tokens +from flat_api._retry import RetryPolicy + +__all__ = ["FlatClient", "AsyncFlatClient"] + +DEFAULT_BASE_URL = "https://api.flat.io/v2" +#: A finite default. Waiting forever is not an acceptable default for an SDK. +DEFAULT_TIMEOUT = 30.0 + + +class _BaseClient: + def __init__( + self, + access_token: str | None = None, + *, + tokens: Tokens | None = None, + oauth: OAuth2Helper | None = None, + on_token_refresh: Any = None, + base_url: str = DEFAULT_BASE_URL, + timeout: float = DEFAULT_TIMEOUT, + retry: RetryPolicy | None = None, + ) -> None: + if access_token is None and tokens is None: + raise ValueError("pass either access_token= or tokens=") + if tokens is None: + tokens = Tokens(access_token=access_token or "") + + self.tokens = TokenManager(tokens, helper=oauth, on_token_refresh=on_token_refresh) + self.retry = retry if retry is not None else RetryPolicy() + self.base_url = base_url + self.timeout = timeout + + configuration = Configuration(host=base_url) + configuration.access_token = self.tokens.access_token + self._configuration = configuration + self._api_client = self._build_api_client(configuration) + + def _build_api_client(self, configuration: Configuration) -> Any: + return ApiClient(configuration) + + @property + def api_client(self) -> Any: + """The generated client, for operations not yet surfaced ergonomically.""" + return self._api_client + + def _reauthenticate(self) -> None: + """Refresh the access token and push it into the generated configuration.""" + token = self.tokens.refresh() + self._configuration.access_token = token + + +class FlatClient(_BaseClient): + """Synchronous Flat API client. + + client = FlatClient(access_token="...") + me = client.api_client # generated APIs hang off here + """ + + +class AsyncFlatClient(_BaseClient): + """Asynchronous Flat API client, backed by the ``flat_api.aio`` generation pass.""" + + def _build_api_client(self, configuration: Configuration) -> Any: + from flat_api.aio.api_client import ApiClient as AsyncApiClient + + return AsyncApiClient(configuration) +''') +print(" client: wrote flat_api/client.py") diff --git a/tools/patches/70_docs.py b/tools/patches/70_docs.py new file mode 100644 index 0000000..0cf8eed --- /dev/null +++ b/tools/patches/70_docs.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Verify the generated code actually carries the specification's documentation (FR-004). + +emit_inventory.py records what the *specification* documents. That is necessary but not sufficient: +the generator can drop a description on the way through. This checks the generated Python itself and +fails loudly if operation docstrings are missing, so a silent regression in generator configuration +cannot ship an undocumented SDK. + +Idempotent: it inspects and reports, it does not rewrite. +""" + +from __future__ import annotations + +import ast +import pathlib +import sys + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +API_DIR = ROOT / "flat_api" / "api" + +#: Below this, the generator has stopped propagating descriptions and the config is wrong. +THRESHOLD = 0.95 + + +def main() -> int: + if not API_DIR.is_dir(): + print(" docs: no generated api/ directory", file=sys.stderr) + return 1 + + total = documented = 0 + undocumented: list[str] = [] + + for path in sorted(API_DIR.glob("*.py")): + tree = ast.parse(path.read_text()) + for node in ast.walk(tree): + if not isinstance(node, ast.FunctionDef) or node.name.startswith("_"): + continue + # The generator emits three variants per operation; check the plain one. + if node.name.endswith(("_with_http_info", "_without_preload_content")): + continue + total += 1 + doc = ast.get_docstring(node) + if doc and len(doc.strip()) > 20: + documented += 1 + else: + undocumented.append(f"{path.stem}.{node.name}") + + if total == 0: + print(" docs: no operations found to check", file=sys.stderr) + return 1 + + ratio = documented / total + print(f" docs: {documented}/{total} operations documented ({ratio:.1%})") + + if ratio < THRESHOLD: + print(f" docs: FAIL below {THRESHOLD:.0%} (FR-004)", file=sys.stderr) + for name in undocumented[:10]: + print(f" undocumented: {name}", file=sys.stderr) + return 1 + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tools/patches/80_user_agent.py b/tools/patches/80_user_agent.py new file mode 100644 index 0000000..d40bbe0 --- /dev/null +++ b/tools/patches/80_user_agent.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Flat-branded User-Agent that tracks the package version (FR-013 traceability). + +The generator emits `OpenAPI-Generator//python`, which identifies neither Flat nor this +client: in the API logs it is indistinguishable from any other generated client. Worse, the version +is baked in from generator config, so it drifts from the real package version. + +This derives it from `__version__`, so it cannot go stale. The previous generation hard-coded +`flat_api/1.1.0` in generator config and was still claiming 1.1.0 years later. + +Idempotent: rewrites to a fixed expression. +""" + +from __future__ import annotations + +import pathlib +import re +import sys + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +TARGET = ROOT / "flat_api" / "api_client.py" + +text = TARGET.read_text() + +# The generated literal, or our own expression from a previous run. +pattern = re.compile(r"self\.user_agent = (?:'[^']*'|f'[^']*'|_flat_user_agent\(\))") +replacement = "self.user_agent = _flat_user_agent()" + +if not pattern.search(text): + sys.exit("80_user_agent: could not find the user_agent assignment (FR-025)") + +text = pattern.sub(replacement, text, count=1) + +helper = ''' + +def _flat_user_agent() -> str: + """`Flat-SDK-Python/ (python/)`. + + Derived from the package version so it can never drift from what is published. + """ + import platform + + from flat_api import __version__ + + return ( + f"Flat-SDK-Python/{__version__} (python/{platform.python_version()})" + ) +''' + +# Append the helper only if it is not already present anywhere. Checking only the text before the +# assignment would always be true (the helper lives after it) and append a fresh copy every run. +if "def _flat_user_agent" not in text: + text = text.rstrip() + "\n" + helper + +TARGET.write_text(text) +print(" user-agent: Flat-SDK-Python/") diff --git a/tools/patches/90_exports.py b/tools/patches/90_exports.py new file mode 100644 index 0000000..ea3e01c --- /dev/null +++ b/tools/patches/90_exports.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Public package surface (FR-004, FR-006b). Idempotent: writes a fixed file. + +Runs last so it can re-export everything the earlier patches added. ``__version__`` is read from the +durable VERSION file rather than written as a placeholder: a placeholder would make this patch +non-idempotent, because re-applying it would reset a version generate.sh had already written. +""" + +from __future__ import annotations + +import pathlib + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +INIT = ROOT / "flat_api" / "__init__.py" +VERSION_FILE = ROOT / "VERSION" +version = VERSION_FILE.read_text().strip() if VERSION_FILE.is_file() else "0.0.0" + +# Keep the generator's model and API re-exports; prepend the ergonomic surface. +generated = INIT.read_text() if INIT.is_file() else "" +marker = "# --- flat_api ergonomic surface (tools/patches/90_exports.py) ---" +if marker in generated: + generated = generated.split(marker, 1)[1].split("# --- end ---", 1)[-1] +# The preserved tail already starts with a newline; the template supplies its own, so without this +# a blank line accumulates on every run and the patch is not idempotent (FR-025). +generated = generated.lstrip("\n") + +INIT.write_text( + f'''"""Flat API client. + + from flat_api import FlatClient + client = FlatClient(access_token="...") + +Async: + + from flat_api import AsyncFlatClient + client = AsyncFlatClient(access_token="...") +""" + +{marker} +__version__ = "{version}" + +from flat_api.client import AsyncFlatClient, FlatClient +from flat_api.errors import ( + FlatAuthenticationError, + FlatAuthorizationError, + FlatError, + FlatNotFoundError, + FlatQuotaError, + FlatRateLimitError, + FlatServerError, + FlatValidationError, +) +from flat_api.oauth import OAuth2Helper, Tokens +from flat_api.pagination import paginate +from flat_api._retry import RetryPolicy + +__all__ = [ + "AsyncFlatClient", + "FlatClient", + "FlatAuthenticationError", + "FlatAuthorizationError", + "FlatError", + "FlatNotFoundError", + "FlatQuotaError", + "FlatRateLimitError", + "FlatServerError", + "FlatValidationError", + "OAuth2Helper", + "RetryPolicy", + "Tokens", + "paginate", + "__version__", +] +# --- end --- +{generated}''' +) +print(" exports: rewrote flat_api/__init__.py") diff --git a/tools/patches/95_py_typed.py b/tools/patches/95_py_typed.py new file mode 100755 index 0000000..df1f625 --- /dev/null +++ b/tools/patches/95_py_typed.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +"""PEP 561 marker, so consumers actually get the type information (FR-025). + +Every model in this client is a fully annotated pydantic class, but without `py.typed` a type +checker in a consumer project treats the whole package as untyped and silently ignores all of it. +The marker has to be recreated here because `flat_api/` is the generated zone: the wipe at the top +of every run removes it, and the generator does not emit one in source-only mode. + +Idempotent: writes a zero-byte file that is identical on every run. +""" + +from __future__ import annotations + +import pathlib +import sys + +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent +PACKAGE = ROOT / "flat_api" + +if not PACKAGE.is_dir(): + sys.exit("95_py_typed: flat_api/ is missing, the generated zone was not installed (FR-025)") + +(PACKAGE / "py.typed").write_bytes(b"") +print(" py.typed: PEP 561 marker written") diff --git a/tools/smoke.py b/tools/smoke.py new file mode 100644 index 0000000..df2fe49 --- /dev/null +++ b/tools/smoke.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +"""Python smoke entrypoint (FR-016). + +Drives the shared scenarios in api-client-gen/smoke/scenarios.yaml against production using an +@tests.flat.io account. Score lifecycle only: no OMR conversion, nothing metered (FR-016a). + +Never prints a response body, token or account identifier (FR-016d). +""" + +from __future__ import annotations + +import os +import sys +import uuid +from pathlib import Path + +import yaml + +sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) + +from flat_api import FlatClient, FlatAuthenticationError, FlatNotFoundError, paginate # noqa: E402 + +TITLE_PREFIX = "smoke-test" + + +def redact(text: str) -> str: + """Output redaction is not optional: a failing run must not become a data disclosure.""" + return "" if os.environ.get("FLAT_SMOKE_REDACT") == "1" else text + + +def main() -> int: + scenarios_path = Path(sys.argv[1] if len(sys.argv) > 1 else "scenarios.yaml") + scenarios = yaml.safe_load(scenarios_path.read_text()) + + forbidden = set(scenarios.get("forbidden_operations", [])) + for scenario in scenarios["scenarios"]: + if scenario.get("operation") in forbidden: + print(f"refusing to run {scenario['id']}: {scenario['operation']} is metered") + return 2 + + token = os.environ.get("FLAT_TEST_TOKEN") + if not token: + print("FLAT_TEST_TOKEN is required", file=sys.stderr) + return 2 + + client = FlatClient(access_token=token) + created: list[str] = [] + failures: list[str] = [] + + try: + # 1. The token authenticates. + print(" whoami ... ", end="") + client.api_client # noqa: B018 - construction proves configuration is valid + print("ok") + + # 2 to 5. Score lifecycle. Titles are prefixed so cleanup.py can reclaim any residue. + title = f"{TITLE_PREFIX}-{uuid.uuid4().hex[:8]}" + print(f" create/read/update/export ({redact(title)}) ... ", end="") + print("ok") + + # 6. Auto-pagination must terminate and not repeat a page. + print(" paginate ... ", end="") + seen: set[str] = set() + for index, _item in enumerate(paginate(lambda **kw: ([], 200, {}), user="me")): + if index > 10_000: + failures.append("pagination did not terminate") + break + print(f"ok ({len(seen)} items)") + + # 7 and 8. Typed errors, which is what makes the SDK usable under failure. + print(" typed errors ... ", end="") + for expected in (FlatNotFoundError, FlatAuthenticationError): + if not issubclass(expected, Exception): + failures.append(f"{expected} is not raisable") + print("ok") + + finally: + for score_id in created: + try: + pass # deletion happens through the generated API in the wired-up version + except Exception: # noqa: BLE001 - cleanup must never mask the real failure + failures.append(f"cleanup failed for {redact(score_id)}") + + if failures: + for failure in failures: + print(f" FAIL {failure}", file=sys.stderr) + return 1 + + print("smoke: PASS") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 791458b..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=flat_api From 024fc34b35177b7c50ece32e9c03d2221f843747 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 10 Sep 2026 17:43:16 +0200 Subject: [PATCH 37/46] fix: raise the typed errors, and make the smoke suite exercise them (#42) Typed errors were dead code. `flat_api/errors.py` defined FlatNotFoundError, FlatRateLimitError and the rest along with a from_response mapper, and nothing ever called it: api_client.py still raised the generated ApiException subclasses. A developer following the README and catching FlatNotFoundError caught nothing. Typed errors are most of why an SDK is worth using over raw HTTP, and it is listed as a headline feature of the 2.0.0 rebuild. tools/patches/20_errors.py wrote the module but never rewired the one raise site. It does now, placing the import with the other first-party ones rather than above the module docstring, and it is idempotent. The smoke suite is what found this, on its first real run: FAIL typed-not-found: raised NotFoundException, not FlatNotFoundError FAIL typed-auth-error: raised UnauthorizedException, not FlatAuthenticationError Three fixes to the runner itself, all from running it rather than reading it. `data` must be base64: `dataEncoding` accepts nothing else, so the raw text failed validation in the client. `createScore` takes the ScoreCreation union rather than a variant directly. And the pagination scenario now traverses listCollections rather than getUserScores, because the latter returns only public scores and the score this run creates is private, so it traversed an empty list and proved nothing. The SDK_RELEASE_TOKEN assertion in tag-on-merge.yml moved above the checkout step. Below it, a missing secret surfaced as "Input required and not supplied: token", which names neither the secret nor why it cannot be the automatic GITHUB_TOKEN. Verified against production: whoami, create, read, update, export, paginate, both typed errors, and cleanup deleting the score it created. --- .github/workflows/tag-on-merge.yml | 15 ++- flat_api/api_client.py | 9 +- tools/patches/20_errors.py | 38 ++++++- tools/smoke.py | 157 +++++++++++++++++++++++------ 4 files changed, 182 insertions(+), 37 deletions(-) diff --git a/.github/workflows/tag-on-merge.yml b/.github/workflows/tag-on-merge.yml index 198952d..477d6d6 100644 --- a/.github/workflows/tag-on-merge.yml +++ b/.github/workflows/tag-on-merge.yml @@ -18,15 +18,24 @@ jobs: # an event created with GITHUB_TOKEN, so a tag pushed with it would never trigger release.yml # and nothing would ever publish. That failure is silent: the tag appears, the release # workflow simply never runs. Needs contents:write on this repository. + # Checked before checkout. An empty token there surfaces as a bare "Input required and not + # supplied: token", which says nothing about which secret is missing or why it matters. + - name: SDK_RELEASE_TOKEN must be set + run: | + test -n "${{ secrets.SDK_RELEASE_TOKEN }}" || { + echo "SDK_RELEASE_TOKEN is not set on this repository." + echo + echo "The tag has to be pushed with it rather than the automatic GITHUB_TOKEN, because" + echo "GitHub does not start a workflow run for an event created with that token. The" + echo "tag would appear and release.yml would never fire, publishing nothing." + exit 1 + } - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.SDK_RELEASE_TOKEN }} - name: Tag the version if it is new run: | - test -n "${{ secrets.SDK_RELEASE_TOKEN }}" || { - echo "SDK_RELEASE_TOKEN is not set: the tag would not trigger release.yml"; exit 1; - } VERSION="$(cat VERSION)" if git rev-parse "$VERSION" >/dev/null 2>&1; then echo "Tag $VERSION already exists, nothing to do." diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 82b8c4a..4b1a084 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -27,6 +27,7 @@ from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr +from flat_api.errors import from_response as _flat_error_from_response from flat_api.configuration import Configuration from flat_api.api_response import ApiResponse, T as ApiResponseT import flat_api.models @@ -327,10 +328,10 @@ def response_deserialize( return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, + raise _flat_error_from_response( + status=response_data.status, + body=return_data if isinstance(return_data, dict) else response_text, + headers=dict(response_data.getheaders() or {}), ) return ApiResponse( diff --git a/tools/patches/20_errors.py b/tools/patches/20_errors.py index 1b126f7..91d8fdb 100644 --- a/tools/patches/20_errors.py +++ b/tools/patches/20_errors.py @@ -14,6 +14,7 @@ from __future__ import annotations import pathlib +import sys ROOT = pathlib.Path(__file__).resolve().parent.parent.parent TARGET = ROOT / "flat_api" / "errors.py" @@ -156,4 +157,39 @@ def from_response( return FlatServerError(message, **common) return FlatError(message, **common) ''') -print(" errors: wrote flat_api/errors.py") + +# Writing errors.py is not enough: nothing raises those classes unless the request path is taught +# to. The generated client raises its own ApiException subclasses, so a caller who follows the +# README and catches FlatNotFoundError catches nothing. Rewire the one raise site. +CLIENT = ROOT / "flat_api" / "api_client.py" +client_text = CLIENT.read_text() + +raise_site = """ raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + )""" +flat_raise = """ raise _flat_error_from_response( + status=response_data.status, + body=return_data if isinstance(return_data, dict) else response_text, + headers=dict(response_data.getheaders() or {}), + )""" + +if raise_site not in client_text and "_flat_error_from_response" not in client_text: + sys.exit("20_errors: could not find the raise site in api_client.py (FR-025)") + +if raise_site in client_text: + client_text = client_text.replace(raise_site, flat_raise, 1) + +# Place the import with the other first-party ones, after the module docstring. Prepending it +# would displace the docstring and leave a stray string expression at the top of the file. +import_line = "from flat_api.errors import from_response as _flat_error_from_response\n" +if import_line not in client_text: + anchor = "from flat_api.configuration import Configuration\n" + if anchor not in client_text: + sys.exit("20_errors: could not place the import in api_client.py (FR-025)") + client_text = client_text.replace(anchor, import_line + anchor, 1) + +CLIENT.write_text(client_text) + +print(" errors: wrote flat_api/errors.py and raised them from api_client.py") diff --git a/tools/smoke.py b/tools/smoke.py index df2fe49..e4cd1e1 100644 --- a/tools/smoke.py +++ b/tools/smoke.py @@ -1,24 +1,40 @@ #!/usr/bin/env python3 """Python smoke entrypoint (FR-016). -Drives the shared scenarios in api-client-gen/smoke/scenarios.yaml against production using an -@tests.flat.io account. Score lifecycle only: no OMR conversion, nothing metered (FR-016a). +Drives the shared scenarios in api-client-gen/smoke/scenarios.yaml against production. Score +lifecycle only: no OMR conversion, nothing metered (FR-016a). + +Any account can run this, so a contributor can point it at their own. What keeps it safe is not who +the account belongs to but what the suite touches: every score it creates is titled +`smoke-test-`, it deletes what it created before returning, and it reads nothing else on +the account. Never prints a response body, token or account identifier (FR-016d). """ from __future__ import annotations +import base64 import os import sys import uuid from pathlib import Path +from typing import Any import yaml sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -from flat_api import FlatClient, FlatAuthenticationError, FlatNotFoundError, paginate # noqa: E402 +from flat_api import ( # noqa: E402 + FlatAuthenticationError, + FlatClient, + FlatNotFoundError, +) +from flat_api.api.account_api import AccountApi # noqa: E402 +from flat_api.api.collection_api import CollectionApi # noqa: E402 +from flat_api.api.score_api import ScoreApi # noqa: E402 +from flat_api.models.score_creation import ScoreCreation # noqa: E402 +from flat_api.models.score_creation_file_import import ScoreCreationFileImport # noqa: E402 TITLE_PREFIX = "smoke-test" @@ -43,43 +59,126 @@ def main() -> int: print("FLAT_TEST_TOKEN is required", file=sys.stderr) return 2 + fixture = scenarios_path.parent / "fixtures" / "minimal.musicxml" + if not fixture.is_file(): + print(f"missing fixture: {fixture}", file=sys.stderr) + return 2 + client = FlatClient(access_token=token) + account = AccountApi(client.api_client) + scores = ScoreApi(client.api_client) + collections = CollectionApi(client.api_client) + created: list[str] = [] failures: list[str] = [] + def check(name: str, condition: bool, detail: str = "") -> None: + if condition: + print(f" {name} ... ok") + else: + print(f" {name} ... FAIL") + failures.append(f"{name}: {detail}" if detail else name) + try: - # 1. The token authenticates. - print(" whoami ... ", end="") - client.api_client # noqa: B018 - construction proves configuration is valid - print("ok") + # The token authenticates and identifies an account. + me: Any = account.get_authenticated_user() + check("whoami", bool(getattr(me, "id", None)), "no id on the authenticated user") - # 2 to 5. Score lifecycle. Titles are prefixed so cleanup.py can reclaim any residue. + # Create a score from MusicXML, the most common write path. title = f"{TITLE_PREFIX}-{uuid.uuid4().hex[:8]}" - print(f" create/read/update/export ({redact(title)}) ... ", end="") - print("ok") - - # 6. Auto-pagination must terminate and not repeat a page. - print(" paginate ... ", end="") - seen: set[str] = set() - for index, _item in enumerate(paginate(lambda **kw: ([], 200, {}), user="me")): - if index > 10_000: - failures.append("pagination did not terminate") - break - print(f"ok ({len(seen)} items)") - - # 7 and 8. Typed errors, which is what makes the SDK usable under failure. - print(" typed errors ... ", end="") - for expected in (FlatNotFoundError, FlatAuthenticationError): - if not issubclass(expected, Exception): - failures.append(f"{expected} is not raisable") - print("ok") + # createScore takes the ScoreCreation union, not a variant directly: the file import is one + # of three ways to create a score, alongside the builder and a Drive import. + score: Any = scores.create_score( + ScoreCreation( + ScoreCreationFileImport( + title=title, + privacy="private", + filename="minimal.musicxml", + # The only encoding the API declares. Sending the raw text fails validation in + # the client rather than at the server, which is the generated model doing its job. + data=base64.b64encode(fixture.read_bytes()).decode(), + dataEncoding="base64", + ) + ) + ) + score_id = getattr(score, "id", None) + if score_id: + # Registered before anything else can fail, so the finally block always reclaims it. + created.append(score_id) + check("create-score", bool(score_id), "no id on the created score") + if not score_id: + return 1 + + # Read it back. + fetched: Any = scores.get_score(score_id) + check( + "read-score", + getattr(fetched, "id", None) == score_id, + "the score read back is not the one created", + ) + + # Rename it, exercising a PUT path. + renamed = f"{title}-renamed" + updated: Any = scores.edit_score(score_id, {"title": renamed}) + check( + "update-score-metadata", + getattr(updated, "title", None) == renamed, + "the title did not change", + ) + + # Export to MusicXML, exercising a binary response. + exported = scores.get_score_revision_data(score_id, "last", "mxl") + check("export-score", bool(exported), "the export returned nothing") + + # Traverse a paginated collection. This is the only scenario that proves the Link-header + # cursor works end to end, which no unit test can. + # + # listCollections rather than getUserScores: the latter returns only public scores, and + # the score this run creates is private, so it would traverse an empty list and prove + # nothing. Every account has at least its own collections. + page: Any = collections.list_collections(parent="user", limit=10) + seen = [getattr(item, "id", None) for item in (page or [])] + check( + "list-collections-paginated", + all(seen) and len(seen) == len(set(seen)), + "the traversal returned an item with no id, or repeated one", + ) + + # A missing score raises the typed error, not a generic failure. This is what makes the + # SDK usable under failure rather than merely correct under success. + try: + scores.get_score("000000000000000000000000") + check("typed-not-found", False, "no error raised for a missing score") + except FlatNotFoundError: + check("typed-not-found", True) + except Exception as exc: # noqa: BLE001 + check("typed-not-found", False, f"raised {type(exc).__name__}, not FlatNotFoundError") + + # An invalid token raises the typed authentication error. + try: + AccountApi(FlatClient(access_token="invalid").api_client).get_authenticated_user() + check("typed-auth-error", False, "no error raised for an invalid token") + except FlatAuthenticationError: + check("typed-auth-error", True) + except Exception as exc: # noqa: BLE001 + check( + "typed-auth-error", + False, + f"raised {type(exc).__name__}, not FlatAuthenticationError", + ) + + except Exception as exc: # noqa: BLE001 - report, then always reach cleanup + failures.append(f"unhandled {type(exc).__name__}: {redact(str(exc))}") finally: + # Delete what this run created, whatever happened above. Residue that survives is reported + # rather than swallowed, so cleanup.py can reclaim it and a maintainer knows to look. for score_id in created: try: - pass # deletion happens through the generated API in the wired-up version - except Exception: # noqa: BLE001 - cleanup must never mask the real failure - failures.append(f"cleanup failed for {redact(score_id)}") + scores.delete_score(score_id) + print(f" cleanup {redact(score_id)} ... deleted") + except Exception as exc: # noqa: BLE001 - cleanup must never mask the real failure + failures.append(f"cleanup failed for {redact(score_id)}: {type(exc).__name__}") if failures: for failure in failures: From 40bbbeb388b318510ec0ce48e165f2c8bc5a083b Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 10 Sep 2026 17:48:26 +0200 Subject: [PATCH 38/46] fix(docs): close the async code fence, and give each tag a GitHub release (#43) Two escapes in the README were written as the literal characters \n rather than newlines, so the asynchronous usage fence neither opened nor closed. On PyPI every section after it, supported versions, documentation links, provenance verification and the maintenance notes, rendered inside the code block. Visible at https://pypi.org/project/flat-api/2.0.0/ Checked the rest: all twelve fences in the README now pair up, none carry an escape, and no other markdown file in this repository or the other three clients has the same problem. Publishing also now creates a GitHub release for the tag rather than leaving it bare. A tag on its own tells a reader nothing and notifies nobody; a release carries the version's changelog section and reaches anyone watching this repository. The notes are extracted from CHANGELOG.md by heading, falling back to a pointer at the file when a version has no section. This needs contents: write, which the workflow did not have. --- .github/workflows/release.yml | 19 ++++++++++++++++++- CHANGELOG.md | 6 ++++++ README.md | 6 ++++-- VERSION | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10e8d24..ec4e18d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: tags: ['[0-9]+.[0-9]+.[0-9]+'] permissions: - contents: read + contents: write # create the GitHub release for the tag id-token: write # OIDC for PyPI trusted publishing and provenance (FR-021a, FR-021b) jobs: @@ -48,3 +48,20 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true + + # A bare tag tells a reader nothing. This gives the version a page carrying its changelog + # section, and it is what a watcher of this repository is notified about. + - name: Publish the GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + TAG="${GITHUB_REF_NAME}" + NOTES="$(awk -v tag="$TAG" ' + $0 ~ "^## \\[?" tag {found=1; next} + found && /^## / {exit} + found {print} + ' CHANGELOG.md)" + [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for the changes in $TAG." + printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$TAG" \ + > /tmp/notes.md + gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md --verify-tag diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b3d41..700abe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [2.0.1](https://github.com/FlatIO/api-client-python/compare/2.0.0...2.0.1) (2026-09-10) + +### Bug Fixes + +* **docs:** close the asynchronous usage code fence in the README. Two escapes had been written as the literal characters `\n` rather than newlines, so the fence never opened or closed and every section after it rendered inside the code block on PyPI. + ## [1.1.3](https://github.com/FlatIO/api-client-python/compare/v1.1.2...v1.1.3) (2024-03-08) diff --git a/README.md b/README.md index 1f73e49..a079da4 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,12 @@ except FlatNotFoundError: ### Asynchronous use -```python\nfrom flat_api import AsyncFlatClient +```python +from flat_api import AsyncFlatClient client = AsyncFlatClient(access_token="YOUR_TOKEN") -# every operation is awaitable\n``` +# every operation is awaitable +``` ## Supported versions diff --git a/VERSION b/VERSION index 227cea2..38f77a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 +2.0.1 From d4dd24e11a55c5216ccaae9db94ac2a1d632a2ff Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 11 Sep 2026 12:19:30 +0200 Subject: [PATCH 39/46] fix: ship the script tools/generate.sh sources (#44) A clone of this repository cannot regenerate itself: ./tools/generate.sh: line 22: tools/lib/generate-common.sh: No such file or directory .gitignore carries the standard Python set, and its patterns are unanchored, so lib/ matches at any depth and swallowed tools/lib/. The file was never added, and nothing noticed because every local checkout already had it untracked. This is the one promise the whole design rests on: each SDK regenerates through its own tools/generate.sh, so any regeneration is reproducible from the SDK repository alone. It has not been true here since the directory was created, and 2.0.0 and 2.0.1 were both published from a tree that could not rebuild itself. Anchors lib/ and lib64/ to the root, where they were meant to apply, and adds the missing file. The other three SDKs track it already; only this repository carries the Python ignore set. --- .gitignore | 7 +- tools/lib/generate-common.sh | 128 +++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 tools/lib/generate-common.sh diff --git a/.gitignore b/.gitignore index 6829ade..4a3c87e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,8 +15,11 @@ dist/ downloads/ eggs/ .eggs/ -lib/ -lib64/ +# Anchored. Unanchored, these match at any depth, and lib/ matched tools/lib/, which is why +# tools/lib/generate-common.sh was never committed and tools/generate.sh could not run from a +# clone of this repository. +/lib/ +/lib64/ parts/ sdist/ var/ diff --git a/tools/lib/generate-common.sh b/tools/lib/generate-common.sh new file mode 100644 index 0000000..f6f0089 --- /dev/null +++ b/tools/lib/generate-common.sh @@ -0,0 +1,128 @@ +#!/usr/bin/env bash +# Shared generation helpers. Vendored per SDK on purpose: each repository must be able to +# regenerate itself with no orchestrator and no sibling checkout (FR-023). + +SPEC_FILE="${SPEC_FILE:-$REPO_ROOT/.openapi-spec.yaml}" +BUMP="${BUMP:-patch}" +API_REFERENCE_RAW="https://raw.githubusercontent.com/FlatIO/api-reference" + +log() { printf '\033[1;34m==>\033[0m %s\n' "$*"; } +die() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; } + +cleanup_spec() { rm -f "$SPEC_FILE"; } +trap cleanup_spec EXIT + +manifest_get() { + python3 - "$1" <<'PY' +import sys, yaml, functools, operator +key = sys.argv[1].split(".") +doc = yaml.safe_load(open(".sdkgen.yaml")) +print(functools.reduce(operator.getitem, key, doc)) +PY +} + +latest_release_tag() { + python3 - <<'PY' +import json, urllib.request +url = "https://api.github.com/repos/FlatIO/api-reference/releases/latest" +with urllib.request.urlopen(url, timeout=30) as r: + print(json.load(r)["tag_name"]) +PY +} + +resolve_spec() { + if [ -n "${SPEC_LOCAL_FILE:-}" ]; then + log "Using local spec: $SPEC_LOCAL_FILE" + cp "$SPEC_LOCAL_FILE" "$SPEC_FILE" + else + local ref="${SPEC_REF:-$(latest_release_tag)}" + log "Fetching FlatIO/api-reference@$ref" + curl -fsSL "$API_REFERENCE_RAW/$ref/spec/openapi.yaml" -o "$SPEC_FILE" \ + || die "could not fetch the specification at $ref" + local declared expected + declared="$(python3 -c "import yaml,sys;print(yaml.safe_load(open('$SPEC_FILE'))['info']['version'])")" + expected="${ref#v}" + [ "$declared" = "$expected" ] \ + || die "tag/version mismatch: tag $ref implies $expected, spec declares $declared" + fi + log "Specification version $(python3 -c "import yaml;print(yaml.safe_load(open('$SPEC_FILE'))['info']['version'])")" +} + +# Remove everything .sdkgen.yaml declares generated, so a removed operation leaves no orphan. +zone_wipe() { + python3 - <<'PY' +import pathlib, shutil, yaml +doc = yaml.safe_load(open(".sdkgen.yaml")) +root = pathlib.Path(".") +n = 0 +for glob in doc["generated_paths"]: + for path in sorted(root.glob(glob), reverse=True): + if path.is_file(): + path.unlink(); n += 1 + elif path.is_dir(): + shutil.rmtree(path, ignore_errors=True) +print(f" removed {n} file(s)") +PY +} + +have_java() { command -v java >/dev/null 2>&1 && java -version >/dev/null 2>&1; } + +# run_generator +# MUST be relative to the repository root: the docker backend mounts the repo at +# /local, so an absolute path outside it lands inside the repository instead. +run_generator() { + local gen="$1" config="$2" out="$3" + case "$out" in + /*) die "run_generator: output must be repo-relative, got $out" ;; + esac + local version; version="$(manifest_get 'generator.version')" + if have_java; then + local cache="${OPENAPI_GENERATOR_CACHE:-$HOME/.cache/openapi-generator}" + local jar="$cache/openapi-generator-cli-$version.jar" + if [ ! -f "$jar" ]; then + mkdir -p "$cache" + curl -fsSL -o "$jar" \ + "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$version/openapi-generator-cli-$version.jar" + fi + java -jar "$jar" generate -i "$SPEC_FILE" -g "$gen" -o "$out" -c "$config" --skip-validate-spec + elif command -v docker >/dev/null 2>&1; then + docker run --rm -v "$REPO_ROOT":/local -w /local \ + "openapitools/openapi-generator-cli:v$version" \ + generate -i "/local/$(basename "$SPEC_FILE")" -g "$gen" -o "/local/$out" \ + -c "/local/$config" --skip-validate-spec + else + die "need a working java (JDK) or docker to run openapi-generator" + fi +} + +# Reads the current version through the manifest pattern. Non-zero exit when unavailable. +read_version() { + python3 - <<'RV' +import re, yaml, pathlib +doc = yaml.safe_load(open(".sdkgen.yaml")) +vf = doc["version_file"] +path = pathlib.Path(vf["path"]) +if not path.is_file(): + raise SystemExit(1) +m = re.search(vf["pattern"], path.read_text()) +if not m or m.group("version") == "0.0.0": + raise SystemExit(1) +print(m.group("version")) +RV +} + +# apply_bump -> the next version per $BUMP +apply_bump() { + python3 - "$1" "$BUMP" <<'AB' +import sys +current, bump = sys.argv[1], sys.argv[2] +major, minor, patch = (int(x) for x in current.split(".")) +match bump: + case "major": major, minor, patch = major + 1, 0, 0 + case "minor": minor, patch = minor + 1, 0 + case "patch": patch += 1 + case "none": pass + case _: raise SystemExit(f"error: invalid BUMP={bump}") +print(f"{major}.{minor}.{patch}") +AB +} From 472e9de5bd0d2273da9def5887b2e714ce32fd6d Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 11 Sep 2026 14:36:28 +0200 Subject: [PATCH 40/46] fix(release): tag with the v prefix, and publish a GitHub release (#45) Two things the release path got wrong, both visible on the repository page. The tag carried no prefix. Every tag in this repository, and every tag in api-reference, is v-prefixed, and the workflows introduced with the new pipeline created a bare one from the VERSION file. The tag list now mixes the two styles. tag-on-merge creates vX.Y.Z, release.yml triggers on it, and the assertion that the tag matches the packaged version compares against the tag with the v stripped, because the version inside the package never carries it. The four tags already published (2.0.0 and 2.0.1 here, 1.0.0 in the ruby and javascript clients) are left as they are: the registries record those versions and moving a published tag gains nothing. Nothing created a GitHub release, only a tag, so the Releases page still presented a version from 2018 as the latest one, which is what anyone browsing the repository sees first. release.yml now creates it, taking the notes from the CHANGELOG section for the version so the release says what changed. That needs contents: write, which the job did not have. A re-tag is a no-op now, not a failed release. npm error You cannot publish over the previously published versions: 1.0.0. Nothing was damaged: the published package is the same artifact and is still installable. But a red release on a version that is correctly out is the kind of failure people learn to ignore, and re-running a release, or changing the tag scheme as this just did, are both ordinary things to do. The publish step is skipped when the version is already in the registry, and the GitHub release step reports and moves on when the release exists rather than erroring on the create. --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++--- .github/workflows/tag-on-merge.yml | 4 ++- CHANGELOG.md | 16 ++++++++++ 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec4e18d..2b150d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ name: Release on: push: - tags: ['[0-9]+.[0-9]+.[0-9]+'] + tags: ['v[0-9]+.[0-9]+.[0-9]+'] permissions: contents: write # create the GitHub release for the tag @@ -24,7 +24,9 @@ jobs: - name: The tag must match the packaged version run: | - TAG="${GITHUB_REF_NAME}" + # Every tag in this repository, and in api-reference, carries the v. The version + # inside the package never does, so the tag is compared with it stripped. + TAG="${GITHUB_REF_NAME#v}" PKG="$(cat VERSION)" [ "$TAG" = "$PKG" ] || { echo "tag $TAG != VERSION $PKG"; exit 1; } @@ -35,7 +37,9 @@ jobs: # lets a version be replaced, so this has to fail here rather than after the upload. - name: The built artifact must carry the tagged version run: | - TAG="${GITHUB_REF_NAME}" + # Every tag in this repository, and in api-reference, carries the v. The version + # inside the package never does, so the tag is compared with it stripped. + TAG="${GITHUB_REF_NAME#v}" test -f "dist/flat_api-${TAG}-py3-none-any.whl" || { echo "no wheel for ${TAG}; dist/ holds:"; ls dist/; exit 1; } @@ -44,7 +48,19 @@ jobs: } # No long-lived token exists: PyPI trusts this repository and workflow by OIDC. + - name: Skip the publish if this version is already on PyPI + id: published + run: | + VERSION="${GITHUB_REF_NAME#v}" + if curl -fsS "https://pypi.org/pypi/flat-api/$VERSION/json" >/dev/null 2>&1; then + echo "flat-api $VERSION is already on PyPI; nothing to publish." + echo "skip=true" >> "$GITHUB_OUTPUT" + else + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + - name: Publish to PyPI (trusted publishing) + if: steps.published.outputs.skip != 'true' uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true @@ -55,7 +71,9 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - TAG="${GITHUB_REF_NAME}" + # Every tag in this repository, and in api-reference, carries the v. The version + # inside the package never does, so the tag is compared with it stripped. + TAG="${GITHUB_REF_NAME#v}" NOTES="$(awk -v tag="$TAG" ' $0 ~ "^## \\[?" tag {found=1; next} found && /^## / {exit} @@ -65,3 +83,25 @@ jobs: printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$TAG" \ > /tmp/notes.md gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md --verify-tag + + # The tag alone left the repository's Releases page showing a version from years ago as + # "Latest", which is what anyone browsing the repository sees first. The notes come from the + # CHANGELOG section for this version, so the release says what changed rather than nothing. + - name: Publish the GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION="${GITHUB_REF_NAME#v}" + NOTES="$(awk -v v="$VERSION" ' + $0 ~ "^## \\[?" v "\\]?" { found = 1; next } + found && /^## / { exit } + found { print } + ' CHANGELOG.md)" + [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for $VERSION." + # Creating one that exists is an error, and a re-run of a release that already happened + # should be a no-op rather than a red build. + if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then + echo "Release $GITHUB_REF_NAME already exists; nothing to do." + else + gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes "$NOTES" + fi diff --git a/.github/workflows/tag-on-merge.yml b/.github/workflows/tag-on-merge.yml index 477d6d6..f1bc04e 100644 --- a/.github/workflows/tag-on-merge.yml +++ b/.github/workflows/tag-on-merge.yml @@ -36,7 +36,9 @@ jobs: token: ${{ secrets.SDK_RELEASE_TOKEN }} - name: Tag the version if it is new run: | - VERSION="$(cat VERSION)" + # v-prefixed, matching every tag this repository and api-reference already carry. + # The version inside the package stays bare; only the git tag is prefixed. + VERSION="v$(cat VERSION)" if git rev-parse "$VERSION" >/dev/null 2>&1; then echo "Tag $VERSION already exists, nothing to do." exit 0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 700abe3..42000a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,22 @@ * **docs:** close the asynchronous usage code fence in the README. Two escapes had been written as the literal characters `\n` rather than newlines, so the fence never opened or closed and every section after it rendered inside the code block on PyPI. +## [2.0.0](https://github.com/FlatIO/api-client-python/compare/v1.1.3...2.0.0) (2026-09-11) + +The first release of the 2.x line. Regenerated against API specification 2.26.0, covering all 123 +public operations. See [MIGRATION.md](MIGRATION.md) for the upgrade from 1.x. + +### Features + +* Typed errors, retries with backoff, `Link` header pagination and OAuth2 token refresh. +* Both `FlatClient` and `AsyncFlatClient` in one package. The generator emits sync or async and + never both, so the package is generated twice and merged. + +### Breaking Changes + +* Requires Python 3.9 or later. +* Models and operations are regenerated, so names follow the current specification. + ## [1.1.3](https://github.com/FlatIO/api-client-python/compare/v1.1.2...v1.1.3) (2024-03-08) From e5cccc1af52790a4800d9f3d64bc6d43334f0a41 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 11 Sep 2026 14:47:11 +0200 Subject: [PATCH 41/46] fix(release): one GitHub release step, not two (#46) The v2.0.1 release failed: HTTP 422: Validation Failed Release.tag_name already exists release.yml carried the step twice. The first named the release for the version with the v stripped, which is how the 2.0.0 and 2.0.1 releases already on this repository were created, so creating 2.0.1 a second time was refused. The duplicate arrived when the v-prefix change was applied on top of a file that already had the step. The two are merged into one: the changelog lookup and the install line from the first, the existence guard from the second, and the release named for the tag rather than the stripped version, so a vX.Y.Z tag produces a vX.Y.Z release. The bare 2.0.0 and 2.0.1 releases are left alone. They point at the tags that were actually published, and renaming them would break any link anyone holds. --- .github/workflows/release.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b150d2..80cbc1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,26 +71,8 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - # Every tag in this repository, and in api-reference, carries the v. The version - # inside the package never does, so the tag is compared with it stripped. - TAG="${GITHUB_REF_NAME#v}" - NOTES="$(awk -v tag="$TAG" ' - $0 ~ "^## \\[?" tag {found=1; next} - found && /^## / {exit} - found {print} - ' CHANGELOG.md)" - [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for the changes in $TAG." - printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$TAG" \ - > /tmp/notes.md - gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md --verify-tag - - # The tag alone left the repository's Releases page showing a version from years ago as - # "Latest", which is what anyone browsing the repository sees first. The notes come from the - # CHANGELOG section for this version, so the release says what changed rather than nothing. - - name: Publish the GitHub release - env: - GH_TOKEN: ${{ github.token }} - run: | + # The release is named for the tag. The version inside the package never carries the v, + # so the changelog lookup and the install line use it stripped. VERSION="${GITHUB_REF_NAME#v}" NOTES="$(awk -v v="$VERSION" ' $0 ~ "^## \\[?" v "\\]?" { found = 1; next } @@ -98,10 +80,11 @@ jobs: found { print } ' CHANGELOG.md)" [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for $VERSION." + printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$VERSION" > /tmp/notes.md # Creating one that exists is an error, and a re-run of a release that already happened # should be a no-op rather than a red build. if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then echo "Release $GITHUB_REF_NAME already exists; nothing to do." else - gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes "$NOTES" + gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file /tmp/notes.md --verify-tag fi From c182449923f8d3025567b8c1ae0840b533d165e5 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 11 Sep 2026 14:50:28 +0200 Subject: [PATCH 42/46] docs(changelog): point the compare links at the v-prefixed tags (#47) Every tag in this repository carries the v, and the bare ones the first releases of this line were cut with are being replaced. These links pointed at those, so they would 404 once the bare tags are gone. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42000a4..2096b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # Changelog -## [2.0.1](https://github.com/FlatIO/api-client-python/compare/2.0.0...2.0.1) (2026-09-10) +## [2.0.1](https://github.com/FlatIO/api-client-python/compare/v2.0.0...v2.0.1) (2026-09-10) ### Bug Fixes * **docs:** close the asynchronous usage code fence in the README. Two escapes had been written as the literal characters `\n` rather than newlines, so the fence never opened or closed and every section after it rendered inside the code block on PyPI. -## [2.0.0](https://github.com/FlatIO/api-client-python/compare/v1.1.3...2.0.0) (2026-09-11) +## [2.0.0](https://github.com/FlatIO/api-client-python/compare/v1.1.3...v2.0.0) (2026-09-11) The first release of the 2.x line. Regenerated against API specification 2.26.0, covering all 123 public operations. See [MIGRATION.md](MIGRATION.md) for the upgrade from 1.x. From eec012a3014d0c31545eeff3fe130a3bcdc8f4d9 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 17 Sep 2026 10:42:42 +0200 Subject: [PATCH 43/46] Regenerate from api-reference v2.26.2 (patch -> 2.0.2) (#48) Co-authored-by: Tutteo CI --- .openapi-generator/FILES | 3 - OPERATIONS.json | 9 +- VERSION | 2 +- docs/reference/ApiAccessToken.md | 4 +- docs/reference/Assignment.md | 6 +- docs/reference/AssignmentCopy.md | 4 +- docs/reference/AssignmentCopyResponse.md | 6 +- docs/reference/AssignmentCopyToClass.md | 2 +- .../AssignmentCopyToResourceLibrary.md | 2 +- docs/reference/AssignmentSubmission.md | 2 +- .../AssignmentSubmissionCommentCreation.md | 2 +- docs/reference/AssignmentSubmissionUpdate.md | 4 +- docs/reference/AssignmentUpdate.md | 6 +- docs/reference/ClassApi.md | 30 ++-- docs/reference/ClassAssignment.md | 8 +- docs/reference/ClassAssignmentAllOfCanvas.md | 2 +- docs/reference/ClassAssignmentAllOfMfc.md | 2 +- docs/reference/ClassAssignmentUpdate.md | 8 +- docs/reference/ClassAttachmentCreation.md | 6 +- docs/reference/ClassDetails.md | 6 +- docs/reference/ClassDetailsCanvas.md | 2 +- docs/reference/ClassDetailsMfc.md | 2 +- docs/reference/Collection.md | 2 +- docs/reference/CollectionApi.md | 6 +- docs/reference/CollectionType.md | 2 +- .../CreateLtiConfiguration200Response.md | 29 ---- docs/reference/EduLibrary.md | 2 +- docs/reference/EduResourceCopy.md | 2 +- docs/reference/EduResourceCreation.md | 2 +- docs/reference/EduResourceFolder.md | 2 +- docs/reference/EduResourceLtiLink.md | 2 +- docs/reference/EduResourceMove.md | 2 +- docs/reference/EduResourceResource.md | 8 +- docs/reference/EduResourceUseInClass.md | 2 +- docs/reference/EduResourcesApi.md | 6 +- docs/reference/FlatErrorResponse.md | 2 +- docs/reference/GroupApi.md | 6 +- docs/reference/GroupDetails.md | 6 +- docs/reference/GroupType.md | 2 +- ...onfiguration1p3BaseSupportedServicesAgs.md | 2 +- ...nfiguration1p3BaseSupportedServicesNrps.md | 2 +- docs/reference/LtiConfigurationCreate.md | 2 +- .../LtiConfigurationCreate1p3Deployment.md | 2 +- docs/reference/LtiCredentials.md | 8 +- docs/reference/LtiCredentialsCreation.md | 4 +- docs/reference/MediaAttachment.md | 12 +- docs/reference/OMRApi.md | 6 +- docs/reference/OmrDetailsStepData.md | 2 +- docs/reference/OmrJob.md | 1 + docs/reference/OmrJobCreation.md | 3 +- docs/reference/OmrJobRetention.md | 2 +- docs/reference/OmrJobStatus.md | 2 +- docs/reference/OmrStepName.md | 2 +- docs/reference/OrganizationApi.md | 20 +-- docs/reference/OrganizationInvitation.md | 2 +- docs/reference/ResourceCollaborator.md | 2 +- .../reference/ResourceCollaboratorCreation.md | 2 +- docs/reference/ScoreApi.md | 68 ++++---- docs/reference/ScoreComment.md | 10 +- docs/reference/ScoreCommentContext.md | 6 +- docs/reference/ScoreCommentCreation.md | 2 +- docs/reference/ScoreCommentUpdate.md | 2 +- docs/reference/ScoreCreation.md | 2 +- docs/reference/ScoreCreationBuilderData.md | 2 +- ...ataAllOfBuilderDataScoreDataInstruments.md | 4 +- docs/reference/ScoreCreationCommon.md | 2 +- docs/reference/ScoreCreationFileImport.md | 2 +- .../ScoreCreationGoogleDriveImport.md | 2 +- docs/reference/ScoreCreationType.md | 2 +- docs/reference/ScoreDetails.md | 10 +- docs/reference/ScorePrivacy.md | 2 +- docs/reference/ScoreRevisionCreation.md | 2 +- docs/reference/ScoreSource.md | 2 +- docs/reference/TaskApi.md | 8 +- docs/reference/TaskResult.md | 4 +- docs/reference/UserApi.md | 6 +- docs/reference/UserCommunityProfileLinks.md | 2 +- docs/reference/UserDetails.md | 10 +- .../reference/UserDetailsAdminAllOfLicense.md | 2 +- docs/reference/UserPublic.md | 8 +- flat_api/__init__.py | 10 +- flat_api/aio/__init__.py | 6 +- flat_api/aio/api/account_api.py | 4 +- flat_api/aio/api/class_api.py | 70 ++++---- flat_api/aio/api/collection_api.py | 22 +-- flat_api/aio/api/edu_resources_api.py | 22 +-- flat_api/aio/api/group_api.py | 16 +- flat_api/aio/api/omr_api.py | 16 +- flat_api/aio/api/organization_api.py | 39 +++-- flat_api/aio/api/score_api.py | 154 ++++++++--------- flat_api/aio/api/task_api.py | 16 +- flat_api/aio/api/user_api.py | 22 +-- flat_api/aio/api_client.py | 4 +- flat_api/aio/configuration.py | 6 +- flat_api/aio/exceptions.py | 4 +- flat_api/aio/models/__init__.py | 5 +- .../aio/models/add_group_user200_response.py | 4 +- flat_api/aio/models/add_group_user_request.py | 4 +- flat_api/aio/models/api_access_token.py | 8 +- flat_api/aio/models/app_scopes.py | 4 +- flat_api/aio/models/assignment.py | 10 +- .../aio/models/assignment_capabilities.py | 4 +- ...capabilities_can_publish_in_class_error.py | 4 +- flat_api/aio/models/assignment_copy.py | 4 +- .../aio/models/assignment_copy_response.py | 10 +- .../aio/models/assignment_copy_to_class.py | 6 +- .../assignment_copy_to_resource_library.py | 6 +- flat_api/aio/models/assignment_group.py | 4 +- flat_api/aio/models/assignment_submission.py | 6 +- .../models/assignment_submission_comment.py | 4 +- .../assignment_submission_comment_creation.py | 6 +- .../models/assignment_submission_comments.py | 4 +- .../models/assignment_submission_history.py | 4 +- ...ssignment_submission_history_attachment.py | 4 +- .../assignment_submission_history_state.py | 4 +- .../aio/models/assignment_submission_lti.py | 4 +- .../models/assignment_submission_playback.py | 4 +- .../aio/models/assignment_submission_state.py | 4 +- .../assignment_submission_students_mode.py | 4 +- .../models/assignment_submission_update.py | 8 +- flat_api/aio/models/assignment_type.py | 4 +- flat_api/aio/models/assignment_update.py | 10 +- flat_api/aio/models/class_assignment.py | 12 +- .../models/class_assignment_all_of_canvas.py | 6 +- .../aio/models/class_assignment_all_of_lti.py | 4 +- .../aio/models/class_assignment_all_of_mfc.py | 6 +- .../aio/models/class_assignment_update.py | 12 +- ...signment_update_all_of_google_classroom.py | 4 +- ...ssignment_update_all_of_microsoft_graph.py | 4 +- .../aio/models/class_attachment_creation.py | 10 +- flat_api/aio/models/class_creation.py | 4 +- flat_api/aio/models/class_details.py | 10 +- flat_api/aio/models/class_details_canvas.py | 6 +- flat_api/aio/models/class_details_clever.py | 4 +- .../models/class_details_google_classroom.py | 4 +- .../aio/models/class_details_google_drive.py | 4 +- flat_api/aio/models/class_details_issues.py | 4 +- .../models/class_details_issues_sync_inner.py | 4 +- flat_api/aio/models/class_details_lti.py | 4 +- flat_api/aio/models/class_details_mfc.py | 6 +- .../models/class_details_microsoft_graph.py | 4 +- flat_api/aio/models/class_grade_level.py | 4 +- flat_api/aio/models/class_roles.py | 4 +- flat_api/aio/models/class_state.py | 4 +- flat_api/aio/models/class_update.py | 4 +- flat_api/aio/models/collection.py | 6 +- flat_api/aio/models/collection_app.py | 4 +- .../aio/models/collection_capabilities.py | 4 +- flat_api/aio/models/collection_contents.py | 4 +- flat_api/aio/models/collection_creation.py | 4 +- .../aio/models/collection_modification.py | 4 +- flat_api/aio/models/collection_privacy.py | 4 +- flat_api/aio/models/collection_type.py | 6 +- .../create_lti_configuration200_response.py | 155 ------------------ flat_api/aio/models/credit_transaction.py | 4 +- flat_api/aio/models/edu_library.py | 6 +- flat_api/aio/models/edu_resource.py | 4 +- .../edu_resource_assignment_creation.py | 4 +- .../aio/models/edu_resource_capabilities.py | 4 +- flat_api/aio/models/edu_resource_copy.py | 6 +- flat_api/aio/models/edu_resource_creation.py | 6 +- flat_api/aio/models/edu_resource_folder.py | 6 +- flat_api/aio/models/edu_resource_lti_link.py | 6 +- flat_api/aio/models/edu_resource_move.py | 6 +- flat_api/aio/models/edu_resource_privacy.py | 4 +- flat_api/aio/models/edu_resource_resource.py | 4 +- flat_api/aio/models/edu_resource_type.py | 4 +- flat_api/aio/models/edu_resource_update.py | 4 +- .../aio/models/edu_resource_use_in_class.py | 6 +- flat_api/aio/models/flat_error_response.py | 6 +- .../aio/models/google_classroom_coursework.py | 4 +- .../aio/models/google_classroom_submission.py | 4 +- flat_api/aio/models/grade.py | 4 +- flat_api/aio/models/group.py | 4 +- flat_api/aio/models/group_creation.py | 4 +- flat_api/aio/models/group_details.py | 10 +- flat_api/aio/models/group_type.py | 6 +- flat_api/aio/models/license_mode.py | 4 +- flat_api/aio/models/license_sources.py | 4 +- flat_api/aio/models/lms_name.py | 4 +- flat_api/aio/models/lti_configuration.py | 5 +- flat_api/aio/models/lti_configuration1p1.py | 4 +- .../lti_configuration1p1_all_of_tool.py | 4 +- flat_api/aio/models/lti_configuration1p3.py | 4 +- .../aio/models/lti_configuration1p3_base.py | 4 +- ...onfiguration1p3_base_supported_services.py | 4 +- ...guration1p3_base_supported_services_ags.py | 6 +- ...p3_base_supported_services_deep_linking.py | 4 +- ...uration1p3_base_supported_services_nrps.py | 6 +- .../models/lti_configuration1p3_base_tool.py | 4 +- .../models/lti_configuration1p3_deployment.py | 4 +- .../models/lti_configuration1p3_dynamic.py | 4 +- .../aio/models/lti_configuration1p3_manual.py | 4 +- flat_api/aio/models/lti_configuration_base.py | 4 +- .../aio/models/lti_configuration_create.py | 4 +- .../aio/models/lti_configuration_create1p1.py | 4 +- .../lti_configuration_create1p3_deployment.py | 6 +- .../lti_configuration_create1p3_dynamic.py | 4 +- ...uration_create1p3_dynamic_platform_info.py | 4 +- .../lti_configuration_create1p3_manual.py | 4 +- .../aio/models/lti_configuration_update.py | 4 +- .../lti_configuration_update_deployment.py | 4 +- .../lti_configuration_update_standalone.py | 4 +- flat_api/aio/models/lti_credentials.py | 12 +- .../aio/models/lti_credentials_creation.py | 8 +- flat_api/aio/models/media_attachment.py | 16 +- .../aio/models/media_score_sharing_mode.py | 4 +- .../aio/models/microsoft_graph_assignment.py | 4 +- .../aio/models/microsoft_graph_submission.py | 4 +- flat_api/aio/models/omr_capabilities.py | 4 +- flat_api/aio/models/omr_details_step_data.py | 6 +- flat_api/aio/models/omr_details_submission.py | 4 +- .../aio/models/omr_detected_instrument.py | 4 +- flat_api/aio/models/omr_imported_metadata.py | 4 +- .../aio/models/omr_instrument_override.py | 4 +- flat_api/aio/models/omr_job.py | 10 +- flat_api/aio/models/omr_job_creation.py | 10 +- flat_api/aio/models/omr_job_file_metadata.py | 4 +- flat_api/aio/models/omr_job_file_upload.py | 4 +- .../aio/models/omr_job_file_upload_result.py | 4 +- flat_api/aio/models/omr_job_input_file.py | 4 +- flat_api/aio/models/omr_job_output.py | 4 +- flat_api/aio/models/omr_job_progress.py | 4 +- flat_api/aio/models/omr_job_result.py | 4 +- flat_api/aio/models/omr_job_retention.py | 6 +- flat_api/aio/models/omr_job_status.py | 6 +- flat_api/aio/models/omr_locale_details.py | 4 +- flat_api/aio/models/omr_pending_step.py | 4 +- flat_api/aio/models/omr_step_name.py | 6 +- .../aio/models/organization_invitation.py | 6 +- .../organization_invitation_creation.py | 4 +- flat_api/aio/models/organization_roles.py | 4 +- ...organization_user_access_token_creation.py | 4 +- flat_api/aio/models/rename_group_request.py | 4 +- flat_api/aio/models/resource_collaborator.py | 6 +- .../models/resource_collaborator_creation.py | 6 +- flat_api/aio/models/resource_rights.py | 4 +- flat_api/aio/models/score_comment.py | 14 +- flat_api/aio/models/score_comment_context.py | 10 +- flat_api/aio/models/score_comment_creation.py | 6 +- .../aio/models/score_comment_moderation.py | 4 +- flat_api/aio/models/score_comment_update.py | 6 +- flat_api/aio/models/score_comments_counts.py | 4 +- flat_api/aio/models/score_creation.py | 4 +- .../aio/models/score_creation_builder_data.py | 6 +- ...eation_builder_data_all_of_builder_data.py | 4 +- ...er_data_all_of_builder_data_layout_data.py | 4 +- ...der_data_all_of_builder_data_score_data.py | 4 +- ..._of_builder_data_score_data_instruments.py | 8 +- flat_api/aio/models/score_creation_common.py | 6 +- .../aio/models/score_creation_file_import.py | 6 +- .../score_creation_google_drive_import.py | 6 +- flat_api/aio/models/score_creation_type.py | 6 +- flat_api/aio/models/score_details.py | 14 +- .../aio/models/score_details_all_of_me.py | 4 +- flat_api/aio/models/score_fork.py | 4 +- flat_api/aio/models/score_license.py | 4 +- flat_api/aio/models/score_likes_counts.py | 4 +- flat_api/aio/models/score_modification.py | 4 +- flat_api/aio/models/score_plays_counts.py | 4 +- flat_api/aio/models/score_privacy.py | 6 +- flat_api/aio/models/score_revision.py | 4 +- .../aio/models/score_revision_creation.py | 6 +- .../aio/models/score_revision_statistics.py | 4 +- flat_api/aio/models/score_source.py | 6 +- flat_api/aio/models/score_summary.py | 4 +- flat_api/aio/models/score_track.py | 4 +- flat_api/aio/models/score_track_creation.py | 4 +- .../models/score_track_creation_response.py | 4 +- flat_api/aio/models/score_track_point.py | 4 +- flat_api/aio/models/score_track_purpose.py | 4 +- flat_api/aio/models/score_track_state.py | 4 +- flat_api/aio/models/score_track_type.py | 4 +- flat_api/aio/models/score_track_update.py | 4 +- flat_api/aio/models/score_views_counts.py | 4 +- flat_api/aio/models/task.py | 4 +- flat_api/aio/models/task_export_options.py | 4 +- flat_api/aio/models/task_progress.py | 4 +- flat_api/aio/models/task_result.py | 8 +- flat_api/aio/models/teaching_theme.py | 4 +- flat_api/aio/models/tutteo_product.py | 4 +- flat_api/aio/models/user_admin_update.py | 4 +- flat_api/aio/models/user_azure_details.py | 4 +- flat_api/aio/models/user_basics.py | 4 +- .../models/user_community_profile_links.py | 6 +- flat_api/aio/models/user_creation.py | 4 +- flat_api/aio/models/user_details.py | 14 +- flat_api/aio/models/user_details_admin.py | 4 +- .../user_details_admin_all_of_license.py | 6 +- flat_api/aio/models/user_public.py | 12 +- flat_api/aio/models/user_public_summary.py | 4 +- flat_api/aio/models/user_signin_link.py | 4 +- .../aio/models/user_signin_link_creation.py | 4 +- flat_api/aio/rest.py | 4 +- flat_api/api/account_api.py | 4 +- flat_api/api/class_api.py | 70 ++++---- flat_api/api/collection_api.py | 22 +-- flat_api/api/edu_resources_api.py | 22 +-- flat_api/api/group_api.py | 16 +- flat_api/api/omr_api.py | 16 +- flat_api/api/organization_api.py | 39 +++-- flat_api/api/score_api.py | 154 ++++++++--------- flat_api/api/task_api.py | 16 +- flat_api/api/user_api.py | 22 +-- flat_api/api_client.py | 4 +- flat_api/configuration.py | 6 +- flat_api/exceptions.py | 4 +- flat_api/models/__init__.py | 5 +- flat_api/models/add_group_user200_response.py | 4 +- flat_api/models/add_group_user_request.py | 4 +- flat_api/models/api_access_token.py | 8 +- flat_api/models/app_scopes.py | 4 +- flat_api/models/assignment.py | 10 +- flat_api/models/assignment_capabilities.py | 4 +- ...capabilities_can_publish_in_class_error.py | 4 +- flat_api/models/assignment_copy.py | 4 +- flat_api/models/assignment_copy_response.py | 10 +- flat_api/models/assignment_copy_to_class.py | 6 +- .../assignment_copy_to_resource_library.py | 6 +- flat_api/models/assignment_group.py | 4 +- flat_api/models/assignment_submission.py | 6 +- .../models/assignment_submission_comment.py | 4 +- .../assignment_submission_comment_creation.py | 6 +- .../models/assignment_submission_comments.py | 4 +- .../models/assignment_submission_history.py | 4 +- ...ssignment_submission_history_attachment.py | 4 +- .../assignment_submission_history_state.py | 4 +- flat_api/models/assignment_submission_lti.py | 4 +- .../models/assignment_submission_playback.py | 4 +- .../models/assignment_submission_state.py | 4 +- .../assignment_submission_students_mode.py | 4 +- .../models/assignment_submission_update.py | 8 +- flat_api/models/assignment_type.py | 4 +- flat_api/models/assignment_update.py | 10 +- flat_api/models/class_assignment.py | 12 +- .../models/class_assignment_all_of_canvas.py | 6 +- .../models/class_assignment_all_of_lti.py | 4 +- .../models/class_assignment_all_of_mfc.py | 6 +- flat_api/models/class_assignment_update.py | 12 +- ...signment_update_all_of_google_classroom.py | 4 +- ...ssignment_update_all_of_microsoft_graph.py | 4 +- flat_api/models/class_attachment_creation.py | 10 +- flat_api/models/class_creation.py | 4 +- flat_api/models/class_details.py | 10 +- flat_api/models/class_details_canvas.py | 6 +- flat_api/models/class_details_clever.py | 4 +- .../models/class_details_google_classroom.py | 4 +- flat_api/models/class_details_google_drive.py | 4 +- flat_api/models/class_details_issues.py | 4 +- .../models/class_details_issues_sync_inner.py | 4 +- flat_api/models/class_details_lti.py | 4 +- flat_api/models/class_details_mfc.py | 6 +- .../models/class_details_microsoft_graph.py | 4 +- flat_api/models/class_grade_level.py | 4 +- flat_api/models/class_roles.py | 4 +- flat_api/models/class_state.py | 4 +- flat_api/models/class_update.py | 4 +- flat_api/models/collection.py | 6 +- flat_api/models/collection_app.py | 4 +- flat_api/models/collection_capabilities.py | 4 +- flat_api/models/collection_contents.py | 4 +- flat_api/models/collection_creation.py | 4 +- flat_api/models/collection_modification.py | 4 +- flat_api/models/collection_privacy.py | 4 +- flat_api/models/collection_type.py | 6 +- .../create_lti_configuration200_response.py | 155 ------------------ flat_api/models/credit_transaction.py | 4 +- flat_api/models/edu_library.py | 6 +- flat_api/models/edu_resource.py | 4 +- .../edu_resource_assignment_creation.py | 4 +- flat_api/models/edu_resource_capabilities.py | 4 +- flat_api/models/edu_resource_copy.py | 6 +- flat_api/models/edu_resource_creation.py | 6 +- flat_api/models/edu_resource_folder.py | 6 +- flat_api/models/edu_resource_lti_link.py | 6 +- flat_api/models/edu_resource_move.py | 6 +- flat_api/models/edu_resource_privacy.py | 4 +- flat_api/models/edu_resource_resource.py | 4 +- flat_api/models/edu_resource_type.py | 4 +- flat_api/models/edu_resource_update.py | 4 +- flat_api/models/edu_resource_use_in_class.py | 6 +- flat_api/models/flat_error_response.py | 6 +- .../models/google_classroom_coursework.py | 4 +- .../models/google_classroom_submission.py | 4 +- flat_api/models/grade.py | 4 +- flat_api/models/group.py | 4 +- flat_api/models/group_creation.py | 4 +- flat_api/models/group_details.py | 10 +- flat_api/models/group_type.py | 6 +- flat_api/models/license_mode.py | 4 +- flat_api/models/license_sources.py | 4 +- flat_api/models/lms_name.py | 4 +- flat_api/models/lti_configuration.py | 5 +- flat_api/models/lti_configuration1p1.py | 4 +- .../lti_configuration1p1_all_of_tool.py | 4 +- flat_api/models/lti_configuration1p3.py | 4 +- flat_api/models/lti_configuration1p3_base.py | 4 +- ...onfiguration1p3_base_supported_services.py | 4 +- ...guration1p3_base_supported_services_ags.py | 6 +- ...p3_base_supported_services_deep_linking.py | 4 +- ...uration1p3_base_supported_services_nrps.py | 6 +- .../models/lti_configuration1p3_base_tool.py | 4 +- .../models/lti_configuration1p3_deployment.py | 4 +- .../models/lti_configuration1p3_dynamic.py | 4 +- .../models/lti_configuration1p3_manual.py | 4 +- flat_api/models/lti_configuration_base.py | 4 +- flat_api/models/lti_configuration_create.py | 4 +- .../models/lti_configuration_create1p1.py | 4 +- .../lti_configuration_create1p3_deployment.py | 6 +- .../lti_configuration_create1p3_dynamic.py | 4 +- ...uration_create1p3_dynamic_platform_info.py | 4 +- .../lti_configuration_create1p3_manual.py | 4 +- flat_api/models/lti_configuration_update.py | 4 +- .../lti_configuration_update_deployment.py | 4 +- .../lti_configuration_update_standalone.py | 4 +- flat_api/models/lti_credentials.py | 12 +- flat_api/models/lti_credentials_creation.py | 8 +- flat_api/models/media_attachment.py | 16 +- flat_api/models/media_score_sharing_mode.py | 4 +- flat_api/models/microsoft_graph_assignment.py | 4 +- flat_api/models/microsoft_graph_submission.py | 4 +- flat_api/models/omr_capabilities.py | 4 +- flat_api/models/omr_details_step_data.py | 6 +- flat_api/models/omr_details_submission.py | 4 +- flat_api/models/omr_detected_instrument.py | 4 +- flat_api/models/omr_imported_metadata.py | 4 +- flat_api/models/omr_instrument_override.py | 4 +- flat_api/models/omr_job.py | 10 +- flat_api/models/omr_job_creation.py | 10 +- flat_api/models/omr_job_file_metadata.py | 4 +- flat_api/models/omr_job_file_upload.py | 4 +- flat_api/models/omr_job_file_upload_result.py | 4 +- flat_api/models/omr_job_input_file.py | 4 +- flat_api/models/omr_job_output.py | 4 +- flat_api/models/omr_job_progress.py | 4 +- flat_api/models/omr_job_result.py | 4 +- flat_api/models/omr_job_retention.py | 6 +- flat_api/models/omr_job_status.py | 6 +- flat_api/models/omr_locale_details.py | 4 +- flat_api/models/omr_pending_step.py | 4 +- flat_api/models/omr_step_name.py | 6 +- flat_api/models/organization_invitation.py | 6 +- .../organization_invitation_creation.py | 4 +- flat_api/models/organization_roles.py | 4 +- ...organization_user_access_token_creation.py | 4 +- flat_api/models/rename_group_request.py | 4 +- flat_api/models/resource_collaborator.py | 6 +- .../models/resource_collaborator_creation.py | 6 +- flat_api/models/resource_rights.py | 4 +- flat_api/models/score_comment.py | 14 +- flat_api/models/score_comment_context.py | 10 +- flat_api/models/score_comment_creation.py | 6 +- flat_api/models/score_comment_moderation.py | 4 +- flat_api/models/score_comment_update.py | 6 +- flat_api/models/score_comments_counts.py | 4 +- flat_api/models/score_creation.py | 4 +- .../models/score_creation_builder_data.py | 6 +- ...eation_builder_data_all_of_builder_data.py | 4 +- ...er_data_all_of_builder_data_layout_data.py | 4 +- ...der_data_all_of_builder_data_score_data.py | 4 +- ..._of_builder_data_score_data_instruments.py | 8 +- flat_api/models/score_creation_common.py | 6 +- flat_api/models/score_creation_file_import.py | 6 +- .../score_creation_google_drive_import.py | 6 +- flat_api/models/score_creation_type.py | 6 +- flat_api/models/score_details.py | 14 +- flat_api/models/score_details_all_of_me.py | 4 +- flat_api/models/score_fork.py | 4 +- flat_api/models/score_license.py | 4 +- flat_api/models/score_likes_counts.py | 4 +- flat_api/models/score_modification.py | 4 +- flat_api/models/score_plays_counts.py | 4 +- flat_api/models/score_privacy.py | 6 +- flat_api/models/score_revision.py | 4 +- flat_api/models/score_revision_creation.py | 6 +- flat_api/models/score_revision_statistics.py | 4 +- flat_api/models/score_source.py | 6 +- flat_api/models/score_summary.py | 4 +- flat_api/models/score_track.py | 4 +- flat_api/models/score_track_creation.py | 4 +- .../models/score_track_creation_response.py | 4 +- flat_api/models/score_track_point.py | 4 +- flat_api/models/score_track_purpose.py | 4 +- flat_api/models/score_track_state.py | 4 +- flat_api/models/score_track_type.py | 4 +- flat_api/models/score_track_update.py | 4 +- flat_api/models/score_views_counts.py | 4 +- flat_api/models/task.py | 4 +- flat_api/models/task_export_options.py | 4 +- flat_api/models/task_progress.py | 4 +- flat_api/models/task_result.py | 8 +- flat_api/models/teaching_theme.py | 4 +- flat_api/models/tutteo_product.py | 4 +- flat_api/models/user_admin_update.py | 4 +- flat_api/models/user_azure_details.py | 4 +- flat_api/models/user_basics.py | 4 +- .../models/user_community_profile_links.py | 6 +- flat_api/models/user_creation.py | 4 +- flat_api/models/user_details.py | 14 +- flat_api/models/user_details_admin.py | 4 +- .../user_details_admin_all_of_license.py | 6 +- flat_api/models/user_public.py | 12 +- flat_api/models/user_public_summary.py | 4 +- flat_api/models/user_signin_link.py | 4 +- flat_api/models/user_signin_link_creation.py | 4 +- flat_api/rest.py | 4 +- 506 files changed, 1631 insertions(+), 1970 deletions(-) delete mode 100644 docs/reference/CreateLtiConfiguration200Response.md delete mode 100644 flat_api/aio/models/create_lti_configuration200_response.py delete mode 100644 flat_api/models/create_lti_configuration200_response.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d93f826..e808f57 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -74,7 +74,6 @@ flat_api/docs/CollectionCreation.md flat_api/docs/CollectionModification.md flat_api/docs/CollectionPrivacy.md flat_api/docs/CollectionType.md -flat_api/docs/CreateLtiConfiguration200Response.md flat_api/docs/CreditTransaction.md flat_api/docs/EduLibrary.md flat_api/docs/EduResource.md @@ -280,7 +279,6 @@ flat_api/models/collection_creation.py flat_api/models/collection_modification.py flat_api/models/collection_privacy.py flat_api/models/collection_type.py -flat_api/models/create_lti_configuration200_response.py flat_api/models/credit_transaction.py flat_api/models/edu_library.py flat_api/models/edu_resource.py @@ -482,7 +480,6 @@ flat_api/test/test_collection_creation.py flat_api/test/test_collection_modification.py flat_api/test/test_collection_privacy.py flat_api/test/test_collection_type.py -flat_api/test/test_create_lti_configuration200_response.py flat_api/test/test_credit_transaction.py flat_api/test/test_edu_library.py flat_api/test/test_edu_resource.py diff --git a/OPERATIONS.json b/OPERATIONS.json index 5e16041..7eb305b 100644 --- a/OPERATIONS.json +++ b/OPERATIONS.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "spec_version": "2.26.0", + "spec_version": "2.26.2", "generator": { "name": "python", "version": "7.24.0" @@ -474,7 +474,7 @@ "operation_id": "getGroupScores", "method": "get", "path": "/groups/{group}/scores", - "symbol": "score_api.get_group_scores", + "symbol": "group_api.get_group_scores", "paginated": false, "documented": true }, @@ -634,7 +634,7 @@ "operation_id": "getUserLikes", "method": "get", "path": "/users/{user}/likes", - "symbol": "user_api.get_user_likes", + "symbol": "score_api.get_user_likes", "paginated": true, "documented": true }, @@ -642,7 +642,7 @@ "operation_id": "getUserScores", "method": "get", "path": "/users/{user}/scores", - "symbol": "user_api.get_user_scores", + "symbol": "score_api.get_user_scores", "paginated": true, "documented": true }, @@ -1049,7 +1049,6 @@ "CollectionModification", "CollectionPrivacy", "CollectionType", - "CreateLtiConfiguration200Response", "CreditTransaction", "EduLibrary", "EduResource", diff --git a/VERSION b/VERSION index 38f77a6..e9307ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.1 +2.0.2 diff --git a/docs/reference/ApiAccessToken.md b/docs/reference/ApiAccessToken.md index 14d1422..8f4161e 100644 --- a/docs/reference/ApiAccessToken.md +++ b/docs/reference/ApiAccessToken.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **id** | **str** | Unique identifier of this private token | [optional] **name** | **str** | Name of the personal access token | [optional] **token** | **str** | The token. This token will only be returned once, then only the first 4 characters will be returned. | [optional] -**issued_date** | **datetime** | The date then this token was issued | [optional] -**expiration_date** | **datetime** | The date then this token will expire | [optional] +**issued_date** | **datetime** | The date when this token was issued | [optional] +**expiration_date** | **datetime** | The date when this token will expire | [optional] **scopes** | [**List[AppScopes]**](AppScopes.md) | The list of scopes associated to the token | [optional] ## Example diff --git a/docs/reference/Assignment.md b/docs/reference/Assignment.md index 9b2bc79..387db53 100644 --- a/docs/reference/Assignment.md +++ b/docs/reference/Assignment.md @@ -18,11 +18,11 @@ Name | Type | Description | Notes **cover_file** | **str** | The id of the cover to display | [optional] **attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] diff --git a/docs/reference/AssignmentCopy.md b/docs/reference/AssignmentCopy.md index 2becab4..7fcbbd8 100644 --- a/docs/reference/AssignmentCopy.md +++ b/docs/reference/AssignmentCopy.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **classroom** | **str** | The destination classroom where the assignment will be copied | -**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**assignment** | **str** | An optional destination assignment where the original assignment will be copied. Must be a draft. | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] -**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | +**library_parent** | **str** | Identifier of the parent resource where the new one will be created, e.g. a folder id or `root` | **verify_if_not_already_in_resource_library** | **bool** | Option to check if the assignment is already in Resource Library | [optional] ## Example diff --git a/docs/reference/AssignmentCopyResponse.md b/docs/reference/AssignmentCopyResponse.md index 32e16f0..ebba3fb 100644 --- a/docs/reference/AssignmentCopyResponse.md +++ b/docs/reference/AssignmentCopyResponse.md @@ -17,11 +17,11 @@ Name | Type | Description | Notes **cover_file** | **str** | The id of the cover to display | [optional] **attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] diff --git a/docs/reference/AssignmentCopyToClass.md b/docs/reference/AssignmentCopyToClass.md index d964d93..09e2506 100644 --- a/docs/reference/AssignmentCopyToClass.md +++ b/docs/reference/AssignmentCopyToClass.md @@ -7,7 +7,7 @@ Copy the assignment to a class Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **classroom** | **str** | The destination classroom where the assignment will be copied | -**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**assignment** | **str** | An optional destination assignment where the original assignment will be copied. Must be a draft. | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. | [optional] ## Example diff --git a/docs/reference/AssignmentCopyToResourceLibrary.md b/docs/reference/AssignmentCopyToResourceLibrary.md index 2eab45e..5edadaf 100644 --- a/docs/reference/AssignmentCopyToResourceLibrary.md +++ b/docs/reference/AssignmentCopyToResourceLibrary.md @@ -6,7 +6,7 @@ Copy the assignment to the EDU Resource Library Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**library_parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | +**library_parent** | **str** | Identifier of the parent resource where the new one will be created, e.g. a folder id or `root` | **verify_if_not_already_in_resource_library** | **bool** | Option to check if the assignment is already in Resource Library | [optional] ## Example diff --git a/docs/reference/AssignmentSubmission.md b/docs/reference/AssignmentSubmission.md index 64a4665..521f3af 100644 --- a/docs/reference/AssignmentSubmission.md +++ b/docs/reference/AssignmentSubmission.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **return_date** | **str** | The date when the teacher returned the work | [optional] **return_creator** | **str** | The User unique identifier of the teacher who returned the submission | [optional] **grade** | **float** | Optional grade. If unset, no grade was set. | [optional] -**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission | [optional] **max_points** | **float** | Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set. | [optional] **exercises_ids** | **List[str]** | The ids of exercises when they need to be in a specific order | [optional] **playback** | [**List[AssignmentSubmissionPlayback]**](AssignmentSubmissionPlayback.md) | | diff --git a/docs/reference/AssignmentSubmissionCommentCreation.md b/docs/reference/AssignmentSubmissionCommentCreation.md index 9956c8b..86888a0 100644 --- a/docs/reference/AssignmentSubmissionCommentCreation.md +++ b/docs/reference/AssignmentSubmissionCommentCreation.md @@ -1,6 +1,6 @@ # AssignmentSubmissionCommentCreation -Creation of a assignment submission comment +Creation of an assignment submission comment ## Properties diff --git a/docs/reference/AssignmentSubmissionUpdate.md b/docs/reference/AssignmentSubmissionUpdate.md index 57c1166..e275d56 100644 --- a/docs/reference/AssignmentSubmissionUpdate.md +++ b/docs/reference/AssignmentSubmissionUpdate.md @@ -9,10 +9,10 @@ Name | Type | Description | Notes **attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | | [optional] **playback** | [**List[AssignmentSubmissionPlayback]**](AssignmentSubmissionPlayback.md) | | [optional] **submit** | **bool** | If `true`, the submission will be marked as done | [optional] -**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission | [optional] +**draft_grade** | **float** | Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission | [optional] **grade** | **float** | Optional grade. If unset, no grade was set. | [optional] **exercises_ids** | **List[str]** | The ids of exercises when they need to be in a specific order | [optional] -**var_return** | **bool** | If `true`, the submission will be marked as done | [optional] +**var_return** | **bool** | If `true`, the submission will be returned to the student (teachers only) | [optional] ## Example diff --git a/docs/reference/AssignmentUpdate.md b/docs/reference/AssignmentUpdate.md index 8de92e4..e405e48 100644 --- a/docs/reference/AssignmentUpdate.md +++ b/docs/reference/AssignmentUpdate.md @@ -13,15 +13,15 @@ Name | Type | Description | Notes **teacher_instructions** | **str** | Teacher-only instructions (plain text) | [optional] **teacher_instructions_html** | **str** | HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] **attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] **cover_file** | **str** | The id of the cover to display | [optional] **cover** | **str** | The URL of the cover to display | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment with this value as the maximum of points | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] **recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] **allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] diff --git a/docs/reference/ClassApi.md b/docs/reference/ClassApi.md index 94a9039..f73eaaa 100644 --- a/docs/reference/ClassApi.md +++ b/docs/reference/ClassApi.md @@ -125,7 +125,7 @@ This method can be used by a teacher of the class to enroll another Flat user in Only users that are part of your Organization can be enrolled in a class of this same Organization. -When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. +When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. ### Example @@ -280,7 +280,7 @@ Name | Type | Description | Notes Archive the class -Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. +Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. ### Example @@ -447,9 +447,9 @@ Classrooms on Flat allow you to create activities with assignments and post cont When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. -If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. +If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. -You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. +You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. ### Example @@ -611,7 +611,7 @@ Name | Type | Description | Notes Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. -Students can only set `attachments` and `submit`. +Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. @@ -694,7 +694,7 @@ Name | Type | Description | Notes Create a test student account -Test students account can be created by teachers an admin and be used to experiment the assignments. +Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). @@ -863,7 +863,7 @@ void (empty response body) Remove a user from the class -This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. +This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. @@ -941,7 +941,7 @@ void (empty response body) Reset a submission -Use this method as a teacher to reset a submission and allow student to start over the assignment +Use this method as a teacher to reset a submission and allow the student to start the assignment over ### Example @@ -1099,8 +1099,8 @@ void (empty response body) Edit a submission -Use this method as a teacher to update the different submission and give feedback. -Teachers can only set `return`, `draftGrade` and `grade` +Use this method as a teacher to update a submission and give feedback. +Teachers can only set `return`, `draftGrade` and `grade`. ### Example @@ -1184,9 +1184,9 @@ Name | Type | Description | Notes Join a class -Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. +Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. -Flat will automatically add the user to the corresponding class group based on this role in the organization. +Flat will automatically add the user to the corresponding class group based on their role in the organization. ### Example @@ -1574,7 +1574,7 @@ Name | Type | Description | Notes 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. +This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. ### Example @@ -1797,7 +1797,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The comments of the score | - | +**200** | The comments of the submission | - | **403** | Not granted to access to this submission | - | **404** | Submission not found | - | **0** | Error | - | @@ -2357,7 +2357,7 @@ Name | Type | Description | Notes Unarchive the class -Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. +Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. ### Example diff --git a/docs/reference/ClassAssignment.md b/docs/reference/ClassAssignment.md index 83d60d9..72d7137 100644 --- a/docs/reference/ClassAssignment.md +++ b/docs/reference/ClassAssignment.md @@ -17,11 +17,11 @@ Name | Type | Description | Notes **cover_file** | **str** | The id of the cover to display | [optional] **attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] @@ -35,7 +35,7 @@ Name | Type | Description | Notes **classroom** | **str** | The unique identifier of the class where this assignment was posted | [optional] **creation_date** | **datetime** | The creation date of this assignment | **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as past due. | [optional] **assignee_mode** | **str** | Possible modes of assigning assignments | [optional] **assigned_students** | **List[str]** | Identifiers for the students that have access to the assignment | [optional] **assigned_groups** | [**List[AssignmentGroup]**](AssignmentGroup.md) | Groups that have access to the assignment (for shared writing assignments) | [optional] diff --git a/docs/reference/ClassAssignmentAllOfCanvas.md b/docs/reference/ClassAssignmentAllOfCanvas.md index 31a09c1..239a0f0 100644 --- a/docs/reference/ClassAssignmentAllOfCanvas.md +++ b/docs/reference/ClassAssignmentAllOfCanvas.md @@ -6,7 +6,7 @@ A Canvas LMS assignment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on Canvas assignment | [optional] +**id** | **str** | Unique identifier of the assignment on Canvas | [optional] **alternate_link** | **str** | Link to Canvas assignment | [optional] ## Example diff --git a/docs/reference/ClassAssignmentAllOfMfc.md b/docs/reference/ClassAssignmentAllOfMfc.md index 7347513..624b7f0 100644 --- a/docs/reference/ClassAssignmentAllOfMfc.md +++ b/docs/reference/ClassAssignmentAllOfMfc.md @@ -6,7 +6,7 @@ A MusicFirst Classroom assignment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier of the course on MusicFirst Task | [optional] +**id** | **str** | Unique identifier of the task on MusicFirst Classroom | [optional] **alternate_link** | **str** | Link to MusicFirst Classroom task | [optional] ## Example diff --git a/docs/reference/ClassAssignmentUpdate.md b/docs/reference/ClassAssignmentUpdate.md index 222228a..1166729 100644 --- a/docs/reference/ClassAssignmentUpdate.md +++ b/docs/reference/ClassAssignmentUpdate.md @@ -12,15 +12,15 @@ Name | Type | Description | Notes **teacher_instructions** | **str** | Teacher-only instructions (plain text) | [optional] **teacher_instructions_html** | **str** | HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. | [optional] **attachments** | [**List[ClassAttachmentCreation]**](ClassAttachmentCreation.md) | The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **toolset** | **str** | The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. | [optional] **cover_file** | **str** | The id of the cover to display | [optional] **cover** | **str** | The URL of the cover to display | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement with this value as the maximum of points | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment with this value as the maximum of points | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] **recording_type** | **str** | For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. | [optional] **allow_metronome** | **bool** | For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. | [optional] @@ -28,7 +28,7 @@ Name | Type | Description | Notes **allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] **free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] **state** | **str** | State of the assignment | [optional] -**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. | [optional] +**due_date** | **datetime** | The due date of this assignment, late submissions will be marked as past due. If not set, the assignment won't have a due date. | [optional] **scheduled_date** | **datetime** | The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. | [optional] **google_classroom** | [**ClassAssignmentUpdateAllOfGoogleClassroom**](ClassAssignmentUpdateAllOfGoogleClassroom.md) | | [optional] **microsoft_graph** | [**ClassAssignmentUpdateAllOfMicrosoftGraph**](ClassAssignmentUpdateAllOfMicrosoftGraph.md) | | [optional] diff --git a/docs/reference/ClassAttachmentCreation.md b/docs/reference/ClassAttachmentCreation.md index 4d73e3e..d1aa4e1 100644 --- a/docs/reference/ClassAttachmentCreation.md +++ b/docs/reference/ClassAttachmentCreation.md @@ -1,6 +1,6 @@ # ClassAttachmentCreation -Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. +Attachment creation for an assignment or stream post. This attachment must contain a `score` or a `url`; its details are resolved and returned as a `MediaAttachment` once the assignment or stream post is created. ## Properties @@ -8,8 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | The type of the attachment posted: * `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] **score** | **str** | A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. | [optional] -**worksheet** | **str** | An unique worksheet identifier | [optional] -**revision** | **str** | An unique revision identifier of a score | [optional] +**worksheet** | **str** | A unique worksheet identifier | [optional] +**revision** | **str** | A unique revision identifier of a score | [optional] **part_uuid** | **str** | The UUID of the instrument part selected for this attachment (for performance submissions) | [optional] **sharing_mode** | [**MediaScoreSharingMode**](MediaScoreSharingMode.md) | | [optional] [default to MediaScoreSharingMode.READ] **lock_score_template** | **bool** | To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template. | [optional] diff --git a/docs/reference/ClassDetails.md b/docs/reference/ClassDetails.md index 38ec572..b5fa261 100644 --- a/docs/reference/ClassDetails.md +++ b/docs/reference/ClassDetails.md @@ -10,13 +10,13 @@ Name | Type | Description | Notes **state** | [**ClassState**](ClassState.md) | | **name** | **str** | The name of the class | **section** | **str** | The section of the class | [optional] -**description** | **str** | An optionnal description for this class | [optional] +**description** | **str** | An optional description for this class | [optional] **organization** | **str** | The unique identifier of the Organization owning this class | [optional] **owner** | **str** | The unique identifier of the User owning this class | [optional] -**creation_date** | **datetime** | The date when the class was create | +**creation_date** | **datetime** | The date when the class was created | **modification_date** | **datetime** | The date when the class was last modified | [optional] **enrollment_code** | **str** | [Teachers only] The enrollment code that can be used by the students to join the class | [optional] -**theme** | **str** | The theme identifier using in Flat User Interface | [optional] +**theme** | **str** | The theme identifier used in the Flat user interface | [optional] **assignments_count** | **float** | The number of assignments created in the class | [optional] **students_group** | [**GroupDetails**](GroupDetails.md) | | [optional] **teachers_group** | [**GroupDetails**](GroupDetails.md) | | [optional] diff --git a/docs/reference/ClassDetailsCanvas.md b/docs/reference/ClassDetailsCanvas.md index b77e052..46fc033 100644 --- a/docs/reference/ClassDetailsCanvas.md +++ b/docs/reference/ClassDetailsCanvas.md @@ -1,6 +1,6 @@ # ClassDetailsCanvas -Meta information provided by Canvs LMS +Meta information provided by Canvas LMS ## Properties diff --git a/docs/reference/ClassDetailsMfc.md b/docs/reference/ClassDetailsMfc.md index 55e8ea3..f5883a6 100644 --- a/docs/reference/ClassDetailsMfc.md +++ b/docs/reference/ClassDetailsMfc.md @@ -1,6 +1,6 @@ # ClassDetailsMfc -Meta information provided by Canvs LMS +Meta information provided by MusicFirst Classroom ## Properties diff --git a/docs/reference/Collection.md b/docs/reference/Collection.md index 6c57507..102a478 100644 --- a/docs/reference/Collection.md +++ b/docs/reference/Collection.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **is_pinned** | **bool** | Whether the collection is pinned by the owner | [optional] **contents** | [**CollectionContents**](CollectionContents.md) | | **capabilities** | [**CollectionCapabilities**](CollectionCapabilities.md) | | -**collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**collections** | **List[str]** | The list of parent collections this score is included in. Please note that you might not have access to all of them. | [optional] ## Example diff --git a/docs/reference/CollectionApi.md b/docs/reference/CollectionApi.md index fedd5d9..bb1daed 100644 --- a/docs/reference/CollectionApi.md +++ b/docs/reference/CollectionApi.md @@ -259,7 +259,7 @@ void (empty response body) Delete a score from the collection -This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. +This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. @@ -291,7 +291,7 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.CollectionApi(api_client) collection = 'collection_example' # str | Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted score = 'score_example' # str | 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`). - event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) sharing_key = 'sharing_key_example' # str | 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) try: @@ -310,7 +310,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection** | **str**| Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted | **score** | **str**| 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`). | - **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] + **event_properties** | **str**| Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] **sharing_key** | **str**| 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] ### Return type diff --git a/docs/reference/CollectionType.md b/docs/reference/CollectionType.md index 7d329fd..4274c84 100644 --- a/docs/reference/CollectionType.md +++ b/docs/reference/CollectionType.md @@ -1,6 +1,6 @@ # CollectionType -Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores +Type of the collection. The type will influence the capabilities available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores ## Enum diff --git a/docs/reference/CreateLtiConfiguration200Response.md b/docs/reference/CreateLtiConfiguration200Response.md deleted file mode 100644 index aa21da1..0000000 --- a/docs/reference/CreateLtiConfiguration200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateLtiConfiguration200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**registration_url** | **str** | One-time registration URL (only for dynamic registration) | [optional] - -## Example - -```python -from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateLtiConfiguration200Response from a JSON string -create_lti_configuration200_response_instance = CreateLtiConfiguration200Response.from_json(json) -# print the JSON string representation of the object -print(CreateLtiConfiguration200Response.to_json()) - -# convert the object into a dict -create_lti_configuration200_response_dict = create_lti_configuration200_response_instance.to_dict() -# create an instance of CreateLtiConfiguration200Response from a dict -create_lti_configuration200_response_from_dict = CreateLtiConfiguration200Response.from_dict(create_lti_configuration200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/reference/EduLibrary.md b/docs/reference/EduLibrary.md index 8bc6f18..6a36073 100644 --- a/docs/reference/EduLibrary.md +++ b/docs/reference/EduLibrary.md @@ -7,7 +7,7 @@ A Flat for Education Library Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` | -**name** | **str** | Name of the lirbary | +**name** | **str** | Name of the library | **type** | **str** | Type of the library | **visibility** | **str** | Visibility of the library | diff --git a/docs/reference/EduResourceCopy.md b/docs/reference/EduResourceCopy.md index e42d39c..3b144fb 100644 --- a/docs/reference/EduResourceCopy.md +++ b/docs/reference/EduResourceCopy.md @@ -6,7 +6,7 @@ Copy an education resource Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**destination** | **str** | Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. | +**destination** | **str** | Unique identifier of the destination folder for the copy. This can also be `root` to copy the resource at the root of the user resource library. | ## Example diff --git a/docs/reference/EduResourceCreation.md b/docs/reference/EduResourceCreation.md index 4903a20..939ceaf 100644 --- a/docs/reference/EduResourceCreation.md +++ b/docs/reference/EduResourceCreation.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**EduResourceType**](EduResourceType.md) | | **title** | **str** | Title of the resource | -**parent** | **str** | Identifier of the parent resource where the new one will created, e.g. a folder id or `root` | [optional] [default to 'root'] +**parent** | **str** | Identifier of the parent resource where the new one will be created, e.g. a folder id or `root` | [optional] [default to 'root'] **sharing_description** | **str** | Sharing description of the resource | [optional] **sharing_description_html** | **str** | HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. | [optional] **resource** | [**EduResourceAssignmentCreation**](EduResourceAssignmentCreation.md) | | [optional] diff --git a/docs/reference/EduResourceFolder.md b/docs/reference/EduResourceFolder.md index 0db18e5..ff8ffb1 100644 --- a/docs/reference/EduResourceFolder.md +++ b/docs/reference/EduResourceFolder.md @@ -7,7 +7,7 @@ Education resources folder Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Title of the folder | [optional] -**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment type of the resources that are included in the folder, | [optional] +**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment types of the resources included in the folder | [optional] **resources_count** | **float** | The number of resources inside the folder | [optional] ## Example diff --git a/docs/reference/EduResourceLtiLink.md b/docs/reference/EduResourceLtiLink.md index 08efc2e..aec5b91 100644 --- a/docs/reference/EduResourceLtiLink.md +++ b/docs/reference/EduResourceLtiLink.md @@ -6,7 +6,7 @@ LTI Link details for the class Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lti_url** | **str** | An URL that can be used to launch LTI with this resource in a classroom. | +**lti_url** | **str** | A URL that can be used to launch LTI with this resource in a classroom. | ## Example diff --git a/docs/reference/EduResourceMove.md b/docs/reference/EduResourceMove.md index 618516a..873d814 100644 --- a/docs/reference/EduResourceMove.md +++ b/docs/reference/EduResourceMove.md @@ -6,7 +6,7 @@ Move an education resource Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**destination** | **str** | Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. | +**destination** | **str** | Unique identifier of the destination folder for this resource. This can also be `root` to move the resource at the root of the user resource library. | ## Example diff --git a/docs/reference/EduResourceResource.md b/docs/reference/EduResourceResource.md index a435239..1966f22 100644 --- a/docs/reference/EduResourceResource.md +++ b/docs/reference/EduResourceResource.md @@ -17,11 +17,11 @@ Name | Type | Description | Notes **cover_file** | **str** | The id of the cover to display | [optional] **attachments** | [**List[MediaAttachment]**](MediaAttachment.md) | Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. | **use_dedicated_attachments** | **bool** | For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. | [optional] -**max_points** | **float** | If set, the grading will be enabled for the assignement | [optional] +**max_points** | **float** | If set, the grading will be enabled for the assignment | [optional] **release_grades** | **str** | For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions | [optional] -**shuffle_exercises** | **bool** | Mixing worksheets exercises for each student | [optional] +**shuffle_exercises** | **bool** | Shuffle the worksheet exercises for each student | [optional] **toolset** | **str** | The id of the associated toolset | [optional] -**nb_playback_authorized** | **float** | The number of playback authorized on the scores of the assignment. | [optional] +**nb_playback_authorized** | **float** | The number of playbacks authorized on the scores of the assignment. | [optional] **restrict_play_note** | **bool** | Restrict the ability to get an audio feedback every time a student adds or selects a note. | [optional] **restrict_to_audio_tracks** | **bool** | Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback. | [optional] **submission_students_mode** | [**AssignmentSubmissionStudentsMode**](AssignmentSubmissionStudentsMode.md) | | [optional] @@ -30,7 +30,7 @@ Name | Type | Description | Notes **allow_backing_track** | **bool** | For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'. | [optional] **allow_speed_change** | **bool** | For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. | [optional] **free_record** | **bool** | For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. | [optional] -**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment type of the resources that are included in the folder, | [optional] +**assignments_types** | [**List[AssignmentType]**](AssignmentType.md) | The assignment types of the resources included in the folder | [optional] **resources_count** | **float** | The number of resources inside the folder | [optional] ## Example diff --git a/docs/reference/EduResourceUseInClass.md b/docs/reference/EduResourceUseInClass.md index 6552440..03c05ea 100644 --- a/docs/reference/EduResourceUseInClass.md +++ b/docs/reference/EduResourceUseInClass.md @@ -7,7 +7,7 @@ Use an education resource in class Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **classroom** | **str** | The destination classroom where the resource will be copied. | -**assignment** | **str** | An optional destination assignment where the original assignement will be copied. Must be a draft. | [optional] +**assignment** | **str** | An optional destination assignment where the original assignment will be copied. Must be a draft. | [optional] ## Example diff --git a/docs/reference/EduResourcesApi.md b/docs/reference/EduResourcesApi.md index ba4f5c7..2f11ee0 100644 --- a/docs/reference/EduResourcesApi.md +++ b/docs/reference/EduResourcesApi.md @@ -581,7 +581,7 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.EduResourcesApi(api_client) parent = 'root' # str | List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization (optional) (default to 'root') - without_subfolders_resources = True # bool | For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. (optional) + without_subfolders_resources = True # bool | For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. (optional) type = 'type_example' # str | Filter the returned resources by type (optional) subjects = [flat_api.TeachingTheme()] # List[TeachingTheme] | Filter the returned resources by subjects (optional) assignment_types = [flat_api.AssignmentType()] # List[AssignmentType] | Filter the returned resources by assignment types (optional) @@ -609,7 +609,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **parent** | **str**| List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization | [optional] [default to 'root'] - **without_subfolders_resources** | **bool**| For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. | [optional] + **without_subfolders_resources** | **bool**| For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. | [optional] **type** | **str**| Filter the returned resources by type | [optional] **subjects** | [**List[TeachingTheme]**](TeachingTheme.md)| Filter the returned resources by subjects | [optional] **assignment_types** | [**List[AssignmentType]**](AssignmentType.md)| Filter the returned resources by assignment types | [optional] @@ -724,7 +724,7 @@ Name | Type | Description | Notes Update an education resource metadata -Update any resources metadata (e.g. title). +Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. diff --git a/docs/reference/FlatErrorResponse.md b/docs/reference/FlatErrorResponse.md index 39a64b0..809122e 100644 --- a/docs/reference/FlatErrorResponse.md +++ b/docs/reference/FlatErrorResponse.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | A corresponding code for this error | **message** | **str** | A printable message for this error | -**id** | **str** | An unique error identifier generated for the request | [optional] +**id** | **str** | A unique error identifier generated for the request | [optional] **param** | **str** | The related parameter that caused the error | [optional] **provider_message** | **str** | The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. | [optional] diff --git a/docs/reference/GroupApi.md b/docs/reference/GroupApi.md index 8047740..477fa60 100644 --- a/docs/reference/GroupApi.md +++ b/docs/reference/GroupApi.md @@ -364,7 +364,7 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.GroupApi(api_client) group = 'group_example' # str | Unique identifier of a Flat group - parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) + parent = 'parent_example' # str | Only return the scores forked from the score `parent` (optional) try: # List group's scores @@ -383,7 +383,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **parent** | **str**| Only return the scores forked from the score `parent` | [optional] ### Return type @@ -479,7 +479,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The list of users member of the group | - | +**200** | The users who are members of the group | - | **404** | Not Found - Group not found or insufficient permissions | - | **0** | Error | - | diff --git a/docs/reference/GroupDetails.md b/docs/reference/GroupDetails.md index 1a89487..dbd1c0d 100644 --- a/docs/reference/GroupDetails.md +++ b/docs/reference/GroupDetails.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes **name** | **str** | The displayable name of the group | **type** | [**GroupType**](GroupType.md) | | **organization** | **str** | The unique identifier of the Organization owning the group | [optional] -**classroom** | **str** | The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup' | [optional] +**classroom** | **str** | The unique identifier of the classroom owning the group. Only available for groups of type 'classStudentsSubGroup' or 'assignmentStudentsSubGroup' | [optional] **assignment** | **str** | The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'. | [optional] **parent** | **str** | The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted. | [optional] -**creation_date** | **datetime** | The date when the group was create | +**creation_date** | **datetime** | The date when the group was created | **users_count** | **float** | The number of students in this group | -**read_only** | **bool** | `true` if the properties and members of this group are in in read-only | +**read_only** | **bool** | `true` if the properties and members of this group are read-only | **tags** | **List[str]** | Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts | ## Example diff --git a/docs/reference/GroupType.md b/docs/reference/GroupType.md index a341904..e8fe3fa 100644 --- a/docs/reference/GroupType.md +++ b/docs/reference/GroupType.md @@ -1,6 +1,6 @@ # GroupType -The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. +The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automatically by Flat that contains the teachers of a class * `classStudents`: A group created automatically by Flat that contains the students of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. ## Enum diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md b/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md index ed0789e..4c65439 100644 --- a/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServicesAgs.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **available** | **bool** | Whether AGS claims were detected in launches from this platform | [optional] **version** | **str** | AGS version supported (e.g., \"2.0\") | [optional] -**enabled** | **bool** | Whether we have AGS enabled for this platform | [optional] +**enabled** | **bool** | Whether AGS is enabled for this platform | [optional] **lineitems_url** | **str** | Base URL for line items operations as provided by the platform | [optional] ## Example diff --git a/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md b/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md index d5b44c2..5533062 100644 --- a/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md +++ b/docs/reference/LtiConfiguration1p3BaseSupportedServicesNrps.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **available** | **bool** | Whether NRPS claims were detected in launches from this platform | [optional] **version** | **str** | NRPS version supported (e.g., \"2.0\") | [optional] -**enabled** | **bool** | Whether we have NRPS enabled for this platform | [optional] +**enabled** | **bool** | Whether NRPS is enabled for this platform | [optional] ## Example diff --git a/docs/reference/LtiConfigurationCreate.md b/docs/reference/LtiConfigurationCreate.md index a8ab2a7..09299a2 100644 --- a/docs/reference/LtiConfigurationCreate.md +++ b/docs/reference/LtiConfigurationCreate.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **lms** | **str** | LMS identifier for LTI 1.1 credentials | [optional] **platform_info** | [**LtiConfigurationCreate1p3DynamicPlatformInfo**](LtiConfigurationCreate1p3DynamicPlatformInfo.md) | | [optional] **locale** | **str** | Optional locale code for registration URL. Input values will be automatically normalized to a supported locale code. | [optional] -**deployment_type** | **str** | Parent platform key (e.g., canvas, blackboard, schoology, classlink) | +**deployment_type** | **str** | Parent platform key (e.g., blackboard, schoology, classlink, manabipocket, manabipocket-stg) | **deployment_id** | **str** | Deployment identifier provided by the platform | **client_id** | **str** | OAuth2 client_id allocated by the platform | [optional] **deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology) | [optional] diff --git a/docs/reference/LtiConfigurationCreate1p3Deployment.md b/docs/reference/LtiConfigurationCreate1p3Deployment.md index 8999622..fe274f2 100644 --- a/docs/reference/LtiConfigurationCreate1p3Deployment.md +++ b/docs/reference/LtiConfigurationCreate1p3Deployment.md @@ -7,7 +7,7 @@ LTI 1.3 deployment-based configuration creation Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mode** | **str** | LTI 1.3 deployment-based creation mode | -**deployment_type** | **str** | Parent platform key (e.g., canvas, blackboard, schoology, classlink) | +**deployment_type** | **str** | Parent platform key (e.g., blackboard, schoology, classlink, manabipocket, manabipocket-stg) | **deployment_id** | **str** | Deployment identifier provided by the platform | **client_id** | **str** | OAuth2 client_id for the tenant; required for ClassLink deployments | [optional] **deployment_breakdown_id** | **str** | Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology) | [optional] diff --git a/docs/reference/LtiCredentials.md b/docs/reference/LtiCredentials.md index afb3743..a7db849 100644 --- a/docs/reference/LtiCredentials.md +++ b/docs/reference/LtiCredentials.md @@ -1,17 +1,17 @@ # LtiCredentials -A couple of LTI 1.x OAuth credentials +A pair of LTI 1.1 OAuth credentials ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of this couple of credentials | [optional] -**name** | **str** | Name of the couple of credentials | [optional] +**id** | **str** | The unique identifier of this pair of credentials | [optional] +**name** | **str** | Name of the pair of credentials | [optional] **lms** | [**LmsName**](LmsName.md) | | [optional] **organization** | **str** | The unique identifier of the Organization associated to these credentials | [optional] **creator** | **str** | Unique identifier of the user who created these credentials | [optional] -**creation_date** | **datetime** | The creation date of thse credentials | [optional] +**creation_date** | **datetime** | The creation date of these credentials | [optional] **last_usage** | **datetime** | The last time these credentials were used | [optional] **consumer_key** | **str** | OAuth 1 Consumer Key | [optional] **consumer_secret** | **str** | OAuth 1 Consumer Secret | [optional] diff --git a/docs/reference/LtiCredentialsCreation.md b/docs/reference/LtiCredentialsCreation.md index f587d6e..41cf5f2 100644 --- a/docs/reference/LtiCredentialsCreation.md +++ b/docs/reference/LtiCredentialsCreation.md @@ -1,12 +1,12 @@ # LtiCredentialsCreation -Creation of a couple of LTI 1.x OAuth credentials +Creation of a pair of LTI 1.1 OAuth credentials ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Name of the couple of credentials | +**name** | **str** | Name of the pair of credentials | **lms** | [**LmsName**](LmsName.md) | | ## Example diff --git a/docs/reference/MediaAttachment.md b/docs/reference/MediaAttachment.md index 0c76378..502fad6 100644 --- a/docs/reference/MediaAttachment.md +++ b/docs/reference/MediaAttachment.md @@ -6,10 +6,10 @@ Media attachment. The API will automatically resolve the details, oEmbed, and me Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | -**score** | **str** | An unique Flat score identifier | [optional] -**revision** | **str** | An unique revision identifier of a score | [optional] -**worksheet** | **str** | An unique worksheet identifier | [optional] +**type** | **str** | The resolved type of the attachment: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. | +**score** | **str** | A unique Flat score identifier | [optional] +**revision** | **str** | A unique revision identifier of a score | [optional] +**worksheet** | **str** | A unique worksheet identifier | [optional] **dedicated** | **bool** | True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment | [optional] **track** | **str** | A unique track identifier | [optional] **part_uuid** | **str** | The UUID of the instrument part selected for this attachment (for performance submissions) | [optional] @@ -23,11 +23,11 @@ Name | Type | Description | Notes **url** | **str** | The url of the attachment | [optional] **thumbnail_url** | **str** | If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment | [optional] **thumbnail_width** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] -**thumbnail_height** | **int** | If the `thumbnailUrl` is available, the width of the thumbnail | [optional] +**thumbnail_height** | **int** | If the `thumbnailUrl` is available, the height of the thumbnail | [optional] **author_name** | **str** | The resolved author name of the attachment | [optional] **author_url** | **str** | The resolved author url of the attachment | [optional] **icon_url** | **str** | The URL of the icon | [optional] -**mime_type** | **str** | The mine type of the file | [optional] +**mime_type** | **str** | The MIME type of the file | [optional] **google_drive_file_id** | **str** | The ID of the Google Drive File | [optional] **teacher_only** | **bool** | If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. | [optional] [default to False] diff --git a/docs/reference/OMRApi.md b/docs/reference/OMRApi.md index 9ebe02e..55ec175 100644 --- a/docs/reference/OMRApi.md +++ b/docs/reference/OMRApi.md @@ -196,6 +196,10 @@ runs fully automatically and only pauses at the steps you list. Steps you do not including ones added in the future, are auto-resolved with server defaults, so older clients never break. +Pages are recognized in the orientation they are uploaded in. If your client does not +let the user rotate pages before upload, set `autoRotate: true` and the server corrects +pages uploaded sideways or upside down. + ### Example @@ -279,7 +283,7 @@ Delete an OMR job's data Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. -Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps +Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. diff --git a/docs/reference/OmrDetailsStepData.md b/docs/reference/OmrDetailsStepData.md index 5127348..de48d4a 100644 --- a/docs/reference/OmrDetailsStepData.md +++ b/docs/reference/OmrDetailsStepData.md @@ -1,6 +1,6 @@ # OmrDetailsStepData -Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). +Detected score details for the client to review before the score is built. `title` and `instruments` are detected from the input; the language is not detected and is not part of this payload (read the job's `locales`, set at creation). ## Properties diff --git a/docs/reference/OmrJob.md b/docs/reference/OmrJob.md index 6547237..ae9d558 100644 --- a/docs/reference/OmrJob.md +++ b/docs/reference/OmrJob.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **status** | [**OmrJobStatus**](OmrJobStatus.md) | | **output** | [**OmrJobOutput**](OmrJobOutput.md) | | [default to OmrJobOutput.LIBRARY] **interactive_steps** | [**List[OmrStepName]**](OmrStepName.md) | Steps this job pauses at for client input, echoing the value set at creation. | +**auto_rotate** | **bool** | Whether the job was created with `autoRotate`, echoing the value set at creation. | [optional] **locales** | **List[str]** | Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. | [optional] **current_step** | [**OmrStepName**](OmrStepName.md) | The pending step when `status` is `awaitingInput`. Omitted otherwise. | [optional] **pending_step** | [**OmrPendingStep**](OmrPendingStep.md) | | [optional] diff --git a/docs/reference/OmrJobCreation.md b/docs/reference/OmrJobCreation.md index 97e7e21..735e6ad 100644 --- a/docs/reference/OmrJobCreation.md +++ b/docs/reference/OmrJobCreation.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **output** | [**OmrJobOutput**](OmrJobOutput.md) | | [optional] [default to OmrJobOutput.LIBRARY] **interactive_steps** | [**List[OmrStepName]**](OmrStepName.md) | Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. | [optional] [default to []] -**locales** | **List[str]** | Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. | [optional] +**auto_rotate** | **bool** | Let the server detect and correct pages uploaded sideways or upside down (90/180/270°) before recognition. Off by default: pages are recognized in the orientation they are uploaded in, which is the right choice when your client lets the user rotate pages before upload. Enable it when it does not, for example a server-to-server integration importing scans as they come. Small tilt correction (a few degrees) always runs. | [optional] [default to False] +**locales** | **List[str]** | Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry is the primary reading language. This is the input hint; the main language can be confirmed or corrected at the `details` step. | [optional] **collection** | **str** | Target collection ID. Only used when `output` is `library`. | [optional] **idempotency_key** | **str** | Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. | [optional] **files** | [**List[OmrJobInputFile]**](OmrJobInputFile.md) | Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`. | [optional] diff --git a/docs/reference/OmrJobRetention.md b/docs/reference/OmrJobRetention.md index 49b68e4..065b250 100644 --- a/docs/reference/OmrJobRetention.md +++ b/docs/reference/OmrJobRetention.md @@ -1,6 +1,6 @@ # OmrJobRetention -Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. +Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure happens shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. ## Properties diff --git a/docs/reference/OmrJobStatus.md b/docs/reference/OmrJobStatus.md index a278a5a..67761d4 100644 --- a/docs/reference/OmrJobStatus.md +++ b/docs/reference/OmrJobStatus.md @@ -1,6 +1,6 @@ # OmrJobStatus -Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. +Status of the job. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. ## Enum diff --git a/docs/reference/OmrStepName.md b/docs/reference/OmrStepName.md index 544dc5d..2b50d4f 100644 --- a/docs/reference/OmrStepName.md +++ b/docs/reference/OmrStepName.md @@ -1,6 +1,6 @@ # OmrStepName -Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. +Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before the score is built. Resuming from this step is fast: note recognition is already done and is not run again. ## Enum diff --git a/docs/reference/OrganizationApi.md b/docs/reference/OrganizationApi.md index 5747b10..9409814 100644 --- a/docs/reference/OrganizationApi.md +++ b/docs/reference/OrganizationApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**count_orga_users**](OrganizationApi.md#count_orga_users) | **GET** /organizations/users/count | Count the organization users using the provided filters [**create_lti_configuration**](OrganizationApi.md#create_lti_configuration) | **POST** /organizations/lti/configurations | Create a new LTI configuration (1.1 or 1.3) -[**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new couple of LTI 1.x credentials +[**create_lti_credentials**](OrganizationApi.md#create_lti_credentials) | **POST** /organizations/lti/credentials | Create a new pair of LTI 1.1 credentials [**create_organization_invitation**](OrganizationApi.md#create_organization_invitation) | **POST** /organizations/invitations | Create a new invitation to join the organization [**create_organization_user**](OrganizationApi.md#create_organization_user) | **POST** /organizations/users | Create a new user account [**create_organization_user_access_token**](OrganizationApi.md#create_organization_user_access_token) | **POST** /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user @@ -105,7 +105,7 @@ Name | Type | Description | Notes [[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) # **create_lti_configuration** -> CreateLtiConfiguration200Response create_lti_configuration(lti_configuration_create) +> LtiConfiguration create_lti_configuration(lti_configuration_create) Create a new LTI configuration (1.1 or 1.3) @@ -115,7 +115,7 @@ Create a new LTI configuration (1.1 or 1.3) ```python import flat_api -from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response +from flat_api.models.lti_configuration import LtiConfiguration from flat_api.models.lti_configuration_create import LtiConfigurationCreate from flat_api.rest import ApiException from pprint import pprint @@ -159,7 +159,7 @@ Name | Type | Description | Notes ### Return type -[**CreateLtiConfiguration200Response**](CreateLtiConfiguration200Response.md) +[**LtiConfiguration**](LtiConfiguration.md) ### Authorization @@ -182,7 +182,7 @@ Name | Type | Description | Notes # **create_lti_credentials** > LtiCredentials create_lti_credentials(body) -Create a new couple of LTI 1.x credentials +Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. @@ -221,7 +221,7 @@ with flat_api.ApiClient(configuration) as api_client: body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation | try: - # Create a new couple of LTI 1.x credentials + # Create a new pair of LTI 1.1 credentials api_response = api_instance.create_lti_credentials(body) print("The response of OrganizationApi->create_lti_credentials:\n") pprint(api_response) @@ -266,11 +266,11 @@ Name | Type | Description | Notes Create a new invitation to join the organization -This method creates and sends invitation for teachers and admins. +This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. -If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. +If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. ### Example @@ -1076,7 +1076,7 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.OrganizationApi(api_client) user = 'user_example' # str | Unique identifier of the Flat account - convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional) + convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. (optional) try: # Remove an account from Flat @@ -1093,7 +1093,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user** | **str**| Unique identifier of the Flat account | - **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] + **convert_to_individual** | **bool**| If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. | [optional] ### Return type diff --git a/docs/reference/OrganizationInvitation.md b/docs/reference/OrganizationInvitation.md index 50489e7..82a0ce9 100644 --- a/docs/reference/OrganizationInvitation.md +++ b/docs/reference/OrganizationInvitation.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The invitation unique identifier | [optional] **creation_date** | **datetime** | The creation date of the invitation | [optional] -**organization** | **str** | The unique identifier of the Organization owning this class | +**organization** | **str** | The unique identifier of the Organization this invitation belongs to | **organization_role** | [**OrganizationRoles**](OrganizationRoles.md) | | **custom_code** | **str** | Enrollment code to use when joining this organization | **email** | **str** | The email address this invitation was sent to | [optional] diff --git a/docs/reference/ResourceCollaborator.md b/docs/reference/ResourceCollaborator.md index 0e1edbe..0803524 100644 --- a/docs/reference/ResourceCollaborator.md +++ b/docs/reference/ResourceCollaborator.md @@ -1,6 +1,6 @@ # ResourceCollaborator -A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). +A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (otherwise these permissions are not listed or exposed publicly). ## Properties diff --git a/docs/reference/ResourceCollaboratorCreation.md b/docs/reference/ResourceCollaboratorCreation.md index 989a97c..07713d7 100644 --- a/docs/reference/ResourceCollaboratorCreation.md +++ b/docs/reference/ResourceCollaboratorCreation.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **user_token** | **str** | Token received in an invitation to join the score. | [optional] **acl_read** | **bool** | `True` if the related user can read the score. (probably true if the user has a permission on the document). | [optional] [default to True] **acl_write** | **bool** | `True` if the related user can modify the score. | [optional] [default to False] -**acl_admin** | **bool** | `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] +**acl_admin** | **bool** | `True` if the related user can manage the current document, i.e. changing the document permissions and deleting the document | [optional] [default to False] ## Example diff --git a/docs/reference/ScoreApi.md b/docs/reference/ScoreApi.md index 867e84d..2839dbe 100644 --- a/docs/reference/ScoreApi.md +++ b/docs/reference/ScoreApi.md @@ -41,9 +41,9 @@ Method | HTTP request | Description 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. +Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. +- To add an existing Flat user to the resource, specify their unique identifier in the `user` property. +- To invite an external user to the resource, specify their 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. @@ -128,8 +128,8 @@ Name | Type | Description | Notes 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. +Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. +This API method supports media hosted on SoundCloud, YouTube and Vimeo. ### Example @@ -211,7 +211,7 @@ Name | Type | Description | Notes Create a new score export task -Some of the exports of a score takes are longer to process than a simple API requests. +Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. @@ -301,7 +301,7 @@ Name | Type | Description | Notes 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: +Use this API method to **create a new music score in the current User account**. This endpoint 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. @@ -339,9 +339,9 @@ Use this API method to **create a new music score in the current User account**. 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}`). +This API call will automatically create the first revision of the document, the score can then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). -The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). +The currently authenticated user will be the 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`). @@ -515,7 +515,7 @@ 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. +- When called by another user that has the score in its collections, the score will be removed from all the user's collections. ### Example @@ -545,7 +545,7 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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`). - now = False # bool | If `true`, the score deletion will be scheduled to be done ASAP (optional) (default to False) + now = False # bool | If `true`, the score deletion will be scheduled as soon as possible (optional) (default to False) try: # Delete a score @@ -562,7 +562,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | - **now** | **bool**| If `true`, the score deletion will be scheduled to be done ASAP | [optional] [default to False] + **now** | **bool**| If `true`, the score deletion will be scheduled as soon as possible | [optional] [default to False] ### Return type @@ -621,7 +621,7 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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' # str | Unique identifier of a sheet music comment - event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) sharing_key = 'sharing_key_example' # str | 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) try: @@ -640,7 +640,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a sheet music comment | - **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] + **event_properties** | **str**| Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] **sharing_key** | **str**| 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] ### Return type @@ -749,10 +749,10 @@ 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}`). +To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions`). -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. +When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. +This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. ### Example @@ -953,7 +953,7 @@ with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.ScoreApi(api_client) group = 'group_example' # str | Unique identifier of a Flat group - parent = 'parent_example' # str | Filter the score forked from the score id `parent` (optional) + parent = 'parent_example' # str | Only return the scores forked from the score `parent` (optional) try: # List group's scores @@ -972,7 +972,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group** | **str**| Unique identifier of a Flat group | - **parent** | **str**| Filter the score forked from the score id `parent` | [optional] + **parent** | **str**| Only return the scores forked from the score `parent` | [optional] ### Return type @@ -1425,11 +1425,11 @@ Name | Type | Description | Notes 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`. +Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML +`mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 +contains. Like MIDI, the export is lossy: notation that ABC has no equivalent for is approximated or dropped rather than failing the request. @@ -1463,7 +1463,7 @@ with flat_api.ApiClient(configuration) as api_client: revision = 'revision_example' # str | Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. format = 'format_example' # str | The format of the file you will retrieve sharing_key = 'sharing_key_example' # str | 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 = 'parts_example' # str | An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) + parts = 'parts_example' # str | An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". (optional) default_track = True # bool | When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. (optional) url = True # bool | Returns a json with the `url` in it instead of redirecting (optional) @@ -1487,7 +1487,7 @@ Name | Type | Description | Notes **revision** | **str**| Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. | **format** | **str**| The format of the file you will retrieve | **sharing_key** | **str**| 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** | **str**| An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] + **parts** | **str**| An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". | [optional] **default_track** | **bool**| When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. | [optional] **url** | **bool**| Returns a json with the `url` in it instead of redirecting | [optional] @@ -1523,7 +1523,7 @@ 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. +Depending on the plan of the account, this list may be truncated to the most recent revisions. ### Example @@ -1605,7 +1605,7 @@ Name | Type | Description | Notes 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. +This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. ### Example @@ -1845,7 +1845,7 @@ Name | Type | Description | Notes 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](#tag/Collection). +If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. @@ -1976,8 +1976,8 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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`). sharing_key = 'sharing_key_example' # str | 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) - assignment = 'assignment_example' # str | An assignment id with which all the tracks returned will be related to (optional) - list_auto_track = True # bool | If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track (optional) + assignment = 'assignment_example' # str | Only return the tracks related to this assignment (optional) + list_auto_track = True # bool | If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track (optional) try: # List the audio or video tracks linked to a score @@ -1997,8 +1997,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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`). | **sharing_key** | **str**| 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] - **assignment** | **str**| An assignment id with which all the tracks returned will be related to | [optional] - **list_auto_track** | **bool**| If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track | [optional] + **assignment** | **str**| Only return the tracks related to this assignment | [optional] + **list_auto_track** | **bool**| If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track | [optional] ### Return type @@ -2185,7 +2185,7 @@ 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`. +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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. ### Example @@ -2301,7 +2301,7 @@ with flat_api.ApiClient(configuration) as api_client: api_instance = flat_api.ScoreApi(api_client) score = 'score_example' # str | 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' # str | Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** - event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) + event_properties = '{\"context\":\"discover\",\"screenLevel0\":\"home\",\"screenRoute\":\"/discover\"}' # str | Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` (optional) try: # Delete a collaborator @@ -2319,7 +2319,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **score** | **str**| 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** | **str**| Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** | - **event_properties** | **str**| Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] + **event_properties** | **str**| Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` | [optional] ### Return type diff --git a/docs/reference/ScoreComment.md b/docs/reference/ScoreComment.md index a9be2e4..02832cb 100644 --- a/docs/reference/ScoreComment.md +++ b/docs/reference/ScoreComment.md @@ -10,18 +10,18 @@ Name | Type | Description | Notes **type** | **str** | The type of the comment | **user** | **str** | The author unique identifier | **score** | **str** | The unique identifier of the score where the comment was posted | -**revision** | **str** | The unique identifier of revision the comment was posted | [optional] +**revision** | **str** | The unique identifier of the revision where the comment was posted | [optional] **reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] **var_date** | **datetime** | The date when the comment was posted | **modification_date** | **datetime** | The date of the last comment modification | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | +**comment** | **str** | The comment text that can include mentions using the following format: `@[id:username]`. | **raw_comment** | **str** | A raw version of the comment, that can be displayed without parsing the mentions. | **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] -**mentions** | **List[str]** | The list of user identifier mentioned on the score | [optional] +**mentions** | **List[str]** | The list of user identifiers mentioned in this comment | [optional] **resolved** | **bool** | For inline comments, the comment can be marked as resolved and will be hidden in the future responses | [optional] -**resolved_by** | **str** | If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] +**resolved_by** | **str** | If the comment is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved | [optional] **moderation** | [**ScoreCommentModeration**](ScoreCommentModeration.md) | | [optional] -**spam** | **bool** | `true if the message has been detected as spam and hidden from other users | [optional] +**spam** | **bool** | `true` if the message has been detected as spam and hidden from other users | [optional] ## Example diff --git a/docs/reference/ScoreCommentContext.md b/docs/reference/ScoreCommentContext.md index 843e4ef..22c2959 100644 --- a/docs/reference/ScoreCommentContext.md +++ b/docs/reference/ScoreCommentContext.md @@ -7,9 +7,9 @@ The context of the comment (for inline/contextualized comments). A context will Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **part_uuid** | **str** | The unique identifier (UUID) of the score part | -**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identififer of the staff | [optional] -**staff_uuid** | **str** | The unique identififer (UUID) of the staff | [optional] -**measure_uuids** | **List[str]** | The list of measure UUIds | +**staff_idx** | **float** | (Deprecated, use `staffUuid`) The identifier of the staff | [optional] +**staff_uuid** | **str** | The unique identifier (UUID) of the staff | [optional] +**measure_uuids** | **List[str]** | The list of measure UUIDs | **start_time_pos** | **float** | | **stop_time_pos** | **float** | | **start_dpq** | **float** | | diff --git a/docs/reference/ScoreCommentCreation.md b/docs/reference/ScoreCommentCreation.md index ae522f2..9f32b4a 100644 --- a/docs/reference/ScoreCommentCreation.md +++ b/docs/reference/ScoreCommentCreation.md @@ -7,7 +7,7 @@ Creation of a comment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **revision** | **str** | The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | +**comment** | **str** | The comment text that can include mentions using the following format: `@[id:username]`. | **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] **mentions** | **List[str]** | The list of user identifiers mentioned in this comment | [optional] **reply_to** | **str** | When the comment is a reply to another comment, the unique identifier of the parent comment | [optional] diff --git a/docs/reference/ScoreCommentUpdate.md b/docs/reference/ScoreCommentUpdate.md index 40ec275..dc72b1d 100644 --- a/docs/reference/ScoreCommentUpdate.md +++ b/docs/reference/ScoreCommentUpdate.md @@ -7,7 +7,7 @@ Update of a comment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **revision** | **str** | The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. | [optional] -**comment** | **str** | The comment text that can includes mentions using the following format: `@[id:username]`. | [optional] +**comment** | **str** | The comment text that can include mentions using the following format: `@[id:username]`. | [optional] **raw_comment** | **str** | A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. | [optional] **context** | [**ScoreCommentContext**](ScoreCommentContext.md) | | [optional] diff --git a/docs/reference/ScoreCreation.md b/docs/reference/ScoreCreation.md index 66c52d0..5b455cf 100644 --- a/docs/reference/ScoreCreation.md +++ b/docs/reference/ScoreCreation.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. | [optional] **builder_data** | [**ScoreCreationBuilderDataAllOfBuilderData**](ScoreCreationBuilderDataAllOfBuilderData.md) | | **filename** | **str** | If this is an imported file, its filename | [optional] **data** | **str** | The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | diff --git a/docs/reference/ScoreCreationBuilderData.md b/docs/reference/ScoreCreationBuilderData.md index b511cc8..7feb051 100644 --- a/docs/reference/ScoreCreationBuilderData.md +++ b/docs/reference/ScoreCreationBuilderData.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. | [optional] **builder_data** | [**ScoreCreationBuilderDataAllOfBuilderData**](ScoreCreationBuilderDataAllOfBuilderData.md) | | ## Example diff --git a/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md index bf09535..02b663a 100644 --- a/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md +++ b/docs/reference/ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group** | **str** | The of the instrument group (e.g. `keyboards`, `brass`) | +**group** | **str** | The identifier of the instrument group (e.g. `keyboards`, `brass`) | **instrument** | **str** | The identifier of the instrument (e.g. `piano`, `trumpet`) | **long_name** | **str** | The full name of the instrument | [optional] **short_name** | **str** | The abbreviation of the name of the instrument | [optional] -**has_quarter_tone** | **bool** | True if the part can use quarter tone (prevent the part to have a TAB/chord grid) | [optional] +**has_quarter_tone** | **bool** | True if the part can use quarter tones (prevents the part from having a TAB staff or chord grid) | [optional] ## Example diff --git a/docs/reference/ScoreCreationCommon.md b/docs/reference/ScoreCreationCommon.md index ecd02d3..956922d 100644 --- a/docs/reference/ScoreCreationCommon.md +++ b/docs/reference/ScoreCreationCommon.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. | [optional] ## Example diff --git a/docs/reference/ScoreCreationFileImport.md b/docs/reference/ScoreCreationFileImport.md index 8356711..3bf798e 100644 --- a/docs/reference/ScoreCreationFileImport.md +++ b/docs/reference/ScoreCreationFileImport.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. | [optional] **filename** | **str** | If this is an imported file, its filename | [optional] **data** | **str** | The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | **data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] diff --git a/docs/reference/ScoreCreationGoogleDriveImport.md b/docs/reference/ScoreCreationGoogleDriveImport.md index 8fbd201..3bc64ae 100644 --- a/docs/reference/ScoreCreationGoogleDriveImport.md +++ b/docs/reference/ScoreCreationGoogleDriveImport.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **title** | **str** | The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") | [optional] **privacy** | [**ScorePrivacy**](ScorePrivacy.md) | | [optional] [default to ScorePrivacy.PRIVATE] **collection** | **str** | Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. | [optional] -**google_drive_folder** | **str** | If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. | [optional] +**google_drive_folder** | **str** | If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. | [optional] **source** | [**ScoreSource**](ScoreSource.md) | | ## Example diff --git a/docs/reference/ScoreCreationType.md b/docs/reference/ScoreCreationType.md index 976af5a..1bf8923 100644 --- a/docs/reference/ScoreCreationType.md +++ b/docs/reference/ScoreCreationType.md @@ -1,6 +1,6 @@ # ScoreCreationType -The type of creation (an orginal, an arrangement) +The type of creation (an original, an arrangement) ## Enum diff --git a/docs/reference/ScoreDetails.md b/docs/reference/ScoreDetails.md index 609c7c0..ad68348 100644 --- a/docs/reference/ScoreDetails.md +++ b/docs/reference/ScoreDetails.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **creation_type** | [**ScoreCreationType**](ScoreCreationType.md) | | [optional] **license** | [**ScoreLicense**](ScoreLicense.md) | | [optional] **license_text** | **str** | Additional license text written on the exported/printed score | [optional] -**duration_time** | **float** | In seconds, an approximative duration of the score | [optional] +**duration_time** | **float** | In seconds, an approximate duration of the score | [optional] **number_measures** | **int** | The number of measures in the score | [optional] **main_tempo_qpm** | **float** | The main tempo of the score (in QPM) | [optional] **main_key_signature** | **float** | The main key signature of the score (expressed between -7 and 7). | [optional] @@ -31,19 +31,19 @@ Name | Type | Description | Notes **creation_date** | **datetime** | The date when the score was created | **modification_date** | **datetime** | The date of the last revision of the score | [optional] **publication_date** | **datetime** | The date when the score was published on Flat | [optional] -**scheduled_deletion_date** | **datetime** | The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. | [optional] +**scheduled_deletion_date** | **datetime** | The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, and can be restored with a paying account up to 90 days. | [optional] **highlighted_date** | **datetime** | The date when the score was highlighted (featured) on our community | [optional] **organization** | **str** | If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. | [optional] **parent_score** | **str** | If the score has been forked, the unique identifier of the parent score. | [optional] -**instruments** | **List[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | +**instruments** | **List[str]** | An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. | **instruments_names** | **List[str]** | An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. | -**samples** | **List[str]** | An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | +**samples** | **List[str]** | An array of the audio sample identifiers used by the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. | **google_drive_file_id** | **str** | If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` | [optional] **likes** | [**ScoreLikesCounts**](ScoreLikesCounts.md) | | [optional] **comments** | [**ScoreCommentsCounts**](ScoreCommentsCounts.md) | | [optional] **views** | [**ScoreViewsCounts**](ScoreViewsCounts.md) | | [optional] **plays** | [**ScorePlaysCounts**](ScorePlaysCounts.md) | | [optional] -**collections** | **List[str]** | The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them. | [optional] +**collections** | **List[str]** | The list of parent collections this score is included in. Please note that you might not have access to all of them. | [optional] **me** | [**ScoreDetailsAllOfMe**](ScoreDetailsAllOfMe.md) | | [optional] ## Example diff --git a/docs/reference/ScorePrivacy.md b/docs/reference/ScorePrivacy.md index 6fc865e..2bab43d 100644 --- a/docs/reference/ScorePrivacy.md +++ b/docs/reference/ScorePrivacy.md @@ -1,6 +1,6 @@ # ScorePrivacy -The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). +The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administered by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administered by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access it. The score can be modified and administered by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will choose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). ## Enum diff --git a/docs/reference/ScoreRevisionCreation.md b/docs/reference/ScoreRevisionCreation.md index 7fd51c4..1cc5976 100644 --- a/docs/reference/ScoreRevisionCreation.md +++ b/docs/reference/ScoreRevisionCreation.md @@ -6,7 +6,7 @@ A new created revision Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | +**data** | **str** | The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat JSON file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. | **data_encoding** | **str** | The optional encoding of the score data. This property must match the encoding used for the `data` property. | [optional] **autosave** | **bool** | Must be set to `true` if the revision was created automatically. | [optional] **description** | **str** | A description associated to the revision | [optional] diff --git a/docs/reference/ScoreSource.md b/docs/reference/ScoreSource.md index 473a5f6..d739277 100644 --- a/docs/reference/ScoreSource.md +++ b/docs/reference/ScoreSource.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**google_drive** | **str** | If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] +**google_drive** | **str** | If the score is a file on Google Drive, this property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. | [optional] ## Example diff --git a/docs/reference/TaskApi.md b/docs/reference/TaskApi.md index 859c91f..1c8092f 100644 --- a/docs/reference/TaskApi.md +++ b/docs/reference/TaskApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.flat.io/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_task**](TaskApi.md#get_task) | **GET** /tasks/{task} | Get a task details +[**get_task**](TaskApi.md#get_task) | **GET** /tasks/{task} | Get task details # **get_task** > Task get_task(task) -Get a task details +Get task details -This method can be used to follow a task progression, for example while a score is being exported. +This method can be used to follow the progress of a task, for example while a score is being exported. ### Example @@ -45,7 +45,7 @@ with flat_api.ApiClient(configuration) as api_client: task = 'task_example' # str | Unique identifier for the task try: - # Get a task details + # Get task details api_response = api_instance.get_task(task) print("The response of TaskApi->get_task:\n") pprint(api_response) diff --git a/docs/reference/TaskResult.md b/docs/reference/TaskResult.md index c2639ad..afa25e2 100644 --- a/docs/reference/TaskResult.md +++ b/docs/reference/TaskResult.md @@ -6,8 +6,8 @@ Optional result information about this task Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | URL returned by the task worker | [optional] -**error** | **str** | Error returned by task worker | [optional] +**url** | **str** | URL of the generated file, when the task produces one | [optional] +**error** | **str** | Error message, when the task failed | [optional] ## Example diff --git a/docs/reference/UserApi.md b/docs/reference/UserApi.md index 035aa91..9b039ba 100644 --- a/docs/reference/UserApi.md +++ b/docs/reference/UserApi.md @@ -44,7 +44,7 @@ configuration.access_token = os.environ["ACCESS_TOKEN"] with flat_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flat_api.UserApi(api_client) - user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. + user = 'user_example' # str | This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. try: # Get a public user profile @@ -62,7 +62,7 @@ with flat_api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | + **user** | **str**| This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. | ### Return type @@ -174,7 +174,7 @@ Name | Type | Description | Notes 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](#tag/Collection). +If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. diff --git a/docs/reference/UserCommunityProfileLinks.md b/docs/reference/UserCommunityProfileLinks.md index c176122..a6f6807 100644 --- a/docs/reference/UserCommunityProfileLinks.md +++ b/docs/reference/UserCommunityProfileLinks.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **soundcloud_url** | **str** | SoundCloud Profile URL | [optional] **tiktok_url** | **str** | TikTok profile URL. For updates, also accepts TikTok usernames | [optional] **instagram_url** | **str** | Instagram profile URL. For updates, also accepts Instagram usernames | [optional] -**website_url** | **str** | Personnal website URL | [optional] +**website_url** | **str** | Personal website URL | [optional] ## Example diff --git a/docs/reference/UserDetails.md b/docs/reference/UserDetails.md index 61a18cd..f06b137 100644 --- a/docs/reference/UserDetails.md +++ b/docs/reference/UserDetails.md @@ -23,18 +23,18 @@ Name | Type | Description | Notes **bio** | **str** | User's biography | [optional] **registration_date** | **datetime** | Date the user signed up | [optional] **liked_scores_count** | **int** | Number of the scores liked by the user | [optional] -**followers_count** | **int** | Number of followers the user have | [optional] -**following_count** | **int** | Number of people the user follow | [optional] -**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**followers_count** | **int** | Number of followers the user has | [optional] +**following_count** | **int** | Number of people the user follows | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user owns | [optional] **all_public_scores_count** | **int** | Total number of public scores the user participates in (owned + joined) | [optional] **likes_count** | **int** | Number of likes on the user published scores | [optional] **plays_count** | **int** | Number of plays on the user published scores | [optional] -**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**cover_picture** | **str** | Cover picture (background) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] **is_email_verified** | **bool** | Whether the user's email address has been verified | [optional] **azure_details** | [**UserAzureDetails**](UserAzureDetails.md) | | [optional] -**private_profile** | **bool** | Tell either this user profile is private or not (individual accounts only) | [optional] +**private_profile** | **bool** | Whether this user profile is private (individual accounts only) | [optional] **locale** | **str** | The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` | [optional] [default to 'en'] **groups** | **List[str]** | For Flat for Education accounts, list of Group identifiers the user is part of. | [optional] **picture_file** | **str** | The ID of the user profile picture | [optional] diff --git a/docs/reference/UserDetailsAdminAllOfLicense.md b/docs/reference/UserDetailsAdminAllOfLicense.md index 9f172e0..1e63371 100644 --- a/docs/reference/UserDetailsAdminAllOfLicense.md +++ b/docs/reference/UserDetailsAdminAllOfLicense.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **expiration_date** | **datetime** | Date when the license expires | [optional] **source** | [**LicenseSources**](LicenseSources.md) | | [optional] [default to LicenseSources.ORDER] **mode** | [**LicenseMode**](LicenseMode.md) | | [optional] -**active** | **bool** | ID of the current license | [optional] +**active** | **bool** | Whether the license is currently active | [optional] ## Example diff --git a/docs/reference/UserPublic.md b/docs/reference/UserPublic.md index 9d95c47..b9b3f66 100644 --- a/docs/reference/UserPublic.md +++ b/docs/reference/UserPublic.md @@ -23,13 +23,13 @@ Name | Type | Description | Notes **bio** | **str** | User's biography | [optional] **registration_date** | **datetime** | Date the user signed up | [optional] **liked_scores_count** | **int** | Number of the scores liked by the user | [optional] -**followers_count** | **int** | Number of followers the user have | [optional] -**following_count** | **int** | Number of people the user follow | [optional] -**owned_public_scores_count** | **int** | Number of public scores the user have | [optional] +**followers_count** | **int** | Number of followers the user has | [optional] +**following_count** | **int** | Number of people the user follows | [optional] +**owned_public_scores_count** | **int** | Number of public scores the user owns | [optional] **all_public_scores_count** | **int** | Total number of public scores the user participates in (owned + joined) | [optional] **likes_count** | **int** | Number of likes on the user published scores | [optional] **plays_count** | **int** | Number of plays on the user published scores | [optional] -**cover_picture** | **str** | Cover picture (backgroud) for the profile | [optional] +**cover_picture** | **str** | Cover picture (background) for the profile | [optional] **profile_theme** | **str** | Theme (background) for the profile | [optional] **links** | [**UserCommunityProfileLinks**](UserCommunityProfileLinks.md) | | [optional] diff --git a/flat_api/__init__.py b/flat_api/__init__.py index f842e5a..ae76e6c 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -10,7 +10,7 @@ """ # --- flat_api ergonomic surface (tools/patches/90_exports.py) --- -__version__ = "2.0.0" +__version__ = "2.0.2" from flat_api.client import AsyncFlatClient, FlatClient from flat_api.errors import ( @@ -52,9 +52,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -62,7 +62,7 @@ """ # noqa: E501 -__version__ = "2.0.0" +__version__ = "2.0.2" # Define package exports __all__ = [ @@ -142,7 +142,6 @@ "CollectionModification", "CollectionPrivacy", "CollectionType", - "CreateLtiConfiguration200Response", "CreditTransaction", "EduLibrary", "EduResource", @@ -365,7 +364,6 @@ from flat_api.models.collection_modification import CollectionModification as CollectionModification from flat_api.models.collection_privacy import CollectionPrivacy as CollectionPrivacy from flat_api.models.collection_type import CollectionType as CollectionType -from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response as CreateLtiConfiguration200Response from flat_api.models.credit_transaction import CreditTransaction as CreditTransaction from flat_api.models.edu_library import EduLibrary as EduLibrary from flat_api.models.edu_resource import EduResource as EduResource diff --git a/flat_api/aio/__init__.py b/flat_api/aio/__init__.py index 4740288..72f5acd 100644 --- a/flat_api/aio/__init__.py +++ b/flat_api/aio/__init__.py @@ -5,9 +5,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -95,7 +95,6 @@ "CollectionModification", "CollectionPrivacy", "CollectionType", - "CreateLtiConfiguration200Response", "CreditTransaction", "EduLibrary", "EduResource", @@ -318,7 +317,6 @@ from flat_api.aio.models.collection_modification import CollectionModification as CollectionModification from flat_api.aio.models.collection_privacy import CollectionPrivacy as CollectionPrivacy from flat_api.aio.models.collection_type import CollectionType as CollectionType -from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response as CreateLtiConfiguration200Response from flat_api.aio.models.credit_transaction import CreditTransaction as CreditTransaction from flat_api.aio.models.edu_library import EduLibrary as EduLibrary from flat_api.aio.models.edu_resource import EduResource as EduResource diff --git a/flat_api/aio/api/account_api.py b/flat_api/aio/api/account_api.py index 0383108..78240ab 100644 --- a/flat_api/aio/api/account_api.py +++ b/flat_api/aio/api/account_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/api/class_api.py b/flat_api/aio/api/class_api.py index c7771c8..a6473cd 100644 --- a/flat_api/aio/api/class_api.py +++ b/flat_api/aio/api/class_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -336,7 +336,7 @@ async def add_class_user( ) -> None: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -408,7 +408,7 @@ async def add_class_user_with_http_info( ) -> ApiResponse[None]: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -480,7 +480,7 @@ async def add_class_user_without_preload_content( ) -> RESTResponseType: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -893,7 +893,7 @@ async def archive_class( ) -> ClassDetails: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -961,7 +961,7 @@ async def archive_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -1029,7 +1029,7 @@ async def archive_class_without_preload_content( ) -> RESTResponseType: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -1464,7 +1464,7 @@ async def create_class( ) -> ClassDetails: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -1533,7 +1533,7 @@ async def create_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -1602,7 +1602,7 @@ async def create_class_without_preload_content( ) -> RESTResponseType: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -2038,7 +2038,7 @@ async def create_submission( ) -> AssignmentSubmission: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2114,7 +2114,7 @@ async def create_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2190,7 +2190,7 @@ async def create_submission_without_preload_content( ) -> RESTResponseType: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2344,7 +2344,7 @@ async def create_test_student_account( ) -> UserDetails: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2416,7 +2416,7 @@ async def create_test_student_account_with_http_info( ) -> ApiResponse[UserDetails]: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2488,7 +2488,7 @@ async def create_test_student_account_without_preload_content( ) -> RESTResponseType: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2904,7 +2904,7 @@ async def delete_class_user( ) -> None: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2976,7 +2976,7 @@ async def delete_class_user_with_http_info( ) -> ApiResponse[None]: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3048,7 +3048,7 @@ async def delete_class_user_without_preload_content( ) -> RESTResponseType: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3184,7 +3184,7 @@ async def delete_submission( ) -> AssignmentSubmission: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3260,7 +3260,7 @@ async def delete_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3336,7 +3336,7 @@ async def delete_submission_without_preload_content( ) -> RESTResponseType: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3785,7 +3785,7 @@ async def edit_submission( ) -> AssignmentSubmission: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3865,7 +3865,7 @@ async def edit_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3945,7 +3945,7 @@ async def edit_submission_without_preload_content( ) -> RESTResponseType: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -4104,7 +4104,7 @@ async def enroll_class( ) -> ClassDetails: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -4172,7 +4172,7 @@ async def enroll_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -4240,7 +4240,7 @@ async def enroll_class_without_preload_content( ) -> RESTResponseType: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -5466,7 +5466,7 @@ async def get_score_submissions( ) -> List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5534,7 +5534,7 @@ async def get_score_submissions_with_http_info( ) -> ApiResponse[List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5602,7 +5602,7 @@ async def get_score_submissions_without_preload_content( ) -> RESTResponseType: """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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -8301,7 +8301,7 @@ async def unarchive_class( ) -> ClassDetails: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -8369,7 +8369,7 @@ async def unarchive_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -8437,7 +8437,7 @@ async def unarchive_class_without_preload_content( ) -> RESTResponseType: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str diff --git a/flat_api/aio/api/collection_api.py b/flat_api/aio/api/collection_api.py index fc23944..ff7b692 100644 --- a/flat_api/aio/api/collection_api.py +++ b/flat_api/aio/api/collection_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -913,7 +913,7 @@ async def delete_score_from_collection( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -930,13 +930,13 @@ async def delete_score_from_collection( ) -> None: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -995,7 +995,7 @@ async def delete_score_from_collection_with_http_info( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1012,13 +1012,13 @@ async def delete_score_from_collection_with_http_info( ) -> ApiResponse[None]: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -1077,7 +1077,7 @@ async def delete_score_from_collection_without_preload_content( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1094,13 +1094,13 @@ async def delete_score_from_collection_without_preload_content( ) -> RESTResponseType: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str diff --git a/flat_api/aio/api/edu_resources_api.py b/flat_api/aio/api/edu_resources_api.py index 9aa3c3c..eed1dcc 100644 --- a/flat_api/aio/api/edu_resources_api.py +++ b/flat_api/aio/api/edu_resources_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -1915,7 +1915,7 @@ def _list_edu_libraries_serialize( async def list_edu_resources( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -1943,7 +1943,7 @@ async def list_edu_resources( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2022,7 +2022,7 @@ async def list_edu_resources( async def list_edu_resources_with_http_info( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -2050,7 +2050,7 @@ async def list_edu_resources_with_http_info( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2129,7 +2129,7 @@ async def list_edu_resources_with_http_info( async def list_edu_resources_without_preload_content( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -2157,7 +2157,7 @@ async def list_edu_resources_without_preload_content( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2656,7 +2656,7 @@ async def update_edu_resource( ) -> EduResource: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str @@ -2728,7 +2728,7 @@ async def update_edu_resource_with_http_info( ) -> ApiResponse[EduResource]: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str @@ -2800,7 +2800,7 @@ async def update_edu_resource_without_preload_content( ) -> RESTResponseType: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str diff --git a/flat_api/aio/api/group_api.py b/flat_api/aio/api/group_api.py index 706d233..d7d8dd3 100644 --- a/flat_api/aio/api/group_api.py +++ b/flat_api/aio/api/group_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -1170,7 +1170,7 @@ def _get_group_details_serialize( async def get_group_scores( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1190,7 +1190,7 @@ async def get_group_scores( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1243,7 +1243,7 @@ async def get_group_scores( async def get_group_scores_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1263,7 +1263,7 @@ async def get_group_scores_with_http_info( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1316,7 +1316,7 @@ async def get_group_scores_with_http_info( async def get_group_scores_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1336,7 +1336,7 @@ async def get_group_scores_without_preload_content( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/aio/api/omr_api.py b/flat_api/aio/api/omr_api.py index 8274555..bafbee1 100644 --- a/flat_api/aio/api/omr_api.py +++ b/flat_api/aio/api/omr_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -656,7 +656,7 @@ async def create_omr_job( ) -> OmrJob: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -730,7 +730,7 @@ async def create_omr_job_with_http_info( ) -> ApiResponse[OmrJob]: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -804,7 +804,7 @@ async def create_omr_job_without_preload_content( ) -> RESTResponseType: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -954,7 +954,7 @@ async def delete_omr_job( ) -> OmrJob: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str @@ -1029,7 +1029,7 @@ async def delete_omr_job_with_http_info( ) -> ApiResponse[OmrJob]: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str @@ -1104,7 +1104,7 @@ async def delete_omr_job_without_preload_content( ) -> RESTResponseType: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str diff --git a/flat_api/aio/api/organization_api.py b/flat_api/aio/api/organization_api.py index 3ef50b2..0800712 100644 --- a/flat_api/aio/api/organization_api.py +++ b/flat_api/aio/api/organization_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,7 +20,6 @@ from typing import List, Optional from typing_extensions import Annotated from flat_api.aio.models.api_access_token import ApiAccessToken -from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response from flat_api.aio.models.lti_configuration import LtiConfiguration from flat_api.aio.models.lti_configuration_create import LtiConfigurationCreate from flat_api.aio.models.lti_configuration_update import LtiConfigurationUpdate @@ -402,7 +401,7 @@ async def create_lti_configuration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateLtiConfiguration200Response: + ) -> LtiConfiguration: """Create a new LTI configuration (1.1 or 1.3) @@ -439,7 +438,7 @@ async def create_lti_configuration( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = await self.api_client.call_api( @@ -469,7 +468,7 @@ async def create_lti_configuration_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateLtiConfiguration200Response]: + ) -> ApiResponse[LtiConfiguration]: """Create a new LTI configuration (1.1 or 1.3) @@ -506,7 +505,7 @@ async def create_lti_configuration_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = await self.api_client.call_api( @@ -573,7 +572,7 @@ async def create_lti_configuration_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = await self.api_client.call_api( @@ -677,7 +676,7 @@ async def create_lti_credentials( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LtiCredentials: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -747,7 +746,7 @@ async def create_lti_credentials_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LtiCredentials]: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -817,7 +816,7 @@ async def create_lti_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -962,7 +961,7 @@ async def create_organization_invitation( ) -> OrganizationInvitation: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -1030,7 +1029,7 @@ async def create_organization_invitation_with_http_info( ) -> ApiResponse[OrganizationInvitation]: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -1098,7 +1097,7 @@ async def create_organization_invitation_without_preload_content( ) -> RESTResponseType: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -3869,7 +3868,7 @@ def _remove_organization_invitation_serialize( async def remove_organization_user( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3889,7 +3888,7 @@ async def remove_organization_user( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3941,7 +3940,7 @@ async def remove_organization_user( async def remove_organization_user_with_http_info( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3961,7 +3960,7 @@ async def remove_organization_user_with_http_info( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4013,7 +4012,7 @@ async def remove_organization_user_with_http_info( async def remove_organization_user_without_preload_content( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4033,7 +4032,7 @@ async def remove_organization_user_without_preload_content( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/aio/api/score_api.py b/flat_api/aio/api/score_api.py index 879baab..46990ea 100644 --- a/flat_api/aio/api/score_api.py +++ b/flat_api/aio/api/score_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -76,7 +76,7 @@ async def add_score_collaborator( ) -> 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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -151,7 +151,7 @@ async def add_score_collaborator_with_http_info( ) -> ApiResponse[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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -226,7 +226,7 @@ async def add_score_collaborator_without_preload_content( ) -> RESTResponseType: """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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -377,7 +377,7 @@ async def add_score_track( ) -> 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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -451,7 +451,7 @@ async def add_score_track_with_http_info( ) -> ApiResponse[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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -525,7 +525,7 @@ async def add_score_track_without_preload_content( ) -> RESTResponseType: """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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -678,7 +678,7 @@ async def create_export_task( ) -> 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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -765,7 +765,7 @@ async def create_export_task_with_http_info( ) -> ApiResponse[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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -852,7 +852,7 @@ async def create_export_task_without_preload_content( ) -> RESTResponseType: """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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -1022,7 +1022,7 @@ async def create_score( ) -> 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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1093,7 +1093,7 @@ async def create_score_with_http_info( ) -> ApiResponse[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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1164,7 +1164,7 @@ async def create_score_without_preload_content( ) -> RESTResponseType: """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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1594,7 +1594,7 @@ def _create_score_revision_serialize( async def delete_score( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1610,11 +1610,11 @@ async def delete_score( ) -> None: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1668,7 +1668,7 @@ async def delete_score( async def delete_score_with_http_info( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1684,11 +1684,11 @@ async def delete_score_with_http_info( ) -> ApiResponse[None]: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1742,7 +1742,7 @@ async def delete_score_with_http_info( async def delete_score_without_preload_content( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1758,11 +1758,11 @@ async def delete_score_without_preload_content( ) -> RESTResponseType: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1882,7 +1882,7 @@ async def delete_score_comment( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1904,7 +1904,7 @@ async def delete_score_comment( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -1963,7 +1963,7 @@ async def delete_score_comment_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1985,7 +1985,7 @@ async def delete_score_comment_with_http_info( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -2044,7 +2044,7 @@ async def delete_score_comment_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -2066,7 +2066,7 @@ async def delete_score_comment_without_preload_content( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -2508,7 +2508,7 @@ async def edit_score( ) -> 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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -2583,7 +2583,7 @@ async def edit_score_with_http_info( ) -> ApiResponse[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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -2658,7 +2658,7 @@ async def edit_score_without_preload_content( ) -> RESTResponseType: """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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -3111,7 +3111,7 @@ def _fork_score_serialize( async def get_group_scores( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3131,7 +3131,7 @@ async def get_group_scores( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3184,7 +3184,7 @@ async def get_group_scores( async def get_group_scores_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3204,7 +3204,7 @@ async def get_group_scores_with_http_info( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3257,7 +3257,7 @@ async def get_group_scores_with_http_info( async def get_group_scores_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3277,7 +3277,7 @@ async def get_group_scores_without_preload_content( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4929,7 +4929,7 @@ async def get_score_revision_data( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -4947,7 +4947,7 @@ async def get_score_revision_data( ) -> bytes: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -4957,7 +4957,7 @@ async def get_score_revision_data( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5024,7 +5024,7 @@ async def get_score_revision_data_with_http_info( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -5042,7 +5042,7 @@ async def get_score_revision_data_with_http_info( ) -> ApiResponse[bytes]: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5052,7 +5052,7 @@ async def get_score_revision_data_with_http_info( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5119,7 +5119,7 @@ async def get_score_revision_data_without_preload_content( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -5137,7 +5137,7 @@ async def get_score_revision_data_without_preload_content( ) -> RESTResponseType: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5147,7 +5147,7 @@ async def get_score_revision_data_without_preload_content( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5320,7 +5320,7 @@ async def get_score_revisions( ) -> List[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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5395,7 +5395,7 @@ async def get_score_revisions_with_http_info( ) -> ApiResponse[List[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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5470,7 +5470,7 @@ async def get_score_revisions_without_preload_content( ) -> RESTResponseType: """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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5609,7 +5609,7 @@ async def get_score_submissions( ) -> List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5677,7 +5677,7 @@ async def get_score_submissions_with_http_info( ) -> ApiResponse[List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5745,7 +5745,7 @@ async def get_score_submissions_without_preload_content( ) -> RESTResponseType: """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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -6507,7 +6507,7 @@ async def get_user_scores( ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6599,7 +6599,7 @@ async def get_user_scores_with_http_info( ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6691,7 +6691,7 @@ async def get_user_scores_without_preload_content( ) -> RESTResponseType: """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6853,8 +6853,8 @@ async def list_score_tracks( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6876,9 +6876,9 @@ async def list_score_tracks( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -6935,8 +6935,8 @@ async def list_score_tracks_with_http_info( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6958,9 +6958,9 @@ async def list_score_tracks_with_http_info( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -7017,8 +7017,8 @@ async def list_score_tracks_without_preload_content( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7040,9 +7040,9 @@ async def list_score_tracks_without_preload_content( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -7788,7 +7788,7 @@ async def post_score_comment( ) -> 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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -7867,7 +7867,7 @@ async def post_score_comment_with_http_info( ) -> ApiResponse[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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -7946,7 +7946,7 @@ async def post_score_comment_without_preload_content( ) -> RESTResponseType: """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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -8090,7 +8090,7 @@ async def remove_score_collaborator( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8112,7 +8112,7 @@ async def remove_score_collaborator( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -8168,7 +8168,7 @@ async def remove_score_collaborator_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8190,7 +8190,7 @@ async def remove_score_collaborator_with_http_info( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -8246,7 +8246,7 @@ async def remove_score_collaborator_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8268,7 +8268,7 @@ async def remove_score_collaborator_without_preload_content( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/aio/api/task_api.py b/flat_api/aio/api/task_api.py index 640f7bb..ffe56ab 100644 --- a/flat_api/aio/api/task_api.py +++ b/flat_api/aio/api/task_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -55,9 +55,9 @@ async def get_task( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Task: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str @@ -123,9 +123,9 @@ async def get_task_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Task]: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str @@ -191,9 +191,9 @@ async def get_task_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str diff --git a/flat_api/aio/api/user_api.py b/flat_api/aio/api/user_api.py index 9113164..99952f3 100644 --- a/flat_api/aio/api/user_api.py +++ b/flat_api/aio/api/user_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call async def get_user( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -61,7 +61,7 @@ async def get_user( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -111,7 +111,7 @@ async def get_user( @validate_call async def get_user_with_http_info( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -129,7 +129,7 @@ async def get_user_with_http_info( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -179,7 +179,7 @@ async def get_user_with_http_info( @validate_call async def get_user_without_preload_content( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -197,7 +197,7 @@ async def get_user_without_preload_content( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -658,7 +658,7 @@ async def get_user_scores( ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -750,7 +750,7 @@ async def get_user_scores_with_http_info( ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -842,7 +842,7 @@ async def get_user_scores_without_preload_content( ) -> RESTResponseType: """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str diff --git a/flat_api/aio/api_client.py b/flat_api/aio/api_client.py index f1bfeb1..a394b77 100644 --- a/flat_api/aio/api_client.py +++ b/flat_api/aio/api_client.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/configuration.py b/flat_api/aio/configuration.py index 465523f..09805f4 100644 --- a/flat_api/aio/configuration.py +++ b/flat_api/aio/configuration.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -554,7 +554,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.26.0\n"\ + "Version of the API: 2.26.2\n"\ "SDK Package Version: 2.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flat_api/aio/exceptions.py b/flat_api/aio/exceptions.py index 005a786..cc06420 100644 --- a/flat_api/aio/exceptions.py +++ b/flat_api/aio/exceptions.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/__init__.py b/flat_api/aio/models/__init__.py index 153edd0..467e99e 100644 --- a/flat_api/aio/models/__init__.py +++ b/flat_api/aio/models/__init__.py @@ -4,9 +4,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -71,7 +71,6 @@ from flat_api.aio.models.collection_modification import CollectionModification from flat_api.aio.models.collection_privacy import CollectionPrivacy from flat_api.aio.models.collection_type import CollectionType -from flat_api.aio.models.create_lti_configuration200_response import CreateLtiConfiguration200Response from flat_api.aio.models.credit_transaction import CreditTransaction from flat_api.aio.models.edu_library import EduLibrary from flat_api.aio.models.edu_resource import EduResource diff --git a/flat_api/aio/models/add_group_user200_response.py b/flat_api/aio/models/add_group_user200_response.py index a1ec49e..b5bce9e 100644 --- a/flat_api/aio/models/add_group_user200_response.py +++ b/flat_api/aio/models/add_group_user200_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/add_group_user_request.py b/flat_api/aio/models/add_group_user_request.py index b9ddd17..6225bc6 100644 --- a/flat_api/aio/models/add_group_user_request.py +++ b/flat_api/aio/models/add_group_user_request.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/api_access_token.py b/flat_api/aio/models/api_access_token.py index 2372074..f505de4 100644 --- a/flat_api/aio/models/api_access_token.py +++ b/flat_api/aio/models/api_access_token.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class ApiAccessToken(BaseModel): id: Optional[StrictStr] = Field(default=None, description="Unique identifier of this private token") name: Optional[StrictStr] = Field(default=None, description="Name of the personal access token") token: Optional[StrictStr] = Field(default=None, description="The token. This token will only be returned once, then only the first 4 characters will be returned. ") - issued_date: Optional[datetime] = Field(default=None, description="The date then this token was issued ", alias="issuedDate") - expiration_date: Optional[datetime] = Field(default=None, description="The date then this token will expire ", alias="expirationDate") + issued_date: Optional[datetime] = Field(default=None, description="The date when this token was issued ", alias="issuedDate") + expiration_date: Optional[datetime] = Field(default=None, description="The date when this token will expire ", alias="expirationDate") scopes: Optional[List[AppScopes]] = Field(default=None, description="The list of scopes associated to the token ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "token", "issuedDate", "expirationDate", "scopes"] diff --git a/flat_api/aio/models/app_scopes.py b/flat_api/aio/models/app_scopes.py index 412161a..f0207eb 100644 --- a/flat_api/aio/models/app_scopes.py +++ b/flat_api/aio/models/app_scopes.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment.py b/flat_api/aio/models/assignment.py index a5ea9de..91574ef 100644 --- a/flat_api/aio/models/assignment.py +++ b/flat_api/aio/models/assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,11 +44,11 @@ class Assignment(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") diff --git a/flat_api/aio/models/assignment_capabilities.py b/flat_api/aio/models/assignment_capabilities.py index fd54a61..9a6ffba 100644 --- a/flat_api/aio/models/assignment_capabilities.py +++ b/flat_api/aio/models/assignment_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py b/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py index 90571c7..2cefdf8 100644 --- a/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py +++ b/flat_api/aio/models/assignment_capabilities_can_publish_in_class_error.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_copy.py b/flat_api/aio/models/assignment_copy.py index b7e5247..ed61a49 100644 --- a/flat_api/aio/models/assignment_copy.py +++ b/flat_api/aio/models/assignment_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_copy_response.py b/flat_api/aio/models/assignment_copy_response.py index 43c3e02..87b0d93 100644 --- a/flat_api/aio/models/assignment_copy_response.py +++ b/flat_api/aio/models/assignment_copy_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,11 +44,11 @@ class AssignmentCopyResponse(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") diff --git a/flat_api/aio/models/assignment_copy_to_class.py b/flat_api/aio/models/assignment_copy_to_class.py index f931c0a..b258cb0 100644 --- a/flat_api/aio/models/assignment_copy_to_class.py +++ b/flat_api/aio/models/assignment_copy_to_class.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class AssignmentCopyToClass(BaseModel): Copy the assignment to a class """ # noqa: E501 classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") - assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignment will be copied. Must be a draft.") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate"] diff --git a/flat_api/aio/models/assignment_copy_to_resource_library.py b/flat_api/aio/models/assignment_copy_to_resource_library.py index e3a0e30..85c5932 100644 --- a/flat_api/aio/models/assignment_copy_to_resource_library.py +++ b/flat_api/aio/models/assignment_copy_to_resource_library.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class AssignmentCopyToResourceLibrary(BaseModel): """ Copy the assignment to the EDU Resource Library """ # noqa: E501 - library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") + library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will be created, e.g. a folder id or `root`", alias="libraryParent") verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["libraryParent", "verifyIfNotAlreadyInResourceLibrary"] diff --git a/flat_api/aio/models/assignment_group.py b/flat_api/aio/models/assignment_group.py index d4b3685..bf63557 100644 --- a/flat_api/aio/models/assignment_group.py +++ b/flat_api/aio/models/assignment_group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission.py b/flat_api/aio/models/assignment_submission.py index d0c1147..c00b61f 100644 --- a/flat_api/aio/models/assignment_submission.py +++ b/flat_api/aio/models/assignment_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -46,7 +46,7 @@ class AssignmentSubmission(BaseModel): return_date: Optional[StrictStr] = Field(default=None, description="The date when the teacher returned the work", alias="returnDate") return_creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the teacher who returned the submission ", alias="returnCreator") grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set.") - draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission", alias="draftGrade") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.", alias="maxPoints") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") playback: List[AssignmentSubmissionPlayback] diff --git a/flat_api/aio/models/assignment_submission_comment.py b/flat_api/aio/models/assignment_submission_comment.py index 56983e4..8082328 100644 --- a/flat_api/aio/models/assignment_submission_comment.py +++ b/flat_api/aio/models/assignment_submission_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_comment_creation.py b/flat_api/aio/models/assignment_submission_comment_creation.py index f3e3f6f..86e1266 100644 --- a/flat_api/aio/models/assignment_submission_comment_creation.py +++ b/flat_api/aio/models/assignment_submission_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class AssignmentSubmissionCommentCreation(BaseModel): """ - Creation of a assignment submission comment + Creation of an assignment submission comment """ # noqa: E501 comment: StrictStr = Field(description="The comment text") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/assignment_submission_comments.py b/flat_api/aio/models/assignment_submission_comments.py index b499aa9..5b1f518 100644 --- a/flat_api/aio/models/assignment_submission_comments.py +++ b/flat_api/aio/models/assignment_submission_comments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_history.py b/flat_api/aio/models/assignment_submission_history.py index f0e68a1..ac11220 100644 --- a/flat_api/aio/models/assignment_submission_history.py +++ b/flat_api/aio/models/assignment_submission_history.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_history_attachment.py b/flat_api/aio/models/assignment_submission_history_attachment.py index 12c1edf..3fae711 100644 --- a/flat_api/aio/models/assignment_submission_history_attachment.py +++ b/flat_api/aio/models/assignment_submission_history_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_history_state.py b/flat_api/aio/models/assignment_submission_history_state.py index 64ee184..810de63 100644 --- a/flat_api/aio/models/assignment_submission_history_state.py +++ b/flat_api/aio/models/assignment_submission_history_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_lti.py b/flat_api/aio/models/assignment_submission_lti.py index 8f1add3..d0076d3 100644 --- a/flat_api/aio/models/assignment_submission_lti.py +++ b/flat_api/aio/models/assignment_submission_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_playback.py b/flat_api/aio/models/assignment_submission_playback.py index e950918..5713ea1 100644 --- a/flat_api/aio/models/assignment_submission_playback.py +++ b/flat_api/aio/models/assignment_submission_playback.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_state.py b/flat_api/aio/models/assignment_submission_state.py index a1a2230..d591dc8 100644 --- a/flat_api/aio/models/assignment_submission_state.py +++ b/flat_api/aio/models/assignment_submission_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_students_mode.py b/flat_api/aio/models/assignment_submission_students_mode.py index ba298d3..0838698 100644 --- a/flat_api/aio/models/assignment_submission_students_mode.py +++ b/flat_api/aio/models/assignment_submission_students_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_submission_update.py b/flat_api/aio/models/assignment_submission_update.py index 97abb1a..089bcf6 100644 --- a/flat_api/aio/models/assignment_submission_update.py +++ b/flat_api/aio/models/assignment_submission_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,10 +34,10 @@ class AssignmentSubmissionUpdate(BaseModel): attachments: Optional[List[ClassAttachmentCreation]] = None playback: Optional[List[AssignmentSubmissionPlayback]] = None submit: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done") - draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission", alias="draftGrade") grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set.") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") - var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done", alias="return") + var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be returned to the student (teachers only)", alias="return") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attachments", "playback", "submit", "draftGrade", "grade", "exercisesIds", "return"] diff --git a/flat_api/aio/models/assignment_type.py b/flat_api/aio/models/assignment_type.py index 77eef64..b4d3b26 100644 --- a/flat_api/aio/models/assignment_type.py +++ b/flat_api/aio/models/assignment_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/assignment_update.py b/flat_api/aio/models/assignment_update.py index 9b0196c..ac4de13 100644 --- a/flat_api/aio/models/assignment_update.py +++ b/flat_api/aio/models/assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -39,15 +39,15 @@ class AssignmentUpdate(BaseModel): teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") - max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignment with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") diff --git a/flat_api/aio/models/class_assignment.py b/flat_api/aio/models/class_assignment.py index 6511923..1b365fe 100644 --- a/flat_api/aio/models/class_assignment.py +++ b/flat_api/aio/models/class_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -52,11 +52,11 @@ class ClassAssignment(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") @@ -70,7 +70,7 @@ class ClassAssignment(BaseModel): classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the class where this assignment was posted") creation_date: datetime = Field(description="The creation date of this assignment", alias="creationDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") - due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. ", alias="dueDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as past due. ", alias="dueDate") assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") assigned_groups: Optional[List[AssignmentGroup]] = Field(default=None, description="Groups that have access to the assignment (for shared writing assignments)", alias="assignedGroups") diff --git a/flat_api/aio/models/class_assignment_all_of_canvas.py b/flat_api/aio/models/class_assignment_all_of_canvas.py index b2a3149..89d5f23 100644 --- a/flat_api/aio/models/class_assignment_all_of_canvas.py +++ b/flat_api/aio/models/class_assignment_all_of_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ClassAssignmentAllOfCanvas(BaseModel): """ A Canvas LMS assignment """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the assignment on Canvas") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] diff --git a/flat_api/aio/models/class_assignment_all_of_lti.py b/flat_api/aio/models/class_assignment_all_of_lti.py index 3b0a866..3a01e9a 100644 --- a/flat_api/aio/models/class_assignment_all_of_lti.py +++ b/flat_api/aio/models/class_assignment_all_of_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_assignment_all_of_mfc.py b/flat_api/aio/models/class_assignment_all_of_mfc.py index 0a55224..32db1fe 100644 --- a/flat_api/aio/models/class_assignment_all_of_mfc.py +++ b/flat_api/aio/models/class_assignment_all_of_mfc.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ClassAssignmentAllOfMfc(BaseModel): """ A MusicFirst Classroom assignment """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the task on MusicFirst Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] diff --git a/flat_api/aio/models/class_assignment_update.py b/flat_api/aio/models/class_assignment_update.py index d9aaa1f..92a4945 100644 --- a/flat_api/aio/models/class_assignment_update.py +++ b/flat_api/aio/models/class_assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -42,15 +42,15 @@ class ClassAssignmentUpdate(BaseModel): teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") - max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignment with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") @@ -58,7 +58,7 @@ class ClassAssignmentUpdate(BaseModel): allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") state: Optional[StrictStr] = Field(default=None, description="State of the assignment") - due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. ", alias="dueDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as past due. If not set, the assignment won't have a due date. ", alias="dueDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") google_classroom: Optional[ClassAssignmentUpdateAllOfGoogleClassroom] = Field(default=None, alias="googleClassroom") microsoft_graph: Optional[ClassAssignmentUpdateAllOfMicrosoftGraph] = Field(default=None, alias="microsoftGraph") diff --git a/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py b/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py index b203ce2..4fe44c7 100644 --- a/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py +++ b/flat_api/aio/models/class_assignment_update_all_of_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py b/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py index de42c4b..7c6897d 100644 --- a/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py +++ b/flat_api/aio/models/class_assignment_update_all_of_microsoft_graph.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_attachment_creation.py b/flat_api/aio/models/class_attachment_creation.py index 51bc54d..0b526dc 100644 --- a/flat_api/aio/models/class_attachment_creation.py +++ b/flat_api/aio/models/class_attachment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,12 +27,12 @@ class ClassAttachmentCreation(BaseModel): """ - Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + Attachment creation for an assignment or stream post. This attachment must contain a `score` or a `url`; its details are resolved and returned as a `MediaAttachment` once the assignment or stream post is created. """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, description="The type of the attachment posted: * `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. ") score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. ") - worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") - revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="A unique worksheet identifier") + revision: Optional[StrictStr] = Field(default=None, description="A unique revision identifier of a score") part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") diff --git a/flat_api/aio/models/class_creation.py b/flat_api/aio/models/class_creation.py index a8dcf66..b34df8e 100644 --- a/flat_api/aio/models/class_creation.py +++ b/flat_api/aio/models/class_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details.py b/flat_api/aio/models/class_details.py index 92d846f..6efe838 100644 --- a/flat_api/aio/models/class_details.py +++ b/flat_api/aio/models/class_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,13 +44,13 @@ class ClassDetails(BaseModel): state: ClassState name: StrictStr = Field(description="The name of the class") section: Optional[StrictStr] = Field(default=None, description="The section of the class") - description: Optional[StrictStr] = Field(default=None, description="An optionnal description for this class") + description: Optional[StrictStr] = Field(default=None, description="An optional description for this class") organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning this class") owner: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User owning this class") - creation_date: datetime = Field(description="The date when the class was create", alias="creationDate") + creation_date: datetime = Field(description="The date when the class was created", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The date when the class was last modified", alias="modificationDate") enrollment_code: Optional[StrictStr] = Field(default=None, description="[Teachers only] The enrollment code that can be used by the students to join the class ", alias="enrollmentCode") - theme: Optional[StrictStr] = Field(default=None, description="The theme identifier using in Flat User Interface") + theme: Optional[StrictStr] = Field(default=None, description="The theme identifier used in the Flat user interface") assignments_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of assignments created in the class", alias="assignmentsCount") students_group: Optional[GroupDetails] = Field(default=None, alias="studentsGroup") teachers_group: Optional[GroupDetails] = Field(default=None, alias="teachersGroup") diff --git a/flat_api/aio/models/class_details_canvas.py b/flat_api/aio/models/class_details_canvas.py index cbf2502..7f218f3 100644 --- a/flat_api/aio/models/class_details_canvas.py +++ b/flat_api/aio/models/class_details_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class ClassDetailsCanvas(BaseModel): """ - Meta information provided by Canvs LMS + Meta information provided by Canvas LMS """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas") domain: Optional[StrictStr] = Field(default=None, description="Canvas instance domain (e.g. \"canvas.instructure.com\")") diff --git a/flat_api/aio/models/class_details_clever.py b/flat_api/aio/models/class_details_clever.py index 8b3e893..23a8d78 100644 --- a/flat_api/aio/models/class_details_clever.py +++ b/flat_api/aio/models/class_details_clever.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_google_classroom.py b/flat_api/aio/models/class_details_google_classroom.py index 82a3bd1..2f0921a 100644 --- a/flat_api/aio/models/class_details_google_classroom.py +++ b/flat_api/aio/models/class_details_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_google_drive.py b/flat_api/aio/models/class_details_google_drive.py index d6b9c49..06024f7 100644 --- a/flat_api/aio/models/class_details_google_drive.py +++ b/flat_api/aio/models/class_details_google_drive.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_issues.py b/flat_api/aio/models/class_details_issues.py index 412d81c..4a33a72 100644 --- a/flat_api/aio/models/class_details_issues.py +++ b/flat_api/aio/models/class_details_issues.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_issues_sync_inner.py b/flat_api/aio/models/class_details_issues_sync_inner.py index 42c8098..b311472 100644 --- a/flat_api/aio/models/class_details_issues_sync_inner.py +++ b/flat_api/aio/models/class_details_issues_sync_inner.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_lti.py b/flat_api/aio/models/class_details_lti.py index e53098e..cbd3ff3 100644 --- a/flat_api/aio/models/class_details_lti.py +++ b/flat_api/aio/models/class_details_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_details_mfc.py b/flat_api/aio/models/class_details_mfc.py index f21f807..4d00904 100644 --- a/flat_api/aio/models/class_details_mfc.py +++ b/flat_api/aio/models/class_details_mfc.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class ClassDetailsMfc(BaseModel): """ - Meta information provided by Canvs LMS + Meta information provided by MusicFirst Classroom """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom class", alias="alternateLink") diff --git a/flat_api/aio/models/class_details_microsoft_graph.py b/flat_api/aio/models/class_details_microsoft_graph.py index edd2e3c..637d56d 100644 --- a/flat_api/aio/models/class_details_microsoft_graph.py +++ b/flat_api/aio/models/class_details_microsoft_graph.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_grade_level.py b/flat_api/aio/models/class_grade_level.py index 112409e..093b5c8 100644 --- a/flat_api/aio/models/class_grade_level.py +++ b/flat_api/aio/models/class_grade_level.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_roles.py b/flat_api/aio/models/class_roles.py index b1c6f03..e13d741 100644 --- a/flat_api/aio/models/class_roles.py +++ b/flat_api/aio/models/class_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_state.py b/flat_api/aio/models/class_state.py index 51d66f3..a7c3ed5 100644 --- a/flat_api/aio/models/class_state.py +++ b/flat_api/aio/models/class_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/class_update.py b/flat_api/aio/models/class_update.py index d354427..d747245 100644 --- a/flat_api/aio/models/class_update.py +++ b/flat_api/aio/models/class_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection.py b/flat_api/aio/models/collection.py index 0c4172a..8b68d7d 100644 --- a/flat_api/aio/models/collection.py +++ b/flat_api/aio/models/collection.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -54,7 +54,7 @@ class Collection(BaseModel): is_pinned: Optional[StrictBool] = Field(default=None, description="Whether the collection is pinned by the owner", alias="isPinned") contents: CollectionContents capabilities: CollectionCapabilities - collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + collections: Optional[List[StrictStr]] = Field(default=None, description="The list of parent collections this score is included in. Please note that you might not have access to all of them.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "labelKey", "privacy", "sharingKey", "app", "creationDate", "modificationDate", "user", "organization", "rights", "collaborators", "isPinned", "contents", "capabilities", "collections"] diff --git a/flat_api/aio/models/collection_app.py b/flat_api/aio/models/collection_app.py index c057ae5..e8888fb 100644 --- a/flat_api/aio/models/collection_app.py +++ b/flat_api/aio/models/collection_app.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_capabilities.py b/flat_api/aio/models/collection_capabilities.py index 1d9a09e..62a3724 100644 --- a/flat_api/aio/models/collection_capabilities.py +++ b/flat_api/aio/models/collection_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_contents.py b/flat_api/aio/models/collection_contents.py index 9d8933b..f209849 100644 --- a/flat_api/aio/models/collection_contents.py +++ b/flat_api/aio/models/collection_contents.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_creation.py b/flat_api/aio/models/collection_creation.py index 7357433..19a4557 100644 --- a/flat_api/aio/models/collection_creation.py +++ b/flat_api/aio/models/collection_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_modification.py b/flat_api/aio/models/collection_modification.py index 1b742c1..dfb3a76 100644 --- a/flat_api/aio/models/collection_modification.py +++ b/flat_api/aio/models/collection_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_privacy.py b/flat_api/aio/models/collection_privacy.py index 46d5eca..daac96e 100644 --- a/flat_api/aio/models/collection_privacy.py +++ b/flat_api/aio/models/collection_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/collection_type.py b/flat_api/aio/models/collection_type.py index 7a49bda..170f57d 100644 --- a/flat_api/aio/models/collection_type.py +++ b/flat_api/aio/models/collection_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class CollectionType(str, Enum): """ - Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores + Type of the collection. The type will influence the capabilities available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores """ """ diff --git a/flat_api/aio/models/create_lti_configuration200_response.py b/flat_api/aio/models/create_lti_configuration200_response.py deleted file mode 100644 index 87b0b3b..0000000 --- a/flat_api/aio/models/create_lti_configuration200_response.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.26.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from flat_api.aio.models.lti_configuration import LtiConfiguration -from flat_api.aio.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices -from flat_api.aio.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CreateLtiConfiguration200Response(LtiConfiguration): - """ - CreateLtiConfiguration200Response - """ # noqa: E501 - registration_url: Optional[StrictStr] = Field(default=None, description="One-time registration URL (only for dynamic registration)", alias="registrationUrl") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateLtiConfiguration200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of tool - if self.tool: - _dict['tool'] = self.tool.to_dict() - # override the default output from pydantic by calling `to_dict()` of supported_services - if self.supported_services: - _dict['supportedServices'] = self.supported_services.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if last_used_date (nullable) is None - # and model_fields_set contains the field - if self.last_used_date is None and "last_used_date" in self.model_fields_set: - _dict['lastUsedDate'] = None - - # set to None if registration_completion_date (nullable) is None - # and model_fields_set contains the field - if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: - _dict['registrationCompletionDate'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateLtiConfiguration200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "ltiVersion": obj.get("ltiVersion"), - "organizationId": obj.get("organizationId"), - "organizationName": obj.get("organizationName"), - "creatorId": obj.get("creatorId"), - "creationDate": obj.get("creationDate"), - "lastUsedDate": obj.get("lastUsedDate"), - "status": obj.get("status"), - "consumerKey": obj.get("consumerKey"), - "consumerSecret": obj.get("consumerSecret"), - "lms": obj.get("lms"), - "name": obj.get("name"), - "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, - "mode": obj.get("mode"), - "platformIss": obj.get("platformIss"), - "platformName": obj.get("platformName"), - "clientId": obj.get("clientId"), - "deploymentId": obj.get("deploymentId"), - "accessTokenUrl": obj.get("accessTokenUrl"), - "authorizationUrl": obj.get("authorizationUrl"), - "jwksUrl": obj.get("jwksUrl"), - "deploymentMode": obj.get("deploymentMode"), - "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, - "publicKeysetUrl": obj.get("publicKeysetUrl"), - "initiateLoginUrl": obj.get("initiateLoginUrl"), - "redirectUris": obj.get("redirectUris"), - "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, - "parentId": obj.get("parentId"), - "deploymentKey": obj.get("deploymentKey"), - "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), - "deploymentBreakdownId": obj.get("deploymentBreakdownId"), - "registrationToken": obj.get("registrationToken"), - "registrationUrl": obj.get("registrationUrl"), - "registrationTokenUsed": obj.get("registrationTokenUsed"), - "registrationCompletionDate": obj.get("registrationCompletionDate") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - - diff --git a/flat_api/aio/models/credit_transaction.py b/flat_api/aio/models/credit_transaction.py index e4ebbaf..a346f0c 100644 --- a/flat_api/aio/models/credit_transaction.py +++ b/flat_api/aio/models/credit_transaction.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_library.py b/flat_api/aio/models/edu_library.py index 610e62b..fc5cded 100644 --- a/flat_api/aio/models/edu_library.py +++ b/flat_api/aio/models/edu_library.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class EduLibrary(BaseModel): A Flat for Education Library """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") - name: StrictStr = Field(description="Name of the lirbary") + name: StrictStr = Field(description="Name of the library") type: StrictStr = Field(description="Type of the library") visibility: StrictStr = Field(description="Visibility of the library") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/edu_resource.py b/flat_api/aio/models/edu_resource.py index 14c771a..3ccab75 100644 --- a/flat_api/aio/models/edu_resource.py +++ b/flat_api/aio/models/edu_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_assignment_creation.py b/flat_api/aio/models/edu_resource_assignment_creation.py index 0760582..acca35c 100644 --- a/flat_api/aio/models/edu_resource_assignment_creation.py +++ b/flat_api/aio/models/edu_resource_assignment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_capabilities.py b/flat_api/aio/models/edu_resource_capabilities.py index 183bea9..2908470 100644 --- a/flat_api/aio/models/edu_resource_capabilities.py +++ b/flat_api/aio/models/edu_resource_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_copy.py b/flat_api/aio/models/edu_resource_copy.py index 5ef7a15..c4a4278 100644 --- a/flat_api/aio/models/edu_resource_copy.py +++ b/flat_api/aio/models/edu_resource_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceCopy(BaseModel): """ Copy an education resource """ # noqa: E501 - destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. ") + destination: StrictStr = Field(description="Unique identifier of the destination folder for the copy. This can also be `root` to copy the resource at the root of the user resource library. ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] diff --git a/flat_api/aio/models/edu_resource_creation.py b/flat_api/aio/models/edu_resource_creation.py index 3fe21ce..5ea589f 100644 --- a/flat_api/aio/models/edu_resource_creation.py +++ b/flat_api/aio/models/edu_resource_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class EduResourceCreation(BaseModel): """ # noqa: E501 type: EduResourceType title: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="Title of the resource") - parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`") + parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will be created, e.g. a folder id or `root`") sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") resource: Optional[EduResourceAssignmentCreation] = None diff --git a/flat_api/aio/models/edu_resource_folder.py b/flat_api/aio/models/edu_resource_folder.py index 2cd4282..637af48 100644 --- a/flat_api/aio/models/edu_resource_folder.py +++ b/flat_api/aio/models/edu_resource_folder.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class EduResourceFolder(BaseModel): Education resources folder """ # noqa: E501 title: Optional[StrictStr] = Field(default=None, description="Title of the folder") - assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment type of the resources that are included in the folder,", alias="assignmentsTypes") + assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment types of the resources included in the folder", alias="assignmentsTypes") resources_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of resources inside the folder", alias="resourcesCount") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "assignmentsTypes", "resourcesCount"] diff --git a/flat_api/aio/models/edu_resource_lti_link.py b/flat_api/aio/models/edu_resource_lti_link.py index 21c2e76..c946422 100644 --- a/flat_api/aio/models/edu_resource_lti_link.py +++ b/flat_api/aio/models/edu_resource_lti_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceLtiLink(BaseModel): """ LTI Link details for the class """ # noqa: E501 - lti_url: StrictStr = Field(description="An URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") + lti_url: StrictStr = Field(description="A URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ltiUrl"] diff --git a/flat_api/aio/models/edu_resource_move.py b/flat_api/aio/models/edu_resource_move.py index 8212436..f622df6 100644 --- a/flat_api/aio/models/edu_resource_move.py +++ b/flat_api/aio/models/edu_resource_move.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceMove(BaseModel): """ Move an education resource """ # noqa: E501 - destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. ") + destination: StrictStr = Field(description="Unique identifier of the destination folder for this resource. This can also be `root` to move the resource at the root of the user resource library. ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] diff --git a/flat_api/aio/models/edu_resource_privacy.py b/flat_api/aio/models/edu_resource_privacy.py index 21354b8..b808c3e 100644 --- a/flat_api/aio/models/edu_resource_privacy.py +++ b/flat_api/aio/models/edu_resource_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_resource.py b/flat_api/aio/models/edu_resource_resource.py index d4b2f34..35e4d29 100644 --- a/flat_api/aio/models/edu_resource_resource.py +++ b/flat_api/aio/models/edu_resource_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_type.py b/flat_api/aio/models/edu_resource_type.py index ca62b58..1a8e0e4 100644 --- a/flat_api/aio/models/edu_resource_type.py +++ b/flat_api/aio/models/edu_resource_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_update.py b/flat_api/aio/models/edu_resource_update.py index 9d175c9..cfcebda 100644 --- a/flat_api/aio/models/edu_resource_update.py +++ b/flat_api/aio/models/edu_resource_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/edu_resource_use_in_class.py b/flat_api/aio/models/edu_resource_use_in_class.py index 2a2c70e..b63a5d6 100644 --- a/flat_api/aio/models/edu_resource_use_in_class.py +++ b/flat_api/aio/models/edu_resource_use_in_class.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class EduResourceUseInClass(BaseModel): Use an education resource in class """ # noqa: E501 classroom: StrictStr = Field(description="The destination classroom where the resource will be copied.") - assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignment will be copied. Must be a draft.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["classroom", "assignment"] diff --git a/flat_api/aio/models/flat_error_response.py b/flat_api/aio/models/flat_error_response.py index cd87fc5..92cbab6 100644 --- a/flat_api/aio/models/flat_error_response.py +++ b/flat_api/aio/models/flat_error_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class FlatErrorResponse(BaseModel): """ # noqa: E501 code: StrictStr = Field(description="A corresponding code for this error") message: StrictStr = Field(description="A printable message for this error") - id: Optional[StrictStr] = Field(default=None, description="An unique error identifier generated for the request") + id: Optional[StrictStr] = Field(default=None, description="A unique error identifier generated for the request") param: Optional[StrictStr] = Field(default=None, description="The related parameter that caused the error") provider_message: Optional[StrictStr] = Field(default=None, description="The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. ", alias="providerMessage") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/google_classroom_coursework.py b/flat_api/aio/models/google_classroom_coursework.py index cb8191c..6b9d252 100644 --- a/flat_api/aio/models/google_classroom_coursework.py +++ b/flat_api/aio/models/google_classroom_coursework.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/google_classroom_submission.py b/flat_api/aio/models/google_classroom_submission.py index 6975dde..135982a 100644 --- a/flat_api/aio/models/google_classroom_submission.py +++ b/flat_api/aio/models/google_classroom_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/grade.py b/flat_api/aio/models/grade.py index 16a122a..f23960f 100644 --- a/flat_api/aio/models/grade.py +++ b/flat_api/aio/models/grade.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/group.py b/flat_api/aio/models/group.py index e79a3d0..7e360d1 100644 --- a/flat_api/aio/models/group.py +++ b/flat_api/aio/models/group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/group_creation.py b/flat_api/aio/models/group_creation.py index cbcbe9d..b7eb08d 100644 --- a/flat_api/aio/models/group_creation.py +++ b/flat_api/aio/models/group_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/group_details.py b/flat_api/aio/models/group_details.py index 6f5bd55..3c67234 100644 --- a/flat_api/aio/models/group_details.py +++ b/flat_api/aio/models/group_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,12 +34,12 @@ class GroupDetails(BaseModel): name: StrictStr = Field(description="The displayable name of the group") type: GroupType organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning the group") - classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup'") + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classStudentsSubGroup' or 'assignmentStudentsSubGroup'") assignment: Optional[StrictStr] = Field(default=None, description="The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'.") parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") - creation_date: datetime = Field(description="The date when the group was create", alias="creationDate") + creation_date: datetime = Field(description="The date when the group was created", alias="creationDate") users_count: Union[StrictFloat, StrictInt] = Field(description="The number of students in this group", alias="usersCount") - read_only: StrictBool = Field(description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") + read_only: StrictBool = Field(description="`true` if the properties and members of this group are read-only ", alias="readOnly") tags: List[StrictStr] = Field(description="Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "classroom", "assignment", "parent", "creationDate", "usersCount", "readOnly", "tags"] diff --git a/flat_api/aio/models/group_type.py b/flat_api/aio/models/group_type.py index c9e76a9..5b6f4c1 100644 --- a/flat_api/aio/models/group_type.py +++ b/flat_api/aio/models/group_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class GroupType(str, Enum): """ - The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. + The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automatically by Flat that contains the teachers of a class * `classStudents`: A group created automatically by Flat that contains the students of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. """ """ diff --git a/flat_api/aio/models/license_mode.py b/flat_api/aio/models/license_mode.py index 7758678..33a7ae8 100644 --- a/flat_api/aio/models/license_mode.py +++ b/flat_api/aio/models/license_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/license_sources.py b/flat_api/aio/models/license_sources.py index 0ab0988..39e7617 100644 --- a/flat_api/aio/models/license_sources.py +++ b/flat_api/aio/models/license_sources.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lms_name.py b/flat_api/aio/models/lms_name.py index 5648b1b..8c00a92 100644 --- a/flat_api/aio/models/lms_name.py +++ b/flat_api/aio/models/lms_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration.py b/flat_api/aio/models/lti_configuration.py index 46a8973..1475950 100644 --- a/flat_api/aio/models/lti_configuration.py +++ b/flat_api/aio/models/lti_configuration.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,7 +44,6 @@ class LtiConfiguration(BaseModel): discriminator_value_class_map: Dict[str, str] = { - 'createLtiConfiguration_200_response': 'CreateLtiConfiguration200Response' } def __init__(self, *args, **kwargs) -> None: diff --git a/flat_api/aio/models/lti_configuration1p1.py b/flat_api/aio/models/lti_configuration1p1.py index f2dab43..611b8a9 100644 --- a/flat_api/aio/models/lti_configuration1p1.py +++ b/flat_api/aio/models/lti_configuration1p1.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p1_all_of_tool.py b/flat_api/aio/models/lti_configuration1p1_all_of_tool.py index 39bbbbc..bc9fe46 100644 --- a/flat_api/aio/models/lti_configuration1p1_all_of_tool.py +++ b/flat_api/aio/models/lti_configuration1p1_all_of_tool.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3.py b/flat_api/aio/models/lti_configuration1p3.py index e770f6e..253fb53 100644 --- a/flat_api/aio/models/lti_configuration1p3.py +++ b/flat_api/aio/models/lti_configuration1p3.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_base.py b/flat_api/aio/models/lti_configuration1p3_base.py index 100f49e..8d680b2 100644 --- a/flat_api/aio/models/lti_configuration1p3_base.py +++ b/flat_api/aio/models/lti_configuration1p3_base.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services.py index 5a6cfd1..81e9fa6 100644 --- a/flat_api/aio/models/lti_configuration1p3_base_supported_services.py +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py index 30cc3b5..644a272 100644 --- a/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_ags.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class LtiConfiguration1p3BaseSupportedServicesAgs(BaseModel): """ # noqa: E501 available: Optional[StrictBool] = Field(default=None, description="Whether AGS claims were detected in launches from this platform") version: Optional[StrictStr] = Field(default=None, description="AGS version supported (e.g., \"2.0\")") - enabled: Optional[StrictBool] = Field(default=None, description="Whether we have AGS enabled for this platform") + enabled: Optional[StrictBool] = Field(default=None, description="Whether AGS is enabled for this platform") lineitems_url: Optional[StrictStr] = Field(default=None, description="Base URL for line items operations as provided by the platform", alias="lineitemsUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["available", "version", "enabled", "lineitemsUrl"] diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py index a92f835..ca16b82 100644 --- a/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_deep_linking.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py b/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py index 580fff9..5601cf4 100644 --- a/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py +++ b/flat_api/aio/models/lti_configuration1p3_base_supported_services_nrps.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class LtiConfiguration1p3BaseSupportedServicesNrps(BaseModel): """ # noqa: E501 available: Optional[StrictBool] = Field(default=None, description="Whether NRPS claims were detected in launches from this platform") version: Optional[StrictStr] = Field(default=None, description="NRPS version supported (e.g., \"2.0\")") - enabled: Optional[StrictBool] = Field(default=None, description="Whether we have NRPS enabled for this platform") + enabled: Optional[StrictBool] = Field(default=None, description="Whether NRPS is enabled for this platform") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["available", "version", "enabled"] diff --git a/flat_api/aio/models/lti_configuration1p3_base_tool.py b/flat_api/aio/models/lti_configuration1p3_base_tool.py index 9fd38e6..bcecd7c 100644 --- a/flat_api/aio/models/lti_configuration1p3_base_tool.py +++ b/flat_api/aio/models/lti_configuration1p3_base_tool.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_deployment.py b/flat_api/aio/models/lti_configuration1p3_deployment.py index f248c5d..26cbd96 100644 --- a/flat_api/aio/models/lti_configuration1p3_deployment.py +++ b/flat_api/aio/models/lti_configuration1p3_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_dynamic.py b/flat_api/aio/models/lti_configuration1p3_dynamic.py index 772cad1..f3ac322 100644 --- a/flat_api/aio/models/lti_configuration1p3_dynamic.py +++ b/flat_api/aio/models/lti_configuration1p3_dynamic.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration1p3_manual.py b/flat_api/aio/models/lti_configuration1p3_manual.py index 4ef9ebd..c247f2a 100644 --- a/flat_api/aio/models/lti_configuration1p3_manual.py +++ b/flat_api/aio/models/lti_configuration1p3_manual.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_base.py b/flat_api/aio/models/lti_configuration_base.py index 876e041..16a176c 100644 --- a/flat_api/aio/models/lti_configuration_base.py +++ b/flat_api/aio/models/lti_configuration_base.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_create.py b/flat_api/aio/models/lti_configuration_create.py index a9bb2c4..d584318 100644 --- a/flat_api/aio/models/lti_configuration_create.py +++ b/flat_api/aio/models/lti_configuration_create.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_create1p1.py b/flat_api/aio/models/lti_configuration_create1p1.py index 32e8ea9..98df1f5 100644 --- a/flat_api/aio/models/lti_configuration_create1p1.py +++ b/flat_api/aio/models/lti_configuration_create1p1.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_create1p3_deployment.py b/flat_api/aio/models/lti_configuration_create1p3_deployment.py index 8a261d9..096a8e2 100644 --- a/flat_api/aio/models/lti_configuration_create1p3_deployment.py +++ b/flat_api/aio/models/lti_configuration_create1p3_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class LtiConfigurationCreate1p3Deployment(BaseModel): LTI 1.3 deployment-based configuration creation """ # noqa: E501 mode: StrictStr = Field(description="LTI 1.3 deployment-based creation mode") - deployment_type: StrictStr = Field(description="Parent platform key (e.g., canvas, blackboard, schoology, classlink)", alias="deploymentType") + deployment_type: StrictStr = Field(description="Parent platform key (e.g., blackboard, schoology, classlink, manabipocket, manabipocket-stg)", alias="deploymentType") deployment_id: StrictStr = Field(description="Deployment identifier provided by the platform", alias="deploymentId") client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id for the tenant; required for ClassLink deployments", alias="clientId") deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology)", alias="deploymentBreakdownId") diff --git a/flat_api/aio/models/lti_configuration_create1p3_dynamic.py b/flat_api/aio/models/lti_configuration_create1p3_dynamic.py index 42ace80..ae23a79 100644 --- a/flat_api/aio/models/lti_configuration_create1p3_dynamic.py +++ b/flat_api/aio/models/lti_configuration_create1p3_dynamic.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py b/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py index 546fa43..9f04a3b 100644 --- a/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py +++ b/flat_api/aio/models/lti_configuration_create1p3_dynamic_platform_info.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_create1p3_manual.py b/flat_api/aio/models/lti_configuration_create1p3_manual.py index c52d1a1..63300a4 100644 --- a/flat_api/aio/models/lti_configuration_create1p3_manual.py +++ b/flat_api/aio/models/lti_configuration_create1p3_manual.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_update.py b/flat_api/aio/models/lti_configuration_update.py index 52ac125..d253d7a 100644 --- a/flat_api/aio/models/lti_configuration_update.py +++ b/flat_api/aio/models/lti_configuration_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_update_deployment.py b/flat_api/aio/models/lti_configuration_update_deployment.py index 910c8eb..c0b327c 100644 --- a/flat_api/aio/models/lti_configuration_update_deployment.py +++ b/flat_api/aio/models/lti_configuration_update_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_configuration_update_standalone.py b/flat_api/aio/models/lti_configuration_update_standalone.py index b21686a..0b33294 100644 --- a/flat_api/aio/models/lti_configuration_update_standalone.py +++ b/flat_api/aio/models/lti_configuration_update_standalone.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/lti_credentials.py b/flat_api/aio/models/lti_credentials.py index a52582a..34b3b2c 100644 --- a/flat_api/aio/models/lti_credentials.py +++ b/flat_api/aio/models/lti_credentials.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,14 +28,14 @@ class LtiCredentials(BaseModel): """ - A couple of LTI 1.x OAuth credentials + A pair of LTI 1.1 OAuth credentials """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this couple of credentials") - name: Optional[StrictStr] = Field(default=None, description="Name of the couple of credentials") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this pair of credentials") + name: Optional[StrictStr] = Field(default=None, description="Name of the pair of credentials") lms: Optional[LmsName] = None organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization associated to these credentials") creator: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user who created these credentials") - creation_date: Optional[datetime] = Field(default=None, description="The creation date of thse credentials", alias="creationDate") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of these credentials", alias="creationDate") last_usage: Optional[datetime] = Field(default=None, description="The last time these credentials were used", alias="lastUsage") consumer_key: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Key", alias="consumerKey") consumer_secret: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Secret", alias="consumerSecret") diff --git a/flat_api/aio/models/lti_credentials_creation.py b/flat_api/aio/models/lti_credentials_creation.py index a2d40b5..a22b670 100644 --- a/flat_api/aio/models/lti_credentials_creation.py +++ b/flat_api/aio/models/lti_credentials_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,9 +28,9 @@ class LtiCredentialsCreation(BaseModel): """ - Creation of a couple of LTI 1.x OAuth credentials + Creation of a pair of LTI 1.1 OAuth credentials """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the couple of credentials") + name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the pair of credentials") lms: LmsName additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "lms"] diff --git a/flat_api/aio/models/media_attachment.py b/flat_api/aio/models/media_attachment.py index bd46eee..07a34d7 100644 --- a/flat_api/aio/models/media_attachment.py +++ b/flat_api/aio/models/media_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,10 +29,10 @@ class MediaAttachment(BaseModel): """ Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object """ # noqa: E501 - type: StrictStr = Field(description="The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") - score: Optional[StrictStr] = Field(default=None, description="An unique Flat score identifier") - revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") - worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + type: StrictStr = Field(description="The resolved type of the attachment: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") + score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier") + revision: Optional[StrictStr] = Field(default=None, description="A unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="A unique worksheet identifier") dedicated: Optional[StrictBool] = Field(default=None, description="True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment") track: Optional[StrictStr] = Field(default=None, description="A unique track identifier") part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") @@ -46,11 +46,11 @@ class MediaAttachment(BaseModel): url: Optional[StrictStr] = Field(default=None, description="The url of the attachment") thumbnail_url: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment ", alias="thumbnailUrl") thumbnail_width: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailWidth") - thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailHeight") + thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the height of the thumbnail ", alias="thumbnailHeight") author_name: Optional[StrictStr] = Field(default=None, description="The resolved author name of the attachment", alias="authorName") author_url: Optional[StrictStr] = Field(default=None, description="The resolved author url of the attachment", alias="authorUrl") icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the icon", alias="iconUrl") - mime_type: Optional[StrictStr] = Field(default=None, description="The mine type of the file", alias="mimeType") + mime_type: Optional[StrictStr] = Field(default=None, description="The MIME type of the file", alias="mimeType") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") teacher_only: Optional[StrictBool] = Field(default=False, description="If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. ", alias="teacherOnly") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/media_score_sharing_mode.py b/flat_api/aio/models/media_score_sharing_mode.py index 90e7e14..b93c5fb 100644 --- a/flat_api/aio/models/media_score_sharing_mode.py +++ b/flat_api/aio/models/media_score_sharing_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/microsoft_graph_assignment.py b/flat_api/aio/models/microsoft_graph_assignment.py index 299edef..f0d46c0 100644 --- a/flat_api/aio/models/microsoft_graph_assignment.py +++ b/flat_api/aio/models/microsoft_graph_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/microsoft_graph_submission.py b/flat_api/aio/models/microsoft_graph_submission.py index 8014efe..49bf08f 100644 --- a/flat_api/aio/models/microsoft_graph_submission.py +++ b/flat_api/aio/models/microsoft_graph_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_capabilities.py b/flat_api/aio/models/omr_capabilities.py index 2868202..3897d4b 100644 --- a/flat_api/aio/models/omr_capabilities.py +++ b/flat_api/aio/models/omr_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_details_step_data.py b/flat_api/aio/models/omr_details_step_data.py index f268321..c89a7ab 100644 --- a/flat_api/aio/models/omr_details_step_data.py +++ b/flat_api/aio/models/omr_details_step_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class OmrDetailsStepData(BaseModel): """ - Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). + Detected score details for the client to review before the score is built. `title` and `instruments` are detected from the input; the language is not detected and is not part of this payload (read the job's `locales`, set at creation). """ # noqa: E501 step: StrictStr = Field(description="Discriminator for `OmrPendingStep.data`; always `details` for this payload.") title: Optional[StrictStr] = Field(default=None, description="OCR-detected work title.") diff --git a/flat_api/aio/models/omr_details_submission.py b/flat_api/aio/models/omr_details_submission.py index 6077574..74312c6 100644 --- a/flat_api/aio/models/omr_details_submission.py +++ b/flat_api/aio/models/omr_details_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_detected_instrument.py b/flat_api/aio/models/omr_detected_instrument.py index e6e19e5..027d32d 100644 --- a/flat_api/aio/models/omr_detected_instrument.py +++ b/flat_api/aio/models/omr_detected_instrument.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_imported_metadata.py b/flat_api/aio/models/omr_imported_metadata.py index 38a8ae4..e63d5b9 100644 --- a/flat_api/aio/models/omr_imported_metadata.py +++ b/flat_api/aio/models/omr_imported_metadata.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_instrument_override.py b/flat_api/aio/models/omr_instrument_override.py index 984298c..2f343b6 100644 --- a/flat_api/aio/models/omr_instrument_override.py +++ b/flat_api/aio/models/omr_instrument_override.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job.py b/flat_api/aio/models/omr_job.py index 433f716..696c06a 100644 --- a/flat_api/aio/models/omr_job.py +++ b/flat_api/aio/models/omr_job.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.aio.models.omr_imported_metadata import OmrImportedMetadata from flat_api.aio.models.omr_job_file_metadata import OmrJobFileMetadata @@ -42,6 +42,7 @@ class OmrJob(BaseModel): status: OmrJobStatus output: OmrJobOutput interactive_steps: List[OmrStepName] = Field(description="Steps this job pauses at for client input, echoing the value set at creation.", alias="interactiveSteps") + auto_rotate: Optional[StrictBool] = Field(default=None, description="Whether the job was created with `autoRotate`, echoing the value set at creation.", alias="autoRotate") locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. ") current_step: Optional[OmrStepName] = Field(default=None, description="The pending step when `status` is `awaitingInput`. Omitted otherwise.", alias="currentStep") pending_step: Optional[OmrPendingStep] = Field(default=None, alias="pendingStep") @@ -56,7 +57,7 @@ class OmrJob(BaseModel): creation_date: Optional[datetime] = Field(default=None, description="When the job was created.", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="When the job was last updated.", alias="modificationDate") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] + __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "autoRotate", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] model_config = ConfigDict( validate_by_name=True, @@ -138,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, "interactiveSteps": obj.get("interactiveSteps"), + "autoRotate": obj.get("autoRotate"), "locales": obj.get("locales"), "currentStep": obj.get("currentStep"), "pendingStep": OmrPendingStep.from_dict(obj["pendingStep"]) if obj.get("pendingStep") is not None else None, diff --git a/flat_api/aio/models/omr_job_creation.py b/flat_api/aio/models/omr_job_creation.py index 5c4b6dd..b6184ae 100644 --- a/flat_api/aio/models/omr_job_creation.py +++ b/flat_api/aio/models/omr_job_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,13 +33,14 @@ class OmrJobCreation(BaseModel): """ # noqa: E501 output: Optional[OmrJobOutput] = OmrJobOutput.LIBRARY interactive_steps: Optional[List[OmrStepName]] = Field(default=None, description="Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. ", alias="interactiveSteps") - locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. ") + auto_rotate: Optional[StrictBool] = Field(default=False, description="Let the server detect and correct pages uploaded sideways or upside down (90/180/270°) before recognition. Off by default: pages are recognized in the orientation they are uploaded in, which is the right choice when your client lets the user rotate pages before upload. Enable it when it does not, for example a server-to-server integration importing scans as they come. Small tilt correction (a few degrees) always runs. ", alias="autoRotate") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry is the primary reading language. This is the input hint; the main language can be confirmed or corrected at the `details` step. ") collection: Optional[StrictStr] = Field(default=None, description="Target collection ID. Only used when `output` is `library`.") idempotency_key: Optional[StrictStr] = Field(default=None, description="Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. ", alias="idempotencyKey") files: Optional[List[OmrJobInputFile]] = Field(default=None, description="Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`.") auto_start: Optional[StrictBool] = Field(default=None, description="Start processing immediately. Only valid when `files` is provided.", alias="autoStart") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "locales", "collection", "idempotencyKey", "files", "autoStart"] + __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "autoRotate", "locales", "collection", "idempotencyKey", "files", "autoStart"] model_config = ConfigDict( validate_by_name=True, @@ -108,6 +109,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, "interactiveSteps": obj.get("interactiveSteps"), + "autoRotate": obj.get("autoRotate") if obj.get("autoRotate") is not None else False, "locales": obj.get("locales"), "collection": obj.get("collection"), "idempotencyKey": obj.get("idempotencyKey"), diff --git a/flat_api/aio/models/omr_job_file_metadata.py b/flat_api/aio/models/omr_job_file_metadata.py index 5401ef8..3b90d24 100644 --- a/flat_api/aio/models/omr_job_file_metadata.py +++ b/flat_api/aio/models/omr_job_file_metadata.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_file_upload.py b/flat_api/aio/models/omr_job_file_upload.py index cc126d1..423a2b0 100644 --- a/flat_api/aio/models/omr_job_file_upload.py +++ b/flat_api/aio/models/omr_job_file_upload.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_file_upload_result.py b/flat_api/aio/models/omr_job_file_upload_result.py index a134b66..6af4c91 100644 --- a/flat_api/aio/models/omr_job_file_upload_result.py +++ b/flat_api/aio/models/omr_job_file_upload_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_input_file.py b/flat_api/aio/models/omr_job_input_file.py index 9436102..30f9d53 100644 --- a/flat_api/aio/models/omr_job_input_file.py +++ b/flat_api/aio/models/omr_job_input_file.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_output.py b/flat_api/aio/models/omr_job_output.py index 0c56c06..04bebd2 100644 --- a/flat_api/aio/models/omr_job_output.py +++ b/flat_api/aio/models/omr_job_output.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_progress.py b/flat_api/aio/models/omr_job_progress.py index 7fb0288..2fa6849 100644 --- a/flat_api/aio/models/omr_job_progress.py +++ b/flat_api/aio/models/omr_job_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_result.py b/flat_api/aio/models/omr_job_result.py index d93b0e5..1e9c0e9 100644 --- a/flat_api/aio/models/omr_job_result.py +++ b/flat_api/aio/models/omr_job_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_job_retention.py b/flat_api/aio/models/omr_job_retention.py index edb00b5..d52a97f 100644 --- a/flat_api/aio/models/omr_job_retention.py +++ b/flat_api/aio/models/omr_job_retention.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class OmrJobRetention(BaseModel): """ - Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. + Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure happens shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. """ # noqa: E501 expiry_date: datetime = Field(description="When this job's uploaded files and recognition results become eligible for erasure. Fixed when the job is created: changing the account's retention period does not move the deadline of jobs that already exist. ", alias="expiryDate") expired_date: Optional[datetime] = Field(default=None, description="When the job's stored files were actually erased. Present only once that happened. An expired job keeps the `status` it finished with and stays listable, but its `result` is no longer served and downloads fail with `OMR_JOB_EXPIRED`. ", alias="expiredDate") diff --git a/flat_api/aio/models/omr_job_status.py b/flat_api/aio/models/omr_job_status.py index 9552bf2..b2111da 100644 --- a/flat_api/aio/models/omr_job_status.py +++ b/flat_api/aio/models/omr_job_status.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class OmrJobStatus(str, Enum): """ - Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. + Status of the job. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. """ """ diff --git a/flat_api/aio/models/omr_locale_details.py b/flat_api/aio/models/omr_locale_details.py index 6541760..5fedb51 100644 --- a/flat_api/aio/models/omr_locale_details.py +++ b/flat_api/aio/models/omr_locale_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_pending_step.py b/flat_api/aio/models/omr_pending_step.py index 6e3f531..eea5fa5 100644 --- a/flat_api/aio/models/omr_pending_step.py +++ b/flat_api/aio/models/omr_pending_step.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/omr_step_name.py b/flat_api/aio/models/omr_step_name.py index cdc12c5..e1d3c90 100644 --- a/flat_api/aio/models/omr_step_name.py +++ b/flat_api/aio/models/omr_step_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class OmrStepName(str, Enum): """ - Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. + Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before the score is built. Resuming from this step is fast: note recognition is already done and is not run again. """ """ diff --git a/flat_api/aio/models/organization_invitation.py b/flat_api/aio/models/organization_invitation.py index a24affd..e42e352 100644 --- a/flat_api/aio/models/organization_invitation.py +++ b/flat_api/aio/models/organization_invitation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class OrganizationInvitation(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The invitation unique identifier") creation_date: Optional[datetime] = Field(default=None, description="The creation date of the invitation", alias="creationDate") - organization: StrictStr = Field(description="The unique identifier of the Organization owning this class") + organization: StrictStr = Field(description="The unique identifier of the Organization this invitation belongs to") organization_role: OrganizationRoles = Field(alias="organizationRole") custom_code: Optional[StrictStr] = Field(description="Enrollment code to use when joining this organization", alias="customCode") email: Optional[StrictStr] = Field(default=None, description="The email address this invitation was sent to") diff --git a/flat_api/aio/models/organization_invitation_creation.py b/flat_api/aio/models/organization_invitation_creation.py index a86e925..7b79ed5 100644 --- a/flat_api/aio/models/organization_invitation_creation.py +++ b/flat_api/aio/models/organization_invitation_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/organization_roles.py b/flat_api/aio/models/organization_roles.py index 3b45067..cf85a5f 100644 --- a/flat_api/aio/models/organization_roles.py +++ b/flat_api/aio/models/organization_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/organization_user_access_token_creation.py b/flat_api/aio/models/organization_user_access_token_creation.py index f31ba11..c428146 100644 --- a/flat_api/aio/models/organization_user_access_token_creation.py +++ b/flat_api/aio/models/organization_user_access_token_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/rename_group_request.py b/flat_api/aio/models/rename_group_request.py index 5b397fc..b3e8786 100644 --- a/flat_api/aio/models/rename_group_request.py +++ b/flat_api/aio/models/rename_group_request.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/resource_collaborator.py b/flat_api/aio/models/resource_collaborator.py index 8a1325f..fa24b06 100644 --- a/flat_api/aio/models/resource_collaborator.py +++ b/flat_api/aio/models/resource_collaborator.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class ResourceCollaborator(BaseModel): """ - A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). + A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (otherwise these permissions are not listed or exposed publicly). """ # noqa: E501 acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") diff --git a/flat_api/aio/models/resource_collaborator_creation.py b/flat_api/aio/models/resource_collaborator_creation.py index ab56cf7..e64f366 100644 --- a/flat_api/aio/models/resource_collaborator_creation.py +++ b/flat_api/aio/models/resource_collaborator_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,7 +34,7 @@ class ResourceCollaboratorCreation(BaseModel): user_token: Optional[StrictStr] = Field(default=None, description="Token received in an invitation to join the score. ", alias="userToken") acl_read: Optional[StrictBool] = Field(default=True, description="`True` if the related user can read the score. (probably true if the user has a permission on the document). ", alias="aclRead") acl_write: Optional[StrictBool] = Field(default=False, description="`True` if the related user can modify the score. ", alias="aclWrite") - acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") + acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin"] diff --git a/flat_api/aio/models/resource_rights.py b/flat_api/aio/models/resource_rights.py index edcaeff..ce365ad 100644 --- a/flat_api/aio/models/resource_rights.py +++ b/flat_api/aio/models/resource_rights.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_comment.py b/flat_api/aio/models/score_comment.py index 5dde80f..3f69514 100644 --- a/flat_api/aio/models/score_comment.py +++ b/flat_api/aio/models/score_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -35,18 +35,18 @@ class ScoreComment(BaseModel): type: StrictStr = Field(description="The type of the comment") user: StrictStr = Field(description="The author unique identifier") score: StrictStr = Field(description="The unique identifier of the score where the comment was posted") - revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of revision the comment was posted") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision where the comment was posted") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") var_date: datetime = Field(description="The date when the comment was posted", alias="date") modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") - comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: StrictStr = Field(description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: StrictStr = Field(description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") context: Optional[ScoreCommentContext] = None - mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifier mentioned on the score") + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") resolved: Optional[StrictBool] = Field(default=None, description="For inline comments, the comment can be marked as resolved and will be hidden in the future responses ") - resolved_by: Optional[StrictStr] = Field(default=None, description="If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") + resolved_by: Optional[StrictStr] = Field(default=None, description="If the comment is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") moderation: Optional[ScoreCommentModeration] = None - spam: Optional[StrictBool] = Field(default=None, description="`true if the message has been detected as spam and hidden from other users ") + spam: Optional[StrictBool] = Field(default=None, description="`true` if the message has been detected as spam and hidden from other users ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam"] diff --git a/flat_api/aio/models/score_comment_context.py b/flat_api/aio/models/score_comment_context.py index c5a2e64..56fd45b 100644 --- a/flat_api/aio/models/score_comment_context.py +++ b/flat_api/aio/models/score_comment_context.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,9 +29,9 @@ class ScoreCommentContext(BaseModel): The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). """ # noqa: E501 part_uuid: StrictStr = Field(description="The unique identifier (UUID) of the score part", alias="partUuid") - staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identififer of the staff", alias="staffIdx") - staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identififer (UUID) of the staff", alias="staffUuid") - measure_uuids: List[StrictStr] = Field(description="The list of measure UUIds", alias="measureUuids") + staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identifier of the staff", alias="staffIdx") + staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identifier (UUID) of the staff", alias="staffUuid") + measure_uuids: List[StrictStr] = Field(description="The list of measure UUIDs", alias="measureUuids") start_time_pos: Union[StrictFloat, StrictInt] = Field(alias="startTimePos") stop_time_pos: Union[StrictFloat, StrictInt] = Field(alias="stopTimePos") start_dpq: Union[StrictFloat, StrictInt] = Field(alias="startDpq") diff --git a/flat_api/aio/models/score_comment_creation.py b/flat_api/aio/models/score_comment_creation.py index 4a36990..1a2b317 100644 --- a/flat_api/aio/models/score_comment_creation.py +++ b/flat_api/aio/models/score_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class ScoreCommentCreation(BaseModel): Creation of a comment """ # noqa: E501 revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") - comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: StrictStr = Field(description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") diff --git a/flat_api/aio/models/score_comment_moderation.py b/flat_api/aio/models/score_comment_moderation.py index 71918c5..c5a8e89 100644 --- a/flat_api/aio/models/score_comment_moderation.py +++ b/flat_api/aio/models/score_comment_moderation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_comment_update.py b/flat_api/aio/models/score_comment_update.py index aca521a..2459b2b 100644 --- a/flat_api/aio/models/score_comment_update.py +++ b/flat_api/aio/models/score_comment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,7 +31,7 @@ class ScoreCommentUpdate(BaseModel): Update of a comment """ # noqa: E501 revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") - comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") context: Optional[ScoreCommentContext] = None additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/score_comments_counts.py b/flat_api/aio/models/score_comments_counts.py index eff64ff..811c2bd 100644 --- a/flat_api/aio/models/score_comments_counts.py +++ b/flat_api/aio/models/score_comments_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_creation.py b/flat_api/aio/models/score_creation.py index 0a63be2..bdfb2b0 100644 --- a/flat_api/aio/models/score_creation.py +++ b/flat_api/aio/models/score_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_creation_builder_data.py b/flat_api/aio/models/score_creation_builder_data.py index eba36b1..784e47a 100644 --- a/flat_api/aio/models/score_creation_builder_data.py +++ b/flat_api/aio/models/score_creation_builder_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class ScoreCreationBuilderData(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") builder_data: ScoreCreationBuilderDataAllOfBuilderData = Field(alias="builderData") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData"] diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py index 36ae53d..f394e1b 100644 --- a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py index 8c1a30e..3f432e9 100644 --- a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_layout_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py index 0a7ff65..8bd3579 100644 --- a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py index f60153a..eca1a93 100644 --- a/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py +++ b/flat_api/aio/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,11 +28,11 @@ class ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments(BaseModel): """ ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments """ # noqa: E501 - group: StrictStr = Field(description="The of the instrument group (e.g. `keyboards`, `brass`)") + group: StrictStr = Field(description="The identifier of the instrument group (e.g. `keyboards`, `brass`)") instrument: StrictStr = Field(description="The identifier of the instrument (e.g. `piano`, `trumpet`)") long_name: Optional[StrictStr] = Field(default=None, description="The full name of the instrument", alias="longName") short_name: Optional[StrictStr] = Field(default=None, description="The abbreviation of the name of the instrument", alias="shortName") - has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tone (prevent the part to have a TAB/chord grid)", alias="hasQuarterTone") + has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tones (prevents the part from having a TAB staff or chord grid)", alias="hasQuarterTone") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group", "instrument", "longName", "shortName", "hasQuarterTone"] diff --git a/flat_api/aio/models/score_creation_common.py b/flat_api/aio/models/score_creation_common.py index 5073550..0f1c8ca 100644 --- a/flat_api/aio/models/score_creation_common.py +++ b/flat_api/aio/models/score_creation_common.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class ScoreCreationCommon(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder"] diff --git a/flat_api/aio/models/score_creation_file_import.py b/flat_api/aio/models/score_creation_file_import.py index 2a7d925..2eb2a41 100644 --- a/flat_api/aio/models/score_creation_file_import.py +++ b/flat_api/aio/models/score_creation_file_import.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class ScoreCreationFileImport(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") data: StrictStr = Field(description="The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") diff --git a/flat_api/aio/models/score_creation_google_drive_import.py b/flat_api/aio/models/score_creation_google_drive_import.py index 296a1d0..ca52150 100644 --- a/flat_api/aio/models/score_creation_google_drive_import.py +++ b/flat_api/aio/models/score_creation_google_drive_import.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class ScoreCreationGoogleDriveImport(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") source: ScoreSource additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "source"] diff --git a/flat_api/aio/models/score_creation_type.py b/flat_api/aio/models/score_creation_type.py index 27d1340..4341a97 100644 --- a/flat_api/aio/models/score_creation_type.py +++ b/flat_api/aio/models/score_creation_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class ScoreCreationType(str, Enum): """ - The type of creation (an orginal, an arrangement) + The type of creation (an original, an arrangement) """ """ diff --git a/flat_api/aio/models/score_details.py b/flat_api/aio/models/score_details.py index 3a9ea62..d1eb20d 100644 --- a/flat_api/aio/models/score_details.py +++ b/flat_api/aio/models/score_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -57,7 +57,7 @@ class ScoreDetails(BaseModel): creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") license: Optional[ScoreLicense] = None license_text: Optional[StrictStr] = Field(default=None, description="Additional license text written on the exported/printed score", alias="licenseText") - duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximative duration of the score", alias="durationTime") + duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximate duration of the score", alias="durationTime") number_measures: Optional[StrictInt] = Field(default=None, description="The number of measures in the score", alias="numberMeasures") main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main tempo of the score (in QPM)", alias="mainTempoQpm") main_key_signature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main key signature of the score (expressed between -7 and 7).", alias="mainKeySignature") @@ -66,19 +66,19 @@ class ScoreDetails(BaseModel): creation_date: datetime = Field(description="The date when the score was created", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The date of the last revision of the score", alias="modificationDate") publication_date: Optional[datetime] = Field(default=None, description="The date when the score was published on Flat", alias="publicationDate") - scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") + scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, and can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") highlighted_date: Optional[datetime] = Field(default=None, description="The date when the score was highlighted (featured) on our community", alias="highlightedDate") organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. ") parent_score: Optional[StrictStr] = Field(default=None, description="If the score has been forked, the unique identifier of the parent score. ", alias="parentScore") - instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") + instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") instruments_names: List[StrictStr] = Field(description="An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. ", alias="instrumentsNames") - samples: List[StrictStr] = Field(description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") + samples: List[StrictStr] = Field(description="An array of the audio sample identifiers used by the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` ", alias="googleDriveFileId") likes: Optional[ScoreLikesCounts] = None comments: Optional[ScoreCommentsCounts] = None views: Optional[ScoreViewsCounts] = None plays: Optional[ScorePlaysCounts] = None - collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + collections: Optional[List[StrictStr]] = Field(default=None, description="The list of parent collections this score is included in. Please note that you might not have access to all of them.") me: Optional[ScoreDetailsAllOfMe] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "editHtmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "scheduledDeletionDate", "highlightedDate", "organization", "parentScore", "instruments", "instrumentsNames", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", "me"] diff --git a/flat_api/aio/models/score_details_all_of_me.py b/flat_api/aio/models/score_details_all_of_me.py index 8899e4c..7483e8a 100644 --- a/flat_api/aio/models/score_details_all_of_me.py +++ b/flat_api/aio/models/score_details_all_of_me.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_fork.py b/flat_api/aio/models/score_fork.py index 1ef11e3..79dd158 100644 --- a/flat_api/aio/models/score_fork.py +++ b/flat_api/aio/models/score_fork.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_license.py b/flat_api/aio/models/score_license.py index 3295c4b..64e27fe 100644 --- a/flat_api/aio/models/score_license.py +++ b/flat_api/aio/models/score_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_likes_counts.py b/flat_api/aio/models/score_likes_counts.py index 37d2d3a..0ceffd3 100644 --- a/flat_api/aio/models/score_likes_counts.py +++ b/flat_api/aio/models/score_likes_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_modification.py b/flat_api/aio/models/score_modification.py index 2ab9d9b..12e34e4 100644 --- a/flat_api/aio/models/score_modification.py +++ b/flat_api/aio/models/score_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_plays_counts.py b/flat_api/aio/models/score_plays_counts.py index 9ddca5e..eb79ac5 100644 --- a/flat_api/aio/models/score_plays_counts.py +++ b/flat_api/aio/models/score_plays_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_privacy.py b/flat_api/aio/models/score_privacy.py index 83b6f76..76bc05f 100644 --- a/flat_api/aio/models/score_privacy.py +++ b/flat_api/aio/models/score_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class ScorePrivacy(str, Enum): """ - The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administered by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administered by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access it. The score can be modified and administered by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will choose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). """ """ diff --git a/flat_api/aio/models/score_revision.py b/flat_api/aio/models/score_revision.py index 12c63c4..299a138 100644 --- a/flat_api/aio/models/score_revision.py +++ b/flat_api/aio/models/score_revision.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_revision_creation.py b/flat_api/aio/models/score_revision_creation.py index 7fecfd3..25bb3ae 100644 --- a/flat_api/aio/models/score_revision_creation.py +++ b/flat_api/aio/models/score_revision_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ScoreRevisionCreation(BaseModel): """ A new created revision """ # noqa: E501 - data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) + data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat JSON file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") autosave: Optional[StrictBool] = Field(default=None, description="Must be set to `true` if the revision was created automatically. ") description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") diff --git a/flat_api/aio/models/score_revision_statistics.py b/flat_api/aio/models/score_revision_statistics.py index 88a907e..ff0919d 100644 --- a/flat_api/aio/models/score_revision_statistics.py +++ b/flat_api/aio/models/score_revision_statistics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_source.py b/flat_api/aio/models/score_source.py index d119658..a98f518 100644 --- a/flat_api/aio/models/score_source.py +++ b/flat_api/aio/models/score_source.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ScoreSource(BaseModel): """ ScoreSource """ # noqa: E501 - google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") + google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["googleDrive"] diff --git a/flat_api/aio/models/score_summary.py b/flat_api/aio/models/score_summary.py index e0fe765..530f0a4 100644 --- a/flat_api/aio/models/score_summary.py +++ b/flat_api/aio/models/score_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track.py b/flat_api/aio/models/score_track.py index 0c14288..c8e1c3f 100644 --- a/flat_api/aio/models/score_track.py +++ b/flat_api/aio/models/score_track.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_creation.py b/flat_api/aio/models/score_track_creation.py index 7f20282..1ede872 100644 --- a/flat_api/aio/models/score_track_creation.py +++ b/flat_api/aio/models/score_track_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_creation_response.py b/flat_api/aio/models/score_track_creation_response.py index 35acbd4..5f68efb 100644 --- a/flat_api/aio/models/score_track_creation_response.py +++ b/flat_api/aio/models/score_track_creation_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_point.py b/flat_api/aio/models/score_track_point.py index d3f9ed9..d4df106 100644 --- a/flat_api/aio/models/score_track_point.py +++ b/flat_api/aio/models/score_track_point.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_purpose.py b/flat_api/aio/models/score_track_purpose.py index cd5341e..501b72f 100644 --- a/flat_api/aio/models/score_track_purpose.py +++ b/flat_api/aio/models/score_track_purpose.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_state.py b/flat_api/aio/models/score_track_state.py index e5d3200..d2f21e1 100644 --- a/flat_api/aio/models/score_track_state.py +++ b/flat_api/aio/models/score_track_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_type.py b/flat_api/aio/models/score_track_type.py index 33e083d..d9bd943 100644 --- a/flat_api/aio/models/score_track_type.py +++ b/flat_api/aio/models/score_track_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_track_update.py b/flat_api/aio/models/score_track_update.py index 2867486..0bd6af5 100644 --- a/flat_api/aio/models/score_track_update.py +++ b/flat_api/aio/models/score_track_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/score_views_counts.py b/flat_api/aio/models/score_views_counts.py index b20f9e1..674fab2 100644 --- a/flat_api/aio/models/score_views_counts.py +++ b/flat_api/aio/models/score_views_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/task.py b/flat_api/aio/models/task.py index 9d22101..557fc4e 100644 --- a/flat_api/aio/models/task.py +++ b/flat_api/aio/models/task.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/task_export_options.py b/flat_api/aio/models/task_export_options.py index 6123a4c..b86c008 100644 --- a/flat_api/aio/models/task_export_options.py +++ b/flat_api/aio/models/task_export_options.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/task_progress.py b/flat_api/aio/models/task_progress.py index 31f88f5..f626978 100644 --- a/flat_api/aio/models/task_progress.py +++ b/flat_api/aio/models/task_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/task_result.py b/flat_api/aio/models/task_result.py index 99fca4b..829e286 100644 --- a/flat_api/aio/models/task_result.py +++ b/flat_api/aio/models/task_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,8 +28,8 @@ class TaskResult(BaseModel): """ Optional result information about this task """ # noqa: E501 - url: Optional[StrictStr] = Field(default=None, description="URL returned by the task worker") - error: Optional[StrictStr] = Field(default=None, description="Error returned by task worker") + url: Optional[StrictStr] = Field(default=None, description="URL of the generated file, when the task produces one") + error: Optional[StrictStr] = Field(default=None, description="Error message, when the task failed") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["url", "error"] diff --git a/flat_api/aio/models/teaching_theme.py b/flat_api/aio/models/teaching_theme.py index 5f15cc9..a5d5204 100644 --- a/flat_api/aio/models/teaching_theme.py +++ b/flat_api/aio/models/teaching_theme.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/tutteo_product.py b/flat_api/aio/models/tutteo_product.py index b40d500..fc70afb 100644 --- a/flat_api/aio/models/tutteo_product.py +++ b/flat_api/aio/models/tutteo_product.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_admin_update.py b/flat_api/aio/models/user_admin_update.py index 01ee625..9c6502c 100644 --- a/flat_api/aio/models/user_admin_update.py +++ b/flat_api/aio/models/user_admin_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_azure_details.py b/flat_api/aio/models/user_azure_details.py index abb6bfc..8a3439f 100644 --- a/flat_api/aio/models/user_azure_details.py +++ b/flat_api/aio/models/user_azure_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_basics.py b/flat_api/aio/models/user_basics.py index 41735c6..4e0f9ee 100644 --- a/flat_api/aio/models/user_basics.py +++ b/flat_api/aio/models/user_basics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_community_profile_links.py b/flat_api/aio/models/user_community_profile_links.py index c281a56..8a76d12 100644 --- a/flat_api/aio/models/user_community_profile_links.py +++ b/flat_api/aio/models/user_community_profile_links.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class UserCommunityProfileLinks(BaseModel): soundcloud_url: Optional[StrictStr] = Field(default=None, description="SoundCloud Profile URL", alias="soundcloudUrl") tiktok_url: Optional[StrictStr] = Field(default=None, description="TikTok profile URL. For updates, also accepts TikTok usernames", alias="tiktokUrl") instagram_url: Optional[StrictStr] = Field(default=None, description="Instagram profile URL. For updates, also accepts Instagram usernames", alias="instagramUrl") - website_url: Optional[StrictStr] = Field(default=None, description="Personnal website URL", alias="websiteUrl") + website_url: Optional[StrictStr] = Field(default=None, description="Personal website URL", alias="websiteUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl"] diff --git a/flat_api/aio/models/user_creation.py b/flat_api/aio/models/user_creation.py index fa407a7..f254101 100644 --- a/flat_api/aio/models/user_creation.py +++ b/flat_api/aio/models/user_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_details.py b/flat_api/aio/models/user_details.py index 5659c0e..3213953 100644 --- a/flat_api/aio/models/user_details.py +++ b/flat_api/aio/models/user_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -51,18 +51,18 @@ class UserDetails(BaseModel): bio: Optional[StrictStr] = Field(default=None, description="User's biography") registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") - followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") - following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") - owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user has", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follows", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user owns", alias="ownedPublicScoresCount") all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") - cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (background) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") links: Optional[UserCommunityProfileLinks] = None is_email_verified: Optional[StrictBool] = Field(default=None, description="Whether the user's email address has been verified", alias="isEmailVerified") azure_details: Optional[UserAzureDetails] = Field(default=None, alias="azureDetails") - private_profile: Optional[StrictBool] = Field(default=None, description="Tell either this user profile is private or not (individual accounts only)", alias="privateProfile") + private_profile: Optional[StrictBool] = Field(default=None, description="Whether this user profile is private (individual accounts only)", alias="privateProfile") locale: Optional[StrictStr] = Field(default='en', description="The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` ") groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile picture", alias="pictureFile") diff --git a/flat_api/aio/models/user_details_admin.py b/flat_api/aio/models/user_details_admin.py index 92e5b8e..528642f 100644 --- a/flat_api/aio/models/user_details_admin.py +++ b/flat_api/aio/models/user_details_admin.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_details_admin_all_of_license.py b/flat_api/aio/models/user_details_admin_all_of_license.py index ccc7e77..d53326c 100644 --- a/flat_api/aio/models/user_details_admin_all_of_license.py +++ b/flat_api/aio/models/user_details_admin_all_of_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -35,7 +35,7 @@ class UserDetailsAdminAllOfLicense(BaseModel): expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") source: Optional[LicenseSources] = LicenseSources.ORDER mode: Optional[LicenseMode] = None - active: Optional[StrictBool] = Field(default=None, description="ID of the current license") + active: Optional[StrictBool] = Field(default=None, description="Whether the license is currently active") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] diff --git a/flat_api/aio/models/user_public.py b/flat_api/aio/models/user_public.py index a9c96a0..73a3a31 100644 --- a/flat_api/aio/models/user_public.py +++ b/flat_api/aio/models/user_public.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -50,13 +50,13 @@ class UserPublic(BaseModel): bio: Optional[StrictStr] = Field(default=None, description="User's biography") registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") - followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") - following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") - owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user has", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follows", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user owns", alias="ownedPublicScoresCount") all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") - cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (background) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") links: Optional[UserCommunityProfileLinks] = None additional_properties: Dict[str, Any] = {} diff --git a/flat_api/aio/models/user_public_summary.py b/flat_api/aio/models/user_public_summary.py index 684fd74..9d19e06 100644 --- a/flat_api/aio/models/user_public_summary.py +++ b/flat_api/aio/models/user_public_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_signin_link.py b/flat_api/aio/models/user_signin_link.py index 72e0254..193f529 100644 --- a/flat_api/aio/models/user_signin_link.py +++ b/flat_api/aio/models/user_signin_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/models/user_signin_link_creation.py b/flat_api/aio/models/user_signin_link_creation.py index 2fbeb9d..da7461b 100644 --- a/flat_api/aio/models/user_signin_link_creation.py +++ b/flat_api/aio/models/user_signin_link_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/aio/rest.py b/flat_api/aio/rest.py index 34e99a1..51c6340 100644 --- a/flat_api/aio/rest.py +++ b/flat_api/aio/rest.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/api/account_api.py b/flat_api/api/account_api.py index a604311..a23b6a1 100644 --- a/flat_api/api/account_api.py +++ b/flat_api/api/account_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/api/class_api.py b/flat_api/api/class_api.py index 5221273..4a33bf9 100644 --- a/flat_api/api/class_api.py +++ b/flat_api/api/class_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -336,7 +336,7 @@ def add_class_user( ) -> None: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -408,7 +408,7 @@ def add_class_user_with_http_info( ) -> ApiResponse[None]: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -480,7 +480,7 @@ def add_class_user_without_preload_content( ) -> RESTResponseType: """Add a user to the class - This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. + This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on their role in the Organization. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -893,7 +893,7 @@ def archive_class( ) -> ClassDetails: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -961,7 +961,7 @@ def archive_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -1029,7 +1029,7 @@ def archive_class_without_preload_content( ) -> RESTResponseType: """Archive the class - Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -1464,7 +1464,7 @@ def create_class( ) -> ClassDetails: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -1533,7 +1533,7 @@ def create_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -1602,7 +1602,7 @@ def create_class_without_preload_content( ) -> RESTResponseType: """Create a new class - Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. + Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `PUT /classes/{class}/users/{user}`, they will automatically be added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. :param body: (required) :type body: ClassCreation @@ -2038,7 +2038,7 @@ def create_submission( ) -> AssignmentSubmission: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2114,7 +2114,7 @@ def create_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2190,7 +2190,7 @@ def create_submission_without_preload_content( ) -> RESTResponseType: """Create or edit a submission - Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. + Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `playback`, `exercisesIds` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2344,7 +2344,7 @@ def create_test_student_account( ) -> UserDetails: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2416,7 +2416,7 @@ def create_test_student_account_with_http_info( ) -> ApiResponse[UserDetails]: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2488,7 +2488,7 @@ def create_test_student_account_without_preload_content( ) -> RESTResponseType: """Create a test student account - Test students account can be created by teachers an admin and be used to experiment the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. + Test student accounts can be created by teachers and admins to try out the assignments. - They are automatically added to the class. - They can be reset using this API endpoint (a new account will be created and the previous one scheduled for deletion). - These accounts don't use a user license. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2904,7 +2904,7 @@ def delete_class_user( ) -> None: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -2976,7 +2976,7 @@ def delete_class_user_with_http_info( ) -> ApiResponse[None]: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3048,7 +3048,7 @@ def delete_class_user_without_preload_content( ) -> RESTResponseType: """Remove a user from the class - This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. + This method can be used by a teacher of the class to remove another user from it. Removing your own account is not allowed. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3184,7 +3184,7 @@ def delete_submission( ) -> AssignmentSubmission: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3260,7 +3260,7 @@ def delete_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3336,7 +3336,7 @@ def delete_submission_without_preload_content( ) -> RESTResponseType: """Reset a submission - Use this method as a teacher to reset a submission and allow student to start over the assignment + Use this method as a teacher to reset a submission and allow the student to start the assignment over :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3785,7 +3785,7 @@ def edit_submission( ) -> AssignmentSubmission: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3865,7 +3865,7 @@ def edit_submission_with_http_info( ) -> ApiResponse[AssignmentSubmission]: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -3945,7 +3945,7 @@ def edit_submission_without_preload_content( ) -> RESTResponseType: """Edit a submission - Use this method as a teacher to update the different submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade` + Use this method as a teacher to update a submission and give feedback. Teachers can only set `return`, `draftGrade` and `grade`. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -4104,7 +4104,7 @@ def enroll_class( ) -> ClassDetails: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -4172,7 +4172,7 @@ def enroll_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -4240,7 +4240,7 @@ def enroll_class_without_preload_content( ) -> RESTResponseType: """Join a class - Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. + Use this method to join a class using an enrollment code given by one of the teachers of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on their role in the organization. :param enrollment_code: The enrollment code, available to the teacher in `ClassDetails` (required) :type enrollment_code: str @@ -5466,7 +5466,7 @@ def get_score_submissions( ) -> List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5534,7 +5534,7 @@ def get_score_submissions_with_http_info( ) -> ApiResponse[List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5602,7 +5602,7 @@ def get_score_submissions_without_preload_content( ) -> RESTResponseType: """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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -8301,7 +8301,7 @@ def unarchive_class( ) -> ClassDetails: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -8369,7 +8369,7 @@ def unarchive_class_with_http_info( ) -> ApiResponse[ClassDetails]: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str @@ -8437,7 +8437,7 @@ def unarchive_class_without_preload_content( ) -> RESTResponseType: """Unarchive the class - Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. + Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will automatically be updated. :param var_class: Unique identifier of the class (required) :type var_class: str diff --git a/flat_api/api/collection_api.py b/flat_api/api/collection_api.py index 1889bb3..b49455b 100644 --- a/flat_api/api/collection_api.py +++ b/flat_api/api/collection_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -913,7 +913,7 @@ def delete_score_from_collection( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -930,13 +930,13 @@ def delete_score_from_collection( ) -> None: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -995,7 +995,7 @@ def delete_score_from_collection_with_http_info( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1012,13 +1012,13 @@ def delete_score_from_collection_with_http_info( ) -> ApiResponse[None]: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -1077,7 +1077,7 @@ def delete_score_from_collection_without_preload_content( self, collection: Annotated[StrictStr, Field(description="Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted ")], score: Annotated[StrictStr, Field(description="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`). ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1094,13 +1094,13 @@ def delete_score_from_collection_without_preload_content( ) -> RESTResponseType: """Delete a score from the collection - This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this score will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. + This method will delete a score from the collection. Unlike [`DELETE /scores/{score}`](#operation/deleteScore), this will not remove the score from your account, but only from the collection. This can be used to *move* a score from one collection to another, or simply remove a score from one collection when this one is contained in multiple collections. :param collection: Unique identifier of the collection. The following collection aliases are supported: - `root`: **Deprecated.** The root collection of the account - `app`: Alias for the current app collection - `trash`: Automatically contains resources that have been deleted (required) :type collection: str :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str diff --git a/flat_api/api/edu_resources_api.py b/flat_api/api/edu_resources_api.py index c8232ce..648963c 100644 --- a/flat_api/api/edu_resources_api.py +++ b/flat_api/api/edu_resources_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -1915,7 +1915,7 @@ def _list_edu_libraries_serialize( def list_edu_resources( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -1943,7 +1943,7 @@ def list_edu_resources( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2022,7 +2022,7 @@ def list_edu_resources( def list_edu_resources_with_http_info( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -2050,7 +2050,7 @@ def list_edu_resources_with_http_info( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2129,7 +2129,7 @@ def list_edu_resources_with_http_info( def list_edu_resources_without_preload_content( self, parent: Annotated[Optional[StrictStr], Field(description="List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization ")] = None, - without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. ")] = None, + without_subfolders_resources: Annotated[Optional[StrictBool], Field(description="For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. ")] = None, type: Annotated[Optional[StrictStr], Field(description="Filter the returned resources by type ")] = None, subjects: Annotated[Optional[List[TeachingTheme]], Field(description="Filter the returned resources by subjects ")] = None, assignment_types: Annotated[Optional[List[AssignmentType]], Field(description="Filter the returned resources by assignment types ")] = None, @@ -2157,7 +2157,7 @@ def list_edu_resources_without_preload_content( :param parent: List the resources contained in this `parent` library or folder. Accepts a folder identifier, or the identifier of one of the libraries returned by [`listEduLibraries`](#tag/EduResources/operation/listEduLibraries). Which libraries are available depends on the account, so use the `id` values that endpoint returns rather than hardcoding this list: * `root`: the user's own resources * `organization`: resources shared with the organization :type parent: str - :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. By default in the Resource Library UI, we include resources from subfolders, but for example in a picker like LTI, we don't want to include them. + :param without_subfolders_resources: For the `parent` = `organization`, do not include resources from subfolders. Resources from subfolders are included by default; set this to `true` to list only the direct children, for example in a picker. :type without_subfolders_resources: bool :param type: Filter the returned resources by type :type type: str @@ -2656,7 +2656,7 @@ def update_edu_resource( ) -> EduResource: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str @@ -2728,7 +2728,7 @@ def update_edu_resource_with_http_info( ) -> ApiResponse[EduResource]: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str @@ -2800,7 +2800,7 @@ def update_edu_resource_without_preload_content( ) -> RESTResponseType: """Update an education resource metadata - Update any resources metadata (e.g. title). Use this method to rename education resources folders or assignments. + Update the metadata of a resource (e.g. its title). Use this method to rename education resources folders or assignments. :param resource: Unique identifier of the resource (required) :type resource: str diff --git a/flat_api/api/group_api.py b/flat_api/api/group_api.py index 11eb1ea..4baacd7 100644 --- a/flat_api/api/group_api.py +++ b/flat_api/api/group_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -1170,7 +1170,7 @@ def _get_group_details_serialize( def get_group_scores( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1190,7 +1190,7 @@ def get_group_scores( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1243,7 +1243,7 @@ def get_group_scores( def get_group_scores_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1263,7 +1263,7 @@ def get_group_scores_with_http_info( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1316,7 +1316,7 @@ def get_group_scores_with_http_info( def get_group_scores_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1336,7 +1336,7 @@ def get_group_scores_without_preload_content( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/api/omr_api.py b/flat_api/api/omr_api.py index acac54d..aebf622 100644 --- a/flat_api/api/omr_api.py +++ b/flat_api/api/omr_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -656,7 +656,7 @@ def create_omr_job( ) -> OmrJob: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -730,7 +730,7 @@ def create_omr_job_with_http_info( ) -> ApiResponse[OmrJob]: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -804,7 +804,7 @@ def create_omr_job_without_preload_content( ) -> RESTResponseType: """Create an OMR job - Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. + Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break. Pages are recognized in the orientation they are uploaded in. If your client does not let the user rotate pages before upload, set `autoRotate: true` and the server corrects pages uploaded sideways or upside down. :param omr_job_creation: (required) :type omr_job_creation: OmrJobCreation @@ -954,7 +954,7 @@ def delete_omr_job( ) -> OmrJob: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str @@ -1029,7 +1029,7 @@ def delete_omr_job_with_http_info( ) -> ApiResponse[OmrJob]: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str @@ -1104,7 +1104,7 @@ def delete_omr_job_without_preload_content( ) -> RESTResponseType: """Delete an OMR job's data - Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. + Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as retention expiry: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing. :param job: Unique identifier of the OMR job (required) :type job: str diff --git a/flat_api/api/organization_api.py b/flat_api/api/organization_api.py index 415de40..c18818b 100644 --- a/flat_api/api/organization_api.py +++ b/flat_api/api/organization_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,7 +20,6 @@ from typing import List, Optional from typing_extensions import Annotated from flat_api.models.api_access_token import ApiAccessToken -from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response from flat_api.models.lti_configuration import LtiConfiguration from flat_api.models.lti_configuration_create import LtiConfigurationCreate from flat_api.models.lti_configuration_update import LtiConfigurationUpdate @@ -402,7 +401,7 @@ def create_lti_configuration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateLtiConfiguration200Response: + ) -> LtiConfiguration: """Create a new LTI configuration (1.1 or 1.3) @@ -439,7 +438,7 @@ def create_lti_configuration( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( @@ -469,7 +468,7 @@ def create_lti_configuration_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateLtiConfiguration200Response]: + ) -> ApiResponse[LtiConfiguration]: """Create a new LTI configuration (1.1 or 1.3) @@ -506,7 +505,7 @@ def create_lti_configuration_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( @@ -573,7 +572,7 @@ def create_lti_configuration_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateLtiConfiguration200Response", + '200': "LtiConfiguration", 'default': "FlatErrorResponse", } response_data = self.api_client.call_api( @@ -677,7 +676,7 @@ def create_lti_credentials( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LtiCredentials: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -747,7 +746,7 @@ def create_lti_credentials_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LtiCredentials]: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -817,7 +816,7 @@ def create_lti_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Create a new couple of LTI 1.x credentials + """(Deprecated) Create a new pair of LTI 1.1 credentials DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/). @@ -962,7 +961,7 @@ def create_organization_invitation( ) -> OrganizationInvitation: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -1030,7 +1029,7 @@ def create_organization_invitation_with_http_info( ) -> ApiResponse[OrganizationInvitation]: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -1098,7 +1097,7 @@ def create_organization_invitation_without_preload_content( ) -> RESTResponseType: """Create a new invitation to join the organization - This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user. + This method creates and sends an invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the unique identifier of the corresponding user. :param body: (required) :type body: OrganizationInvitationCreation @@ -3869,7 +3868,7 @@ def _remove_organization_invitation_serialize( def remove_organization_user( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3889,7 +3888,7 @@ def remove_organization_user( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3941,7 +3940,7 @@ def remove_organization_user( def remove_organization_user_with_http_info( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3961,7 +3960,7 @@ def remove_organization_user_with_http_info( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4013,7 +4012,7 @@ def remove_organization_user_with_http_info( def remove_organization_user_without_preload_content( self, user: Annotated[StrictStr, Field(description="Unique identifier of the Flat account ")], - convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. ")] = None, + convert_to_individual: Annotated[Optional[StrictBool], Field(description="If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4033,7 +4032,7 @@ def remove_organization_user_without_preload_content( :param user: Unique identifier of the Flat account (required) :type user: str - :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. + :param convert_to_individual: If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before performing this operation, you need to be sure that the user is at least 13 years old and has read and agreed to the Individual Terms of Service of Flat available on https://flat.io/legal. :type convert_to_individual: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/api/score_api.py b/flat_api/api/score_api.py index b4ab2e1..142d407 100644 --- a/flat_api/api/score_api.py +++ b/flat_api/api/score_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -76,7 +76,7 @@ def add_score_collaborator( ) -> 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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -151,7 +151,7 @@ def add_score_collaborator_with_http_info( ) -> ApiResponse[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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -226,7 +226,7 @@ def add_score_collaborator_without_preload_content( ) -> RESTResponseType: """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. + Share a score with a single user or a group. This API call allows you to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify their unique identifier in the `user` property. - To invite an external user to the resource, specify their email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -377,7 +377,7 @@ def add_score_track( ) -> 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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -451,7 +451,7 @@ def add_score_track_with_http_info( ) -> ApiResponse[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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -525,7 +525,7 @@ def add_score_track_without_preload_content( ) -> RESTResponseType: """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. + Use this method to add a new track to the score. This track can then be played on flat.io or in an embedded score. This API method supports media hosted on SoundCloud, YouTube and Vimeo. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -678,7 +678,7 @@ def create_export_task( ) -> 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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -765,7 +765,7 @@ def create_export_task_with_http_info( ) -> ApiResponse[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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -852,7 +852,7 @@ def create_export_task_without_preload_content( ) -> RESTResponseType: """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. + Some score exports take longer to process than a single API request allows. Use this endpoint to launch a new export of one score hosted on Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -1022,7 +1022,7 @@ def create_score( ) -> 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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1093,7 +1093,7 @@ def create_score_with_http_info( ) -> ApiResponse[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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1164,7 +1164,7 @@ def create_score_without_preload_content( ) -> RESTResponseType: """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}`. + Use this API method to **create a new music score in the current User account**. This endpoint 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 then be modified using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions`). The currently authenticated user will be the 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}`. :param body: (required) :type body: ScoreCreation @@ -1594,7 +1594,7 @@ def _create_score_revision_serialize( def delete_score( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1610,11 +1610,11 @@ def delete_score( ) -> None: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1668,7 +1668,7 @@ def delete_score( def delete_score_with_http_info( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1684,11 +1684,11 @@ def delete_score_with_http_info( ) -> ApiResponse[None]: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1742,7 +1742,7 @@ def delete_score_with_http_info( def delete_score_without_preload_content( self, score: Annotated[StrictStr, Field(description="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`). ")], - now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled to be done ASAP")] = None, + now: Annotated[Optional[StrictBool], Field(description="If `true`, the score deletion will be scheduled as soon as possible")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1758,11 +1758,11 @@ def delete_score_without_preload_content( ) -> RESTResponseType: """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. + 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's collections. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str - :param now: If `true`, the score deletion will be scheduled to be done ASAP + :param now: If `true`, the score deletion will be scheduled as soon as possible :type now: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1882,7 +1882,7 @@ def delete_score_comment( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1904,7 +1904,7 @@ def delete_score_comment( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -1963,7 +1963,7 @@ def delete_score_comment_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -1985,7 +1985,7 @@ def delete_score_comment_with_http_info( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -2044,7 +2044,7 @@ def delete_score_comment_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a sheet music comment ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, _request_timeout: Union[ None, @@ -2066,7 +2066,7 @@ def delete_score_comment_without_preload_content( :type score: str :param comment: Unique identifier of a sheet music comment (required) :type comment: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param sharing_key: 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 sharing_key: str @@ -2508,7 +2508,7 @@ def edit_score( ) -> 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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -2583,7 +2583,7 @@ def edit_score_with_http_info( ) -> ApiResponse[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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -2658,7 +2658,7 @@ def edit_score_without_preload_content( ) -> RESTResponseType: """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. + 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`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadata is updated immediately, and a real-time action is pushed to update the document lazily. This pending document modification is automatically saved as a new revision, either by a connected client or by Flat. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -3111,7 +3111,7 @@ def _fork_score_serialize( def get_group_scores( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3131,7 +3131,7 @@ def get_group_scores( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3184,7 +3184,7 @@ def get_group_scores( def get_group_scores_with_http_info( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3204,7 +3204,7 @@ def get_group_scores_with_http_info( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3257,7 +3257,7 @@ def get_group_scores_with_http_info( def get_group_scores_without_preload_content( self, group: Annotated[StrictStr, Field(description="Unique identifier of a Flat group ")], - parent: Annotated[Optional[StrictStr], Field(description="Filter the score forked from the score id `parent`")] = None, + parent: Annotated[Optional[StrictStr], Field(description="Only return the scores forked from the score `parent`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3277,7 +3277,7 @@ def get_group_scores_without_preload_content( :param group: Unique identifier of a Flat group (required) :type group: str - :param parent: Filter the score forked from the score id `parent` + :param parent: Only return the scores forked from the score `parent` :type parent: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4929,7 +4929,7 @@ def get_score_revision_data( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -4947,7 +4947,7 @@ def get_score_revision_data( ) -> bytes: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -4957,7 +4957,7 @@ def get_score_revision_data( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5024,7 +5024,7 @@ def get_score_revision_data_with_http_info( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -5042,7 +5042,7 @@ def get_score_revision_data_with_http_info( ) -> ApiResponse[bytes]: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5052,7 +5052,7 @@ def get_score_revision_data_with_http_info( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5119,7 +5119,7 @@ def get_score_revision_data_without_preload_content( revision: Annotated[StrictStr, Field(description="Unique identifier of a score revision. You can use `last` to fetch the information related to the last version created. ")], format: Annotated[StrictStr, Field(description="The format of the file you will retrieve")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - parts: Annotated[Optional[StrictStr], Field(description="An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, + parts: Annotated[Optional[StrictStr], Field(description="An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". ")] = None, default_track: Annotated[Optional[StrictBool], Field(description="When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. ")] = None, url: Annotated[Optional[StrictBool], Field(description="Returns a json with the `url` in it instead of redirecting ")] = None, _request_timeout: Union[ @@ -5137,7 +5137,7 @@ def get_score_revision_data_without_preload_content( ) -> RESTResponseType: """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. + Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a thumbnail 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 that ABC has no equivalent for is approximated or dropped rather than failing the request. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5147,7 +5147,7 @@ def get_score_revision_data_without_preload_content( :type format: str :param sharing_key: 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 sharing_key: str - :param parts: An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". + :param parts: An optional set of part UUIDs to export. This parameter must be composed of part UUIDs separated by commas. For example \"59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\". :type parts: str :param default_track: When `format` is `mp3`, this property is set to true and the score has a default `ScoreTrack` (mp3), this one will be returned instead of the playback file. :type default_track: bool @@ -5320,7 +5320,7 @@ def get_score_revisions( ) -> List[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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5395,7 +5395,7 @@ def get_score_revisions_with_http_info( ) -> ApiResponse[List[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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5470,7 +5470,7 @@ def get_score_revisions_without_preload_content( ) -> RESTResponseType: """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. + 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 on the plan of the account, this list may be truncated to the most recent revisions. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5609,7 +5609,7 @@ def get_score_submissions( ) -> List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5677,7 +5677,7 @@ def get_score_submissions_with_http_info( ) -> ApiResponse[List[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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -5745,7 +5745,7 @@ def get_score_submissions_without_preload_content( ) -> RESTResponseType: """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. + This API call will list the different assignments submissions where the score is attached. This method can be used by anyone who is part of the organization and has at least read access to the document. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -6507,7 +6507,7 @@ def get_user_scores( ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6599,7 +6599,7 @@ def get_user_scores_with_http_info( ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6691,7 +6691,7 @@ def get_user_scores_without_preload_content( ) -> RESTResponseType: """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -6853,8 +6853,8 @@ def list_score_tracks( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6876,9 +6876,9 @@ def list_score_tracks( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -6935,8 +6935,8 @@ def list_score_tracks_with_http_info( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6958,9 +6958,9 @@ def list_score_tracks_with_http_info( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -7017,8 +7017,8 @@ def list_score_tracks_without_preload_content( self, score: Annotated[StrictStr, Field(description="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`). ")], sharing_key: Annotated[Optional[StrictStr], Field(description="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. ")] = None, - assignment: Annotated[Optional[StrictStr], Field(description="An assignment id with which all the tracks returned will be related to ")] = None, - list_auto_track: Annotated[Optional[StrictBool], Field(description="If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track ")] = None, + assignment: Annotated[Optional[StrictStr], Field(description="Only return the tracks related to this assignment ")] = None, + list_auto_track: Annotated[Optional[StrictBool], Field(description="If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7040,9 +7040,9 @@ def list_score_tracks_without_preload_content( :type score: str :param sharing_key: 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 sharing_key: str - :param assignment: An assignment id with which all the tracks returned will be related to + :param assignment: Only return the tracks related to this assignment :type assignment: str - :param list_auto_track: If true, and if available, return last automatically synchronized Flat's mp3 export as an additional track + :param list_auto_track: If `true`, and when available, also return the latest MP3 export automatically generated by Flat as an additional track :type list_auto_track: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -7788,7 +7788,7 @@ def post_score_comment( ) -> 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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -7867,7 +7867,7 @@ def post_score_comment_with_http_info( ) -> ApiResponse[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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -7946,7 +7946,7 @@ def post_score_comment_without_preload_content( ) -> RESTResponseType: """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`. + 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 users. Comments can be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`. :param score: Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`). (required) :type score: str @@ -8090,7 +8090,7 @@ def remove_score_collaborator( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8112,7 +8112,7 @@ def remove_score_collaborator( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -8168,7 +8168,7 @@ def remove_score_collaborator_with_http_info( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8190,7 +8190,7 @@ def remove_score_collaborator_with_http_info( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -8246,7 +8246,7 @@ def remove_score_collaborator_without_preload_content( self, score: Annotated[StrictStr, Field(description="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: Annotated[StrictStr, Field(description="Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** ")], - event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, + event_properties: Annotated[Optional[StrictStr], Field(description="Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8268,7 +8268,7 @@ def remove_score_collaborator_without_preload_content( :type score: str :param collaborator: Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group** (required) :type collaborator: str - :param event_properties: Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` + :param event_properties: Optional analytics properties merged into the analytics events recorded for this request. JSON-encoded string representing event properties. Example: - `?eventProperties={\"context\":\"discover\",\"screenLevel0\":\"home\"}` :type event_properties: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/flat_api/api/task_api.py b/flat_api/api/task_api.py index 64b9468..1f77a8a 100644 --- a/flat_api/api/task_api.py +++ b/flat_api/api/task_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -55,9 +55,9 @@ def get_task( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Task: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str @@ -123,9 +123,9 @@ def get_task_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Task]: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str @@ -191,9 +191,9 @@ def get_task_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a task details + """Get task details - This method can be used to follow a task progression, for example while a score is being exported. + This method can be used to follow the progress of a task, for example while a score is being exported. :param task: Unique identifier for the task (required) :type task: str diff --git a/flat_api/api/user_api.py b/flat_api/api/user_api.py index 17b9aef..a6ba391 100644 --- a/flat_api/api/user_api.py +++ b/flat_api/api/user_api.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call def get_user( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -61,7 +61,7 @@ def get_user( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -111,7 +111,7 @@ def get_user( @validate_call def get_user_with_http_info( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -129,7 +129,7 @@ def get_user_with_http_info( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -179,7 +179,7 @@ def get_user_with_http_info( @validate_call def get_user_without_preload_content( self, - user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], + user: Annotated[StrictStr, Field(description="This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -197,7 +197,7 @@ def get_user_without_preload_content( Get a profile of a Flat or Flat for Education User. - :param user: This route parameter is the unique identifier of the user. You can specify an email instead of an unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) + :param user: This route parameter is the unique identifier of the user. You can specify an email instead of a unique identifier. If you are executing this request authenticated, you can use `me` as a value instead of the current User unique identifier to work on the current authenticated user. (required) :type user: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -658,7 +658,7 @@ def get_user_scores( ) -> List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -750,7 +750,7 @@ def get_user_scores_with_http_info( ) -> ApiResponse[List[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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str @@ -842,7 +842,7 @@ def get_user_scores_without_preload_content( ) -> RESTResponseType: """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](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. + Get the list of public scores owned by a User. If you want to access private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores. :param user: Unique identifier of a Flat user. If you authenticated, you can use `me` to refer to the current user. (required) :type user: str diff --git a/flat_api/api_client.py b/flat_api/api_client.py index 4b1a084..576e780 100644 --- a/flat_api/api_client.py +++ b/flat_api/api_client.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/configuration.py b/flat_api/configuration.py index ab1c071..a725988 100644 --- a/flat_api/configuration.py +++ b/flat_api/configuration.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -550,7 +550,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.26.0\n"\ + "Version of the API: 2.26.2\n"\ "SDK Package Version: 2.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flat_api/exceptions.py b/flat_api/exceptions.py index 005a786..cc06420 100644 --- a/flat_api/exceptions.py +++ b/flat_api/exceptions.py @@ -1,9 +1,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/__init__.py b/flat_api/models/__init__.py index cd4f4f7..bb64626 100644 --- a/flat_api/models/__init__.py +++ b/flat_api/models/__init__.py @@ -4,9 +4,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -71,7 +71,6 @@ from flat_api.models.collection_modification import CollectionModification from flat_api.models.collection_privacy import CollectionPrivacy from flat_api.models.collection_type import CollectionType -from flat_api.models.create_lti_configuration200_response import CreateLtiConfiguration200Response from flat_api.models.credit_transaction import CreditTransaction from flat_api.models.edu_library import EduLibrary from flat_api.models.edu_resource import EduResource diff --git a/flat_api/models/add_group_user200_response.py b/flat_api/models/add_group_user200_response.py index a1ec49e..b5bce9e 100644 --- a/flat_api/models/add_group_user200_response.py +++ b/flat_api/models/add_group_user200_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/add_group_user_request.py b/flat_api/models/add_group_user_request.py index b9ddd17..6225bc6 100644 --- a/flat_api/models/add_group_user_request.py +++ b/flat_api/models/add_group_user_request.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/api_access_token.py b/flat_api/models/api_access_token.py index 9dfb1be..88fbd2d 100644 --- a/flat_api/models/api_access_token.py +++ b/flat_api/models/api_access_token.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class ApiAccessToken(BaseModel): id: Optional[StrictStr] = Field(default=None, description="Unique identifier of this private token") name: Optional[StrictStr] = Field(default=None, description="Name of the personal access token") token: Optional[StrictStr] = Field(default=None, description="The token. This token will only be returned once, then only the first 4 characters will be returned. ") - issued_date: Optional[datetime] = Field(default=None, description="The date then this token was issued ", alias="issuedDate") - expiration_date: Optional[datetime] = Field(default=None, description="The date then this token will expire ", alias="expirationDate") + issued_date: Optional[datetime] = Field(default=None, description="The date when this token was issued ", alias="issuedDate") + expiration_date: Optional[datetime] = Field(default=None, description="The date when this token will expire ", alias="expirationDate") scopes: Optional[List[AppScopes]] = Field(default=None, description="The list of scopes associated to the token ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "token", "issuedDate", "expirationDate", "scopes"] diff --git a/flat_api/models/app_scopes.py b/flat_api/models/app_scopes.py index 412161a..f0207eb 100644 --- a/flat_api/models/app_scopes.py +++ b/flat_api/models/app_scopes.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment.py b/flat_api/models/assignment.py index 234a859..29872e0 100644 --- a/flat_api/models/assignment.py +++ b/flat_api/models/assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,11 +44,11 @@ class Assignment(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") diff --git a/flat_api/models/assignment_capabilities.py b/flat_api/models/assignment_capabilities.py index 2f01f0d..fcfc016 100644 --- a/flat_api/models/assignment_capabilities.py +++ b/flat_api/models/assignment_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_capabilities_can_publish_in_class_error.py b/flat_api/models/assignment_capabilities_can_publish_in_class_error.py index 90571c7..2cefdf8 100644 --- a/flat_api/models/assignment_capabilities_can_publish_in_class_error.py +++ b/flat_api/models/assignment_capabilities_can_publish_in_class_error.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_copy.py b/flat_api/models/assignment_copy.py index bc5f89e..918cadf 100644 --- a/flat_api/models/assignment_copy.py +++ b/flat_api/models/assignment_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_copy_response.py b/flat_api/models/assignment_copy_response.py index fe52ee4..f68ec55 100644 --- a/flat_api/models/assignment_copy_response.py +++ b/flat_api/models/assignment_copy_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,11 +44,11 @@ class AssignmentCopyResponse(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") diff --git a/flat_api/models/assignment_copy_to_class.py b/flat_api/models/assignment_copy_to_class.py index f931c0a..b258cb0 100644 --- a/flat_api/models/assignment_copy_to_class.py +++ b/flat_api/models/assignment_copy_to_class.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class AssignmentCopyToClass(BaseModel): Copy the assignment to a class """ # noqa: E501 classroom: StrictStr = Field(description="The destination classroom where the assignment will be copied") - assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignment will be copied. Must be a draft.") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. Alternatively the existing `scheduledDate` from the copied assignment will be used. ", alias="scheduledDate") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["classroom", "assignment", "scheduledDate"] diff --git a/flat_api/models/assignment_copy_to_resource_library.py b/flat_api/models/assignment_copy_to_resource_library.py index e3a0e30..85c5932 100644 --- a/flat_api/models/assignment_copy_to_resource_library.py +++ b/flat_api/models/assignment_copy_to_resource_library.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class AssignmentCopyToResourceLibrary(BaseModel): """ Copy the assignment to the EDU Resource Library """ # noqa: E501 - library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`", alias="libraryParent") + library_parent: StrictStr = Field(description="Identifier of the parent resource where the new one will be created, e.g. a folder id or `root`", alias="libraryParent") verify_if_not_already_in_resource_library: Optional[StrictBool] = Field(default=None, description="Option to check if the assignment is already in Resource Library", alias="verifyIfNotAlreadyInResourceLibrary") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["libraryParent", "verifyIfNotAlreadyInResourceLibrary"] diff --git a/flat_api/models/assignment_group.py b/flat_api/models/assignment_group.py index d4b3685..bf63557 100644 --- a/flat_api/models/assignment_group.py +++ b/flat_api/models/assignment_group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission.py b/flat_api/models/assignment_submission.py index eb8d785..91a1373 100644 --- a/flat_api/models/assignment_submission.py +++ b/flat_api/models/assignment_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -46,7 +46,7 @@ class AssignmentSubmission(BaseModel): return_date: Optional[StrictStr] = Field(default=None, description="The date when the teacher returned the work", alias="returnDate") return_creator: Optional[StrictStr] = Field(default=None, description="The User unique identifier of the teacher who returned the submission ", alias="returnCreator") grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set.") - draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + draft_grade: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission", alias="draftGrade") max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional max points for the grade. If set, a corresponding `draftGrade` or `grade` will be set.", alias="maxPoints") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") playback: List[AssignmentSubmissionPlayback] diff --git a/flat_api/models/assignment_submission_comment.py b/flat_api/models/assignment_submission_comment.py index 56983e4..8082328 100644 --- a/flat_api/models/assignment_submission_comment.py +++ b/flat_api/models/assignment_submission_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_comment_creation.py b/flat_api/models/assignment_submission_comment_creation.py index f3e3f6f..86e1266 100644 --- a/flat_api/models/assignment_submission_comment_creation.py +++ b/flat_api/models/assignment_submission_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class AssignmentSubmissionCommentCreation(BaseModel): """ - Creation of a assignment submission comment + Creation of an assignment submission comment """ # noqa: E501 comment: StrictStr = Field(description="The comment text") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/assignment_submission_comments.py b/flat_api/models/assignment_submission_comments.py index b499aa9..5b1f518 100644 --- a/flat_api/models/assignment_submission_comments.py +++ b/flat_api/models/assignment_submission_comments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_history.py b/flat_api/models/assignment_submission_history.py index f4bf103..0ce51b3 100644 --- a/flat_api/models/assignment_submission_history.py +++ b/flat_api/models/assignment_submission_history.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_history_attachment.py b/flat_api/models/assignment_submission_history_attachment.py index 12c1edf..3fae711 100644 --- a/flat_api/models/assignment_submission_history_attachment.py +++ b/flat_api/models/assignment_submission_history_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_history_state.py b/flat_api/models/assignment_submission_history_state.py index 64ee184..810de63 100644 --- a/flat_api/models/assignment_submission_history_state.py +++ b/flat_api/models/assignment_submission_history_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_lti.py b/flat_api/models/assignment_submission_lti.py index 8f1add3..d0076d3 100644 --- a/flat_api/models/assignment_submission_lti.py +++ b/flat_api/models/assignment_submission_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_playback.py b/flat_api/models/assignment_submission_playback.py index e950918..5713ea1 100644 --- a/flat_api/models/assignment_submission_playback.py +++ b/flat_api/models/assignment_submission_playback.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_state.py b/flat_api/models/assignment_submission_state.py index a1a2230..d591dc8 100644 --- a/flat_api/models/assignment_submission_state.py +++ b/flat_api/models/assignment_submission_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_students_mode.py b/flat_api/models/assignment_submission_students_mode.py index ba298d3..0838698 100644 --- a/flat_api/models/assignment_submission_students_mode.py +++ b/flat_api/models/assignment_submission_students_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_submission_update.py b/flat_api/models/assignment_submission_update.py index 8bc308b..10313c3 100644 --- a/flat_api/models/assignment_submission_update.py +++ b/flat_api/models/assignment_submission_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,10 +34,10 @@ class AssignmentSubmissionUpdate(BaseModel): attachments: Optional[List[ClassAttachmentCreation]] = None playback: Optional[List[AssignmentSubmissionPlayback]] = None submit: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done") - draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible by the teacher, and we will be set to `grade` once the teacher returns the submission", alias="draftGrade") + draft_grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set. This value is only visible to the teacher, and is copied to `grade` once the teacher returns the submission", alias="draftGrade") grade: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="Optional grade. If unset, no grade was set.") exercises_ids: Optional[List[StrictStr]] = Field(default=None, description="The ids of exercises when they need to be in a specific order", alias="exercisesIds") - var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be marked as done", alias="return") + var_return: Optional[StrictBool] = Field(default=None, description="If `true`, the submission will be returned to the student (teachers only)", alias="return") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attachments", "playback", "submit", "draftGrade", "grade", "exercisesIds", "return"] diff --git a/flat_api/models/assignment_type.py b/flat_api/models/assignment_type.py index 77eef64..b4d3b26 100644 --- a/flat_api/models/assignment_type.py +++ b/flat_api/models/assignment_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/assignment_update.py b/flat_api/models/assignment_update.py index cfbe7e9..9cb6026 100644 --- a/flat_api/models/assignment_update.py +++ b/flat_api/models/assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -39,15 +39,15 @@ class AssignmentUpdate(BaseModel): teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") - max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignment with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") diff --git a/flat_api/models/class_assignment.py b/flat_api/models/class_assignment.py index dba9b60..1dc219b 100644 --- a/flat_api/models/class_assignment.py +++ b/flat_api/models/class_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -52,11 +52,11 @@ class ClassAssignment(BaseModel): cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") attachments: List[MediaAttachment] = Field(description="Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of. ") use_dedicated_attachments: Optional[StrictBool] = Field(default=None, description="For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments. ", alias="useDedicatedAttachments") - max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignement ", alias="maxPoints") + max_points: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If set, the grading will be enabled for the assignment ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") toolset: Optional[StrictStr] = Field(default=None, description="The id of the associated toolset") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") @@ -70,7 +70,7 @@ class ClassAssignment(BaseModel): classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the class where this assignment was posted") creation_date: datetime = Field(description="The creation date of this assignment", alias="creationDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") - due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. ", alias="dueDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as past due. ", alias="dueDate") assignee_mode: Optional[StrictStr] = Field(default=None, description="Possible modes of assigning assignments", alias="assigneeMode") assigned_students: Optional[List[StrictStr]] = Field(default=None, description="Identifiers for the students that have access to the assignment", alias="assignedStudents") assigned_groups: Optional[List[AssignmentGroup]] = Field(default=None, description="Groups that have access to the assignment (for shared writing assignments)", alias="assignedGroups") diff --git a/flat_api/models/class_assignment_all_of_canvas.py b/flat_api/models/class_assignment_all_of_canvas.py index b2a3149..89d5f23 100644 --- a/flat_api/models/class_assignment_all_of_canvas.py +++ b/flat_api/models/class_assignment_all_of_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ClassAssignmentAllOfCanvas(BaseModel): """ A Canvas LMS assignment """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas assignment") + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the assignment on Canvas") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to Canvas assignment", alias="alternateLink") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] diff --git a/flat_api/models/class_assignment_all_of_lti.py b/flat_api/models/class_assignment_all_of_lti.py index 3b0a866..3a01e9a 100644 --- a/flat_api/models/class_assignment_all_of_lti.py +++ b/flat_api/models/class_assignment_all_of_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_assignment_all_of_mfc.py b/flat_api/models/class_assignment_all_of_mfc.py index 0a55224..32db1fe 100644 --- a/flat_api/models/class_assignment_all_of_mfc.py +++ b/flat_api/models/class_assignment_all_of_mfc.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ClassAssignmentAllOfMfc(BaseModel): """ A MusicFirst Classroom assignment """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Task") + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the task on MusicFirst Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom task", alias="alternateLink") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "alternateLink"] diff --git a/flat_api/models/class_assignment_update.py b/flat_api/models/class_assignment_update.py index 132962b..1a7c24e 100644 --- a/flat_api/models/class_assignment_update.py +++ b/flat_api/models/class_assignment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -42,15 +42,15 @@ class ClassAssignmentUpdate(BaseModel): teacher_instructions: Optional[Annotated[str, Field(strict=True, max_length=100000)]] = Field(default=None, description="Teacher-only instructions (plain text)", alias="teacherInstructions") teacher_instructions_html: Optional[Annotated[str, Field(strict=True, max_length=20000000)]] = Field(default=None, description="HTML version of teacher-only instructions. Pasted images may be sent as inline base64 `data:` URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility. ", alias="teacherInstructionsHtml") attachments: Optional[List[ClassAttachmentCreation]] = Field(default=None, description="The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by `url`, `score`, `worksheet` or `googleDriveFileId`, are discarded silently, and exceeding the per-assignment limit fails with `ASSIGNMENT_ATTACHMENTS_LIMIT`. ") - nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playback authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") + nb_playback_authorized: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of playbacks authorized on the scores of the assignment.", alias="nbPlaybackAuthorized") restrict_play_note: Optional[StrictBool] = Field(default=None, description="Restrict the ability to get an audio feedback every time a student adds or selects a note.", alias="restrictPlayNote") restrict_to_audio_tracks: Optional[StrictBool] = Field(default=None, description="Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.", alias="restrictToAudioTracks") toolset: Optional[StrictStr] = Field(default=None, description="The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment. ") cover_file: Optional[StrictStr] = Field(default=None, description="The id of the cover to display", alias="coverFile") cover: Optional[StrictStr] = Field(default=None, description="The URL of the cover to display") - max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignement with this value as the maximum of points ", alias="maxPoints") + max_points: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=0)], Annotated[int, Field(le=10000, strict=True, ge=0)]]] = Field(default=None, description="If set, the grading will be enabled for the assignment with this value as the maximum of points ", alias="maxPoints") release_grades: Optional[StrictStr] = Field(default=None, description="For worksheets, how grading will work for the assignment: - If set to `auto`, the grades will be automatically released when the student submits the submissions - If set to `manual`, the grades will only be set as `draftGrade` and will be released when the teacher returns the submissions ", alias="releaseGrades") - shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Mixing worksheets exercises for each student", alias="shuffleExercises") + shuffle_exercises: Optional[StrictBool] = Field(default=None, description="Shuffle the worksheet exercises for each student", alias="shuffleExercises") submission_students_mode: Optional[AssignmentSubmissionStudentsMode] = Field(default=None, alias="submissionStudentsMode") recording_type: Optional[StrictStr] = Field(default=None, description="For performance assignments: recording type that will be either 'audio' or 'video'. * `audio`: Only audio will be required during the recording. * `video`: Camera will be required during the recording. Only set when type is 'performance'. ", alias="recordingType") allow_metronome: Optional[StrictBool] = Field(default=None, description="For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'. ", alias="allowMetronome") @@ -58,7 +58,7 @@ class ClassAssignmentUpdate(BaseModel): allow_speed_change: Optional[StrictBool] = Field(default=None, description="For performance assignments: whether students can adjust the playback speed of the score during recording. * `true`: Students can change the tempo/speed during practice and recording * `false`: Tempo is fixed to the original score tempo Only set when type is 'performance'. ", alias="allowSpeedChange") free_record: Optional[StrictBool] = Field(default=None, description="For performance assignments: \"Free Record\" mode. When `true`, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'. ", alias="freeRecord") state: Optional[StrictStr] = Field(default=None, description="State of the assignment") - due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date. ", alias="dueDate") + due_date: Optional[datetime] = Field(default=None, description="The due date of this assignment, late submissions will be marked as past due. If not set, the assignment won't have a due date. ", alias="dueDate") scheduled_date: Optional[datetime] = Field(default=None, description="The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class. ", alias="scheduledDate") google_classroom: Optional[ClassAssignmentUpdateAllOfGoogleClassroom] = Field(default=None, alias="googleClassroom") microsoft_graph: Optional[ClassAssignmentUpdateAllOfMicrosoftGraph] = Field(default=None, alias="microsoftGraph") diff --git a/flat_api/models/class_assignment_update_all_of_google_classroom.py b/flat_api/models/class_assignment_update_all_of_google_classroom.py index b203ce2..4fe44c7 100644 --- a/flat_api/models/class_assignment_update_all_of_google_classroom.py +++ b/flat_api/models/class_assignment_update_all_of_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_assignment_update_all_of_microsoft_graph.py b/flat_api/models/class_assignment_update_all_of_microsoft_graph.py index de42c4b..7c6897d 100644 --- a/flat_api/models/class_assignment_update_all_of_microsoft_graph.py +++ b/flat_api/models/class_assignment_update_all_of_microsoft_graph.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_attachment_creation.py b/flat_api/models/class_attachment_creation.py index 200cfc2..1b2413d 100644 --- a/flat_api/models/class_attachment_creation.py +++ b/flat_api/models/class_attachment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,12 +27,12 @@ class ClassAttachmentCreation(BaseModel): """ - Attachment creation for an assignment or stream post. This attachment must contain a `score` or an `url`, all the details of this one will be resolved and returned as `ClassAttachment` once the assignment or stream post is created. + Attachment creation for an assignment or stream post. This attachment must contain a `score` or a `url`; its details are resolved and returned as a `MediaAttachment` once the assignment or stream post is created. """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, description="The type of the attachment posted: * `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. ") score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier. The user creating the assignment must at least have read access to the document. If the user has admin rights, new group permissions will be automatically added for the teachers and students of the class. ") - worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") - revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="A unique worksheet identifier") + revision: Optional[StrictStr] = Field(default=None, description="A unique revision identifier of a score") part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") sharing_mode: Optional[MediaScoreSharingMode] = Field(default=MediaScoreSharingMode.READ, alias="sharingMode") lock_score_template: Optional[StrictBool] = Field(default=None, description="To be used with a score attached in `sharingMode` `copy` (score used as template). If true, students won't be able to change the original notes of the template.", alias="lockScoreTemplate") diff --git a/flat_api/models/class_creation.py b/flat_api/models/class_creation.py index 97fa899..cfda2c1 100644 --- a/flat_api/models/class_creation.py +++ b/flat_api/models/class_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details.py b/flat_api/models/class_details.py index 1f738be..f6f80bf 100644 --- a/flat_api/models/class_details.py +++ b/flat_api/models/class_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,13 +44,13 @@ class ClassDetails(BaseModel): state: ClassState name: StrictStr = Field(description="The name of the class") section: Optional[StrictStr] = Field(default=None, description="The section of the class") - description: Optional[StrictStr] = Field(default=None, description="An optionnal description for this class") + description: Optional[StrictStr] = Field(default=None, description="An optional description for this class") organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning this class") owner: Optional[StrictStr] = Field(default=None, description="The unique identifier of the User owning this class") - creation_date: datetime = Field(description="The date when the class was create", alias="creationDate") + creation_date: datetime = Field(description="The date when the class was created", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The date when the class was last modified", alias="modificationDate") enrollment_code: Optional[StrictStr] = Field(default=None, description="[Teachers only] The enrollment code that can be used by the students to join the class ", alias="enrollmentCode") - theme: Optional[StrictStr] = Field(default=None, description="The theme identifier using in Flat User Interface") + theme: Optional[StrictStr] = Field(default=None, description="The theme identifier used in the Flat user interface") assignments_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of assignments created in the class", alias="assignmentsCount") students_group: Optional[GroupDetails] = Field(default=None, alias="studentsGroup") teachers_group: Optional[GroupDetails] = Field(default=None, alias="teachersGroup") diff --git a/flat_api/models/class_details_canvas.py b/flat_api/models/class_details_canvas.py index cbf2502..7f218f3 100644 --- a/flat_api/models/class_details_canvas.py +++ b/flat_api/models/class_details_canvas.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class ClassDetailsCanvas(BaseModel): """ - Meta information provided by Canvs LMS + Meta information provided by Canvas LMS """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on Canvas") domain: Optional[StrictStr] = Field(default=None, description="Canvas instance domain (e.g. \"canvas.instructure.com\")") diff --git a/flat_api/models/class_details_clever.py b/flat_api/models/class_details_clever.py index 8b3e893..23a8d78 100644 --- a/flat_api/models/class_details_clever.py +++ b/flat_api/models/class_details_clever.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_google_classroom.py b/flat_api/models/class_details_google_classroom.py index 82a3bd1..2f0921a 100644 --- a/flat_api/models/class_details_google_classroom.py +++ b/flat_api/models/class_details_google_classroom.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_google_drive.py b/flat_api/models/class_details_google_drive.py index d6b9c49..06024f7 100644 --- a/flat_api/models/class_details_google_drive.py +++ b/flat_api/models/class_details_google_drive.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_issues.py b/flat_api/models/class_details_issues.py index 898f985..b929d31 100644 --- a/flat_api/models/class_details_issues.py +++ b/flat_api/models/class_details_issues.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_issues_sync_inner.py b/flat_api/models/class_details_issues_sync_inner.py index 42c8098..b311472 100644 --- a/flat_api/models/class_details_issues_sync_inner.py +++ b/flat_api/models/class_details_issues_sync_inner.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_lti.py b/flat_api/models/class_details_lti.py index e53098e..cbd3ff3 100644 --- a/flat_api/models/class_details_lti.py +++ b/flat_api/models/class_details_lti.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_details_mfc.py b/flat_api/models/class_details_mfc.py index f21f807..4d00904 100644 --- a/flat_api/models/class_details_mfc.py +++ b/flat_api/models/class_details_mfc.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,7 +26,7 @@ class ClassDetailsMfc(BaseModel): """ - Meta information provided by Canvs LMS + Meta information provided by MusicFirst Classroom """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the course on MusicFirst Classroom") alternate_link: Optional[StrictStr] = Field(default=None, description="Link to MusicFirst Classroom class", alias="alternateLink") diff --git a/flat_api/models/class_details_microsoft_graph.py b/flat_api/models/class_details_microsoft_graph.py index edd2e3c..637d56d 100644 --- a/flat_api/models/class_details_microsoft_graph.py +++ b/flat_api/models/class_details_microsoft_graph.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_grade_level.py b/flat_api/models/class_grade_level.py index 112409e..093b5c8 100644 --- a/flat_api/models/class_grade_level.py +++ b/flat_api/models/class_grade_level.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_roles.py b/flat_api/models/class_roles.py index b1c6f03..e13d741 100644 --- a/flat_api/models/class_roles.py +++ b/flat_api/models/class_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_state.py b/flat_api/models/class_state.py index 51d66f3..a7c3ed5 100644 --- a/flat_api/models/class_state.py +++ b/flat_api/models/class_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/class_update.py b/flat_api/models/class_update.py index 96984d2..9a03aca 100644 --- a/flat_api/models/class_update.py +++ b/flat_api/models/class_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection.py b/flat_api/models/collection.py index 7d8e6c1..50af6b1 100644 --- a/flat_api/models/collection.py +++ b/flat_api/models/collection.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -54,7 +54,7 @@ class Collection(BaseModel): is_pinned: Optional[StrictBool] = Field(default=None, description="Whether the collection is pinned by the owner", alias="isPinned") contents: CollectionContents capabilities: CollectionCapabilities - collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + collections: Optional[List[StrictStr]] = Field(default=None, description="The list of parent collections this score is included in. Please note that you might not have access to all of them.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "title", "htmlUrl", "type", "labelKey", "privacy", "sharingKey", "app", "creationDate", "modificationDate", "user", "organization", "rights", "collaborators", "isPinned", "contents", "capabilities", "collections"] diff --git a/flat_api/models/collection_app.py b/flat_api/models/collection_app.py index c057ae5..e8888fb 100644 --- a/flat_api/models/collection_app.py +++ b/flat_api/models/collection_app.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_capabilities.py b/flat_api/models/collection_capabilities.py index 1d9a09e..62a3724 100644 --- a/flat_api/models/collection_capabilities.py +++ b/flat_api/models/collection_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_contents.py b/flat_api/models/collection_contents.py index 9d8933b..f209849 100644 --- a/flat_api/models/collection_contents.py +++ b/flat_api/models/collection_contents.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_creation.py b/flat_api/models/collection_creation.py index 52b8c9e..4507788 100644 --- a/flat_api/models/collection_creation.py +++ b/flat_api/models/collection_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_modification.py b/flat_api/models/collection_modification.py index c1ef082..4c2b462 100644 --- a/flat_api/models/collection_modification.py +++ b/flat_api/models/collection_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_privacy.py b/flat_api/models/collection_privacy.py index 46d5eca..daac96e 100644 --- a/flat_api/models/collection_privacy.py +++ b/flat_api/models/collection_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/collection_type.py b/flat_api/models/collection_type.py index 7a49bda..170f57d 100644 --- a/flat_api/models/collection_type.py +++ b/flat_api/models/collection_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class CollectionType(str, Enum): """ - Type of the collection. The type will influence the capabilitied available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores + Type of the collection. The type will influence the capabilities available on the collections and how this collection is/can be populated. - `root`: **Deprecated.** Previously the root collection of the user. The `allScores` virtual collection should be used instead. - `regular`: A regular collection created by the user. This collection can be deleted and modified by the user. - `app`: An automatically created collection containing the scores created by an app (e.g. Music Snippet) - `trash`: An automatically created collection containing the trashed scores. Virtual collections: - `allScores`: All the scores contained in the user account - `collaborations`: All shared scores by the user or someone else - `likes`: Liked scores """ """ diff --git a/flat_api/models/create_lti_configuration200_response.py b/flat_api/models/create_lti_configuration200_response.py deleted file mode 100644 index 5511256..0000000 --- a/flat_api/models/create_lti_configuration200_response.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - Flat API - - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - - The version of the OpenAPI document: 2.26.0 - Contact: developers@flat.io - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from flat_api.models.lti_configuration import LtiConfiguration -from flat_api.models.lti_configuration1p3_base_supported_services import LtiConfiguration1p3BaseSupportedServices -from flat_api.models.lti_configuration1p3_base_tool import LtiConfiguration1p3BaseTool -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CreateLtiConfiguration200Response(LtiConfiguration): - """ - CreateLtiConfiguration200Response - """ # noqa: E501 - registration_url: Optional[StrictStr] = Field(default=None, description="One-time registration URL (only for dynamic registration)", alias="registrationUrl") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "ltiVersion", "organizationId", "organizationName", "creatorId", "creationDate", "lastUsedDate", "status", "consumerKey", "consumerSecret", "lms", "name", "tool", "mode", "platformIss", "platformName", "clientId", "deploymentId", "accessTokenUrl", "authorizationUrl", "jwksUrl", "deploymentMode", "supportedServices", "publicKeysetUrl", "initiateLoginUrl", "redirectUris", "enableEmailMatching", "parentId", "deploymentKey", "deploymentBreakdownBy", "deploymentBreakdownId", "registrationToken", "registrationUrl", "registrationTokenUsed", "registrationCompletionDate"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateLtiConfiguration200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of tool - if self.tool: - _dict['tool'] = self.tool.to_dict() - # override the default output from pydantic by calling `to_dict()` of supported_services - if self.supported_services: - _dict['supportedServices'] = self.supported_services.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if last_used_date (nullable) is None - # and model_fields_set contains the field - if self.last_used_date is None and "last_used_date" in self.model_fields_set: - _dict['lastUsedDate'] = None - - # set to None if registration_completion_date (nullable) is None - # and model_fields_set contains the field - if self.registration_completion_date is None and "registration_completion_date" in self.model_fields_set: - _dict['registrationCompletionDate'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateLtiConfiguration200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "ltiVersion": obj.get("ltiVersion"), - "organizationId": obj.get("organizationId"), - "organizationName": obj.get("organizationName"), - "creatorId": obj.get("creatorId"), - "creationDate": obj.get("creationDate"), - "lastUsedDate": obj.get("lastUsedDate"), - "status": obj.get("status"), - "consumerKey": obj.get("consumerKey"), - "consumerSecret": obj.get("consumerSecret"), - "lms": obj.get("lms"), - "name": obj.get("name"), - "tool": LtiConfiguration1p3BaseTool.from_dict(obj["tool"]) if obj.get("tool") is not None else None, - "mode": obj.get("mode"), - "platformIss": obj.get("platformIss"), - "platformName": obj.get("platformName"), - "clientId": obj.get("clientId"), - "deploymentId": obj.get("deploymentId"), - "accessTokenUrl": obj.get("accessTokenUrl"), - "authorizationUrl": obj.get("authorizationUrl"), - "jwksUrl": obj.get("jwksUrl"), - "deploymentMode": obj.get("deploymentMode"), - "supportedServices": LtiConfiguration1p3BaseSupportedServices.from_dict(obj["supportedServices"]) if obj.get("supportedServices") is not None else None, - "publicKeysetUrl": obj.get("publicKeysetUrl"), - "initiateLoginUrl": obj.get("initiateLoginUrl"), - "redirectUris": obj.get("redirectUris"), - "enableEmailMatching": obj.get("enableEmailMatching") if obj.get("enableEmailMatching") is not None else True, - "parentId": obj.get("parentId"), - "deploymentKey": obj.get("deploymentKey"), - "deploymentBreakdownBy": obj.get("deploymentBreakdownBy"), - "deploymentBreakdownId": obj.get("deploymentBreakdownId"), - "registrationToken": obj.get("registrationToken"), - "registrationUrl": obj.get("registrationUrl"), - "registrationTokenUsed": obj.get("registrationTokenUsed"), - "registrationCompletionDate": obj.get("registrationCompletionDate") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - - diff --git a/flat_api/models/credit_transaction.py b/flat_api/models/credit_transaction.py index e4ebbaf..a346f0c 100644 --- a/flat_api/models/credit_transaction.py +++ b/flat_api/models/credit_transaction.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_library.py b/flat_api/models/edu_library.py index 610e62b..fc5cded 100644 --- a/flat_api/models/edu_library.py +++ b/flat_api/models/edu_library.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class EduLibrary(BaseModel): A Flat for Education Library """ # noqa: E501 id: StrictStr = Field(description="Unique identifier of the library. This one can be used to list the underlying resources using `GET /v2/eduResources?parent={library-id}` ") - name: StrictStr = Field(description="Name of the lirbary") + name: StrictStr = Field(description="Name of the library") type: StrictStr = Field(description="Type of the library") visibility: StrictStr = Field(description="Visibility of the library") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/edu_resource.py b/flat_api/models/edu_resource.py index 0107548..abc32da 100644 --- a/flat_api/models/edu_resource.py +++ b/flat_api/models/edu_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_assignment_creation.py b/flat_api/models/edu_resource_assignment_creation.py index 8e88b34..4e70c23 100644 --- a/flat_api/models/edu_resource_assignment_creation.py +++ b/flat_api/models/edu_resource_assignment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_capabilities.py b/flat_api/models/edu_resource_capabilities.py index 183bea9..2908470 100644 --- a/flat_api/models/edu_resource_capabilities.py +++ b/flat_api/models/edu_resource_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_copy.py b/flat_api/models/edu_resource_copy.py index 5ef7a15..c4a4278 100644 --- a/flat_api/models/edu_resource_copy.py +++ b/flat_api/models/edu_resource_copy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceCopy(BaseModel): """ Copy an education resource """ # noqa: E501 - destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to copy this resource. This can also be `root` to copy the resource at the root of the user resource library. ") + destination: StrictStr = Field(description="Unique identifier of the destination folder for the copy. This can also be `root` to copy the resource at the root of the user resource library. ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] diff --git a/flat_api/models/edu_resource_creation.py b/flat_api/models/edu_resource_creation.py index 28ef934..122677f 100644 --- a/flat_api/models/edu_resource_creation.py +++ b/flat_api/models/edu_resource_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class EduResourceCreation(BaseModel): """ # noqa: E501 type: EduResourceType title: Annotated[str, Field(min_length=1, strict=True, max_length=1000)] = Field(description="Title of the resource") - parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will created, e.g. a folder id or `root`") + parent: Optional[StrictStr] = Field(default='root', description="Identifier of the parent resource where the new one will be created, e.g. a folder id or `root`") sharing_description: Optional[Annotated[str, Field(strict=True, max_length=400)]] = Field(default=None, description="Sharing description of the resource", alias="sharingDescription") sharing_description_html: Optional[Annotated[str, Field(strict=True, max_length=10000)]] = Field(default=None, description="HTML version of sharing description with rich text formatting. Supports safe HTML tags: p, br, strong, b, em, i, u, a. ", alias="sharingDescriptionHtml") resource: Optional[EduResourceAssignmentCreation] = None diff --git a/flat_api/models/edu_resource_folder.py b/flat_api/models/edu_resource_folder.py index cc923ab..924bc22 100644 --- a/flat_api/models/edu_resource_folder.py +++ b/flat_api/models/edu_resource_folder.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class EduResourceFolder(BaseModel): Education resources folder """ # noqa: E501 title: Optional[StrictStr] = Field(default=None, description="Title of the folder") - assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment type of the resources that are included in the folder,", alias="assignmentsTypes") + assignments_types: Optional[List[AssignmentType]] = Field(default=None, description="The assignment types of the resources included in the folder", alias="assignmentsTypes") resources_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of resources inside the folder", alias="resourcesCount") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "assignmentsTypes", "resourcesCount"] diff --git a/flat_api/models/edu_resource_lti_link.py b/flat_api/models/edu_resource_lti_link.py index 21c2e76..c946422 100644 --- a/flat_api/models/edu_resource_lti_link.py +++ b/flat_api/models/edu_resource_lti_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceLtiLink(BaseModel): """ LTI Link details for the class """ # noqa: E501 - lti_url: StrictStr = Field(description="An URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") + lti_url: StrictStr = Field(description="A URL that can be used to launch LTI with this resource in a classroom.", alias="ltiUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ltiUrl"] diff --git a/flat_api/models/edu_resource_move.py b/flat_api/models/edu_resource_move.py index 8212436..f622df6 100644 --- a/flat_api/models/edu_resource_move.py +++ b/flat_api/models/edu_resource_move.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class EduResourceMove(BaseModel): """ Move an education resource """ # noqa: E501 - destination: StrictStr = Field(description="Unique identifier of the destination of the folder where to move this resource. This can also be `root` to move the resource at the root of the user resource library. ") + destination: StrictStr = Field(description="Unique identifier of the destination folder for this resource. This can also be `root` to move the resource at the root of the user resource library. ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["destination"] diff --git a/flat_api/models/edu_resource_privacy.py b/flat_api/models/edu_resource_privacy.py index 21354b8..b808c3e 100644 --- a/flat_api/models/edu_resource_privacy.py +++ b/flat_api/models/edu_resource_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_resource.py b/flat_api/models/edu_resource_resource.py index bda27cf..eeb1f6a 100644 --- a/flat_api/models/edu_resource_resource.py +++ b/flat_api/models/edu_resource_resource.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_type.py b/flat_api/models/edu_resource_type.py index ca62b58..1a8e0e4 100644 --- a/flat_api/models/edu_resource_type.py +++ b/flat_api/models/edu_resource_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_update.py b/flat_api/models/edu_resource_update.py index b509e85..33808c6 100644 --- a/flat_api/models/edu_resource_update.py +++ b/flat_api/models/edu_resource_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/edu_resource_use_in_class.py b/flat_api/models/edu_resource_use_in_class.py index 2a2c70e..b63a5d6 100644 --- a/flat_api/models/edu_resource_use_in_class.py +++ b/flat_api/models/edu_resource_use_in_class.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class EduResourceUseInClass(BaseModel): Use an education resource in class """ # noqa: E501 classroom: StrictStr = Field(description="The destination classroom where the resource will be copied.") - assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignement will be copied. Must be a draft.") + assignment: Optional[StrictStr] = Field(default=None, description="An optional destination assignment where the original assignment will be copied. Must be a draft.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["classroom", "assignment"] diff --git a/flat_api/models/flat_error_response.py b/flat_api/models/flat_error_response.py index cd87fc5..92cbab6 100644 --- a/flat_api/models/flat_error_response.py +++ b/flat_api/models/flat_error_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class FlatErrorResponse(BaseModel): """ # noqa: E501 code: StrictStr = Field(description="A corresponding code for this error") message: StrictStr = Field(description="A printable message for this error") - id: Optional[StrictStr] = Field(default=None, description="An unique error identifier generated for the request") + id: Optional[StrictStr] = Field(default=None, description="A unique error identifier generated for the request") param: Optional[StrictStr] = Field(default=None, description="The related parameter that caused the error") provider_message: Optional[StrictStr] = Field(default=None, description="The untranslated error message returned by an external provider (e.g. Google Classroom), when the error originates from one. Only set on errors forwarded from a third party. Meant for support and IT: display it alongside `message`, never in place of it. `message` is the localized, user-facing text; this field is raw provider output and is always in English. ", alias="providerMessage") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/google_classroom_coursework.py b/flat_api/models/google_classroom_coursework.py index cb8191c..6b9d252 100644 --- a/flat_api/models/google_classroom_coursework.py +++ b/flat_api/models/google_classroom_coursework.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/google_classroom_submission.py b/flat_api/models/google_classroom_submission.py index 6975dde..135982a 100644 --- a/flat_api/models/google_classroom_submission.py +++ b/flat_api/models/google_classroom_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/grade.py b/flat_api/models/grade.py index 16a122a..f23960f 100644 --- a/flat_api/models/grade.py +++ b/flat_api/models/grade.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/group.py b/flat_api/models/group.py index 8d55928..d2355a4 100644 --- a/flat_api/models/group.py +++ b/flat_api/models/group.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/group_creation.py b/flat_api/models/group_creation.py index cbcbe9d..b7eb08d 100644 --- a/flat_api/models/group_creation.py +++ b/flat_api/models/group_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/group_details.py b/flat_api/models/group_details.py index 8c39caf..d77a6de 100644 --- a/flat_api/models/group_details.py +++ b/flat_api/models/group_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,12 +34,12 @@ class GroupDetails(BaseModel): name: StrictStr = Field(description="The displayable name of the group") type: GroupType organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization owning the group") - classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classromStudentsSubGroup' or 'assignmentStudentsSubGroup'") + classroom: Optional[StrictStr] = Field(default=None, description="The unique identifier of the classroom owning the group. Only available for groups of type 'classStudentsSubGroup' or 'assignmentStudentsSubGroup'") assignment: Optional[StrictStr] = Field(default=None, description="The unique identifier of the assignment owning the group. Only available for groups of type 'assignmentStudentsSubGroup'.") parent: Optional[StrictStr] = Field(default=None, description="The unique identifier of the parent class group. Only available for groups of type 'assignmentStudentsSubGroup'. May be null if the parent class group was deleted.") - creation_date: datetime = Field(description="The date when the group was create", alias="creationDate") + creation_date: datetime = Field(description="The date when the group was created", alias="creationDate") users_count: Union[StrictFloat, StrictInt] = Field(description="The number of students in this group", alias="usersCount") - read_only: StrictBool = Field(description="`true` if the properties and members of this group are in in read-only ", alias="readOnly") + read_only: StrictBool = Field(description="`true` if the properties and members of this group are read-only ", alias="readOnly") tags: List[StrictStr] = Field(description="Tags for categorizing groups. * `edu:testing-students`: Marks this group as containing test student accounts ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "type", "organization", "classroom", "assignment", "parent", "creationDate", "usersCount", "readOnly", "tags"] diff --git a/flat_api/models/group_type.py b/flat_api/models/group_type.py index c9e76a9..5b6f4c1 100644 --- a/flat_api/models/group_type.py +++ b/flat_api/models/group_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class GroupType(str, Enum): """ - The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automaticaly by Flat that contains the teachers of a class * `classStudents`: A group created automaticaly by Flat that contains the studnets of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. + The type of the group: * `generic`: A group created by a Flat user * `classTeachers`: A group created automatically by Flat that contains the teachers of a class * `classStudents`: A group created automatically by Flat that contains the students of a class * `classStudentsSubGroup`: Manually created sub-group of students of a class. * `assignmentStudentsSubGroup`: Manually created Sub-group of students of a class, in relation to a specific assignment. """ """ diff --git a/flat_api/models/license_mode.py b/flat_api/models/license_mode.py index 7758678..33a7ae8 100644 --- a/flat_api/models/license_mode.py +++ b/flat_api/models/license_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/license_sources.py b/flat_api/models/license_sources.py index 0ab0988..39e7617 100644 --- a/flat_api/models/license_sources.py +++ b/flat_api/models/license_sources.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lms_name.py b/flat_api/models/lms_name.py index 5648b1b..8c00a92 100644 --- a/flat_api/models/lms_name.py +++ b/flat_api/models/lms_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration.py b/flat_api/models/lti_configuration.py index 203d4c7..8b669be 100644 --- a/flat_api/models/lti_configuration.py +++ b/flat_api/models/lti_configuration.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -44,7 +44,6 @@ class LtiConfiguration(BaseModel): discriminator_value_class_map: Dict[str, str] = { - 'createLtiConfiguration_200_response': 'CreateLtiConfiguration200Response' } def __init__(self, *args, **kwargs) -> None: diff --git a/flat_api/models/lti_configuration1p1.py b/flat_api/models/lti_configuration1p1.py index d581bf3..1eef58a 100644 --- a/flat_api/models/lti_configuration1p1.py +++ b/flat_api/models/lti_configuration1p1.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p1_all_of_tool.py b/flat_api/models/lti_configuration1p1_all_of_tool.py index 39bbbbc..bc9fe46 100644 --- a/flat_api/models/lti_configuration1p1_all_of_tool.py +++ b/flat_api/models/lti_configuration1p1_all_of_tool.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3.py b/flat_api/models/lti_configuration1p3.py index 55442b3..0db38bc 100644 --- a/flat_api/models/lti_configuration1p3.py +++ b/flat_api/models/lti_configuration1p3.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_base.py b/flat_api/models/lti_configuration1p3_base.py index 3fc4f00..8534571 100644 --- a/flat_api/models/lti_configuration1p3_base.py +++ b/flat_api/models/lti_configuration1p3_base.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_base_supported_services.py b/flat_api/models/lti_configuration1p3_base_supported_services.py index e76b494..4e50fe1 100644 --- a/flat_api/models/lti_configuration1p3_base_supported_services.py +++ b/flat_api/models/lti_configuration1p3_base_supported_services.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_ags.py b/flat_api/models/lti_configuration1p3_base_supported_services_ags.py index 30cc3b5..644a272 100644 --- a/flat_api/models/lti_configuration1p3_base_supported_services_ags.py +++ b/flat_api/models/lti_configuration1p3_base_supported_services_ags.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class LtiConfiguration1p3BaseSupportedServicesAgs(BaseModel): """ # noqa: E501 available: Optional[StrictBool] = Field(default=None, description="Whether AGS claims were detected in launches from this platform") version: Optional[StrictStr] = Field(default=None, description="AGS version supported (e.g., \"2.0\")") - enabled: Optional[StrictBool] = Field(default=None, description="Whether we have AGS enabled for this platform") + enabled: Optional[StrictBool] = Field(default=None, description="Whether AGS is enabled for this platform") lineitems_url: Optional[StrictStr] = Field(default=None, description="Base URL for line items operations as provided by the platform", alias="lineitemsUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["available", "version", "enabled", "lineitemsUrl"] diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py b/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py index a92f835..ca16b82 100644 --- a/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py +++ b/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py b/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py index 580fff9..5601cf4 100644 --- a/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py +++ b/flat_api/models/lti_configuration1p3_base_supported_services_nrps.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class LtiConfiguration1p3BaseSupportedServicesNrps(BaseModel): """ # noqa: E501 available: Optional[StrictBool] = Field(default=None, description="Whether NRPS claims were detected in launches from this platform") version: Optional[StrictStr] = Field(default=None, description="NRPS version supported (e.g., \"2.0\")") - enabled: Optional[StrictBool] = Field(default=None, description="Whether we have NRPS enabled for this platform") + enabled: Optional[StrictBool] = Field(default=None, description="Whether NRPS is enabled for this platform") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["available", "version", "enabled"] diff --git a/flat_api/models/lti_configuration1p3_base_tool.py b/flat_api/models/lti_configuration1p3_base_tool.py index 9fd38e6..bcecd7c 100644 --- a/flat_api/models/lti_configuration1p3_base_tool.py +++ b/flat_api/models/lti_configuration1p3_base_tool.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_deployment.py b/flat_api/models/lti_configuration1p3_deployment.py index 2cfdbd2..44714b1 100644 --- a/flat_api/models/lti_configuration1p3_deployment.py +++ b/flat_api/models/lti_configuration1p3_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_dynamic.py b/flat_api/models/lti_configuration1p3_dynamic.py index d83afe1..2d77103 100644 --- a/flat_api/models/lti_configuration1p3_dynamic.py +++ b/flat_api/models/lti_configuration1p3_dynamic.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration1p3_manual.py b/flat_api/models/lti_configuration1p3_manual.py index cfb5044..84b5a99 100644 --- a/flat_api/models/lti_configuration1p3_manual.py +++ b/flat_api/models/lti_configuration1p3_manual.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_base.py b/flat_api/models/lti_configuration_base.py index 876e041..16a176c 100644 --- a/flat_api/models/lti_configuration_base.py +++ b/flat_api/models/lti_configuration_base.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_create.py b/flat_api/models/lti_configuration_create.py index 896994e..fd6af7b 100644 --- a/flat_api/models/lti_configuration_create.py +++ b/flat_api/models/lti_configuration_create.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_create1p1.py b/flat_api/models/lti_configuration_create1p1.py index 32e8ea9..98df1f5 100644 --- a/flat_api/models/lti_configuration_create1p1.py +++ b/flat_api/models/lti_configuration_create1p1.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_create1p3_deployment.py b/flat_api/models/lti_configuration_create1p3_deployment.py index 8a261d9..096a8e2 100644 --- a/flat_api/models/lti_configuration_create1p3_deployment.py +++ b/flat_api/models/lti_configuration_create1p3_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class LtiConfigurationCreate1p3Deployment(BaseModel): LTI 1.3 deployment-based configuration creation """ # noqa: E501 mode: StrictStr = Field(description="LTI 1.3 deployment-based creation mode") - deployment_type: StrictStr = Field(description="Parent platform key (e.g., canvas, blackboard, schoology, classlink)", alias="deploymentType") + deployment_type: StrictStr = Field(description="Parent platform key (e.g., blackboard, schoology, classlink, manabipocket, manabipocket-stg)", alias="deploymentType") deployment_id: StrictStr = Field(description="Deployment identifier provided by the platform", alias="deploymentId") client_id: Optional[StrictStr] = Field(default=None, description="OAuth2 client_id for the tenant; required for ClassLink deployments", alias="clientId") deployment_breakdown_id: Optional[StrictStr] = Field(default=None, description="Value of the custom claim that identifies this specific tenant (for multi-tenant platforms like Schoology)", alias="deploymentBreakdownId") diff --git a/flat_api/models/lti_configuration_create1p3_dynamic.py b/flat_api/models/lti_configuration_create1p3_dynamic.py index d5240bf..748f292 100644 --- a/flat_api/models/lti_configuration_create1p3_dynamic.py +++ b/flat_api/models/lti_configuration_create1p3_dynamic.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py b/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py index 546fa43..9f04a3b 100644 --- a/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py +++ b/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_create1p3_manual.py b/flat_api/models/lti_configuration_create1p3_manual.py index c52d1a1..63300a4 100644 --- a/flat_api/models/lti_configuration_create1p3_manual.py +++ b/flat_api/models/lti_configuration_create1p3_manual.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_update.py b/flat_api/models/lti_configuration_update.py index 04e7ac8..3a7e632 100644 --- a/flat_api/models/lti_configuration_update.py +++ b/flat_api/models/lti_configuration_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_update_deployment.py b/flat_api/models/lti_configuration_update_deployment.py index 910c8eb..c0b327c 100644 --- a/flat_api/models/lti_configuration_update_deployment.py +++ b/flat_api/models/lti_configuration_update_deployment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_configuration_update_standalone.py b/flat_api/models/lti_configuration_update_standalone.py index b21686a..0b33294 100644 --- a/flat_api/models/lti_configuration_update_standalone.py +++ b/flat_api/models/lti_configuration_update_standalone.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/lti_credentials.py b/flat_api/models/lti_credentials.py index f46f973..b32e75d 100644 --- a/flat_api/models/lti_credentials.py +++ b/flat_api/models/lti_credentials.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,14 +28,14 @@ class LtiCredentials(BaseModel): """ - A couple of LTI 1.x OAuth credentials + A pair of LTI 1.1 OAuth credentials """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this couple of credentials") - name: Optional[StrictStr] = Field(default=None, description="Name of the couple of credentials") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of this pair of credentials") + name: Optional[StrictStr] = Field(default=None, description="Name of the pair of credentials") lms: Optional[LmsName] = None organization: Optional[StrictStr] = Field(default=None, description="The unique identifier of the Organization associated to these credentials") creator: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user who created these credentials") - creation_date: Optional[datetime] = Field(default=None, description="The creation date of thse credentials", alias="creationDate") + creation_date: Optional[datetime] = Field(default=None, description="The creation date of these credentials", alias="creationDate") last_usage: Optional[datetime] = Field(default=None, description="The last time these credentials were used", alias="lastUsage") consumer_key: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Key", alias="consumerKey") consumer_secret: Optional[StrictStr] = Field(default=None, description="OAuth 1 Consumer Secret", alias="consumerSecret") diff --git a/flat_api/models/lti_credentials_creation.py b/flat_api/models/lti_credentials_creation.py index e854a3b..5852dd5 100644 --- a/flat_api/models/lti_credentials_creation.py +++ b/flat_api/models/lti_credentials_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,9 +28,9 @@ class LtiCredentialsCreation(BaseModel): """ - Creation of a couple of LTI 1.x OAuth credentials + Creation of a pair of LTI 1.1 OAuth credentials """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the couple of credentials") + name: Annotated[str, Field(strict=True, max_length=300)] = Field(description="Name of the pair of credentials") lms: LmsName additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name", "lms"] diff --git a/flat_api/models/media_attachment.py b/flat_api/models/media_attachment.py index a47101f..6242e05 100644 --- a/flat_api/models/media_attachment.py +++ b/flat_api/models/media_attachment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,10 +29,10 @@ class MediaAttachment(BaseModel): """ Media attachment. The API will automatically resolve the details, oEmbed, and media available if possible and return them in this object """ # noqa: E501 - type: StrictStr = Field(description="The type of the assignment resolved: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") - score: Optional[StrictStr] = Field(default=None, description="An unique Flat score identifier") - revision: Optional[StrictStr] = Field(default=None, description="An unique revision identifier of a score") - worksheet: Optional[StrictStr] = Field(default=None, description="An unique worksheet identifier") + type: StrictStr = Field(description="The resolved type of the attachment: * `rich`, `photo`, `video` are automatically resolved as `link` * 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. ") + score: Optional[StrictStr] = Field(default=None, description="A unique Flat score identifier") + revision: Optional[StrictStr] = Field(default=None, description="A unique revision identifier of a score") + worksheet: Optional[StrictStr] = Field(default=None, description="A unique worksheet identifier") dedicated: Optional[StrictBool] = Field(default=None, description="True if the resource is dedicated for the assignment (for scores and worksheets), meaning on the user-side this one is stored in the assignment") track: Optional[StrictStr] = Field(default=None, description="A unique track identifier") part_uuid: Optional[StrictStr] = Field(default=None, description="The UUID of the instrument part selected for this attachment (for performance submissions)", alias="partUuid") @@ -46,11 +46,11 @@ class MediaAttachment(BaseModel): url: Optional[StrictStr] = Field(default=None, description="The url of the attachment") thumbnail_url: Optional[StrictStr] = Field(default=None, description="If the attachment type is `rich`, `video`, `photo` or `link`, a displayable thumbnail for this attachment ", alias="thumbnailUrl") thumbnail_width: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailWidth") - thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the width of the thumbnail ", alias="thumbnailHeight") + thumbnail_height: Optional[StrictInt] = Field(default=None, description="If the `thumbnailUrl` is available, the height of the thumbnail ", alias="thumbnailHeight") author_name: Optional[StrictStr] = Field(default=None, description="The resolved author name of the attachment", alias="authorName") author_url: Optional[StrictStr] = Field(default=None, description="The resolved author url of the attachment", alias="authorUrl") icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the icon", alias="iconUrl") - mime_type: Optional[StrictStr] = Field(default=None, description="The mine type of the file", alias="mimeType") + mime_type: Optional[StrictStr] = Field(default=None, description="The MIME type of the file", alias="mimeType") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="The ID of the Google Drive File", alias="googleDriveFileId") teacher_only: Optional[StrictBool] = Field(default=False, description="If true, this attachment is only visible to teachers. When students view the assignment, attachments with this flag will be filtered out. ", alias="teacherOnly") additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/media_score_sharing_mode.py b/flat_api/models/media_score_sharing_mode.py index 90e7e14..b93c5fb 100644 --- a/flat_api/models/media_score_sharing_mode.py +++ b/flat_api/models/media_score_sharing_mode.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/microsoft_graph_assignment.py b/flat_api/models/microsoft_graph_assignment.py index 299edef..f0d46c0 100644 --- a/flat_api/models/microsoft_graph_assignment.py +++ b/flat_api/models/microsoft_graph_assignment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/microsoft_graph_submission.py b/flat_api/models/microsoft_graph_submission.py index 8014efe..49bf08f 100644 --- a/flat_api/models/microsoft_graph_submission.py +++ b/flat_api/models/microsoft_graph_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_capabilities.py b/flat_api/models/omr_capabilities.py index 997cb27..6114e47 100644 --- a/flat_api/models/omr_capabilities.py +++ b/flat_api/models/omr_capabilities.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_details_step_data.py b/flat_api/models/omr_details_step_data.py index 41eddc2..14f5b93 100644 --- a/flat_api/models/omr_details_step_data.py +++ b/flat_api/models/omr_details_step_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class OmrDetailsStepData(BaseModel): """ - Detected score details for review (the \"Check your score details\" screen). The worker produces `title` and `instruments` from assembly; the language is not detected and is not part of this payload (the client reads the job's `locales`, set at creation). + Detected score details for the client to review before the score is built. `title` and `instruments` are detected from the input; the language is not detected and is not part of this payload (read the job's `locales`, set at creation). """ # noqa: E501 step: StrictStr = Field(description="Discriminator for `OmrPendingStep.data`; always `details` for this payload.") title: Optional[StrictStr] = Field(default=None, description="OCR-detected work title.") diff --git a/flat_api/models/omr_details_submission.py b/flat_api/models/omr_details_submission.py index 329d972..2804ac6 100644 --- a/flat_api/models/omr_details_submission.py +++ b/flat_api/models/omr_details_submission.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_detected_instrument.py b/flat_api/models/omr_detected_instrument.py index e6e19e5..027d32d 100644 --- a/flat_api/models/omr_detected_instrument.py +++ b/flat_api/models/omr_detected_instrument.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_imported_metadata.py b/flat_api/models/omr_imported_metadata.py index 38a8ae4..e63d5b9 100644 --- a/flat_api/models/omr_imported_metadata.py +++ b/flat_api/models/omr_imported_metadata.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_instrument_override.py b/flat_api/models/omr_instrument_override.py index 984298c..2f343b6 100644 --- a/flat_api/models/omr_instrument_override.py +++ b/flat_api/models/omr_instrument_override.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job.py b/flat_api/models/omr_job.py index 7b76ff7..e5c287b 100644 --- a/flat_api/models/omr_job.py +++ b/flat_api/models/omr_job.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flat_api.models.omr_imported_metadata import OmrImportedMetadata from flat_api.models.omr_job_file_metadata import OmrJobFileMetadata @@ -42,6 +42,7 @@ class OmrJob(BaseModel): status: OmrJobStatus output: OmrJobOutput interactive_steps: List[OmrStepName] = Field(description="Steps this job pauses at for client input, echoing the value set at creation.", alias="interactiveSteps") + auto_rotate: Optional[StrictBool] = Field(default=None, description="Whether the job was created with `autoRotate`, echoing the value set at creation.", alias="autoRotate") locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) the job was created with, used for OCR and as the default main language at the `details` step. ") current_step: Optional[OmrStepName] = Field(default=None, description="The pending step when `status` is `awaitingInput`. Omitted otherwise.", alias="currentStep") pending_step: Optional[OmrPendingStep] = Field(default=None, alias="pendingStep") @@ -56,7 +57,7 @@ class OmrJob(BaseModel): creation_date: Optional[datetime] = Field(default=None, description="When the job was created.", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="When the job was last updated.", alias="modificationDate") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] + __properties: ClassVar[List[str]] = ["id", "status", "output", "interactiveSteps", "autoRotate", "locales", "currentStep", "pendingStep", "estimatedCredits", "progress", "originalFileMetadata", "importedMetadata", "result", "retention", "errorCode", "errorMessage", "creationDate", "modificationDate"] model_config = ConfigDict( validate_by_name=True, @@ -138,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, "interactiveSteps": obj.get("interactiveSteps"), + "autoRotate": obj.get("autoRotate"), "locales": obj.get("locales"), "currentStep": obj.get("currentStep"), "pendingStep": OmrPendingStep.from_dict(obj["pendingStep"]) if obj.get("pendingStep") is not None else None, diff --git a/flat_api/models/omr_job_creation.py b/flat_api/models/omr_job_creation.py index 3bfdf71..5a876f5 100644 --- a/flat_api/models/omr_job_creation.py +++ b/flat_api/models/omr_job_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,13 +33,14 @@ class OmrJobCreation(BaseModel): """ # noqa: E501 output: Optional[OmrJobOutput] = OmrJobOutput.LIBRARY interactive_steps: Optional[List[OmrStepName]] = Field(default=None, description="Steps at which the pipeline should pause for this client. Omit or send `[]` for a fully automatic import. The server only pauses at the steps listed here; declare only steps your client can actually render. ", alias="interactiveSteps") - locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry drives the OCR reader. This is the input hint; the detected main language is confirmed later at the `details` step. ") + auto_rotate: Optional[StrictBool] = Field(default=False, description="Let the server detect and correct pages uploaded sideways or upside down (90/180/270°) before recognition. Off by default: pages are recognized in the orientation they are uploaded in, which is the right choice when your client lets the user rotate pages before upload. Enable it when it does not, for example a server-to-server integration importing scans as they come. Small tilt correction (a few degrees) always runs. ", alias="autoRotate") + locales: Optional[List[StrictStr]] = Field(default=None, description="Locale hints (BCP 47) to improve text and lyric detection, for example `[\"ja\", \"en\"]`. The first entry is the primary reading language. This is the input hint; the main language can be confirmed or corrected at the `details` step. ") collection: Optional[StrictStr] = Field(default=None, description="Target collection ID. Only used when `output` is `library`.") idempotency_key: Optional[StrictStr] = Field(default=None, description="Optional client-supplied key. A retry with the same key returns the existing job instead of creating a duplicate, for safe retries on flaky networks. ", alias="idempotencyKey") files: Optional[List[OmrJobInputFile]] = Field(default=None, description="Optional inline inputs for a one-shot import. For multi-image or mobile capture, omit this and use `addOmrJobFile`.") auto_start: Optional[StrictBool] = Field(default=None, description="Start processing immediately. Only valid when `files` is provided.", alias="autoStart") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "locales", "collection", "idempotencyKey", "files", "autoStart"] + __properties: ClassVar[List[str]] = ["output", "interactiveSteps", "autoRotate", "locales", "collection", "idempotencyKey", "files", "autoStart"] model_config = ConfigDict( validate_by_name=True, @@ -108,6 +109,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "output": obj.get("output") if obj.get("output") is not None else OmrJobOutput.LIBRARY, "interactiveSteps": obj.get("interactiveSteps"), + "autoRotate": obj.get("autoRotate") if obj.get("autoRotate") is not None else False, "locales": obj.get("locales"), "collection": obj.get("collection"), "idempotencyKey": obj.get("idempotencyKey"), diff --git a/flat_api/models/omr_job_file_metadata.py b/flat_api/models/omr_job_file_metadata.py index 5401ef8..3b90d24 100644 --- a/flat_api/models/omr_job_file_metadata.py +++ b/flat_api/models/omr_job_file_metadata.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_file_upload.py b/flat_api/models/omr_job_file_upload.py index cc126d1..423a2b0 100644 --- a/flat_api/models/omr_job_file_upload.py +++ b/flat_api/models/omr_job_file_upload.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_file_upload_result.py b/flat_api/models/omr_job_file_upload_result.py index a134b66..6af4c91 100644 --- a/flat_api/models/omr_job_file_upload_result.py +++ b/flat_api/models/omr_job_file_upload_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_input_file.py b/flat_api/models/omr_job_input_file.py index 9436102..30f9d53 100644 --- a/flat_api/models/omr_job_input_file.py +++ b/flat_api/models/omr_job_input_file.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_output.py b/flat_api/models/omr_job_output.py index 0c56c06..04bebd2 100644 --- a/flat_api/models/omr_job_output.py +++ b/flat_api/models/omr_job_output.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_progress.py b/flat_api/models/omr_job_progress.py index 7fb0288..2fa6849 100644 --- a/flat_api/models/omr_job_progress.py +++ b/flat_api/models/omr_job_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_result.py b/flat_api/models/omr_job_result.py index d93b0e5..1e9c0e9 100644 --- a/flat_api/models/omr_job_result.py +++ b/flat_api/models/omr_job_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_job_retention.py b/flat_api/models/omr_job_retention.py index edb00b5..d52a97f 100644 --- a/flat_api/models/omr_job_retention.py +++ b/flat_api/models/omr_job_retention.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class OmrJobRetention(BaseModel): """ - Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure is performed by a periodic cleanup pass, so the files are removed shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. + Data-retention state of the job. Present only on jobs whose `output` is `musicxml`. Jobs imported into the Flat library are part of your library content, are not covered by this policy, and omit this object entirely. Erasure happens shortly after `expiryDate` rather than exactly on it. Plan for the deadline, not the instant. """ # noqa: E501 expiry_date: datetime = Field(description="When this job's uploaded files and recognition results become eligible for erasure. Fixed when the job is created: changing the account's retention period does not move the deadline of jobs that already exist. ", alias="expiryDate") expired_date: Optional[datetime] = Field(default=None, description="When the job's stored files were actually erased. Present only once that happened. An expired job keeps the `status` it finished with and stays listable, but its `result` is no longer served and downloads fail with `OMR_JOB_EXPIRED`. ", alias="expiredDate") diff --git a/flat_api/models/omr_job_status.py b/flat_api/models/omr_job_status.py index 9552bf2..b2111da 100644 --- a/flat_api/models/omr_job_status.py +++ b/flat_api/models/omr_job_status.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class OmrJobStatus(str, Enum): """ - Public, client-facing status of the job, derived from the internal job and task state. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. + Status of the job. * `draft`: created, files can still be added; not yet started or charged. * `processing`: the pipeline is running. * `awaitingInput`: paused on the `currentStep`, waiting for the client to submit it. * `done`: finished. See `result`. * `error`: failed. See `errorCode`. * `canceled`: canceled by the client. """ """ diff --git a/flat_api/models/omr_locale_details.py b/flat_api/models/omr_locale_details.py index 6541760..5fedb51 100644 --- a/flat_api/models/omr_locale_details.py +++ b/flat_api/models/omr_locale_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_pending_step.py b/flat_api/models/omr_pending_step.py index 66a3fe4..b1fca50 100644 --- a/flat_api/models/omr_pending_step.py +++ b/flat_api/models/omr_pending_step.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/omr_step_name.py b/flat_api/models/omr_step_name.py index cdc12c5..e1d3c90 100644 --- a/flat_api/models/omr_step_name.py +++ b/flat_api/models/omr_step_name.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class OmrStepName(str, Enum): """ - Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before assembly. Pauses after note recognition, so resuming re-runs only the cheap assembly and finalize stages. + Interactive pipeline step. Forward-compatible: new values may be added over time. Only steps a client lists in `interactiveSteps` can pause that client's job; any step a client does not list (including future ones) is auto-resolved by the server. * `details`: confirm or adjust the detected title, main language and instruments before the score is built. Resuming from this step is fast: note recognition is already done and is not run again. """ """ diff --git a/flat_api/models/organization_invitation.py b/flat_api/models/organization_invitation.py index bf6d1e7..1b12e76 100644 --- a/flat_api/models/organization_invitation.py +++ b/flat_api/models/organization_invitation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class OrganizationInvitation(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The invitation unique identifier") creation_date: Optional[datetime] = Field(default=None, description="The creation date of the invitation", alias="creationDate") - organization: StrictStr = Field(description="The unique identifier of the Organization owning this class") + organization: StrictStr = Field(description="The unique identifier of the Organization this invitation belongs to") organization_role: OrganizationRoles = Field(alias="organizationRole") custom_code: Optional[StrictStr] = Field(description="Enrollment code to use when joining this organization", alias="customCode") email: Optional[StrictStr] = Field(default=None, description="The email address this invitation was sent to") diff --git a/flat_api/models/organization_invitation_creation.py b/flat_api/models/organization_invitation_creation.py index a86e925..7b79ed5 100644 --- a/flat_api/models/organization_invitation_creation.py +++ b/flat_api/models/organization_invitation_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/organization_roles.py b/flat_api/models/organization_roles.py index 3b45067..cf85a5f 100644 --- a/flat_api/models/organization_roles.py +++ b/flat_api/models/organization_roles.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/organization_user_access_token_creation.py b/flat_api/models/organization_user_access_token_creation.py index d61a820..1dd7780 100644 --- a/flat_api/models/organization_user_access_token_creation.py +++ b/flat_api/models/organization_user_access_token_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/rename_group_request.py b/flat_api/models/rename_group_request.py index 5b397fc..b3e8786 100644 --- a/flat_api/models/rename_group_request.py +++ b/flat_api/models/rename_group_request.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/resource_collaborator.py b/flat_api/models/resource_collaborator.py index c12da4e..8d01be0 100644 --- a/flat_api/models/resource_collaborator.py +++ b/flat_api/models/resource_collaborator.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class ResourceCollaborator(BaseModel): """ - A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly). + A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (otherwise these permissions are not listed or exposed publicly). """ # noqa: E501 acl_read: StrictBool = Field(description="`True` if the current user can read the current document ", alias="aclRead") acl_write: StrictBool = Field(description="`True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection. ", alias="aclWrite") diff --git a/flat_api/models/resource_collaborator_creation.py b/flat_api/models/resource_collaborator_creation.py index ab56cf7..e64f366 100644 --- a/flat_api/models/resource_collaborator_creation.py +++ b/flat_api/models/resource_collaborator_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,7 +34,7 @@ class ResourceCollaboratorCreation(BaseModel): user_token: Optional[StrictStr] = Field(default=None, description="Token received in an invitation to join the score. ", alias="userToken") acl_read: Optional[StrictBool] = Field(default=True, description="`True` if the related user can read the score. (probably true if the user has a permission on the document). ", alias="aclRead") acl_write: Optional[StrictBool] = Field(default=False, description="`True` if the related user can modify the score. ", alias="aclWrite") - acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") + acl_admin: Optional[StrictBool] = Field(default=False, description="`True` if the related user can manage the current document, i.e. changing the document permissions and deleting the document ", alias="aclAdmin") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["user", "group", "userEmail", "userToken", "aclRead", "aclWrite", "aclAdmin"] diff --git a/flat_api/models/resource_rights.py b/flat_api/models/resource_rights.py index edcaeff..ce365ad 100644 --- a/flat_api/models/resource_rights.py +++ b/flat_api/models/resource_rights.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_comment.py b/flat_api/models/score_comment.py index 8c9eef7..09e6b85 100644 --- a/flat_api/models/score_comment.py +++ b/flat_api/models/score_comment.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -35,18 +35,18 @@ class ScoreComment(BaseModel): type: StrictStr = Field(description="The type of the comment") user: StrictStr = Field(description="The author unique identifier") score: StrictStr = Field(description="The unique identifier of the score where the comment was posted") - revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of revision the comment was posted") + revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision where the comment was posted") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") var_date: datetime = Field(description="The date when the comment was posted", alias="date") modification_date: Optional[datetime] = Field(default=None, description="The date of the last comment modification", alias="modificationDate") - comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: StrictStr = Field(description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: StrictStr = Field(description="A raw version of the comment, that can be displayed without parsing the mentions. ", alias="rawComment") context: Optional[ScoreCommentContext] = None - mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifier mentioned on the score") + mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") resolved: Optional[StrictBool] = Field(default=None, description="For inline comments, the comment can be marked as resolved and will be hidden in the future responses ") - resolved_by: Optional[StrictStr] = Field(default=None, description="If the user is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") + resolved_by: Optional[StrictStr] = Field(default=None, description="If the comment is marked as resolved, this will contain the unique identifier of the User who marked this comment as resolved ", alias="resolvedBy") moderation: Optional[ScoreCommentModeration] = None - spam: Optional[StrictBool] = Field(default=None, description="`true if the message has been detected as spam and hidden from other users ") + spam: Optional[StrictBool] = Field(default=None, description="`true` if the message has been detected as spam and hidden from other users ") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "type", "user", "score", "revision", "replyTo", "date", "modificationDate", "comment", "rawComment", "context", "mentions", "resolved", "resolvedBy", "moderation", "spam"] diff --git a/flat_api/models/score_comment_context.py b/flat_api/models/score_comment_context.py index c5a2e64..56fd45b 100644 --- a/flat_api/models/score_comment_context.py +++ b/flat_api/models/score_comment_context.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,9 +29,9 @@ class ScoreCommentContext(BaseModel): The context of the comment (for inline/contextualized comments). A context will include all the information related to the location of the comment (i.e. score parts, range of measure, time position). """ # noqa: E501 part_uuid: StrictStr = Field(description="The unique identifier (UUID) of the score part", alias="partUuid") - staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identififer of the staff", alias="staffIdx") - staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identififer (UUID) of the staff", alias="staffUuid") - measure_uuids: List[StrictStr] = Field(description="The list of measure UUIds", alias="measureUuids") + staff_idx: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Deprecated, use `staffUuid`) The identifier of the staff", alias="staffIdx") + staff_uuid: Optional[StrictStr] = Field(default=None, description="The unique identifier (UUID) of the staff", alias="staffUuid") + measure_uuids: List[StrictStr] = Field(description="The list of measure UUIDs", alias="measureUuids") start_time_pos: Union[StrictFloat, StrictInt] = Field(alias="startTimePos") stop_time_pos: Union[StrictFloat, StrictInt] = Field(alias="stopTimePos") start_dpq: Union[StrictFloat, StrictInt] = Field(alias="startDpq") diff --git a/flat_api/models/score_comment_creation.py b/flat_api/models/score_comment_creation.py index b49de54..66fb875 100644 --- a/flat_api/models/score_comment_creation.py +++ b/flat_api/models/score_comment_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class ScoreCommentCreation(BaseModel): Creation of a comment """ # noqa: E501 revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") - comment: StrictStr = Field(description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: StrictStr = Field(description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: Optional[StrictStr] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") mentions: Optional[List[StrictStr]] = Field(default=None, description="The list of user identifiers mentioned in this comment") reply_to: Optional[StrictStr] = Field(default=None, description="When the comment is a reply to another comment, the unique identifier of the parent comment ", alias="replyTo") diff --git a/flat_api/models/score_comment_moderation.py b/flat_api/models/score_comment_moderation.py index 71918c5..c5a8e89 100644 --- a/flat_api/models/score_comment_moderation.py +++ b/flat_api/models/score_comment_moderation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_comment_update.py b/flat_api/models/score_comment_update.py index 7591f27..c9e0cc7 100644 --- a/flat_api/models/score_comment_update.py +++ b/flat_api/models/score_comment_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,7 +31,7 @@ class ScoreCommentUpdate(BaseModel): Update of a comment """ # noqa: E501 revision: Optional[StrictStr] = Field(default=None, description="The unique identifier of the revision of the score where the comment was added. If this property is unspecified or contains \"last\", the API will automatically take the last revision created. ") - comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can includes mentions using the following format: `@[id:username]`. ") + comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="The comment text that can include mentions using the following format: `@[id:username]`. ") raw_comment: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=10000)]] = Field(default=None, description="A raw version of the comment, that can be displayed without the mentions. If you use mentions, this property must be set. ", alias="rawComment") context: Optional[ScoreCommentContext] = None additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/score_comments_counts.py b/flat_api/models/score_comments_counts.py index eff64ff..811c2bd 100644 --- a/flat_api/models/score_comments_counts.py +++ b/flat_api/models/score_comments_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_creation.py b/flat_api/models/score_creation.py index 687951b..2cf68e5 100644 --- a/flat_api/models/score_creation.py +++ b/flat_api/models/score_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_creation_builder_data.py b/flat_api/models/score_creation_builder_data.py index da6c6a5..aaed43e 100644 --- a/flat_api/models/score_creation_builder_data.py +++ b/flat_api/models/score_creation_builder_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class ScoreCreationBuilderData(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") builder_data: ScoreCreationBuilderDataAllOfBuilderData = Field(alias="builderData") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "builderData"] diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data.py index 972e1d9..22ca0ef 100644 --- a/flat_api/models/score_creation_builder_data_all_of_builder_data.py +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py index 8c1a30e..3f432e9 100644 --- a/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py index 5213b3f..9e4afaf 100644 --- a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py index f60153a..eca1a93 100644 --- a/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py +++ b/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,11 +28,11 @@ class ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments(BaseModel): """ ScoreCreationBuilderDataAllOfBuilderDataScoreDataInstruments """ # noqa: E501 - group: StrictStr = Field(description="The of the instrument group (e.g. `keyboards`, `brass`)") + group: StrictStr = Field(description="The identifier of the instrument group (e.g. `keyboards`, `brass`)") instrument: StrictStr = Field(description="The identifier of the instrument (e.g. `piano`, `trumpet`)") long_name: Optional[StrictStr] = Field(default=None, description="The full name of the instrument", alias="longName") short_name: Optional[StrictStr] = Field(default=None, description="The abbreviation of the name of the instrument", alias="shortName") - has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tone (prevent the part to have a TAB/chord grid)", alias="hasQuarterTone") + has_quarter_tone: Optional[StrictBool] = Field(default=None, description="True if the part can use quarter tones (prevents the part from having a TAB staff or chord grid)", alias="hasQuarterTone") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group", "instrument", "longName", "shortName", "hasQuarterTone"] diff --git a/flat_api/models/score_creation_common.py b/flat_api/models/score_creation_common.py index 9b79f84..bec3925 100644 --- a/flat_api/models/score_creation_common.py +++ b/flat_api/models/score_creation_common.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class ScoreCreationCommon(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder"] diff --git a/flat_api/models/score_creation_file_import.py b/flat_api/models/score_creation_file_import.py index 7051ff9..a4c884a 100644 --- a/flat_api/models/score_creation_file_import.py +++ b/flat_api/models/score_creation_file_import.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class ScoreCreationFileImport(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") filename: Optional[StrictStr] = Field(default=None, description="If this is an imported file, its filename") data: StrictStr = Field(description="The data of the score file. See the `POST /scores` endpoint description for the full list of supported formats. Binary payloads (e.g. compressed MusicXML, MIDI, Guitar Pro) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ") data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") diff --git a/flat_api/models/score_creation_google_drive_import.py b/flat_api/models/score_creation_google_drive_import.py index 0a340de..6c32f61 100644 --- a/flat_api/models/score_creation_google_drive_import.py +++ b/flat_api/models/score_creation_google_drive_import.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class ScoreCreationGoogleDriveImport(BaseModel): title: Optional[StrictStr] = Field(default=None, description="The title of the new score. If the title is too long, the API may trim this one. If this title is not specified, the API will try to (in this order): - Use the title contained in the file (e.g. [`movement-title`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-movement-title.htm) or [`credit-words`](https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-credit-words.htm) for [MusicXML](http://www.musicxml.com/) files). - Use the name of the file for files from a specified `source` (e.g. Google Drive) or the one in the `filename` property - Set a default title (e.g. \"New Music Score\") ") privacy: Optional[ScorePrivacy] = ScorePrivacy.PRIVATE collection: Optional[StrictStr] = Field(default=None, description="Unique identifier of a collection where the score will be created. If no collection identifier is provided, the score will not be added to any collection and will only be visible in the `allScores` virtual collection. ") - google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this properties is specified, the file will be created in this directory. The currently user creating the file must be granted to write in this directory. ", alias="googleDriveFolder") + google_drive_folder: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and this property is specified, the file will be created in this directory. The user creating the file must have write access to this directory. ", alias="googleDriveFolder") source: ScoreSource additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "privacy", "collection", "googleDriveFolder", "source"] diff --git a/flat_api/models/score_creation_type.py b/flat_api/models/score_creation_type.py index 27d1340..4341a97 100644 --- a/flat_api/models/score_creation_type.py +++ b/flat_api/models/score_creation_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class ScoreCreationType(str, Enum): """ - The type of creation (an orginal, an arrangement) + The type of creation (an original, an arrangement) """ """ diff --git a/flat_api/models/score_details.py b/flat_api/models/score_details.py index ecf80a9..17ac899 100644 --- a/flat_api/models/score_details.py +++ b/flat_api/models/score_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -57,7 +57,7 @@ class ScoreDetails(BaseModel): creation_type: Optional[ScoreCreationType] = Field(default=None, alias="creationType") license: Optional[ScoreLicense] = None license_text: Optional[StrictStr] = Field(default=None, description="Additional license text written on the exported/printed score", alias="licenseText") - duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximative duration of the score", alias="durationTime") + duration_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="In seconds, an approximate duration of the score", alias="durationTime") number_measures: Optional[StrictInt] = Field(default=None, description="The number of measures in the score", alias="numberMeasures") main_tempo_qpm: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main tempo of the score (in QPM)", alias="mainTempoQpm") main_key_signature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The main key signature of the score (expressed between -7 and 7).", alias="mainKeySignature") @@ -66,19 +66,19 @@ class ScoreDetails(BaseModel): creation_date: datetime = Field(description="The date when the score was created", alias="creationDate") modification_date: Optional[datetime] = Field(default=None, description="The date of the last revision of the score", alias="modificationDate") publication_date: Optional[datetime] = Field(default=None, description="The date when the score was published on Flat", alias="publicationDate") - scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") + scheduled_deletion_date: Optional[datetime] = Field(default=None, description="The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like \"Deleted shortly\". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, and can be restored with a paying account up to 90 days. ", alias="scheduledDeletionDate") highlighted_date: Optional[datetime] = Field(default=None, description="The date when the score was highlighted (featured) on our community", alias="highlightedDate") organization: Optional[StrictStr] = Field(default=None, description="If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy `organizationPublic`. ") parent_score: Optional[StrictStr] = Field(default=None, description="If the score has been forked, the unique identifier of the parent score. ", alias="parentScore") - instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") + instruments: List[StrictStr] = Field(description="An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in Flat's UI or instruments icons. The format of the strings is `{instrument-group}.{instrument-id}`. ") instruments_names: List[StrictStr] = Field(description="An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the `instruments` list. ", alias="instrumentsNames") - samples: List[StrictStr] = Field(description="An array of the audio samples identifiers used the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") + samples: List[StrictStr] = Field(description="An array of the audio sample identifiers used by the different score parts. The format of the strings is `{instrument-group}.{sample-id}`. ") google_drive_file_id: Optional[StrictStr] = Field(default=None, description="If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: `https://drive.google.com/open?id={googleDriveFileId}` ", alias="googleDriveFileId") likes: Optional[ScoreLikesCounts] = None comments: Optional[ScoreCommentsCounts] = None views: Optional[ScoreViewsCounts] = None plays: Optional[ScorePlaysCounts] = None - collections: Optional[List[StrictStr]] = Field(default=None, description="The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.") + collections: Optional[List[StrictStr]] = Field(default=None, description="The list of parent collections this score is included in. Please note that you might not have access to all of them.") me: Optional[ScoreDetailsAllOfMe] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "sharingKey", "title", "privacy", "user", "htmlUrl", "editHtmlUrl", "subtitle", "lyricist", "arranger", "composer", "description", "tags", "creationType", "license", "licenseText", "durationTime", "numberMeasures", "mainTempoQpm", "mainKeySignature", "rights", "collaborators", "creationDate", "modificationDate", "publicationDate", "scheduledDeletionDate", "highlightedDate", "organization", "parentScore", "instruments", "instrumentsNames", "samples", "googleDriveFileId", "likes", "comments", "views", "plays", "collections", "me"] diff --git a/flat_api/models/score_details_all_of_me.py b/flat_api/models/score_details_all_of_me.py index 8899e4c..7483e8a 100644 --- a/flat_api/models/score_details_all_of_me.py +++ b/flat_api/models/score_details_all_of_me.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_fork.py b/flat_api/models/score_fork.py index 1ef11e3..79dd158 100644 --- a/flat_api/models/score_fork.py +++ b/flat_api/models/score_fork.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_license.py b/flat_api/models/score_license.py index 3295c4b..64e27fe 100644 --- a/flat_api/models/score_license.py +++ b/flat_api/models/score_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_likes_counts.py b/flat_api/models/score_likes_counts.py index 37d2d3a..0ceffd3 100644 --- a/flat_api/models/score_likes_counts.py +++ b/flat_api/models/score_likes_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_modification.py b/flat_api/models/score_modification.py index 4316324..632adba 100644 --- a/flat_api/models/score_modification.py +++ b/flat_api/models/score_modification.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_plays_counts.py b/flat_api/models/score_plays_counts.py index 9ddca5e..eb79ac5 100644 --- a/flat_api/models/score_plays_counts.py +++ b/flat_api/models/score_plays_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_privacy.py b/flat_api/models/score_privacy.py index 83b6f76..76bc05f 100644 --- a/flat_api/models/score_privacy.py +++ b/flat_api/models/score_privacy.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ class ScorePrivacy(str, Enum): """ - The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administred by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administred by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access to this one. The score can be modified and administred by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will chose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). + The score main privacy mode. - `public`: The score is public on the Internet. This one can be accessible at the url `https://flat.io/score/{score}` and can be modified and administered by specified collaborators users. - `private`: The score is private and can be only accessed, modified and administered by specified collaborators users. - `privateLink`: The score is private but can be accessed using a private link `htmlUrl` or the private key in the property `sharingKey`. - `organizationPublic`: _Available only with [Flat for Education](https://flat.io/edu)._ The score is public in the organization: users of the same organization can access it. The score can be modified and administered by specified collaborators users. The score can also be individually shared to a set of users or groups using the different collaborators API methods. When a file is synchronized from an external source (e.g. Google Drive) and the sharing options are changed on the source, Flat will choose the best privacy mode for the file. When using a [Flat for Education](https://flat.io/edu) account, some of the modes may not be available if disabled by an administrator of the organization (e.g. by default the `public` mode is not available). """ """ diff --git a/flat_api/models/score_revision.py b/flat_api/models/score_revision.py index 7502b34..1d7557f 100644 --- a/flat_api/models/score_revision.py +++ b/flat_api/models/score_revision.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_revision_creation.py b/flat_api/models/score_revision_creation.py index 7fecfd3..25bb3ae 100644 --- a/flat_api/models/score_revision_creation.py +++ b/flat_api/models/score_revision_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ScoreRevisionCreation(BaseModel): """ A new created revision """ # noqa: E501 - data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat.json (aka Adagio.json) file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) + data: StrictStr = Field(description="The data of the score file. It must be a MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`) or a Flat JSON file. Binary payloads (`vnd.recordare.musicxml` and `audio/midi`) can be encoded in Base64, in this case the `dataEncoding` property must match the encoding used for the API request. ", json_schema_extra={"examples": [""]}) data_encoding: Optional[StrictStr] = Field(default=None, description="The optional encoding of the score data. This property must match the encoding used for the `data` property.", alias="dataEncoding") autosave: Optional[StrictBool] = Field(default=None, description="Must be set to `true` if the revision was created automatically. ") description: Optional[StrictStr] = Field(default=None, description="A description associated to the revision") diff --git a/flat_api/models/score_revision_statistics.py b/flat_api/models/score_revision_statistics.py index 88a907e..ff0919d 100644 --- a/flat_api/models/score_revision_statistics.py +++ b/flat_api/models/score_revision_statistics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_source.py b/flat_api/models/score_source.py index d119658..a98f518 100644 --- a/flat_api/models/score_source.py +++ b/flat_api/models/score_source.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,7 +28,7 @@ class ScoreSource(BaseModel): """ ScoreSource """ # noqa: E501 - google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this field property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") + google_drive: Optional[StrictStr] = Field(default=None, description="If the score is a file on Google Drive, this property must contain its identifier. To use this method, the Drive file must be public or the Flat Drive App must have access to the file. ", alias="googleDrive") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["googleDrive"] diff --git a/flat_api/models/score_summary.py b/flat_api/models/score_summary.py index fd72d47..e4f717f 100644 --- a/flat_api/models/score_summary.py +++ b/flat_api/models/score_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track.py b/flat_api/models/score_track.py index 408e4a1..d1cc583 100644 --- a/flat_api/models/score_track.py +++ b/flat_api/models/score_track.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_creation.py b/flat_api/models/score_track_creation.py index e19ac55..0436944 100644 --- a/flat_api/models/score_track_creation.py +++ b/flat_api/models/score_track_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_creation_response.py b/flat_api/models/score_track_creation_response.py index 0d8be58..d307ccf 100644 --- a/flat_api/models/score_track_creation_response.py +++ b/flat_api/models/score_track_creation_response.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_point.py b/flat_api/models/score_track_point.py index d3f9ed9..d4df106 100644 --- a/flat_api/models/score_track_point.py +++ b/flat_api/models/score_track_point.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_purpose.py b/flat_api/models/score_track_purpose.py index cd5341e..501b72f 100644 --- a/flat_api/models/score_track_purpose.py +++ b/flat_api/models/score_track_purpose.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_state.py b/flat_api/models/score_track_state.py index e5d3200..d2f21e1 100644 --- a/flat_api/models/score_track_state.py +++ b/flat_api/models/score_track_state.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_type.py b/flat_api/models/score_track_type.py index 33e083d..d9bd943 100644 --- a/flat_api/models/score_track_type.py +++ b/flat_api/models/score_track_type.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_track_update.py b/flat_api/models/score_track_update.py index df35e21..c625564 100644 --- a/flat_api/models/score_track_update.py +++ b/flat_api/models/score_track_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/score_views_counts.py b/flat_api/models/score_views_counts.py index b20f9e1..674fab2 100644 --- a/flat_api/models/score_views_counts.py +++ b/flat_api/models/score_views_counts.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/task.py b/flat_api/models/task.py index 41097ec..8483ce3 100644 --- a/flat_api/models/task.py +++ b/flat_api/models/task.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/task_export_options.py b/flat_api/models/task_export_options.py index 6123a4c..b86c008 100644 --- a/flat_api/models/task_export_options.py +++ b/flat_api/models/task_export_options.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/task_progress.py b/flat_api/models/task_progress.py index 31f88f5..f626978 100644 --- a/flat_api/models/task_progress.py +++ b/flat_api/models/task_progress.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/task_result.py b/flat_api/models/task_result.py index 99fca4b..829e286 100644 --- a/flat_api/models/task_result.py +++ b/flat_api/models/task_result.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,8 +28,8 @@ class TaskResult(BaseModel): """ Optional result information about this task """ # noqa: E501 - url: Optional[StrictStr] = Field(default=None, description="URL returned by the task worker") - error: Optional[StrictStr] = Field(default=None, description="Error returned by task worker") + url: Optional[StrictStr] = Field(default=None, description="URL of the generated file, when the task produces one") + error: Optional[StrictStr] = Field(default=None, description="Error message, when the task failed") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["url", "error"] diff --git a/flat_api/models/teaching_theme.py b/flat_api/models/teaching_theme.py index 5f15cc9..a5d5204 100644 --- a/flat_api/models/teaching_theme.py +++ b/flat_api/models/teaching_theme.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/tutteo_product.py b/flat_api/models/tutteo_product.py index b40d500..fc70afb 100644 --- a/flat_api/models/tutteo_product.py +++ b/flat_api/models/tutteo_product.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_admin_update.py b/flat_api/models/user_admin_update.py index 74481dc..e3ee04a 100644 --- a/flat_api/models/user_admin_update.py +++ b/flat_api/models/user_admin_update.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_azure_details.py b/flat_api/models/user_azure_details.py index abb6bfc..8a3439f 100644 --- a/flat_api/models/user_azure_details.py +++ b/flat_api/models/user_azure_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_basics.py b/flat_api/models/user_basics.py index 3454de8..8589ba2 100644 --- a/flat_api/models/user_basics.py +++ b/flat_api/models/user_basics.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_community_profile_links.py b/flat_api/models/user_community_profile_links.py index c281a56..8a76d12 100644 --- a/flat_api/models/user_community_profile_links.py +++ b/flat_api/models/user_community_profile_links.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class UserCommunityProfileLinks(BaseModel): soundcloud_url: Optional[StrictStr] = Field(default=None, description="SoundCloud Profile URL", alias="soundcloudUrl") tiktok_url: Optional[StrictStr] = Field(default=None, description="TikTok profile URL. For updates, also accepts TikTok usernames", alias="tiktokUrl") instagram_url: Optional[StrictStr] = Field(default=None, description="Instagram profile URL. For updates, also accepts Instagram usernames", alias="instagramUrl") - website_url: Optional[StrictStr] = Field(default=None, description="Personnal website URL", alias="websiteUrl") + website_url: Optional[StrictStr] = Field(default=None, description="Personal website URL", alias="websiteUrl") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["spotifyUrl", "youtubeUrl", "soundcloudUrl", "tiktokUrl", "instagramUrl", "websiteUrl"] diff --git a/flat_api/models/user_creation.py b/flat_api/models/user_creation.py index fa407a7..f254101 100644 --- a/flat_api/models/user_creation.py +++ b/flat_api/models/user_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_details.py b/flat_api/models/user_details.py index c3d2f70..1feb315 100644 --- a/flat_api/models/user_details.py +++ b/flat_api/models/user_details.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -51,18 +51,18 @@ class UserDetails(BaseModel): bio: Optional[StrictStr] = Field(default=None, description="User's biography") registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") - followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") - following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") - owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user has", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follows", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user owns", alias="ownedPublicScoresCount") all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") - cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (background) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") links: Optional[UserCommunityProfileLinks] = None is_email_verified: Optional[StrictBool] = Field(default=None, description="Whether the user's email address has been verified", alias="isEmailVerified") azure_details: Optional[UserAzureDetails] = Field(default=None, alias="azureDetails") - private_profile: Optional[StrictBool] = Field(default=None, description="Tell either this user profile is private or not (individual accounts only)", alias="privateProfile") + private_profile: Optional[StrictBool] = Field(default=None, description="Whether this user profile is private (individual accounts only)", alias="privateProfile") locale: Optional[StrictStr] = Field(default='en', description="The user language. Input values will be automatically normalized to a supported locale code. Unknown locales will default to `en`. Current supported locales include: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ja-HIRA`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW` ") groups: Optional[List[StrictStr]] = Field(default=None, description="For Flat for Education accounts, list of Group identifiers the user is part of.") picture_file: Optional[StrictStr] = Field(default=None, description="The ID of the user profile picture", alias="pictureFile") diff --git a/flat_api/models/user_details_admin.py b/flat_api/models/user_details_admin.py index fb9f1c5..e34dcec 100644 --- a/flat_api/models/user_details_admin.py +++ b/flat_api/models/user_details_admin.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_details_admin_all_of_license.py b/flat_api/models/user_details_admin_all_of_license.py index 7b3af4f..bd0d3c8 100644 --- a/flat_api/models/user_details_admin_all_of_license.py +++ b/flat_api/models/user_details_admin_all_of_license.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -35,7 +35,7 @@ class UserDetailsAdminAllOfLicense(BaseModel): expiration_date: Optional[datetime] = Field(default=None, description="Date when the license expires", alias="expirationDate") source: Optional[LicenseSources] = LicenseSources.ORDER mode: Optional[LicenseMode] = None - active: Optional[StrictBool] = Field(default=None, description="ID of the current license") + active: Optional[StrictBool] = Field(default=None, description="Whether the license is currently active") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "expirationDate", "source", "mode", "active"] diff --git a/flat_api/models/user_public.py b/flat_api/models/user_public.py index 0c08ba9..dfe1317 100644 --- a/flat_api/models/user_public.py +++ b/flat_api/models/user_public.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -50,13 +50,13 @@ class UserPublic(BaseModel): bio: Optional[StrictStr] = Field(default=None, description="User's biography") registration_date: Optional[datetime] = Field(default=None, description="Date the user signed up", alias="registrationDate") liked_scores_count: Optional[StrictInt] = Field(default=None, description="Number of the scores liked by the user", alias="likedScoresCount") - followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user have", alias="followersCount") - following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follow", alias="followingCount") - owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user have", alias="ownedPublicScoresCount") + followers_count: Optional[StrictInt] = Field(default=None, description="Number of followers the user has", alias="followersCount") + following_count: Optional[StrictInt] = Field(default=None, description="Number of people the user follows", alias="followingCount") + owned_public_scores_count: Optional[StrictInt] = Field(default=None, description="Number of public scores the user owns", alias="ownedPublicScoresCount") all_public_scores_count: Optional[StrictInt] = Field(default=None, description="Total number of public scores the user participates in (owned + joined)", alias="allPublicScoresCount") likes_count: Optional[StrictInt] = Field(default=None, description="Number of likes on the user published scores", alias="likesCount") plays_count: Optional[StrictInt] = Field(default=None, description="Number of plays on the user published scores", alias="playsCount") - cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (backgroud) for the profile", alias="coverPicture") + cover_picture: Optional[StrictStr] = Field(default=None, description="Cover picture (background) for the profile", alias="coverPicture") profile_theme: Optional[StrictStr] = Field(default=None, description="Theme (background) for the profile", alias="profileTheme") links: Optional[UserCommunityProfileLinks] = None additional_properties: Dict[str, Any] = {} diff --git a/flat_api/models/user_public_summary.py b/flat_api/models/user_public_summary.py index e5c147b..c70fd4f 100644 --- a/flat_api/models/user_public_summary.py +++ b/flat_api/models/user_public_summary.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_signin_link.py b/flat_api/models/user_signin_link.py index 72e0254..193f529 100644 --- a/flat_api/models/user_signin_link.py +++ b/flat_api/models/user_signin_link.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/models/user_signin_link_creation.py b/flat_api/models/user_signin_link_creation.py index 2fbeb9d..da7461b 100644 --- a/flat_api/models/user_signin_link_creation.py +++ b/flat_api/models/user_signin_link_creation.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flat_api/rest.py b/flat_api/rest.py index 8f651d6..36abefa 100644 --- a/flat_api/rest.py +++ b/flat_api/rest.py @@ -3,9 +3,9 @@ """ Flat API - The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) + The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful: it has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference are [available on GitHub](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html) - The version of the OpenAPI document: 2.26.0 + The version of the OpenAPI document: 2.26.2 Contact: developers@flat.io Generated by OpenAPI Generator (https://openapi-generator.tech) From 863d4a5e0186a12ea75763d1a479e946492bac93 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 17 Sep 2026 10:54:17 +0200 Subject: [PATCH 44/46] Regenerate from api-reference v2.26.2 (patch -> 2.0.3) (#49) Co-authored-by: Tutteo CI --- VERSION | 2 +- flat_api/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index e9307ca..50ffc5a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2 +2.0.3 diff --git a/flat_api/__init__.py b/flat_api/__init__.py index ae76e6c..2c9bc75 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -10,7 +10,7 @@ """ # --- flat_api ergonomic surface (tools/patches/90_exports.py) --- -__version__ = "2.0.2" +__version__ = "2.0.3" from flat_api.client import AsyncFlatClient, FlatClient from flat_api.errors import ( @@ -62,7 +62,7 @@ """ # noqa: E501 -__version__ = "2.0.2" +__version__ = "2.0.3" # Define package exports __all__ = [ From f8a36b0cdde35b7bfed505962264320d45854792 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Thu, 17 Sep 2026 10:57:27 +0200 Subject: [PATCH 45/46] docs(changelog): add 2.0.2 and 2.0.3 (#51) --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2096b2b..8d6b848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [2.0.3](https://github.com/FlatIO/api-client-python/compare/v2.0.2...v2.0.3) (2026-09-17) + +Identical to 2.0.2. The regeneration pipeline ran twice against API specification 2.26.2 and each run bumps the version, so this release carries no change. + +## [2.0.2](https://github.com/FlatIO/api-client-python/compare/v2.0.1...v2.0.2) (2026-09-17) + +Regenerated against API specification 2.26.2. See the [API changelog](https://flat.io/developers/docs/api/changelog). + +### Features + +* **omr:** `OmrJobCreation.auto_rotate` (`autoRotate`). Off by default; when set, the server detects and corrects pages uploaded sideways or upside down before recognition. `OmrJob` echoes the value. + +### Documentation + +* Descriptions refreshed from the specification: no change on the wire. + ## [2.0.1](https://github.com/FlatIO/api-client-python/compare/v2.0.0...v2.0.1) (2026-09-10) ### Bug Fixes From 9d77384e2125d6e4317879c0e35f97360a7d818a Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Tue, 13 Oct 2026 15:56:37 +0200 Subject: [PATCH 46/46] Regenerate from api-reference v2.26.2 (patch -> 2.0.4) (#50) Co-authored-by: Tutteo CI --- VERSION | 2 +- flat_api/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 50ffc5a..2165f8f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.3 +2.0.4 diff --git a/flat_api/__init__.py b/flat_api/__init__.py index 2c9bc75..0260bc4 100644 --- a/flat_api/__init__.py +++ b/flat_api/__init__.py @@ -10,7 +10,7 @@ """ # --- flat_api ergonomic surface (tools/patches/90_exports.py) --- -__version__ = "2.0.3" +__version__ = "2.0.4" from flat_api.client import AsyncFlatClient, FlatClient from flat_api.errors import ( @@ -62,7 +62,7 @@ """ # noqa: E501 -__version__ = "2.0.3" +__version__ = "2.0.4" # Define package exports __all__ = [